diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6ad1fed68efb6849e98f191c6f33176fbf363e..8e7e1b75ddb61b73a883f9e3acfcd1e6b19bd060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,24 @@ Announcements August 2019. Start porting now to avoid surprises when the time comes. For more information, see [this blog post](https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html). +r17b +---- + + * [Issue 480]: Fixed libc++ header issues with `_FILE_OFFSET_BITS=64`. + * [Issue 692]: Fixed ASAN for standalone toolchains with static STLs. + * [Issue 697]: Pulled documentation updates for simpleperf. + * [Issue 702]: Updated sysroot to fix missing libc symbols. + * [Issue 704]: Updated shaderc/vulkan-validation-layers sources. + * [Issue 708]: Fixed introduced API tag for + `pthread_cond_timedwait_monotonic_nmp` to make it available on ICS. + +[Issue 480]: https://github.com/android-ndk/ndk/issues/480 +[Issue 692]: https://github.com/android-ndk/ndk/issues/692 +[Issue 697]: https://github.com/android-ndk/ndk/issues/697 +[Issue 702]: https://github.com/android-ndk/ndk/issues/702 +[Issue 704]: https://github.com/android-ndk/ndk/issues/704 +[Issue 708]: https://github.com/android-ndk/ndk/issues/708 + Changes ------- diff --git a/build/repo.prop b/build/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/build/repo.prop +++ b/build/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/platforms/NOTICE b/platforms/NOTICE index 46123b89b30541f65fda5ec4c89ca161f350a9df..5be1ce92d66c985a62a7c3e7ce299f949b9a44f7 100644 --- a/platforms/NOTICE +++ b/platforms/NOTICE @@ -136,6 +136,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -156,6 +183,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -181,6 +221,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -553,32 +607,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -3073,6 +3101,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -3785,34 +3842,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -3938,32 +3967,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -3990,32 +3993,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -4247,58 +4224,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2005 Tim J. Robbins. All rights reserved. @@ -4368,32 +4293,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -4420,93 +4319,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -4552,6 +4364,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -4607,32 +4447,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -4973,58 +4787,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2011 Ed Schouten David Chisnall All rights reserved. @@ -5215,6 +4977,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5951,213 +5714,728 @@ SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved +Copyright (c) 2003, Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 1999 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004-2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008-2009 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. +Copyright (c) 2005-2008 David Schultz +All rights reserved. -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -Copyright (C) 2016 The Android Open Source Project +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. - http://www.apache.org/licenses/LICENSE-2.0 +------------------------------------------------------------------- -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -Copyright (c) 2007-2017 The Khronos Group Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: +Copyright (c) 2005-2011 David Schultz +All rights reserved. -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 1999 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2001 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008-2009 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +Copyright (C) 2016 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +Copyright (c) 2007-2017 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. Copyright (c) 2017 The Khronos Group Inc. @@ -6960,29 +7238,32 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Developed at SunSoft, a Sun Microsystems, Inc. business. +Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. ------------------------------------------------------------------- ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Developed at SunSoft, a Sun Microsystems, Inc. business. +Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. ==================================================== -Optimized by Bruce D. Evans. +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. ------------------------------------------------------------------- ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -6993,7 +7274,6 @@ is preserved. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -7007,7 +7287,59 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +Optimized by Bruce D. Evans. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -7377,32 +7709,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -9897,6 +10203,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -10609,34 +10944,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -10762,32 +11069,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -10814,32 +11095,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -11071,58 +11326,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2005 Tim J. Robbins. All rights reserved. @@ -11192,32 +11395,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -11244,93 +11421,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -11376,6 +11466,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -11431,32 +11549,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -11797,58 +11889,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2011 Ed Schouten David Chisnall All rights reserved. @@ -12039,6 +12079,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -12775,223 +12816,738 @@ SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved +Copyright (c) 2003, Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 1999 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004-2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- - Copyright (c) 2014, ARM Limited - All rights Reserved. - Copyright (c) 2014, Linaro Ltd. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the company nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Copyright (c) 2014, Linaro Limited - All rights reserved. +Copyright (c) 2005-2008 David Schultz +All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- - Copyright (c) 1993 John Brezak - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without +Copyright (c) 2005-2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 1999 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2001 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + + Copyright (c) 2014, ARM Limited + All rights Reserved. + Copyright (c) 2014, Linaro Ltd. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the company nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + + Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + + Copyright (c) 1993 John Brezak + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright @@ -13069,6 +13625,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -13089,6 +13672,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -13114,6 +13710,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -13486,32 +14096,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -16006,6 +16590,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -16718,34 +17331,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -16871,32 +17456,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -16923,32 +17482,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -17180,33 +17713,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17232,7 +17782,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17244,10 +17794,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17258,76 +17808,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17339,10 +17974,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17353,8 +17988,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17379,7 +18067,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17403,18 +18091,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17438,14 +18144,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -17469,7 +18174,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -17485,62 +18190,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17566,33 +18276,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17618,23 +18303,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -17650,29 +18349,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17697,8 +18492,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17708,11 +18587,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17723,10 +18605,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17736,91 +18616,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17850,39 +18793,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -17906,33 +18903,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17958,8 +18989,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17985,56 +19015,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -18043,111 +19091,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18173,92 +19259,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -18268,14 +19272,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -18286,7 +19287,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18297,212 +19300,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18513,53 +19412,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -18584,7 +19483,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18595,56 +19496,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18670,7 +19576,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18696,7 +19604,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18722,48 +19660,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -18773,114 +19674,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -19178,6 +20012,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -19198,6 +20059,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -19223,6 +20097,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -19595,32 +20483,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -22115,6 +22977,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -22827,34 +23718,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -22980,32 +23843,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -23032,32 +23869,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -23289,33 +24100,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23341,7 +24169,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23353,10 +24181,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23367,76 +24195,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23448,10 +24361,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23462,8 +24375,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23488,7 +24454,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23512,18 +24478,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23547,14 +24531,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -23578,7 +24561,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -23594,62 +24577,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23675,33 +24663,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23727,23 +24690,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -23759,29 +24736,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23806,8 +24879,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23817,11 +24974,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23832,10 +24992,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23845,91 +25003,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23959,39 +25180,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24015,33 +25290,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24067,8 +25376,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24094,56 +25402,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24152,111 +25478,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24282,92 +25646,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -24377,14 +25659,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -24395,7 +25674,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24406,212 +25687,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24622,53 +25799,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -24693,7 +25870,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24704,56 +25883,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24779,7 +25963,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24805,7 +25991,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24831,48 +26047,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24882,114 +26061,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -25287,6 +26399,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -25307,6 +26446,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -25332,6 +26484,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -25704,32 +26870,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -28224,6 +29364,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -28936,34 +30105,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -29089,32 +30230,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -29141,32 +30256,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -29398,33 +30487,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29450,7 +30556,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29462,10 +30568,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29476,76 +30582,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29557,10 +30748,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29571,8 +30762,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29597,7 +30841,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29621,18 +30865,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29656,14 +30918,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -29687,7 +30948,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -29703,62 +30964,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29784,33 +31050,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29836,23 +31077,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -29868,29 +31123,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29915,8 +31266,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29926,11 +31361,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29941,10 +31379,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29954,91 +31390,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30068,39 +31567,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30124,33 +31677,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30176,8 +31763,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30203,56 +31789,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30261,111 +31865,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30391,92 +32033,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -30486,14 +32046,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -30504,7 +32061,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30515,212 +32074,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30731,53 +32186,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -30802,7 +32257,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30813,56 +32270,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30888,7 +32350,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30914,7 +32378,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30940,48 +32434,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30991,114 +32448,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -31396,6 +32786,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -31416,6 +32833,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -31441,6 +32871,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -31813,32 +33257,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -34333,6 +35751,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -35045,34 +36492,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -35198,32 +36617,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -35250,32 +36643,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -35507,33 +36874,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35559,7 +36943,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35571,10 +36955,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -35585,76 +36969,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35666,10 +37135,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -35680,8 +37149,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -35706,7 +37228,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35730,18 +37252,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35765,14 +37305,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -35796,7 +37335,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -35812,62 +37351,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35893,33 +37437,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35945,23 +37464,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -35977,29 +37510,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36024,8 +37653,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36035,11 +37748,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -36050,10 +37766,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36063,91 +37777,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36177,39 +37954,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36233,33 +38064,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36285,8 +38150,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36312,56 +38176,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36370,111 +38252,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36500,92 +38420,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36595,14 +38433,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -36613,7 +38448,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36624,212 +38461,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36840,53 +38573,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36911,7 +38644,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36922,56 +38657,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36997,7 +38737,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37023,7 +38765,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37049,48 +38821,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -37100,114 +38835,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -37505,6 +39173,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -37525,6 +39220,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -37550,6 +39258,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -37922,32 +39644,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -40442,6 +42138,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -41154,34 +42879,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -41307,32 +43004,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -41359,32 +43030,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -41616,33 +43261,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41668,7 +43330,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41680,10 +43342,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -41694,76 +43356,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41775,10 +43522,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -41789,8 +43536,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -41815,7 +43615,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41839,18 +43639,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41874,14 +43692,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -41905,7 +43722,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -41921,62 +43738,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42002,33 +43824,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42054,23 +43851,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -42086,29 +43897,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42133,8 +44040,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42144,11 +44135,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -42159,10 +44153,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42172,91 +44164,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42286,39 +44341,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -42342,33 +44451,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42394,8 +44537,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42421,56 +44563,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -42479,111 +44639,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42609,92 +44807,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42704,14 +44820,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -42722,7 +44835,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42733,212 +44848,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42949,53 +44960,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -43020,7 +45031,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43031,56 +45044,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43106,7 +45124,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43132,7 +45152,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43158,48 +45208,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -43209,114 +45222,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -43614,6 +45560,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -43634,6 +45607,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -43659,6 +45645,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -44031,32 +46031,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -46551,6 +48525,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -47263,34 +49266,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -47416,32 +49391,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -47468,32 +49417,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -47725,33 +49648,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47777,7 +49717,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47789,10 +49729,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -47803,24 +49743,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47846,35 +49923,62 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. +Copyright (c) 2011 The FreeBSD Foundation +All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -47884,10 +49988,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -47898,7 +50002,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47924,8 +50028,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -47936,30 +50042,20 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47983,14 +50079,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48014,7 +50109,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -48030,62 +50125,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48111,33 +50211,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48163,39 +50238,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2011 Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2008 Todd C. Miller + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -48211,13 +50284,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. - -Copyright (c) 2011 The FreeBSD Foundation +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48227,22 +50296,112 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, 2012, 2013 Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48268,10 +50427,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. +Copyright (c) 2012, Linaro Limited + All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48281,51 +50522,74 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2013 Antoine Jacoutot -Optimized by Bruce D. Evans. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48349,53 +50613,92 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48425,9 +50728,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 ARM Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48451,33 +50838,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48503,8 +50924,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48530,56 +50950,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48588,111 +51026,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48718,92 +51194,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48813,14 +51207,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -48831,7 +51222,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48842,212 +51235,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49058,53 +51347,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -49129,7 +51418,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49140,56 +51431,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49215,7 +51511,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49241,7 +51539,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49267,48 +51595,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -49318,114 +51609,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -49723,6 +51947,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -49743,6 +51994,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -49768,6 +52032,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -50140,32 +52418,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -52660,6 +54912,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -52945,14 +55226,369 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2000 Ben Harris. +Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2000 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Dieter Baron and Thomas Klausner. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001 Wasabi Systems, Inc. +All rights reserved. + +Written by Frank van der Linden for Wasabi Systems, Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed for the NetBSD Project by + Wasabi Systems, Inc. +4. The name of Wasabi Systems, Inc. may not be used to endorse + or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of Opsycon AB nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2011 The FreeBSD Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Daniel Hartmeier +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Tim J. Robbins +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Tim J. Robbins. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2002, 2003 Tim J. Robbins. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002-2004 Tim J. Robbins +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -52963,8 +55599,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2000 Ben Harris. -Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -52975,14 +55610,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -52993,11 +55625,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2000 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Dieter Baron and Thomas Klausner. +Copyright (c) 2003 Constantin S. Svintsoff Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53007,26 +55635,27 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001 Wasabi Systems, Inc. +Copyright (c) 2003 David Schultz All rights reserved. -Written by Frank van der Linden for Wasabi Systems, Inc. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53035,29 +55664,24 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed for the NetBSD Project by - Wasabi Systems, Inc. -4. The name of Wasabi Systems, Inc. may not be used to endorse - or promote products derived from this software without specific prior - written permission. -THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) +Copyright (c) 2003 Mike Barcroft +Copyright (c) 2002 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53068,11 +55692,11 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT @@ -53082,7 +55706,14 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) +Copyright (c) 2003 Networks Associates Technology, Inc. +All rights reserved. + +Portions of this software were developed for the FreeBSD Project by +Jacques A. Vidrine, Safeport Network Services, and Network +Associates Laboratories, the Security Research Division of Network +Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 +("CBOSS"), as part of the DARPA CHATS research program. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53092,15 +55723,12 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of Opsycon AB nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT @@ -53110,7 +55738,47 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2011 The FreeBSD Project. +Copyright (c) 2003 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2003, 2004 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53136,41 +55804,188 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Daniel Hartmeier +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1997,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (c) 1996-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004, 2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 The NetBSD Foundation, Inc. +Copyright (c) 2004-2005 David Schultz All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53180,21 +55995,21 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Tim J. Robbins +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53220,7 +56035,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Tim J. Robbins. +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53246,27 +56061,24 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Todd C. Miller +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2002, 2003 Tim J. Robbins. +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53292,7 +56104,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002-2004 Tim J. Robbins +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53304,10 +56116,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -53318,9 +56130,12 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002-2004 Tim J. Robbins. +Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53330,62 +56145,131 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2003 Constantin S. Svintsoff +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior written - permission. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -53400,34 +56284,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 Mike Barcroft -Copyright (c) 2002 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53453,39 +56310,23 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Networks Associates Technology, Inc. -All rights reserved. - -Portions of this software were developed for the FreeBSD Project by -Jacques A. Vidrine, Safeport Network Services, and Network -Associates Laboratories, the Security Research Division of Network -Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 -("CBOSS"), as part of the DARPA CHATS research program. +Copyright (c) 2008 Otto Moerbeek -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2003 Todd C. Miller +Copyright (c) 2008 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -53499,13 +56340,9 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - ------------------------------------------------------------------- -Copyright (c) 2003, 2004 Todd C. Miller +Copyright (c) 2008, Damien Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -53519,40 +56356,15 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl +Copyright (c) 2009 David Schultz All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2004 David Schultz +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53577,7 +56389,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53589,10 +56401,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -53603,160 +56415,164 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995,1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +Copyright (c) 2009 The NetBSD Foundation, Inc. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium. +Copyright (c) 2009-2013 Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Optimized by Bruce D. Evans. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996,1999 by Internet Software Consortium. +Copyright (c) 2010 The NetBSD Foundation, Inc. +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1997,1999 by Internet Software Consortium. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2010, Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004, 2005 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53782,7 +56598,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53808,154 +56625,170 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz +Copyright (c) 2011 Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2011 Martin Pieuchot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2011, VMware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53981,34 +56814,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54018,11 +56909,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54033,7 +56927,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2013 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54044,61 +56938,44 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl -All rights reserved. +Copyright (c) 2013 Antoine Jacoutot -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54123,78 +57000,150 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2013, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -The MIT License: +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +------------------------------------------------------------------- -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2014, Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +------------------------------------------------------------------- + +Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2015 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54205,50 +57154,54 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 David Schultz -All rights reserved. - +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -54272,61 +57225,68 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2017 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Copyright (c) 2017 Imagination Technologies. -------------------------------------------------------------------- +All rights reserved. -Copyright (c) 2008, Damien Miller +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. - -Copyright (c) 2011 The FreeBSD Foundation +Copyright (c)1999 Citrus Project, All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54351,7 +57311,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54377,10 +57337,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c)2003 Citrus Project, +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54391,28 +57349,67 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright 1989 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + +------------------------------------------------------------------- + +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. @@ -54428,114 +57425,82 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Optimized by Bruce D. Evans. - ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (c) 1993 by Digital Equipment Corporation. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +Portions Copyright (c) 1995 by International Business Machines, Inc. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall -All rights reserved. +Portions Copyright(C) 1995, Jason Downs. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54546,21 +57511,23 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54586,34 +57553,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54635,173 +57577,13 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Martin Pieuchot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, VMware, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 Stefan Farfeleder All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54813,10 +57595,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54827,92 +57609,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004-2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54922,14 +57622,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54940,56 +57637,39 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 David Schultz All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -54999,164 +57679,79 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005-2008 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55167,53 +57762,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -55236,69 +57831,76 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55324,7 +57926,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55350,7 +57982,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55376,56 +58010,22 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2003 Dag-Erling Smørgrav All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -55440,104 +58040,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- - -Portions Copyright(C) 1995, Jason Downs. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - The author of this software is David M. Gay. Copyright (C) 1998 by Lucent Technologies @@ -55832,6 +58334,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -55852,6 +58381,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -55877,6 +58419,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -56104,108 +58660,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2008 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2009 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2010 The Android Open Source Project +Copyright (C) 2008 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -56221,7 +58676,64 @@ limitations under the License. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project +Copyright (C) 2008 The Android Open Source Project +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (C) 2008 The Android Open Source Project +All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (C) 2009 The Android Open Source Project All rights reserved. Redistribution and use in source and binary forms, with or without @@ -56249,28 +58761,46 @@ SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (C) 2010 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------- + Copyright (C) 2010 The Android Open Source Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -58769,6 +61299,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -59481,34 +62040,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -59634,32 +62165,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -59686,32 +62191,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -59891,85 +62370,33 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2004-2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -60064,32 +62491,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -60116,93 +62517,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -60248,6 +62562,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -60303,32 +62645,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -60627,75 +62943,23 @@ modification, are permitted provided that the following conditions are met: * and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Chisnall -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -60911,6 +63175,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -61647,6 +63912,521 @@ SUCH DAMAGE. ------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005-2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + The author of this software is David M. Gay. Copyright (C) 1998 by Lucent Technologies diff --git a/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o index 3cbf1755433938560a41fa58d0c8df7fd0a1f951..f7778edd2c23cc8b8cc53ccd618963ba2134bdc2 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o index 01ec40ffb16bb66554c102325b3ac4acce860129..e498f1728ce9ae39fb66b44ba026aea732581a19 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o index a69ae62fd8a5ddfe01b9e46a03ab157639992cc6..5560fddc0f42a1ebcb24d90117aab98cd18fa43e 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-14/arch-arm/usr/lib/libEGL.so b/platforms/android-14/arch-arm/usr/lib/libEGL.so index 2033204994f05329a5e8e01255d05886b3c4d35d..3b8ad4466092859cc7d30a722da638ec11f497ca 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libEGL.so and b/platforms/android-14/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so index c685ebcdcb6578a34d16db3a0b290471849ffb3f..0e3ac063f592d025613e6b41e608c03ec6140770 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-14/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libGLESv2.so b/platforms/android-14/arch-arm/usr/lib/libGLESv2.so index 80ddcbc415fb0d6778b09eb6ef0111b8ae36f20b..5bf040c11c4b79d4af641dcff44f9460302db540 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-14/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-14/arch-arm/usr/lib/libOpenMAXAL.so index 76c03f2aa457254d9cc692717ec9502183633ad0..3d8d538cd94d1d323aec637c912f766bb2d5ef0f 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-14/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-14/arch-arm/usr/lib/libOpenSLES.so index fb9dd089df1aa33755e47187456520a39925332b..47221e76b7402b82165440d8c25cd151f5b240f3 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-14/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libandroid.so b/platforms/android-14/arch-arm/usr/lib/libandroid.so index ad185dcc0afb6c1b314053ff0d632107d8dbd105..4548740dfd5637164c41d7f38a9c0a21b3e14ee8 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libandroid.so and b/platforms/android-14/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libc.a b/platforms/android-14/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libc.a and b/platforms/android-14/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libc.so b/platforms/android-14/arch-arm/usr/lib/libc.so index 2763cd9f972d796112446c8f3876c50f24d3d26d..3d302edbac1cf1e466bf74d20df19c023e902120 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libc.so and b/platforms/android-14/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-14/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-14/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libdl.a b/platforms/android-14/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libdl.a and b/platforms/android-14/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libdl.so b/platforms/android-14/arch-arm/usr/lib/libdl.so index 7e57845b071c14f42432805ea0e027128721f168..8f30a8e6174236344e6a85d1a4cbe06d9a260789 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libdl.so and b/platforms/android-14/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-14/arch-arm/usr/lib/libjnigraphics.so index f0a107d0fe43c9f741020db001f63dd76a74b92c..d20e143b0f229fea1d3d698ebab3d017b5ddb9ab 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-14/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/liblog.so b/platforms/android-14/arch-arm/usr/lib/liblog.so index d7b423f83cd12564eaad347d7f9300373f4ccad3..c28dd04acedee64b698ea1dbc1015f40e8d4426e 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/liblog.so and b/platforms/android-14/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libm.a b/platforms/android-14/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libm.a and b/platforms/android-14/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libm.so b/platforms/android-14/arch-arm/usr/lib/libm.so index e532c370421df4bb0244059c1ad01a9b40c05d12..78f15c44eddbc992bf6a58785e8c41ef75926ee1 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libm.so and b/platforms/android-14/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libstdc++.a b/platforms/android-14/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libstdc++.a and b/platforms/android-14/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libstdc++.so b/platforms/android-14/arch-arm/usr/lib/libstdc++.so index 9723019d0614317ac6ec4b113ef23bc86f709933..fc81018d62ce39213791e628bf9b01eaa28a001b 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libstdc++.so and b/platforms/android-14/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-14/arch-arm/usr/lib/libz.a b/platforms/android-14/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-14/arch-arm/usr/lib/libz.a and b/platforms/android-14/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-14/arch-arm/usr/lib/libz.so b/platforms/android-14/arch-arm/usr/lib/libz.so index 247dfa5a929617b0893d3e7872e412a8b94ce754..e08b3776e01ab439d771810fd967a79362fb07cc 100755 Binary files a/platforms/android-14/arch-arm/usr/lib/libz.so and b/platforms/android-14/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-14/arch-x86/usr/lib/crtbegin_dynamic.o index 7b07379f92d9c5ce9fd25ec6da33056efed8b82d..502531b94eb16e161e4fb837b4258d5b5900f6f0 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-14/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-14/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-14/arch-x86/usr/lib/crtbegin_so.o index 91e790a9ce0f684d5b4fc6845f66df46a8821cae..f06423c88119b1539f04ec58798c8012ae2ae40a 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-14/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-14/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-14/arch-x86/usr/lib/crtbegin_static.o index ca4375a8d4cb886065c9a9bcacc90fe19fc9fce4..9660f3302085a542fe3fa9351f14cbbb45dc0779 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-14/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-14/arch-x86/usr/lib/libEGL.so b/platforms/android-14/arch-x86/usr/lib/libEGL.so index 6bb9c6150d9219ab02ce5d84d2342497fb88bb41..a270f60ec494a547ff57ae51d8531abcd876bea0 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libEGL.so and b/platforms/android-14/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-14/arch-x86/usr/lib/libGLESv1_CM.so index afecf6a58622e3ffeb7477fedf047e9d16ef61ee..f4ee591bcc312d24a3df4819d4130ce8eac716d5 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-14/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libGLESv2.so b/platforms/android-14/arch-x86/usr/lib/libGLESv2.so index f62455b205b97821c560c5c6d533c36bd370d62a..f3313993ca20fba4f6531b5786ef12bf20e43b3e 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-14/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-14/arch-x86/usr/lib/libOpenMAXAL.so index 30245ca78796883d80d6018428e10a34c7edd9c1..3d1139b43426bc3876be494c5621dea942e805a0 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-14/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-14/arch-x86/usr/lib/libOpenSLES.so index 91e29165eb92447415d1376c9b3b3b909849c364..6502da35f3d3898e0ff91ce153957822d28ef6e5 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-14/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libandroid.so b/platforms/android-14/arch-x86/usr/lib/libandroid.so index c1a3c723855426c7185029bdb290fa3b7e583741..46ca641f4b64a88df9be9fb4b527828363c47042 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libandroid.so and b/platforms/android-14/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libc.a b/platforms/android-14/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libc.a and b/platforms/android-14/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libc.so b/platforms/android-14/arch-x86/usr/lib/libc.so index ec5c70a19fabdae4b6ba47a3749c407d3d977b28..1c2fdc73dc5344a2109c4de4b32ad112e429298c 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libc.so and b/platforms/android-14/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-14/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-14/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libdl.a b/platforms/android-14/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libdl.a and b/platforms/android-14/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libdl.so b/platforms/android-14/arch-x86/usr/lib/libdl.so index b4c09ea795b84536bf7fb94ec1803702da117cd9..d2b3db83c797db0d7bd53da4991a2fdbb9573d58 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libdl.so and b/platforms/android-14/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-14/arch-x86/usr/lib/libjnigraphics.so index a2da6596f429aa9d9a22801953eab71ab6f43b29..d71bd0bd8a480c4ae7559a78233934b7cab6d1fa 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-14/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/liblog.so b/platforms/android-14/arch-x86/usr/lib/liblog.so index b6e657cfcbdcb17103273698e8b341bc442b62f8..66a4c50050ebaf755f3856b27da7ec60f9639e0a 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/liblog.so and b/platforms/android-14/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libm.a b/platforms/android-14/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libm.a and b/platforms/android-14/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libm.so b/platforms/android-14/arch-x86/usr/lib/libm.so index 439112abc80abaa8fcb680973a96ccebfc33cb5e..112e0cd22aa6092e6ad808fe5d8f782bba9b64bf 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libm.so and b/platforms/android-14/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libstdc++.a b/platforms/android-14/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libstdc++.a and b/platforms/android-14/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libstdc++.so b/platforms/android-14/arch-x86/usr/lib/libstdc++.so index 34ee7d51cf5ee5a3ab29a77110472a15be689209..c9a41816c4ddc05d6935e14c7dc37cf8d963e0cf 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libstdc++.so and b/platforms/android-14/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-14/arch-x86/usr/lib/libz.a b/platforms/android-14/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-14/arch-x86/usr/lib/libz.a and b/platforms/android-14/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-14/arch-x86/usr/lib/libz.so b/platforms/android-14/arch-x86/usr/lib/libz.so index 7f23e9af57d9e95b6cd36830bd5241cbf0c3bdb5..d93e55bb5d16391f15e18af96430f6429aa4c39f 100755 Binary files a/platforms/android-14/arch-x86/usr/lib/libz.so and b/platforms/android-14/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-15/arch-arm/usr/lib/crtbegin_dynamic.o index 6f5b8f460bda5aa30ab4b7f32ed6780394217a3a..5614d7dffb119bc5b95ecb5eed15060ce4b6d7b4 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-15/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-15/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-15/arch-arm/usr/lib/crtbegin_so.o index 7fd60210fd141562b1d261e2181ff1d370d916c4..fdffa8c08d41df0d026baf381a72d2d174cf3501 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-15/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-15/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-15/arch-arm/usr/lib/crtbegin_static.o index 98012aba8478993acdfd989c65ad4ce08e000c39..861669bd0fb069d0402b7eb77ddbe20531f15a85 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-15/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-15/arch-arm/usr/lib/libEGL.so b/platforms/android-15/arch-arm/usr/lib/libEGL.so index 9c8f1fc822dec6066828a93c727c4ba6dbc4420c..3f89df167a4c1ef5f2a5e8f92977532d20bd7e46 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libEGL.so and b/platforms/android-15/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-15/arch-arm/usr/lib/libGLESv1_CM.so index 8c0b6bec79011955db741af4c1114e1b41b3afc6..33f2a24b7b3d5197acb5c762d9a0902bb8c70a72 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-15/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libGLESv2.so b/platforms/android-15/arch-arm/usr/lib/libGLESv2.so index d976001e9a8765db18f03cff7665c2941ba791ac..f562ea6b828012e48137d98d643df3d77380b881 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-15/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-15/arch-arm/usr/lib/libOpenMAXAL.so index 5929f173c36616310e98cfa80e25596ab136a6c3..ff1cc6b2e77dee78a266e692572d583c71c2ec71 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-15/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-15/arch-arm/usr/lib/libOpenSLES.so index 02dce59643b52579cde127798115639425975620..b9286415698505516d219b7e7818205ef325f67d 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-15/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libandroid.so b/platforms/android-15/arch-arm/usr/lib/libandroid.so index 8ae11126a2da1223b5a27176aca38650b3adaf34..7c90c8e4359f4c5557498f0c208598e93e235f0f 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libandroid.so and b/platforms/android-15/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libc.a b/platforms/android-15/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libc.a and b/platforms/android-15/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libc.so b/platforms/android-15/arch-arm/usr/lib/libc.so index b88739caf1a359ecc96a6b50cd46402b9dfc0733..36b5fbb55559181df7ab85be7d5910ba86715e2f 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libc.so and b/platforms/android-15/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-15/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-15/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libdl.a b/platforms/android-15/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libdl.a and b/platforms/android-15/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libdl.so b/platforms/android-15/arch-arm/usr/lib/libdl.so index cd94693f12287fb1a5c64057025a1de3be5ba1a5..94e32a62893d2b94223000980a3fc6a5b8b91e25 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libdl.so and b/platforms/android-15/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-15/arch-arm/usr/lib/libjnigraphics.so index 25e891e68a3514f68932bef129b8b71a1c333a9b..1694ebe42be9724748d01e22e3ccd61ca0dec494 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-15/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/liblog.so b/platforms/android-15/arch-arm/usr/lib/liblog.so index ee078977e459098ab131b15bdc0ba5cc1a17ce27..aa0cee8d302b48d69188b1bcf2efcc4b5a800bc0 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/liblog.so and b/platforms/android-15/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libm.a b/platforms/android-15/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libm.a and b/platforms/android-15/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libm.so b/platforms/android-15/arch-arm/usr/lib/libm.so index f76c4f123b01339ec9e8dec12b7385f73741e4d9..12d0af3da0a21d5a839ff3726b0109c3cdc91c53 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libm.so and b/platforms/android-15/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libstdc++.a b/platforms/android-15/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libstdc++.a and b/platforms/android-15/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libstdc++.so b/platforms/android-15/arch-arm/usr/lib/libstdc++.so index 15756a1c4e4283e223c557ae25864a0ab379e469..ff631503fb24ce75f750e278ba45cd4c87aa8d9a 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libstdc++.so and b/platforms/android-15/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-15/arch-arm/usr/lib/libz.a b/platforms/android-15/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-15/arch-arm/usr/lib/libz.a and b/platforms/android-15/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-15/arch-arm/usr/lib/libz.so b/platforms/android-15/arch-arm/usr/lib/libz.so index 007aa537ba2fb6caa453ac472ceed5c612657aac..7e55cc7dd80ce9e7f8ce9487f072c7813817df05 100755 Binary files a/platforms/android-15/arch-arm/usr/lib/libz.so and b/platforms/android-15/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-15/arch-x86/usr/lib/crtbegin_dynamic.o index 649c02bc85987a5a8caeccd4a9c9f4635d24e3f0..95e9c55d2cec4500ab39c9b7288dde5b56082c11 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-15/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-15/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-15/arch-x86/usr/lib/crtbegin_so.o index 543681c09d6a0c8b253fe5d15a4f99c5539d41bb..272ce4db462376c9034850ec9edcae0af3efde21 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-15/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-15/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-15/arch-x86/usr/lib/crtbegin_static.o index 094400382f6cdd37c62468c52ebcbc299eb4970f..6e5e9055051dbe22a91c797b0579f8d3f90d9d39 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-15/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-15/arch-x86/usr/lib/libEGL.so b/platforms/android-15/arch-x86/usr/lib/libEGL.so index 265620e5c229b0befde933a85240e9002236f37c..de51d4b047aedff9426faf4b2f7c0da0a4dc764b 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libEGL.so and b/platforms/android-15/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-15/arch-x86/usr/lib/libGLESv1_CM.so index 62c5ad52f06684fd83409cb1473aae08779c5717..4f585df8f931c706d78c5b73405812eb741acb02 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-15/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libGLESv2.so b/platforms/android-15/arch-x86/usr/lib/libGLESv2.so index d85262652d9cf320e56963cb030e885f80cdb9b1..bf2dc8e61da9cbada5ee0100d37aa6bf127848fe 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-15/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-15/arch-x86/usr/lib/libOpenMAXAL.so index b9022034d28fd5cc525edae0e52da23feabe084c..4d62d68ae33f9342196ee9afde1e1688d85cb527 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-15/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-15/arch-x86/usr/lib/libOpenSLES.so index cfa892141f3b010442cb4af719e658a866a7ca07..c01543337cbfeb62e37d936244d983254730435f 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-15/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libandroid.so b/platforms/android-15/arch-x86/usr/lib/libandroid.so index 858efcc4c657c789663384649b56c42b80c2da65..c52d28d0934041a75503a460394f27aa42b1fd76 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libandroid.so and b/platforms/android-15/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libc.a b/platforms/android-15/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libc.a and b/platforms/android-15/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libc.so b/platforms/android-15/arch-x86/usr/lib/libc.so index 8689e56f11053e7ceded0661d680845533b385ac..b7f1f422ba814cd968670b0ca7de89e958dfbff4 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libc.so and b/platforms/android-15/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-15/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-15/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libdl.a b/platforms/android-15/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libdl.a and b/platforms/android-15/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libdl.so b/platforms/android-15/arch-x86/usr/lib/libdl.so index 3a27c5520bfd3f47b959cc5f5e516027e2446c62..26f5dd7312df51506947e254c010072f8a2da6f8 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libdl.so and b/platforms/android-15/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-15/arch-x86/usr/lib/libjnigraphics.so index aefa0da793ea2a79876af8e3b301404a83e9509b..a81c5d796e61fc217c3dd15f240e0446ac1618ad 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-15/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/liblog.so b/platforms/android-15/arch-x86/usr/lib/liblog.so index ef8dc49744cc19ab33c2e5c1a6ba0494a64485da..452ca10e7f46618140dd9d5762eab5fa00458f11 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/liblog.so and b/platforms/android-15/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libm.a b/platforms/android-15/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libm.a and b/platforms/android-15/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libm.so b/platforms/android-15/arch-x86/usr/lib/libm.so index a6fea401a9ab465c59c9ef8edafca2ecfc96788a..3c2264e7090a1e64440c4b92ec3d66997a1c3f88 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libm.so and b/platforms/android-15/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libstdc++.a b/platforms/android-15/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libstdc++.a and b/platforms/android-15/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libstdc++.so b/platforms/android-15/arch-x86/usr/lib/libstdc++.so index 2a018e99548b7418b91aaa1bf6a1acb22d1e51df..f44be535aec8a54c3502d9ee3401ca084da13800 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libstdc++.so and b/platforms/android-15/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-15/arch-x86/usr/lib/libz.a b/platforms/android-15/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-15/arch-x86/usr/lib/libz.a and b/platforms/android-15/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-15/arch-x86/usr/lib/libz.so b/platforms/android-15/arch-x86/usr/lib/libz.so index d72a7b4d6ab8f06cac5b8a32da9f307cd3e0ea21..f4b7d446aee4bf2dc3b91717373b0dbb5966bc5d 100755 Binary files a/platforms/android-15/arch-x86/usr/lib/libz.so and b/platforms/android-15/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-16/arch-arm/usr/lib/crtbegin_dynamic.o index f36ea437b3179720aa97e31f708fe5e3c275c3d6..8308f0b289fa943884e3fa0649a5a69de6756e18 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-16/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-16/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-16/arch-arm/usr/lib/crtbegin_so.o index c64b6ee492ed6d1eded8031329ea569fef7880aa..d79c47fa46df29e08fc9cfb9380e5af5e7a5ad90 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-16/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-16/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-16/arch-arm/usr/lib/crtbegin_static.o index d972be2d33843a85679e5129bcfd4cf669b93861..0893dd0466685dd7f4164bb9347d82ef36944201 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-16/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-16/arch-arm/usr/lib/libEGL.so b/platforms/android-16/arch-arm/usr/lib/libEGL.so index ccf742c442ebf0045853e692ba2dab968fc00940..4085cf94669db0093461f1c12e85c4767c83405e 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libEGL.so and b/platforms/android-16/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-16/arch-arm/usr/lib/libGLESv1_CM.so index 9c235459079aed1938e72fcb56bdbf49bb5898ec..3ff9989445ac25236eddf88deff05400edfdd796 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-16/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libGLESv2.so b/platforms/android-16/arch-arm/usr/lib/libGLESv2.so index c49eae3f1546cbe30382d868168577d224e85eb8..6420a281b04073908fca928f1d127faacbcd1213 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-16/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-16/arch-arm/usr/lib/libOpenMAXAL.so index 0d812766cca76552e73b569f8e0796c73bf568db..2f1c65fab6aec644c3766ef955c53c35ce7ec4a4 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-16/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-16/arch-arm/usr/lib/libOpenSLES.so index 6cb00271a053c2e205b58b3c35a5e951125d55d8..29e75e697380630fab88093e48327afc2e40c841 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-16/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libandroid.so b/platforms/android-16/arch-arm/usr/lib/libandroid.so index 7daa4c30829d0638388316bc2af5ddd399d40b7d..8e2d753911faf9cc0e199a4590dac15e6461514c 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libandroid.so and b/platforms/android-16/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libc.a b/platforms/android-16/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libc.a and b/platforms/android-16/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libc.so b/platforms/android-16/arch-arm/usr/lib/libc.so index 98eb892a32f6d5c00f358b40b184794183200122..3a22bd96448bc5d5daa35235217d794a57010040 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libc.so and b/platforms/android-16/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-16/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-16/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libdl.a b/platforms/android-16/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libdl.a and b/platforms/android-16/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libdl.so b/platforms/android-16/arch-arm/usr/lib/libdl.so index 9a8b494bbe02e63b673567bda8c4c987bd86c64c..b51e7b31432d2d767d543aa4da4e178a0b8e4be1 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libdl.so and b/platforms/android-16/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-16/arch-arm/usr/lib/libjnigraphics.so index e6601a66be98f33d85db7daa5023cdc3236e7a72..ac6b5fb6f33cdd94ed3764e150df733c71e96af4 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-16/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/liblog.so b/platforms/android-16/arch-arm/usr/lib/liblog.so index 2abc82a662ced8921133088bfc9efd901c0ee88d..2725f134749094b631d7d6c77805df5cd3b13b5f 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/liblog.so and b/platforms/android-16/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libm.a b/platforms/android-16/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libm.a and b/platforms/android-16/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libm.so b/platforms/android-16/arch-arm/usr/lib/libm.so index d805aee03747e934693226a0d9abd944f09e79dd..b5623156e83afb3ec556a09a6d572968a29e9352 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libm.so and b/platforms/android-16/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libstdc++.a b/platforms/android-16/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libstdc++.a and b/platforms/android-16/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libstdc++.so b/platforms/android-16/arch-arm/usr/lib/libstdc++.so index 428dac876fee69cf5ba5a16da91a861b298173b6..091939cb472309d4ed98f0ade2c29e47399ecabd 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libstdc++.so and b/platforms/android-16/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-16/arch-arm/usr/lib/libz.a b/platforms/android-16/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-16/arch-arm/usr/lib/libz.a and b/platforms/android-16/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-16/arch-arm/usr/lib/libz.so b/platforms/android-16/arch-arm/usr/lib/libz.so index 6ddcc162e6ff97d73a0d5c32d2b9dcac69c5f643..d5e17df032ad839ed55bdf81658321f719da265f 100755 Binary files a/platforms/android-16/arch-arm/usr/lib/libz.so and b/platforms/android-16/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-16/arch-x86/usr/lib/crtbegin_dynamic.o index 747b4b07f01374e20fcd987b62484e17ac0ff738..912857b6de9b1a75254782ff680769323d2e9146 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-16/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-16/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-16/arch-x86/usr/lib/crtbegin_so.o index 8fa30f2c42c73915ee5c717c64ac64e2877a3dde..fcfc0d1246882c4c19af9c7e72c309f27e6b7973 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-16/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-16/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-16/arch-x86/usr/lib/crtbegin_static.o index a34a36f406eb593405f9ae0c0f32bc84c437f0f5..5f5d261325fed6be5cbff51467cff7953ada16b0 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-16/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-16/arch-x86/usr/lib/libEGL.so b/platforms/android-16/arch-x86/usr/lib/libEGL.so index 8eb91224c211e4d77770b907d2360c0ac4bf5ac1..0598eaa603c15f0aa2056e6b83613cd37d7e0f2e 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libEGL.so and b/platforms/android-16/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-16/arch-x86/usr/lib/libGLESv1_CM.so index 83a07c69c3e996540a574b81a1db9edcf71ef70a..9616d2b1c1a7f3c88d5ca7c7d499a6f506209ec8 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-16/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libGLESv2.so b/platforms/android-16/arch-x86/usr/lib/libGLESv2.so index 9fb66c3dc2939b799c2b53939a4ea084f091f0cb..3bde59a7f132776f872f73541d9dc9b7e5f88138 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-16/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-16/arch-x86/usr/lib/libOpenMAXAL.so index 56caa8bc7bd2dc536e6fa76391ca8b8e5b663933..d6daf23da15ba790ccf48b471633cd67dd438978 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-16/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-16/arch-x86/usr/lib/libOpenSLES.so index afea4cf7bfa1dc0f5f432eec5ad1c651cdf3855a..34d7b9c2e5cd4ea24f1f84f711471cbca1c2aba1 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-16/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libandroid.so b/platforms/android-16/arch-x86/usr/lib/libandroid.so index f99066569da1d7e29769bc9d732dc52290764d04..bbf71fd5d3eefe5cc4e1033bdfc0704e1b83d0ba 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libandroid.so and b/platforms/android-16/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libc.a b/platforms/android-16/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libc.a and b/platforms/android-16/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libc.so b/platforms/android-16/arch-x86/usr/lib/libc.so index d7db8b813e4e8a583178bb37fa50eceaadaa029c..fc14132599276c0170dcf5bb36cae7f77a2ba043 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libc.so and b/platforms/android-16/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-16/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-16/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libdl.a b/platforms/android-16/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libdl.a and b/platforms/android-16/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libdl.so b/platforms/android-16/arch-x86/usr/lib/libdl.so index f6c54e09af240387040a102126779dcb943823d9..7d90ef465522bc289b10f3679054b7e505e52fb9 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libdl.so and b/platforms/android-16/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-16/arch-x86/usr/lib/libjnigraphics.so index d3c679f1fd98dd30311db24200acd559cc211231..ea1747de4abc5880fe6a0829501fdef83478c42e 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-16/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/liblog.so b/platforms/android-16/arch-x86/usr/lib/liblog.so index e0b0d70c8b2e031e18f2177010439be2dd715f54..b76ba6b934c2e87a30460afe5da1b02ef06b6e86 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/liblog.so and b/platforms/android-16/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libm.a b/platforms/android-16/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libm.a and b/platforms/android-16/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libm.so b/platforms/android-16/arch-x86/usr/lib/libm.so index a567bda708749b90bc85e69297f0d646f7cc1b47..25173d3a653cabf4b41c63cb6861eff011ef0539 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libm.so and b/platforms/android-16/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libstdc++.a b/platforms/android-16/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libstdc++.a and b/platforms/android-16/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libstdc++.so b/platforms/android-16/arch-x86/usr/lib/libstdc++.so index 74addfa7eea841157affff92a4a6be5b86d3c6d0..54a0018420f1d285b80fa7fa4999966df4fee321 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libstdc++.so and b/platforms/android-16/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-16/arch-x86/usr/lib/libz.a b/platforms/android-16/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-16/arch-x86/usr/lib/libz.a and b/platforms/android-16/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-16/arch-x86/usr/lib/libz.so b/platforms/android-16/arch-x86/usr/lib/libz.so index a36aa892522f9e63cdbb53b2a67a46a73b336efa..96435764041a0bf35525fc96ce3aedec32cf4670 100755 Binary files a/platforms/android-16/arch-x86/usr/lib/libz.so and b/platforms/android-16/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-17/arch-arm/usr/lib/crtbegin_dynamic.o index 20005a42f1e1fd18b59e52c265b6fe6056a360e8..feed7fa8dd616fd64ec2c6ba932cc1b16e1b827c 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-17/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-17/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-17/arch-arm/usr/lib/crtbegin_so.o index 89f7820edd1711ff981c9d373b6f7ff54ae516eb..704872ca060662bbd4f1d8ae4652c1971a6f282a 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-17/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-17/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-17/arch-arm/usr/lib/crtbegin_static.o index 1b56645301171295f3dd6e2264a6938f35022a6b..c5fcdaf97834e5b7c9f3e06d1c9a54f339aae391 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-17/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-17/arch-arm/usr/lib/libEGL.so b/platforms/android-17/arch-arm/usr/lib/libEGL.so index a7956ac456b204f9819c2500938e020c9dde5c55..73b882b0df09e9ba20ad1a3c49a18e9f1395bf60 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libEGL.so and b/platforms/android-17/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-17/arch-arm/usr/lib/libGLESv1_CM.so index 2cf9f3d551e06c01a3645474cdfc920fdb16de2e..b9b37e0b5ce27265b9415f9aeb77cd70acc7473c 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-17/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libGLESv2.so b/platforms/android-17/arch-arm/usr/lib/libGLESv2.so index 5180bd905dfec5a3f84e7f8bf2514866422dfd56..0c6c84acdb529883636d8ba1b523c73f8238668c 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-17/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-17/arch-arm/usr/lib/libOpenMAXAL.so index 8ace8c7946cbf8fe0fbc4b297cff230e3d9265ac..2405263b9909db613b0ba30115741234bcb4aea6 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-17/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-17/arch-arm/usr/lib/libOpenSLES.so index 700d78c1ebfae9e07463414bc39991ffcb7817c5..aeb9ed69c2add4cd2665fd5e29e4f922964a37b8 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-17/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libandroid.so b/platforms/android-17/arch-arm/usr/lib/libandroid.so index df6e3fc2fc4d3f117f37f23739373725b961e2af..0852cd07b27072bc091308c321d9d4b6425ce7b6 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libandroid.so and b/platforms/android-17/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libc.a b/platforms/android-17/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libc.a and b/platforms/android-17/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libc.so b/platforms/android-17/arch-arm/usr/lib/libc.so index a718c4dd42bf2e8f48b7cbe25a572ba3f7518118..a80e8aa80e151deda5763c590e65914eb44e1841 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libc.so and b/platforms/android-17/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-17/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-17/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libdl.a b/platforms/android-17/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libdl.a and b/platforms/android-17/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libdl.so b/platforms/android-17/arch-arm/usr/lib/libdl.so index 74974b1601358aafa97e9d35b1d8b419284c90c8..9af06c24233e0120487fc4ab886bfb09cab540b3 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libdl.so and b/platforms/android-17/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-17/arch-arm/usr/lib/libjnigraphics.so index 7381fd4215c1aa46014ee9b661ac924f0967ce48..f9b21f8ebb21d76245399f7f8b7639e2174e9135 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-17/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/liblog.so b/platforms/android-17/arch-arm/usr/lib/liblog.so index bb1ca8fcd82a8b510e8bca235093bd8bb0719638..8b2ef3245f479ae74f625cdba853eff5a901e1cd 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/liblog.so and b/platforms/android-17/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libm.a b/platforms/android-17/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libm.a and b/platforms/android-17/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libm.so b/platforms/android-17/arch-arm/usr/lib/libm.so index 3bef857f9720ac55ca6587463bf6d4a7fea432be..cdfe604c0d620f303c23246c0dcf09ea444be1de 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libm.so and b/platforms/android-17/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libstdc++.a b/platforms/android-17/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libstdc++.a and b/platforms/android-17/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libstdc++.so b/platforms/android-17/arch-arm/usr/lib/libstdc++.so index 4343570b19e5c510ea7557936c3fe5f80bb2d8f8..502e7d2a269919378f0676f42f22cb8642187157 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libstdc++.so and b/platforms/android-17/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-17/arch-arm/usr/lib/libz.a b/platforms/android-17/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-17/arch-arm/usr/lib/libz.a and b/platforms/android-17/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-17/arch-arm/usr/lib/libz.so b/platforms/android-17/arch-arm/usr/lib/libz.so index cbcc521f1e555f4fb56aeab5f6625b4a88a50293..db2c785458921a24111570e43f2d9a5f3cfe1d2b 100755 Binary files a/platforms/android-17/arch-arm/usr/lib/libz.so and b/platforms/android-17/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-17/arch-x86/usr/lib/crtbegin_dynamic.o index e93f91c9ee723e66e2cb5e66c571880413dd6722..a71a0481568b2c729a10d546c01385fc7d9eebe8 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-17/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-17/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-17/arch-x86/usr/lib/crtbegin_so.o index 516c719ae81e7aab26c6c06f2c6ed3774a438c8d..3385b6ec430a6a47ef6bcc48ee9b5da42c364649 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-17/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-17/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-17/arch-x86/usr/lib/crtbegin_static.o index d6ac091c1002dd9714774e7e698297d6e8e6bb49..3be453bf017af091fb8b2f1b8bde8d7fcb093399 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-17/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-17/arch-x86/usr/lib/libEGL.so b/platforms/android-17/arch-x86/usr/lib/libEGL.so index 15976da63c46fdb1bbb624f42360a843e7bb4b55..0d2c5a623665b6ba0ec4e00c52f40d6c4d900ef1 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libEGL.so and b/platforms/android-17/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-17/arch-x86/usr/lib/libGLESv1_CM.so index 19226bfd033584ba4cd919c635669e55b1097998..ca835073193af76dd15d661db0d90755d6a21c55 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-17/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libGLESv2.so b/platforms/android-17/arch-x86/usr/lib/libGLESv2.so index 85e85fd16533f3b68ae6bb3eb37454d71730e566..c266b71d00769e572307eb5c9ccb7fa32cc8f401 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-17/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-17/arch-x86/usr/lib/libOpenMAXAL.so index 217560fbbeff70677d8a12458c87d3f3a28865d7..32543731826df22687c0459226ce48cecdefd22e 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-17/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-17/arch-x86/usr/lib/libOpenSLES.so index 9a14ad3616d21ebcc566ad48742a45aef97f1508..42a3c22f1f716ffde109da2f071b67e5be900c00 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-17/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libandroid.so b/platforms/android-17/arch-x86/usr/lib/libandroid.so index a078b1bdb29ca20e9e7d40ae29f5545af747d36f..247e000ac755b55dd9d1d374775d55a18929fd51 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libandroid.so and b/platforms/android-17/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libc.a b/platforms/android-17/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libc.a and b/platforms/android-17/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libc.so b/platforms/android-17/arch-x86/usr/lib/libc.so index 35f1b16c3e257bd7e0c4b3f0d2a8be6750e1f68e..f7eb2b4f385a1a48bea1a31360d18e24a49acd30 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libc.so and b/platforms/android-17/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-17/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-17/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libdl.a b/platforms/android-17/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libdl.a and b/platforms/android-17/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libdl.so b/platforms/android-17/arch-x86/usr/lib/libdl.so index ab2ad627fa3a792eb8b9dc857a515d6e34235725..9965415cf4cdb02996a238b5b95983e4caac4669 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libdl.so and b/platforms/android-17/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-17/arch-x86/usr/lib/libjnigraphics.so index 74aa8f65032f8d9e5e46bfb2b44a5242a22e67e0..39549164a6c5c80ee159a38b70cef80c44ce926a 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-17/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/liblog.so b/platforms/android-17/arch-x86/usr/lib/liblog.so index 9ebb6745759ed641c9e951abd21f7b3dced7ca87..3b6411f0f361b5e09e3d49030ea3397729ecef7c 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/liblog.so and b/platforms/android-17/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libm.a b/platforms/android-17/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libm.a and b/platforms/android-17/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libm.so b/platforms/android-17/arch-x86/usr/lib/libm.so index 59a56b99e70fde57fb98c51019c9c0fb91d3362c..c73f1f4a3b368d2de8574c72223bea676ef7f7d3 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libm.so and b/platforms/android-17/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libstdc++.a b/platforms/android-17/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libstdc++.a and b/platforms/android-17/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libstdc++.so b/platforms/android-17/arch-x86/usr/lib/libstdc++.so index 2415839cf7a106c52e47c609c1b98da5f2ffbb4f..1f742dec7223ca796b7619d530223a25dafb0f56 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libstdc++.so and b/platforms/android-17/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-17/arch-x86/usr/lib/libz.a b/platforms/android-17/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-17/arch-x86/usr/lib/libz.a and b/platforms/android-17/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-17/arch-x86/usr/lib/libz.so b/platforms/android-17/arch-x86/usr/lib/libz.so index ce2b7151e296bb6261e6969fb999bf7127391197..afe6c742fb09ed59cb6261d1b7b54d42da177389 100755 Binary files a/platforms/android-17/arch-x86/usr/lib/libz.so and b/platforms/android-17/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-18/arch-arm/usr/lib/crtbegin_dynamic.o index aef0958a6db8b891a0b53e6b05de79a832d33d49..9f96800bf433b6230206e4dc94ad33628c82fe40 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-18/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o index 745e5688b6292f6a827d0659663d6f759bf78afb..22f6f24191c2bab90e8e3459acbbd159cd8690d4 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-18/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-18/arch-arm/usr/lib/crtbegin_static.o index 43f1c07d652fad8d797021efb2f71f4a72be7be7..d5dfd5476000fe78246e8c269eedf06d20fddfbf 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-18/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-18/arch-arm/usr/lib/libEGL.so b/platforms/android-18/arch-arm/usr/lib/libEGL.so index 03295cd56fd4716d441e8f19b849fcde96c1f75e..a794fe484ed34b575064301dcbb79a8f09d0374c 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libEGL.so and b/platforms/android-18/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-18/arch-arm/usr/lib/libGLESv1_CM.so index 70cd4910d34d45577a57ad30602e204abce3f14a..24b3d9979b3a8540999eb3dbccbf02cfc078534d 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-18/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libGLESv2.so b/platforms/android-18/arch-arm/usr/lib/libGLESv2.so index 5bb88f1d8138c3b1548df787ec232d9e948e1cc7..a237d66dd600bbef06d8803081b1c4ec05a06804 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-18/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libGLESv3.so b/platforms/android-18/arch-arm/usr/lib/libGLESv3.so index 5e2361662926d205d810bc479be6a25692cd909e..30c3f5ce3d07cdf3fc219d0dc772b2e8a68d6941 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-18/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-18/arch-arm/usr/lib/libOpenMAXAL.so index 8726023cf2a0da9700b038bfa34330dd4e5e0312..662e53274fdd750ba8d379f99c4aa373af734897 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-18/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-18/arch-arm/usr/lib/libOpenSLES.so index 802206a792ee5e1b33b62770d6b5484885743b41..f61ae45a393b5c9faced9aef4283c51a67a9c21d 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-18/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libandroid.so b/platforms/android-18/arch-arm/usr/lib/libandroid.so index 4d9c87e5d0bba1766ef815b3804531007257fea5..322aefa1360fea77887c70017cb6f2d0ff853137 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libandroid.so and b/platforms/android-18/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libc.a b/platforms/android-18/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libc.a and b/platforms/android-18/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libc.so b/platforms/android-18/arch-arm/usr/lib/libc.so index a00588c42ea969da8c4292aade22b7de255ff187..8d708ffdceb506849cd17ca87453031096950974 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libc.so and b/platforms/android-18/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-18/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-18/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libdl.a b/platforms/android-18/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libdl.a and b/platforms/android-18/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libdl.so b/platforms/android-18/arch-arm/usr/lib/libdl.so index c76b723daf3ac1c2002c10436847a09e8e828926..5f360e8cafca29541d8e9ab0a07ad17f7656686d 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libdl.so and b/platforms/android-18/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-18/arch-arm/usr/lib/libjnigraphics.so index e5fb1311a84703533f32ef8d9bb0b76293c40fd9..6b5511505fca959663cb47f244c54236da2d1cbd 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-18/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/liblog.so b/platforms/android-18/arch-arm/usr/lib/liblog.so index 3f70840a877512c39608dc3909847f2bc6cb6775..0224627128719628c9ed97774f87f0bef4e54dbd 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/liblog.so and b/platforms/android-18/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libm.a b/platforms/android-18/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libm.a and b/platforms/android-18/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libm.so b/platforms/android-18/arch-arm/usr/lib/libm.so index c666e76ff3db9124f0a20c99123c0f73fc68c97a..66d5de2e7ce13a892d522ba880b38870eea95421 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libm.so and b/platforms/android-18/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libstdc++.a b/platforms/android-18/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libstdc++.a and b/platforms/android-18/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libstdc++.so b/platforms/android-18/arch-arm/usr/lib/libstdc++.so index 97d494d956ae319174a1e22788b0743e5240afff..f60fc5d4fe7eab45b27be78974f442a524a0c3f6 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libstdc++.so and b/platforms/android-18/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-18/arch-arm/usr/lib/libz.a b/platforms/android-18/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-18/arch-arm/usr/lib/libz.a and b/platforms/android-18/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-18/arch-arm/usr/lib/libz.so b/platforms/android-18/arch-arm/usr/lib/libz.so index d2245d4fef974a8a6775aa7fd5e86b536cdde7d0..5ee884fb33eaa99a566945e7c8ffa23f54ccbaca 100755 Binary files a/platforms/android-18/arch-arm/usr/lib/libz.so and b/platforms/android-18/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-18/arch-x86/usr/lib/crtbegin_dynamic.o index 1ba2d7b638b9332a83c67ab0d05dc8ebadcca912..af05daf30b2dd6da9b071c327c773aced2ba39d3 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-18/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-18/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-18/arch-x86/usr/lib/crtbegin_so.o index 3ae9b724dd75b83e41ba305b04648c86ca1b8448..922ff13136d81f975b48d6681f30540cdd9bbd95 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-18/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-18/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-18/arch-x86/usr/lib/crtbegin_static.o index f14bb5aeee1bf2016d1485854c1b8d238ffe4e5d..e37beded2bb7652168e1f9a417c4dfaf2e3026d0 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-18/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-18/arch-x86/usr/lib/libEGL.so b/platforms/android-18/arch-x86/usr/lib/libEGL.so index a82a7f91e3a1b49e5f61254e6413e6994093dbef..77a5b434a876da4816ca82788b92105dd207722a 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libEGL.so and b/platforms/android-18/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-18/arch-x86/usr/lib/libGLESv1_CM.so index 2914912a3a43dfd3e6044527b0a75646623415f4..fa875ef2ea769b02abfb0dd1e4cd7fbdfe49c597 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-18/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libGLESv2.so b/platforms/android-18/arch-x86/usr/lib/libGLESv2.so index cb9db492939293bfd420ab3a0b024f51f79f9946..f8ee636f545a036c59e1fed0f727f3604b4a9766 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-18/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libGLESv3.so b/platforms/android-18/arch-x86/usr/lib/libGLESv3.so index d167dc75561550342ff00e089a2193ff12bc69ac..04a5a694ecd713cac3cacf4ece28f941eca9666e 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-18/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-18/arch-x86/usr/lib/libOpenMAXAL.so index 02a120577da9d7b3bfa65ffecbb2812571d96be1..3e39fea5bac6d55c82c6f6f010f042bc03f33dd3 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-18/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-18/arch-x86/usr/lib/libOpenSLES.so index f9d395d701bff9c461c507d1955e8637de237ea3..1aba83196d0cdffabdeb06ab64a19f4f1b0bd2d7 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-18/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libandroid.so b/platforms/android-18/arch-x86/usr/lib/libandroid.so index a3155fe1a142a128d4d7f3fa79eeae9309976765..e8296e58e9d2985c95bd19793f5551fe6d2d8117 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libandroid.so and b/platforms/android-18/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libc.a b/platforms/android-18/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libc.a and b/platforms/android-18/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libc.so b/platforms/android-18/arch-x86/usr/lib/libc.so index 04452c47ccd2fd4953b88174985334687e98e855..6daa4f76af42aefadbe1aba59047203c968d7f56 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libc.so and b/platforms/android-18/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-18/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-18/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libdl.a b/platforms/android-18/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libdl.a and b/platforms/android-18/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libdl.so b/platforms/android-18/arch-x86/usr/lib/libdl.so index 506fe3b73110bb1e3b7cedfad73aeaaf3998cc6a..48cd7f5dd89a5605f1ea5d6e6799c0ef7cddb28d 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libdl.so and b/platforms/android-18/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-18/arch-x86/usr/lib/libjnigraphics.so index 0509fe9f61ae132d07e6b431f057d826c0ac3a97..f980423e87cf196fd2f3922b7850f134ee73db18 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-18/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/liblog.so b/platforms/android-18/arch-x86/usr/lib/liblog.so index 892fda16a2fab04f92162d7baa754743095eec0b..17ba084bf71152a4e157005c470295fd41f9d07f 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/liblog.so and b/platforms/android-18/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libm.a b/platforms/android-18/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libm.a and b/platforms/android-18/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libm.so b/platforms/android-18/arch-x86/usr/lib/libm.so index a7c729c086d6bebdbc79ff69e0f2a66892692903..bd81d3e3662edefb1abd06fab6342760832f1a07 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libm.so and b/platforms/android-18/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libstdc++.a b/platforms/android-18/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libstdc++.a and b/platforms/android-18/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libstdc++.so b/platforms/android-18/arch-x86/usr/lib/libstdc++.so index cd85d0d7e2be04efd9c61ef2cad22ada7b8b8dae..c547b1421f72a95a0310812af3f45e9c14a7f9c8 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libstdc++.so and b/platforms/android-18/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-18/arch-x86/usr/lib/libz.a b/platforms/android-18/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-18/arch-x86/usr/lib/libz.a and b/platforms/android-18/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-18/arch-x86/usr/lib/libz.so b/platforms/android-18/arch-x86/usr/lib/libz.so index 39ef1ece59bc108a0c25a25e1a7650a7a74d1757..56471cad7117a536e8a075c477e3b537e114a0b0 100755 Binary files a/platforms/android-18/arch-x86/usr/lib/libz.so and b/platforms/android-18/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-19/arch-arm/usr/lib/crtbegin_dynamic.o index fee25997669624b25d98cbe7cec3e9be089e7a2e..db88c5681eaa5952adde412293fb63d17c56f1d7 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-19/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-19/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-19/arch-arm/usr/lib/crtbegin_so.o index 9ef0388feb85a1dccf4c19be4a555f59d914ee4f..2dc6063632f69c261fc8af4b42a5af11483eec72 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-19/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-19/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-19/arch-arm/usr/lib/crtbegin_static.o index a592b1349a84d773a8c0c29e464a97670830d6f2..fab1d97e0b3b326a5b04b3a47096a62ec7efb6b4 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-19/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-19/arch-arm/usr/lib/libEGL.so b/platforms/android-19/arch-arm/usr/lib/libEGL.so index bdf43876e9b58a5dd2320ea271c46e3204ce3514..da19c5262f216f3f4bb4aede6a4a6773e094aca5 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libEGL.so and b/platforms/android-19/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-19/arch-arm/usr/lib/libGLESv1_CM.so index 29a28621735d9f83a441ee93247acf5447c3ff19..b5ec0d8ca1dcf1bf4d61b63b93088323c8ba62f4 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-19/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libGLESv2.so b/platforms/android-19/arch-arm/usr/lib/libGLESv2.so index ba467ffb50ed96df1569ef008889293054df03ae..5c4f0578436ce702e03dcde8b6b93851ceb5d310 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-19/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libGLESv3.so b/platforms/android-19/arch-arm/usr/lib/libGLESv3.so index 3518e0bf5836690f49fe34bb56f3bf547d47d537..11b9640e2da13ae28dd7f8d92a6af462aae93ef1 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-19/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-19/arch-arm/usr/lib/libOpenMAXAL.so index b0a50e7fbf01e6966311c15d30396841b81b090d..b3bf20048dc49a4920d36b5e462f116d4b827a13 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-19/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-19/arch-arm/usr/lib/libOpenSLES.so index c28b710fc504da26d063b54fd83893f02861a7b7..f46df7809ef523e70b9fa5d7243a648862c87229 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-19/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libandroid.so b/platforms/android-19/arch-arm/usr/lib/libandroid.so index 527e7045853c2c4bb459c00d06c4d459e3a97967..94885dc6bd993f67f5bacd745995d2127ae4039e 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libandroid.so and b/platforms/android-19/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libc.a b/platforms/android-19/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libc.a and b/platforms/android-19/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libc.so b/platforms/android-19/arch-arm/usr/lib/libc.so index d081d35e52a79d3702121763be854c902382c679..645767a00e519b194f274667d3442e33b075b11d 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libc.so and b/platforms/android-19/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-19/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-19/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libdl.a b/platforms/android-19/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libdl.a and b/platforms/android-19/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libdl.so b/platforms/android-19/arch-arm/usr/lib/libdl.so index 12824e958b6d6f73f54d81780a05370f350cfacc..3be7614059a4e573f545d4dbc36d5f25bd5b633f 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libdl.so and b/platforms/android-19/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-19/arch-arm/usr/lib/libjnigraphics.so index 74c7197a25dcf3d96d4fd75b2ef2a52283c7d10c..73e46f0007e2e23ac3368e38be2c38ea9e3c50ae 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-19/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/liblog.so b/platforms/android-19/arch-arm/usr/lib/liblog.so index 0d3bd46dbfc09088d13459de92233aa57dc04bb6..c8712593528f6b0ab8510901c3b957d62aa168b5 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/liblog.so and b/platforms/android-19/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libm.a b/platforms/android-19/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libm.a and b/platforms/android-19/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libm.so b/platforms/android-19/arch-arm/usr/lib/libm.so index 7d550ee4ab85c24c70f31c9736f3a8316d01e562..3bedb8f4cd5f00762b682b1795a871f6afcaaae0 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libm.so and b/platforms/android-19/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libstdc++.a b/platforms/android-19/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libstdc++.a and b/platforms/android-19/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libstdc++.so b/platforms/android-19/arch-arm/usr/lib/libstdc++.so index b1a0cfd4d2b87cbaa8e7a5d82aaed1bafb6d0933..33146c3c675a005b9d34e17220c54850315a1be8 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libstdc++.so and b/platforms/android-19/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-19/arch-arm/usr/lib/libz.a b/platforms/android-19/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-19/arch-arm/usr/lib/libz.a and b/platforms/android-19/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-19/arch-arm/usr/lib/libz.so b/platforms/android-19/arch-arm/usr/lib/libz.so index 996439e0de8a030d6689b1b907099660db399a23..bb7a9364128a4835b91cf37eedad801315def3b4 100755 Binary files a/platforms/android-19/arch-arm/usr/lib/libz.so and b/platforms/android-19/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-19/arch-x86/usr/lib/crtbegin_dynamic.o index 1a9a3bd10ffc327ae4e4d1522ba9aa05733d4e03..6d61e5ccb3a4fe4d5ea83868c4983e61a84c6ba2 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-19/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-19/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-19/arch-x86/usr/lib/crtbegin_so.o index 1b08009e60d2d4e264fc97d86f5b2957c7616ff2..2f31092b0dfc75d7cb5b1e9319a6b2b9c50783e4 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-19/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-19/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-19/arch-x86/usr/lib/crtbegin_static.o index 20e19b2fb1870280f67b7f97535182d95973335c..001577d4d751344155e6cfdf48dce12f2775b1fe 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-19/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-19/arch-x86/usr/lib/libEGL.so b/platforms/android-19/arch-x86/usr/lib/libEGL.so index 3c32c229336250db1d1fcce43ffd9ce19a7997ec..1791e7706f2b64f6e751700a33843ccf5fe5d658 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libEGL.so and b/platforms/android-19/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-19/arch-x86/usr/lib/libGLESv1_CM.so index 66f5f2854af6a6d7ab0e6cb912ae675b0e6bca6c..095a0918880f8fe8e7db6c4acf3e1e2d96ddd4a6 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-19/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libGLESv2.so b/platforms/android-19/arch-x86/usr/lib/libGLESv2.so index d07c2179b24f4653104b5185d8ba27e6a6ac353d..e843fc950d131be83b03a4e6dac18631aea10d1b 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-19/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libGLESv3.so b/platforms/android-19/arch-x86/usr/lib/libGLESv3.so index 813cbc934a18693f6b4c6e3145008fa06bfcf36d..64b69a63d58777fc69e8f47b60a667716f2d0a52 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-19/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-19/arch-x86/usr/lib/libOpenMAXAL.so index fc965e176b39a610687e623977b053202223e01d..c2cbf5a9106421db3fb4165b9a99b68b1c393ce9 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-19/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-19/arch-x86/usr/lib/libOpenSLES.so index 23ee357650429130ff8f9350354695b7ba9ecaee..e1968e7ef59021b2e0d6fd3b99817d601ce67cc4 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-19/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libandroid.so b/platforms/android-19/arch-x86/usr/lib/libandroid.so index fc28e5b944c21b45f215ed217ab11cc7ddc1e5a1..1cf08ab6719e57039ab4cd5b380d8ed7a46602ff 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libandroid.so and b/platforms/android-19/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libc.a b/platforms/android-19/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libc.a and b/platforms/android-19/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libc.so b/platforms/android-19/arch-x86/usr/lib/libc.so index c9879433f997b293e5c31d9c9718c67900efc724..955618ecd267627c5f46f3d207bde0073380223c 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libc.so and b/platforms/android-19/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-19/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-19/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libdl.a b/platforms/android-19/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libdl.a and b/platforms/android-19/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libdl.so b/platforms/android-19/arch-x86/usr/lib/libdl.so index 929515fd62f8e97c87684860dde07581f40d2793..5ccafd092eef04a27096c96ee7ea3a00ddac9c50 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libdl.so and b/platforms/android-19/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-19/arch-x86/usr/lib/libjnigraphics.so index 99fa0e1ca39c0bb0b3c5e63203444494d3d12390..556f6726e6c5484c07bee8cef3d2b0143fe9ab9f 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-19/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/liblog.so b/platforms/android-19/arch-x86/usr/lib/liblog.so index a9ed10c04604eed2521fd997f5f0eb3c35057a81..e0d891587831d1f272bb12fab5ee94da0a3ab5c2 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/liblog.so and b/platforms/android-19/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libm.a b/platforms/android-19/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libm.a and b/platforms/android-19/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libm.so b/platforms/android-19/arch-x86/usr/lib/libm.so index 145f8be983b462020ba120c190935394ff5b8c3a..3c4ba2153e272df7fa9f34d92e38c79f45e45da1 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libm.so and b/platforms/android-19/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libstdc++.a b/platforms/android-19/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libstdc++.a and b/platforms/android-19/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libstdc++.so b/platforms/android-19/arch-x86/usr/lib/libstdc++.so index 82704d68d015a532e46b1da9af563415635ebab5..8a930536eb87405f4419a1ad18c07ec7e00bc3b7 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libstdc++.so and b/platforms/android-19/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-19/arch-x86/usr/lib/libz.a b/platforms/android-19/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-19/arch-x86/usr/lib/libz.a and b/platforms/android-19/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-19/arch-x86/usr/lib/libz.so b/platforms/android-19/arch-x86/usr/lib/libz.so index d1044a6955f240f72c90110a0855dd8faa109cff..2b68d5ced41f28a33d90d25ceb838298ba4ba38c 100755 Binary files a/platforms/android-19/arch-x86/usr/lib/libz.so and b/platforms/android-19/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-21/arch-arm/usr/lib/crtbegin_dynamic.o index 4925121ceaa6d939f44a76616ca8c9cd076a41e5..4194e276d48eb1ccfe7b3848cfde8fb169f2ee2f 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-21/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o index 9e0339882261f840d72d5f52fc92806016aa5632..62a43dbfa140ea6ec4103fe38e9b24571c3b7d0f 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-21/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-21/arch-arm/usr/lib/crtbegin_static.o index b4dc934917f113c14ec65a6944087c7da84e6b1d..61ba8f77f9e75b14f9b98203e54eab3098114e45 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-21/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-21/arch-arm/usr/lib/libEGL.so b/platforms/android-21/arch-arm/usr/lib/libEGL.so index 462ee84fdfbc6772bc5d06a8b47b841e4ef3c77e..03994a49215a1b3eae9ba4e49b0edcd996de9da9 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libEGL.so and b/platforms/android-21/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-21/arch-arm/usr/lib/libGLESv1_CM.so index 5d235bf155023ef04e6d0e92063040db0af67eb0..88c0b16dd56e786b3681ba0e279219f112e4f819 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-21/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libGLESv2.so b/platforms/android-21/arch-arm/usr/lib/libGLESv2.so index 12e7047407ccae1915fe46f1768681a007c6097d..ac86de0f2992a3122d23520becd53a56f9d42150 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-21/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libGLESv3.so b/platforms/android-21/arch-arm/usr/lib/libGLESv3.so index 2007391f152ef9749349dc9b1620626275c84323..60867e787040d1867f7cde083f3eca278428b87a 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-21/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-21/arch-arm/usr/lib/libOpenMAXAL.so index 68de6422cd674a73d3d5c6ce4d4b37472d86d723..59e998465cad80128d2dc20bcc8e8159c869b9ba 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-21/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-21/arch-arm/usr/lib/libOpenSLES.so index 7aa69634fbc8c35e0ba0f2f4ce583b9e36c4fc0f..bf7068028be7ffd6390d04e299f565b2a0fc4838 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-21/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libandroid.so b/platforms/android-21/arch-arm/usr/lib/libandroid.so index bab310c3495655248556d6210f46cc58afaaeda1..c5ee0d3419f560619e3a48854329e6f0b154f652 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libandroid.so and b/platforms/android-21/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libc.a b/platforms/android-21/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libc.a and b/platforms/android-21/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libc.so b/platforms/android-21/arch-arm/usr/lib/libc.so index dca0fcd44224b6237c15255967bc4b51b3ab9d5c..06439bc56005ebf372506fa23ac1ce4220122e99 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libc.so and b/platforms/android-21/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-21/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-21/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libdl.a b/platforms/android-21/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libdl.a and b/platforms/android-21/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libdl.so b/platforms/android-21/arch-arm/usr/lib/libdl.so index c68d52ee91a07f457bf9f63c690154274e3e2d56..96743b4c35a57f72f10c7d096cd4be72b8c1ddf6 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libdl.so and b/platforms/android-21/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-21/arch-arm/usr/lib/libjnigraphics.so index 5e2ef66bf525f2a263685820e6080b3a45dc6bcd..932351ea59ce4ff2e7719b73d53d9e73a44a3346 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-21/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/liblog.so b/platforms/android-21/arch-arm/usr/lib/liblog.so index ebe38c110c50cf9700d5a243039734c8416ba26a..23f69106602064599aebb279f4a2ba603720227f 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/liblog.so and b/platforms/android-21/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libm.a b/platforms/android-21/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libm.a and b/platforms/android-21/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libm.so b/platforms/android-21/arch-arm/usr/lib/libm.so index 91e83c9877ea21aa4a2bfbeea0d1427e478d7e19..f8164c82cbfcbc409640ccc7321c5b57366b4fa5 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libm.so and b/platforms/android-21/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libmediandk.so b/platforms/android-21/arch-arm/usr/lib/libmediandk.so index 734125868d2d6adbf7754eb60aacb6c12cb02829..b26a21998edcf3fa37614d1d07068a06e0062d35 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libmediandk.so and b/platforms/android-21/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libstdc++.a b/platforms/android-21/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libstdc++.a and b/platforms/android-21/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libstdc++.so b/platforms/android-21/arch-arm/usr/lib/libstdc++.so index cf24f9d34f1c0aa60376b0dff53c72b20171df94..f57025b346606e0f359f39561b1549ed9f593d98 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libstdc++.so and b/platforms/android-21/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-21/arch-arm/usr/lib/libz.a b/platforms/android-21/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-21/arch-arm/usr/lib/libz.a and b/platforms/android-21/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-21/arch-arm/usr/lib/libz.so b/platforms/android-21/arch-arm/usr/lib/libz.so index dd780a7209dc058646899d95cfb53b9c1af9ed77..8ab2c3001863170a647bfa1ece53bbfe5e737fe7 100755 Binary files a/platforms/android-21/arch-arm/usr/lib/libz.so and b/platforms/android-21/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-21/arch-arm64/usr/lib/crtbegin_dynamic.o index 7c69038bc966d97f9f6d7d45ddc3e8b642d0b97f..bb956f510dc8a35120cd0c6889e56972b9c77101 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-21/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-21/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-21/arch-arm64/usr/lib/crtbegin_so.o index 1a4c14e4328beb3d36ed6e55a7e5094431b1da58..30223384d291c3d2dae33456b0eb1f3c1d03a53c 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-21/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-21/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-21/arch-arm64/usr/lib/crtbegin_static.o index 470db5ad4dbe8bd00a21f217a0d302c365613f02..031c0f713a5fb6964dc9c5a78a8b6ab65c8888a8 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-21/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-21/arch-arm64/usr/lib/crtend_android.o b/platforms/android-21/arch-arm64/usr/lib/crtend_android.o index 6e298e849d753b331e028836239ac9c9d49e7a82..183a381e1fdc26fe31bd5e9460ef7c5ed2a2977a 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-21/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libEGL.so b/platforms/android-21/arch-arm64/usr/lib/libEGL.so index d2a181740244470db1acbbd4267332a5632ba47f..b40bdbe1d5ae5ab83b866f2aab8e0e5e4a78a34d 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libEGL.so and b/platforms/android-21/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-21/arch-arm64/usr/lib/libGLESv1_CM.so index 6bb42f0f3b6e0add93d74d1e51b5f6c2f3aa9c1d..580aab80cde27518e298228ab926ad8a35d51abb 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-21/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-21/arch-arm64/usr/lib/libGLESv2.so index 4e002f31d556625a316e9611628be7f606058cfa..930823f1439dac68d971a65e6f77141d8a720bbc 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-21/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-21/arch-arm64/usr/lib/libGLESv3.so index 9cfb350cae5e2c0042147863498dc84d47458eeb..1eafffa62f0f8537df37b24032fba4ad46317f6a 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-21/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-21/arch-arm64/usr/lib/libOpenMAXAL.so index 37362beadd599f282cc23ccaaff3957252d914ee..4c87bea4e22187f3a5a031d20aebb1b3389616d9 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-21/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-21/arch-arm64/usr/lib/libOpenSLES.so index 5b2c63beb780461e1714c08452c45ef9a9bc08c6..103c409e0e573a27644e763fd579c0cbd96818ae 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-21/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libandroid.so b/platforms/android-21/arch-arm64/usr/lib/libandroid.so index 38046b1e72c437712b91733282aee1f827054700..e4ce9a30c0bb686cbe4c695b9c749123ab9ca2e7 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libandroid.so and b/platforms/android-21/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libc.a b/platforms/android-21/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libc.a and b/platforms/android-21/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libc.so b/platforms/android-21/arch-arm64/usr/lib/libc.so index f30dacfc72e926c2161dd3c59e131a2b832e85db..989beb76a1268df9d988104a0dd57be5c565fc84 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libc.so and b/platforms/android-21/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-21/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-21/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libdl.a b/platforms/android-21/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libdl.a and b/platforms/android-21/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libdl.so b/platforms/android-21/arch-arm64/usr/lib/libdl.so index dea901da73faa46e8502497603d7933164f6bda1..4adc545b8f69bd68095bdd1deb4c981f8e8d4d4e 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libdl.so and b/platforms/android-21/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-21/arch-arm64/usr/lib/libjnigraphics.so index 58a9e132dd1849acf18d42968ad715cbc2b4a368..de5e00c9dec4d875bdd518e2a3dd6cc3b2c7d18f 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-21/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/liblog.so b/platforms/android-21/arch-arm64/usr/lib/liblog.so index 35c5867838a0b4107b1187ef668641586fbbac29..b05b524fdd928a9b706ebbfee920c4019bed34b1 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/liblog.so and b/platforms/android-21/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libm.a b/platforms/android-21/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libm.a and b/platforms/android-21/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libm.so b/platforms/android-21/arch-arm64/usr/lib/libm.so index 3286a5807f19fc966787f7c2684453028a275e49..c42ba3b34d0862fb305167c6bf5ba5b9c1d6e168 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libm.so and b/platforms/android-21/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libmediandk.so b/platforms/android-21/arch-arm64/usr/lib/libmediandk.so index 0be10a3bef5bae06c37e2686158b892a44bcf7b1..95cbc36ca08a3c3fa041338680a7373e027fac90 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-21/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libstdc++.a b/platforms/android-21/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-21/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libstdc++.so b/platforms/android-21/arch-arm64/usr/lib/libstdc++.so index 33f239351512d13f02c6bc0a60eeefa3dd087761..0ea331151f61df53697a4664a4a5d61730ef14f9 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-21/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libz.a b/platforms/android-21/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-21/arch-arm64/usr/lib/libz.a and b/platforms/android-21/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-21/arch-arm64/usr/lib/libz.so b/platforms/android-21/arch-arm64/usr/lib/libz.so index 2262e16d7fdb4f5b11aa80f2a5d71fb5822080e6..388b589a56a68bbc14e34b8dac006d6e9defc206 100755 Binary files a/platforms/android-21/arch-arm64/usr/lib/libz.so and b/platforms/android-21/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-21/arch-x86/usr/lib/crtbegin_dynamic.o index ba49989d6d4e87615d695dccf7ead26a691e7348..74261deef2d152ef63168db1380732a6299bdbec 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-21/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-21/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-21/arch-x86/usr/lib/crtbegin_so.o index d776af0e3df06a795a3e9e17f48152309d56f83e..eebfa2d87f8eb95bdb2ad10f1d1b7c3d6fe4f7ee 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-21/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-21/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-21/arch-x86/usr/lib/crtbegin_static.o index cc0af2b9fdcd35710f734d1b60721cd114bcbdea..726ecaa02c2b3bef2584fadb2d3eff4402d0de59 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-21/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-21/arch-x86/usr/lib/libEGL.so b/platforms/android-21/arch-x86/usr/lib/libEGL.so index 2a4820c0f5dc504513901cce07b0ca485c96cacb..a202835dac53d5185d39fbec95197c60566cff5f 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libEGL.so and b/platforms/android-21/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-21/arch-x86/usr/lib/libGLESv1_CM.so index 62f290e7ee8275adcbdbd06f43363e3483124513..58c774aa001685a89d45858e69bb461e9a556be6 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-21/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libGLESv2.so b/platforms/android-21/arch-x86/usr/lib/libGLESv2.so index c7b90b76f24133f7756bef895b6e351aa428b0ca..89b3504e030a26a1ef62420abe35979a12158f88 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-21/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libGLESv3.so b/platforms/android-21/arch-x86/usr/lib/libGLESv3.so index 48a5d625297da592744197eb13369cf13ef4b3e7..305c62ff1ce8f46cbbc6b52788517ab5f9433eac 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-21/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-21/arch-x86/usr/lib/libOpenMAXAL.so index 0dc537d6aabc17331675ba9ad75047b6fffb417c..ed689e75e1995bbf328301298d2e4f7a2f307125 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-21/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-21/arch-x86/usr/lib/libOpenSLES.so index f8498e8fda2359cfbaede9dda2c5e52196d40953..886a8b5fa5d84327f6e5eb4408bce085565577b0 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-21/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libandroid.so b/platforms/android-21/arch-x86/usr/lib/libandroid.so index ba7362882ad935359f74bdbb8ba0e0c5c3f1c207..f38826af7f06a4174e5687a831efbf48645d81cf 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libandroid.so and b/platforms/android-21/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libc.a b/platforms/android-21/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libc.a and b/platforms/android-21/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libc.so b/platforms/android-21/arch-x86/usr/lib/libc.so index c87d46bf3d36b0384cb4d9336515b7002fdbc00b..e9eeb233eec701404502e6eab822889e8bbded4d 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libc.so and b/platforms/android-21/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-21/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-21/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libdl.a b/platforms/android-21/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libdl.a and b/platforms/android-21/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libdl.so b/platforms/android-21/arch-x86/usr/lib/libdl.so index 3d6c4f8369988f1400f2d0b9a318d6a35e80188a..00f598412338caa298db5f59e894d569d43328f8 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libdl.so and b/platforms/android-21/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-21/arch-x86/usr/lib/libjnigraphics.so index 79c60223ac235d524ba5892ad0d1acdf18919502..5df01702a9539e872c0d56a770eda0f843c3dc3a 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-21/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/liblog.so b/platforms/android-21/arch-x86/usr/lib/liblog.so index 4853cfef6f6dcb639d7dfed50fc30a3b909447ad..c856a8e72f4ab31d80fd583f145a2d78128a5625 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/liblog.so and b/platforms/android-21/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libm.a b/platforms/android-21/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libm.a and b/platforms/android-21/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libm.so b/platforms/android-21/arch-x86/usr/lib/libm.so index 32e7e9fa3cab04cec6750b23dc89b7146353dead..75f09ab5ae659e1a6c94e64eb00b952879f0f1b2 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libm.so and b/platforms/android-21/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libmediandk.so b/platforms/android-21/arch-x86/usr/lib/libmediandk.so index 0e9ac50db8c42d9bba94b972cb8eb58ebab0a537..4700bf39bdda83ca9c77e034df92c3c19392759e 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libmediandk.so and b/platforms/android-21/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libstdc++.a b/platforms/android-21/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libstdc++.a and b/platforms/android-21/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libstdc++.so b/platforms/android-21/arch-x86/usr/lib/libstdc++.so index bed06609b4a21fcddc12534a5a8a0a734cce85e8..7787dad1fd3be005d39403eab0b8631742f870d5 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libstdc++.so and b/platforms/android-21/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-21/arch-x86/usr/lib/libz.a b/platforms/android-21/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-21/arch-x86/usr/lib/libz.a and b/platforms/android-21/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-21/arch-x86/usr/lib/libz.so b/platforms/android-21/arch-x86/usr/lib/libz.so index adcd7973d351be1a3fab6e439942b1c0f4f40070..232112d269469ce38f3eaa7f020f5623ab62a82b 100755 Binary files a/platforms/android-21/arch-x86/usr/lib/libz.so and b/platforms/android-21/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_dynamic.o index 1fa40c392d42c9525c114966134c0921910a5e41..32429f4681674dd9f5a88e04e4076a075d7691d3 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_so.o index aa698178120837d4da99279f88e890192a34a095..ffc29a7675e1c5ded117bd5f4d184383dbb5ea55 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_static.o index dcb05292649bb7dd0b703d45ee289084e5471243..f9ca483fc453bcea07515c5ab7051760ef9ca599 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-21/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-21/arch-x86_64/usr/lib64/libEGL.so index e923233f729f27a82f0f3bb5d7bd1d3a3925203e..976fa001c14271a1a1e9446c9e479a090f427c6d 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-21/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv1_CM.so index 64c090c45fb6d4728059f1b689ac0695fe33f057..c9d51067c0b5fc18472381c1a9649b6f040d70ba 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv2.so index 8ac18f3084a6e0360a8a4e984f5f7e66a13702a2..0befca99b5108de93568464b919fe59024bf087b 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv3.so index e15cd5e295c5c2551a36e895c4cfbf9dfabf517e..d35d97eb8b416eb918f2397d32cc00b765dbf435 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-21/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-21/arch-x86_64/usr/lib64/libOpenMAXAL.so index 137412225c09c222748ed87e6298fb041caccee5..9cd684ab9b8110f4767bc3ab5cd9f621faa4de40 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-21/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-21/arch-x86_64/usr/lib64/libOpenSLES.so index 01b879c552e96b1e2cc9aea4f999238d08a68575..284b645e14a71b0a20f990a9e3aff8c7e281811c 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-21/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-21/arch-x86_64/usr/lib64/libandroid.so index 7b958b8cca992de775c01b9e9dc8f2e2c4e1e5f4..887dbd592b496dd0c09fa3536e61c182979f02c6 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-21/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libc.a b/platforms/android-21/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libc.a and b/platforms/android-21/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libc.so b/platforms/android-21/arch-x86_64/usr/lib64/libc.so index c46f84605d9696364c28964c59da2062f86c9c33..650f51feb829e00917327d484164cd0f5700c527 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libc.so and b/platforms/android-21/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-21/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-21/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libdl.a b/platforms/android-21/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-21/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libdl.so b/platforms/android-21/arch-x86_64/usr/lib64/libdl.so index 62a7ec700d19f01e7e5b77c41f7eec14b989f558..df8ae3c4b8dec88bcf1240eb2839d7c98e0902d4 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-21/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-21/arch-x86_64/usr/lib64/libjnigraphics.so index b9a0d04f151001e8261d6ae172b0f1a9bca01923..822840e4ee29d9078ae711517796c7d2686ad591 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-21/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/liblog.so b/platforms/android-21/arch-x86_64/usr/lib64/liblog.so index e98f582d3e41153aaf3e937c3e8b251ffb19cfb7..8a70d51e6fb4c090b1629056a7675c5c3b82203c 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-21/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libm.a b/platforms/android-21/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libm.a and b/platforms/android-21/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libm.so b/platforms/android-21/arch-x86_64/usr/lib64/libm.so index 0097ed6d8ded4ef2636d8ee257e7baf7fa10b07b..e125aad6d9927d7d3718b90f352b0b7eb0404623 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libm.so and b/platforms/android-21/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-21/arch-x86_64/usr/lib64/libmediandk.so index 1987d435e936991ec848beb12a19f0b85a73eea3..dd6ce81a196eeea8cb58d28749c6a8e63b7bd312 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-21/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.so index 784e1e7fddcbfb758da61982321febd85f37a40c..fa7fed7b7405d70ecf2b3285f11716ca4f39d985 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-21/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libz.a b/platforms/android-21/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libz.a and b/platforms/android-21/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-21/arch-x86_64/usr/lib64/libz.so b/platforms/android-21/arch-x86_64/usr/lib64/libz.so index cfc9372f07db1811c7cb4959196da38889324662..f31384ae5221292679adc9a46739146252fea0fb 100755 Binary files a/platforms/android-21/arch-x86_64/usr/lib64/libz.so and b/platforms/android-21/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-22/arch-arm/usr/lib/crtbegin_dynamic.o index 873797a06eb328ac00d32a4a07696712dce26320..97e6986fda03d3370d26047a5a9fbaef29feca1f 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-22/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-22/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-22/arch-arm/usr/lib/crtbegin_so.o index 7e55950b0796bcfa8db48d61b15ac3858e5e79f0..751fd928671c1b19914881c536132d26837c831c 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-22/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-22/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-22/arch-arm/usr/lib/crtbegin_static.o index 15e841d618a3a97649728c735081282b08f1d012..812e0d6f524d4619c075071e7c960b696768a4e6 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-22/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-22/arch-arm/usr/lib/libEGL.so b/platforms/android-22/arch-arm/usr/lib/libEGL.so index 7d200ffe4608aba7f5aae2b9783b0aceb45eba32..7b81e4d13f7cbacbb25258f6de27f8410f3bd693 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libEGL.so and b/platforms/android-22/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-22/arch-arm/usr/lib/libGLESv1_CM.so index 76b992e5c9a05457d2317c67d307484d142ac97e..2253ee868e2ec87269bc44e5f11a1cc953ba6ba6 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-22/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libGLESv2.so b/platforms/android-22/arch-arm/usr/lib/libGLESv2.so index 95778977f41021dca30cb8bb1cf4a0035d01354a..d61aa0c750ad8cce1a61b3d04461dce60418bb37 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-22/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libGLESv3.so b/platforms/android-22/arch-arm/usr/lib/libGLESv3.so index 0ab886801006ee9af093e63ed59b046f8524e3b9..24ce0931a3613a65e84a9045f3d5f819a4a438dc 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-22/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-22/arch-arm/usr/lib/libOpenMAXAL.so index 13d060a70804f63ffdfda329f250a14e41cbcad1..ec0e68965986c99c1b54bcb6bf08f778159546b0 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-22/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-22/arch-arm/usr/lib/libOpenSLES.so index 5f19a61088c5e7cc2db8906d299aafec61ea8582..85ab234e5e57f80cb4e4880ba7ba97a5f2ee17be 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-22/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libandroid.so b/platforms/android-22/arch-arm/usr/lib/libandroid.so index 3f1bf70ff918e232ea5f50f9beae7bd583ddd4ca..cb288f2817406d29e605ddafe5162b510f178eeb 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libandroid.so and b/platforms/android-22/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libc.a b/platforms/android-22/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libc.a and b/platforms/android-22/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libc.so b/platforms/android-22/arch-arm/usr/lib/libc.so index 95aa835a0c45d3f711aaf81f0f2fed837f61cd23..a1c1b63c96a11254eb9878c43eea99586889650c 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libc.so and b/platforms/android-22/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-22/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-22/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libdl.a b/platforms/android-22/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libdl.a and b/platforms/android-22/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libdl.so b/platforms/android-22/arch-arm/usr/lib/libdl.so index 5037333871e097e0deb933ddd002b5ceeb2a1058..53db87cc21a450d7b5b96366c2c340ab8954eab8 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libdl.so and b/platforms/android-22/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-22/arch-arm/usr/lib/libjnigraphics.so index ca04a063f6a168ce26640bf7a3522138ffe34912..d9113dbf5b5fc399c37d6cf81780a9dd8ff8bb15 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-22/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/liblog.so b/platforms/android-22/arch-arm/usr/lib/liblog.so index 19ad19b401b828c8d2c27c6bd88af81e9ce113ee..34334b075f7a9c9b9693168c05934265d43c321b 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/liblog.so and b/platforms/android-22/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libm.a b/platforms/android-22/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libm.a and b/platforms/android-22/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libm.so b/platforms/android-22/arch-arm/usr/lib/libm.so index cbeb2e4afac53a257e12a4ea1ee8ff0f25a98d98..0693abe8b97a0fb543bcac0822249ce8e69fa3a4 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libm.so and b/platforms/android-22/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libmediandk.so b/platforms/android-22/arch-arm/usr/lib/libmediandk.so index 875a07161f7f6b253f7cb547c35ba309449ccc7f..6adf98c48c6fbaba068103e4534b0f69b81a04d5 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libmediandk.so and b/platforms/android-22/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libstdc++.a b/platforms/android-22/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libstdc++.a and b/platforms/android-22/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libstdc++.so b/platforms/android-22/arch-arm/usr/lib/libstdc++.so index 649f04ce75b2f8eb25c85cc4a250aba5961545e5..3c8ea56e55961cd2da06e6cf83a9087da12b01d2 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libstdc++.so and b/platforms/android-22/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-22/arch-arm/usr/lib/libz.a b/platforms/android-22/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-22/arch-arm/usr/lib/libz.a and b/platforms/android-22/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-22/arch-arm/usr/lib/libz.so b/platforms/android-22/arch-arm/usr/lib/libz.so index 8486eb81644a87ae5b8655631fe053667503fc4b..b4d37da93bbefd2e590eb792af4f1d90b0f6c223 100755 Binary files a/platforms/android-22/arch-arm/usr/lib/libz.so and b/platforms/android-22/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-22/arch-arm64/usr/lib/crtbegin_dynamic.o index ddf5aa896629de5879ba158a65a206369068b630..10aef78212568490e3666231b9d6e4cac5a20e88 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-22/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-22/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-22/arch-arm64/usr/lib/crtbegin_so.o index 2133508f3543685dde751bd504f820979b2c3dff..7401ab7c9988dca3cca542d0d7b5821ef035d152 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-22/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-22/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-22/arch-arm64/usr/lib/crtbegin_static.o index 600c0c8a63ff4a0b3003022f58287655964bcf66..2a09133639db062e543d55923356dbdf4b1b64aa 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-22/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-22/arch-arm64/usr/lib/crtend_android.o b/platforms/android-22/arch-arm64/usr/lib/crtend_android.o index 4ad444e21e8f99199dc25809e927f164ae07f211..6ba74ea6700e6057f7e11cad9da7f4e250a0026f 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-22/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libEGL.so b/platforms/android-22/arch-arm64/usr/lib/libEGL.so index d78c715629dd91e705c6258e4785372484abcb6f..11d3aab07f00717622fdad8bcbd911ce673a594b 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libEGL.so and b/platforms/android-22/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-22/arch-arm64/usr/lib/libGLESv1_CM.so index ff22dee1f17e449ff59c5c5a2250cc9d8c20627d..afd1a3e578c8be9d25afe928af75df6670027a77 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-22/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-22/arch-arm64/usr/lib/libGLESv2.so index c796550b6f4c65b72374223393dae518063eeebd..8f86a9e19a1dc3387e7f78b525a69dd1149a2643 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-22/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-22/arch-arm64/usr/lib/libGLESv3.so index 3b10915d44a6657eed0be531d9b82bbcc5888743..c22de9e34f6cbc7e6057f12911634ad30b690b74 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-22/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-22/arch-arm64/usr/lib/libOpenMAXAL.so index ae53556e4abbeddddd9b4f5d87c0623ab4dc85fa..b6cf37856a1d014984a062d8da23c5032cd5b51f 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-22/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-22/arch-arm64/usr/lib/libOpenSLES.so index 2020b59688d9505f48d585f2ebff977f8ca1d81a..45b889167840845286c814af215e84d642e92443 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-22/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libandroid.so b/platforms/android-22/arch-arm64/usr/lib/libandroid.so index 2c14d6b8892b91249d169b248c4c8426788538ad..54e0fec62def608be2e50d89b776e910f49b2840 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libandroid.so and b/platforms/android-22/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libc.a b/platforms/android-22/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libc.a and b/platforms/android-22/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libc.so b/platforms/android-22/arch-arm64/usr/lib/libc.so index f05b998e98a1c4ad6e084796026d4c3a4cb9acbb..d4b7805a5959a34e5d87b69110046d80f87d5b4b 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libc.so and b/platforms/android-22/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-22/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-22/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libdl.a b/platforms/android-22/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libdl.a and b/platforms/android-22/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libdl.so b/platforms/android-22/arch-arm64/usr/lib/libdl.so index 31e257affd3f188bd7fc84c756b18adb844d7e36..6e257a049a4ee722685dc0482461afdff190882a 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libdl.so and b/platforms/android-22/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-22/arch-arm64/usr/lib/libjnigraphics.so index 3bc8958f0a4448f4fea8d8d20244a8c15e24e032..9db1479e527baa22eb160be24b0945309b0d7fe0 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-22/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/liblog.so b/platforms/android-22/arch-arm64/usr/lib/liblog.so index cceec6cf5438740bf5127166d9688b52dd3e87be..b156c33f0ba5cbd060433bfbb665e745d9ba3ead 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/liblog.so and b/platforms/android-22/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libm.a b/platforms/android-22/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libm.a and b/platforms/android-22/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libm.so b/platforms/android-22/arch-arm64/usr/lib/libm.so index f5e996cebcddaacf8db5995ee2042b01e5128e13..f37f5746762043f03ec6e2ccab50bd2f54dd9507 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libm.so and b/platforms/android-22/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libmediandk.so b/platforms/android-22/arch-arm64/usr/lib/libmediandk.so index 7af06534865d60f9a61e70b34f725a6b69539114..7b1014779467b9f0e0353cb68209ba2282d498ce 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-22/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libstdc++.a b/platforms/android-22/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-22/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libstdc++.so b/platforms/android-22/arch-arm64/usr/lib/libstdc++.so index a2d0560b436f11bb61ba1101e44d266e887d3331..95688aeb12434f37aca02f8ba59ab3b695cce9ee 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-22/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libz.a b/platforms/android-22/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-22/arch-arm64/usr/lib/libz.a and b/platforms/android-22/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-22/arch-arm64/usr/lib/libz.so b/platforms/android-22/arch-arm64/usr/lib/libz.so index 021535a139f75503cddd630d8be22f1cb6be1916..dbeeb14f575a669f72db135d9a9579154cfd763c 100755 Binary files a/platforms/android-22/arch-arm64/usr/lib/libz.so and b/platforms/android-22/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-22/arch-x86/usr/lib/crtbegin_dynamic.o index 11dd78f01f834ee8249f29a16dc192151b9775f8..4489bd71044b89bfccb9ae7881b3cc5207315c2d 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-22/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-22/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-22/arch-x86/usr/lib/crtbegin_so.o index caac783b48d7bcb085fbf62de8f48d7c47b113c9..5be2e27c6678cfbc4da0ff7dd930bb2ba6975f66 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-22/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-22/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-22/arch-x86/usr/lib/crtbegin_static.o index d6866980dd1a1a3754a591d8fbd1471bf3d46a82..7deb71141cd88a9d72b325501274e25ffb0374be 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-22/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-22/arch-x86/usr/lib/libEGL.so b/platforms/android-22/arch-x86/usr/lib/libEGL.so index 59fd0c6d52e8985a72bc986dfa091c0fde145f87..4cc82a0ef229c5fcbb3d33a26f8b864fd59f8a28 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libEGL.so and b/platforms/android-22/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-22/arch-x86/usr/lib/libGLESv1_CM.so index ecb0f061fdf2cca0f9ff9123d92ce2ad27a78fed..b007f2b71f9a070e95775a02f80b9824cb26d98d 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-22/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libGLESv2.so b/platforms/android-22/arch-x86/usr/lib/libGLESv2.so index 35f66cf5aa49569b30bf32a7f8e923701576e3f5..97ed55d66fbcc5fdc0bff6a5e82f409328ec2b1d 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-22/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libGLESv3.so b/platforms/android-22/arch-x86/usr/lib/libGLESv3.so index fe86d8dcc6615c4c97f3dff9052def6c27386988..d30262f6060d85f117b454315a5484a6476556a6 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-22/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-22/arch-x86/usr/lib/libOpenMAXAL.so index 8e56c1ff3902b7b4174e64f1ef755045c6d9bdf6..f45a2ef87fe23ad410b97e0ec0031cc01da3e9d7 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-22/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-22/arch-x86/usr/lib/libOpenSLES.so index f82eb5436a3577a7df2fb9b8d42def68f1750931..3bca4f9bacb81b6b0eb255d4d39069a144461b67 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-22/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libandroid.so b/platforms/android-22/arch-x86/usr/lib/libandroid.so index c474672d9b728ea7bf197d95e9bbf4222d06277a..c56821d11919c83f24c67ac4ab6c3972aac96a47 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libandroid.so and b/platforms/android-22/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libc.a b/platforms/android-22/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libc.a and b/platforms/android-22/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libc.so b/platforms/android-22/arch-x86/usr/lib/libc.so index ac80a253f2bf87818414a64f50d4b8135a77cc05..75a399e6249064d6fd549451da2efcbbb4245112 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libc.so and b/platforms/android-22/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-22/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-22/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libdl.a b/platforms/android-22/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libdl.a and b/platforms/android-22/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libdl.so b/platforms/android-22/arch-x86/usr/lib/libdl.so index bbb0b10c45bdcf5892297d614b1fb7477c829c61..b2beac88f5d0b75e04548d3fc79ae13a00d4df3f 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libdl.so and b/platforms/android-22/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-22/arch-x86/usr/lib/libjnigraphics.so index 1528e46518278f0228c9c2782e007c9a5b5d5ee5..3bbd4d695fd5a250ed0d6a7a1698b0dd451747fc 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-22/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/liblog.so b/platforms/android-22/arch-x86/usr/lib/liblog.so index a4ae490ff78ac7bb91e24b43013f68dda04dd24c..9c1c8130b7d61a96327a027d8de00676467ab193 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/liblog.so and b/platforms/android-22/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libm.a b/platforms/android-22/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libm.a and b/platforms/android-22/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libm.so b/platforms/android-22/arch-x86/usr/lib/libm.so index 0db54090157484ed265ec42602fdcae37242167a..54444514a046f84c3478f65606cbaed06f867ee5 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libm.so and b/platforms/android-22/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libmediandk.so b/platforms/android-22/arch-x86/usr/lib/libmediandk.so index 039703211d835b6a17c0872310ba591d65a113fa..910a9aea98f9e30dd1f67d717bcdb096894e431b 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libmediandk.so and b/platforms/android-22/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libstdc++.a b/platforms/android-22/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libstdc++.a and b/platforms/android-22/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libstdc++.so b/platforms/android-22/arch-x86/usr/lib/libstdc++.so index 746bfba3bf884c723113cc349664d5816995e2bc..ae3e407b19aea8b1a50387efb4f6d8394792ecc4 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libstdc++.so and b/platforms/android-22/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-22/arch-x86/usr/lib/libz.a b/platforms/android-22/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-22/arch-x86/usr/lib/libz.a and b/platforms/android-22/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-22/arch-x86/usr/lib/libz.so b/platforms/android-22/arch-x86/usr/lib/libz.so index 590606c6bf226f7acc80026ff88f6289b77c8ca3..7240961f2c1442b6409ea34252e32c6e6226c9cb 100755 Binary files a/platforms/android-22/arch-x86/usr/lib/libz.so and b/platforms/android-22/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_dynamic.o index 384613011a24ae9dad4a720f99d573aba41cc860..f596a237d2c36de92e273b192cdec34a9b204027 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_so.o index bf9c36fd8bf0711095b42869e37fca126aa3dbb1..8bb6e8362c5eb4a9022261a5368ef4f1dfe10605 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_static.o index ac8422ecf663a0171b1e13f153756c077f99cf92..74d3ee2bc1f72ef201986edc34531c74ec9b9854 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-22/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-22/arch-x86_64/usr/lib64/libEGL.so index dba8bfb0ed528e38be34b479d4957fbf24b2c03d..fefaf7dada7dd17ba6d45c79131110189e1d649b 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-22/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv1_CM.so index 515111bd9f460d1c8e054ec7b319a169645324b4..001ffc6d474f051e784d936358ade3df0a9f1072 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv2.so index 6631db99ce24bab3c1a31d2355815aeb80b50999..2e759f430487e96eec8ab7fde56dd6b7e14e2add 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv3.so index 6b938a752260ac96738ea4a726db2231b572cee1..8f325585c549e1e5b5cdace410560c27e4062a2a 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-22/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-22/arch-x86_64/usr/lib64/libOpenMAXAL.so index 17c6430b1ecfbf5dc3a5f208638eb782d79794cd..a19279eb48183da99678a6f8b501c62af7d0a165 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-22/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-22/arch-x86_64/usr/lib64/libOpenSLES.so index 89a9dd411b6c6da91194641e272b220d143a3561..e082d6ddc3e3b4858a9e368df11d9baae1e7c242 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-22/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-22/arch-x86_64/usr/lib64/libandroid.so index 262b6ae6d205ed3c6f750e1f4d042aa3f6d72921..10ea3c89a3fc508e5c2fdefdf662cf948e9b2e54 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-22/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libc.a b/platforms/android-22/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libc.a and b/platforms/android-22/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libc.so b/platforms/android-22/arch-x86_64/usr/lib64/libc.so index d722c066fc6cd23569fb3f862ba0866143c4d9d8..913c4acc860bbe4acb8dfd75ac44dca77bae0143 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libc.so and b/platforms/android-22/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-22/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-22/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libdl.a b/platforms/android-22/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-22/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libdl.so b/platforms/android-22/arch-x86_64/usr/lib64/libdl.so index 5d928572cbb42af4a48541bbdfb174c66c6450e9..527689f4844f92adcfe6ee4d67b4358c3824251b 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-22/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-22/arch-x86_64/usr/lib64/libjnigraphics.so index fef40bfc9376a6a633efc4e4fd25beb0fe16d0a7..3e4836400f8fb5f9706c8355cf5ce9c58c0e8f05 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-22/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/liblog.so b/platforms/android-22/arch-x86_64/usr/lib64/liblog.so index 1fc80cae6c348d7fbe5da331f1960bdec4468d57..ab4ef2ab5bf18a367f525c1143f80d03f500dd21 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-22/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libm.a b/platforms/android-22/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libm.a and b/platforms/android-22/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libm.so b/platforms/android-22/arch-x86_64/usr/lib64/libm.so index 83fe13d00fdc33435e4c055916595c6da24ac0dd..94386a21b2ca9865d5f0806818b7f1a4c3036131 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libm.so and b/platforms/android-22/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-22/arch-x86_64/usr/lib64/libmediandk.so index 1102cf0693522deec1eb58d32990465c7189cbef..d4f5970b00fb8d161fefb34a02b5d4489a942c4d 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-22/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.so index 320ddfdf7d8a7c026242786464a0a84693b1b97b..63d5f97fa25ef135b1cd1c9c221f68ab3e690d6d 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-22/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libz.a b/platforms/android-22/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libz.a and b/platforms/android-22/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-22/arch-x86_64/usr/lib64/libz.so b/platforms/android-22/arch-x86_64/usr/lib64/libz.so index 1131b7de576a7f6c6256e82c035fcad200ea76e7..2243586e5b97b7f3ffca984a25b6bb0f300a80f2 100755 Binary files a/platforms/android-22/arch-x86_64/usr/lib64/libz.so and b/platforms/android-22/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-23/arch-arm/usr/lib/crtbegin_dynamic.o index c4077ace3aba7ade78de6d877c1036e701d9e8ee..56c4a04f92e1828cfd1e04aa4c56b8ce9d5777c5 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-23/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-23/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-23/arch-arm/usr/lib/crtbegin_so.o index 8e8360b7e22cd0eaae5618c4d21c1e52ba052a14..0427c3594ffed51af37e6bd2147fd6a297f5f3b4 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-23/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-23/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-23/arch-arm/usr/lib/crtbegin_static.o index c4077ace3aba7ade78de6d877c1036e701d9e8ee..56c4a04f92e1828cfd1e04aa4c56b8ce9d5777c5 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-23/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-23/arch-arm/usr/lib/libEGL.so b/platforms/android-23/arch-arm/usr/lib/libEGL.so index 50234846142899fe60ace9b9787e21b243649254..17cb59d012d14e09e9c5d17939b4c66469ea2eec 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libEGL.so and b/platforms/android-23/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-23/arch-arm/usr/lib/libGLESv1_CM.so index edb3e147ea8c89d4850d3609940c4614f364d60d..2f5459f764cb4693a74bdd03218508756104d0f8 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-23/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libGLESv2.so b/platforms/android-23/arch-arm/usr/lib/libGLESv2.so index 2df54989ed2e46bfc6b86f15ac34b70977f8570a..6fa3f1c08e59fcb5e87d0c5d4b9e8c2bb3b71e78 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-23/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libGLESv3.so b/platforms/android-23/arch-arm/usr/lib/libGLESv3.so index 3d0c98c74764c1f42fd43d541cb7f64941328ea0..4d2ed24b10115f6ebd72d8f9a79cec3b514b235f 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-23/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-23/arch-arm/usr/lib/libOpenMAXAL.so index 8feadd6e4a73c2700d2eb2cc09b860d68f47362b..f126929914558cee21878248aeb4189bc0ae3eec 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-23/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-23/arch-arm/usr/lib/libOpenSLES.so index 4ec445b98d7327326254fdef9719810ae0439235..f76b47a29c7a8aac3d33fa0b8af95970bc308860 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-23/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libandroid.so b/platforms/android-23/arch-arm/usr/lib/libandroid.so index cb3c5ecf52a0f99590b076e4f3401ab710b80047..01982c07d39aff6942a19d671ab32bac57c07e9c 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libandroid.so and b/platforms/android-23/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libc.a b/platforms/android-23/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libc.a and b/platforms/android-23/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libc.so b/platforms/android-23/arch-arm/usr/lib/libc.so index 0dfaf46d41d1d403d4bbfc14d6861e7bdac7512a..69a9d3291829cad397931ac1f28daa9221e63efc 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libc.so and b/platforms/android-23/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-23/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-23/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libdl.a b/platforms/android-23/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libdl.a and b/platforms/android-23/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libdl.so b/platforms/android-23/arch-arm/usr/lib/libdl.so index 9acac300d6fdb2207905abf76bf555c729fd79a0..f1597a691803f33ea66aa67aa64a8e46d8242a28 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libdl.so and b/platforms/android-23/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-23/arch-arm/usr/lib/libjnigraphics.so index 8daedf49a108ee1e2ff053cdf9ca5091c351eb51..30db86d7a00a836f3b9bad637333da662f67738b 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-23/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/liblog.so b/platforms/android-23/arch-arm/usr/lib/liblog.so index 464a91757ca44e1b6df7dad135cb51c2bd17a23b..263b521a23d2b00e47cef81ce3ad29d92de60164 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/liblog.so and b/platforms/android-23/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libm.a b/platforms/android-23/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libm.a and b/platforms/android-23/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libm.so b/platforms/android-23/arch-arm/usr/lib/libm.so index 18d3829b86cfbd5feff8ecad09efa1525f5d9808..69ca1e13bba2fa88f04ce9895d0b8118e55d14ad 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libm.so and b/platforms/android-23/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libmediandk.so b/platforms/android-23/arch-arm/usr/lib/libmediandk.so index 6b6829417cedd993f17527b792028067b41bc2fa..371623d7d02eb3eebf0358786e69466ca20de349 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libmediandk.so and b/platforms/android-23/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libstdc++.a b/platforms/android-23/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libstdc++.a and b/platforms/android-23/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libstdc++.so b/platforms/android-23/arch-arm/usr/lib/libstdc++.so index 329d75962578068088e8d0b35249a1e4b1a9cc12..0cc457e666129fe0aba7a0721149cd4ecbc99556 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libstdc++.so and b/platforms/android-23/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-23/arch-arm/usr/lib/libz.a b/platforms/android-23/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-23/arch-arm/usr/lib/libz.a and b/platforms/android-23/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-23/arch-arm/usr/lib/libz.so b/platforms/android-23/arch-arm/usr/lib/libz.so index 3b5e51012a1510d749454ee1efe3b3eec9365e99..0d64dca9b0f3e210e1f1c018d74f7a6292895270 100755 Binary files a/platforms/android-23/arch-arm/usr/lib/libz.so and b/platforms/android-23/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-23/arch-arm64/usr/lib/crtbegin_dynamic.o index d918fca71cc75d2dfdc203f6a79f8f1fb7a064fe..06d89597f04a799de8b979e71e3627895a31e9fb 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-23/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-23/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-23/arch-arm64/usr/lib/crtbegin_so.o index 10050288f6c648113f8a436c1b8e919dc405db85..c1b858ed1353197c8fbae5699466aa66fa75bfa8 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-23/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-23/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-23/arch-arm64/usr/lib/crtbegin_static.o index a13c9138b1b6a3f319a8b285c8b29e150af70a51..50baf5dc27185b2be90e04c135d1a2123497ef96 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-23/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-23/arch-arm64/usr/lib/crtend_android.o b/platforms/android-23/arch-arm64/usr/lib/crtend_android.o index 5090373e54368bf25bbc1a295a35eb55877f2212..c1ab2b191deb595b67018129dd4faf6ed0a71a4f 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-23/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libEGL.so b/platforms/android-23/arch-arm64/usr/lib/libEGL.so index 23c065a06a7c87501333c10de1a10434b1642816..1aa4c7466a8db432eeed8a67a0a67237926ac995 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libEGL.so and b/platforms/android-23/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-23/arch-arm64/usr/lib/libGLESv1_CM.so index 0f450a7f107983ff41b2ccdfa81fc7bdce2a048c..e967a97286a40dd2ecd5330c548a06bfc33ddcd7 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-23/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-23/arch-arm64/usr/lib/libGLESv2.so index c1f62db509062ffad16c1a623af35a847f879a6c..d13fb7bbb5e94bdfd8907ff8a4bd4b7962557135 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-23/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-23/arch-arm64/usr/lib/libGLESv3.so index 5846ae28df626423e539dfd5555851e4d7308b54..88b2697bc61e58c71ac4b1b90363f525248d2d0e 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-23/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-23/arch-arm64/usr/lib/libOpenMAXAL.so index 431a5dbaa6ea767264bb4d76f81ecc8f2b8afca7..b1a620c0cd620cf817f6e4a5e0b424373abc7e68 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-23/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-23/arch-arm64/usr/lib/libOpenSLES.so index f58c46f9bfdbc4abc23817c25d005bcebaa20b57..1c5011f8d94a1baaec78516c491c30effc8a97de 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-23/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libandroid.so b/platforms/android-23/arch-arm64/usr/lib/libandroid.so index d5f01ec6c4419a0be426faaeb4a17cbb8557cc35..d67f9b96d7fec34207458f72fa8a3b361e492410 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libandroid.so and b/platforms/android-23/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libc.a b/platforms/android-23/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libc.a and b/platforms/android-23/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libc.so b/platforms/android-23/arch-arm64/usr/lib/libc.so index a697f238c2fcc367b057f58333dc8d75049c8f6f..147f6ea66a24e2df170833237033342629158223 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libc.so and b/platforms/android-23/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-23/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-23/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libdl.a b/platforms/android-23/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libdl.a and b/platforms/android-23/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libdl.so b/platforms/android-23/arch-arm64/usr/lib/libdl.so index 561dc2eb5bb56c86f8e3171ae97b386e71a9ecb5..b048513fa8204d76c059ef21b85b143574e1df8b 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libdl.so and b/platforms/android-23/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-23/arch-arm64/usr/lib/libjnigraphics.so index f3bb843155ac730cb29bc1ca943fcc02d6ccbb1d..ff86adad18a07ae2cbd2f2bad70b759981801885 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-23/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/liblog.so b/platforms/android-23/arch-arm64/usr/lib/liblog.so index f66165ca5f49dfc5cddb6c995ac77ff4714290c8..e7e6c6c1bde685ca81ce0ac0672f1b9bdfa1fb88 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/liblog.so and b/platforms/android-23/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libm.a b/platforms/android-23/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libm.a and b/platforms/android-23/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libm.so b/platforms/android-23/arch-arm64/usr/lib/libm.so index 55edd2a7aea105e7ffbf2c878ba51290c9d9a4fd..9168c1c7b532141d24796295aeb4870e8b3510dd 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libm.so and b/platforms/android-23/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libmediandk.so b/platforms/android-23/arch-arm64/usr/lib/libmediandk.so index 86b43c493c07ec91032b5ad56b66161348c462be..1be56504e1f7ff0d018b5271fdc46397362f3f48 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-23/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libstdc++.a b/platforms/android-23/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-23/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libstdc++.so b/platforms/android-23/arch-arm64/usr/lib/libstdc++.so index 5ebdafea57297b1dee163ec7b8aea537fcf16654..a9b9bcd6c31f392edd453c8600226939162af73c 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-23/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libz.a b/platforms/android-23/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-23/arch-arm64/usr/lib/libz.a and b/platforms/android-23/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-23/arch-arm64/usr/lib/libz.so b/platforms/android-23/arch-arm64/usr/lib/libz.so index ae45eb46ca8ecbb4bc336e1c6e363ec798f253c1..e34abd2f666285fd141476a0a0d514e372d2281d 100755 Binary files a/platforms/android-23/arch-arm64/usr/lib/libz.so and b/platforms/android-23/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-23/arch-x86/usr/lib/crtbegin_dynamic.o index 4d54ba904134a5f62cb5b8f565ac5d212d7da781..5e9d2f6d64fa1492b4c94b421247a07a9f1595aa 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-23/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-23/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-23/arch-x86/usr/lib/crtbegin_so.o index 20f2a131c50125e1b9eb96d6be7872ec36418713..7f45360cd3c0b274416b24d005c4a82fd5fd7bf3 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-23/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-23/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-23/arch-x86/usr/lib/crtbegin_static.o index 4d54ba904134a5f62cb5b8f565ac5d212d7da781..5e9d2f6d64fa1492b4c94b421247a07a9f1595aa 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-23/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-23/arch-x86/usr/lib/libEGL.so b/platforms/android-23/arch-x86/usr/lib/libEGL.so index 9830e905035942c14d43f469a0a2db92c629530c..65acafe23d94ad888b85dca836cdd4be6e31eb04 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libEGL.so and b/platforms/android-23/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-23/arch-x86/usr/lib/libGLESv1_CM.so index bac1d38bf947bd70fcb46e3a9036a7a1fa649a0a..dfcf1e0d171c27ac9aed6ce98045a9a5bde0e0a2 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-23/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libGLESv2.so b/platforms/android-23/arch-x86/usr/lib/libGLESv2.so index 71d3202cbc08e684e757c2871ab6ebbabd0f0613..5ca6d46527197e2179ce671c1f9224fb98989b1e 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-23/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libGLESv3.so b/platforms/android-23/arch-x86/usr/lib/libGLESv3.so index 88fa0da032e3e234b8671952d9bd8b43c1567445..395d1c9ef20e1b65a6ca4e59a1638cbdbdda1d52 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-23/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-23/arch-x86/usr/lib/libOpenMAXAL.so index c92f554809cb0b3adbc6bc61245718cd9ca0c044..07ec08f6a1d3763c45a2a61ea8fbb25f0d9578d8 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-23/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-23/arch-x86/usr/lib/libOpenSLES.so index e72c11034df3561e62c6d07d5eab942c62555d0a..546562c9362384aeeef57f7d6991b881519a8f59 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-23/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libandroid.so b/platforms/android-23/arch-x86/usr/lib/libandroid.so index 348943d11d1afc5624ff76b7a09549a25478cc3a..41b2b45bc54724be64d33d6d54d04ddbdd3fc219 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libandroid.so and b/platforms/android-23/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libc.a b/platforms/android-23/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libc.a and b/platforms/android-23/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libc.so b/platforms/android-23/arch-x86/usr/lib/libc.so index a68eeae962659826c231a69c595967f06d023d45..471f079c5a7806902909ad08551eb25b11044076 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libc.so and b/platforms/android-23/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-23/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-23/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libdl.a b/platforms/android-23/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libdl.a and b/platforms/android-23/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libdl.so b/platforms/android-23/arch-x86/usr/lib/libdl.so index 07171d7642599ccaafb3988cc28d2d0d060a4222..ccd590b312d5b2ede3afa29a5b43fc04130a80a4 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libdl.so and b/platforms/android-23/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-23/arch-x86/usr/lib/libjnigraphics.so index 09aabbe6f80d2adbd180838b749516142e16b104..e361e4f51a4a3c2a07590420ed86c348d5e34ec5 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-23/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/liblog.so b/platforms/android-23/arch-x86/usr/lib/liblog.so index e4b4384c2f456c790241ec0fa7002d001b3b063e..c7b32946a4fbad8ab852529327dc56050b8fe167 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/liblog.so and b/platforms/android-23/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libm.a b/platforms/android-23/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libm.a and b/platforms/android-23/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libm.so b/platforms/android-23/arch-x86/usr/lib/libm.so index 78cbb5886dfe133bf219a4778e2b822df53f0f9b..db8868200fe0f82c925ad50cbd3a9f2397119839 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libm.so and b/platforms/android-23/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libmediandk.so b/platforms/android-23/arch-x86/usr/lib/libmediandk.so index 7f75018a55c273b84f809f4b8bdff6bfdf82787b..545f22f97938a065b950d95407176d23f50e4e89 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libmediandk.so and b/platforms/android-23/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libstdc++.a b/platforms/android-23/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libstdc++.a and b/platforms/android-23/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libstdc++.so b/platforms/android-23/arch-x86/usr/lib/libstdc++.so index 49bf4175373a2062bc894ff7321f4fac8b1a7b13..88b7a0981d4fc315dded9add6d19147483c8b8c9 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libstdc++.so and b/platforms/android-23/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-23/arch-x86/usr/lib/libz.a b/platforms/android-23/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-23/arch-x86/usr/lib/libz.a and b/platforms/android-23/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-23/arch-x86/usr/lib/libz.so b/platforms/android-23/arch-x86/usr/lib/libz.so index e8ce87918654dabbbfe84f8c0c099e1b9c4899e1..f1f4c95ad351149d46fe736be1dc976633bd02ff 100755 Binary files a/platforms/android-23/arch-x86/usr/lib/libz.so and b/platforms/android-23/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_dynamic.o index 07ae581df8bb6702f172b318abb0a80351a0e524..7a1300a7f425df3d77b1d0e69a64d0e9a2fdd302 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_so.o index 133e55745fa1920769fdf1656caca900a22bec3a..f41b9840efe4207a17ef2b5ab6119face3f62a0b 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_static.o index 07ae581df8bb6702f172b318abb0a80351a0e524..7a1300a7f425df3d77b1d0e69a64d0e9a2fdd302 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-23/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-23/arch-x86_64/usr/lib64/libEGL.so index b10a134c9f8ad6c78b323ac96fdc108e733797e8..efe8e81a97e6c024fe4cc61160e4866b465a5a9a 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-23/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv1_CM.so index 87e07268b2cc99457a01d819327053f56ff2efb9..9b0e91b25114395557e35203594b5a07e812f99f 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv2.so index 38cad4a964153124e738120fc82bae5ec191f258..e80a646ea0e2c3b77872e0b38a18a9df3625de89 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv3.so index 4e97098f02dfc20f846a713585912fc8c6d49d44..49ab0f144e83b079eecdf4b9de3e274d91213ef4 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-23/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-23/arch-x86_64/usr/lib64/libOpenMAXAL.so index 6e406feab3e378a67d42e5cee842a40f20960974..6dcd8ea54358e627a678cc6dd282dba6e798763e 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-23/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-23/arch-x86_64/usr/lib64/libOpenSLES.so index 6ca9f43255fb0c0131cbefa7ba3767ecb2b1e272..513e0fd2addbf5e312d309d9f9672d3b9ce45f0c 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-23/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-23/arch-x86_64/usr/lib64/libandroid.so index ee9350ae69ace295f827afc0f242472a0ec99165..72a5a298082624dc3fbb94863dca50fc372e5568 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-23/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libc.a b/platforms/android-23/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libc.a and b/platforms/android-23/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libc.so b/platforms/android-23/arch-x86_64/usr/lib64/libc.so index cb4d9ad03cf79b0c5fe867a330a201889b557b61..d3e8e030c43b4d0e82c7f57eb2718daa6ceba316 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libc.so and b/platforms/android-23/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-23/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-23/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libdl.a b/platforms/android-23/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-23/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libdl.so b/platforms/android-23/arch-x86_64/usr/lib64/libdl.so index 8d817c4078b780807e9817456a6b200d7b2c2d18..a1e91993317f272d338a3b5fcd331cda4cc6cdd4 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-23/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-23/arch-x86_64/usr/lib64/libjnigraphics.so index 3213bf88202da2daec9790a6d616436d128e7ba5..c3b185ce96e5b6aa20b2b625f7d99ace6a89a912 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-23/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/liblog.so b/platforms/android-23/arch-x86_64/usr/lib64/liblog.so index a3cdc712a09cd2e10481164c91bcb45b758183f1..04c8e3aa22c9fb59d369bc9446d38cd3e31b4d7e 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-23/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libm.a b/platforms/android-23/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libm.a and b/platforms/android-23/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libm.so b/platforms/android-23/arch-x86_64/usr/lib64/libm.so index 507b24935225faf80c25a6b43890c5742149a418..6266b62d8616d1e91cbab2294321dd2bac0257f4 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libm.so and b/platforms/android-23/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-23/arch-x86_64/usr/lib64/libmediandk.so index 18dca49ea7180bde6fd2ca5f3da27674246a9ca1..540c1967391306752fcb402d111b41aef92e74c5 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-23/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.so index 4166314e59cc25c5ce9e20c548b87002f0a330e2..ab576122f12532c4140f4b5bcbc3fd1f93eaace5 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-23/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libz.a b/platforms/android-23/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libz.a and b/platforms/android-23/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-23/arch-x86_64/usr/lib64/libz.so b/platforms/android-23/arch-x86_64/usr/lib64/libz.so index c549b6e5c7fb9562bda970ddbbebca8b0865e601..728fccc5c57eb2d9596362f13baa6853c7797d4d 100755 Binary files a/platforms/android-23/arch-x86_64/usr/lib64/libz.so and b/platforms/android-23/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-24/arch-arm/usr/lib/crtbegin_dynamic.o index d07dd4371eb59f374b82c2b60bffc96f494b57d5..f1e603913bd92de922d6765e4998a13e018071af 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-24/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-24/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-24/arch-arm/usr/lib/crtbegin_so.o index 456582653e04c76b9b88406cc81f66f0b93cd14f..dc3ca00a8109c12fadbb621e72820a318f94f24e 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-24/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-24/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-24/arch-arm/usr/lib/crtbegin_static.o index d07dd4371eb59f374b82c2b60bffc96f494b57d5..f1e603913bd92de922d6765e4998a13e018071af 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-24/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-24/arch-arm/usr/lib/libEGL.so b/platforms/android-24/arch-arm/usr/lib/libEGL.so index 342295bbeb1851f7c61095a8d038df8b06bcfb26..444055ad7be0a34e60c2a3646db3bdb8b4e1c32e 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libEGL.so and b/platforms/android-24/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-24/arch-arm/usr/lib/libGLESv1_CM.so index bf82513cfbbf3a9328f18e4a479270c69dd08d83..39b80bea491ca4f601e9d68249eeab6f84f7f67b 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-24/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libGLESv2.so b/platforms/android-24/arch-arm/usr/lib/libGLESv2.so index 52f663a2d08eafd9929bd0c7db177e2987d3cef3..1f22d2c7fb700eca614f8e3bb5a582ad2f796c60 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-24/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libGLESv3.so b/platforms/android-24/arch-arm/usr/lib/libGLESv3.so index 8b7068522ce1d966003a819951c7f2a851d21bfb..cba6cf8dc94f478ee176c898c8e4f8b7fd06a23c 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-24/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-24/arch-arm/usr/lib/libOpenMAXAL.so index 92eb10820099184b773933f17d06d44add3ab4cd..cd3d337b1c8e4ddc440874e866a819b3f5921c9e 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-24/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-24/arch-arm/usr/lib/libOpenSLES.so index b507eb15cdfc5bc1a655615058475526e2c69f5e..65098487ec9c377ee4bc06723c160d6ad88fc0b2 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-24/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libandroid.so b/platforms/android-24/arch-arm/usr/lib/libandroid.so index a2e21b2704485bc9fe1a8c98ba04a750d87058e2..f80a36eeab17a7263d37227fa9c988dc5cf56c5d 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libandroid.so and b/platforms/android-24/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libc.a b/platforms/android-24/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libc.a and b/platforms/android-24/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libc.so b/platforms/android-24/arch-arm/usr/lib/libc.so index ddda3e9b16785aa9408428a301e139f0e636feec..2ab5ae51ed92e7f79559d7a4a2a52ef11b706e39 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libc.so and b/platforms/android-24/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libcamera2ndk.so b/platforms/android-24/arch-arm/usr/lib/libcamera2ndk.so index 91ad40f52654be20b506ee4f2e7e228dc083a10c..298f83eac2da6b489f52aaf32df4682ab13324c5 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libcamera2ndk.so and b/platforms/android-24/arch-arm/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-24/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-24/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libdl.a b/platforms/android-24/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libdl.a and b/platforms/android-24/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libdl.so b/platforms/android-24/arch-arm/usr/lib/libdl.so index b9db7a32df8560ab681355e5fbf88b67f971b75e..e59ae158fa709dfb77a27d275bbbe120501d7308 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libdl.so and b/platforms/android-24/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-24/arch-arm/usr/lib/libjnigraphics.so index 33284a8a773bd479f8fff3787af6e925c1e19f46..5449423a3f3bc40b6c4e5a86f5f5b0472a62e086 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-24/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/liblog.so b/platforms/android-24/arch-arm/usr/lib/liblog.so index d944dbec2f2e160605569f7b286d38840d39a2b8..6d0027def28fd8e4ea32310bebbb094b0318a63d 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/liblog.so and b/platforms/android-24/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libm.a b/platforms/android-24/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libm.a and b/platforms/android-24/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libm.so b/platforms/android-24/arch-arm/usr/lib/libm.so index 07968faffbd2e94bb4b4d8027f8f2cf835034d2f..5be8c3fc7bcf7f9a30a149751a8525e5294ce74c 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libm.so and b/platforms/android-24/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libmediandk.so b/platforms/android-24/arch-arm/usr/lib/libmediandk.so index 7f7eec8a1f854bb44f1ea60ec2b29ebb5f30b5e7..84bae1e6c2bb1b348a0469d7f19d08ceba030d3f 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libmediandk.so and b/platforms/android-24/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libstdc++.a b/platforms/android-24/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libstdc++.a and b/platforms/android-24/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libstdc++.so b/platforms/android-24/arch-arm/usr/lib/libstdc++.so index d102b70142468c85eb1da42bdecc78448dc62b96..a937ecdad781084419fad748241b04e960eb7516 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libstdc++.so and b/platforms/android-24/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libvulkan.so b/platforms/android-24/arch-arm/usr/lib/libvulkan.so index d84c2a3bc92ff9758f5c6297f7cb9abe9bab9d5c..903b1dfbec2618600e8a46d3d5f952dae620111a 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libvulkan.so and b/platforms/android-24/arch-arm/usr/lib/libvulkan.so differ diff --git a/platforms/android-24/arch-arm/usr/lib/libz.a b/platforms/android-24/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-24/arch-arm/usr/lib/libz.a and b/platforms/android-24/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-24/arch-arm/usr/lib/libz.so b/platforms/android-24/arch-arm/usr/lib/libz.so index 236c537b05b01b5a521240a8a12deec5de3f36b8..74860f14572085976cb7f37f3a94167d931f0a51 100755 Binary files a/platforms/android-24/arch-arm/usr/lib/libz.so and b/platforms/android-24/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-24/arch-arm64/usr/lib/crtbegin_dynamic.o index 28d1e2324c7795761447976cd396794bef40cfa3..78583b23e9cc4bf0c78e8194378725cb4445b51b 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-24/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-24/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-24/arch-arm64/usr/lib/crtbegin_so.o index b95eb4b50263591a5bea0b773b5c5a97d82e3732..b2b9eaa0b216c5421e80738aa708215163bb7fa2 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-24/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-24/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-24/arch-arm64/usr/lib/crtbegin_static.o index fd5937c41d5ff8ddcb4548d7b2a36f597dfc650f..e0cea35c5abd1331872b33d752f3290668c32fca 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-24/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-24/arch-arm64/usr/lib/crtend_android.o b/platforms/android-24/arch-arm64/usr/lib/crtend_android.o index 5d4bcbaf95204e4b6c9d46d84fbf5fc103c8edbb..7c5b92efee14ee6f6096b76c51365befaba60913 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-24/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libEGL.so b/platforms/android-24/arch-arm64/usr/lib/libEGL.so index 9abc57766da1a469392e06c913e1697f3c9b9a39..d721cd0f1937588e9d932bc18fb680cf9afd113f 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libEGL.so and b/platforms/android-24/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-24/arch-arm64/usr/lib/libGLESv1_CM.so index 5df5908001d04e39fe79053a45c60fab97ca19bd..6fc73f1e645a5934060399ac8d6e22c4212f493d 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-24/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-24/arch-arm64/usr/lib/libGLESv2.so index 26643f90693357e5ab6c67e2869a6ba24d2139f5..45ef5c4e6226fd6e86a98f729c439a3e20de07cb 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-24/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-24/arch-arm64/usr/lib/libGLESv3.so index 59d6a0a86bd3895b268538f073623884e4816a16..839a18164f5ac78e49c5636378ea28471126f373 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-24/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-24/arch-arm64/usr/lib/libOpenMAXAL.so index 66ec7259a6689ff484e2e961ea2194546ed028c8..be1ce26e130bdec268f50f0fa9c51b921ca53e0c 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-24/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-24/arch-arm64/usr/lib/libOpenSLES.so index 644712873059111f0457698a0ed3cd9f7b42f24f..4a773c7592ba7648b18f282e9bfbf1a34b9cd4ab 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-24/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libandroid.so b/platforms/android-24/arch-arm64/usr/lib/libandroid.so index 2aff8c7ce236e61ec3c09e8747653f0c1a561e6f..65286cc51f93c9a2dd4ed5f2be8bf566f0bfef70 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libandroid.so and b/platforms/android-24/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libc.a b/platforms/android-24/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libc.a and b/platforms/android-24/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libc.so b/platforms/android-24/arch-arm64/usr/lib/libc.so index 2f181a5ed5a4206bfa73aead5a9e85ba32a1af72..4ebb0374fc3e3994d04124d5064c95224d8fa4e6 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libc.so and b/platforms/android-24/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libcamera2ndk.so b/platforms/android-24/arch-arm64/usr/lib/libcamera2ndk.so index 2f53ad55f633293f45fdc87deb70486b315857b7..ac1ef78f23b2bae7801edc9677c1ac389eeaa5a3 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libcamera2ndk.so and b/platforms/android-24/arch-arm64/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-24/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-24/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libdl.a b/platforms/android-24/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libdl.a and b/platforms/android-24/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libdl.so b/platforms/android-24/arch-arm64/usr/lib/libdl.so index 5fccc08e6e39dbd16711244d2aaa794d50777c37..a8e5713444e76d748ae8f2f7e971ec885427b8a9 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libdl.so and b/platforms/android-24/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-24/arch-arm64/usr/lib/libjnigraphics.so index f48e769af6c18231d59d05b3a4054a23cf7a3a23..a4ce1254b1adff96b91deadbe8ed05412158c834 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-24/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/liblog.so b/platforms/android-24/arch-arm64/usr/lib/liblog.so index f5112f5660c0511187c14bfd29837bf5f1785a0f..b319a4da5aa89dae4db9d980e54d929de8e1b8b9 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/liblog.so and b/platforms/android-24/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libm.a b/platforms/android-24/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libm.a and b/platforms/android-24/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libm.so b/platforms/android-24/arch-arm64/usr/lib/libm.so index c1d6949fa675e86fb962e0e3cf52b6c2133b9233..3010e4c751a22a663d972d707a129b731b1eaa23 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libm.so and b/platforms/android-24/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libmediandk.so b/platforms/android-24/arch-arm64/usr/lib/libmediandk.so index d50f1ce8aae2f4008e9f85b6265e1e27b8d3a194..261fa74ed1184087f3fd077ea01c4d1b0e3b552a 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-24/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libstdc++.a b/platforms/android-24/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-24/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libstdc++.so b/platforms/android-24/arch-arm64/usr/lib/libstdc++.so index 36bc5403ec0771415c17f63751e9414b3646ace0..b777b6155ac50cd7f714e2310713f9f2a949f9fc 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-24/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libvulkan.so b/platforms/android-24/arch-arm64/usr/lib/libvulkan.so index 16486d994d4747340a40d6beef599081787350db..c9401bc3ce3ea5d7db2f728b03a95ccfeb13a8f2 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libvulkan.so and b/platforms/android-24/arch-arm64/usr/lib/libvulkan.so differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libz.a b/platforms/android-24/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-24/arch-arm64/usr/lib/libz.a and b/platforms/android-24/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-24/arch-arm64/usr/lib/libz.so b/platforms/android-24/arch-arm64/usr/lib/libz.so index 0d664b9ca2afe1108427a00d5006d83724a8364e..594bf4f8bc95ade6679e000eab688d0483f7a8c4 100755 Binary files a/platforms/android-24/arch-arm64/usr/lib/libz.so and b/platforms/android-24/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-24/arch-x86/usr/lib/crtbegin_dynamic.o index da2ce9b9d6f46d3979242b2ecda525e6b7fb2149..00ae85f95dd37e8698c35ccc78b57c48fd9a6b41 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-24/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-24/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-24/arch-x86/usr/lib/crtbegin_so.o index beaa23b3ebcbfb4530b345e2f5c9020b9048436c..e74c837b9a988537e64092a16522eec77312c77e 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-24/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-24/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-24/arch-x86/usr/lib/crtbegin_static.o index da2ce9b9d6f46d3979242b2ecda525e6b7fb2149..00ae85f95dd37e8698c35ccc78b57c48fd9a6b41 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-24/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-24/arch-x86/usr/lib/libEGL.so b/platforms/android-24/arch-x86/usr/lib/libEGL.so index 5b0ff145a7acf0b81cdedbf1d34ec323d2020960..c2151f5833d70a4d6362a0cb56c6314dfe0c90c7 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libEGL.so and b/platforms/android-24/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-24/arch-x86/usr/lib/libGLESv1_CM.so index 1cc90477ac84ea9370d73717a1bdfca5487445ac..6d1567aa36fcb5eefa85fdd0a609bd6d2584e5bf 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-24/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libGLESv2.so b/platforms/android-24/arch-x86/usr/lib/libGLESv2.so index 8c4813f74dc711185dc65d3b4462a59eda98a2c6..2cdd56750917489df7fc9e1f81d1418cf17d38bc 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-24/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libGLESv3.so b/platforms/android-24/arch-x86/usr/lib/libGLESv3.so index dd51b965335e0d029e61b6896ce19efbf8d43a69..5c5abac97703cfec45839d39f916b02d3fe966d1 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-24/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-24/arch-x86/usr/lib/libOpenMAXAL.so index f61e6caae11e1e47d0ad542c46565030696b5982..333b8705e82263245840972c9778d328bdeebee7 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-24/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-24/arch-x86/usr/lib/libOpenSLES.so index 8f3beceb9fab58b5fe182e5c0ca58955a1a7ad83..45887554a065013f7f4d7955bcae0cded0065cd0 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-24/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libandroid.so b/platforms/android-24/arch-x86/usr/lib/libandroid.so index 576b4fdf58d4ab841e2f4e4f1629b7260f90dcaf..efcf88ba0516459ad79a545cc4f3e2419e655cb1 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libandroid.so and b/platforms/android-24/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libc.a b/platforms/android-24/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libc.a and b/platforms/android-24/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libc.so b/platforms/android-24/arch-x86/usr/lib/libc.so index 99551f96bb11793fe9a3f21485db24429ad18083..d783f572b53cb77d076f30b0af50532c96bb7080 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libc.so and b/platforms/android-24/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libcamera2ndk.so b/platforms/android-24/arch-x86/usr/lib/libcamera2ndk.so index 227a0779d1741f3372fa84d85d1e340d9682b62d..804aa5de1138f6a15319ea6f3f88f58f6c146ed4 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libcamera2ndk.so and b/platforms/android-24/arch-x86/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-24/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-24/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libdl.a b/platforms/android-24/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libdl.a and b/platforms/android-24/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libdl.so b/platforms/android-24/arch-x86/usr/lib/libdl.so index 7a4179730af842996c3cd3031c165b9ab19306d7..5869aa430e5f9d75484bf9ecd5697336ecc62328 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libdl.so and b/platforms/android-24/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-24/arch-x86/usr/lib/libjnigraphics.so index 28d1181c1432615aa88279bcb53eba7f24066e0a..137fda94e8b9ebcb2b547188abeb4b083490df0f 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-24/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/liblog.so b/platforms/android-24/arch-x86/usr/lib/liblog.so index e6dba56e21c3363716ebf8d25798b296d0640d88..36a7858edcf7bd2c2353c11bd9b13d91525a0044 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/liblog.so and b/platforms/android-24/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libm.a b/platforms/android-24/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libm.a and b/platforms/android-24/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libm.so b/platforms/android-24/arch-x86/usr/lib/libm.so index 72e5cd59cd55f777159a6a19b66f0e81fe032c4a..e828bddc5f5a21188dcd7c3d639a8656ecad5dab 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libm.so and b/platforms/android-24/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libmediandk.so b/platforms/android-24/arch-x86/usr/lib/libmediandk.so index 818df6eed2097caacb2a0434ba3105d250f47c96..832e178e9f5a97140d1ccd75f2851a70ae8225e6 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libmediandk.so and b/platforms/android-24/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libstdc++.a b/platforms/android-24/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libstdc++.a and b/platforms/android-24/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libstdc++.so b/platforms/android-24/arch-x86/usr/lib/libstdc++.so index a3a17abac96dbdd52d24939a289a6e77f8dc9a39..6cfa7337b9d56c6b859f5bc98d149dd587a62032 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libstdc++.so and b/platforms/android-24/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libvulkan.so b/platforms/android-24/arch-x86/usr/lib/libvulkan.so index 8f020b7180856da748fb887dac59441909faf5bd..adf14b2b467544e744e3dc8aefe4112901c5a693 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libvulkan.so and b/platforms/android-24/arch-x86/usr/lib/libvulkan.so differ diff --git a/platforms/android-24/arch-x86/usr/lib/libz.a b/platforms/android-24/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-24/arch-x86/usr/lib/libz.a and b/platforms/android-24/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-24/arch-x86/usr/lib/libz.so b/platforms/android-24/arch-x86/usr/lib/libz.so index 9a2ec82f93850ecc8922ef116b7d91b16e68ac78..29d865e83060f34eb0043ae183ed122fc4d897c3 100755 Binary files a/platforms/android-24/arch-x86/usr/lib/libz.so and b/platforms/android-24/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_dynamic.o index f76e40366436c8df05e3218a36337abe31fb87b0..db6ad90f2713767dfa28f84ae0dba5a3b2c5e62f 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_so.o index 6c087ee061a7ad8389f197e925836a20ef185d33..8b180b9757ada01b1f16371cb1e72b7518962d01 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_static.o index f76e40366436c8df05e3218a36337abe31fb87b0..db6ad90f2713767dfa28f84ae0dba5a3b2c5e62f 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-24/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-24/arch-x86_64/usr/lib64/libEGL.so index eea5e82b6dea2d0d3e84f590d99340130c799d2b..b29471497ae6718044a7c427e96a7a55dd11213c 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-24/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv1_CM.so index edf16f4d027b29f100aa9f52e8ac22f6531db420..2d89e95ae3ea1ea138671abf5c0ad3526ef8d09e 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv2.so index 5fd9d0aa56dfc3093d0ae9f8993abfa0ea90b974..69786e614b071b85ad6b7fb2a9b9d3624383040a 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv3.so index 2e4f7d40780d9b49192ee511fd59c7d32e7aceea..14edfe671a4b2178e889ee5f082c417dccc44a34 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-24/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-24/arch-x86_64/usr/lib64/libOpenMAXAL.so index 2792b23f0b2a69840b570b6dc4eb2e407195facb..c741795b344e62877b4a57d30acfc949d58e8612 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-24/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-24/arch-x86_64/usr/lib64/libOpenSLES.so index 8d854ab1b763078fb77cc5b0291d540abe826a5b..054368e04c05f6ea45c065ad9d75f7dff5e62e82 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-24/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-24/arch-x86_64/usr/lib64/libandroid.so index 8a224946b2a0d43aad4cb9f35f66ae3d9125607f..e81abea8f3703fa58fafe4057c1abbd68895ebb7 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-24/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libc.a b/platforms/android-24/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libc.a and b/platforms/android-24/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libc.so b/platforms/android-24/arch-x86_64/usr/lib64/libc.so index 86c69adf26c88d3d688d66e03c5e553586b74bdf..3bc75ddb201af735edbeb0be3ba86e5e2c5c3d98 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libc.so and b/platforms/android-24/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libcamera2ndk.so b/platforms/android-24/arch-x86_64/usr/lib64/libcamera2ndk.so index 3c33451c2cfadaddc303ff58d9365413bd24c7c7..ae563fd3379929d1e303ff303cfd09b6afa9d9f6 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libcamera2ndk.so and b/platforms/android-24/arch-x86_64/usr/lib64/libcamera2ndk.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-24/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-24/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libdl.a b/platforms/android-24/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-24/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libdl.so b/platforms/android-24/arch-x86_64/usr/lib64/libdl.so index e474ae3220991105bff627c34c0c8a3279ffa951..fc1c4d7527928c8cf7f08750b99eb31e446e8975 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-24/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-24/arch-x86_64/usr/lib64/libjnigraphics.so index 324f47a4b8f030f516488277da64e3104c874b70..1b69835d06394f9cdd880b655042e30e6682fd0b 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-24/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/liblog.so b/platforms/android-24/arch-x86_64/usr/lib64/liblog.so index b1cd8444156619187c8df985b6c001186d1f93f2..5990dfd54ca07cf666cbb275a8e1fb1291a35dd6 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-24/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libm.a b/platforms/android-24/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libm.a and b/platforms/android-24/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libm.so b/platforms/android-24/arch-x86_64/usr/lib64/libm.so index a877078e330ac8514b3b731baddb26150c107bda..02604fb52a216c8abb1472361b536bc8dbf0327f 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libm.so and b/platforms/android-24/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-24/arch-x86_64/usr/lib64/libmediandk.so index 5551636badcdb008fa1ba70c1e1c2cc2b9162b56..e2b5dba5fc7143ba386ac74ac2da47391bbc37a3 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-24/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.so index 7088a82b01442587c02b437f10b03222b4f7da48..ff7a48097221369e5795e814c01b2b8219d16496 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-24/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libvulkan.so b/platforms/android-24/arch-x86_64/usr/lib64/libvulkan.so index d451c865389270761d59b32de21bbdc3fd852d74..227c039f2371d53f3f393ac414c2447606783b43 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libvulkan.so and b/platforms/android-24/arch-x86_64/usr/lib64/libvulkan.so differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libz.a b/platforms/android-24/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libz.a and b/platforms/android-24/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-24/arch-x86_64/usr/lib64/libz.so b/platforms/android-24/arch-x86_64/usr/lib64/libz.so index e4adc4a780597f4067a73a2640a8826a633bfe07..0b5bb02cdcc527ef02b0ade1479a812cf492bc63 100755 Binary files a/platforms/android-24/arch-x86_64/usr/lib64/libz.so and b/platforms/android-24/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-26/arch-arm/usr/lib/crtbegin_dynamic.o index 88d2b75dcd5ca7b43d2f87acad2fa230af827596..24b4670326c090d75d429d2e327dfb3c0059ab22 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-26/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-26/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-26/arch-arm/usr/lib/crtbegin_so.o index 0e256631bd91a9c3d83fcb06f3417ed9d10c8cac..e137a9bea4a6b21fe5a53ef437b43308483b208a 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-26/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-26/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-26/arch-arm/usr/lib/crtbegin_static.o index 88d2b75dcd5ca7b43d2f87acad2fa230af827596..24b4670326c090d75d429d2e327dfb3c0059ab22 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-26/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-26/arch-arm/usr/lib/libEGL.so b/platforms/android-26/arch-arm/usr/lib/libEGL.so index 0f20c91d9e8554f23d88c8289fbdbec3ab75c9eb..2992b23b0bc9a8ba53e09def1118a785d9c7ec15 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libEGL.so and b/platforms/android-26/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-26/arch-arm/usr/lib/libGLESv1_CM.so index 8b39db412d7f435e80df770ceea9186eca719476..b04ee3d0d4305d4a5a252a027380b51baf9fc4fc 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-26/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libGLESv2.so b/platforms/android-26/arch-arm/usr/lib/libGLESv2.so index bca71260eff585d3042058eaafb7f2bafe60323e..268bbff93e511cd0ebe18b7beeec89c5e266ca32 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-26/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libGLESv3.so b/platforms/android-26/arch-arm/usr/lib/libGLESv3.so index 89a98b89c58413257f031d0b4bdb4d7d17fbd897..5631e5dea10ca51db6ebc274398311d617ed8d98 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-26/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-26/arch-arm/usr/lib/libOpenMAXAL.so index 6be7780eeab6b39a5f2df16af88b62e3becfc020..4fa9911f060bb36fa463d0335d43666b2635fb5e 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-26/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-26/arch-arm/usr/lib/libOpenSLES.so index 9e573dc58d76741153b3ba53046dabc0074ab892..4ea10bd7b773b577c761e08c1ed42ef9d8cb8547 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-26/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libaaudio.so b/platforms/android-26/arch-arm/usr/lib/libaaudio.so index 27985c0512c0d0e75b6f66cebe8262201ee96eab..29745d77daa39f2526c3c97c7349555fcd09968f 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libaaudio.so and b/platforms/android-26/arch-arm/usr/lib/libaaudio.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libandroid.so b/platforms/android-26/arch-arm/usr/lib/libandroid.so index 1788d3e698db97b001b317786c4f02dbaa209219..0acc4c707860de9d79ae447691c68dd9d9e729de 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libandroid.so and b/platforms/android-26/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libc.a b/platforms/android-26/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libc.a and b/platforms/android-26/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libc.so b/platforms/android-26/arch-arm/usr/lib/libc.so index 5b565fa768fb58f7c2f879f862f24b9c73179b83..361e2f59e2bb19f3125b4bf8ec857115a9855863 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libc.so and b/platforms/android-26/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libcamera2ndk.so b/platforms/android-26/arch-arm/usr/lib/libcamera2ndk.so index c12e719c089fa2c7a6ff094a8dc3d8f97aba0ff8..7d637ca56b04d5245c9edf27bb06b76c058c4ecc 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libcamera2ndk.so and b/platforms/android-26/arch-arm/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-26/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-26/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libdl.a b/platforms/android-26/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libdl.a and b/platforms/android-26/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libdl.so b/platforms/android-26/arch-arm/usr/lib/libdl.so index 28a94f776e76d1c855b68714c49fe05824b3b01c..c8adabb0bd7cd9e3a9015948b1a2f6d5dc80420b 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libdl.so and b/platforms/android-26/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-26/arch-arm/usr/lib/libjnigraphics.so index c4f4506e10f5c0c2f0cf2bd1f91c91447f94a02e..d277b1a8aa41006b8c157bacd7d3fbe97cd033f8 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-26/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/liblog.so b/platforms/android-26/arch-arm/usr/lib/liblog.so index 77b58ad31f5632860e6c7b9845455d7b22394edb..df9478441f19f617359eabe6d1435a5a2b7503f1 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/liblog.so and b/platforms/android-26/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libm.a b/platforms/android-26/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libm.a and b/platforms/android-26/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libm.so b/platforms/android-26/arch-arm/usr/lib/libm.so index be9b80062be7fca5ff82c40c5cf3d92ddb91308c..8ae6bb1d9f01649396deddde85e71e3f88d526af 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libm.so and b/platforms/android-26/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libmediandk.so b/platforms/android-26/arch-arm/usr/lib/libmediandk.so index 3178dadfcfaac3137674826ee59f573dfe3b647c..b548492f92e0a513330368bedbe9720ce9b47ec5 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libmediandk.so and b/platforms/android-26/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libnativewindow.so b/platforms/android-26/arch-arm/usr/lib/libnativewindow.so index f35c722ca2e84af0e1b5a2f6e476e69579cddaee..6a1299c3ba4d71fc8e84ac0f073276d9927de5b1 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libnativewindow.so and b/platforms/android-26/arch-arm/usr/lib/libnativewindow.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libstdc++.a b/platforms/android-26/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libstdc++.a and b/platforms/android-26/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libstdc++.so b/platforms/android-26/arch-arm/usr/lib/libstdc++.so index f47106fc97a07746c730a83cea64f91afef52fa0..b51c5c67416415fb22741a4940d5ffc267965518 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libstdc++.so and b/platforms/android-26/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libsync.so b/platforms/android-26/arch-arm/usr/lib/libsync.so index 39a818be4e0603d3d45a6209bd086796eabdd213..dd86a6a2543a4bd193391d89f1cb02caed4afa2d 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libsync.so and b/platforms/android-26/arch-arm/usr/lib/libsync.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libvulkan.so b/platforms/android-26/arch-arm/usr/lib/libvulkan.so index 3979840b8f1fb5806704bd453ee80bf2029b9d26..6df3822895e2de6bcd6d967c7d295ace12cdf220 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libvulkan.so and b/platforms/android-26/arch-arm/usr/lib/libvulkan.so differ diff --git a/platforms/android-26/arch-arm/usr/lib/libz.a b/platforms/android-26/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-26/arch-arm/usr/lib/libz.a and b/platforms/android-26/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-26/arch-arm/usr/lib/libz.so b/platforms/android-26/arch-arm/usr/lib/libz.so index 77ce13dc4058293ae3b3b9b92bdcf7eec10d3dbb..674cd969911de7da1aa74a08547fb7974c014f06 100755 Binary files a/platforms/android-26/arch-arm/usr/lib/libz.so and b/platforms/android-26/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-26/arch-arm64/usr/lib/crtbegin_dynamic.o index 09488aa7f668e67e1aa4a950138b9f29a9d8ca40..b189ef4aa5be2bcd54b0b23e9905ff30aecfde62 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-26/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-26/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-26/arch-arm64/usr/lib/crtbegin_so.o index 9ecd9df4b3725adbc432677949465a21b6e421a3..1033373756feda079178602698d85bc8abb9a49e 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-26/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-26/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-26/arch-arm64/usr/lib/crtbegin_static.o index 95bc125000bdd74a42c374f27813db9acf5177b9..688e068da86f6c64470798afd348702cf2cb0bd0 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-26/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-26/arch-arm64/usr/lib/crtend_android.o b/platforms/android-26/arch-arm64/usr/lib/crtend_android.o index d36634d2b2361b5a2350b83207826f640c11b854..eb48ce2a3dc006eaf490840d9df4e26cbfc8ad04 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-26/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libEGL.so b/platforms/android-26/arch-arm64/usr/lib/libEGL.so index d7d7f1febcd9e9a000babcb2a23a19db85897868..3298574efc1c1170b96011a2e0496c06b2274f1e 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libEGL.so and b/platforms/android-26/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-26/arch-arm64/usr/lib/libGLESv1_CM.so index 33f929ce52ea5ce791aecf9e66ca067a2b074f6d..1330bf378398352da1439fc98e5bc27d6c8417c4 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-26/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-26/arch-arm64/usr/lib/libGLESv2.so index 0c900053da0e1d67904bca6bee0c3829d0548b89..74c21616d3ea28d3138cf52c0b8a8a4ff9c8e7a7 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-26/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-26/arch-arm64/usr/lib/libGLESv3.so index 7a2106d179d8ed4f8a9c93ecf2ff4adf2a1d6580..777d3f6f28908e4bfd2479f4c16d4355cb6ab94e 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-26/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-26/arch-arm64/usr/lib/libOpenMAXAL.so index 967cd959b08b352e96c7281c21ab2e0d63a40fc8..c1bd3bfbd8d411b3ae7a950a02eb475269e26e80 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-26/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-26/arch-arm64/usr/lib/libOpenSLES.so index 44567e5387e085ae02181e1a94eac65ab6449c76..2f66755760e0def92c1c0aec01f43c81f03f32b5 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-26/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libaaudio.so b/platforms/android-26/arch-arm64/usr/lib/libaaudio.so index 54b7cacca130ae0614cb1795a718dab7340f1237..34f650ffb99f0415e7e6518a1ec8becc055d241f 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libaaudio.so and b/platforms/android-26/arch-arm64/usr/lib/libaaudio.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libandroid.so b/platforms/android-26/arch-arm64/usr/lib/libandroid.so index 6141f6bc9a9cdbc9f4b8aaa0228df743f8b5186e..e04c59394e96e34bcb3032d78a9dbd5691e56748 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libandroid.so and b/platforms/android-26/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libc.a b/platforms/android-26/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libc.a and b/platforms/android-26/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libc.so b/platforms/android-26/arch-arm64/usr/lib/libc.so index b3d204cd773de50c1a39122544a99a5f2f28fea1..0f3cf6fb30a991fd683de0f285f8616a09b7369d 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libc.so and b/platforms/android-26/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libcamera2ndk.so b/platforms/android-26/arch-arm64/usr/lib/libcamera2ndk.so index c8f2b1a19f420dab03ebb3d938a997e1f3dd2bcf..eeb9afe5c0614e13cac0c616e215e4f6fcdbca96 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libcamera2ndk.so and b/platforms/android-26/arch-arm64/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-26/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-26/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libdl.a b/platforms/android-26/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libdl.a and b/platforms/android-26/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libdl.so b/platforms/android-26/arch-arm64/usr/lib/libdl.so index d7ab19c572f5691ea37b0f5c9e0677534cd6c474..d005c6f8121ccf6ddb5a5e7c7fd454ad3ab99095 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libdl.so and b/platforms/android-26/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-26/arch-arm64/usr/lib/libjnigraphics.so index 59b0998ef5819bd566d0c6f8be3d20094e8c0dee..d14468a640c4ea2906d9a5e050a785678163d5c0 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-26/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/liblog.so b/platforms/android-26/arch-arm64/usr/lib/liblog.so index f1c1b969af002397cbff5ff25329e46a0efa275e..f0955c313255997d09d0deaa9e12375c9ebfd253 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/liblog.so and b/platforms/android-26/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libm.a b/platforms/android-26/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libm.a and b/platforms/android-26/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libm.so b/platforms/android-26/arch-arm64/usr/lib/libm.so index f71a1f59d780781fceddf502d097d2f649c8b6f2..df61ae560df1076ea2d27549b59c552852af41f2 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libm.so and b/platforms/android-26/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libmediandk.so b/platforms/android-26/arch-arm64/usr/lib/libmediandk.so index 2c383af753915907bd71b682742e64c98fa87344..4fa17d21dedb21b9915c0ab8a7baffe5422bbcf9 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-26/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libnativewindow.so b/platforms/android-26/arch-arm64/usr/lib/libnativewindow.so index 0f0fd0fee12afdac3bf455335a43a1d8c29c7f82..305b51a615ddeec9743879b4b40ca8c25ebc21ab 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libnativewindow.so and b/platforms/android-26/arch-arm64/usr/lib/libnativewindow.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libstdc++.a b/platforms/android-26/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-26/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libstdc++.so b/platforms/android-26/arch-arm64/usr/lib/libstdc++.so index 6fda97ee498b1cef0eb38154f102c2214c60c5e4..eadabb060dc507dfbd0b8bf68ac82117a076a823 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-26/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libsync.so b/platforms/android-26/arch-arm64/usr/lib/libsync.so index 96b486560580fb1641f56a531089f64d957829a8..5e78ef319e21f887a4090b8fef1938135df7ad90 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libsync.so and b/platforms/android-26/arch-arm64/usr/lib/libsync.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libvulkan.so b/platforms/android-26/arch-arm64/usr/lib/libvulkan.so index 8b7202fdd1f2df03d16be83739ba684d5c684d8a..e055289b8892b1efd3c6826a354c6de4d5925734 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libvulkan.so and b/platforms/android-26/arch-arm64/usr/lib/libvulkan.so differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libz.a b/platforms/android-26/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-26/arch-arm64/usr/lib/libz.a and b/platforms/android-26/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-26/arch-arm64/usr/lib/libz.so b/platforms/android-26/arch-arm64/usr/lib/libz.so index a0dab39d391765e48ce70a13e85e2a89ce993652..d8521995443f16e4b3ae83a763557e87797726d4 100755 Binary files a/platforms/android-26/arch-arm64/usr/lib/libz.so and b/platforms/android-26/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-26/arch-x86/usr/lib/crtbegin_dynamic.o index 9f65bc4e401b1143c1b1fcba5dd853aea7096a60..a68bef139d25ff2a4db117588fd5bc8ed2fd9125 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-26/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-26/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-26/arch-x86/usr/lib/crtbegin_so.o index 642f3a2c502d69dfe3deaf8e8b386b49e94671be..978d631c4748682a617d34c2ad0821977dfc673a 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-26/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-26/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-26/arch-x86/usr/lib/crtbegin_static.o index 9f65bc4e401b1143c1b1fcba5dd853aea7096a60..a68bef139d25ff2a4db117588fd5bc8ed2fd9125 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-26/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-26/arch-x86/usr/lib/libEGL.so b/platforms/android-26/arch-x86/usr/lib/libEGL.so index 4edfc580b9e07844541d115391c56e167622d540..e2f3231425a572f07259ed5fde29853188908d14 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libEGL.so and b/platforms/android-26/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-26/arch-x86/usr/lib/libGLESv1_CM.so index 79810adc145c6c0ec7d6dca4bd6c3e910b85e785..2a40e9346c7570f9e78b5c9f44fb17f9e4f28a5b 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-26/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libGLESv2.so b/platforms/android-26/arch-x86/usr/lib/libGLESv2.so index 691207c7a59d2f6a1cbeb820eeed10f2bac5a645..29280b575b55461fbcf63b8520320e936af9b351 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-26/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libGLESv3.so b/platforms/android-26/arch-x86/usr/lib/libGLESv3.so index 221aed2cb8c299ea426c0870f28d6a03287651be..2a0cb31801bd4a9fe5d0818f5f9809ae11e78e32 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-26/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-26/arch-x86/usr/lib/libOpenMAXAL.so index 01623ec8b8622dbc4816cccfea863674eb7390c9..2039426328825d14cc78e93da3188860370123d7 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-26/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so index af6277b7e67e4b1ba591a905252709fb51e1be98..b8a9a2ce355421b5258b699fd3730e759f30a773 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-26/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libaaudio.so b/platforms/android-26/arch-x86/usr/lib/libaaudio.so index 30545e7df853f7e1984df962dbcfcc6b003d1263..7614f61521ff6d5ef36500d5247a24318bb6c055 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libaaudio.so and b/platforms/android-26/arch-x86/usr/lib/libaaudio.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libandroid.so b/platforms/android-26/arch-x86/usr/lib/libandroid.so index 05eaefd6cea0f0abd29ffbd879f88270cbb19e44..74688ceede742066b75d3f1af5bdce98956f62a8 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libandroid.so and b/platforms/android-26/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libc.a b/platforms/android-26/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libc.a and b/platforms/android-26/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libc.so b/platforms/android-26/arch-x86/usr/lib/libc.so index eaa1e3ffb460d25d277cb908543a1201a8a17776..20b444866ae8e758d586c989632f9fcfcd7332f4 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libc.so and b/platforms/android-26/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libcamera2ndk.so b/platforms/android-26/arch-x86/usr/lib/libcamera2ndk.so index d228afe5f40df7a6d083ba60a75d9b34379074ce..59ad84d7e247d5cde065fa7333dbaa78a514166f 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libcamera2ndk.so and b/platforms/android-26/arch-x86/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-26/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-26/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libdl.a b/platforms/android-26/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libdl.a and b/platforms/android-26/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libdl.so b/platforms/android-26/arch-x86/usr/lib/libdl.so index 1c6f21841679909a1b592550713c05d2ccfcbcaf..91454457e14c012721301dbdcab86d37ed72717f 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libdl.so and b/platforms/android-26/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-26/arch-x86/usr/lib/libjnigraphics.so index efb59dc420115c3a3e42463fc7f28ac06cb9fb67..d440da52934a5f60911c534ac9eca6049bb56bf0 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-26/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/liblog.so b/platforms/android-26/arch-x86/usr/lib/liblog.so index 85cc8122eae012c6c560c2e9010c05876e4c63c3..814365f9dce1dba2d681bf7d034b3c5a4d7fb756 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/liblog.so and b/platforms/android-26/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libm.a b/platforms/android-26/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libm.a and b/platforms/android-26/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libm.so b/platforms/android-26/arch-x86/usr/lib/libm.so index 579f6ca61c7249eabd7d54f80f256901149e27cc..36311bed2196b82de1d2f7c36ea7bffdcbff27e3 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libm.so and b/platforms/android-26/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libmediandk.so b/platforms/android-26/arch-x86/usr/lib/libmediandk.so index 7494468a4db65169363a78bdeb149e09c6863cbd..711d08bce261fee7676964a7962a9528e170d9cc 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libmediandk.so and b/platforms/android-26/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libnativewindow.so b/platforms/android-26/arch-x86/usr/lib/libnativewindow.so index f9b5978e7f50a87a01c7f3ecf48ef9089ba828c0..d59e28693c433db51a14133243def56aff91215d 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libnativewindow.so and b/platforms/android-26/arch-x86/usr/lib/libnativewindow.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libstdc++.a b/platforms/android-26/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libstdc++.a and b/platforms/android-26/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libstdc++.so b/platforms/android-26/arch-x86/usr/lib/libstdc++.so index a716405d7bbfce6605778f807e5e1c3e806d265e..c8f25c92e44f27e5d8fef3b3ed395a22fec46363 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libstdc++.so and b/platforms/android-26/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libsync.so b/platforms/android-26/arch-x86/usr/lib/libsync.so index 741bf0e3440058a8820aeffc8a9682fa47b49c07..7999c60bc91335bb3c798ad3ace0baf378146afc 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libsync.so and b/platforms/android-26/arch-x86/usr/lib/libsync.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libvulkan.so b/platforms/android-26/arch-x86/usr/lib/libvulkan.so index cab203d1cabb2c86e35fd4c67a99e38f1028be63..fb4a9874cbdf3aa60e56c721ace6af9bf964b2f4 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libvulkan.so and b/platforms/android-26/arch-x86/usr/lib/libvulkan.so differ diff --git a/platforms/android-26/arch-x86/usr/lib/libz.a b/platforms/android-26/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-26/arch-x86/usr/lib/libz.a and b/platforms/android-26/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-26/arch-x86/usr/lib/libz.so b/platforms/android-26/arch-x86/usr/lib/libz.so index 6b49065ef9405200a94556ee43d5817bf4529381..d608fe0f341e5bf6eeb65d656fb32193dc5f9824 100755 Binary files a/platforms/android-26/arch-x86/usr/lib/libz.so and b/platforms/android-26/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_dynamic.o index a428561eb964bb6bcd5b7940d85dbf79d95a5b9b..a18b7ce512152add8d2764a0b518d408212437b3 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_so.o index 259a16f846fb9e0d206893192aaf0889c277bc2b..66d145e240009e5c51223de89c60eda33cdcd4d5 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_static.o index a428561eb964bb6bcd5b7940d85dbf79d95a5b9b..a18b7ce512152add8d2764a0b518d408212437b3 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-26/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-26/arch-x86_64/usr/lib64/libEGL.so index 10fdc6c5d59d70529370268dc7d007748cc2dbf7..44a5c82b80551a74653c3ba8636b1be73f8a46bc 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-26/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv1_CM.so index 46bae47be1ac368db0e21c815e9d35c4f02b796c..d25b424201544411bd5b18cb5e0cd80818cfe274 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv2.so index 209cea79774782c2638bcce86d75192123e5851f..011e77eea3697e14291449186046cdf64d97f8a9 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv3.so index 29d4ad3459d960137ab434207dbfa681ade3af54..245af33ee3cf5aae9a065f4cfc8f9fc7b05838ba 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-26/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-26/arch-x86_64/usr/lib64/libOpenMAXAL.so index 48274e58287991bb5bac67d00700090f1ddb0f53..5e5b4be21e02f8e3e04c7795f9945255688c1477 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-26/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-26/arch-x86_64/usr/lib64/libOpenSLES.so index cb664c2e7ae1930349359400f35e7209ac283385..30ce600ca377f3816c55b1abc3ca2cfc48f05b02 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-26/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libaaudio.so b/platforms/android-26/arch-x86_64/usr/lib64/libaaudio.so index 5dac4e5dce8586484cbb4c428e73cec821cd135d..89c6be0f3f614089713de242edff0b35115c0ff5 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libaaudio.so and b/platforms/android-26/arch-x86_64/usr/lib64/libaaudio.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-26/arch-x86_64/usr/lib64/libandroid.so index 10cf1f12ae17d182690c3688f1bb5057186ff1b0..82d6daa1b71b3805162b4ce897e6404c135bcdbc 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-26/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libc.a b/platforms/android-26/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libc.a and b/platforms/android-26/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libc.so b/platforms/android-26/arch-x86_64/usr/lib64/libc.so index 543258016bea41f4848202a00d9e984ce93c5cdd..5d4bd3716d455d083cc9dd3bc2b22abad06bde11 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libc.so and b/platforms/android-26/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libcamera2ndk.so b/platforms/android-26/arch-x86_64/usr/lib64/libcamera2ndk.so index a95727bac3df66374cae67f8c59be99ffb939610..41fe097f64d9ba98e704b25c03a752fecdbf2bdd 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libcamera2ndk.so and b/platforms/android-26/arch-x86_64/usr/lib64/libcamera2ndk.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-26/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-26/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libdl.a b/platforms/android-26/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-26/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libdl.so b/platforms/android-26/arch-x86_64/usr/lib64/libdl.so index dd0db6b11e6f2615fa7bb05d8db80e71746bf2cc..21cd63926a84029121cb744292ad61149289d16c 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-26/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-26/arch-x86_64/usr/lib64/libjnigraphics.so index dbc28a45c74509f0717003cb19f2e367e8158a12..5a67e8302ff37566c7b9093489bfcd6dc3b9358c 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-26/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/liblog.so b/platforms/android-26/arch-x86_64/usr/lib64/liblog.so index 7db9e7982ae5fc6740d0c5fb6f0442e63296aa7b..0c4e32108258490e6e5433997e1b589310e75005 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-26/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libm.a b/platforms/android-26/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libm.a and b/platforms/android-26/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libm.so b/platforms/android-26/arch-x86_64/usr/lib64/libm.so index 31704af88d0ec2204c96b0321bb1d497ade9ddfe..5608211a56417a5658f206c8fd4a670be4b6684d 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libm.so and b/platforms/android-26/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-26/arch-x86_64/usr/lib64/libmediandk.so index 9eae8ab3d7e406d5086b40518b970e4cf103078f..53c479b10e753a0558c41d49685c67973bc6392e 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-26/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libnativewindow.so b/platforms/android-26/arch-x86_64/usr/lib64/libnativewindow.so index 9ace8f78fe96e589cfbe1219088c43687c742e1c..63d75f733bd7eaa3ad6f68eda8e105125396b5c8 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libnativewindow.so and b/platforms/android-26/arch-x86_64/usr/lib64/libnativewindow.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.so index 28feda2e4ee27c757b196a301b7cd355160bae28..67270b15106c719ab75d74a1c88b35e9bfe0baa6 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-26/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libsync.so b/platforms/android-26/arch-x86_64/usr/lib64/libsync.so index 9c0a9262ac03c2cd2fda67551b5869ec14ac8232..08bc2b1a78cb224de36ef2394bfb3506bf926a76 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libsync.so and b/platforms/android-26/arch-x86_64/usr/lib64/libsync.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libvulkan.so b/platforms/android-26/arch-x86_64/usr/lib64/libvulkan.so index 1a097580dfae98637a34e988e0ee27d95d1e4cc2..d49cdb7bf29b0645e6ae8f375e9c912a28c4c1d7 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libvulkan.so and b/platforms/android-26/arch-x86_64/usr/lib64/libvulkan.so differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libz.a b/platforms/android-26/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libz.a and b/platforms/android-26/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-26/arch-x86_64/usr/lib64/libz.so b/platforms/android-26/arch-x86_64/usr/lib64/libz.so index 70d1815523069aeffea97e8a12461df799a69194..dc8d22094c3920ddd528cb49c8878c917b959036 100755 Binary files a/platforms/android-26/arch-x86_64/usr/lib64/libz.so and b/platforms/android-26/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-27/arch-arm/usr/lib/crtbegin_dynamic.o index 158130a86f6558b4ab03d43ddfc72497b26dded7..186b80427808d38119cba73fa0ba23884e259c08 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-27/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-27/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-27/arch-arm/usr/lib/crtbegin_so.o index 475f2f4ae6248b4623bc3c1743da248a11dcc236..120bf633ff8d76c8cbed382c2e7d533bd368f4f7 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-27/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-27/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-27/arch-arm/usr/lib/crtbegin_static.o index 158130a86f6558b4ab03d43ddfc72497b26dded7..186b80427808d38119cba73fa0ba23884e259c08 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-27/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-27/arch-arm/usr/lib/libEGL.so b/platforms/android-27/arch-arm/usr/lib/libEGL.so index 47c7cdbc303929ad1df4505a8e9b0a53524c5a80..39f725bca8e864522e79b8e948a1761326ad18a4 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libEGL.so and b/platforms/android-27/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-27/arch-arm/usr/lib/libGLESv1_CM.so index aeeacab24a4ce71bded141f7677faeb4698b9b89..9a39984cb915df473ce666468b8807cff3495755 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-27/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libGLESv2.so b/platforms/android-27/arch-arm/usr/lib/libGLESv2.so index d8d830fde9825800a7adfaafb2def1292d572d32..0d90ae5725d7c5eddbd280b976d3159274285a74 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-27/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libGLESv3.so b/platforms/android-27/arch-arm/usr/lib/libGLESv3.so index 4eb41112de198ff493e3dc722a2a2cac3a32e559..f4d0039a51da0432e4de70ef4d9b6201d5671105 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-27/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-27/arch-arm/usr/lib/libOpenMAXAL.so index ffc0886fd27db0b57e3cbca887a45d367aabe299..70678d29563fdda85ac852d1d162e54742cc5e74 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-27/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-27/arch-arm/usr/lib/libOpenSLES.so index aac2d47552f4678e60917c3ab1ad0830a7f5ae2b..157bd7a45ce98accfd1d644ca77ab6e6b63a1b6a 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-27/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libaaudio.so b/platforms/android-27/arch-arm/usr/lib/libaaudio.so index 22a21781d17737621f516588e5ce5fe237b73c7f..75af7625f2ba1b5b76b9f4b1a492817c57d11f25 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libaaudio.so and b/platforms/android-27/arch-arm/usr/lib/libaaudio.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libandroid.so b/platforms/android-27/arch-arm/usr/lib/libandroid.so index 2792fbd006be5209ed3eb01db7e057a4859f0255..194b98b7108ae11fa1f69cec58280e4f5114ac4e 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libandroid.so and b/platforms/android-27/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libc.a b/platforms/android-27/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libc.a and b/platforms/android-27/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libc.so b/platforms/android-27/arch-arm/usr/lib/libc.so index 2b8fc96cc96c3e3fb0e599c9cd1bf336e8bfe274..c5f1915f2b94419a0b1e29e648f0afc57813bc08 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libc.so and b/platforms/android-27/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libcamera2ndk.so b/platforms/android-27/arch-arm/usr/lib/libcamera2ndk.so index 94cea4408e2cbba5a36c0172cf1dd8b6f3699fb2..dd9a2b248ee7670fa060738672e5f7a0658e9315 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libcamera2ndk.so and b/platforms/android-27/arch-arm/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-27/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-27/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libdl.a b/platforms/android-27/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libdl.a and b/platforms/android-27/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libdl.so b/platforms/android-27/arch-arm/usr/lib/libdl.so index 9a8cceb7e641b24ac545b38242ad0c3794f42f30..b742dcd8b1e871735d0f4ec7aad4ffc10d80ce34 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libdl.so and b/platforms/android-27/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-27/arch-arm/usr/lib/libjnigraphics.so index 32c5c13c8fdf5c9c779e3e04250f0de8f5502d64..e62efa0034aff734c465db85963533fd4d88564b 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-27/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/liblog.so b/platforms/android-27/arch-arm/usr/lib/liblog.so index 4db5771488bff461ab225801ac2958a5a34f4eb9..53cec7d427d63429c0c297d9a64c63b23a26673f 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/liblog.so and b/platforms/android-27/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libm.a b/platforms/android-27/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libm.a and b/platforms/android-27/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libm.so b/platforms/android-27/arch-arm/usr/lib/libm.so index 96f5d90ad0661c04b04c736713df57b65d804b35..5ec6014e65667172d0e08c124217d8ab2ec24cfd 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libm.so and b/platforms/android-27/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libmediandk.so b/platforms/android-27/arch-arm/usr/lib/libmediandk.so index 8cf2d74c4b7f4858718b3c144013149a010fcaad..1e0ce937442b15c5e4f3d5d73b26245e605da6e1 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libmediandk.so and b/platforms/android-27/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libnativewindow.so b/platforms/android-27/arch-arm/usr/lib/libnativewindow.so index db5081d99ffedcd15f23e3d12a96501d1d91da3b..247af4f132550ada283b840d06e669cfbe902591 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libnativewindow.so and b/platforms/android-27/arch-arm/usr/lib/libnativewindow.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libneuralnetworks.so b/platforms/android-27/arch-arm/usr/lib/libneuralnetworks.so index d38bdb8f1607c868dc688975f423b59cc1b5ab80..b26c5118b0c6dce24e325dfb3280b5ce585f7c3d 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libneuralnetworks.so and b/platforms/android-27/arch-arm/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libstdc++.a b/platforms/android-27/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libstdc++.a and b/platforms/android-27/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libstdc++.so b/platforms/android-27/arch-arm/usr/lib/libstdc++.so index 8c9e6aa19ca34227cf6dc94dcdb8be24fa123828..9241d66fc75189e47f55a27f363987b394a2a868 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libstdc++.so and b/platforms/android-27/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libsync.so b/platforms/android-27/arch-arm/usr/lib/libsync.so index 32efa85d65f1eca94a2be8c922fa27d28f90f43c..6001baf52425ed62f075939a328c4ac7e85e7b05 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libsync.so and b/platforms/android-27/arch-arm/usr/lib/libsync.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libvulkan.so b/platforms/android-27/arch-arm/usr/lib/libvulkan.so index 3752a74a9f09b115d01707615f33ed96cf3a4e37..59ed92e60503707e44744a121052d69e8d289f9e 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libvulkan.so and b/platforms/android-27/arch-arm/usr/lib/libvulkan.so differ diff --git a/platforms/android-27/arch-arm/usr/lib/libz.a b/platforms/android-27/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-27/arch-arm/usr/lib/libz.a and b/platforms/android-27/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-27/arch-arm/usr/lib/libz.so b/platforms/android-27/arch-arm/usr/lib/libz.so index 98babe96f469335018ae1297c0cfd359002f8d8f..06768b7ffa9ed256f3cf01ce9d88e041d682ee75 100755 Binary files a/platforms/android-27/arch-arm/usr/lib/libz.so and b/platforms/android-27/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-27/arch-arm64/usr/lib/crtbegin_dynamic.o index b955d590d09e8c1150f4b96d39620033740031a3..215c2f240a011fce1ad3e10003e1d52555699823 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-27/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-27/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-27/arch-arm64/usr/lib/crtbegin_so.o index 0416bef9d35f926c8f64640d5a5b65ba54c643f3..9e7132710925df5f3ec14cc63a2176feaf9b71b1 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-27/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-27/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-27/arch-arm64/usr/lib/crtbegin_static.o index a1be2edced324ca13c55532f5ca6cf23a5605df3..ff495908d072f4c2799fccee6d6d4343f6986fcc 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-27/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-27/arch-arm64/usr/lib/crtend_android.o b/platforms/android-27/arch-arm64/usr/lib/crtend_android.o index 9868ec9b3a248b4e2c164f3f12d0e341cd95abde..6cea1b889e0c0cdaeb7c99dd52dc7d82562a67ea 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-27/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libEGL.so b/platforms/android-27/arch-arm64/usr/lib/libEGL.so index a1388e822f2dab444a5ff1d3ed11b27883393cfd..a1f848abb358054fa786a46c82ea52609f61dc72 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libEGL.so and b/platforms/android-27/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-27/arch-arm64/usr/lib/libGLESv1_CM.so index 8f3bcbb2854686b4a051f96daa64e7bb97702f94..ffac04d8d8ae19fb217be2add3270f29c12fee94 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-27/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-27/arch-arm64/usr/lib/libGLESv2.so index 2c4c881e184b1ddf170fa08cbd357d1731fcb51c..03ce944d1aec49801bf287eb8734e1072bd11ec4 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-27/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-27/arch-arm64/usr/lib/libGLESv3.so index 27e9c6ba161d9b15a211bdeabb15454d1003aebc..9b4508f14542e4fdc2f3fc0772ed0a5eaaabd805 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-27/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-27/arch-arm64/usr/lib/libOpenMAXAL.so index e9d440923380d5810baf5ea3c4b0b234a75a9728..1c395a5a0d6f63f599b0a14f795c5e7160a2fb0f 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-27/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-27/arch-arm64/usr/lib/libOpenSLES.so index cec36f3cebf298a9abe0d78fa65e2353b1baf2be..15fe13810094e9c76fe7bfd24bfe5c80ca9be54a 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-27/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libaaudio.so b/platforms/android-27/arch-arm64/usr/lib/libaaudio.so index a276bd5c10f870ecaacabeabfcb0266533f21e59..69d7bea73b6208294dbce4f5431068eff7c422e6 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libaaudio.so and b/platforms/android-27/arch-arm64/usr/lib/libaaudio.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libandroid.so b/platforms/android-27/arch-arm64/usr/lib/libandroid.so index 9d3c4b9aff4d237ee136459d78133991e364b479..18aec88a81a75ba73f877cd21500b0a89e4f766b 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libandroid.so and b/platforms/android-27/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libc.a b/platforms/android-27/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libc.a and b/platforms/android-27/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libc.so b/platforms/android-27/arch-arm64/usr/lib/libc.so index be45b0efc3011d5dd462f43961a13d551df5d3c0..c99c960acfa8191bb7dee30e054805ec80972414 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libc.so and b/platforms/android-27/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libcamera2ndk.so b/platforms/android-27/arch-arm64/usr/lib/libcamera2ndk.so index 1b1333440f0cbf561fe5b60fa3945e689bb8020b..d6d72b7f42ddf247242a95f58112d5588ea20cc3 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libcamera2ndk.so and b/platforms/android-27/arch-arm64/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-27/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-27/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libdl.a b/platforms/android-27/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libdl.a and b/platforms/android-27/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libdl.so b/platforms/android-27/arch-arm64/usr/lib/libdl.so index 66a3ce4575ef81fa483d6ad95044b118951023f0..4d176eed6a33148eb7384a4bd203edfae9d6b054 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libdl.so and b/platforms/android-27/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-27/arch-arm64/usr/lib/libjnigraphics.so index 133099d7594ac845908512547a8dbb8b16e8fa2d..5489ce18f792a0442cc3e1fcb3eee8674a2f627f 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-27/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/liblog.so b/platforms/android-27/arch-arm64/usr/lib/liblog.so index 91590d9d2992a4f96045c0dca7663ad7b26909f1..2c4296bcb8433fb539f385dfa40c19ada7b13ff8 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/liblog.so and b/platforms/android-27/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libm.a b/platforms/android-27/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libm.a and b/platforms/android-27/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libm.so b/platforms/android-27/arch-arm64/usr/lib/libm.so index fa6ec35a82856bc8b481ad48bff3df0b77673463..58b8f0c0c07d08a18160eeffafbf9a90dd9fa7a3 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libm.so and b/platforms/android-27/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libmediandk.so b/platforms/android-27/arch-arm64/usr/lib/libmediandk.so index 71584a09836b7cedf037843a527f4165c569d8c3..eb0393ebb0aa815cad9be0ccc18a05f751694acd 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-27/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libnativewindow.so b/platforms/android-27/arch-arm64/usr/lib/libnativewindow.so index 38e1476f4f5105d5f39e0ac78e18871f775db5f5..6ef693bd73582aa96a98b1c478d01d7537cbf458 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libnativewindow.so and b/platforms/android-27/arch-arm64/usr/lib/libnativewindow.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libneuralnetworks.so b/platforms/android-27/arch-arm64/usr/lib/libneuralnetworks.so index ea574a514dc8aa42fcd33557c55c7038b4d4dd78..5cc075e9f9e8810e6d63d663ef2841bc8933afe4 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libneuralnetworks.so and b/platforms/android-27/arch-arm64/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libstdc++.a b/platforms/android-27/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-27/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libstdc++.so b/platforms/android-27/arch-arm64/usr/lib/libstdc++.so index f91a67f15458dc9cb71ca9d8bcf5c82a1def7a7b..9b616cf465019224972035fe09776bf0aade06b5 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-27/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libsync.so b/platforms/android-27/arch-arm64/usr/lib/libsync.so index 49426048f6248f75f701abb631dd35ae97f54c29..3e27879dcb4f9584fa1aacec81e7292cfb562a34 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libsync.so and b/platforms/android-27/arch-arm64/usr/lib/libsync.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libvulkan.so b/platforms/android-27/arch-arm64/usr/lib/libvulkan.so index c2151dceead97dd492c723da79c4576b2e49a990..7ea8a5b0887a1422c289347b7c316c5eae436dc4 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libvulkan.so and b/platforms/android-27/arch-arm64/usr/lib/libvulkan.so differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libz.a b/platforms/android-27/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-27/arch-arm64/usr/lib/libz.a and b/platforms/android-27/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-27/arch-arm64/usr/lib/libz.so b/platforms/android-27/arch-arm64/usr/lib/libz.so index a234e381361df69aa394e9f70f587ab20efef662..88cac02b68d41cb2358c0ad6071f756d37e4582c 100755 Binary files a/platforms/android-27/arch-arm64/usr/lib/libz.so and b/platforms/android-27/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-27/arch-x86/usr/lib/crtbegin_dynamic.o index 0d6f6e0c62697bbf228209328a40cdab66258e3c..3919349621dfd07985864975776ea11f270b1baf 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-27/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-27/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-27/arch-x86/usr/lib/crtbegin_so.o index 3ea0adc56c382b5a16e0c4f8f63092abf0441659..1d2d1e6da4ef9492a00a00cd79c342c59371bd7d 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-27/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-27/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-27/arch-x86/usr/lib/crtbegin_static.o index 0d6f6e0c62697bbf228209328a40cdab66258e3c..3919349621dfd07985864975776ea11f270b1baf 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-27/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-27/arch-x86/usr/lib/libEGL.so b/platforms/android-27/arch-x86/usr/lib/libEGL.so index da0298ed92894e29afdeabb61db9d472ce53f3e8..14503876c7763d90102251bd7e1db0d2185335c4 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libEGL.so and b/platforms/android-27/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-27/arch-x86/usr/lib/libGLESv1_CM.so index 2b9aaa4bad72c34fe436c107a17565457a8d6508..aa1565fb9f81ec2971ce17f51f73709d4a714479 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-27/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libGLESv2.so b/platforms/android-27/arch-x86/usr/lib/libGLESv2.so index 345dffe5a01e26979e2deba13e9f998125a246e2..5c7c154ed762c13beedcfa363ae3617690c621c1 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-27/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libGLESv3.so b/platforms/android-27/arch-x86/usr/lib/libGLESv3.so index 7d704fc9bf57d841e88a5905de3aca1d0826883a..3e04bee27779003d133d7509cfbd2a41f4b5f2aa 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-27/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-27/arch-x86/usr/lib/libOpenMAXAL.so index 7d525b2689d38fae4333431ae8637a9fe8bd3205..6b1e03ea0f2f6aae0e078fb717e0c5885074bb8c 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-27/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-27/arch-x86/usr/lib/libOpenSLES.so index 8498ef6a8c931eefbfb9cd0909bce8cf553fff65..c71653f783efde22d7d470f9fa8375719301dfb5 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-27/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libaaudio.so b/platforms/android-27/arch-x86/usr/lib/libaaudio.so index e82250c9ae802507c58862ef8bad9c10bcc1a676..6440f9bb9da84ab5591ef731b97c305a24f49658 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libaaudio.so and b/platforms/android-27/arch-x86/usr/lib/libaaudio.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libandroid.so b/platforms/android-27/arch-x86/usr/lib/libandroid.so index 8d6ffe1177cbec55e3acf279cf07419730e60d9c..5706c5bf19aa9ea16092dcb2758e6645c21cf19b 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libandroid.so and b/platforms/android-27/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libc.a b/platforms/android-27/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libc.a and b/platforms/android-27/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libc.so b/platforms/android-27/arch-x86/usr/lib/libc.so index 61208c726d70cfbba606a301761bdc2fc9ed211d..90994133195cc728cae399686f722ade0b788562 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libc.so and b/platforms/android-27/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libcamera2ndk.so b/platforms/android-27/arch-x86/usr/lib/libcamera2ndk.so index 44bda0c29826e5a03f9da2a33d32d032cb326759..296f02e95f8b9767393b077fcaa51cd6cfcadf81 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libcamera2ndk.so and b/platforms/android-27/arch-x86/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-27/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-27/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libdl.a b/platforms/android-27/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libdl.a and b/platforms/android-27/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libdl.so b/platforms/android-27/arch-x86/usr/lib/libdl.so index cf0fe23eb53af6f563e943431dc6ee36147c362d..49aa9501d2331ef5e70a68d2cd31cb5dc641923f 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libdl.so and b/platforms/android-27/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-27/arch-x86/usr/lib/libjnigraphics.so index 36db113828c996651bcf3f35327ebc82e0f226c8..ab48a7b2b17bc47cef9e0a3b7867030149b89442 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-27/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/liblog.so b/platforms/android-27/arch-x86/usr/lib/liblog.so index 20357479dc561e978e2350b58b8f1d97d7c2d8ba..8ed6f9eda2fb101e0efce4cdb20607a513e1f377 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/liblog.so and b/platforms/android-27/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libm.a b/platforms/android-27/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libm.a and b/platforms/android-27/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libm.so b/platforms/android-27/arch-x86/usr/lib/libm.so index c3d55a956168bcbff6b849d306b366e77d6e80f2..cdcd415b502acbacaa0faca679939b99b64eb86d 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libm.so and b/platforms/android-27/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libmediandk.so b/platforms/android-27/arch-x86/usr/lib/libmediandk.so index 1405d9c379e5d92dd7ca33d3f8f3d6cd3d6caf4d..776ff4ab0963c91ddff209e7dfe437644fb19a6b 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libmediandk.so and b/platforms/android-27/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libnativewindow.so b/platforms/android-27/arch-x86/usr/lib/libnativewindow.so index dc29eafc21857f60f7754c2e739a3ec766ba4ced..52163c2292dad4eed18e44050fd73a8d0bededb2 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libnativewindow.so and b/platforms/android-27/arch-x86/usr/lib/libnativewindow.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libneuralnetworks.so b/platforms/android-27/arch-x86/usr/lib/libneuralnetworks.so index 5d662afea7104eff70b88d2e461fe9e5e1e73cd9..06eadf8e519461fc9c2d6068468d9cd162af7246 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libneuralnetworks.so and b/platforms/android-27/arch-x86/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libstdc++.a b/platforms/android-27/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libstdc++.a and b/platforms/android-27/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libstdc++.so b/platforms/android-27/arch-x86/usr/lib/libstdc++.so index 73a94da38b8e6ddc62cf241ae79e23f0a85577ae..d5b73184a13cd9a5dc467f6157f312dc88aa1234 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libstdc++.so and b/platforms/android-27/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libsync.so b/platforms/android-27/arch-x86/usr/lib/libsync.so index ba1499296e52fcf43c43ac05a153ac353a967a53..783c56793573285da4fdc1bb37e16dc7718e33e3 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libsync.so and b/platforms/android-27/arch-x86/usr/lib/libsync.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libvulkan.so b/platforms/android-27/arch-x86/usr/lib/libvulkan.so index 42d2b1f72eb27867a31c9439a76aafcbf6535c39..6b8c0a66d2a5454865172c4e74eabf315e391cb2 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libvulkan.so and b/platforms/android-27/arch-x86/usr/lib/libvulkan.so differ diff --git a/platforms/android-27/arch-x86/usr/lib/libz.a b/platforms/android-27/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-27/arch-x86/usr/lib/libz.a and b/platforms/android-27/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-27/arch-x86/usr/lib/libz.so b/platforms/android-27/arch-x86/usr/lib/libz.so index c36350edbac635ef7e882da7a3866cb4e65aeb49..f52fc5a40932a3c822e243eb88fb0951f1826cbf 100755 Binary files a/platforms/android-27/arch-x86/usr/lib/libz.so and b/platforms/android-27/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_dynamic.o index d857b29d5de82041f0e38cf91bdaabe79a594d6c..52f6ae7ba5e49e20393e22f25ffd285294324dab 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_so.o index eeb84197ad54afbf55bd2ac6103ecdf097b04dfd..7e24b49aa7aa9a78d84a29191985d81bcf52d260 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_static.o index d857b29d5de82041f0e38cf91bdaabe79a594d6c..52f6ae7ba5e49e20393e22f25ffd285294324dab 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-27/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-27/arch-x86_64/usr/lib64/libEGL.so index 3854dd20cf45badda531443f149a4b7b0bf6ab56..220725f514889c9e03aaf3aaf75cabe0683bc6c3 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-27/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv1_CM.so index e160c2c9a9380587688a85f0dcca82f4fb8f1ddb..225edd0c66d6e9c70b56a537d607c4b610e8277a 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv2.so index ef280a69dbab43717e70dfaeafe444bd1a27b065..0549024f03eb70e17cbea6c4e80023bf546b2673 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv3.so index 326b3ce06a21a421bec4eb50572933062f34dd00..6970948729ec0caaa0438724a9ede9ff028734b0 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-27/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-27/arch-x86_64/usr/lib64/libOpenMAXAL.so index e3d3946ff9ec2468841b5166170d89262cc5abf1..68aa07d7061b5c4e55d7a3377ac72b1e9007735f 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-27/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-27/arch-x86_64/usr/lib64/libOpenSLES.so index e3695d0fa98f834d5fd4a4ccda13a77016a63c68..0a7d29045e55be3b925bde3ea03360cf0a1d4677 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-27/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libaaudio.so b/platforms/android-27/arch-x86_64/usr/lib64/libaaudio.so index 62c64f515d5adde91ff7fc4ad27a3afae6d81ab5..8bec0415616bb03fd5b0368ac7803e96a7609db4 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libaaudio.so and b/platforms/android-27/arch-x86_64/usr/lib64/libaaudio.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-27/arch-x86_64/usr/lib64/libandroid.so index 679edbb95d004799372c74bad25d29906bd36aa5..7cb1bcc2a2431d4bb186ad80bed2c17927bd33ce 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-27/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libc.a b/platforms/android-27/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libc.a and b/platforms/android-27/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libc.so b/platforms/android-27/arch-x86_64/usr/lib64/libc.so index ee60e6fec63f55b85e9431dd13969c21e4e1a4aa..cf06b80802a77337551c0ef22a2b55dcac04fb2f 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libc.so and b/platforms/android-27/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libcamera2ndk.so b/platforms/android-27/arch-x86_64/usr/lib64/libcamera2ndk.so index ec4b7f30175a9d5c3f77fd6cc413f36f0200d5a3..c0c6b3d3643a384193f3c5e8df3238fd5faf62af 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libcamera2ndk.so and b/platforms/android-27/arch-x86_64/usr/lib64/libcamera2ndk.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-27/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-27/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libdl.a b/platforms/android-27/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-27/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libdl.so b/platforms/android-27/arch-x86_64/usr/lib64/libdl.so index 6dbd1f665b9aa95426d07ac7beaeab8d1797e134..defcc3dbcd84fdebc0f5ede8d412c129e82cc3ac 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-27/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-27/arch-x86_64/usr/lib64/libjnigraphics.so index 4e29c325da667f28d33c8fd9b515e01b2717ab63..bd510062e8321e3f6116c6a500b58e39f658780b 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-27/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/liblog.so b/platforms/android-27/arch-x86_64/usr/lib64/liblog.so index 1bceeb06b9cb1e54b3e751598ce3b0407f4b28ec..3889af7d7e4e2a9618d4aed05a21fcc49e9d766e 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-27/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libm.a b/platforms/android-27/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libm.a and b/platforms/android-27/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libm.so b/platforms/android-27/arch-x86_64/usr/lib64/libm.so index 009105f471bf45deba5776f6c49008c7ca16f3e1..ec8192090706b764ce50e2f44f1faa6bacad6e59 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libm.so and b/platforms/android-27/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-27/arch-x86_64/usr/lib64/libmediandk.so index 0eb884eb5707230c279ce879599839268ec15fdf..ba4a93d1ad99a4b3025fb7a4abd2865d2b35c56f 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-27/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libnativewindow.so b/platforms/android-27/arch-x86_64/usr/lib64/libnativewindow.so index e18159129d9d3908c53560c86ccfc94fa473d26e..e3b5ced2e8b60bd195e4a3fb4e978ca6a628528c 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libnativewindow.so and b/platforms/android-27/arch-x86_64/usr/lib64/libnativewindow.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libneuralnetworks.so b/platforms/android-27/arch-x86_64/usr/lib64/libneuralnetworks.so index ce6134b6fdf6e19ef0f6a9b7c172b345a14a0335..c64b66b5732ad76759170a35820c318055d3a3a2 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libneuralnetworks.so and b/platforms/android-27/arch-x86_64/usr/lib64/libneuralnetworks.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.so index b049d7ec134a19c88dbdbc5a5b82fdaf0c1e9e3c..f990ba3ed47db799f44b1963fc646bab13e18674 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-27/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libsync.so b/platforms/android-27/arch-x86_64/usr/lib64/libsync.so index 1acf969f9fce6a375b0ec0f9f17e61d7e75f5c4e..98ba4252bf77d36d02254f9fe8a4d4d091d78ed2 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libsync.so and b/platforms/android-27/arch-x86_64/usr/lib64/libsync.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libvulkan.so b/platforms/android-27/arch-x86_64/usr/lib64/libvulkan.so index 998564dbb8447053eaa1fcbf9c6b4679612287ca..4d633ba29438ffe510a4f3a3f864e8bf0b5ab4df 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libvulkan.so and b/platforms/android-27/arch-x86_64/usr/lib64/libvulkan.so differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libz.a b/platforms/android-27/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libz.a and b/platforms/android-27/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-27/arch-x86_64/usr/lib64/libz.so b/platforms/android-27/arch-x86_64/usr/lib64/libz.so index 14ef4eb170b2d5b63492246a952972293f73c602..79e265c806e22d6a52481c47898a27edb6c54588 100755 Binary files a/platforms/android-27/arch-x86_64/usr/lib64/libz.so and b/platforms/android-27/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o b/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o index 050ab2f07e9112130ff99d5fd0d4678f0f225a6f..867ce8b8de589a2a4116f78843b5655cfb8ca662 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o and b/platforms/android-28/arch-arm/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-28/arch-arm/usr/lib/crtbegin_so.o b/platforms/android-28/arch-arm/usr/lib/crtbegin_so.o index 02fc32b40d218bbd3d5de6d7fab5227fb6a447ed..34342300751b2f7e486c6fbe4fb2052b4f339cb1 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/crtbegin_so.o and b/platforms/android-28/arch-arm/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-28/arch-arm/usr/lib/crtbegin_static.o b/platforms/android-28/arch-arm/usr/lib/crtbegin_static.o index 050ab2f07e9112130ff99d5fd0d4678f0f225a6f..867ce8b8de589a2a4116f78843b5655cfb8ca662 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/crtbegin_static.o and b/platforms/android-28/arch-arm/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-28/arch-arm/usr/lib/libEGL.so b/platforms/android-28/arch-arm/usr/lib/libEGL.so index 59e25d0a5c7255505e4625a926ea031d46f6d15d..346ce6c372ab8b1c87519deb75adb5fcf8569e4b 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libEGL.so and b/platforms/android-28/arch-arm/usr/lib/libEGL.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libGLESv1_CM.so b/platforms/android-28/arch-arm/usr/lib/libGLESv1_CM.so index 630d4dbe14bd4a6ad50ab0e3759fdfd11d456590..981f7271041badb24f85ddc36a98e41e1376ecba 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libGLESv1_CM.so and b/platforms/android-28/arch-arm/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libGLESv2.so b/platforms/android-28/arch-arm/usr/lib/libGLESv2.so index b9883c52818c82bd8517b23b2f8f3f6e6143469e..16df4f1d6957c202b142eddf82ed446405380998 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libGLESv2.so and b/platforms/android-28/arch-arm/usr/lib/libGLESv2.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libGLESv3.so b/platforms/android-28/arch-arm/usr/lib/libGLESv3.so index 3a7b92da5bf48346c72f06e67664171360f9672e..008f304a1093b4f63f3d14db78c30656b4720b03 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libGLESv3.so and b/platforms/android-28/arch-arm/usr/lib/libGLESv3.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libOpenMAXAL.so b/platforms/android-28/arch-arm/usr/lib/libOpenMAXAL.so index 76f03cb9b18ef72708fee899ca384beb2a6f85aa..185884536f47d6ae7833cfbc7d3853f4ca779583 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libOpenMAXAL.so and b/platforms/android-28/arch-arm/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libOpenSLES.so b/platforms/android-28/arch-arm/usr/lib/libOpenSLES.so index 28b81f6a599c44c39c2ebd5983e8eb69e5cf5e6d..b6b1f4c29d380fe2982db75243bc11097c4f2ac9 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libOpenSLES.so and b/platforms/android-28/arch-arm/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libaaudio.so b/platforms/android-28/arch-arm/usr/lib/libaaudio.so index 5cd46b4159c627bc4ae53929716f4b57720922d3..d53293787e9109094a810b87e14378dc7919280a 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libaaudio.so and b/platforms/android-28/arch-arm/usr/lib/libaaudio.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libandroid.so b/platforms/android-28/arch-arm/usr/lib/libandroid.so index 06ecf05c4dec392c465e3fa02b07655a49b08050..da90373e1dbf8d4e8cd56ebdead24936cf00db3d 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libandroid.so and b/platforms/android-28/arch-arm/usr/lib/libandroid.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libc.a b/platforms/android-28/arch-arm/usr/lib/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libc.a and b/platforms/android-28/arch-arm/usr/lib/libc.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libc.so b/platforms/android-28/arch-arm/usr/lib/libc.so index 1cebcef2d7f3877d9b338c043a3ef09a155ffa63..0e9f003b2024840bead7545053e511f44ae53140 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libc.so and b/platforms/android-28/arch-arm/usr/lib/libc.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libcamera2ndk.so b/platforms/android-28/arch-arm/usr/lib/libcamera2ndk.so index 7d0fd98a68ebcb51027b838c13a402a1015d591b..1e258d795da1086b7741896c9d08141a4b569a28 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libcamera2ndk.so and b/platforms/android-28/arch-arm/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libcompiler_rt-extras.a b/platforms/android-28/arch-arm/usr/lib/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libcompiler_rt-extras.a and b/platforms/android-28/arch-arm/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libdl.a b/platforms/android-28/arch-arm/usr/lib/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libdl.a and b/platforms/android-28/arch-arm/usr/lib/libdl.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libdl.so b/platforms/android-28/arch-arm/usr/lib/libdl.so index 30c0ebe5ca3441935d4e11e864bb06a4fdff3967..97c44c53b6a243c8beeb4b859ac8345636fde87a 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libdl.so and b/platforms/android-28/arch-arm/usr/lib/libdl.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libjnigraphics.so b/platforms/android-28/arch-arm/usr/lib/libjnigraphics.so index d96bd989cccab54ae1f5da48afdbc0318bfadaf9..0b3d96de04490cd4a0ed9a53534b91564bbfcbe8 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libjnigraphics.so and b/platforms/android-28/arch-arm/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/liblog.so b/platforms/android-28/arch-arm/usr/lib/liblog.so index 4c402daa71fe9ff2afc60fc22dd1702ace6a7624..ab897f1bd07e024dec2536fabce5781375adf0b0 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/liblog.so and b/platforms/android-28/arch-arm/usr/lib/liblog.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libm.a b/platforms/android-28/arch-arm/usr/lib/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libm.a and b/platforms/android-28/arch-arm/usr/lib/libm.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libm.so b/platforms/android-28/arch-arm/usr/lib/libm.so index 7b5c45e7d95e146e689823619adb97291dcc2c71..03bbd71650b6bd77a38b19e5af074609af2efe90 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libm.so and b/platforms/android-28/arch-arm/usr/lib/libm.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libmediandk.so b/platforms/android-28/arch-arm/usr/lib/libmediandk.so index 2ff80e4260d94b07b368eca895e8df35e9e32174..449592a43c96f4a0f04ebd2375baa72bbff06d79 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libmediandk.so and b/platforms/android-28/arch-arm/usr/lib/libmediandk.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libnativewindow.so b/platforms/android-28/arch-arm/usr/lib/libnativewindow.so index 569a0a63678012947073e35145e5d423ef7df448..f0d0ce63609e416d76800f744adb989ec322914b 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libnativewindow.so and b/platforms/android-28/arch-arm/usr/lib/libnativewindow.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libneuralnetworks.so b/platforms/android-28/arch-arm/usr/lib/libneuralnetworks.so index ff824faaf7b5366370af84cb787e7673f60b7ccc..549e6467f4a6071de1a5fd2ce171fabd8424bc6a 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libneuralnetworks.so and b/platforms/android-28/arch-arm/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libstdc++.a b/platforms/android-28/arch-arm/usr/lib/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libstdc++.a and b/platforms/android-28/arch-arm/usr/lib/libstdc++.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libstdc++.so b/platforms/android-28/arch-arm/usr/lib/libstdc++.so index e5bfd3c4d67f4e1bd13b83eab9f19cf42c566ba8..9efc073ed51730062ba59f327c45f76ea3fff3f1 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libstdc++.so and b/platforms/android-28/arch-arm/usr/lib/libstdc++.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libsync.so b/platforms/android-28/arch-arm/usr/lib/libsync.so index 18674bb12c33d4921b322afef75acc6ff118c9eb..6d4f8a199b488a30578c52c9463d05ca85fa3594 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libsync.so and b/platforms/android-28/arch-arm/usr/lib/libsync.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libvulkan.so b/platforms/android-28/arch-arm/usr/lib/libvulkan.so index 5a547657ed84344421a4f27e8c42e7f518517b83..535a92275f623fa5fd1521eeb9d4276457a082e2 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libvulkan.so and b/platforms/android-28/arch-arm/usr/lib/libvulkan.so differ diff --git a/platforms/android-28/arch-arm/usr/lib/libz.a b/platforms/android-28/arch-arm/usr/lib/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/platforms/android-28/arch-arm/usr/lib/libz.a and b/platforms/android-28/arch-arm/usr/lib/libz.a differ diff --git a/platforms/android-28/arch-arm/usr/lib/libz.so b/platforms/android-28/arch-arm/usr/lib/libz.so index 27e5e42930b29c95fc980e5e5dee667b9376b8b7..c291078988be1c01c3831741b12aa78cd084e57e 100755 Binary files a/platforms/android-28/arch-arm/usr/lib/libz.so and b/platforms/android-28/arch-arm/usr/lib/libz.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/crtbegin_dynamic.o b/platforms/android-28/arch-arm64/usr/lib/crtbegin_dynamic.o index ff40774e4dab7b2204a329d29d9de4bfb7b27537..6dbc1cfb6f5b7f045c2df31a29c14d90300e75ec 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/crtbegin_dynamic.o and b/platforms/android-28/arch-arm64/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-28/arch-arm64/usr/lib/crtbegin_so.o b/platforms/android-28/arch-arm64/usr/lib/crtbegin_so.o index 71cb43bfcf90e43fc0266fc1f63d4db0446fcc86..400c68072e94c89c5f7feca7eb15d321f442e754 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/crtbegin_so.o and b/platforms/android-28/arch-arm64/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-28/arch-arm64/usr/lib/crtbegin_static.o b/platforms/android-28/arch-arm64/usr/lib/crtbegin_static.o index d9da2b6c5eb84d3644f93a15f19345b77ef27c5f..32b9a8aad15150255248f91358d25b752a7e4bd3 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/crtbegin_static.o and b/platforms/android-28/arch-arm64/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-28/arch-arm64/usr/lib/crtend_android.o b/platforms/android-28/arch-arm64/usr/lib/crtend_android.o index 15e2bc47e6ed0aea6071d9b155c2d332614d5cd4..4f12e97e4cf0a84da15739327fa1a93e8be23dad 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/crtend_android.o and b/platforms/android-28/arch-arm64/usr/lib/crtend_android.o differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libEGL.so b/platforms/android-28/arch-arm64/usr/lib/libEGL.so index 797b0b5ac9c97641fd40b68f006666d2ccfeb781..20ad9acca104aa82ba4780c4e71f814c406d8c5a 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libEGL.so and b/platforms/android-28/arch-arm64/usr/lib/libEGL.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libGLESv1_CM.so b/platforms/android-28/arch-arm64/usr/lib/libGLESv1_CM.so index ed793437c24a4c0e5555094b0bb988e4002b4e51..3a48c46d5837e6b1eaeec00a21b2e005d6e209fa 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libGLESv1_CM.so and b/platforms/android-28/arch-arm64/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libGLESv2.so b/platforms/android-28/arch-arm64/usr/lib/libGLESv2.so index 8ca019477135cbaafa2aa78bb37177466a888019..bc20001d3446a5b3b7f050ad495f76a99bb3fbcd 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libGLESv2.so and b/platforms/android-28/arch-arm64/usr/lib/libGLESv2.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libGLESv3.so b/platforms/android-28/arch-arm64/usr/lib/libGLESv3.so index 56b5548382b60ab9bb5014b83f850a449722ae32..688597f6cf0e406704cb1965aecb4762b1e4eb23 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libGLESv3.so and b/platforms/android-28/arch-arm64/usr/lib/libGLESv3.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libOpenMAXAL.so b/platforms/android-28/arch-arm64/usr/lib/libOpenMAXAL.so index da4b9dff71b757d798374b37fa7f0efe6883c1fa..77494c7f46785e42119fe0d65e19eb03232b05ef 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libOpenMAXAL.so and b/platforms/android-28/arch-arm64/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libOpenSLES.so b/platforms/android-28/arch-arm64/usr/lib/libOpenSLES.so index f9b9510841d59c59cd6189336d2619378383ae2a..2f54f5c15063cddd04a019eddaa1e5b9c2db5859 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libOpenSLES.so and b/platforms/android-28/arch-arm64/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libaaudio.so b/platforms/android-28/arch-arm64/usr/lib/libaaudio.so index 164d6f0b9e653de242bd9630e392e4ef3048f405..be9b0ded6013fb917b798f16b831919f0da8870d 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libaaudio.so and b/platforms/android-28/arch-arm64/usr/lib/libaaudio.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libandroid.so b/platforms/android-28/arch-arm64/usr/lib/libandroid.so index 706cdbb0b372a0323fa6e021ad3d764009c0a616..a982773f1122caad8d46eb95f65eb141a66f7a9c 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libandroid.so and b/platforms/android-28/arch-arm64/usr/lib/libandroid.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libc.a b/platforms/android-28/arch-arm64/usr/lib/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libc.a and b/platforms/android-28/arch-arm64/usr/lib/libc.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libc.so b/platforms/android-28/arch-arm64/usr/lib/libc.so index c43622d398be0965b21ce68a4a74bceb58a13930..006febd435ae29a5649c216e84eae46812ac2223 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libc.so and b/platforms/android-28/arch-arm64/usr/lib/libc.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libcamera2ndk.so b/platforms/android-28/arch-arm64/usr/lib/libcamera2ndk.so index 4e1d6b6f2705b9609ef960630a83471e642965e0..34f0bb00f9e667c4e53c5f860d59f7d4f2c9970b 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libcamera2ndk.so and b/platforms/android-28/arch-arm64/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libcompiler_rt-extras.a b/platforms/android-28/arch-arm64/usr/lib/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libcompiler_rt-extras.a and b/platforms/android-28/arch-arm64/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libdl.a b/platforms/android-28/arch-arm64/usr/lib/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libdl.a and b/platforms/android-28/arch-arm64/usr/lib/libdl.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libdl.so b/platforms/android-28/arch-arm64/usr/lib/libdl.so index 5a8180d8d9ecb10728522e927abb7cf4642c3453..80ead20509c369e5d50962379cb34981726b652c 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libdl.so and b/platforms/android-28/arch-arm64/usr/lib/libdl.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libjnigraphics.so b/platforms/android-28/arch-arm64/usr/lib/libjnigraphics.so index 9da0772bc88d3c789c878c4d62e934dc46ca7d02..e94665f695edd879c3a2067ad15809f8d26ade3b 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libjnigraphics.so and b/platforms/android-28/arch-arm64/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/liblog.so b/platforms/android-28/arch-arm64/usr/lib/liblog.so index 6a76004daa022114e8a95bf1b8cf85fd6ba87d9f..bfcbc5a7f1c995bc2d8d5ff398cdbe0d19656f30 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/liblog.so and b/platforms/android-28/arch-arm64/usr/lib/liblog.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libm.a b/platforms/android-28/arch-arm64/usr/lib/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libm.a and b/platforms/android-28/arch-arm64/usr/lib/libm.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libm.so b/platforms/android-28/arch-arm64/usr/lib/libm.so index cab9f36b48c5f5ab3479ff3d7fdd6437f11c1e7a..6560abeb2b8c1427c00a9cd8237cec4f16e6e176 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libm.so and b/platforms/android-28/arch-arm64/usr/lib/libm.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libmediandk.so b/platforms/android-28/arch-arm64/usr/lib/libmediandk.so index bc8d85164beb5b7144a969971ecb6fa1047ab1b1..e4dadddaeb10917d69e4ab13a8938b2072cd97dd 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libmediandk.so and b/platforms/android-28/arch-arm64/usr/lib/libmediandk.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libnativewindow.so b/platforms/android-28/arch-arm64/usr/lib/libnativewindow.so index 9ff57d03bf782d8568eb396396e6d573e6cdaeda..7d702327b950e07571408d4959244815a99a57a5 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libnativewindow.so and b/platforms/android-28/arch-arm64/usr/lib/libnativewindow.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libneuralnetworks.so b/platforms/android-28/arch-arm64/usr/lib/libneuralnetworks.so index 1647eb4ba63f03e82223fa476d5326f01b89de1c..c64580b3a8e912321d5e22f6fc088a9c5902dc66 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libneuralnetworks.so and b/platforms/android-28/arch-arm64/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libstdc++.a b/platforms/android-28/arch-arm64/usr/lib/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libstdc++.a and b/platforms/android-28/arch-arm64/usr/lib/libstdc++.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libstdc++.so b/platforms/android-28/arch-arm64/usr/lib/libstdc++.so index 5e0633a0d87780ce185ea7f4c153b8c8413af151..18e3b5a7ebba562de2e926de895e86a01c9edcb0 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libstdc++.so and b/platforms/android-28/arch-arm64/usr/lib/libstdc++.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libsync.so b/platforms/android-28/arch-arm64/usr/lib/libsync.so index 5dee2eee614057b0eb16f4440ba2be5e06000a27..d0628c9735c7b027c57979e99a33c0503c13dec2 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libsync.so and b/platforms/android-28/arch-arm64/usr/lib/libsync.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libvulkan.so b/platforms/android-28/arch-arm64/usr/lib/libvulkan.so index e3a2c2d0f55ebc5b025613938a79d7f451e8ecb9..80db0b6d68adab7645e41b84026e70ba800e83aa 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libvulkan.so and b/platforms/android-28/arch-arm64/usr/lib/libvulkan.so differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libz.a b/platforms/android-28/arch-arm64/usr/lib/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/platforms/android-28/arch-arm64/usr/lib/libz.a and b/platforms/android-28/arch-arm64/usr/lib/libz.a differ diff --git a/platforms/android-28/arch-arm64/usr/lib/libz.so b/platforms/android-28/arch-arm64/usr/lib/libz.so index 72fe7832b78675aa9a62528c45e4e1c759b41792..93aea9a7d50962f18f6cdb5b152c426973cd3cb8 100755 Binary files a/platforms/android-28/arch-arm64/usr/lib/libz.so and b/platforms/android-28/arch-arm64/usr/lib/libz.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/crtbegin_dynamic.o b/platforms/android-28/arch-x86/usr/lib/crtbegin_dynamic.o index a0827b7b9cb99706af5174da58c535ac3bb2136b..c9cbf874275e03ed68fcbd47274536975c97739b 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/crtbegin_dynamic.o and b/platforms/android-28/arch-x86/usr/lib/crtbegin_dynamic.o differ diff --git a/platforms/android-28/arch-x86/usr/lib/crtbegin_so.o b/platforms/android-28/arch-x86/usr/lib/crtbegin_so.o index 33f544175ffbd2def27466eaad21ea3451d09b64..54c89814dbb5bc43fc342f6466324e96214d05ac 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/crtbegin_so.o and b/platforms/android-28/arch-x86/usr/lib/crtbegin_so.o differ diff --git a/platforms/android-28/arch-x86/usr/lib/crtbegin_static.o b/platforms/android-28/arch-x86/usr/lib/crtbegin_static.o index a0827b7b9cb99706af5174da58c535ac3bb2136b..c9cbf874275e03ed68fcbd47274536975c97739b 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/crtbegin_static.o and b/platforms/android-28/arch-x86/usr/lib/crtbegin_static.o differ diff --git a/platforms/android-28/arch-x86/usr/lib/libEGL.so b/platforms/android-28/arch-x86/usr/lib/libEGL.so index 090627a1570af681270adb3783d8b19e5b1d54ee..524cf45e1e529aa38a2eac131937d0519169cecb 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libEGL.so and b/platforms/android-28/arch-x86/usr/lib/libEGL.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libGLESv1_CM.so b/platforms/android-28/arch-x86/usr/lib/libGLESv1_CM.so index d10d2f16705fcc6cb50558a342bbf75ef36ae823..7fae43d26243cf588ff8fe29a2a7bc035c33d77f 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libGLESv1_CM.so and b/platforms/android-28/arch-x86/usr/lib/libGLESv1_CM.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libGLESv2.so b/platforms/android-28/arch-x86/usr/lib/libGLESv2.so index 0d7cac2ffcbb344aae19a6b2c7bc492ac10fb240..3637c53f57c391f44d919dbf296095bdfec3d772 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libGLESv2.so and b/platforms/android-28/arch-x86/usr/lib/libGLESv2.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libGLESv3.so b/platforms/android-28/arch-x86/usr/lib/libGLESv3.so index f5218c2b8e045c7c0d6b6d632d6171cf76ece5a9..613f19dc3faced3883407941733647887d8bb833 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libGLESv3.so and b/platforms/android-28/arch-x86/usr/lib/libGLESv3.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libOpenMAXAL.so b/platforms/android-28/arch-x86/usr/lib/libOpenMAXAL.so index 1600a751952b7c345fbf66543dfc06058ac24015..7775300e8bdf344650e40f87b7cb44cf9d7666cd 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libOpenMAXAL.so and b/platforms/android-28/arch-x86/usr/lib/libOpenMAXAL.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libOpenSLES.so b/platforms/android-28/arch-x86/usr/lib/libOpenSLES.so index 405cfc0f13e6a10757bb4f605cae496ebe6340c6..087a0c7891a3c3fa486531a039726f30f5b167ff 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libOpenSLES.so and b/platforms/android-28/arch-x86/usr/lib/libOpenSLES.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libaaudio.so b/platforms/android-28/arch-x86/usr/lib/libaaudio.so index 576d22aa9ed8c1dfda111050c9c929a2b91db858..bd538f940516f034718f5d9d024fe694999f5296 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libaaudio.so and b/platforms/android-28/arch-x86/usr/lib/libaaudio.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libandroid.so b/platforms/android-28/arch-x86/usr/lib/libandroid.so index 1d5c128d96eb34a5415ce1ffd614cfa1054376ed..fb153701c8b20e9390e7ec1be4491aa2e3901629 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libandroid.so and b/platforms/android-28/arch-x86/usr/lib/libandroid.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libc.a b/platforms/android-28/arch-x86/usr/lib/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libc.a and b/platforms/android-28/arch-x86/usr/lib/libc.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libc.so b/platforms/android-28/arch-x86/usr/lib/libc.so index fb36aac4a586fcc61089a48f199628e6a3efe730..ae97b4a34c9422f00dce0c4061847f6dfca5b69f 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libc.so and b/platforms/android-28/arch-x86/usr/lib/libc.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libcamera2ndk.so b/platforms/android-28/arch-x86/usr/lib/libcamera2ndk.so index a4c196539baa8a1ba566ef9b8af8772f5c4655e6..174950c3cf07c210447b7119ece5493700f9c94f 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libcamera2ndk.so and b/platforms/android-28/arch-x86/usr/lib/libcamera2ndk.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libcompiler_rt-extras.a b/platforms/android-28/arch-x86/usr/lib/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libcompiler_rt-extras.a and b/platforms/android-28/arch-x86/usr/lib/libcompiler_rt-extras.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libdl.a b/platforms/android-28/arch-x86/usr/lib/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libdl.a and b/platforms/android-28/arch-x86/usr/lib/libdl.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libdl.so b/platforms/android-28/arch-x86/usr/lib/libdl.so index 711246a3a66542086b19350ca98154a2e2b2eeec..e312e3fdc85932a1ed3b85ad03afff0d9301c13f 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libdl.so and b/platforms/android-28/arch-x86/usr/lib/libdl.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libjnigraphics.so b/platforms/android-28/arch-x86/usr/lib/libjnigraphics.so index 6cff87405a8bb54c4cb838f6ac389ce77e5cacee..8917da5785259a743d1efd1ce43fc906adc3c0e5 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libjnigraphics.so and b/platforms/android-28/arch-x86/usr/lib/libjnigraphics.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/liblog.so b/platforms/android-28/arch-x86/usr/lib/liblog.so index 83bf290334c9d205816a7fcab1bbd77d2cb9c225..9c5696d151ebb27d80abe60bde800dd1c027d024 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/liblog.so and b/platforms/android-28/arch-x86/usr/lib/liblog.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libm.a b/platforms/android-28/arch-x86/usr/lib/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libm.a and b/platforms/android-28/arch-x86/usr/lib/libm.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libm.so b/platforms/android-28/arch-x86/usr/lib/libm.so index b15d1ce05a88f95e85f7755c7d18dc4742e967c2..383d1d4df4c980721a10058cfb749ea861e58878 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libm.so and b/platforms/android-28/arch-x86/usr/lib/libm.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libmediandk.so b/platforms/android-28/arch-x86/usr/lib/libmediandk.so index 11933176a8871674b950b3649068e12bf61666d8..5d501ebf69e7910d2331de240c2bb199a5cf6ca5 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libmediandk.so and b/platforms/android-28/arch-x86/usr/lib/libmediandk.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libnativewindow.so b/platforms/android-28/arch-x86/usr/lib/libnativewindow.so index 48be880b7af9a10024564864f43501048252de9e..0e0df2a4b1910bb75eea84cdc17af227155e8473 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libnativewindow.so and b/platforms/android-28/arch-x86/usr/lib/libnativewindow.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libneuralnetworks.so b/platforms/android-28/arch-x86/usr/lib/libneuralnetworks.so index d2ea6ea87762fd31dd9560439165ecc2bff43444..90ac148f20bc5af636cf96617530a4bdbb06008d 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libneuralnetworks.so and b/platforms/android-28/arch-x86/usr/lib/libneuralnetworks.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libstdc++.a b/platforms/android-28/arch-x86/usr/lib/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libstdc++.a and b/platforms/android-28/arch-x86/usr/lib/libstdc++.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libstdc++.so b/platforms/android-28/arch-x86/usr/lib/libstdc++.so index a54932248c5c092a8f6f01dc8762531cf3f7c67b..0802501c40cf0b30cb95d977a994721b9988ae56 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libstdc++.so and b/platforms/android-28/arch-x86/usr/lib/libstdc++.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libsync.so b/platforms/android-28/arch-x86/usr/lib/libsync.so index e3dbae3bf25b8db7afa8313531baeba84d5ec8af..5fa23c367ecc9311241a734a81783dce471a5015 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libsync.so and b/platforms/android-28/arch-x86/usr/lib/libsync.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libvulkan.so b/platforms/android-28/arch-x86/usr/lib/libvulkan.so index ead5381b2d1b06a1f5d5aa24a8f6c23e0b4ba11e..8dff74546e02fd30d9e2f236f3c5387c92cbc816 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libvulkan.so and b/platforms/android-28/arch-x86/usr/lib/libvulkan.so differ diff --git a/platforms/android-28/arch-x86/usr/lib/libz.a b/platforms/android-28/arch-x86/usr/lib/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/platforms/android-28/arch-x86/usr/lib/libz.a and b/platforms/android-28/arch-x86/usr/lib/libz.a differ diff --git a/platforms/android-28/arch-x86/usr/lib/libz.so b/platforms/android-28/arch-x86/usr/lib/libz.so index b0e277fd6161138926e81ad80be9d07cafd002c8..bf5f9ad2f318c42d6aeb21d58bcf32130318ee89 100755 Binary files a/platforms/android-28/arch-x86/usr/lib/libz.so and b/platforms/android-28/arch-x86/usr/lib/libz.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_dynamic.o b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_dynamic.o index 123631773f6011179c74c1c570773c9e757992e9..4427fbde4b8be5378f08ac203b1b1817160b3682 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_dynamic.o and b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_dynamic.o differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_so.o b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_so.o index 11e59d6b2c70b03b9e8771726e225ac1f017d82d..5da574528b1fdc0532a0a441a75ae0a78835d2ca 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_so.o and b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_so.o differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_static.o b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_static.o index 123631773f6011179c74c1c570773c9e757992e9..4427fbde4b8be5378f08ac203b1b1817160b3682 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_static.o and b/platforms/android-28/arch-x86_64/usr/lib64/crtbegin_static.o differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libEGL.so b/platforms/android-28/arch-x86_64/usr/lib64/libEGL.so index aa068a3c2a3311996d26510fc39ea4de691e9be5..d5d3b8842bdee77a6fdc138c9bf502a646cc9f96 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libEGL.so and b/platforms/android-28/arch-x86_64/usr/lib64/libEGL.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv1_CM.so b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv1_CM.so index 3ac61f8fd50cc119a4541b6a02a7015155168b4f..12fc0f76ad18d62b5d5a31af73cad5cd39d73b65 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv1_CM.so and b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv1_CM.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv2.so b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv2.so index 18a70a6b1fd62466b9f97ba02584b4c38617f4b4..57f6abe0fe742da9e2704646a53010ca520a77d0 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv2.so and b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv2.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv3.so b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv3.so index 43aa2a8087bddf9e7f4d9d115a4a7d03b2898c9d..b18e981b4cf436778cd33575913c9b749c41c5dd 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libGLESv3.so and b/platforms/android-28/arch-x86_64/usr/lib64/libGLESv3.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libOpenMAXAL.so b/platforms/android-28/arch-x86_64/usr/lib64/libOpenMAXAL.so index f4efbb1f18d7d17eb9981aca9a452bf46df8ed44..d8287a9a208e95162a8bd7a7a159cecf8bd7ad1b 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libOpenMAXAL.so and b/platforms/android-28/arch-x86_64/usr/lib64/libOpenMAXAL.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libOpenSLES.so b/platforms/android-28/arch-x86_64/usr/lib64/libOpenSLES.so index 1c07325deb067c6264e261a6be200e20fbba3a87..e91ed03cad2984bf71519ba4030236bf3719dbb1 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libOpenSLES.so and b/platforms/android-28/arch-x86_64/usr/lib64/libOpenSLES.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libaaudio.so b/platforms/android-28/arch-x86_64/usr/lib64/libaaudio.so index 450b7af7d14bc528754095f25aebd5a933d5bee7..46abf9de731e5b0bc2c50254283dbc6ed5dd636a 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libaaudio.so and b/platforms/android-28/arch-x86_64/usr/lib64/libaaudio.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libandroid.so b/platforms/android-28/arch-x86_64/usr/lib64/libandroid.so index 275231ef1f6697842843e3afa5f8f7ef3ef71ee6..6c23b00c41f7d18893994f8ce143e62b7ce17a4e 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libandroid.so and b/platforms/android-28/arch-x86_64/usr/lib64/libandroid.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libc.a b/platforms/android-28/arch-x86_64/usr/lib64/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libc.a and b/platforms/android-28/arch-x86_64/usr/lib64/libc.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libc.so b/platforms/android-28/arch-x86_64/usr/lib64/libc.so index 44085b8e9ae1982cbfd9e36de3b4044f22a65746..c2833cf78de28cae31a6dcea1b91442aa6640858 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libc.so and b/platforms/android-28/arch-x86_64/usr/lib64/libc.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libcamera2ndk.so b/platforms/android-28/arch-x86_64/usr/lib64/libcamera2ndk.so index cc7f14775b2fcd5527f27c3225c5dac706e9a7c1..2ba99962699cf1ab34afdad83871a3d363758ab6 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libcamera2ndk.so and b/platforms/android-28/arch-x86_64/usr/lib64/libcamera2ndk.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libcompiler_rt-extras.a b/platforms/android-28/arch-x86_64/usr/lib64/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libcompiler_rt-extras.a and b/platforms/android-28/arch-x86_64/usr/lib64/libcompiler_rt-extras.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libdl.a b/platforms/android-28/arch-x86_64/usr/lib64/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libdl.a and b/platforms/android-28/arch-x86_64/usr/lib64/libdl.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libdl.so b/platforms/android-28/arch-x86_64/usr/lib64/libdl.so index 6946a26e3a7e7de534dc50ac63e77a517c9f1bfe..69594a26b4a8cad49a0988039ef505da5d3dc5bd 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libdl.so and b/platforms/android-28/arch-x86_64/usr/lib64/libdl.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libjnigraphics.so b/platforms/android-28/arch-x86_64/usr/lib64/libjnigraphics.so index 9ce7fcd2b876828d3da2fdb2900fc6aaf793064e..9b0395d224a45da5d97f20af045752f152bf7b72 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libjnigraphics.so and b/platforms/android-28/arch-x86_64/usr/lib64/libjnigraphics.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/liblog.so b/platforms/android-28/arch-x86_64/usr/lib64/liblog.so index 4020d8ac22062a47216e553bf13501aa9df33dd2..773244e76756456252121d73df306dde537c1b50 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/liblog.so and b/platforms/android-28/arch-x86_64/usr/lib64/liblog.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libm.a b/platforms/android-28/arch-x86_64/usr/lib64/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libm.a and b/platforms/android-28/arch-x86_64/usr/lib64/libm.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libm.so b/platforms/android-28/arch-x86_64/usr/lib64/libm.so index 7adb3b193606ffe96ca01888cf9db3930678fd4e..3d5715823a4329bcb8cb24f23e88db29d387cf14 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libm.so and b/platforms/android-28/arch-x86_64/usr/lib64/libm.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libmediandk.so b/platforms/android-28/arch-x86_64/usr/lib64/libmediandk.so index c1aa8b13cfaf87014f80b80ed7503fabd86ea1cc..9e97caf38dcd1520000b436a1ca6af9d49b97d09 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libmediandk.so and b/platforms/android-28/arch-x86_64/usr/lib64/libmediandk.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libnativewindow.so b/platforms/android-28/arch-x86_64/usr/lib64/libnativewindow.so index aa6ba37363bb24401cea5033b93fff18c4ee0b78..97fe24a9c3fba35ffe97d8d7da2abda3d6ae5381 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libnativewindow.so and b/platforms/android-28/arch-x86_64/usr/lib64/libnativewindow.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libneuralnetworks.so b/platforms/android-28/arch-x86_64/usr/lib64/libneuralnetworks.so index 395720deaec196478507f9d8594b72f54d24fae1..b38c5aab7dddfed2a8c694fdf4c1a4a006d14ed4 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libneuralnetworks.so and b/platforms/android-28/arch-x86_64/usr/lib64/libneuralnetworks.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.a b/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.a and b/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.so b/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.so index 9b1d0752d880bfbb12c9e54825a51962b98f514d..b145b9f1cafcdd8143d3e64fbdf93d719a260c1b 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.so and b/platforms/android-28/arch-x86_64/usr/lib64/libstdc++.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libsync.so b/platforms/android-28/arch-x86_64/usr/lib64/libsync.so index 08d2d4a1f77c6115066aa913e9cdf1e591321079..01fa6341dbb2831bce5447b061434edc9a8375ad 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libsync.so and b/platforms/android-28/arch-x86_64/usr/lib64/libsync.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libvulkan.so b/platforms/android-28/arch-x86_64/usr/lib64/libvulkan.so index 9c600e9d3813402f82085d4bf5be31e4e8874956..94418f27a35fb0a921cc445772c2ea7f6038e881 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libvulkan.so and b/platforms/android-28/arch-x86_64/usr/lib64/libvulkan.so differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libz.a b/platforms/android-28/arch-x86_64/usr/lib64/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libz.a and b/platforms/android-28/arch-x86_64/usr/lib64/libz.a differ diff --git a/platforms/android-28/arch-x86_64/usr/lib64/libz.so b/platforms/android-28/arch-x86_64/usr/lib64/libz.so index a27338a00cbd522e0b2b1e85173469a356bef8be..41fd210abcfa46ddab2441986aa6d52d84980725 100755 Binary files a/platforms/android-28/arch-x86_64/usr/lib64/libz.so and b/platforms/android-28/arch-x86_64/usr/lib64/libz.so differ diff --git a/platforms/repo.prop b/platforms/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/platforms/repo.prop +++ b/platforms/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/android-arm/gdbserver/repo.prop b/prebuilt/android-arm/gdbserver/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/prebuilt/android-arm/gdbserver/repo.prop +++ b/prebuilt/android-arm/gdbserver/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/android-arm64/gdbserver/repo.prop b/prebuilt/android-arm64/gdbserver/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/prebuilt/android-arm64/gdbserver/repo.prop +++ b/prebuilt/android-arm64/gdbserver/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/android-x86/gdbserver/repo.prop b/prebuilt/android-x86/gdbserver/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/prebuilt/android-x86/gdbserver/repo.prop +++ b/prebuilt/android-x86/gdbserver/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/android-x86_64/gdbserver/repo.prop b/prebuilt/android-x86_64/gdbserver/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/prebuilt/android-x86_64/gdbserver/repo.prop +++ b/prebuilt/android-x86_64/gdbserver/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/linux-x86_64/bin/gdb-orig b/prebuilt/linux-x86_64/bin/gdb-orig index ca3fc886d902c514e275811e490d13327423633f..c4d7ce5f0f1aef5dd67b8b26f8d96fdee74ffe7c 100755 Binary files a/prebuilt/linux-x86_64/bin/gdb-orig and b/prebuilt/linux-x86_64/bin/gdb-orig differ diff --git a/prebuilt/linux-x86_64/bin/python b/prebuilt/linux-x86_64/bin/python deleted file mode 120000 index 551ab2685850339ef0f79468bc2c3b836e4efed4..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/bin/python +++ /dev/null @@ -1 +0,0 @@ -python2 \ No newline at end of file diff --git a/prebuilt/linux-x86_64/bin/python b/prebuilt/linux-x86_64/bin/python new file mode 100755 index 0000000000000000000000000000000000000000..bd277e3cd6fe04d222d113b43be36610bb3c896d Binary files /dev/null and b/prebuilt/linux-x86_64/bin/python differ diff --git a/prebuilt/linux-x86_64/bin/python-config b/prebuilt/linux-x86_64/bin/python-config deleted file mode 120000 index 758027fd4c712fe14e0bad20754e6b8001adfe1d..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/bin/python-config +++ /dev/null @@ -1 +0,0 @@ -python2-config \ No newline at end of file diff --git a/prebuilt/linux-x86_64/bin/python-config b/prebuilt/linux-x86_64/bin/python-config new file mode 100755 index 0000000000000000000000000000000000000000..6afae328eb8222bc89c547318b8ba5146b147b38 --- /dev/null +++ b/prebuilt/linux-x86_64/bin/python-config @@ -0,0 +1,57 @@ +#!/buildbot/src/android/ndk-release-r17/out/python/linux-x86_64/install/host-tools/bin/python2.7 + +import sys +import os +import getopt +from distutils import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'help'] + +def exit_with_usage(code=1): + print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], + '|'.join('--'+opt for opt in valid_opts)) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print sysconfig.PREFIX + + elif opt == '--exec-prefix': + print sysconfig.EXEC_PREFIX + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_python_inc(), + '-I' + sysconfig.get_python_inc(plat_specific=True)] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print ' '.join(flags) + + elif opt in ('--libs', '--ldflags'): + libs = getvar('LIBS').split() + getvar('SYSLIBS').split() + libs.append('-lpython'+pyver) + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + if not getvar('PYTHONFRAMEWORK'): + libs.extend(getvar('LINKFORSHARED').split()) + print ' '.join(libs) + diff --git a/prebuilt/linux-x86_64/bin/python2 b/prebuilt/linux-x86_64/bin/python2 deleted file mode 120000 index 8f7a3c1a341ce978ee130b5c8ce67342c40d0394..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/bin/python2 +++ /dev/null @@ -1 +0,0 @@ -python2.7 \ No newline at end of file diff --git a/prebuilt/linux-x86_64/bin/python2 b/prebuilt/linux-x86_64/bin/python2 new file mode 100755 index 0000000000000000000000000000000000000000..bd277e3cd6fe04d222d113b43be36610bb3c896d Binary files /dev/null and b/prebuilt/linux-x86_64/bin/python2 differ diff --git a/prebuilt/linux-x86_64/bin/python2-config b/prebuilt/linux-x86_64/bin/python2-config deleted file mode 120000 index 785f36f753dab019ec01a48042faf2910fa0bfdb..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/bin/python2-config +++ /dev/null @@ -1 +0,0 @@ -python2.7-config \ No newline at end of file diff --git a/prebuilt/linux-x86_64/bin/python2-config b/prebuilt/linux-x86_64/bin/python2-config new file mode 100755 index 0000000000000000000000000000000000000000..6afae328eb8222bc89c547318b8ba5146b147b38 --- /dev/null +++ b/prebuilt/linux-x86_64/bin/python2-config @@ -0,0 +1,57 @@ +#!/buildbot/src/android/ndk-release-r17/out/python/linux-x86_64/install/host-tools/bin/python2.7 + +import sys +import os +import getopt +from distutils import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'help'] + +def exit_with_usage(code=1): + print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], + '|'.join('--'+opt for opt in valid_opts)) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print sysconfig.PREFIX + + elif opt == '--exec-prefix': + print sysconfig.EXEC_PREFIX + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_python_inc(), + '-I' + sysconfig.get_python_inc(plat_specific=True)] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print ' '.join(flags) + + elif opt in ('--libs', '--ldflags'): + libs = getvar('LIBS').split() + getvar('SYSLIBS').split() + libs.append('-lpython'+pyver) + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + if not getvar('PYTHONFRAMEWORK'): + libs.extend(getvar('LINKFORSHARED').split()) + print ' '.join(libs) + diff --git a/prebuilt/linux-x86_64/bin/python2.7 b/prebuilt/linux-x86_64/bin/python2.7 index dc9317bb6ac9accceb342c71c56d464bb4e09538..bd277e3cd6fe04d222d113b43be36610bb3c896d 100755 Binary files a/prebuilt/linux-x86_64/bin/python2.7 and b/prebuilt/linux-x86_64/bin/python2.7 differ diff --git a/prebuilt/linux-x86_64/bin/yasm b/prebuilt/linux-x86_64/bin/yasm index b0185b2ede5a09ee0f3b9eb3f5630e99b0182809..c7c90c9201c990429656909473af3eea73e0aba9 100755 Binary files a/prebuilt/linux-x86_64/bin/yasm and b/prebuilt/linux-x86_64/bin/yasm differ diff --git a/prebuilt/linux-x86_64/lib/libpython2.7.a b/prebuilt/linux-x86_64/lib/libpython2.7.a index 9cc328107f5878c705543a75fbcafb62a349efb7..bc1a130a3778a7dfaaa0d096df1cb61a1fe517a8 100755 Binary files a/prebuilt/linux-x86_64/lib/libpython2.7.a and b/prebuilt/linux-x86_64/lib/libpython2.7.a differ diff --git a/prebuilt/linux-x86_64/lib/pkgconfig/python.pc b/prebuilt/linux-x86_64/lib/pkgconfig/python.pc deleted file mode 120000 index b7dff7fa58c88fe1924991d5ed1ce7a50bce9f7c..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/lib/pkgconfig/python.pc +++ /dev/null @@ -1 +0,0 @@ -python2.pc \ No newline at end of file diff --git a/prebuilt/linux-x86_64/lib/pkgconfig/python.pc b/prebuilt/linux-x86_64/lib/pkgconfig/python.pc new file mode 100644 index 0000000000000000000000000000000000000000..2da65a4fc486f5f97509637d4919906e7f056662 --- /dev/null +++ b/prebuilt/linux-x86_64/lib/pkgconfig/python.pc @@ -0,0 +1,13 @@ +prefix=/buildbot/src/android/ndk-release-r17/out/python/linux-x86_64/install/host-tools +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Python library +Requires: +Version: 2.7 +Libs.private: -lpthread -ldl -lutil +Libs: -L${libdir} -lpython2.7 +Cflags: -I${includedir}/python2.7 + diff --git a/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc b/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc deleted file mode 120000 index b5ac60ce5221ec100003780e7b6e063178a7e764..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc +++ /dev/null @@ -1 +0,0 @@ -python-2.7.pc \ No newline at end of file diff --git a/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc b/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc new file mode 100644 index 0000000000000000000000000000000000000000..2da65a4fc486f5f97509637d4919906e7f056662 --- /dev/null +++ b/prebuilt/linux-x86_64/lib/pkgconfig/python2.pc @@ -0,0 +1,13 @@ +prefix=/buildbot/src/android/ndk-release-r17/out/python/linux-x86_64/install/host-tools +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Python +Description: Python library +Requires: +Version: 2.7 +Libs.private: -lpthread -ldl -lutil +Libs: -L${libdir} -lpython2.7 +Cflags: -I${includedir}/python2.7 + diff --git a/prebuilt/linux-x86_64/lib/python2.7/config/libpython2.7.a b/prebuilt/linux-x86_64/lib/python2.7/config/libpython2.7.a index 20bebfc72f3dceee959261053f3b0b80d7920326..96a04252d35f60dfaf9287ec9231d02b787a1342 100644 Binary files a/prebuilt/linux-x86_64/lib/python2.7/config/libpython2.7.a and b/prebuilt/linux-x86_64/lib/python2.7/config/libpython2.7.a differ diff --git a/prebuilt/linux-x86_64/lib/python2.7/lib2to3/Grammar2.7.5.final.0.pickle b/prebuilt/linux-x86_64/lib/python2.7/lib2to3/Grammar2.7.5.final.0.pickle index e366b9740da9cddc368d548d0e72f9f9d300edf1..ed6e187a020a9bdbf102b88c0349e38a604aedf2 100644 Binary files a/prebuilt/linux-x86_64/lib/python2.7/lib2to3/Grammar2.7.5.final.0.pickle and b/prebuilt/linux-x86_64/lib/python2.7/lib2to3/Grammar2.7.5.final.0.pickle differ diff --git a/prebuilt/linux-x86_64/repo.prop b/prebuilt/linux-x86_64/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/prebuilt/linux-x86_64/repo.prop +++ b/prebuilt/linux-x86_64/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/prebuilt/linux-x86_64/share/man/man1/python.1 b/prebuilt/linux-x86_64/share/man/man1/python.1 deleted file mode 120000 index 822d62f92bdcbae8ce022087e35f1c9b644fa039..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/share/man/man1/python.1 +++ /dev/null @@ -1 +0,0 @@ -python2.1 \ No newline at end of file diff --git a/prebuilt/linux-x86_64/share/man/man1/python.1 b/prebuilt/linux-x86_64/share/man/man1/python.1 new file mode 100644 index 0000000000000000000000000000000000000000..39edbca1e067e8c6b6dbe24ad8745c71079dfdb3 --- /dev/null +++ b/prebuilt/linux-x86_64/share/man/man1/python.1 @@ -0,0 +1,473 @@ +.TH PYTHON "1" "$Date$" + +.\" To view this file while editing, run it through groff: +.\" groff -Tascii -man python.man | less + +.SH NAME +python \- an interpreted, interactive, object-oriented programming language +.SH SYNOPSIS +.B python +[ +.B \-B +] +[ +.B \-d +] +[ +.B \-E +] +[ +.B \-h +] +[ +.B \-i +] +[ +.B \-m +.I module-name +] +.br + [ +.B \-O +] +[ +.B \-OO +] +[ +.B \-R +] +[ +.B -Q +.I argument +] +[ +.B \-s +] +[ +.B \-S +] +[ +.B \-t +] +[ +.B \-u +] +.br + [ +.B \-v +] +[ +.B \-V +] +[ +.B \-W +.I argument +] +[ +.B \-x +] +[ +.B \-3 +] +[ +.B \-? +] +.br + [ +.B \-c +.I command +| +.I script +| +\- +] +[ +.I arguments +] +.SH DESCRIPTION +Python is an interpreted, interactive, object-oriented programming +language that combines remarkable power with very clear syntax. +For an introduction to programming in Python you are referred to the +Python Tutorial. +The Python Library Reference documents built-in and standard types, +constants, functions and modules. +Finally, the Python Reference Manual describes the syntax and +semantics of the core language in (perhaps too) much detail. +(These documents may be located via the +.B "INTERNET RESOURCES" +below; they may be installed on your system as well.) +.PP +Python's basic power can be extended with your own modules written in +C or C++. +On most systems such modules may be dynamically loaded. +Python is also adaptable as an extension language for existing +applications. +See the internal documentation for hints. +.PP +Documentation for installed Python modules and packages can be +viewed by running the +.B pydoc +program. +.SH COMMAND LINE OPTIONS +.TP +.B \-B +Don't write +.I .py[co] +files on import. See also PYTHONDONTWRITEBYTECODE. +.TP +.BI "\-c " command +Specify the command to execute (see next section). +This terminates the option list (following options are passed as +arguments to the command). +.TP +.B \-d +Turn on parser debugging output (for wizards only, depending on +compilation options). +.TP +.B \-E +Ignore environment variables like PYTHONPATH and PYTHONHOME that modify +the behavior of the interpreter. +.TP +.B \-h ", " \-? ", "\-\-help +Prints the usage for the interpreter executable and exits. +.TP +.B \-i +When a script is passed as first argument or the \fB\-c\fP option is +used, enter interactive mode after executing the script or the +command. It does not read the $PYTHONSTARTUP file. This can be +useful to inspect global variables or a stack trace when a script +raises an exception. +.TP +.BI "\-m " module-name +Searches +.I sys.path +for the named module and runs the corresponding +.I .py +file as a script. +.TP +.B \-O +Turn on basic optimizations. This changes the filename extension for +compiled (bytecode) files from +.I .pyc +to \fI.pyo\fP. Given twice, causes docstrings to be discarded. +.TP +.B \-OO +Discard docstrings in addition to the \fB-O\fP optimizations. +.TP +.B \-R +Turn on "hash randomization", so that the hash() values of str, bytes and +datetime objects are "salted" with an unpredictable pseudo-random value. +Although they remain constant within an individual Python process, they are +not predictable between repeated invocations of Python. +.IP +This is intended to provide protection against a denial of service +caused by carefully-chosen inputs that exploit the worst case performance +of a dict construction, O(n^2) complexity. See +http://www.ocert.org/advisories/ocert-2011-003.html +for details. +.TP +.BI "\-Q " argument +Division control; see PEP 238. The argument must be one of "old" (the +default, int/int and long/long return an int or long), "new" (new +division semantics, i.e. int/int and long/long returns a float), +"warn" (old division semantics with a warning for int/int and +long/long), or "warnall" (old division semantics with a warning for +all use of the division operator). For a use of "warnall", see the +Tools/scripts/fixdiv.py script. +.TP +.B \-s +Don't add user site directory to sys.path. +.TP +.B \-S +Disable the import of the module +.I site +and the site-dependent manipulations of +.I sys.path +that it entails. +.TP +.B \-t +Issue a warning when a source file mixes tabs and spaces for +indentation in a way that makes it depend on the worth of a tab +expressed in spaces. Issue an error when the option is given twice. +.TP +.B \-u +Force stdin, stdout and stderr to be totally unbuffered. On systems +where it matters, also put stdin, stdout and stderr in binary mode. +Note that there is internal buffering in xreadlines(), readlines() and +file-object iterators ("for line in sys.stdin") which is not +influenced by this option. To work around this, you will want to use +"sys.stdin.readline()" inside a "while 1:" loop. +.TP +.B \-v +Print a message each time a module is initialized, showing the place +(filename or built-in module) from which it is loaded. When given +twice, print a message for each file that is checked for when +searching for a module. Also provides information on module cleanup +at exit. +.TP +.B \-V ", " \-\-version +Prints the Python version number of the executable and exits. +.TP +.BI "\-W " argument +Warning control. Python sometimes prints warning message to +.IR sys.stderr . +A typical warning message has the following form: +.IB file ":" line ": " category ": " message. +By default, each warning is printed once for each source line where it +occurs. This option controls how often warnings are printed. +Multiple +.B \-W +options may be given; when a warning matches more than one +option, the action for the last matching option is performed. +Invalid +.B \-W +options are ignored (a warning message is printed about invalid +options when the first warning is issued). Warnings can also be +controlled from within a Python program using the +.I warnings +module. + +The simplest form of +.I argument +is one of the following +.I action +strings (or a unique abbreviation): +.B ignore +to ignore all warnings; +.B default +to explicitly request the default behavior (printing each warning once +per source line); +.B all +to print a warning each time it occurs (this may generate many +messages if a warning is triggered repeatedly for the same source +line, such as inside a loop); +.B module +to print each warning only the first time it occurs in each +module; +.B once +to print each warning only the first time it occurs in the program; or +.B error +to raise an exception instead of printing a warning message. + +The full form of +.I argument +is +.IB action : message : category : module : line. +Here, +.I action +is as explained above but only applies to messages that match the +remaining fields. Empty fields match all values; trailing empty +fields may be omitted. The +.I message +field matches the start of the warning message printed; this match is +case-insensitive. The +.I category +field matches the warning category. This must be a class name; the +match test whether the actual warning category of the message is a +subclass of the specified warning category. The full class name must +be given. The +.I module +field matches the (fully-qualified) module name; this match is +case-sensitive. The +.I line +field matches the line number, where zero matches all line numbers and +is thus equivalent to an omitted line number. +.TP +.B \-x +Skip the first line of the source. This is intended for a DOS +specific hack only. Warning: the line numbers in error messages will +be off by one! +.TP +.B \-3 +Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. +.SH INTERPRETER INTERFACE +The interpreter interface resembles that of the UNIX shell: when +called with standard input connected to a tty device, it prompts for +commands and executes them until an EOF is read; when called with a +file name argument or with a file as standard input, it reads and +executes a +.I script +from that file; +when called with +.B \-c +.I command, +it executes the Python statement(s) given as +.I command. +Here +.I command +may contain multiple statements separated by newlines. +Leading whitespace is significant in Python statements! +In non-interactive mode, the entire input is parsed before it is +executed. +.PP +If available, the script name and additional arguments thereafter are +passed to the script in the Python variable +.I sys.argv , +which is a list of strings (you must first +.I import sys +to be able to access it). +If no script name is given, +.I sys.argv[0] +is an empty string; if +.B \-c +is used, +.I sys.argv[0] +contains the string +.I '-c'. +Note that options interpreted by the Python interpreter itself +are not placed in +.I sys.argv. +.PP +In interactive mode, the primary prompt is `>>>'; the second prompt +(which appears when a command is not complete) is `...'. +The prompts can be changed by assignment to +.I sys.ps1 +or +.I sys.ps2. +The interpreter quits when it reads an EOF at a prompt. +When an unhandled exception occurs, a stack trace is printed and +control returns to the primary prompt; in non-interactive mode, the +interpreter exits after printing the stack trace. +The interrupt signal raises the +.I Keyboard\%Interrupt +exception; other UNIX signals are not caught (except that SIGPIPE is +sometimes ignored, in favor of the +.I IOError +exception). Error messages are written to stderr. +.SH FILES AND DIRECTORIES +These are subject to difference depending on local installation +conventions; ${prefix} and ${exec_prefix} are installation-dependent +and should be interpreted as for GNU software; they may be the same. +The default for both is \fI/usr/local\fP. +.IP \fI${exec_prefix}/bin/python\fP +Recommended location of the interpreter. +.PP +.I ${prefix}/lib/python +.br +.I ${exec_prefix}/lib/python +.RS +Recommended locations of the directories containing the standard +modules. +.RE +.PP +.I ${prefix}/include/python +.br +.I ${exec_prefix}/include/python +.RS +Recommended locations of the directories containing the include files +needed for developing Python extensions and embedding the +interpreter. +.RE +.IP \fI~/.pythonrc.py\fP +User-specific initialization file loaded by the \fIuser\fP module; +not used by default or by most applications. +.SH ENVIRONMENT VARIABLES +.IP PYTHONHOME +Change the location of the standard Python libraries. By default, the +libraries are searched in ${prefix}/lib/python and +${exec_prefix}/lib/python, where ${prefix} and ${exec_prefix} +are installation-dependent directories, both defaulting to +\fI/usr/local\fP. When $PYTHONHOME is set to a single directory, its value +replaces both ${prefix} and ${exec_prefix}. To specify different values +for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. +.IP PYTHONPATH +Augments the default search path for module files. +The format is the same as the shell's $PATH: one or more directory +pathnames separated by colons. +Non-existent directories are silently ignored. +The default search path is installation dependent, but generally +begins with ${prefix}/lib/python (see PYTHONHOME above). +The default search path is always appended to $PYTHONPATH. +If a script argument is given, the directory containing the script is +inserted in the path in front of $PYTHONPATH. +The search path can be manipulated from within a Python program as the +variable +.I sys.path . +.IP PYTHONSTARTUP +If this is the name of a readable file, the Python commands in that +file are executed before the first prompt is displayed in interactive +mode. +The file is executed in the same name space where interactive commands +are executed so that objects defined or imported in it can be used +without qualification in the interactive session. +You can also change the prompts +.I sys.ps1 +and +.I sys.ps2 +in this file. +.IP PYTHONY2K +Set this to a non-empty string to cause the \fItime\fP module to +require dates specified as strings to include 4-digit years, otherwise +2-digit years are converted based on rules described in the \fItime\fP +module documentation. +.IP PYTHONOPTIMIZE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-O\fP option. If set to an integer, it is equivalent to +specifying \fB\-O\fP multiple times. +.IP PYTHONDEBUG +If this is set to a non-empty string it is equivalent to specifying +the \fB\-d\fP option. If set to an integer, it is equivalent to +specifying \fB\-d\fP multiple times. +.IP PYTHONDONTWRITEBYTECODE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-B\fP option (don't try to write +.I .py[co] +files). +.IP PYTHONINSPECT +If this is set to a non-empty string it is equivalent to specifying +the \fB\-i\fP option. +.IP PYTHONIOENCODING +If this is set before running the interpreter, it overrides the encoding used +for stdin/stdout/stderr, in the syntax +.IB encodingname ":" errorhandler +The +.IB errorhandler +part is optional and has the same meaning as in str.encode. For stderr, the +.IB errorhandler + part is ignored; the handler will always be \'backslashreplace\'. +.IP PYTHONNOUSERSITE +If this is set to a non-empty string it is equivalent to specifying the +\fB\-s\fP option (Don't add the user site directory to sys.path). +.IP PYTHONUNBUFFERED +If this is set to a non-empty string it is equivalent to specifying +the \fB\-u\fP option. +.IP PYTHONVERBOSE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-v\fP option. If set to an integer, it is equivalent to +specifying \fB\-v\fP multiple times. +.IP PYTHONWARNINGS +If this is set to a comma-separated string it is equivalent to +specifying the \fB\-W\fP option for each separate value. +.IP PYTHONHASHSEED +If this variable is set to "random", the effect is the same as specifying +the \fB-R\fP option: a random value is used to seed the hashes of str, +bytes and datetime objects. + +If PYTHONHASHSEED is set to an integer value, it is used as a fixed seed for +generating the hash() of the types covered by the hash randomization. Its +purpose is to allow repeatable hashing, such as for selftests for the +interpreter itself, or to allow a cluster of python processes to share hash +values. + +The integer must be a decimal number in the range [0,4294967295]. Specifying +the value 0 will lead to the same hash values as when hash randomization is +disabled. +.SH AUTHOR +The Python Software Foundation: http://www.python.org/psf +.SH INTERNET RESOURCES +Main website: http://www.python.org/ +.br +Documentation: http://docs.python.org/ +.br +Developer resources: http://docs.python.org/devguide/ +.br +Downloads: http://python.org/download/ +.br +Module repository: http://pypi.python.org/ +.br +Newsgroups: comp.lang.python, comp.lang.python.announce +.SH LICENSING +Python is distributed under an Open Source license. See the file +"LICENSE" in the Python source distribution for information on terms & +conditions for accessing and otherwise using Python and for a +DISCLAIMER OF ALL WARRANTIES. diff --git a/prebuilt/linux-x86_64/share/man/man1/python2.1 b/prebuilt/linux-x86_64/share/man/man1/python2.1 deleted file mode 120000 index afc5687b526c001ca7df461c51e9d97cb5f35784..0000000000000000000000000000000000000000 --- a/prebuilt/linux-x86_64/share/man/man1/python2.1 +++ /dev/null @@ -1 +0,0 @@ -python2.7.1 \ No newline at end of file diff --git a/prebuilt/linux-x86_64/share/man/man1/python2.1 b/prebuilt/linux-x86_64/share/man/man1/python2.1 new file mode 100644 index 0000000000000000000000000000000000000000..39edbca1e067e8c6b6dbe24ad8745c71079dfdb3 --- /dev/null +++ b/prebuilt/linux-x86_64/share/man/man1/python2.1 @@ -0,0 +1,473 @@ +.TH PYTHON "1" "$Date$" + +.\" To view this file while editing, run it through groff: +.\" groff -Tascii -man python.man | less + +.SH NAME +python \- an interpreted, interactive, object-oriented programming language +.SH SYNOPSIS +.B python +[ +.B \-B +] +[ +.B \-d +] +[ +.B \-E +] +[ +.B \-h +] +[ +.B \-i +] +[ +.B \-m +.I module-name +] +.br + [ +.B \-O +] +[ +.B \-OO +] +[ +.B \-R +] +[ +.B -Q +.I argument +] +[ +.B \-s +] +[ +.B \-S +] +[ +.B \-t +] +[ +.B \-u +] +.br + [ +.B \-v +] +[ +.B \-V +] +[ +.B \-W +.I argument +] +[ +.B \-x +] +[ +.B \-3 +] +[ +.B \-? +] +.br + [ +.B \-c +.I command +| +.I script +| +\- +] +[ +.I arguments +] +.SH DESCRIPTION +Python is an interpreted, interactive, object-oriented programming +language that combines remarkable power with very clear syntax. +For an introduction to programming in Python you are referred to the +Python Tutorial. +The Python Library Reference documents built-in and standard types, +constants, functions and modules. +Finally, the Python Reference Manual describes the syntax and +semantics of the core language in (perhaps too) much detail. +(These documents may be located via the +.B "INTERNET RESOURCES" +below; they may be installed on your system as well.) +.PP +Python's basic power can be extended with your own modules written in +C or C++. +On most systems such modules may be dynamically loaded. +Python is also adaptable as an extension language for existing +applications. +See the internal documentation for hints. +.PP +Documentation for installed Python modules and packages can be +viewed by running the +.B pydoc +program. +.SH COMMAND LINE OPTIONS +.TP +.B \-B +Don't write +.I .py[co] +files on import. See also PYTHONDONTWRITEBYTECODE. +.TP +.BI "\-c " command +Specify the command to execute (see next section). +This terminates the option list (following options are passed as +arguments to the command). +.TP +.B \-d +Turn on parser debugging output (for wizards only, depending on +compilation options). +.TP +.B \-E +Ignore environment variables like PYTHONPATH and PYTHONHOME that modify +the behavior of the interpreter. +.TP +.B \-h ", " \-? ", "\-\-help +Prints the usage for the interpreter executable and exits. +.TP +.B \-i +When a script is passed as first argument or the \fB\-c\fP option is +used, enter interactive mode after executing the script or the +command. It does not read the $PYTHONSTARTUP file. This can be +useful to inspect global variables or a stack trace when a script +raises an exception. +.TP +.BI "\-m " module-name +Searches +.I sys.path +for the named module and runs the corresponding +.I .py +file as a script. +.TP +.B \-O +Turn on basic optimizations. This changes the filename extension for +compiled (bytecode) files from +.I .pyc +to \fI.pyo\fP. Given twice, causes docstrings to be discarded. +.TP +.B \-OO +Discard docstrings in addition to the \fB-O\fP optimizations. +.TP +.B \-R +Turn on "hash randomization", so that the hash() values of str, bytes and +datetime objects are "salted" with an unpredictable pseudo-random value. +Although they remain constant within an individual Python process, they are +not predictable between repeated invocations of Python. +.IP +This is intended to provide protection against a denial of service +caused by carefully-chosen inputs that exploit the worst case performance +of a dict construction, O(n^2) complexity. See +http://www.ocert.org/advisories/ocert-2011-003.html +for details. +.TP +.BI "\-Q " argument +Division control; see PEP 238. The argument must be one of "old" (the +default, int/int and long/long return an int or long), "new" (new +division semantics, i.e. int/int and long/long returns a float), +"warn" (old division semantics with a warning for int/int and +long/long), or "warnall" (old division semantics with a warning for +all use of the division operator). For a use of "warnall", see the +Tools/scripts/fixdiv.py script. +.TP +.B \-s +Don't add user site directory to sys.path. +.TP +.B \-S +Disable the import of the module +.I site +and the site-dependent manipulations of +.I sys.path +that it entails. +.TP +.B \-t +Issue a warning when a source file mixes tabs and spaces for +indentation in a way that makes it depend on the worth of a tab +expressed in spaces. Issue an error when the option is given twice. +.TP +.B \-u +Force stdin, stdout and stderr to be totally unbuffered. On systems +where it matters, also put stdin, stdout and stderr in binary mode. +Note that there is internal buffering in xreadlines(), readlines() and +file-object iterators ("for line in sys.stdin") which is not +influenced by this option. To work around this, you will want to use +"sys.stdin.readline()" inside a "while 1:" loop. +.TP +.B \-v +Print a message each time a module is initialized, showing the place +(filename or built-in module) from which it is loaded. When given +twice, print a message for each file that is checked for when +searching for a module. Also provides information on module cleanup +at exit. +.TP +.B \-V ", " \-\-version +Prints the Python version number of the executable and exits. +.TP +.BI "\-W " argument +Warning control. Python sometimes prints warning message to +.IR sys.stderr . +A typical warning message has the following form: +.IB file ":" line ": " category ": " message. +By default, each warning is printed once for each source line where it +occurs. This option controls how often warnings are printed. +Multiple +.B \-W +options may be given; when a warning matches more than one +option, the action for the last matching option is performed. +Invalid +.B \-W +options are ignored (a warning message is printed about invalid +options when the first warning is issued). Warnings can also be +controlled from within a Python program using the +.I warnings +module. + +The simplest form of +.I argument +is one of the following +.I action +strings (or a unique abbreviation): +.B ignore +to ignore all warnings; +.B default +to explicitly request the default behavior (printing each warning once +per source line); +.B all +to print a warning each time it occurs (this may generate many +messages if a warning is triggered repeatedly for the same source +line, such as inside a loop); +.B module +to print each warning only the first time it occurs in each +module; +.B once +to print each warning only the first time it occurs in the program; or +.B error +to raise an exception instead of printing a warning message. + +The full form of +.I argument +is +.IB action : message : category : module : line. +Here, +.I action +is as explained above but only applies to messages that match the +remaining fields. Empty fields match all values; trailing empty +fields may be omitted. The +.I message +field matches the start of the warning message printed; this match is +case-insensitive. The +.I category +field matches the warning category. This must be a class name; the +match test whether the actual warning category of the message is a +subclass of the specified warning category. The full class name must +be given. The +.I module +field matches the (fully-qualified) module name; this match is +case-sensitive. The +.I line +field matches the line number, where zero matches all line numbers and +is thus equivalent to an omitted line number. +.TP +.B \-x +Skip the first line of the source. This is intended for a DOS +specific hack only. Warning: the line numbers in error messages will +be off by one! +.TP +.B \-3 +Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. +.SH INTERPRETER INTERFACE +The interpreter interface resembles that of the UNIX shell: when +called with standard input connected to a tty device, it prompts for +commands and executes them until an EOF is read; when called with a +file name argument or with a file as standard input, it reads and +executes a +.I script +from that file; +when called with +.B \-c +.I command, +it executes the Python statement(s) given as +.I command. +Here +.I command +may contain multiple statements separated by newlines. +Leading whitespace is significant in Python statements! +In non-interactive mode, the entire input is parsed before it is +executed. +.PP +If available, the script name and additional arguments thereafter are +passed to the script in the Python variable +.I sys.argv , +which is a list of strings (you must first +.I import sys +to be able to access it). +If no script name is given, +.I sys.argv[0] +is an empty string; if +.B \-c +is used, +.I sys.argv[0] +contains the string +.I '-c'. +Note that options interpreted by the Python interpreter itself +are not placed in +.I sys.argv. +.PP +In interactive mode, the primary prompt is `>>>'; the second prompt +(which appears when a command is not complete) is `...'. +The prompts can be changed by assignment to +.I sys.ps1 +or +.I sys.ps2. +The interpreter quits when it reads an EOF at a prompt. +When an unhandled exception occurs, a stack trace is printed and +control returns to the primary prompt; in non-interactive mode, the +interpreter exits after printing the stack trace. +The interrupt signal raises the +.I Keyboard\%Interrupt +exception; other UNIX signals are not caught (except that SIGPIPE is +sometimes ignored, in favor of the +.I IOError +exception). Error messages are written to stderr. +.SH FILES AND DIRECTORIES +These are subject to difference depending on local installation +conventions; ${prefix} and ${exec_prefix} are installation-dependent +and should be interpreted as for GNU software; they may be the same. +The default for both is \fI/usr/local\fP. +.IP \fI${exec_prefix}/bin/python\fP +Recommended location of the interpreter. +.PP +.I ${prefix}/lib/python +.br +.I ${exec_prefix}/lib/python +.RS +Recommended locations of the directories containing the standard +modules. +.RE +.PP +.I ${prefix}/include/python +.br +.I ${exec_prefix}/include/python +.RS +Recommended locations of the directories containing the include files +needed for developing Python extensions and embedding the +interpreter. +.RE +.IP \fI~/.pythonrc.py\fP +User-specific initialization file loaded by the \fIuser\fP module; +not used by default or by most applications. +.SH ENVIRONMENT VARIABLES +.IP PYTHONHOME +Change the location of the standard Python libraries. By default, the +libraries are searched in ${prefix}/lib/python and +${exec_prefix}/lib/python, where ${prefix} and ${exec_prefix} +are installation-dependent directories, both defaulting to +\fI/usr/local\fP. When $PYTHONHOME is set to a single directory, its value +replaces both ${prefix} and ${exec_prefix}. To specify different values +for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. +.IP PYTHONPATH +Augments the default search path for module files. +The format is the same as the shell's $PATH: one or more directory +pathnames separated by colons. +Non-existent directories are silently ignored. +The default search path is installation dependent, but generally +begins with ${prefix}/lib/python (see PYTHONHOME above). +The default search path is always appended to $PYTHONPATH. +If a script argument is given, the directory containing the script is +inserted in the path in front of $PYTHONPATH. +The search path can be manipulated from within a Python program as the +variable +.I sys.path . +.IP PYTHONSTARTUP +If this is the name of a readable file, the Python commands in that +file are executed before the first prompt is displayed in interactive +mode. +The file is executed in the same name space where interactive commands +are executed so that objects defined or imported in it can be used +without qualification in the interactive session. +You can also change the prompts +.I sys.ps1 +and +.I sys.ps2 +in this file. +.IP PYTHONY2K +Set this to a non-empty string to cause the \fItime\fP module to +require dates specified as strings to include 4-digit years, otherwise +2-digit years are converted based on rules described in the \fItime\fP +module documentation. +.IP PYTHONOPTIMIZE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-O\fP option. If set to an integer, it is equivalent to +specifying \fB\-O\fP multiple times. +.IP PYTHONDEBUG +If this is set to a non-empty string it is equivalent to specifying +the \fB\-d\fP option. If set to an integer, it is equivalent to +specifying \fB\-d\fP multiple times. +.IP PYTHONDONTWRITEBYTECODE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-B\fP option (don't try to write +.I .py[co] +files). +.IP PYTHONINSPECT +If this is set to a non-empty string it is equivalent to specifying +the \fB\-i\fP option. +.IP PYTHONIOENCODING +If this is set before running the interpreter, it overrides the encoding used +for stdin/stdout/stderr, in the syntax +.IB encodingname ":" errorhandler +The +.IB errorhandler +part is optional and has the same meaning as in str.encode. For stderr, the +.IB errorhandler + part is ignored; the handler will always be \'backslashreplace\'. +.IP PYTHONNOUSERSITE +If this is set to a non-empty string it is equivalent to specifying the +\fB\-s\fP option (Don't add the user site directory to sys.path). +.IP PYTHONUNBUFFERED +If this is set to a non-empty string it is equivalent to specifying +the \fB\-u\fP option. +.IP PYTHONVERBOSE +If this is set to a non-empty string it is equivalent to specifying +the \fB\-v\fP option. If set to an integer, it is equivalent to +specifying \fB\-v\fP multiple times. +.IP PYTHONWARNINGS +If this is set to a comma-separated string it is equivalent to +specifying the \fB\-W\fP option for each separate value. +.IP PYTHONHASHSEED +If this variable is set to "random", the effect is the same as specifying +the \fB-R\fP option: a random value is used to seed the hashes of str, +bytes and datetime objects. + +If PYTHONHASHSEED is set to an integer value, it is used as a fixed seed for +generating the hash() of the types covered by the hash randomization. Its +purpose is to allow repeatable hashing, such as for selftests for the +interpreter itself, or to allow a cluster of python processes to share hash +values. + +The integer must be a decimal number in the range [0,4294967295]. Specifying +the value 0 will lead to the same hash values as when hash randomization is +disabled. +.SH AUTHOR +The Python Software Foundation: http://www.python.org/psf +.SH INTERNET RESOURCES +Main website: http://www.python.org/ +.br +Documentation: http://docs.python.org/ +.br +Developer resources: http://docs.python.org/devguide/ +.br +Downloads: http://python.org/download/ +.br +Module repository: http://pypi.python.org/ +.br +Newsgroups: comp.lang.python, comp.lang.python.announce +.SH LICENSING +Python is distributed under an Open Source license. See the file +"LICENSE" in the Python source distribution for information on terms & +conditions for accessing and otherwise using Python and for a +DISCLAIMER OF ALL WARRANTIES. diff --git a/python-packages/repo.prop b/python-packages/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/python-packages/repo.prop +++ b/python-packages/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/shader-tools/linux-x86_64/NOTICE b/shader-tools/linux-x86_64/NOTICE index a925893298c40de89c227d440b66981143af3eca..8d286886a41dfe527bc278c2a4c063fd5300b756 100644 --- a/shader-tools/linux-x86_64/NOTICE +++ b/shader-tools/linux-x86_64/NOTICE @@ -585,7 +585,7 @@ their use in non-free programs. # along with this program. If not, see . -Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2018 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the diff --git a/shader-tools/linux-x86_64/glslc b/shader-tools/linux-x86_64/glslc index 8710af1b7648c0e92000e4bf5660aed0aad8d0a4..3d886bd0ffe832ae723a9f243b3ed97c0d180812 100755 Binary files a/shader-tools/linux-x86_64/glslc and b/shader-tools/linux-x86_64/glslc differ diff --git a/shader-tools/linux-x86_64/repo.prop b/shader-tools/linux-x86_64/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/shader-tools/linux-x86_64/repo.prop +++ b/shader-tools/linux-x86_64/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/shader-tools/linux-x86_64/spirv-as b/shader-tools/linux-x86_64/spirv-as index 5f18f7590f94305394fff72464b1de6c88e1f612..851d46556e7cee5870e6497621a5d25d8e27c769 100755 Binary files a/shader-tools/linux-x86_64/spirv-as and b/shader-tools/linux-x86_64/spirv-as differ diff --git a/shader-tools/linux-x86_64/spirv-cfg b/shader-tools/linux-x86_64/spirv-cfg index 9a7ee5c5f543fdf6ca9de95d51282a45ae754e32..472c1e069538662128b56896989e134cdd9af17f 100755 Binary files a/shader-tools/linux-x86_64/spirv-cfg and b/shader-tools/linux-x86_64/spirv-cfg differ diff --git a/shader-tools/linux-x86_64/spirv-dis b/shader-tools/linux-x86_64/spirv-dis index 5398410d1520e7bf4c24bce86aae924d6bf6ed68..9e5c4720f6502a0a0aef836386e2e7af68edf9cd 100755 Binary files a/shader-tools/linux-x86_64/spirv-dis and b/shader-tools/linux-x86_64/spirv-dis differ diff --git a/shader-tools/linux-x86_64/spirv-opt b/shader-tools/linux-x86_64/spirv-opt index 6a0b096296a0e113ad30eb42c69ea55f269e81d1..d8a9c097483ef98dd35d8710ffe4afbec21c9f14 100755 Binary files a/shader-tools/linux-x86_64/spirv-opt and b/shader-tools/linux-x86_64/spirv-opt differ diff --git a/shader-tools/linux-x86_64/spirv-val b/shader-tools/linux-x86_64/spirv-val index b75f4f594fbfce40fccd0e0c2d9fa45749d236d5..e98fc32e53c495609918ffb027f77fc88e1a4838 100755 Binary files a/shader-tools/linux-x86_64/spirv-val and b/shader-tools/linux-x86_64/spirv-val differ diff --git a/simpleperf/ChangeLog b/simpleperf/ChangeLog index cdf92d9e740fa4ca98cc2807c173a68c672cef7f..19be59641e10845993d79cf0d204d9d9400458eb 100644 --- a/simpleperf/ChangeLog +++ b/simpleperf/ChangeLog @@ -1,6 +1,15 @@ ndk r17 - +(release) +Use new Android unwinder, which can unwind for archs different from build. +Support profiling interpreted and JITed java code on Android >= P. +Refactor app_profiler.py: improve option interface, simplify profiling from launch, +and improve native lib downloading. +Fix ndk issues 638, 644, 499, 493. +Add debug-unwind cmd and script to debug unwinding. +Update document, including the way using wrap.sh to profile released apk. + +(beta 1) Add report_html.py, reporting profiling result in html interface. Improve inferno. Refactor document. diff --git a/simpleperf/bin/android/arm/simpleperf b/simpleperf/bin/android/arm/simpleperf index fbbed506539e61f3808f47833cd72cb38360ca48..b41318b2ada801f8af46d90f253dce3eb17f9a49 100755 Binary files a/simpleperf/bin/android/arm/simpleperf and b/simpleperf/bin/android/arm/simpleperf differ diff --git a/simpleperf/bin/android/arm64/simpleperf b/simpleperf/bin/android/arm64/simpleperf index 27f59abbac2cef7655c016f72ddbd2b9ecc0f533..4df1f31fcdadbfb6302d5a9d6c87425e1f01aa6d 100755 Binary files a/simpleperf/bin/android/arm64/simpleperf and b/simpleperf/bin/android/arm64/simpleperf differ diff --git a/simpleperf/bin/android/x86/simpleperf b/simpleperf/bin/android/x86/simpleperf index 0046ac1bd7dddde76f1274de463a0becfc569a7c..2c6edab16cee5b49defcc8544fb46be35e8da4dd 100755 Binary files a/simpleperf/bin/android/x86/simpleperf and b/simpleperf/bin/android/x86/simpleperf differ diff --git a/simpleperf/bin/android/x86_64/simpleperf b/simpleperf/bin/android/x86_64/simpleperf index e15aff7635b0efb133d0c8ea9ddf872dfdf86406..bd247294f1cae86c99608b319a9ae1f746ee0457 100755 Binary files a/simpleperf/bin/android/x86_64/simpleperf and b/simpleperf/bin/android/x86_64/simpleperf differ diff --git a/simpleperf/bin/linux/x86/libsimpleperf_report.so b/simpleperf/bin/linux/x86/libsimpleperf_report.so index 56d8b2af3c640437004a76482a1c8268e05d83ae..ebf36b3d0d76ae5e15771322259e39fca2e379e6 100755 Binary files a/simpleperf/bin/linux/x86/libsimpleperf_report.so and b/simpleperf/bin/linux/x86/libsimpleperf_report.so differ diff --git a/simpleperf/bin/linux/x86/simpleperf b/simpleperf/bin/linux/x86/simpleperf index 21dede853b5cea0405d0bd2df96027f8581f949a..3ce5fed3d81b2d041453b45430ab8b7157adad94 100755 Binary files a/simpleperf/bin/linux/x86/simpleperf and b/simpleperf/bin/linux/x86/simpleperf differ diff --git a/simpleperf/bin/linux/x86_64/libsimpleperf_report.so b/simpleperf/bin/linux/x86_64/libsimpleperf_report.so index ad2a328d291349dd5332e71228c96ac12d46c0a4..db141fb1ef099995b687697fd0085d677127ce9d 100755 Binary files a/simpleperf/bin/linux/x86_64/libsimpleperf_report.so and b/simpleperf/bin/linux/x86_64/libsimpleperf_report.so differ diff --git a/simpleperf/bin/linux/x86_64/simpleperf b/simpleperf/bin/linux/x86_64/simpleperf index da240fdb2ca039aa569150746e59de85f1f62e23..1f532c9cf06b0e2d61d2252c71a1d181970504bd 100755 Binary files a/simpleperf/bin/linux/x86_64/simpleperf and b/simpleperf/bin/linux/x86_64/simpleperf differ diff --git a/simpleperf/doc/README.md b/simpleperf/doc/README.md index bb54f1133034e81a26d05a90c5fd868f3ccd581f..a16bd9259685d503435de8a744903991ecef74cb 100644 --- a/simpleperf/doc/README.md +++ b/simpleperf/doc/README.md @@ -24,7 +24,7 @@ Bugs and feature requests can be submitted at http://github.com/android-ndk/ndk/ - [Profile from launch](#profile-from-launch) - [Parse profiling data manually](#parse-profiling-data-manually) - [Executable commands reference](#executable-commands-reference) - - [How does simpleperf work?](#how-does-simpleperf-work) + - [How simpleperf works](#how-simpleperf-works) - [Commands](#commands) - [The list command](#the-list-command) - [The stat command](#the-stat-command) @@ -48,8 +48,9 @@ Bugs and feature requests can be submitted at http://github.com/android-ndk/ndk/ - [Group samples into sample entries](#group-samples-into-sample-entries) - [Report call graphs](#report-call-graphs-in-report-cmd) - [Scripts reference](#scripts-reference) - - [app_profiler py](#app_profiler-py) + - [app_profiler.py](#app_profiler-py) - [Profile from launch of an application](#profile-from-launch-of-an-application) + - [run_simpleperf_without_usb_connection.py](#run_simpleperf_without_usb_connection-py) - [binary_cache_builder.py](#binary_cache_builder-py) - [run_simpleperf_on_device.py](#run_simpleperf_on_device-py) - [report.py](#report-py) @@ -78,6 +79,7 @@ the Android profiling environment: a. When recording dwarf based call graph, simpleperf unwinds the stack before writing a sample to file. This is to save storage space on the device. b. Support tracing both on CPU time and off CPU time with --trace-offcpu option. + c. Support recording callgraphs of JITed and interpreted Java code on Android >= P. 3. It relates closely to the Android platform. a. Is aware of Android environment, like using system properties to enable profiling, using @@ -100,7 +102,7 @@ Detailed documentation for the simpleperf executable is [here](#executable-comma Python scripts are split into three parts according to their functions: -1. Scripts used for simplifying recording, like app_profiler.py. +1. Scripts used for recording, like app_profiler.py, run_simpleperf_without_usb_connection.py. 2. Scripts used for reporting, like report.py, report_html.py, inferno. @@ -123,6 +125,9 @@ bin/${host}/${arch}/libsimpleperf_report.${so/dylib/dll}: report shared librarie [app_profiler.py](#app_profiler-py): recording profiling data. +[run_simpleperf_without_usb_connection.py](#run_simpleperf_without_usb_connection-py): + recording profiling data while the USB cable isn't connected. + [binary_cache_builder.py](#binary_cache_builder-py): building binary cache for profiling data. [report.py](#report-py): reporting in stdio interface. @@ -146,46 +151,94 @@ inferno/: implementation of inferno. Used by inferno.sh. This section shows how to profile an Android application. Some examples are [Here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/README.md). -Simpleperf only supports profiling native instructions in binaries in ELF format. If the Java code -is executed by interpreter, or with jit cache, it can’t be profiled by simpleperf. As Android -supports Ahead-of-time compilation, it can compile Java bytecode into native instructions with -debug information. On devices with Android version <= M, we need root privilege to compile Java -bytecode with debug information. However, on devices with Android version >= N, we don't need -root privilege to do so. - Profiling an Android application involves three steps: -1. Prepare the application. +1. Prepare an Android application. 2. Record profiling data. 3. Report profiling data. ### Prepare an Android application -Before profiling, we need to install the application on Android device. To get valid profiling -results, please check following items: +Based on the profiling situation, we may need to customize the build script to generate an apk file +specifically for profiling. Below are some suggestions. + +1. If you want to profile a debug build of an application: + +For the debug build type, Android studio sets android::debuggable="true" in AndroidManifest.xml, +enables JNI checks and may not optimize C/C++ code. It can be profiled by simpleperf without any +change. + +2. If you want to profile a release build of an application: + +For the release build type, Android studio sets android::debuggable="false" in AndroidManifest.xml, +disables JNI checks and optimizes C/C++ code. However, security restrictions mean that only apps +with android::debuggable set to true can be profiled. So simpleperf can only profile release build +in either of below two situations: +If you are on a rooted device, you can profile any app. + +If you are on Android >= O, we can use [wrap.sh](#https://developer.android.com/ndk/guides/wrap-script.html) +to profile a release build: +Step 1: Add android::debuggable="true" in AndroidManifest.xml to enable profiling. +``` + + +``` + +Step 2: Add wrap.sh in lib/`arch` directories. wrap.sh runs the app without passing any debug flags +to ART, so the app runs as a release app. wrap.sh can be done by adding below scripts in +app/build.gradle. +``` +android { + buildTypes { + release { + sourceSets { + release { + resources { + srcDir { + "wrap_sh_lib_dir" + } + } + } + } + } + } +} + +task createWrapShLibDir + for (String abi : ["armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"]) { + def dir = new File("app/wrap_sh_lib_dir/lib/" + abi) + dir.mkdirs() + def wrapFile = new File(dir, "wrap.sh") + wrapFile.withWriter { writer -> + writer.write('#!/system/bin/sh\n\$@\n') + } + } +} +``` + +3. If you want to profile C/C++ code: + +Android studio strips symbol table and debug info of native libraries in the apk. So the profiling +results may contain unknown symbols or broken callgraphs. To fix this, we can pass app_profiler.py +a directory containing unstripped native libraries via the -lib option. Usually the directory can +be the path of your Android Studio project. -1. The application should be debuggable. -Security restrictions mean that only apps with android::debuggable set to true can be profiled. -(On a rooted device, all apps can be profiled.) In Android Studio, that means you need to use -the debug build type instead of the release build type. -2. Run on an Android >= N device. -[We suggest profiling on an Android >= N device](#why-we-suggest-profiling-on-android-n-devices). +4. If you want to profile Java code: -3. On Android O, add `wrap.sh` in the apk. -To profile Java code, we need ART running in oat mode. But on Android O, debuggable applications -are forced to run in jit mode. To work around this, we need to add a `wrap.sh` in the apk. So if -you are running on Android O device and need to profile Java code, add `wrap.sh` as [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfExampleWithNative/app/profiling.gradle). +On Android >= P, simpleperf supports profiling Java code, no matter whether it is executed by +interpreter, or JITed, or compiled into native instructions. So you don't need to do anything. -4. Make sure C++ code is compiled with optimizing flags. -If the application contains C++ code, it can be compiled with -O0 flag in debug build type. -This makes C++ code slow, to avoid that, check [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfExampleWithNative/app/profiling.gradle). +On Android O, simpleperf supports profiling Java code which is compiled into native instructions, +and it also needs wrap.sh to use the compiled Java code. To compile Java code, we can pass +app_profiler.py the --compile_java_code option. -5. Use native libraries with debug info in the apk when possible. -If the application contains C++ code or pre-compiled native libraries, try to use unstripped -libraries in the apk. This helps simpleperf generating better profiling results. -To use unstripped libraries, check [here](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfExampleWithNative/app/profiling.gradle). +On Android N, simpleperf supports profiling Java code that is compiled into native instructions. +To compile java code, we can pass app_profiler.py the --compile_java_code option. -Here we use application [SimpleperfExampleWithNative](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfExampleWithNative). +On Android <= M, simpleperf doesn't support profiling Java code. + + +Below I use application [SimpleperfExampleWithNative](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/demo/SimpleperfExampleWithNative). It builds an app-profiling.apk for profiling. ```sh @@ -205,28 +258,34 @@ $ adb install -r app/build/outputs/apk/profiling/app-profiling.apk We can use [app-profiler.py](#app_profiler-py) to profile Android applications. ```sh -# Record perf.data. -$ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative +# Cd to the directory of simpleperf scripts. Record perf.data. +# -p option selects the profiled app using its package name. +# --compile_java_code option compiles Java code into native instructions, which isn't needed on +# Android >= P. +# -a option selects the Activity to profile. +# -lib option gives the directory to find debug native libraries. +$ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative --compile_java_code \ + -a .MixActivity -lib path_of_SimpleperfExampleWithNative ``` This will collect profiling data in perf.data in the current directory, and related native binaries in binary_cache/. Normally we need to use the app when profiling, otherwise we may record no samples. But in this -case, the MainActivity starts a busy thread. So we don't need to use the app while profiling. +case, the MixActivity starts a busy thread. So we don't need to use the app while profiling. ```sh # Report perf.data in stdio interface. $ python report.py -Cmdline: /data/local/tmp/simpleperf record -e task-clock:u -g -f 1000 --duration 10 ... +Cmdline: /data/data/com.example.simpleperf.simpleperfexamplewithnative/simpleperf record ... Arch: arm64 -Event: cpu-cycles:u (type 0, config 0) -Samples: 9966 -Event count: 22661027577 +Event: task-clock:u (type 1, config 1) +Samples: 10023 +Event count: 10023000000 -Overhead Command Pid Tid Shared Object Symbol -59.69% amplewithnative 10440 10452 /system/lib64/libc.so strtol -8.60% amplewithnative 10440 10452 /system/lib64/libc.so isalpha +Overhead Command Pid Tid Shared Object Symbol +27.04% BusyThread 5703 5729 /system/lib64/libart.so art::JniMethodStart(art::Thread*) +25.87% BusyThread 5703 5729 /system/lib64/libc.so long StrToI +### run_simpleperf_without_usb_connection.py + +run_simpleperf_without_usb_connection.py records profiling data while the USB cable isn't +connected. Below is an example. ```sh -$ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative -a .MainActivity \ - --arch arm64 --profile_from_launch +$ python run_simpleperf_without_usb_connection.py start \ + -p com.example.simpleperf.simpleperfexamplewithnative +# After the command finishes successfully, unplug the USB cable, run the +# SimpleperfExampleWithNative app. After a few seconds, plug in the USB cable. +$ python run_simpleperf_without_usb_connection.py stop +# It may take a while to stop recording. After that, the profiling data is collected in perf.data +# on host. ``` @@ -953,7 +1032,7 @@ report_html.py to generate annotated source code and disassembly. By default, app_profiler.py builds the binary_cache directory after recording. But we can also build binary_cache for existing profiling data files using binary_cache_builder.py. It is useful when you record profiling data using `simpleperf record` directly, to do system wide profiling or -record without usb cable connected. +record without USB cable connected. binary_cache_builder.py can either pull binaries from an Android device, or find binaries in directories on the host (via -lib). @@ -962,8 +1041,9 @@ directories on the host (via -lib). # Generate binary_cache for perf.data, by pulling binaries from the device. $ python binary_cache_builder.py -# Generate binary_cache, by pulling binaries from the device and finding binaries in ../demo. -$ python binary_cache_builder.py -lib ../demo +# Generate binary_cache, by pulling binaries from the device and finding binaries in +# SimpleperfExampleWithNative. +$ python binary_cache_builder.py -lib path_of_SimpleperfExampleWithNative ``` @@ -1000,7 +1080,7 @@ each function, annotated disassembly for each function. $ python report_html.py # Add source code. -$ python report_html.py --add_source_code --source_dirs ../demo/SimpleperfExampleWithNative +$ python report_html.py --add_source_code --source_dirs path_of_SimpleperfExampleWithNative # Add disassembly. $ python report_html.py --add_disassembly @@ -1010,7 +1090,8 @@ Below is an example of generating html profiling results for SimpleperfExampleWi ```sh $ python app_profiler.py -p com.example.simpleperf.simpleperfexamplewithnative -$ python report_html.py --add_source_code --source_dirs ../demo --add_disassembly +$ python report_html.py --add_source_code --source_dirs path_of_SimpleperfExampleWithNative \ + --add_disassembly ``` After opening the generated [report.html](./report_html.html) in a browser, there are several tabs: @@ -1158,4 +1239,5 @@ $ python report.py --symfs binary_cache # report_html.py searches binary_cache/ automatically, so you don't need to # pass it any argument. $ python report_html.py -``` \ No newline at end of file +``` + diff --git a/simpleperf/repo.prop b/simpleperf/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/simpleperf/repo.prop +++ b/simpleperf/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/source.properties b/source.properties index 26057f3983cc211b0ac0cac26d1707c9c00cf375..0ee4eb5b3d580b5f9178711a503ab748575e3879 100644 --- a/source.properties +++ b/source.properties @@ -1,2 +1,2 @@ Pkg.Desc = Android NDK -Pkg.Revision = 17.0.4754217 +Pkg.Revision = 17.1.4828580 diff --git a/sources/android/cpufeatures/repo.prop b/sources/android/cpufeatures/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/android/cpufeatures/repo.prop +++ b/sources/android/cpufeatures/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/android/native_app_glue/repo.prop b/sources/android/native_app_glue/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/android/native_app_glue/repo.prop +++ b/sources/android/native_app_glue/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/android/ndk_helper/repo.prop b/sources/android/ndk_helper/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/android/ndk_helper/repo.prop +++ b/sources/android/ndk_helper/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/android/renderscript/repo.prop b/sources/android/renderscript/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/android/renderscript/repo.prop +++ b/sources/android/renderscript/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/android/support/repo.prop b/sources/android/support/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/android/support/repo.prop +++ b/sources/android/support/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/cxx-stl/gabi++/repo.prop b/sources/cxx-stl/gabi++/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/cxx-stl/gabi++/repo.prop +++ b/sources/cxx-stl/gabi++/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/cxx-stl/llvm-libc++/benchmarks/util_smartptr.bench.cpp b/sources/cxx-stl/llvm-libc++/benchmarks/util_smartptr.bench.cpp index ad3f03a0448ab884e5c5189d1cd166e2114e3065..3b27d789701ed0048fbdb5fdde6eb14fd87e78b4 100644 --- a/sources/cxx-stl/llvm-libc++/benchmarks/util_smartptr.bench.cpp +++ b/sources/cxx-stl/llvm-libc++/benchmarks/util_smartptr.bench.cpp @@ -1,42 +1,42 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include - -#include "benchmark/benchmark_api.h" - -static void BM_SharedPtrCreateDestroy(benchmark::State& st) { - while (st.KeepRunning()) { - auto sp = std::make_shared(42); - benchmark::DoNotOptimize(sp.get()); - } -} -BENCHMARK(BM_SharedPtrCreateDestroy); - -static void BM_SharedPtrIncDecRef(benchmark::State& st) { - auto sp = std::make_shared(42); - benchmark::DoNotOptimize(sp.get()); - while (st.KeepRunning()) { - std::shared_ptr sp2(sp); - benchmark::ClobberMemory(); - } -} -BENCHMARK(BM_SharedPtrIncDecRef); - -static void BM_WeakPtrIncDecRef(benchmark::State& st) { - auto sp = std::make_shared(42); - benchmark::DoNotOptimize(sp.get()); - while (st.KeepRunning()) { - std::weak_ptr wp(sp); - benchmark::ClobberMemory(); - } -} -BENCHMARK(BM_WeakPtrIncDecRef); - -BENCHMARK_MAIN() +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "benchmark/benchmark_api.h" + +static void BM_SharedPtrCreateDestroy(benchmark::State& st) { + while (st.KeepRunning()) { + auto sp = std::make_shared(42); + benchmark::DoNotOptimize(sp.get()); + } +} +BENCHMARK(BM_SharedPtrCreateDestroy); + +static void BM_SharedPtrIncDecRef(benchmark::State& st) { + auto sp = std::make_shared(42); + benchmark::DoNotOptimize(sp.get()); + while (st.KeepRunning()) { + std::shared_ptr sp2(sp); + benchmark::ClobberMemory(); + } +} +BENCHMARK(BM_SharedPtrIncDecRef); + +static void BM_WeakPtrIncDecRef(benchmark::State& st) { + auto sp = std::make_shared(42); + benchmark::DoNotOptimize(sp.get()); + while (st.KeepRunning()) { + std::weak_ptr wp(sp); + benchmark::ClobberMemory(); + } +} +BENCHMARK(BM_WeakPtrIncDecRef); + +BENCHMARK_MAIN() diff --git a/sources/cxx-stl/llvm-libc++/include/cstdio b/sources/cxx-stl/llvm-libc++/include/cstdio index 00b989fad7c8ffd99eaf02972fe7007401cf9ede..4b2d961e67bd414aca56c4a1249fe2f7c2bc4bfc 100644 --- a/sources/cxx-stl/llvm-libc++/include/cstdio +++ b/sources/cxx-stl/llvm-libc++/include/cstdio @@ -132,9 +132,15 @@ using ::putc; using ::ungetc; using ::fread; using ::fwrite; +#if !defined(__ANDROID__) || !defined(__USE_FILE_OFFSET64) || \ + (__ANDROID_API__ >= __ANDROID_API_N__) using ::fgetpos; +#endif using ::fseek; +#if !defined(__ANDROID__) || !defined(__USE_FILE_OFFSET64) || \ + (__ANDROID_API__ >= __ANDROID_API_N__) using ::fsetpos; +#endif using ::ftell; using ::rewind; using ::clearerr; diff --git a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so index 889dd7cae4f218dc1d9deb9c056db3673b1efd08..9fbf09de6b7b1ae69154062dffcc01c0dbfa83bc 100755 Binary files a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so and b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so differ diff --git a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a index 689d567f75db22d486a18daf51edb58a28ee2577..2e9ffca401508dc15381a47fad2ac56ef2f061b5 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a and b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a index 1da724ff6f6c56442cc0d40323ec60f9b5c96ce2..5fcc7eddd96834276bc822215b85d5fc2b381e3b 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a and b/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.a b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.a index d36d066b3e28bbed320c1352255c36bea59e012e..645a1585ff41c66b6d0cee333979a0d105960601 100644 --- a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.a +++ b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.a @@ -1 +1 @@ -INPUT(-lc++_static -lc++abi -landroid_support -lunwind -ldl -latomic) +INPUT(-lc++_static -lc++abi -landroid_support -lunwind -latomic) diff --git a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so index 1ac07125c9dcd7d126531b9ffa14a3457db9b91b..71389d9102fd93ffc199a473d4650b7773377a49 100755 Binary files a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so and b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so differ diff --git a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a index d9c9f97245e597e3e12fa7acdbb568ec17e42509..ccd81b6403af70659dbee2dc30b42f88f2770623 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a and b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a index 18d78e811480e6bc7fcf031234b25245bac7eda9..a2cfafda55d9822cec0ca85350995a7d1272092a 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a and b/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so b/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so index a6b87d3a7515b7a6de1697ba39be5f92b71a3dd7..2da1a18f526a1873ab877df9e2fa04d761580db3 100755 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so and b/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a b/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a index dbbbbb973891c2f041de3d2040eb3c7b78f061c3..e75c1191d49e20af505cbf364095a0fe70385d5b 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a and b/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a b/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a index 23c67f128ebbd089cc9e299bcb05ea0ee4961499..3c11d8f23d5c93d84304f28539e2501921e1874d 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a and b/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so index 04b58e07f733ff6722bbed15d7e5fb10fb8ac4cb..79977c638c156aa6274ab0795fc16aa252e28db6 100755 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so and b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a index ac550b7f40c45f78e66c92f018b10efd8af6e1cf..7271fc25398734ad206ac434312de91d4095cdef 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a and b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a differ diff --git a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++abi.a b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++abi.a index aa10102fd75c5e353d6511ba825253102f9f1876..39cb9d19c067043e79e8bfbbbbd16b8e55961bc0 100644 Binary files a/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++abi.a and b/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++abi.a differ diff --git a/sources/cxx-stl/llvm-libc++/repo.prop b/sources/cxx-stl/llvm-libc++/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/cxx-stl/llvm-libc++/repo.prop +++ b/sources/cxx-stl/llvm-libc++/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4b17a9f965057a7921acf54d4f06f2d0dde7062c --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp @@ -0,0 +1,57 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// type_traits + +// is_base_of + +#include + +#include "test_macros.h" + +template +void test_is_base_of() +{ + static_assert((std::is_base_of::value), ""); + static_assert((std::is_base_of::value), ""); + static_assert((std::is_base_of::value), ""); + static_assert((std::is_base_of::value), ""); +#if TEST_STD_VER > 14 + static_assert((std::is_base_of_v), ""); + static_assert((std::is_base_of_v), ""); + static_assert((std::is_base_of_v), ""); + static_assert((std::is_base_of_v), ""); +#endif +} + +template +void test_is_not_base_of() +{ + static_assert((!std::is_base_of::value), ""); +} + +struct B {}; +struct B1 : B {}; +struct B2 : B {}; +struct D : private B1, private B2 {}; + +int main() +{ + test_is_base_of(); + test_is_base_of(); + test_is_base_of(); + test_is_base_of(); + test_is_base_of(); + test_is_base_of(); + + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_callable.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_callable.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c85f440b0bf941a6adc91c526611c042e90df6f --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_callable.pass.cpp @@ -0,0 +1,160 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// type_traits + +// is_callable + +// Most testing of is_callable is done within the [meta.trans.other] result_of +// tests. + +#include +#include +#include + +#include "test_macros.h" + +struct Tag {}; +struct DerFromTag : Tag {}; + +struct Implicit { + Implicit(int) {} +}; + +struct Explicit { + explicit Explicit(int) {} +}; + +struct NotCallableWithInt { + int operator()(int) = delete; + int operator()(Tag) { return 42; } +}; + +int main() +{ + { + using Fn = int(Tag::*)(int); + using RFn = int(Tag::*)(int) &&; + // INVOKE bullet 1, 2 and 3 + { + // Bullet 1 + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + { + // Bullet 2 + using T = std::reference_wrapper; + using DT = std::reference_wrapper; + using CT = std::reference_wrapper; + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + { + // Bullet 3 + using T = Tag*; + using DT = DerFromTag*; + using CT = const Tag*; + using ST = std::unique_ptr; + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + } + { + // Bullets 4, 5 and 6 + using Fn = int (Tag::*); + static_assert(!std::is_callable::value, ""); + { + // Bullet 4 + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + } + { + // Bullet 5 + using T = std::reference_wrapper; + using DT = std::reference_wrapper; + using CT = std::reference_wrapper; + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + } + { + // Bullet 6 + using T = Tag*; + using DT = DerFromTag*; + using CT = const Tag*; + using ST = std::unique_ptr; + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + } + } + { + // INVOKE bullet 7 + { + // Function pointer + using Fp = void(*)(Tag&, int); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + { + // Function reference + using Fp = void(&)(Tag&, int); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + { + // Function object + using Fn = NotCallableWithInt; + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + } + { + // Check that the conversion to the return type is properly checked + using Fn = int(*)(); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(std::is_callable::value, ""); + static_assert(!std::is_callable::value, ""); + } + { + // Check for is_callable_v + using Fn = void(*)(); + static_assert(std::is_callable_v, ""); + static_assert(!std::is_callable_v, ""); + } +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20c9eca8e52111657fd6add54758d0b53d636084 --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp @@ -0,0 +1,263 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// type_traits + +// is_convertible + +#include +#include "test_macros.h" + +template +void test_is_convertible() +{ + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); +#if TEST_STD_VER > 14 + static_assert((std::is_convertible_v), ""); + static_assert((std::is_convertible_v), ""); + static_assert((std::is_convertible_v), ""); + static_assert((std::is_convertible_v), ""); +#endif +} + +template +void test_is_not_convertible() +{ + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_convertible_v), ""); + static_assert((!std::is_convertible_v), ""); + static_assert((!std::is_convertible_v), ""); + static_assert((!std::is_convertible_v), ""); +#endif +} + +typedef void Function(); +typedef void ConstFunction() const; +typedef char Array[1]; + +struct StringType { + StringType(const char*) {} +}; + +class NonCopyable { + NonCopyable(NonCopyable&); +}; + +template +class CannotInstantiate { + enum { X = T::ThisExpressionWillBlowUp }; +}; + +int main() +{ + // void + test_is_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible(); + + // Function + test_is_not_convertible (); + test_is_not_convertible (); + test_is_convertible (); + test_is_convertible (); + test_is_convertible (); + +#if TEST_STD_VER >= 11 + static_assert(( std::is_convertible::value), ""); +#endif + + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + // Function& + test_is_not_convertible (); + test_is_not_convertible (); + test_is_convertible (); + + test_is_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + // Function* + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_convertible (); + + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + // Non-referencable function type + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); +#if TEST_STD_VER >= 11 + static_assert((!std::is_convertible::value), ""); +#endif + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + + // Array + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + +#if TEST_STD_VER >= 11 + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); +#endif + + test_is_not_convertible (); + test_is_not_convertible (); + + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + static_assert((!std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + + // Array& + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + test_is_not_convertible (); + test_is_not_convertible (); + + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + + // char + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + test_is_convertible (); + + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + test_is_not_convertible (); + + // char& + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + test_is_convertible (); + + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + test_is_not_convertible (); + + // char* + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + test_is_not_convertible (); + + test_is_not_convertible (); + test_is_not_convertible (); + + static_assert(( std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); + static_assert(( std::is_convertible::value), ""); + + // NonCopyable + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((std::is_convertible::value), ""); + static_assert((!std::is_convertible::value), ""); +// This test requires Access control SFINAE which we only have in C++11 or when +// we are using the compiler builtin for is_convertible. +#if TEST_STD_VER >= 11 || !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) + test_is_not_convertible(); +#endif + + // Ensure that CannotInstantiate is not instantiated by is_convertible when it is not needed. + // For example CannotInstantiate is instatiated as a part of ADL lookup for arguments of type CannotInstantiate*. + static_assert((std::is_convertible*, CannotInstantiate*>::value), ""); +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5a607f3b12ad60e9d977986b8090689390c8d274 --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// type_traits + +// is_convertible + +// Test the fallback implementation. + +// libc++ provides a fallback implementation of the compiler trait +// `__is_convertible` with the same name when clang doesn't. +// Because this test forces the use of the fallback even when clang provides +// it causing a keyword incompatibility. +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wkeyword-compat" +#endif + +#define _LIBCPP_USE_IS_CONVERTIBLE_FALLBACK +#include "is_convertible.pass.cpp" + diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eefa6d1f22b18f788ddb7ff71ea8be07c6f1a01a --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp @@ -0,0 +1,115 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// type_traits + +// is_nothrow_callable + +#include +#include + +#include "test_macros.h" + +struct Tag {}; + +struct Implicit { + Implicit(int) noexcept {} +}; + +struct ThrowsImplicit { + ThrowsImplicit(int) {} +}; + +struct Explicit { + explicit Explicit(int) noexcept {} +}; + +template +struct CallObject { + Ret operator()(Args&&...) const noexcept(IsNoexcept); +}; + +template +constexpr bool throws_callable() { + return std::is_callable::value && + !std::is_nothrow_callable::value; +} + +template +constexpr bool throws_callable() { + return std::is_callable::value && + !std::is_nothrow_callable::value; +} + +// FIXME(EricWF) Don't test the where noexcept is *not* part of the type system +// once implementations have caught up. +void test_noexcept_function_pointers() +{ + struct Dummy { void foo() noexcept {} static void bar() noexcept {} }; +#if !defined(__cpp_noexcept_function_type) + { + // Check that PMF's and function pointers *work*. is_nothrow_callable will always + // return false because 'noexcept' is not part of the function type. + static_assert(throws_callable(), ""); + static_assert(throws_callable(), ""); + } +#else + { + // Check that PMF's and function pointers actually work and that + // is_nothrow_callable returns true for noexcept PMF's and function + // pointers. + static_assert(std::is_nothrow_callable::value, ""); + static_assert(std::is_nothrow_callable::value, ""); + } +#endif +} + +int main() +{ + { + // Check that the conversion to the return type is properly checked + using Fn = CallObject; + static_assert(std::is_nothrow_callable::value, ""); + static_assert(std::is_nothrow_callable::value, ""); + static_assert(std::is_nothrow_callable::value, ""); + static_assert(throws_callable(), ""); + static_assert(!std::is_nothrow_callable(), ""); + } + { + // Check that the conversion to the parameters is properly checked + using Fn = CallObject; + static_assert(std::is_nothrow_callable::value, ""); + static_assert(std::is_nothrow_callable::value, ""); + static_assert(throws_callable(), ""); + static_assert(!std::is_nothrow_callable::value, ""); + } + { + // Check that the noexcept-ness of function objects is checked. + using Fn = CallObject; + using Fn2 = CallObject; + static_assert(std::is_nothrow_callable::value, ""); + static_assert(throws_callable(), ""); + } + { + // Check that PMD derefs are noexcept + using Fn = int (Tag::*); + static_assert(std::is_nothrow_callable::value, ""); + static_assert(std::is_nothrow_callable::value, ""); + static_assert(throws_callable(), ""); + } + { + // Check for is_nothrow_callable_v + using Fn = CallObject; + static_assert(std::is_nothrow_callable_v, ""); + static_assert(!std::is_nothrow_callable_v, ""); + } + test_noexcept_function_pointers(); +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_same.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_same.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9db367391f6991c0e9c9bb5a32534e3123732ec5 --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/meta/meta.rel/is_same.pass.cpp @@ -0,0 +1,73 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// type_traits + +// is_same + +#include + +#include "test_macros.h" + +template +void test_is_same() +{ + static_assert(( std::is_same::value), ""); + static_assert((!std::is_same::value), ""); + static_assert((!std::is_same::value), ""); + static_assert(( std::is_same::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_same_v), ""); + static_assert((!std::is_same_v), ""); + static_assert((!std::is_same_v), ""); + static_assert(( std::is_same_v), ""); +#endif +} + +template +void test_is_same_ref() +{ + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +#if TEST_STD_VER > 14 + static_assert((std::is_same_v), ""); + static_assert((std::is_same_v), ""); + static_assert((std::is_same_v), ""); + static_assert((std::is_same_v), ""); +#endif +} + +template +void test_is_not_same() +{ + static_assert((!std::is_same::value), ""); +} + +class Class +{ +public: + ~Class(); +}; + +int main() +{ + test_is_same(); + test_is_same(); + test_is_same(); + test_is_same(); + test_is_same_ref(); + + test_is_not_same(); + test_is_not_same(); + test_is_not_same(); + test_is_not_same(); + test_is_not_same(); +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a802a05da2bcb599688bee0536d57b6aae2519c3 --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp @@ -0,0 +1,158 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template class tuple; + +// template +// bool +// operator==(const tuple& t, const tuple& u); + +// UNSUPPORTED: c++98, c++03 + +#include +#include +#include + +#include "test_macros.h" + +int main() +{ + { + typedef std::tuple<> T1; + typedef std::tuple<> T2; + const T1 t1; + const T2 t2; + assert(t1 == t2); + assert(!(t1 != t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1); + const T2 t2(1.1); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1); + const T2 t2(1); + assert(t1 == t2); + assert(!(t1 != t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1, 2); + assert(t1 == t2); + assert(!(t1 != t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1, 3); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1.1, 2); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1.1, 3); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 2, 3); + assert(t1 == t2); + assert(!(t1 != t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1.1, 2, 3); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 3, 3); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 2, 4); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 3, 2); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1.1, 2, 2); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1.1, 3, 3); + assert(!(t1 == t2)); + assert(t1 != t2); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1.1, 3, 2); + assert(!(t1 == t2)); + assert(t1 != t2); + } +#if TEST_STD_VER > 11 + { + typedef std::tuple T1; + typedef std::tuple T2; + constexpr T1 t1(1, 2, 3); + constexpr T2 t2(1.1, 3, 2); + static_assert(!(t1 == t2), ""); + static_assert(t1 != t2, ""); + } +#endif +} diff --git a/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp b/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4d764b87ee90085adfd48cb48de645ab96f5e1f --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/test/std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp @@ -0,0 +1,212 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template class tuple; + +// template +// bool +// operator<(const tuple& t, const tuple& u); +// +// template +// bool +// operator>(const tuple& t, const tuple& u); +// +// template +// bool +// operator<=(const tuple& t, const tuple& u); +// +// template +// bool +// operator>=(const tuple& t, const tuple& u); + +// UNSUPPORTED: c++98, c++03 + +#include +#include +#include + +#include "test_macros.h" + +int main() +{ + { + typedef std::tuple<> T1; + typedef std::tuple<> T2; + const T1 t1; + const T2 t2; + assert(!(t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1); + const T2 t2(1); + assert(!(t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1); + const T2 t2(0.9); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1); + const T2 t2(1.1); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1, 2); + assert(!(t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(0.9, 2); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1.1, 2); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1, 1); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2); + const T2 t2(1, 3); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 2, 3); + assert(!(t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(0.9, 2, 3); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1.1, 2, 3); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 1, 3); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 3, 3); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 2, 2); + assert(!(t1 < t2)); + assert(!(t1 <= t2)); + assert( (t1 > t2)); + assert( (t1 >= t2)); + } + { + typedef std::tuple T1; + typedef std::tuple T2; + const T1 t1(1, 2, 3); + const T2 t2(1, 2, 4); + assert( (t1 < t2)); + assert( (t1 <= t2)); + assert(!(t1 > t2)); + assert(!(t1 >= t2)); + } +#if TEST_STD_VER > 11 + { + typedef std::tuple T1; + typedef std::tuple T2; + constexpr T1 t1(1, 2, 3); + constexpr T2 t2(1, 2, 4); + static_assert( (t1 < t2), ""); + static_assert( (t1 <= t2), ""); + static_assert(!(t1 > t2), ""); + static_assert(!(t1 >= t2), ""); + } +#endif +} diff --git a/sources/cxx-stl/llvm-libc++abi/repo.prop b/sources/cxx-stl/llvm-libc++abi/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/cxx-stl/llvm-libc++abi/repo.prop +++ b/sources/cxx-stl/llvm-libc++abi/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/cxx-stl/stlport/repo.prop b/sources/cxx-stl/stlport/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/cxx-stl/stlport/repo.prop +++ b/sources/cxx-stl/stlport/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/cxx-stl/stlport/src/c_locale_win32/c_wlocale_win32.c b/sources/cxx-stl/stlport/src/c_locale_win32/c_wlocale_win32.c index 4fbe825a2d1a76f75990ffce5d402f0171e9340a..a12659b685dfb8a90e2d7c2336b92ae1b9fd733b 100644 --- a/sources/cxx-stl/stlport/src/c_locale_win32/c_wlocale_win32.c +++ b/sources/cxx-stl/stlport/src/c_locale_win32/c_wlocale_win32.c @@ -1,314 +1,314 @@ -/* - * Copyright (c) 2007 2008 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#if defined (_STLP_USE_SAFE_STRING_FUNCTIONS) -# define _STLP_WCSNCPY(D, DS, S, C) wcsncpy_s(D, DS, S, C) -#else -# define _STLP_WCSNCPY(D, DS, S, C) wcsncpy(D, S, C) -#endif - -static const wchar_t* __wtrue_name = L"true"; -static const wchar_t* __wfalse_name = L"false"; - -typedef struct _Locale_codecvt { - _Locale_lcid_t lc; - UINT cp; - unsigned char cleads[256 / CHAR_BIT]; - unsigned char max_char_size; - DWORD mbtowc_flags; - DWORD wctomb_flags; -} _Locale_codecvt_t; - -/* Ctype */ -_Locale_mask_t _WLocale_ctype(_Locale_ctype_t* ltype, wint_t c, - _Locale_mask_t which_bits) { - wchar_t buf[2]; - WORD out[2]; - buf[0] = c; buf[1] = 0; - GetStringTypeW(CT_CTYPE1, buf, -1, out); - _STLP_MARK_PARAMETER_AS_UNUSED(ltype) - return (_Locale_mask_t)(MapCtypeMask(out[0]) & which_bits); -} - -wint_t _WLocale_tolower(_Locale_ctype_t* ltype, wint_t c) { - wchar_t in_c = c; - wchar_t res; - - LCMapStringW(ltype->lc.id, LCMAP_LOWERCASE, &in_c, 1, &res, 1); - return res; -} - -wint_t _WLocale_toupper(_Locale_ctype_t* ltype, wint_t c) { - wchar_t in_c = c; - wchar_t res; - - LCMapStringW(ltype->lc.id, LCMAP_UPPERCASE, &in_c, 1, &res, 1); - return res; -} - -_Locale_codecvt_t* _Locale_codecvt_create(const char * name, _Locale_lcid_t* lc_hint, int *__err_code) { - char cp_name[MAX_CP_LEN + 1]; - unsigned char *ptr; - CPINFO CPInfo; - int i; - - _Locale_codecvt_t *lcodecvt = (_Locale_codecvt_t*)malloc(sizeof(_Locale_codecvt_t)); - - if (!lcodecvt) { *__err_code = _STLP_LOC_NO_MEMORY; return lcodecvt; } - memset(lcodecvt, 0, sizeof(_Locale_codecvt_t)); - - if (__GetLCIDFromName(name, &lcodecvt->lc.id, cp_name, lc_hint) == -1) - { free(lcodecvt); *__err_code = _STLP_LOC_UNKNOWN_NAME; return NULL; } - - lcodecvt->cp = atoi(cp_name); - if (!GetCPInfo(lcodecvt->cp, &CPInfo)) { free(lcodecvt); return NULL; } - - if (lcodecvt->cp != CP_UTF7 && lcodecvt->cp != CP_UTF8) { - lcodecvt->mbtowc_flags = MB_PRECOMPOSED; - lcodecvt->wctomb_flags = WC_COMPOSITECHECK | WC_SEPCHARS; - } - lcodecvt->max_char_size = CPInfo.MaxCharSize; - - if (CPInfo.MaxCharSize > 1) { - for (ptr = (unsigned char*)CPInfo.LeadByte; *ptr && *(ptr + 1); ptr += 2) - for (i = *ptr; i <= *(ptr + 1); ++i) lcodecvt->cleads[i / CHAR_BIT] |= (0x01 << i % CHAR_BIT); - } - - return lcodecvt; -} - -char const* _Locale_codecvt_name(const _Locale_codecvt_t* lcodecvt, char* buf) { - char cp_buf[MAX_CP_LEN + 1]; - my_ltoa(lcodecvt->cp, cp_buf); - return __GetLocaleName(lcodecvt->lc.id, cp_buf, buf); -} - -void _Locale_codecvt_destroy(_Locale_codecvt_t* lcodecvt) { - if (!lcodecvt) return; - - free(lcodecvt); -} - -int _WLocale_mb_cur_max (_Locale_codecvt_t * lcodecvt) -{ return lcodecvt->max_char_size; } - -int _WLocale_mb_cur_min (_Locale_codecvt_t *lcodecvt) { - _STLP_MARK_PARAMETER_AS_UNUSED(lcodecvt) - return 1; -} - -int _WLocale_is_stateless (_Locale_codecvt_t * lcodecvt) -{ return (lcodecvt->max_char_size == 1) ? 1 : 0; } - -static int __isleadbyte(int i, unsigned char *ctable) { - unsigned char c = (unsigned char)i; - return (ctable[c / CHAR_BIT] & (0x01 << c % CHAR_BIT)); -} - -static int __mbtowc(_Locale_codecvt_t *l, wchar_t *dst, const char *from, unsigned int count) { - int result; - - if (l->cp == CP_UTF7 || l->cp == CP_UTF8) { - result = MultiByteToWideChar(l->cp, l->mbtowc_flags, from, count, dst, 1); - if (result == 0) { - switch (GetLastError()) { - case ERROR_NO_UNICODE_TRANSLATION: - return -2; - default: - return -1; - } - } - } - else { - if (count == 1 && __isleadbyte(*from, l->cleads)) return (size_t)-2; - result = MultiByteToWideChar(l->cp, l->mbtowc_flags, from, count, dst, 1); - if (result == 0) return -1; - } - - return result; -} - -size_t _WLocale_mbtowc(_Locale_codecvt_t *lcodecvt, wchar_t *to, - const char *from, size_t n, mbstate_t *shift_state) { - int result; - _STLP_MARK_PARAMETER_AS_UNUSED(shift_state) - if (lcodecvt->max_char_size == 1) { /* Single byte encoding. */ - result = MultiByteToWideChar(lcodecvt->cp, lcodecvt->mbtowc_flags, from, 1, to, 1); - if (result == 0) return (size_t)-1; - return result; - } - else { /* Multi byte encoding. */ - int retval; - unsigned int count = 1; - while (n--) { - retval = __mbtowc(lcodecvt, to, from, count); - if (retval == -2) - { if (++count > ((unsigned int)lcodecvt->max_char_size)) return (size_t)-1; } - else if (retval == -1) - { return (size_t)-1; } - else - { return count; } - } - return (size_t)-2; - } -} - -size_t _WLocale_wctomb(_Locale_codecvt_t *lcodecvt, char *to, size_t n, - const wchar_t c, mbstate_t *shift_state) { - int size = WideCharToMultiByte(lcodecvt->cp, lcodecvt->wctomb_flags, &c, 1, NULL, 0, NULL, NULL); - - if (!size) return (size_t)-1; - if ((size_t)size > n) return (size_t)-2; - - if (n > INT_MAX) - /* Limiting the output buf size to INT_MAX seems like reasonable to transform a single wchar_t. */ - n = INT_MAX; - - WideCharToMultiByte(lcodecvt->cp, lcodecvt->wctomb_flags, &c, 1, to, (int)n, NULL, NULL); - - _STLP_MARK_PARAMETER_AS_UNUSED(shift_state) - return (size_t)size; -} - -size_t _WLocale_unshift(_Locale_codecvt_t *lcodecvt, mbstate_t *st, - char *buf, size_t n, char **next) { - /* _WLocale_wctomb do not even touch to st, there is nothing to unshift in this localization implementation. */ - _STLP_MARK_PARAMETER_AS_UNUSED(lcodecvt) - _STLP_MARK_PARAMETER_AS_UNUSED(st) - _STLP_MARK_PARAMETER_AS_UNUSED(&n) - *next = buf; - return 0; -} - -/* Collate */ -/* This function takes care of the potential size_t DWORD different size. */ -static int _WLocale_strcmp_aux(_Locale_collate_t* lcol, - const wchar_t* s1, size_t n1, - const wchar_t* s2, size_t n2) { - int result = CSTR_EQUAL; - while (n1 > 0 || n2 > 0) { - DWORD size1 = trim_size_t_to_DWORD(n1); - DWORD size2 = trim_size_t_to_DWORD(n2); - result = CompareStringW(lcol->lc.id, 0, s1, size1, s2, size2); - if (result != CSTR_EQUAL) - break; - n1 -= size1; - n2 -= size2; - } - return result; -} - -int _WLocale_strcmp(_Locale_collate_t* lcol, - const wchar_t* s1, size_t n1, - const wchar_t* s2, size_t n2) { - int result; - result = _WLocale_strcmp_aux(lcol, s1, n1, s2, n2); - return (result == CSTR_EQUAL) ? 0 : (result == CSTR_LESS_THAN) ? -1 : 1; -} - -size_t _WLocale_strxfrm(_Locale_collate_t* lcol, - wchar_t* dst, size_t dst_size, - const wchar_t* src, size_t src_size) { - int result, i; - - /* see _Locale_strxfrm: */ - if (src_size > INT_MAX) { - if (dst != 0) { - _STLP_WCSNCPY(dst, dst_size, src, src_size); - } - return src_size; - } - if (dst_size > INT_MAX) { - dst_size = INT_MAX; - } - result = LCMapStringW(lcol->lc.id, LCMAP_SORTKEY, src, (int)src_size, dst, (int)dst_size); - if (result != 0 && dst != 0) { - for (i = result - 1; i >= 0; --i) { - dst[i] = ((unsigned char*)dst)[i]; - } - } - return result != 0 ? result - 1 : 0; -} - -/* Numeric */ -wchar_t _WLocale_decimal_point(_Locale_numeric_t* lnum) { - wchar_t buf[4]; - GetLocaleInfoW(lnum->lc.id, LOCALE_SDECIMAL, buf, 4); - return buf[0]; -} - -wchar_t _WLocale_thousands_sep(_Locale_numeric_t* lnum) { - wchar_t buf[4]; - GetLocaleInfoW(lnum->lc.id, LOCALE_STHOUSAND, buf, 4); - return buf[0]; -} - -const wchar_t * _WLocale_true(_Locale_numeric_t* lnum, wchar_t* buf, size_t bufSize) { - _STLP_MARK_PARAMETER_AS_UNUSED(lnum) - _STLP_MARK_PARAMETER_AS_UNUSED(buf) - _STLP_MARK_PARAMETER_AS_UNUSED(&bufSize) - return __wtrue_name; -} - -const wchar_t * _WLocale_false(_Locale_numeric_t* lnum, wchar_t* buf, size_t bufSize) { - _STLP_MARK_PARAMETER_AS_UNUSED(lnum) - _STLP_MARK_PARAMETER_AS_UNUSED(buf) - _STLP_MARK_PARAMETER_AS_UNUSED(&bufSize) - return __wfalse_name; -} - -/* Monetary */ -const wchar_t* _WLocale_int_curr_symbol(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(lmon->lc.id, LOCALE_SINTLSYMBOL, buf, (int)bufSize); return buf; } - -const wchar_t* _WLocale_currency_symbol(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(lmon->lc.id, LOCALE_SCURRENCY, buf, (int)bufSize); return buf; } - -wchar_t _WLocale_mon_decimal_point(_Locale_monetary_t * lmon) -{ return lmon->decimal_point[0]; } - -wchar_t _WLocale_mon_thousands_sep(_Locale_monetary_t * lmon) -{ return lmon->thousands_sep[0]; } - -const wchar_t* _WLocale_positive_sign(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(lmon->lc.id, LOCALE_SPOSITIVESIGN, buf, (int)bufSize); return buf; } - -const wchar_t* _WLocale_negative_sign(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(lmon->lc.id, LOCALE_SNEGATIVESIGN, buf, (int)bufSize); return buf; } - -/* Time */ -const wchar_t * _WLocale_full_monthname(_Locale_time_t * ltime, int month, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_SMONTHNAME1 + month, buf, (int)bufSize); return buf; } - -const wchar_t * _WLocale_abbrev_monthname(_Locale_time_t * ltime, int month, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_SABBREVMONTHNAME1 + month, buf, (int)bufSize); return buf; } - -const wchar_t * _WLocale_full_dayofweek(_Locale_time_t * ltime, int day, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_SDAYNAME1 + day, buf, (int)bufSize); return buf; } - -const wchar_t * _WLocale_abbrev_dayofweek(_Locale_time_t * ltime, int day, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_SABBREVDAYNAME1 + day, buf, (int)bufSize); return buf; } - -const wchar_t* _WLocale_am_str(_Locale_time_t* ltime, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_S1159, buf, (int)bufSize); return buf; } - -const wchar_t* _WLocale_pm_str(_Locale_time_t* ltime, - wchar_t* buf, size_t bufSize) -{ GetLocaleInfoW(ltime->lc.id, LOCALE_S2359, buf, (int)bufSize); return buf; } +/* + * Copyright (c) 2007 2008 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#if defined (_STLP_USE_SAFE_STRING_FUNCTIONS) +# define _STLP_WCSNCPY(D, DS, S, C) wcsncpy_s(D, DS, S, C) +#else +# define _STLP_WCSNCPY(D, DS, S, C) wcsncpy(D, S, C) +#endif + +static const wchar_t* __wtrue_name = L"true"; +static const wchar_t* __wfalse_name = L"false"; + +typedef struct _Locale_codecvt { + _Locale_lcid_t lc; + UINT cp; + unsigned char cleads[256 / CHAR_BIT]; + unsigned char max_char_size; + DWORD mbtowc_flags; + DWORD wctomb_flags; +} _Locale_codecvt_t; + +/* Ctype */ +_Locale_mask_t _WLocale_ctype(_Locale_ctype_t* ltype, wint_t c, + _Locale_mask_t which_bits) { + wchar_t buf[2]; + WORD out[2]; + buf[0] = c; buf[1] = 0; + GetStringTypeW(CT_CTYPE1, buf, -1, out); + _STLP_MARK_PARAMETER_AS_UNUSED(ltype) + return (_Locale_mask_t)(MapCtypeMask(out[0]) & which_bits); +} + +wint_t _WLocale_tolower(_Locale_ctype_t* ltype, wint_t c) { + wchar_t in_c = c; + wchar_t res; + + LCMapStringW(ltype->lc.id, LCMAP_LOWERCASE, &in_c, 1, &res, 1); + return res; +} + +wint_t _WLocale_toupper(_Locale_ctype_t* ltype, wint_t c) { + wchar_t in_c = c; + wchar_t res; + + LCMapStringW(ltype->lc.id, LCMAP_UPPERCASE, &in_c, 1, &res, 1); + return res; +} + +_Locale_codecvt_t* _Locale_codecvt_create(const char * name, _Locale_lcid_t* lc_hint, int *__err_code) { + char cp_name[MAX_CP_LEN + 1]; + unsigned char *ptr; + CPINFO CPInfo; + int i; + + _Locale_codecvt_t *lcodecvt = (_Locale_codecvt_t*)malloc(sizeof(_Locale_codecvt_t)); + + if (!lcodecvt) { *__err_code = _STLP_LOC_NO_MEMORY; return lcodecvt; } + memset(lcodecvt, 0, sizeof(_Locale_codecvt_t)); + + if (__GetLCIDFromName(name, &lcodecvt->lc.id, cp_name, lc_hint) == -1) + { free(lcodecvt); *__err_code = _STLP_LOC_UNKNOWN_NAME; return NULL; } + + lcodecvt->cp = atoi(cp_name); + if (!GetCPInfo(lcodecvt->cp, &CPInfo)) { free(lcodecvt); return NULL; } + + if (lcodecvt->cp != CP_UTF7 && lcodecvt->cp != CP_UTF8) { + lcodecvt->mbtowc_flags = MB_PRECOMPOSED; + lcodecvt->wctomb_flags = WC_COMPOSITECHECK | WC_SEPCHARS; + } + lcodecvt->max_char_size = CPInfo.MaxCharSize; + + if (CPInfo.MaxCharSize > 1) { + for (ptr = (unsigned char*)CPInfo.LeadByte; *ptr && *(ptr + 1); ptr += 2) + for (i = *ptr; i <= *(ptr + 1); ++i) lcodecvt->cleads[i / CHAR_BIT] |= (0x01 << i % CHAR_BIT); + } + + return lcodecvt; +} + +char const* _Locale_codecvt_name(const _Locale_codecvt_t* lcodecvt, char* buf) { + char cp_buf[MAX_CP_LEN + 1]; + my_ltoa(lcodecvt->cp, cp_buf); + return __GetLocaleName(lcodecvt->lc.id, cp_buf, buf); +} + +void _Locale_codecvt_destroy(_Locale_codecvt_t* lcodecvt) { + if (!lcodecvt) return; + + free(lcodecvt); +} + +int _WLocale_mb_cur_max (_Locale_codecvt_t * lcodecvt) +{ return lcodecvt->max_char_size; } + +int _WLocale_mb_cur_min (_Locale_codecvt_t *lcodecvt) { + _STLP_MARK_PARAMETER_AS_UNUSED(lcodecvt) + return 1; +} + +int _WLocale_is_stateless (_Locale_codecvt_t * lcodecvt) +{ return (lcodecvt->max_char_size == 1) ? 1 : 0; } + +static int __isleadbyte(int i, unsigned char *ctable) { + unsigned char c = (unsigned char)i; + return (ctable[c / CHAR_BIT] & (0x01 << c % CHAR_BIT)); +} + +static int __mbtowc(_Locale_codecvt_t *l, wchar_t *dst, const char *from, unsigned int count) { + int result; + + if (l->cp == CP_UTF7 || l->cp == CP_UTF8) { + result = MultiByteToWideChar(l->cp, l->mbtowc_flags, from, count, dst, 1); + if (result == 0) { + switch (GetLastError()) { + case ERROR_NO_UNICODE_TRANSLATION: + return -2; + default: + return -1; + } + } + } + else { + if (count == 1 && __isleadbyte(*from, l->cleads)) return (size_t)-2; + result = MultiByteToWideChar(l->cp, l->mbtowc_flags, from, count, dst, 1); + if (result == 0) return -1; + } + + return result; +} + +size_t _WLocale_mbtowc(_Locale_codecvt_t *lcodecvt, wchar_t *to, + const char *from, size_t n, mbstate_t *shift_state) { + int result; + _STLP_MARK_PARAMETER_AS_UNUSED(shift_state) + if (lcodecvt->max_char_size == 1) { /* Single byte encoding. */ + result = MultiByteToWideChar(lcodecvt->cp, lcodecvt->mbtowc_flags, from, 1, to, 1); + if (result == 0) return (size_t)-1; + return result; + } + else { /* Multi byte encoding. */ + int retval; + unsigned int count = 1; + while (n--) { + retval = __mbtowc(lcodecvt, to, from, count); + if (retval == -2) + { if (++count > ((unsigned int)lcodecvt->max_char_size)) return (size_t)-1; } + else if (retval == -1) + { return (size_t)-1; } + else + { return count; } + } + return (size_t)-2; + } +} + +size_t _WLocale_wctomb(_Locale_codecvt_t *lcodecvt, char *to, size_t n, + const wchar_t c, mbstate_t *shift_state) { + int size = WideCharToMultiByte(lcodecvt->cp, lcodecvt->wctomb_flags, &c, 1, NULL, 0, NULL, NULL); + + if (!size) return (size_t)-1; + if ((size_t)size > n) return (size_t)-2; + + if (n > INT_MAX) + /* Limiting the output buf size to INT_MAX seems like reasonable to transform a single wchar_t. */ + n = INT_MAX; + + WideCharToMultiByte(lcodecvt->cp, lcodecvt->wctomb_flags, &c, 1, to, (int)n, NULL, NULL); + + _STLP_MARK_PARAMETER_AS_UNUSED(shift_state) + return (size_t)size; +} + +size_t _WLocale_unshift(_Locale_codecvt_t *lcodecvt, mbstate_t *st, + char *buf, size_t n, char **next) { + /* _WLocale_wctomb do not even touch to st, there is nothing to unshift in this localization implementation. */ + _STLP_MARK_PARAMETER_AS_UNUSED(lcodecvt) + _STLP_MARK_PARAMETER_AS_UNUSED(st) + _STLP_MARK_PARAMETER_AS_UNUSED(&n) + *next = buf; + return 0; +} + +/* Collate */ +/* This function takes care of the potential size_t DWORD different size. */ +static int _WLocale_strcmp_aux(_Locale_collate_t* lcol, + const wchar_t* s1, size_t n1, + const wchar_t* s2, size_t n2) { + int result = CSTR_EQUAL; + while (n1 > 0 || n2 > 0) { + DWORD size1 = trim_size_t_to_DWORD(n1); + DWORD size2 = trim_size_t_to_DWORD(n2); + result = CompareStringW(lcol->lc.id, 0, s1, size1, s2, size2); + if (result != CSTR_EQUAL) + break; + n1 -= size1; + n2 -= size2; + } + return result; +} + +int _WLocale_strcmp(_Locale_collate_t* lcol, + const wchar_t* s1, size_t n1, + const wchar_t* s2, size_t n2) { + int result; + result = _WLocale_strcmp_aux(lcol, s1, n1, s2, n2); + return (result == CSTR_EQUAL) ? 0 : (result == CSTR_LESS_THAN) ? -1 : 1; +} + +size_t _WLocale_strxfrm(_Locale_collate_t* lcol, + wchar_t* dst, size_t dst_size, + const wchar_t* src, size_t src_size) { + int result, i; + + /* see _Locale_strxfrm: */ + if (src_size > INT_MAX) { + if (dst != 0) { + _STLP_WCSNCPY(dst, dst_size, src, src_size); + } + return src_size; + } + if (dst_size > INT_MAX) { + dst_size = INT_MAX; + } + result = LCMapStringW(lcol->lc.id, LCMAP_SORTKEY, src, (int)src_size, dst, (int)dst_size); + if (result != 0 && dst != 0) { + for (i = result - 1; i >= 0; --i) { + dst[i] = ((unsigned char*)dst)[i]; + } + } + return result != 0 ? result - 1 : 0; +} + +/* Numeric */ +wchar_t _WLocale_decimal_point(_Locale_numeric_t* lnum) { + wchar_t buf[4]; + GetLocaleInfoW(lnum->lc.id, LOCALE_SDECIMAL, buf, 4); + return buf[0]; +} + +wchar_t _WLocale_thousands_sep(_Locale_numeric_t* lnum) { + wchar_t buf[4]; + GetLocaleInfoW(lnum->lc.id, LOCALE_STHOUSAND, buf, 4); + return buf[0]; +} + +const wchar_t * _WLocale_true(_Locale_numeric_t* lnum, wchar_t* buf, size_t bufSize) { + _STLP_MARK_PARAMETER_AS_UNUSED(lnum) + _STLP_MARK_PARAMETER_AS_UNUSED(buf) + _STLP_MARK_PARAMETER_AS_UNUSED(&bufSize) + return __wtrue_name; +} + +const wchar_t * _WLocale_false(_Locale_numeric_t* lnum, wchar_t* buf, size_t bufSize) { + _STLP_MARK_PARAMETER_AS_UNUSED(lnum) + _STLP_MARK_PARAMETER_AS_UNUSED(buf) + _STLP_MARK_PARAMETER_AS_UNUSED(&bufSize) + return __wfalse_name; +} + +/* Monetary */ +const wchar_t* _WLocale_int_curr_symbol(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(lmon->lc.id, LOCALE_SINTLSYMBOL, buf, (int)bufSize); return buf; } + +const wchar_t* _WLocale_currency_symbol(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(lmon->lc.id, LOCALE_SCURRENCY, buf, (int)bufSize); return buf; } + +wchar_t _WLocale_mon_decimal_point(_Locale_monetary_t * lmon) +{ return lmon->decimal_point[0]; } + +wchar_t _WLocale_mon_thousands_sep(_Locale_monetary_t * lmon) +{ return lmon->thousands_sep[0]; } + +const wchar_t* _WLocale_positive_sign(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(lmon->lc.id, LOCALE_SPOSITIVESIGN, buf, (int)bufSize); return buf; } + +const wchar_t* _WLocale_negative_sign(_Locale_monetary_t * lmon, wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(lmon->lc.id, LOCALE_SNEGATIVESIGN, buf, (int)bufSize); return buf; } + +/* Time */ +const wchar_t * _WLocale_full_monthname(_Locale_time_t * ltime, int month, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_SMONTHNAME1 + month, buf, (int)bufSize); return buf; } + +const wchar_t * _WLocale_abbrev_monthname(_Locale_time_t * ltime, int month, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_SABBREVMONTHNAME1 + month, buf, (int)bufSize); return buf; } + +const wchar_t * _WLocale_full_dayofweek(_Locale_time_t * ltime, int day, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_SDAYNAME1 + day, buf, (int)bufSize); return buf; } + +const wchar_t * _WLocale_abbrev_dayofweek(_Locale_time_t * ltime, int day, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_SABBREVDAYNAME1 + day, buf, (int)bufSize); return buf; } + +const wchar_t* _WLocale_am_str(_Locale_time_t* ltime, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_S1159, buf, (int)bufSize); return buf; } + +const wchar_t* _WLocale_pm_str(_Locale_time_t* ltime, + wchar_t* buf, size_t bufSize) +{ GetLocaleInfoW(ltime->lc.id, LOCALE_S2359, buf, (int)bufSize); return buf; } diff --git a/sources/cxx-stl/system/repo.prop b/sources/cxx-stl/system/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/cxx-stl/system/repo.prop +++ b/sources/cxx-stl/system/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/third_party/googletest/codegear/gtest.cbproj b/sources/third_party/googletest/codegear/gtest.cbproj index 285bb2a87b4b9df902f726c564abb75d3cad35c2..95c3054b851dab4d8fe68c563d955266831824c2 100644 --- a/sources/third_party/googletest/codegear/gtest.cbproj +++ b/sources/third_party/googletest/codegear/gtest.cbproj @@ -1,138 +1,138 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 3 - - - 4 - - - 5 - - - 6 - - - 7 - - - 8 - - - 0 - - - 1 - - - 2 - - - 9 - - - 10 - - - 11 - - - 12 - - - 14 - - - 13 - - - 15 - - - 16 - - - 17 - - - 18 - - - Cfg_1 - - - Cfg_2 - - + + + + {bca37a72-5b07-46cf-b44e-89f8e06451a2} + Release + + + true + + + true + true + Base + + + true + true + Base + + + true + lib + JPHNE + NO_STRICT + true + true + CppStaticLibrary + true + rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi + false + $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. + rtl.lib;vcl.lib + 32 + $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk + + + false + false + true + _DEBUG;$(Defines) + true + false + true + None + DEBUG + true + Debug + true + true + true + $(BDS)\lib\debug;$(ILINK_LibraryPath) + Full + true + + + NDEBUG;$(Defines) + Release + $(BDS)\lib\release;$(ILINK_LibraryPath) + None + + + CPlusPlusBuilder.Personality + CppStaticLibrary + +FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse + + + CodeGear C++Builder Office 2000 Servers Package + CodeGear C++Builder Office XP Servers Package + FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 + + + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 0 + + + 1 + + + 2 + + + 9 + + + 10 + + + 11 + + + 12 + + + 14 + + + 13 + + + 15 + + + 16 + + + 17 + + + 18 + + + Cfg_1 + + + Cfg_2 + + \ No newline at end of file diff --git a/sources/third_party/googletest/codegear/gtest.groupproj b/sources/third_party/googletest/codegear/gtest.groupproj index 849f4c4b8102ce81dac26662db40a5e0e659042a..faf31cab640bb4540812f88f6fa0facc6f010db0 100644 --- a/sources/third_party/googletest/codegear/gtest.groupproj +++ b/sources/third_party/googletest/codegear/gtest.groupproj @@ -1,54 +1,54 @@ - - - {c1d923e0-6cba-4332-9b6f-3420acbf5091} - - - - - - - - - Default.Personality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + {c1d923e0-6cba-4332-9b6f-3420acbf5091} + + + + + + + + + Default.Personality + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sources/third_party/googletest/codegear/gtest_all.cc b/sources/third_party/googletest/codegear/gtest_all.cc index ba7ad68ad1caa5fb20838c700896a4182ba59d9f..121b2d80e83ec7cd0fdf7dc671272dc54f6e9f0d 100644 --- a/sources/third_party/googletest/codegear/gtest_all.cc +++ b/sources/third_party/googletest/codegear/gtest_all.cc @@ -1,38 +1,38 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// C++Builder's IDE cannot build a static library from files with hyphens -// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . -// This file serves as a workaround. - -#include "src/gtest-all.cc" +// Copyright 2009, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Josh Kelley (joshkel@gmail.com) +// +// Google C++ Testing Framework (Google Test) +// +// C++Builder's IDE cannot build a static library from files with hyphens +// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . +// This file serves as a workaround. + +#include "src/gtest-all.cc" diff --git a/sources/third_party/googletest/codegear/gtest_link.cc b/sources/third_party/googletest/codegear/gtest_link.cc index b955ebf2f9110e6353c687cc3942348da797cb50..918eccd19b7dafa32b529380b709238c9e3a362b 100644 --- a/sources/third_party/googletest/codegear/gtest_link.cc +++ b/sources/third_party/googletest/codegear/gtest_link.cc @@ -1,40 +1,40 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// Links gtest.lib and gtest_main.lib into the current project in C++Builder. -// This means that these libraries can't be renamed, but it's the only way to -// ensure that Debug versus Release test builds are linked against the -// appropriate Debug or Release build of the libraries. - -#pragma link "gtest.lib" -#pragma link "gtest_main.lib" +// Copyright 2009, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: Josh Kelley (joshkel@gmail.com) +// +// Google C++ Testing Framework (Google Test) +// +// Links gtest.lib and gtest_main.lib into the current project in C++Builder. +// This means that these libraries can't be renamed, but it's the only way to +// ensure that Debug versus Release test builds are linked against the +// appropriate Debug or Release build of the libraries. + +#pragma link "gtest.lib" +#pragma link "gtest_main.lib" diff --git a/sources/third_party/googletest/codegear/gtest_main.cbproj b/sources/third_party/googletest/codegear/gtest_main.cbproj index fae32cb29b61973407f7823592a706c279ae5b25..d76ce1398ff39333337725f4466da563e9833581 100644 --- a/sources/third_party/googletest/codegear/gtest_main.cbproj +++ b/sources/third_party/googletest/codegear/gtest_main.cbproj @@ -1,82 +1,82 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 0 - - - Cfg_1 - - - Cfg_2 - - - + + + + {bca37a72-5b07-46cf-b44e-89f8e06451a2} + Release + + + true + + + true + true + Base + + + true + true + Base + + + true + lib + JPHNE + NO_STRICT + true + true + CppStaticLibrary + true + rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi + false + $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. + rtl.lib;vcl.lib + 32 + $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk + + + false + false + true + _DEBUG;$(Defines) + true + false + true + None + DEBUG + true + Debug + true + true + true + $(BDS)\lib\debug;$(ILINK_LibraryPath) + Full + true + + + NDEBUG;$(Defines) + Release + $(BDS)\lib\release;$(ILINK_LibraryPath) + None + + + CPlusPlusBuilder.Personality + CppStaticLibrary + +FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse + CodeGear C++Builder Office 2000 Servers Package + CodeGear C++Builder Office XP Servers Package + FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 + + + + + 0 + + + Cfg_1 + + + Cfg_2 + + + diff --git a/sources/third_party/googletest/codegear/gtest_unittest.cbproj b/sources/third_party/googletest/codegear/gtest_unittest.cbproj index 33f70563469b1b53f3397061af6ed21c9d131c20..dc5db8e4da59457fc8efaa2d6ccea87c6b84dbd5 100644 --- a/sources/third_party/googletest/codegear/gtest_unittest.cbproj +++ b/sources/third_party/googletest/codegear/gtest_unittest.cbproj @@ -1,88 +1,88 @@ - - - - {eea63393-5ac5-4b9c-8909-d75fef2daa41} - Release - - - true - - - true - true - Base - - - true - true - Base - - - exe - true - NO_STRICT - JPHNE - true - ..\test - true - CppConsoleApplication - true - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;.. - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test - true - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppConsoleApplication - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test2NO_STRICTSTRICT - - - - - 0 - - - 1 - - - Cfg_1 - - - Cfg_2 - - + + + + {eea63393-5ac5-4b9c-8909-d75fef2daa41} + Release + + + true + + + true + true + Base + + + true + true + Base + + + exe + true + NO_STRICT + JPHNE + true + ..\test + true + CppConsoleApplication + true + true + rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi + false + $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;.. + $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test + true + + + false + false + true + _DEBUG;$(Defines) + true + false + true + None + DEBUG + true + Debug + true + true + true + $(BDS)\lib\debug;$(ILINK_LibraryPath) + Full + true + + + NDEBUG;$(Defines) + Release + $(BDS)\lib\release;$(ILINK_LibraryPath) + None + + + CPlusPlusBuilder.Personality + CppConsoleApplication + +FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse + + + CodeGear C++Builder Office 2000 Servers Package + CodeGear C++Builder Office XP Servers Package + FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test2NO_STRICTSTRICT + + + + + 0 + + + 1 + + + Cfg_1 + + + Cfg_2 + + \ No newline at end of file diff --git a/sources/third_party/googletest/repo.prop b/sources/third_party/googletest/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/third_party/googletest/repo.prop +++ b/sources/third_party/googletest/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/third_party/shaderc/CHANGES b/sources/third_party/shaderc/CHANGES index eda9691be51802a4d41abb74372735b31072d4e9..f90eece6204a56297362d0a8282554c1b50769d1 100644 --- a/sources/third_party/shaderc/CHANGES +++ b/sources/third_party/shaderc/CHANGES @@ -1,10 +1,16 @@ Revision history for Shaderc -v2017.2-dev 2017-03-10 +v2018.0-dev 2018-02-27 + - Start v2018.0-dev + - Support -fhlsl_functionality1 (also -fhlsl-functionality1) + +v2017.2 2018-02-27 - Add a shared library version of libshaderc - Support GLSL 4.6 and ESSL 3.2 - - Add options for automatically set bindings for (uniform) resources that + - Fail compilation if a resource does not have a binding. + - Add options for automatically setting bindings for (uniform) resources that don't have bindings set in shader source. + - Add options for automatically setting locations for pipline inputs and outputs. - Add option for using HLSL IO mappings as expressed in source. - Add options for setting resource binding base numbers. - Add option to use HLSL resource register numbers for bindings. @@ -12,8 +18,10 @@ v2017.2-dev 2017-03-10 (This change is inherited from Glslang commit 7cca140.) - HLSL compilation runs SPIR-V "legalization" transforms to reduce manipulation of opaque handles (e.g. images), to satisfy Vulkan rules. - - Adapt to Glslang generator version number update to 2, to indicate - a fix for code generation for atomicCounterDecrement. + - Adapt to Glslang generator version numbers: + - To 2: a fix for code generation for atomicCounterDecrement. + - To 3: change memory barrier semantics masks + - To 4: generate more access chains for swizzles - CMake install rules uses GNUInstallDirs. For example, install to lib64 when that is the norm for the target system. diff --git a/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.h b/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.h index d24e67dc3149623d8a8248d8e42653e61366bf51..093bb12123302502d7f0e2cabeb6a89656ad1952 100644 --- a/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.h +++ b/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.h @@ -80,14 +80,28 @@ typedef enum { } shaderc_shader_kind; typedef enum { - shaderc_target_env_vulkan, // create SPIR-V under Vulkan semantics - shaderc_target_env_opengl, // create SPIR-V under OpenGL semantics + shaderc_target_env_vulkan, // create SPIR-V under Vulkan semantics + shaderc_target_env_opengl, // create SPIR-V under OpenGL semantics + // NOTE: SPIR-V code generation is not supported for shaders under OpenGL + // compatibility profile. shaderc_target_env_opengl_compat, // create SPIR-V under OpenGL semantics, // including compatibility profile // functions shaderc_target_env_default = shaderc_target_env_vulkan } shaderc_target_env; +typedef enum { + // For Vulkan, use Vulkan's mapping of version numbers to integers. + // See vulkan.h + shaderc_env_version_vulkan_1_0 = (((uint32_t)1 << 22)), + shaderc_env_version_vulkan_1_1 = (((uint32_t)1 << 22) | (1 << 12)), + // For OpenGL, use the number from #version in shaders. + // TODO(dneto): Currently no difference between OpenGL 4.5 and 4.6. + // See glslang/Standalone/Standalone.cpp + // TODO(dneto): Glslang doesn't accept a OpenGL client version of 460. + shaderc_env_version_opengl_4_5 = 450, +} shaderc_env_version; + typedef enum { shaderc_profile_none, // Used if and only if GLSL version did not specify // profiles. @@ -110,6 +124,7 @@ typedef enum { typedef enum { shaderc_optimization_level_zero, // no optimization shaderc_optimization_level_size, // optimize towards reducing code size + shaderc_optimization_level_performance, // optimize towards performance } shaderc_optimization_level; // Resource limits. @@ -383,7 +398,9 @@ SHADERC_EXPORT void shaderc_compile_options_set_suppress_warnings( // Sets the target shader environment, affecting which warnings or errors will // be issued. The version will be for distinguishing between different versions -// of the target environment. "0" is the only supported version at this point +// of the target environment. The version value should be either 0 or +// a value listed in shaderc_env_version. The 0 value maps to Vulkan 1.0 if +// |target| is Vulkan, and it maps to OpenGL 4.5 if |target| is OpenGL. SHADERC_EXPORT void shaderc_compile_options_set_target_env( shaderc_compile_options_t options, shaderc_target_env target, @@ -432,6 +449,11 @@ SHADERC_EXPORT void shaderc_compile_options_set_binding_base_for_stage( shaderc_compile_options_t options, shaderc_shader_kind shader_kind, shaderc_uniform_kind kind, uint32_t base); +// Sets whether the compiler should automatically assign locations to +// uniform variables that don't have explicit locations in the shader source. +SHADERC_EXPORT void shaderc_compile_options_set_auto_map_locations( + shaderc_compile_options_t options, bool auto_map); + // Sets a descriptor set and binding for an HLSL register in the given stage. // This method keeps a copy of the string data. SHADERC_EXPORT void shaderc_compile_options_set_hlsl_register_set_and_binding_for_stage( @@ -444,6 +466,11 @@ SHADERC_EXPORT void shaderc_compile_options_set_hlsl_register_set_and_binding( shaderc_compile_options_t options, const char* reg, const char* set, const char* binding); +// Sets whether the compiler should enable extension +// SPV_GOOGLE_hlsl_functionality1. +SHADERC_EXPORT void shaderc_compile_options_set_hlsl_functionality1( + shaderc_compile_options_t options, bool enable); + // An opaque handle to the results of a call to any shaderc_compile_into_*() // function. typedef struct shaderc_compilation_result* shaderc_compilation_result_t; diff --git a/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp b/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp index 1c5574317975f7262aa78b77f1d2e8f764c92deb..964d1aa38d2dc469a477f6aa686f5a2b43002b32 100644 --- a/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp +++ b/sources/third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp @@ -180,6 +180,8 @@ class CompileOptions { // Handles shaderc_include_result_release_fn callbacks. virtual void ReleaseInclude(shaderc_include_result* data) = 0; + + virtual ~IncluderInterface() = default; }; // Sets the includer instance for libshaderc to call during compilation, as @@ -227,10 +229,10 @@ class CompileOptions { } // Sets the target shader environment, affecting which warnings or errors will - // be issued. - // The version will be for distinguishing between different versions of the - // target environment. - // "0" is the only supported version at this point + // be issued. The version will be for distinguishing between different + // versions of the target environment. The version value should be either 0 + // or a value listed in shaderc_env_version. The 0 value maps to Vulkan 1.0 + // if |target| is Vulkan, and it maps to OpenGL 4.5 if |target| is OpenGL. void SetTargetEnvironment(shaderc_target_env target, uint32_t version) { shaderc_compile_options_set_target_env(options_, target, version); } @@ -284,6 +286,12 @@ class CompileOptions { kind, base); } + // Sets whether the compiler automatically assigns locations to + // uniform variables that don't have explicit locations. + void SetAutoMapLocations(bool auto_map) { + shaderc_compile_options_set_auto_map_locations(options_, auto_map); + } + // Sets a descriptor set and binding for an HLSL register in the given stage. // Copies the parameter strings. void SetHlslRegisterSetAndBindingForStage(shaderc_shader_kind shader_kind, @@ -303,6 +311,12 @@ class CompileOptions { options_, reg.c_str(), set.c_str(), binding.c_str()); } + // Sets whether the compiler should enable extension + // SPV_GOOGLE_hlsl_functionality1. + void SetHlslFunctionality1(bool enable) { + shaderc_compile_options_set_hlsl_functionality1(options_, enable); + } + private: CompileOptions& operator=(const CompileOptions& other) = delete; shaderc_compile_options_t options_; diff --git a/sources/third_party/shaderc/libshaderc/src/shaderc.cc b/sources/third_party/shaderc/libshaderc/src/shaderc.cc index 38836b1d77a6f8ab4fc6daeb855c722a39c5b6e3..17b4c17e90beef748e8c10b84c241bec77a9d23a 100644 --- a/sources/third_party/shaderc/libshaderc/src/shaderc.cc +++ b/sources/third_party/shaderc/libshaderc/src/shaderc.cc @@ -240,8 +240,9 @@ shaderc_util::Compiler::TargetEnv GetCompilerTargetEnv(shaderc_target_env env) { // Returns the Compiler::Limit enum for the given shaderc_limit enum. shaderc_util::Compiler::Limit CompilerLimit(shaderc_limit limit) { switch (limit) { -#define RESOURCE(NAME,FIELD,CNAME) \ - case shaderc_limit_##CNAME: return shaderc_util::Compiler::Limit::NAME; +#define RESOURCE(NAME, FIELD, CNAME) \ + case shaderc_limit_##CNAME: \ + return shaderc_util::Compiler::Limit::NAME; #include "libshaderc_util/resources.inc" #undef RESOURCE default: @@ -293,11 +294,11 @@ shaderc_util::Compiler::Stage GetStage(shaderc_shader_kind kind) { return static_cast(0); } - } // anonymous namespace struct shaderc_compile_options { shaderc_target_env target_env = shaderc_target_env_default; + uint32_t target_env_version = 0; shaderc_util::Compiler compiler; shaderc_include_resolve_fn include_resolver = nullptr; shaderc_include_result_release_fn include_result_releaser = nullptr; @@ -327,8 +328,7 @@ void shaderc_compile_options_add_macro_definition( } void shaderc_compile_options_set_source_language( - shaderc_compile_options_t options, - shaderc_source_language set_lang) { + shaderc_compile_options_t options, shaderc_source_language set_lang) { auto lang = shaderc_util::Compiler::SourceLanguage::GLSL; if (set_lang == shaderc_source_language_hlsl) lang = shaderc_util::Compiler::SourceLanguage::HLSL; @@ -347,6 +347,9 @@ void shaderc_compile_options_set_optimization_level( case shaderc_optimization_level_size: opt_level = shaderc_util::Compiler::OptimizationLevel::Size; break; + case shaderc_optimization_level_performance: + opt_level = shaderc_util::Compiler::OptimizationLevel::Performance; + break; default: break; } @@ -391,10 +394,8 @@ void shaderc_compile_options_set_suppress_warnings( void shaderc_compile_options_set_target_env(shaderc_compile_options_t options, shaderc_target_env target, uint32_t version) { - // "version" reserved for future use, intended to distinguish between - // different versions of a target environment options->target_env = target; - options->compiler.SetTargetEnv(GetCompilerTargetEnv(target)); + options->compiler.SetTargetEnv(GetCompilerTargetEnv(target), version); } void shaderc_compile_options_set_warnings_as_errors( @@ -402,8 +403,8 @@ void shaderc_compile_options_set_warnings_as_errors( options->compiler.SetWarningsAsErrors(); } -void shaderc_compile_options_set_limit( - shaderc_compile_options_t options, shaderc_limit limit, int value) { +void shaderc_compile_options_set_limit(shaderc_compile_options_t options, + shaderc_limit limit, int value) { options->compiler.SetLimit(CompilerLimit(limit), value); } @@ -417,8 +418,8 @@ void shaderc_compile_options_set_hlsl_io_mapping( options->compiler.SetHlslIoMapping(hlsl_iomap); } -void shaderc_compile_options_set_hlsl_offsets( - shaderc_compile_options_t options, bool hlsl_offsets) { +void shaderc_compile_options_set_hlsl_offsets(shaderc_compile_options_t options, + bool hlsl_offsets) { options->compiler.SetHlslOffsets(hlsl_offsets); } @@ -435,6 +436,11 @@ void shaderc_compile_options_set_binding_base_for_stage( GetUniformKind(kind), base); } +void shaderc_compile_options_set_auto_map_locations( + shaderc_compile_options_t options, bool auto_map) { + options->compiler.SetAutoMapLocations(auto_map); +} + void shaderc_compile_options_set_hlsl_register_set_and_binding_for_stage( shaderc_compile_options_t options, shaderc_shader_kind shader_kind, const char* reg, const char* set, const char* binding) { @@ -448,6 +454,11 @@ void shaderc_compile_options_set_hlsl_register_set_and_binding( options->compiler.SetHlslRegisterSetAndBinding(reg, set, binding); } +void shaderc_compile_options_set_hlsl_functionality1( + shaderc_compile_options_t options, bool enable) { + options->compiler.EnableHlslFunctionality1(enable); +} + shaderc_compiler_t shaderc_compiler_initialize() { static shaderc_util::GlslangInitializer* initializer = new shaderc_util::GlslangInitializer; diff --git a/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/compiler.h b/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/compiler.h index 35c74dcd75494b0bd3bc6c0bf5d8151249aa237a..298344ebc2c62de4df231d3fb3912bbc67bdf90d 100644 --- a/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/compiler.h +++ b/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/compiler.h @@ -31,6 +31,9 @@ #include "resources.h" #include "string_piece.h" +// Fix a typo in glslang/Public/ShaderLang.h +#define EShTargetClientVersion EshTargetClientVersion + namespace shaderc_util { // To break recursive including. This header is already included in @@ -103,9 +106,18 @@ class Compiler { // Target environment. enum class TargetEnv { - Vulkan, - OpenGL, - OpenGLCompat, + Vulkan, // Default to Vulkan 1.0 + OpenGL, // Default to OpenGL 4.5 + OpenGLCompat, // Deprecated. + }; + + // Target environment versions. These numbers match those used by Glslang. + enum class TargetEnvVersion : uint32_t { + // For Vulkan, use numbering scheme from vulkan.h + Vulkan_1_0 = ((1 << 22)), // Default to Vulkan 1.0 + Vulkan_1_1 = ((1 << 22) | (1 << 12)), // Default to Vulkan 1.0 + // For OpenGL, use the numbering from #version in shaders. + OpenGL_4_5 = 450, }; enum class OutputType { @@ -116,8 +128,9 @@ class Compiler { // Supported optimization levels. enum class OptimizationLevel { - Zero, // No optimization. - Size, // Optimization towards reducing code size. + Zero, // No optimization. + Size, // Optimization towards reducing code size. + Performance, // Optimization towards better performance. }; // Resource limits. These map to the "max*" fields in glslang::TBuiltInResource. @@ -180,13 +193,16 @@ class Compiler { generate_debug_info_(false), enabled_opt_passes_(), target_env_(TargetEnv::Vulkan), + target_env_version_(0), // Resolve default later. source_language_(SourceLanguage::GLSL), limits_(kDefaultTBuiltInResource), auto_bind_uniforms_(false), auto_binding_base_(), + auto_map_locations_(false), hlsl_iomap_(false), hlsl_offsets_(false), hlsl_legalization_enabled_(true), + hlsl_functionality1_enabled_(false), hlsl_explicit_bindings_() {} // Requests that the compiler place debug information into the object code, @@ -200,6 +216,9 @@ class Compiler { // Enables or disables HLSL legalization passes. void EnableHlslLegalization(bool hlsl_legalization_enabled); + // Enables or disables extension SPV_GOOGLE_hlsl_functionality1 + void EnableHlslFunctionality1(bool enable); + // When a warning is encountered it treat it as an error. void SetWarningsAsErrors(); @@ -213,8 +232,11 @@ class Compiler { void AddMacroDefinition(const char* macro, size_t macro_length, const char* definition, size_t definition_length); - // Sets the target environment. - void SetTargetEnv(TargetEnv env); + // Sets the target environment, including version. The version value should + // be 0 or one of the values from TargetEnvVersion. The 0 version value maps + // to Vulkan 1.0 if the target environment is Vulkan, and it maps to OpenGL + // 4.5 if the target environment is OpenGL. + void SetTargetEnv(TargetEnv env, uint32_t version = 0); // Sets the souce language. void SetSourceLanguage(SourceLanguage lang); @@ -250,6 +272,10 @@ class Compiler { auto_binding_base_[static_cast(stage)][static_cast(kind)] = base; } + // Sets whether the compiler automatically assigns locations to + // uniform variables that don't have explicit locations. + void SetAutoMapLocations(bool auto_map) { auto_map_locations_ = auto_map; } + // Use HLSL IO mapping rules for bindings. Default is false. void SetHlslIoMapping(bool hlsl_iomap) { hlsl_iomap_ = hlsl_iomap; } @@ -424,6 +450,12 @@ class Compiler { // implementation of glslang. TargetEnv target_env_; + // The version number of the target environment. The numbering scheme is + // particular to each target environment. If this is 0, then use a default + // for that particular target environment. See libshaders/shaderc/shaderc.h + // for those defaults. + uint32_t target_env_version_; + // The source language. Defaults to GLSL. SourceLanguage source_language_; @@ -439,6 +471,10 @@ class Compiler { // The default is zero. uint32_t auto_binding_base_[kNumStages][kNumUniformKinds]; + // True if the compiler should automatically map uniforms that don't + // have explicit locations. + bool auto_map_locations_; + // True if the compiler should use HLSL IO mapping rules when compiling HLSL. bool hlsl_iomap_; @@ -450,6 +486,9 @@ class Compiler { // source language is HLSL. bool hlsl_legalization_enabled_; + // True if the compiler should support extension SPV_GOOGLE_hlsl_functionality1. + bool hlsl_functionality1_enabled_; + // A sequence of triples, each triple representing a specific HLSL register // name, and the set and binding numbers it should be mapped to, but in // the form of strings. This is how Glslang wants to consume the data. diff --git a/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/spirv_tools_wrapper.h b/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/spirv_tools_wrapper.h index f5b031526a8241372cc26d6023a5cbc65d849c8b..7350fb139614a00f3524c32635798a769107fcee 100644 --- a/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/spirv_tools_wrapper.h +++ b/sources/third_party/shaderc/libshaderc_util/include/libshaderc_util/spirv_tools_wrapper.h @@ -39,26 +39,14 @@ bool SpirvToolsDisassemble(Compiler::TargetEnv env, // The ids of a list of supported optimization passes. enum class PassId { + // SPIRV-Tools standard recipes + kLegalizationPasses, + kPerformancePasses, + kSizePasses, + + // SPIRV-Tools specific passes kNullPass, kStripDebugInfo, - kEliminateDeadFunctions, - kFlattenDecoration, - kFreezeSpecConstantValue, - kFoldSpecConstantOpAndComposite, - kUnifyConstant, - kEliminateDeadConstant, - kStrengthReduction, - kBlockMerge, - kInlineExhaustive, - kInlineOpaque, - kLocalSingleBlockLoadStoreElim, - kDeadBranchElim, - kLocalMultiStoreElim, - kLocalAccessChainConvert, - kLocalSingleStoreElim, - kInsertExtractElim, - kCommonUniformElim, - kAggressiveDCE, kCompactIds, }; diff --git a/sources/third_party/shaderc/libshaderc_util/src/compiler.cc b/sources/third_party/shaderc/libshaderc_util/src/compiler.cc index da235495fe0b305b6b53c5d7e3c93a10d96ceade..b0457685c4c850f3b1c99ec4bc89872be9c7cdf6 100644 --- a/sources/third_party/shaderc/libshaderc_util/src/compiler.cc +++ b/sources/third_party/shaderc/libshaderc_util/src/compiler.cc @@ -93,6 +93,53 @@ EShMessages GetMessageRules(shaderc_util::Compiler::TargetEnv env, return result; } +// A GlslangClientInfo captures target client version and desired SPIR-V +// version. +struct GlslangClientInfo { + bool valid_client = false; + glslang::EShClient client = glslang::EShClientNone; + bool valid_client_version = false; + glslang::EShTargetClientVersion client_version; + glslang::EShTargetLanguage target_language = glslang::EShTargetSpv; + glslang::EShTargetLanguageVersion target_language_version = + glslang::EShTargetSpv_1_0; +}; + +// Returns the mappings to Glslang client, client version, and SPIR-V version. +// Also indicates whether the input values were valid. +GlslangClientInfo GetGlslangClientInfo(shaderc_util::Compiler::TargetEnv env, + uint32_t version) { + GlslangClientInfo result; + + using shaderc_util::Compiler; + switch (env) { + case Compiler::TargetEnv::Vulkan: + result.valid_client = true; + result.client = glslang::EShClientVulkan; + if (version == 0 || + version == uint32_t(Compiler::TargetEnvVersion::Vulkan_1_0)) { + result.client_version = glslang::EShTargetVulkan_1_0; + result.valid_client_version = true; + } else if (version == uint32_t(Compiler::TargetEnvVersion::Vulkan_1_1)) { + result.client_version = glslang::EShTargetVulkan_1_1; + result.valid_client_version = true; + result.target_language_version = glslang::EShTargetSpv_1_3; + } + break; + case Compiler::TargetEnv::OpenGLCompat: // TODO(dneto): remove this + case Compiler::TargetEnv::OpenGL: + result.valid_client = true; + result.client = glslang::EShClientOpenGL; + if (version == 0 || + version == uint32_t(Compiler::TargetEnvVersion::OpenGL_4_5)) { + result.client_version = glslang::EShTargetOpenGL_450; + result.valid_client_version = true; + } + break; + } + return result; +} + } // anonymous namespace namespace shaderc_util { @@ -139,6 +186,25 @@ std::tuple, size_t> Compiler::Compile( std::vector& compilation_output_data = std::get<1>(result_tuple); size_t& compilation_output_data_size_in_bytes = std::get<2>(result_tuple); + // Check target environment. + const auto target_client_info = + GetGlslangClientInfo(target_env_, target_env_version_); + if (!target_client_info.valid_client) { + *error_stream << "error:" << error_tag + << ": Invalid target client environment " << int(target_env_); + *total_warnings = 0; + *total_errors = 1; + return result_tuple; + } + if (!target_client_info.valid_client_version) { + *error_stream << "error:" << error_tag << ": Invalid target client version " + << target_env_version_ << " for environment " + << int(target_env_); + *total_warnings = 0; + *total_errors = 1; + return result_tuple; + } + auto token = initializer->Acquire(); EShLanguage used_shader_stage = forced_shader_stage; const std::string macro_definitions = @@ -210,16 +276,26 @@ std::tuple, size_t> Compiler::Compile( shader.setPreamble(preamble.c_str()); shader.setEntryPoint(entry_point_name); shader.setAutoMapBindings(auto_bind_uniforms_); + shader.setAutoMapLocations(auto_map_locations_); const auto& bases = auto_binding_base_[static_cast(used_shader_stage)]; shader.setShiftImageBinding(bases[static_cast(UniformKind::Image)]); shader.setShiftSamplerBinding(bases[static_cast(UniformKind::Sampler)]); shader.setShiftTextureBinding(bases[static_cast(UniformKind::Texture)]); shader.setShiftUboBinding(bases[static_cast(UniformKind::Buffer)]); - shader.setShiftSsboBinding(bases[static_cast(UniformKind::StorageBuffer)]); - shader.setShiftUavBinding(bases[static_cast(UniformKind::UnorderedAccessView)]); + shader.setShiftSsboBinding( + bases[static_cast(UniformKind::StorageBuffer)]); + shader.setShiftUavBinding( + bases[static_cast(UniformKind::UnorderedAccessView)]); shader.setHlslIoMapping(hlsl_iomap_); shader.setResourceSetBinding( hlsl_explicit_bindings_[static_cast(used_shader_stage)]); + shader.setEnvClient(target_client_info.client, + target_client_info.client_version); + shader.setEnvTarget(target_client_info.target_language, + target_client_info.target_language_version); + if (hlsl_functionality1_enabled_) { + shader.setEnvTargetHlslFunctionality1(); + } // TODO(dneto): Generate source-level debug info if requested. bool success = shader.parse( @@ -249,12 +325,12 @@ std::tuple, size_t> Compiler::Compile( options.optimizeSize = false; // Note the call to GlslangToSpv also populates compilation_output_data. glslang::GlslangToSpv(*program.getIntermediate(used_shader_stage), spirv, - &options); + &options); // Set the tool field (the top 16-bits) in the generator word to // 'Shaderc over Glslang'. - const uint32_t shaderc_generator_word = 13; // From SPIR-V XML Registry - const uint32_t generator_word_index = 2; // SPIR-V 2.3: Physical layout + const uint32_t shaderc_generator_word = 13; // From SPIR-V XML Registry + const uint32_t generator_word_index = 2; // SPIR-V 2.3: Physical layout assert(spirv.size() > generator_word_index); spirv[generator_word_index] = (spirv[generator_word_index] & 0xffff) | (shaderc_generator_word << 16); @@ -264,27 +340,11 @@ std::tuple, size_t> Compiler::Compile( if (hlsl_legalization_enabled_ && source_language_ == SourceLanguage::HLSL) { // If from HLSL, run this passes to "legalize" the SPIR-V for Vulkan // eg. forward and remove memory writes of opaque types. - opt_passes.push_back(PassId::kInlineExhaustive); - opt_passes.push_back(PassId::kLocalAccessChainConvert); - opt_passes.push_back(PassId::kLocalSingleBlockLoadStoreElim); - opt_passes.push_back(PassId::kLocalSingleStoreElim); - opt_passes.push_back(PassId::kInsertExtractElim); - opt_passes.push_back(PassId::kAggressiveDCE); - opt_passes.push_back(PassId::kDeadBranchElim); - opt_passes.push_back(PassId::kBlockMerge); - opt_passes.push_back(PassId::kLocalMultiStoreElim); - opt_passes.push_back(PassId::kInsertExtractElim); - opt_passes.push_back(PassId::kAggressiveDCE); - opt_passes.push_back(PassId::kEliminateDeadConstant); - opt_passes.push_back(PassId::kEliminateDeadFunctions); - - // TODO(atgoo, dneto0, greg-lunarg): - // Add PassId::kCommonUniformElim when AMD driver issues are resolved. - // Add dead var/type elimination passes when available. + opt_passes.push_back(PassId::kLegalizationPasses); } - opt_passes.insert( - opt_passes.end(), enabled_opt_passes_.begin(), enabled_opt_passes_.end()); + opt_passes.insert(opt_passes.end(), enabled_opt_passes_.begin(), + enabled_opt_passes_.end()); if (!opt_passes.empty()) { std::string opt_errors; @@ -323,7 +383,10 @@ void Compiler::AddMacroDefinition(const char* macro, size_t macro_length, definition ? std::string(definition, definition_length) : ""; } -void Compiler::SetTargetEnv(Compiler::TargetEnv env) { target_env_ = env; } +void Compiler::SetTargetEnv(Compiler::TargetEnv env, uint32_t version) { + target_env_ = env; + target_env_version_ = version; +} void Compiler::SetSourceLanguage(Compiler::SourceLanguage lang) { source_language_ = lang; @@ -355,7 +418,13 @@ void Compiler::SetOptimizationLevel(Compiler::OptimizationLevel level) { if (!generate_debug_info_) { enabled_opt_passes_.push_back(PassId::kStripDebugInfo); } - enabled_opt_passes_.push_back(PassId::kUnifyConstant); + enabled_opt_passes_.push_back(PassId::kSizePasses); + break; + case OptimizationLevel::Performance: + if (!generate_debug_info_) { + enabled_opt_passes_.push_back(PassId::kStripDebugInfo); + } + enabled_opt_passes_.push_back(PassId::kPerformancePasses); break; default: break; @@ -366,6 +435,10 @@ void Compiler::EnableHlslLegalization(bool hlsl_legalization_enabled) { hlsl_legalization_enabled_ = hlsl_legalization_enabled; } +void Compiler::EnableHlslFunctionality1(bool enable) { + hlsl_functionality1_enabled_ = enable; +} + void Compiler::SetSuppressWarnings() { suppress_warnings_ = true; } std::tuple Compiler::PreprocessShader( @@ -379,6 +452,25 @@ std::tuple Compiler::PreprocessShader( shader.setStringsWithLengthsAndNames(&shader_strings, &shader_lengths, &string_names, 1); shader.setPreamble(shader_preamble.data()); + auto target_client_info = + GetGlslangClientInfo(target_env_, target_env_version_); + if (!target_client_info.valid_client) { + std::ostringstream os; + os << "error:" << error_tag << ": Invalid target client " + << int(target_env_); + return std::make_tuple(false, "", os.str()); + } + if (!target_client_info.valid_client_version) { + std::ostringstream os; + os << "error:" << error_tag << ": Invalid target client " + << int(target_env_version_) << " for environmnent " << int(target_env_); + return std::make_tuple(false, "", os.str()); + } + shader.setEnvClient(target_client_info.client, + target_client_info.client_version); + if (hlsl_functionality1_enabled_) { + shader.setEnvTargetHlslFunctionality1(); + } // The preprocessor might be sensitive to the target environment. // So combine the existing rules with the just-give-me-preprocessor-output @@ -603,4 +695,4 @@ std::vector ConvertStringToVector(const std::string& str) { return result_vec; } -} // namesapce shaderc_util +} // namespace shaderc_util diff --git a/sources/third_party/shaderc/libshaderc_util/src/spirv_tools_wrapper.cc b/sources/third_party/shaderc/libshaderc_util/src/spirv_tools_wrapper.cc index 87dbfcacfe2b1797aab386489846172abed4ef15..0d6b9108e7008ecfa91a11aec862dddc74bc4af7 100644 --- a/sources/third_party/shaderc/libshaderc_util/src/spirv_tools_wrapper.cc +++ b/sources/third_party/shaderc/libshaderc_util/src/spirv_tools_wrapper.cc @@ -43,12 +43,15 @@ bool SpirvToolsDisassemble(Compiler::TargetEnv env, std::string* text_or_error) { spvtools::SpirvTools tools(SPV_ENV_VULKAN_1_0); std::ostringstream oss; - tools.SetMessageConsumer([&oss]( - spv_message_level_t, const char*, const spv_position_t& position, - const char* message) { oss << position.index << ": " << message; }); - const bool success = tools.Disassemble( - binary, text_or_error, SPV_BINARY_TO_TEXT_OPTION_INDENT | - SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + tools.SetMessageConsumer([&oss](spv_message_level_t, const char*, + const spv_position_t& position, + const char* message) { + oss << position.index << ": " << message; + }); + const bool success = + tools.Disassemble(binary, text_or_error, + SPV_BINARY_TO_TEXT_OPTION_INDENT | + SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); if (!success) { *text_or_error = oss.str(); } @@ -99,66 +102,21 @@ bool SpirvToolsOptimize(Compiler::TargetEnv env, for (const auto& pass : enabled_passes) { switch (pass) { + case PassId::kLegalizationPasses: + optimizer.RegisterLegalizationPasses(); + break; + case PassId::kPerformancePasses: + optimizer.RegisterPerformancePasses(); + break; + case PassId::kSizePasses: + optimizer.RegisterSizePasses(); + break; case PassId::kNullPass: // We actually don't need to do anything for null pass. break; case PassId::kStripDebugInfo: optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass()); break; - case PassId::kEliminateDeadFunctions: - optimizer.RegisterPass(spvtools::CreateEliminateDeadFunctionsPass()); - break; - case PassId::kFlattenDecoration: - optimizer.RegisterPass(spvtools::CreateFlattenDecorationPass()); - break; - case PassId::kFreezeSpecConstantValue: - optimizer.RegisterPass(spvtools::CreateFreezeSpecConstantValuePass()); - break; - case PassId::kFoldSpecConstantOpAndComposite: - optimizer.RegisterPass(spvtools::CreateFoldSpecConstantOpAndCompositePass()); - break; - case PassId::kUnifyConstant: - optimizer.RegisterPass(spvtools::CreateUnifyConstantPass()); - break; - case PassId::kEliminateDeadConstant: - optimizer.RegisterPass(spvtools::CreateEliminateDeadConstantPass()); - break; - case PassId::kStrengthReduction: - optimizer.RegisterPass(spvtools::CreateStrengthReductionPass()); - break; - case PassId::kBlockMerge: - optimizer.RegisterPass(spvtools::CreateBlockMergePass()); - break; - case PassId::kInlineExhaustive: - optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass()); - break; - case PassId::kInlineOpaque: - optimizer.RegisterPass(spvtools::CreateInlineOpaquePass()); - break; - case PassId::kLocalSingleBlockLoadStoreElim: - optimizer.RegisterPass(spvtools::CreateLocalSingleBlockLoadStoreElimPass()); - break; - case PassId::kDeadBranchElim: - optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass()); - break; - case PassId::kLocalMultiStoreElim: - optimizer.RegisterPass(spvtools::CreateLocalMultiStoreElimPass()); - break; - case PassId::kLocalAccessChainConvert: - optimizer.RegisterPass(spvtools::CreateLocalAccessChainConvertPass()); - break; - case PassId::kLocalSingleStoreElim: - optimizer.RegisterPass(spvtools::CreateLocalSingleStoreElimPass()); - break; - case PassId::kInsertExtractElim: - optimizer.RegisterPass(spvtools::CreateInsertExtractElimPass()); - break; - case PassId::kCommonUniformElim: - optimizer.RegisterPass(spvtools::CreateCommonUniformElimPass()); - break; - case PassId::kAggressiveDCE: - optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); - break; case PassId::kCompactIds: optimizer.RegisterPass(spvtools::CreateCompactIdsPass()); break; diff --git a/sources/third_party/shaderc/repo.prop b/sources/third_party/shaderc/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/third_party/shaderc/repo.prop +++ b/sources/third_party/shaderc/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/third_party/shaderc/third_party/Android.mk b/sources/third_party/shaderc/third_party/Android.mk index 0ce3dba3fc36008dd64b93a528bc02bd9a99491d..9e67eb05a4d73d3ea4e71353a4fe1192457cd3d9 100644 --- a/sources/third_party/shaderc/third_party/Android.mk +++ b/sources/third_party/shaderc/third_party/Android.mk @@ -71,6 +71,7 @@ LOCAL_EXPORT_C_INCLUDES:=$(GLSLANG_LOCAL_PATH) LOCAL_SRC_FILES:= \ glslang/GenericCodeGen/CodeGen.cpp \ glslang/GenericCodeGen/Link.cpp \ + glslang/MachineIndependent/attribute.cpp \ glslang/MachineIndependent/Constant.cpp \ glslang/MachineIndependent/glslang_tab.cpp \ glslang/MachineIndependent/InfoSink.cpp \ diff --git a/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.cpp b/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.cpp index 2eb912c422f963dce6b098764cf923de82cce641..abea9108b15e69dda5fef3854415cd12292889e9 100644 --- a/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.cpp +++ b/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.cpp @@ -38,13 +38,17 @@ #include "InitializeDll.h" #include "../glslang/Include/InitializeGlobals.h" - #include "../glslang/Public/ShaderLang.h" +#include "../glslang/Include/PoolAlloc.h" namespace glslang { OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX; +// Per-process initialization. +// Needs to be called at least once before parsing, etc. is done. +// Will also do thread initialization for the calling thread; other +// threads will need to do that explicitly. bool InitProcess() { glslang::GetGlobalLock(); @@ -85,7 +89,9 @@ bool InitProcess() return true; } - +// Per-thread scoped initialization. +// Must be called at least once by each new thread sharing the +// symbol tables, etc., needed to parse. bool InitThread() { // @@ -99,17 +105,21 @@ bool InitThread() if (OS_GetTLSValue(ThreadInitializeIndex) != 0) return true; - InitializeMemoryPools(); - if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) { assert(0 && "InitThread(): Unable to set init flag."); return false; } + glslang::SetThreadPoolAllocator(nullptr); + return true; } - +// Not necessary to call this: InitThread() is reentrant, and the need +// to do per thread tear down has been removed. +// +// This is kept, with memory management removed, to satisfy any exiting +// calls to it that rely on it. bool DetachThread() { bool success = true; @@ -125,14 +135,18 @@ bool DetachThread() assert(0 && "DetachThread(): Unable to clear init flag."); success = false; } - - FreeGlobalPools(); - } return success; } +// Not necessary to call this: InitProcess() is reentrant. +// +// This is kept, with memory management removed, to satisfy any exiting +// calls to it that rely on it. +// +// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for +// process-scoped memory tear down. bool DetachProcess() { bool success = true; @@ -140,12 +154,8 @@ bool DetachProcess() if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) return true; - ShFinalize(); - success = DetachThread(); - FreePoolIndex(); - OS_FreeTLSIndex(ThreadInitializeIndex); ThreadInitializeIndex = OS_INVALID_TLS_INDEX; diff --git a/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.h b/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.h index 60b2b1593d6f1febe349c44a0822e1960bf82e82..661cee4d240693c0d51d77c58570b183ab0d94e9 100644 --- a/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.h +++ b/sources/third_party/shaderc/third_party/glslang/OGLCompilersDLL/InitializeDll.h @@ -40,8 +40,8 @@ namespace glslang { bool InitProcess(); bool InitThread(); -bool DetachThread(); -bool DetachProcess(); +bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it +bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it } // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.AMD.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.AMD.h index 7e97be38fe74ec56abf84cb47af34bd7714b4dba..009d2f1cf09bc476e08d1859c34608c87ff6aaa0 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.AMD.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.AMD.h @@ -27,13 +27,8 @@ #ifndef GLSLextAMD_H #define GLSLextAMD_H -enum BuiltIn; -enum Capability; -enum Decoration; -enum Op; - static const int GLSLextAMDVersion = 100; -static const int GLSLextAMDRevision = 6; +static const int GLSLextAMDRevision = 7; // SPV_AMD_shader_ballot static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot"; @@ -104,14 +99,10 @@ static const char* const E_SPV_AMD_gpu_shader_int16 = "SPV_AMD_gpu_shader_int16" // SPV_AMD_shader_image_load_store_lod static const char* const E_SPV_AMD_shader_image_load_store_lod = "SPV_AMD_shader_image_load_store_lod"; -static const Capability CapabilityImageReadWriteLodAMD = static_cast(5015); - // SPV_AMD_shader_fragment_mask static const char* const E_SPV_AMD_shader_fragment_mask = "SPV_AMD_shader_fragment_mask"; -static const Capability CapabilityFragmentMaskAMD = static_cast(5010); - -static const Op OpFragmentMaskFetchAMD = static_cast(5011); -static const Op OpFragmentFetchAMD = static_cast(5012); +// SPV_AMD_gpu_shader_half_float_fetch +static const char* const E_SPV_AMD_gpu_shader_half_float_fetch = "SPV_AMD_gpu_shader_half_float_fetch"; #endif // #ifndef GLSLextAMD_H diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.EXT.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.EXT.h new file mode 100644 index 0000000000000000000000000000000000000000..c4a243080c6c988159987c3c1cff5f9ea9dc524a --- /dev/null +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.EXT.h @@ -0,0 +1,37 @@ +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLextEXT_H +#define GLSLextEXT_H + +static const int GLSLextEXTVersion = 100; +static const int GLSLextEXTRevision = 1; + +static const char* const E_SPV_EXT_shader_stencil_export = "SPV_EXT_shader_stencil_export"; +static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shader_viewport_index_layer"; +static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fully_covered"; + +#endif // #ifndef GLSLextEXT_H diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.KHR.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.KHR.h index 2eb10ae629a9585a3c3a46b1ee352b80daf0eabd..d8ea9b67d60d129f678d2e427fc1993e6af02d8f 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.KHR.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.KHR.h @@ -27,10 +27,6 @@ #ifndef GLSLextKHR_H #define GLSLextKHR_H -enum BuiltIn; -enum Op; -enum Capability; - static const int GLSLextKHRVersion = 100; static const int GLSLextKHRRevision = 2; @@ -42,7 +38,5 @@ static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shade static const char* const E_SPV_KHR_16bit_storage = "SPV_KHR_16bit_storage"; static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class"; static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage"; -static const char* const E_SPV_EXT_shader_stencil_export = "SPV_EXT_shader_stencil_export"; -static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shader_viewport_index_layer"; #endif // #ifndef GLSLextKHR_H diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.NV.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.NV.h index c01858be4161b17b2afcdd7403f06bc140f39784..148d4b457ff62b0eecb76e0b499d8401023647d4 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.NV.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GLSL.ext.NV.h @@ -51,4 +51,7 @@ const char* const E_SPV_NV_stereo_view_rendering = "SPV_NV_stereo_view_rendering //SPV_NVX_multiview_per_view_attributes const char* const E_SPV_NVX_multiview_per_view_attributes = "SPV_NVX_multiview_per_view_attributes"; +//SPV_NV_shader_subgroup_partitioned +const char* const E_SPV_NV_shader_subgroup_partitioned = "SPV_NV_shader_subgroup_partitioned"; + #endif // #ifndef GLSLextNV_H \ No newline at end of file diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.cpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.cpp index b0e51df878e9e74596baadad2e642cef8060a3b6..d2b2dee95c72b0a34fada03d7e5c2343a5b564ba 100755 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.cpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2014-2016 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -44,6 +45,7 @@ namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" + #include "GLSL.ext.EXT.h" #ifdef AMD_EXTENSIONS #include "GLSL.ext.AMD.h" #endif @@ -52,13 +54,12 @@ namespace spv { #endif } -#ifdef ENABLE_OPT +#if ENABLE_OPT #include "spirv-tools/optimizer.hpp" #include "message.h" - #include "SPVRemapper.h" #endif -#ifdef ENABLE_OPT +#if ENABLE_OPT using namespace spvtools; #endif @@ -78,11 +79,6 @@ using namespace spvtools; namespace { -// For low-order part of the generator's magic number. Bump up -// when there is a change in the style (e.g., if SSA form changes, -// or a different instruction sequence to do something gets used). -const int GeneratorVersion = 2; - namespace { class SpecConstantOpModeGuard { public: @@ -102,7 +98,14 @@ private: spv::Builder* builder_; bool previous_flag_; }; -} + +struct OpDecorations { + spv::Decoration precision; + spv::Decoration noContraction; + spv::Decoration nonUniform; +}; + +} // namespace // // The main holder of information for translating glslang to SPIR-V. @@ -111,7 +114,8 @@ private: // class TGlslangToSpvTraverser : public glslang::TIntermTraverser { public: - TGlslangToSpvTraverser(const glslang::TIntermediate*, spv::SpvBuildLogger* logger, glslang::SpvOptions& options); + TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate*, spv::SpvBuildLogger* logger, + glslang::SpvOptions& options); virtual ~TGlslangToSpvTraverser() { } bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*); @@ -128,20 +132,27 @@ public: void dumpSpv(std::vector& out); protected: + TGlslangToSpvTraverser(TGlslangToSpvTraverser&); + TGlslangToSpvTraverser& operator=(TGlslangToSpvTraverser&); + spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier); spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier); + spv::Decoration TranslateNonUniformDecoration(const glslang::TQualifier& qualifier); spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable, bool memberDeclaration); spv::ImageFormat TranslateImageFormat(const glslang::TType& type); - spv::SelectionControlMask TranslateSelectionControl(glslang::TSelectionControl) const; - spv::LoopControlMask TranslateLoopControl(glslang::TLoopControl) const; + spv::SelectionControlMask TranslateSelectionControl(const glslang::TIntermSelection&) const; + spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const; + spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, unsigned int& dependencyLength) const; spv::StorageClass TranslateStorageClass(const glslang::TType&); + void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType); spv::Id createSpvVariable(const glslang::TIntermSymbol*); spv::Id getSampledType(const glslang::TSampler&); spv::Id getInvertedSwizzleType(const glslang::TIntermTyped&); spv::Id createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped&, spv::Id parentResult); void convertSwizzle(const glslang::TIntermAggregate&, std::vector& swizzle); spv::Id convertGlslangToSpvType(const glslang::TType& type); - spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&); + spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&, + bool lastBufferBlockMember); bool filterMember(const glslang::TType& member); spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&); @@ -154,7 +165,8 @@ protected: glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix); - void updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking, glslang::TLayoutMatrix); + void updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, + int& nextOffset, glslang::TLayoutPacking, glslang::TLayoutMatrix); void declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember); bool isShaderEntryPoint(const glslang::TIntermAggregate* node); @@ -169,28 +181,37 @@ protected: spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node); spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*); - spv::Id createBinaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison = true); - spv::Id createBinaryMatrixOperation(spv::Op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right); - spv::Id createUnaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy); - spv::Id createUnaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy); - spv::Id createConversion(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id destTypeId, spv::Id operand, glslang::TBasicType typeProxy); + spv::Id createBinaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right, + glslang::TBasicType typeProxy, bool reduceComparison = true); + spv::Id createBinaryMatrixOperation(spv::Op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right); + spv::Id createUnaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id operand, + glslang::TBasicType typeProxy); + spv::Id createUnaryMatrixOperation(spv::Op op, OpDecorations&, spv::Id typeId, spv::Id operand, + glslang::TBasicType typeProxy); + spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand, + glslang::TBasicType typeProxy); + spv::Id createConversionOperation(glslang::TOperator op, spv::Id operand, int vectorSize); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector& operands); + spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId); spv::Id getSymbolId(const glslang::TIntermSymbol* node); - void addDecoration(spv::Id id, spv::Decoration dec); - void addDecoration(spv::Id id, spv::Decoration dec, unsigned value); - void addMemberDecoration(spv::Id id, int member, spv::Decoration dec); - void addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value); spv::Id createSpvConstant(const glslang::TIntermTyped&); spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant); bool isTrivialLeaf(const glslang::TIntermTyped* node); bool isTrivial(const glslang::TIntermTyped* node); spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right); +#ifdef AMD_EXTENSIONS spv::Id getExtBuiltins(const char* name); +#endif + void addPre13Extension(const char* ext) + { + if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3) + builder.addExtension(ext); + } glslang::SpvOptions& options; spv::Function* shaderEntry; @@ -214,8 +235,10 @@ protected: std::unordered_set rValueParameters; // set of formal function parameters passed as rValues, rather than a pointer std::unordered_map functionMap; std::unordered_map structMap[glslang::ElpCount][glslang::ElmCount]; - std::unordered_map > memberRemapper; // for mapping glslang block indices to spv indices (e.g., due to hidden members) + // for mapping glslang block indices to spv indices (e.g., due to hidden members): + std::unordered_map > memberRemapper; std::stack breakForLoop; // false means break for switch + std::unordered_map counterOriginator; }; // @@ -423,6 +446,17 @@ spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qual return spv::DecorationMax; } +// If glslang type is nonUniform, return SPIR-V NonUniform decoration. +spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier) +{ + if (qualifier.isNonUniform()) { + builder.addExtension("SPV_EXT_descriptor_indexing"); + builder.addCapability(spv::CapabilityShaderNonUniformEXT); + return spv::DecorationNonUniformEXT; + } else + return spv::DecorationMax; +} + // Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate // associated capabilities when required. For some built-in variables, a capability // is generated only when using the variable in an executable instruction, but not when @@ -484,7 +518,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInSamplePosition; case glslang::EbvSampleMask: - builder.addCapability(spv::CapabilitySampleRateShading); return spv::BuiltInSampleMask; case glslang::EbvLayer: @@ -505,17 +538,17 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvInstanceIndex: return spv::BuiltInInstanceIndex; case glslang::EbvBaseVertex: - builder.addExtension(spv::E_SPV_KHR_shader_draw_parameters); + addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters); builder.addCapability(spv::CapabilityDrawParameters); return spv::BuiltInBaseVertex; case glslang::EbvBaseInstance: - builder.addExtension(spv::E_SPV_KHR_shader_draw_parameters); + addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters); builder.addCapability(spv::CapabilityDrawParameters); return spv::BuiltInBaseInstance; case glslang::EbvDrawId: - builder.addExtension(spv::E_SPV_KHR_shader_draw_parameters); + addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters); builder.addCapability(spv::CapabilityDrawParameters); return spv::BuiltInDrawIndex; @@ -581,6 +614,46 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilitySubgroupBallotKHR); return spv::BuiltInSubgroupLtMaskKHR; + case glslang::EbvNumSubgroups: + builder.addCapability(spv::CapabilityGroupNonUniform); + return spv::BuiltInNumSubgroups; + + case glslang::EbvSubgroupID: + builder.addCapability(spv::CapabilityGroupNonUniform); + return spv::BuiltInSubgroupId; + + case glslang::EbvSubgroupSize2: + builder.addCapability(spv::CapabilityGroupNonUniform); + return spv::BuiltInSubgroupSize; + + case glslang::EbvSubgroupInvocation2: + builder.addCapability(spv::CapabilityGroupNonUniform); + return spv::BuiltInSubgroupLocalInvocationId; + + case glslang::EbvSubgroupEqMask2: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + return spv::BuiltInSubgroupEqMask; + + case glslang::EbvSubgroupGeMask2: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + return spv::BuiltInSubgroupGeMask; + + case glslang::EbvSubgroupGtMask2: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + return spv::BuiltInSubgroupGtMask; + + case glslang::EbvSubgroupLeMask2: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + return spv::BuiltInSubgroupLeMask; + + case glslang::EbvSubgroupLtMask2: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + return spv::BuiltInSubgroupLtMask; #ifdef AMD_EXTENSIONS case glslang::EbvBaryCoordNoPersp: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); @@ -612,12 +685,12 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI #endif case glslang::EbvDeviceIndex: - builder.addExtension(spv::E_SPV_KHR_device_group); + addPre13Extension(spv::E_SPV_KHR_device_group); builder.addCapability(spv::CapabilityDeviceGroup); return spv::BuiltInDeviceIndex; case glslang::EbvViewIndex: - builder.addExtension(spv::E_SPV_KHR_multiview); + addPre13Extension(spv::E_SPV_KHR_multiview); builder.addCapability(spv::CapabilityMultiView); return spv::BuiltInViewIndex; @@ -652,6 +725,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityPerViewAttributesNV); } return spv::BuiltInViewportMaskPerViewNV; + case glslang::EbvFragFullyCoveredNV: + builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered); + builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT); + return spv::BuiltInFullyCoveredEXT; #endif default: return spv::BuiltInMax; @@ -746,26 +823,42 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy } } -spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(glslang::TSelectionControl selectionControl) const +spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(const glslang::TIntermSelection& selectionNode) const { - switch (selectionControl) { - case glslang::ESelectionControlNone: return spv::SelectionControlMaskNone; - case glslang::ESelectionControlFlatten: return spv::SelectionControlFlattenMask; - case glslang::ESelectionControlDontFlatten: return spv::SelectionControlDontFlattenMask; - default: return spv::SelectionControlMaskNone; - } + if (selectionNode.getFlatten()) + return spv::SelectionControlFlattenMask; + if (selectionNode.getDontFlatten()) + return spv::SelectionControlDontFlattenMask; + return spv::SelectionControlMaskNone; +} + +spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSwitchControl(const glslang::TIntermSwitch& switchNode) const +{ + if (switchNode.getFlatten()) + return spv::SelectionControlFlattenMask; + if (switchNode.getDontFlatten()) + return spv::SelectionControlDontFlattenMask; + return spv::SelectionControlMaskNone; } -spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(glslang::TLoopControl loopControl) const +// return a non-0 dependency if the dependency argument must be set +spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang::TIntermLoop& loopNode, + unsigned int& dependencyLength) const { - switch (loopControl) { - case glslang::ELoopControlNone: return spv::LoopControlMaskNone; - case glslang::ELoopControlUnroll: return spv::LoopControlUnrollMask; - case glslang::ELoopControlDontUnroll: return spv::LoopControlDontUnrollMask; - // TODO: DependencyInfinite - // TODO: DependencyLength - default: return spv::LoopControlMaskNone; + spv::LoopControlMask control = spv::LoopControlMaskNone; + + if (loopNode.getDontUnroll()) + control = control | spv::LoopControlDontUnrollMask; + if (loopNode.getUnroll()) + control = control | spv::LoopControlUnrollMask; + if (unsigned(loopNode.getLoopDependency()) == glslang::TIntermLoop::dependencyInfinite) + control = control | spv::LoopControlDependencyInfiniteMask; + else if (loopNode.getLoopDependency() > 0) { + control = control | spv::LoopControlDependencyLengthMask; + dependencyLength = loopNode.getLoopDependency(); } + + return control; } // Translate glslang type to SPIR-V storage class. @@ -785,7 +878,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T } if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) { - builder.addExtension(spv::E_SPV_KHR_storage_buffer_storage_class); + addPre13Extension(spv::E_SPV_KHR_storage_buffer_storage_class); return spv::StorageClassStorageBuffer; } @@ -810,6 +903,42 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T return spv::StorageClassFunction; } +// Add capabilities pertaining to how an array is indexed. +void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType, + const glslang::TType& indexType) +{ + if (indexType.getQualifier().isNonUniform()) { + // deal with an asserted non-uniform index + if (baseType.getBasicType() == glslang::EbtSampler) { + if (baseType.getQualifier().hasAttachment()) + builder.addCapability(spv::CapabilityInputAttachmentArrayNonUniformIndexingEXT); + else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer) + builder.addCapability(spv::CapabilityStorageTexelBufferArrayNonUniformIndexingEXT); + else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer) + builder.addCapability(spv::CapabilityUniformTexelBufferArrayNonUniformIndexingEXT); + else if (baseType.isImage()) + builder.addCapability(spv::CapabilityStorageImageArrayNonUniformIndexingEXT); + else if (baseType.isTexture()) + builder.addCapability(spv::CapabilitySampledImageArrayNonUniformIndexingEXT); + } else if (baseType.getBasicType() == glslang::EbtBlock) { + if (baseType.getQualifier().storage == glslang::EvqBuffer) + builder.addCapability(spv::CapabilityStorageBufferArrayNonUniformIndexingEXT); + else if (baseType.getQualifier().storage == glslang::EvqUniform) + builder.addCapability(spv::CapabilityUniformBufferArrayNonUniformIndexingEXT); + } + } else { + // assume a dynamically uniform index + if (baseType.getBasicType() == glslang::EbtSampler) { + if (baseType.getQualifier().hasAttachment()) + builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT); + else if (baseType.isImage() && baseType.getSampler().dim == glslang::EsdBuffer) + builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT); + else if (baseType.isTexture() && baseType.getSampler().dim == glslang::EsdBuffer) + builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT); + } + } +} + // Return whether or not the given type is something that should be tied to a // descriptor set. bool IsDescriptorResource(const glslang::TType& type) @@ -879,13 +1008,13 @@ bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifie // Implement the TGlslangToSpvTraverser class. // -TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate, +TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate* glslangIntermediate, spv::SpvBuildLogger* buildLogger, glslang::SpvOptions& options) : TIntermTraverser(true, false, true), options(options), shaderEntry(nullptr), currentFunction(nullptr), sequenceDepth(0), logger(buildLogger), - builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion, logger), + builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger), inEntryPoint(false), entryPointTerminated(false), linkageOnly(false), glslangIntermediate(glslangIntermediate) { @@ -1128,6 +1257,38 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) else builder.setAccessChainLValue(id); } + + // Process linkage-only nodes for any special additional interface work. + if (linkageOnly) { + if (glslangIntermediate->getHlslFunctionality1()) { + // Map implicit counter buffers to their originating buffers, which should have been + // seen by now, given earlier pruning of unused counters, and preservation of order + // of declaration. + if (symbol->getType().getQualifier().isUniformOrBuffer()) { + if (!glslangIntermediate->hasCounterBufferName(symbol->getName())) { + // Save possible originating buffers for counter buffers, keyed by + // making the potential counter-buffer name. + std::string keyName = symbol->getName().c_str(); + keyName = glslangIntermediate->addCounterBufferName(keyName); + counterOriginator[keyName] = symbol; + } else { + // Handle a counter buffer, by finding the saved originating buffer. + std::string keyName = symbol->getName().c_str(); + auto it = counterOriginator.find(keyName); + if (it != counterOriginator.end()) { + id = getSymbolId(it->second); + if (id != spv::NoResult) { + spv::Id counterId = getSymbolId(symbol); + if (counterId != spv::NoResult) { + builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); + builder.addDecorationId(id, spv::DecorationHlslCounterBufferGOOGLE, counterId); + } + } + } + } + } + } + } } bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) @@ -1176,8 +1337,10 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T spv::Id leftRValue = accessChainLoad(node->getLeft()->getType()); // do the operation - rValue = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getOperationPrecision()), - TranslateNoContractionDecoration(node->getType().getQualifier()), + OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), + TranslateNoContractionDecoration(node->getType().getQualifier()), + TranslateNonUniformDecoration(node->getType().getQualifier()) }; + rValue = createBinaryOperation(node->getOp(), decorations, convertGlslangToSpvType(node->getType()), leftRValue, rValue, node->getType().getBasicType()); @@ -1252,6 +1415,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T node->getRight()->traverse(this); spv::Id index = accessChainLoad(node->getRight()->getType()); + addIndirectionIndexCapabilities(node->getLeft()->getType(), node->getRight()->getType()); + // restore the saved access chain builder.setAccessChain(partial); @@ -1304,8 +1469,10 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T spv::Id right = accessChainLoad(node->getRight()->getType()); // get result - spv::Id result = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getOperationPrecision()), - TranslateNoContractionDecoration(node->getType().getQualifier()), + OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), + TranslateNoContractionDecoration(node->getType().getQualifier()), + TranslateNonUniformDecoration(node->getType().getQualifier()) }; + spv::Id result = createBinaryOperation(node->getOp(), decorations, convertGlslangToSpvType(node->getType()), left, right, node->getLeft()->getType().getBasicType()); @@ -1343,10 +1510,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI if (node->getOp() == glslang::EOpArrayLength) { // Quite special; won't want to evaluate the operand. + // Currently, the front-end does not allow .length() on an array until it is sized, + // except for the last block membeor of an SSBO. + // TODO: If this changes, link-time sized arrays might show up here, and need their + // size extracted. + // Normal .length() would have been constant folded by the front-end. // So, this has to be block.lastMember.length(). // SPV wants "block" and member number as the operands, go get them. - assert(node->getOperand()->getType().isRuntimeSizedArray()); + glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft(); block->traverse(this); unsigned int member = node->getOperand()->getAsBinaryNode()->getRight()->getAsConstantUnion()->getConstArray()[0].getUConst(); @@ -1383,20 +1555,23 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI else operand = accessChainLoad(node->getOperand()->getType()); - spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision()); - spv::Decoration noContraction = TranslateNoContractionDecoration(node->getType().getQualifier()); + OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), + TranslateNoContractionDecoration(node->getType().getQualifier()), + TranslateNonUniformDecoration(node->getType().getQualifier()) }; // it could be a conversion if (! result) - result = createConversion(node->getOp(), precision, noContraction, resultType(), operand, node->getOperand()->getBasicType()); + result = createConversion(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType()); // if not, then possibly an operation if (! result) - result = createUnaryOperation(node->getOp(), precision, noContraction, resultType(), operand, node->getOperand()->getBasicType()); + result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType()); if (result) { - if (invertedType) - result = createInvertedSwizzle(precision, *node->getOperand(), result); + if (invertedType) { + result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result); + builder.addDecoration(result, decorations.nonUniform); + } builder.clearAccessChain(); builder.setAccessChainRValue(result); @@ -1417,16 +1592,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI one = builder.makeFloatConstant(1.0F); else if (node->getBasicType() == glslang::EbtDouble) one = builder.makeDoubleConstant(1.0); -#ifdef AMD_EXTENSIONS else if (node->getBasicType() == glslang::EbtFloat16) one = builder.makeFloat16Constant(1.0F); -#endif - else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) - one = builder.makeInt64Constant(1); -#ifdef AMD_EXTENSIONS + else if (node->getBasicType() == glslang::EbtInt8 || node->getBasicType() == glslang::EbtUint8) + one = builder.makeInt8Constant(1); else if (node->getBasicType() == glslang::EbtInt16 || node->getBasicType() == glslang::EbtUint16) one = builder.makeInt16Constant(1); -#endif + else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) + one = builder.makeInt64Constant(1); else one = builder.makeIntConstant(1); glslang::TOperator op; @@ -1436,8 +1609,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI else op = glslang::EOpSub; - spv::Id result = createBinaryOperation(op, precision, - TranslateNoContractionDecoration(node->getType().getQualifier()), + spv::Id result = createBinaryOperation(op, decorations, convertGlslangToSpvType(node->getType()), operand, one, node->getType().getBasicType()); assert(result != spv::NoResult); @@ -1631,7 +1803,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructBMat4x2: case glslang::EOpConstructBMat4x3: case glslang::EOpConstructBMat4x4: -#ifdef AMD_EXTENSIONS case glslang::EOpConstructF16Mat2x2: case glslang::EOpConstructF16Mat2x3: case glslang::EOpConstructF16Mat2x4: @@ -1641,7 +1812,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructF16Mat4x2: case glslang::EOpConstructF16Mat4x3: case glslang::EOpConstructF16Mat4x4: -#endif isMatrix = true; // fall through case glslang::EOpConstructFloat: @@ -1652,16 +1822,30 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructDVec2: case glslang::EOpConstructDVec3: case glslang::EOpConstructDVec4: -#ifdef AMD_EXTENSIONS case glslang::EOpConstructFloat16: case glslang::EOpConstructF16Vec2: case glslang::EOpConstructF16Vec3: case glslang::EOpConstructF16Vec4: -#endif case glslang::EOpConstructBool: case glslang::EOpConstructBVec2: case glslang::EOpConstructBVec3: case glslang::EOpConstructBVec4: + case glslang::EOpConstructInt8: + case glslang::EOpConstructI8Vec2: + case glslang::EOpConstructI8Vec3: + case glslang::EOpConstructI8Vec4: + case glslang::EOpConstructUint8: + case glslang::EOpConstructU8Vec2: + case glslang::EOpConstructU8Vec3: + case glslang::EOpConstructU8Vec4: + case glslang::EOpConstructInt16: + case glslang::EOpConstructI16Vec2: + case glslang::EOpConstructI16Vec3: + case glslang::EOpConstructI16Vec4: + case glslang::EOpConstructUint16: + case glslang::EOpConstructU16Vec2: + case glslang::EOpConstructU16Vec3: + case glslang::EOpConstructU16Vec4: case glslang::EOpConstructInt: case glslang::EOpConstructIVec2: case glslang::EOpConstructIVec3: @@ -1678,16 +1862,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructU64Vec2: case glslang::EOpConstructU64Vec3: case glslang::EOpConstructU64Vec4: -#ifdef AMD_EXTENSIONS - case glslang::EOpConstructInt16: - case glslang::EOpConstructI16Vec2: - case glslang::EOpConstructI16Vec3: - case glslang::EOpConstructI16Vec4: - case glslang::EOpConstructUint16: - case glslang::EOpConstructU16Vec2: - case glslang::EOpConstructU16Vec3: - case glslang::EOpConstructU16Vec4: -#endif case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: { @@ -1763,10 +1937,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpMemoryBarrierImage: case glslang::EOpMemoryBarrierShared: case glslang::EOpGroupMemoryBarrier: + case glslang::EOpDeviceMemoryBarrier: case glslang::EOpAllMemoryBarrierWithGroupSync: - case glslang::EOpGroupMemoryBarrierWithGroupSync: + case glslang::EOpDeviceMemoryBarrierWithGroupSync: case glslang::EOpWorkgroupMemoryBarrier: case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: + case glslang::EOpSubgroupBarrier: + case glslang::EOpSubgroupMemoryBarrier: + case glslang::EOpSubgroupMemoryBarrierBuffer: + case glslang::EOpSubgroupMemoryBarrierImage: + case glslang::EOpSubgroupMemoryBarrierShared: noReturnValue = true; // These all have 0 operands and will naturally finish up in the code below for 0 operands break; @@ -1817,7 +1997,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt spv::Id rightId = accessChainLoad(right->getType()); builder.setLine(node->getLoc().line); - result = createBinaryOperation(binOp, precision, TranslateNoContractionDecoration(node->getType().getQualifier()), + OpDecorations decorations = { precision, + TranslateNoContractionDecoration(node->getType().getQualifier()), + TranslateNonUniformDecoration(node->getType().getQualifier()) }; + result = createBinaryOperation(binOp, decorations, resultType(), leftId, rightId, left->getType().getBasicType(), reduceComparison); @@ -1915,11 +2098,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt result = createNoArgOperation(node->getOp(), precision, resultType()); break; case 1: - result = createUnaryOperation( - node->getOp(), precision, - TranslateNoContractionDecoration(node->getType().getQualifier()), - resultType(), operands.front(), - glslangOperands[0]->getAsTyped()->getBasicType()); + { + OpDecorations decorations = { precision, + TranslateNoContractionDecoration(node->getType().getQualifier()), + TranslateNonUniformDecoration(node->getType().getQualifier()) }; + result = createUnaryOperation( + node->getOp(), decorations, + resultType(), operands.front(), + glslangOperands[0]->getAsTyped()->getBasicType()); + } break; default: result = createMiscOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); @@ -1953,18 +2140,29 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt // next layer copies r-values into memory to use the access-chain mechanism bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang::TIntermSelection* node) { - // See if it simple and safe to generate OpSelect instead of using control flow. - // Crucially, side effects must be avoided, and there are performance trade-offs. - // Return true if good idea (and safe) for OpSelect, false otherwise. - const auto selectPolicy = [&]() -> bool { - if ((!node->getType().isScalar() && !node->getType().isVector()) || - node->getBasicType() == glslang::EbtVoid) - return false; - + // See if it simple and safe, or required, to execute both sides. + // Crucially, side effects must be either semantically required or avoided, + // and there are performance trade-offs. + // Return true if required or a good idea (and safe) to execute both sides, + // false otherwise. + const auto bothSidesPolicy = [&]() -> bool { + // do we have both sides? if (node->getTrueBlock() == nullptr || node->getFalseBlock() == nullptr) return false; + // required? (unless we write additional code to look for side effects + // and make performance trade-offs if none are present) + if (!node->getShortCircuit()) + return true; + + // if not required to execute both, decide based on performance/practicality... + + // see if OpSelect can handle it + if ((!node->getType().isScalar() && !node->getType().isVector()) || + node->getBasicType() == glslang::EbtVoid) + return false; + assert(node->getType() == node->getTrueBlock() ->getAsTyped()->getType() && node->getType() == node->getFalseBlock()->getAsTyped()->getType()); @@ -1977,10 +2175,14 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang operandOkay(node->getFalseBlock()->getAsTyped()); }; - // Emit OpSelect for this selection. - const auto handleAsOpSelect = [&]() { - node->getCondition()->traverse(this); - spv::Id condition = accessChainLoad(node->getCondition()->getType()); + spv::Id result = spv::NoResult; // upcoming result selecting between trueValue and falseValue + // emit the condition before doing anything with selection + node->getCondition()->traverse(this); + spv::Id condition = accessChainLoad(node->getCondition()->getType()); + + // Find a way of executing both sides and selecting the right result. + const auto executeBothSides = [&]() -> void { + // execute both sides node->getTrueBlock()->traverse(this); spv::Id trueValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); node->getFalseBlock()->traverse(this); @@ -1988,72 +2190,98 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang builder.setLine(node->getLoc().line); - // smear condition to vector, if necessary (AST is always scalar) - if (builder.isVector(trueValue)) - condition = builder.smearScalar(spv::NoPrecision, condition, - builder.makeVectorType(builder.makeBoolType(), - builder.getNumComponents(trueValue))); + // done if void + if (node->getBasicType() == glslang::EbtVoid) + return; - spv::Id select = builder.createTriOp(spv::OpSelect, - convertGlslangToSpvType(node->getType()), condition, - trueValue, falseValue); - builder.clearAccessChain(); - builder.setAccessChainRValue(select); - }; + // emit code to select between trueValue and falseValue - // Try for OpSelect + // see if OpSelect can handle it + if (node->getType().isScalar() || node->getType().isVector()) { + // Emit OpSelect for this selection. - if (selectPolicy()) { - SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); - if (node->getType().getQualifier().isSpecConstant()) - spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); + // smear condition to vector, if necessary (AST is always scalar) + if (builder.isVector(trueValue)) + condition = builder.smearScalar(spv::NoPrecision, condition, + builder.makeVectorType(builder.makeBoolType(), + builder.getNumComponents(trueValue))); - handleAsOpSelect(); - return false; - } + // OpSelect + result = builder.createTriOp(spv::OpSelect, + convertGlslangToSpvType(node->getType()), condition, + trueValue, falseValue); - // Instead, emit control flow... - // Don't handle results as temporaries, because there will be two names - // and better to leave SSA to later passes. - spv::Id result = (node->getBasicType() == glslang::EbtVoid) - ? spv::NoResult - : builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType())); + builder.clearAccessChain(); + builder.setAccessChainRValue(result); + } else { + // We need control flow to select the result. + // TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path. + result = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType())); - // emit the condition before doing anything with selection - node->getCondition()->traverse(this); + // Selection control: + const spv::SelectionControlMask control = TranslateSelectionControl(*node); - // Selection control: - const spv::SelectionControlMask control = TranslateSelectionControl(node->getSelectionControl()); + // make an "if" based on the value created by the condition + spv::Builder::If ifBuilder(condition, control, builder); - // make an "if" based on the value created by the condition - spv::Builder::If ifBuilder(accessChainLoad(node->getCondition()->getType()), control, builder); + // emit the "then" statement + builder.createStore(trueValue, result); + ifBuilder.makeBeginElse(); + // emit the "else" statement + builder.createStore(falseValue, result); - // emit the "then" statement - if (node->getTrueBlock() != nullptr) { - node->getTrueBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result); - } + // finish off the control flow + ifBuilder.makeEndIf(); - if (node->getFalseBlock() != nullptr) { - ifBuilder.makeBeginElse(); - // emit the "else" statement - node->getFalseBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result); - } + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + } + }; - // finish off the control flow - ifBuilder.makeEndIf(); + // Execute the one side needed, as per the condition + const auto executeOneSide = [&]() { + // Always emit control flow. + if (node->getBasicType() != glslang::EbtVoid) + result = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType())); - if (result != spv::NoResult) { - // GLSL only has r-values as the result of a :?, but - // if we have an l-value, that can be more efficient if it will - // become the base of a complex r-value expression, because the - // next layer copies r-values into memory to use the access-chain mechanism - builder.clearAccessChain(); - builder.setAccessChainLValue(result); - } + // Selection control: + const spv::SelectionControlMask control = TranslateSelectionControl(*node); + + // make an "if" based on the value created by the condition + spv::Builder::If ifBuilder(condition, control, builder); + + // emit the "then" statement + if (node->getTrueBlock() != nullptr) { + node->getTrueBlock()->traverse(this); + if (result != spv::NoResult) + builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result); + } + + if (node->getFalseBlock() != nullptr) { + ifBuilder.makeBeginElse(); + // emit the "else" statement + node->getFalseBlock()->traverse(this); + if (result != spv::NoResult) + builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result); + } + + // finish off the control flow + ifBuilder.makeEndIf(); + + if (result != spv::NoResult) { + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + } + }; + + // Try for OpSelect (or a requirement to execute both sides) + if (bothSidesPolicy()) { + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); + if (node->getType().getQualifier().isSpecConstant()) + spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); + executeBothSides(); + } else + executeOneSide(); return false; } @@ -2065,7 +2293,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T spv::Id selector = accessChainLoad(node->getCondition()->getAsTyped()->getType()); // Selection control: - const spv::SelectionControlMask control = TranslateSelectionControl(node->getSelectionControl()); + const spv::SelectionControlMask control = TranslateSwitchControl(*node); // browse the children to sort out code segments int defaultSegment = -1; @@ -2125,9 +2353,8 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn builder.createBranch(&blocks.head); // Loop control: - const spv::LoopControlMask control = TranslateLoopControl(node->getLoopControl()); - - // TODO: dependency length + unsigned int dependencyLength = glslang::TIntermLoop::dependencyInfinite; + const spv::LoopControlMask control = TranslateLoopControl(*node, dependencyLength); // Spec requires back edges to target header blocks, and every header block // must dominate its merge block. Make a header block first to ensure these @@ -2137,7 +2364,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn // including merges of its own. builder.setLine(node->getLoc().line); builder.setBuildPoint(&blocks.head); - builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, dependencyLength); if (node->testFirst() && node->getTest()) { spv::Block& test = builder.makeNewBlock(); builder.createBranch(&test); @@ -2248,25 +2475,23 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* spv::StorageClass storageClass = TranslateStorageClass(node->getType()); spv::Id spvType = convertGlslangToSpvType(node->getType()); -#ifdef AMD_EXTENSIONS const bool contains16BitType = node->getType().containsBasicType(glslang::EbtFloat16) || node->getType().containsBasicType(glslang::EbtInt16) || node->getType().containsBasicType(glslang::EbtUint16); if (contains16BitType) { if (storageClass == spv::StorageClassInput || storageClass == spv::StorageClassOutput) { - builder.addExtension(spv::E_SPV_KHR_16bit_storage); + addPre13Extension(spv::E_SPV_KHR_16bit_storage); builder.addCapability(spv::CapabilityStorageInputOutput16); } else if (storageClass == spv::StorageClassPushConstant) { - builder.addExtension(spv::E_SPV_KHR_16bit_storage); + addPre13Extension(spv::E_SPV_KHR_16bit_storage); builder.addCapability(spv::CapabilityStoragePushConstant16); } else if (storageClass == spv::StorageClassUniform) { - builder.addExtension(spv::E_SPV_KHR_16bit_storage); + addPre13Extension(spv::E_SPV_KHR_16bit_storage); builder.addCapability(spv::CapabilityStorageUniform16); if (node->getType().getQualifier().storage == glslang::EvqBuffer) builder.addCapability(spv::CapabilityStorageUniformBufferBlock16); } } -#endif const char* name = node->getName().c_str(); if (glslang::IsAnonymous(name)) @@ -2280,6 +2505,12 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) { switch (sampler.type) { case glslang::EbtFloat: return builder.makeFloatType(32); +#ifdef AMD_EXTENSIONS + case glslang::EbtFloat16: + builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch); + builder.addCapability(spv::CapabilityFloat16ImageAMD); + return builder.makeFloatType(16); +#endif case glslang::EbtInt: return builder.makeIntType(32); case glslang::EbtUint: return builder.makeUintType(32); default: @@ -2322,13 +2553,14 @@ void TGlslangToSpvTraverser::convertSwizzle(const glslang::TIntermAggregate& nod // layout state rooted from the top-level type. spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type) { - return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier()); + return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier(), false); } // Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. // Mutually recursive with convertGlslangStructToSpvType(). -spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier) +spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, + glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier, bool lastBufferBlockMember) { spv::Id spvType = spv::NoResult; @@ -2343,12 +2575,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtDouble: spvType = builder.makeFloatType(64); break; -#ifdef AMD_EXTENSIONS case glslang::EbtFloat16: - builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); + builder.addCapability(spv::CapabilityFloat16); +#if AMD_EXTENSIONS + if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3) + builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); +#endif spvType = builder.makeFloatType(16); break; -#endif case glslang::EbtBool: // "transparent" bool doesn't exist in SPIR-V. The GLSL convention is // a 32-bit int where non-0 means true. @@ -2357,6 +2591,30 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty else spvType = builder.makeBoolType(); break; + case glslang::EbtInt8: + builder.addCapability(spv::CapabilityInt8); + spvType = builder.makeIntType(8); + break; + case glslang::EbtUint8: + builder.addCapability(spv::CapabilityInt8); + spvType = builder.makeUintType(8); + break; + case glslang::EbtInt16: + builder.addCapability(spv::CapabilityInt16); +#ifdef AMD_EXTENSIONS + if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3) + builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); +#endif + spvType = builder.makeIntType(16); + break; + case glslang::EbtUint16: + builder.addCapability(spv::CapabilityInt16); +#ifdef AMD_EXTENSIONS + if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3) + builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); +#endif + spvType = builder.makeUintType(16); + break; case glslang::EbtInt: spvType = builder.makeIntType(32); break; @@ -2369,16 +2627,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtUint64: spvType = builder.makeUintType(64); break; -#ifdef AMD_EXTENSIONS - case glslang::EbtInt16: - builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); - spvType = builder.makeIntType(16); - break; - case glslang::EbtUint16: - builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); - spvType = builder.makeUintType(16); - break; -#endif case glslang::EbtAtomicUint: builder.addCapability(spv::CapabilityAtomicStorage); spvType = builder.makeUintType(32); @@ -2442,8 +2690,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // Use a dummy glslang type for querying internal strides of // arrays of arrays, but using just a one-dimensional array. glslang::TType simpleArrayType(type, 0); // deference type of the array - while (simpleArrayType.getArraySizes().getNumDims() > 1) - simpleArrayType.getArraySizes().dereference(); + while (simpleArrayType.getArraySizes()->getNumDims() > 1) + simpleArrayType.getArraySizes()->dereference(); // Will compute the higher-order strides here, rather than making a whole // pile of types and doing repetitive recursion on their contents. @@ -2465,12 +2713,16 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty stride = getArrayStride(type, explicitLayout, qualifier.layoutMatrix); } - // Do the outer dimension, which might not be known for a runtime-sized array - if (type.isRuntimeSizedArray()) { - spvType = builder.makeRuntimeArray(spvType); - } else { - assert(type.getOuterArraySize() > 0); + // Do the outer dimension, which might not be known for a runtime-sized array. + // (Unsized arrays that survive through linking will be runtime-sized arrays) + if (type.isSizedArray()) spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride); + else { + if (!lastBufferBlockMember) { + builder.addExtension("SPV_EXT_descriptor_indexing"); + builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT); + } + spvType = builder.makeRuntimeArray(spvType); } if (stride > 0) builder.addDecoration(spvType, spv::DecorationArrayStride, stride); @@ -2538,7 +2790,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy memberQualifier.layoutLocation = qualifier.layoutLocation; // recurse - spvMembers.push_back(convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier)); + bool lastBufferBlockMember = qualifier.storage == glslang::EvqBuffer && + i == (int)glslangMembers->size() - 1; + spvMembers.push_back( + convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember)); } } @@ -2576,99 +2831,110 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, InheritQualifiers(memberQualifier, qualifier); // using -1 above to indicate a hidden member - if (member >= 0) { - builder.addMemberName(spvType, member, glslangMember.getFieldName().c_str()); - addMemberDecoration(spvType, member, TranslateLayoutDecoration(glslangMember, memberQualifier.layoutMatrix)); - addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangMember)); - // Add interpolation and auxiliary storage decorations only to top-level members of Input and Output storage classes - if (type.getQualifier().storage == glslang::EvqVaryingIn || - type.getQualifier().storage == glslang::EvqVaryingOut) { - if (type.getBasicType() == glslang::EbtBlock || - glslangIntermediate->getSource() == glslang::EShSourceHlsl) { - addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier)); - addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier)); - } - } - addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); - - if (type.getBasicType() == glslang::EbtBlock && - qualifier.storage == glslang::EvqBuffer) { - // Add memory decorations only to top-level members of shader storage block - std::vector memory; - TranslateMemoryDecoration(memberQualifier, memory); - for (unsigned int i = 0; i < memory.size(); ++i) - addMemberDecoration(spvType, member, memory[i]); - } + if (member < 0) + continue; - // Location assignment was already completed correctly by the front end, - // just track whether a member needs to be decorated. - // Ignore member locations if the container is an array, as that's - // ill-specified and decisions have been made to not allow this. - if (! type.isArray() && memberQualifier.hasLocation()) - builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation); - - if (qualifier.hasLocation()) // track for upcoming inheritance - locationOffset += glslangIntermediate->computeTypeLocationSize(glslangMember); - - // component, XFB, others - if (glslangMember.getQualifier().hasComponent()) - builder.addMemberDecoration(spvType, member, spv::DecorationComponent, glslangMember.getQualifier().layoutComponent); - if (glslangMember.getQualifier().hasXfbOffset()) - builder.addMemberDecoration(spvType, member, spv::DecorationOffset, glslangMember.getQualifier().layoutXfbOffset); - else if (explicitLayout != glslang::ElpNone) { - // figure out what to do with offset, which is accumulating - int nextOffset; - updateMemberOffset(type, glslangMember, offset, nextOffset, explicitLayout, memberQualifier.layoutMatrix); - if (offset >= 0) - builder.addMemberDecoration(spvType, member, spv::DecorationOffset, offset); - offset = nextOffset; + builder.addMemberName(spvType, member, glslangMember.getFieldName().c_str()); + builder.addMemberDecoration(spvType, member, + TranslateLayoutDecoration(glslangMember, memberQualifier.layoutMatrix)); + builder.addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangMember)); + // Add interpolation and auxiliary storage decorations only to + // top-level members of Input and Output storage classes + if (type.getQualifier().storage == glslang::EvqVaryingIn || + type.getQualifier().storage == glslang::EvqVaryingOut) { + if (type.getBasicType() == glslang::EbtBlock || + glslangIntermediate->getSource() == glslang::EShSourceHlsl) { + builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier)); + builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier)); } + } + builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); + + if (type.getBasicType() == glslang::EbtBlock && + qualifier.storage == glslang::EvqBuffer) { + // Add memory decorations only to top-level members of shader storage block + std::vector memory; + TranslateMemoryDecoration(memberQualifier, memory); + for (unsigned int i = 0; i < memory.size(); ++i) + builder.addMemberDecoration(spvType, member, memory[i]); + } + + // Location assignment was already completed correctly by the front end, + // just track whether a member needs to be decorated. + // Ignore member locations if the container is an array, as that's + // ill-specified and decisions have been made to not allow this. + if (! type.isArray() && memberQualifier.hasLocation()) + builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation); + + if (qualifier.hasLocation()) // track for upcoming inheritance + locationOffset += glslangIntermediate->computeTypeLocationSize( + glslangMember, glslangIntermediate->getStage()); + + // component, XFB, others + if (glslangMember.getQualifier().hasComponent()) + builder.addMemberDecoration(spvType, member, spv::DecorationComponent, + glslangMember.getQualifier().layoutComponent); + if (glslangMember.getQualifier().hasXfbOffset()) + builder.addMemberDecoration(spvType, member, spv::DecorationOffset, + glslangMember.getQualifier().layoutXfbOffset); + else if (explicitLayout != glslang::ElpNone) { + // figure out what to do with offset, which is accumulating + int nextOffset; + updateMemberOffset(type, glslangMember, offset, nextOffset, explicitLayout, memberQualifier.layoutMatrix); + if (offset >= 0) + builder.addMemberDecoration(spvType, member, spv::DecorationOffset, offset); + offset = nextOffset; + } + + if (glslangMember.isMatrix() && explicitLayout != glslang::ElpNone) + builder.addMemberDecoration(spvType, member, spv::DecorationMatrixStride, + getMatrixStride(glslangMember, explicitLayout, memberQualifier.layoutMatrix)); - if (glslangMember.isMatrix() && explicitLayout != glslang::ElpNone) - builder.addMemberDecoration(spvType, member, spv::DecorationMatrixStride, getMatrixStride(glslangMember, explicitLayout, memberQualifier.layoutMatrix)); + // built-in variable decorations + spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true); + if (builtIn != spv::BuiltInMax) + builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); - // built-in variable decorations - spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true); - if (builtIn != spv::BuiltInMax) - addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); + // nonuniform + builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier())); + + if (glslangIntermediate->getHlslFunctionality1() && memberQualifier.semanticName != nullptr) { + builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); + builder.addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationHlslSemanticGOOGLE, + memberQualifier.semanticName); + } #ifdef NV_EXTENSIONS - if (builtIn == spv::BuiltInLayer) { - // SPV_NV_viewport_array2 extension - if (glslangMember.getQualifier().layoutViewportRelative){ - addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationViewportRelativeNV); - builder.addCapability(spv::CapabilityShaderViewportMaskNV); - builder.addExtension(spv::E_SPV_NV_viewport_array2); - } - if (glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset != -2048){ - addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset); - builder.addCapability(spv::CapabilityShaderStereoViewNV); - builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); - } + if (builtIn == spv::BuiltInLayer) { + // SPV_NV_viewport_array2 extension + if (glslangMember.getQualifier().layoutViewportRelative){ + builder.addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationViewportRelativeNV); + builder.addCapability(spv::CapabilityShaderViewportMaskNV); + builder.addExtension(spv::E_SPV_NV_viewport_array2); } - if (glslangMember.getQualifier().layoutPassthrough) { - addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationPassthroughNV); - builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV); - builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); + if (glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset != -2048){ + builder.addMemberDecoration(spvType, member, + (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, + glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset); + builder.addCapability(spv::CapabilityShaderStereoViewNV); + builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); } -#endif } + if (glslangMember.getQualifier().layoutPassthrough) { + builder.addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationPassthroughNV); + builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV); + builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); + } +#endif } // Decorate the structure - addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); - addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer())); + builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); + builder.addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer())); if (type.getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream); } - if (glslangIntermediate->getXfbMode()) { - builder.addCapability(spv::CapabilityTransformFeedback); - if (type.getQualifier().hasXfbStride()) - builder.addDecoration(spvType, spv::DecorationXfbStride, type.getQualifier().layoutXfbStride); - if (type.getQualifier().hasXfbBuffer()) - builder.addDecoration(spvType, spv::DecorationXfbBuffer, type.getQualifier().layoutXfbBuffer); - } } // Turn the expression forming the array size into an id. @@ -2699,7 +2965,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) { spv::Id nominalTypeId = builder.accessChainGetInferredType(); - spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), nominalTypeId); + spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), + TranslateNonUniformDecoration(type.getQualifier()), nominalTypeId); // Need to convert to abstract types when necessary if (type.getBasicType() == glslang::EbtBool) { @@ -2972,8 +3239,14 @@ bool TGlslangToSpvTraverser::isShaderEntryPoint(const glslang::TIntermAggregate* } // Does parameter need a place to keep writes, separate from the original? +// Assumes called after originalParam(), which filters out block/buffer/opaque-based +// qualifiers such that we should have only in/out/inout/constreadonly here. bool TGlslangToSpvTraverser::writableParam(glslang::TStorageQualifier qualifier) { + assert(qualifier == glslang::EvqIn || + qualifier == glslang::EvqOut || + qualifier == glslang::EvqInOut || + qualifier == glslang::EvqConstReadOnly); return qualifier != glslang::EvqConstReadOnly; } @@ -2984,7 +3257,7 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, if (implicitThisParam) // implicit this return true; if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) - return false; + return paramType.getBasicType() == glslang::EbtBlock; return paramType.containsOpaque() || // sampler, etc. (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO } @@ -3099,9 +3372,15 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& glslang::TSampler sampler = {}; bool cubeCompare = false; +#ifdef AMD_EXTENSIONS + bool f16ShadowCompare = false; +#endif if (node.isTexture() || node.isImage()) { sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; +#ifdef AMD_EXTENSIONS + f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16; +#endif } for (int i = 0; i < (int)glslangArguments.size(); ++i) { @@ -3126,6 +3405,21 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if ((sampler.ms && i == 3) || (! sampler.ms && i == 2)) lvalue = true; break; +#ifdef AMD_EXTENSIONS + case glslang::EOpSparseTexture: + if (((cubeCompare || f16ShadowCompare) && i == 3) || (! (cubeCompare || f16ShadowCompare) && i == 2)) + lvalue = true; + break; + case glslang::EOpSparseTextureClamp: + if (((cubeCompare || f16ShadowCompare) && i == 4) || (! (cubeCompare || f16ShadowCompare) && i == 3)) + lvalue = true; + break; + case glslang::EOpSparseTextureLod: + case glslang::EOpSparseTextureOffset: + if ((f16ShadowCompare && i == 4) || (! f16ShadowCompare && i == 3)) + lvalue = true; + break; +#else case glslang::EOpSparseTexture: if ((cubeCompare && i == 3) || (! cubeCompare && i == 2)) lvalue = true; @@ -3139,6 +3433,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 3) lvalue = true; break; +#endif case glslang::EOpSparseTextureFetch: if ((sampler.dim != glslang::EsdRect && i == 3) || (sampler.dim == glslang::EsdRect && i == 2)) lvalue = true; @@ -3147,6 +3442,23 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if ((sampler.dim != glslang::EsdRect && i == 4) || (sampler.dim == glslang::EsdRect && i == 3)) lvalue = true; break; +#ifdef AMD_EXTENSIONS + case glslang::EOpSparseTextureLodOffset: + case glslang::EOpSparseTextureGrad: + case glslang::EOpSparseTextureOffsetClamp: + if ((f16ShadowCompare && i == 5) || (! f16ShadowCompare && i == 4)) + lvalue = true; + break; + case glslang::EOpSparseTextureGradOffset: + case glslang::EOpSparseTextureGradClamp: + if ((f16ShadowCompare && i == 6) || (! f16ShadowCompare && i == 5)) + lvalue = true; + break; + case glslang::EOpSparseTextureGradOffsetClamp: + if ((f16ShadowCompare && i == 7) || (! f16ShadowCompare && i == 6)) + lvalue = true; + break; +#else case glslang::EOpSparseTextureLodOffset: case glslang::EOpSparseTextureGrad: case glslang::EOpSparseTextureOffsetClamp: @@ -3162,6 +3474,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 6) lvalue = true; break; +#endif case glslang::EOpSparseTextureGather: if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2)) lvalue = true; @@ -3211,11 +3524,15 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO builder.setLine(node->getLoc().line); - auto resultType = [&node,this]{ return convertGlslangToSpvType(node->getType()); }; - // Process a GLSL texturing op (will be SPV image) const glslang::TSampler sampler = node->getAsAggregate() ? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType().getSampler() : node->getAsUnaryNode()->getOperand()->getAsTyped()->getType().getSampler(); +#ifdef AMD_EXTENSIONS + bool f16ShadowCompare = (sampler.shadow && node->getAsAggregate()) + ? node->getAsAggregate()->getSequence()[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16 + : false; +#endif + std::vector arguments; if (node->getAsAggregate()) translateArguments(*node->getAsAggregate(), arguments); @@ -3261,6 +3578,20 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } + int components = node->getType().getVectorSize(); + + if (node->getOp() == glslang::EOpTextureFetch) { + // These must produce 4 components, per SPIR-V spec. We'll add a conversion constructor if needed. + // This will only happen through the HLSL path for operator[], so we do not have to handle e.g. + // the EOpTexture/Proj/Lod/etc family. It would be harmless to do so, but would need more logic + // here around e.g. which ones return scalars or other types. + components = 4; + } + + glslang::TType returnType(node->getType().getBasicType(), glslang::EvqTemporary, components); + + auto resultType = [&returnType,this]{ return convertGlslangToSpvType(returnType); }; + // Check for image functions other than queries if (node->isImage()) { std::vector operands; @@ -3307,9 +3638,14 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); - spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands); - builder.setPrecision(result, precision); - return result; + std::vector result( 1, builder.createOp(spv::OpImageRead, resultType(), operands) ); + builder.setPrecision(result[0], precision); + + // If needed, add a conversion constructor to the proper size. + if (components != node->getType().getVectorSize()) + result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType())); + + return result[0]; #ifdef AMD_EXTENSIONS } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) { #else @@ -3440,6 +3776,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO #ifdef AMD_EXTENSIONS if (cracked.gather) ++nonBiasArgCount; // comp argument should be present when bias argument is present + + if (f16ShadowCompare) + ++nonBiasArgCount; #endif if (cracked.offset) ++nonBiasArgCount; @@ -3483,7 +3822,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO bool noImplicitLod = false; // sort out where Dref is coming from +#ifdef AMD_EXTENSIONS + if (cubeCompare || f16ShadowCompare) { +#else if (cubeCompare) { +#endif params.Dref = arguments[2]; ++extraArgs; } else if (sampler.shadow && cracked.gather) { @@ -3583,7 +3926,14 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } - return builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params); + std::vector result( 1, + builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params) + ); + + if (components != node->getType().getVectorSize()) + result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType())); + + return result[0]; } spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node) @@ -3615,8 +3965,8 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg glslangArgs[a]->traverse(this); argTypes.push_back(¶mType); // keep outputs and pass-by-originals as l-values, evaluate others as r-values - if (writableParam(qualifiers[a]) || - originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0)) { + if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0) || + writableParam(qualifiers[a])) { // save l-value lValues.push_back(builder.getAccessChain()); } else { @@ -3682,18 +4032,12 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg } // Translate AST operation to SPV operation, already having SPV-based operands/types. -spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv::Decoration precision, - spv::Decoration noContraction, +spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison) { -#ifdef AMD_EXTENSIONS - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; -#else - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; -#endif + bool isUnsigned = isTypeUnsignedInt(typeProxy); + bool isFloat = isTypeFloat(typeProxy); bool isBool = typeProxy == glslang::EbtBool; spv::Op binOp = spv::OpNop; @@ -3825,15 +4169,16 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv if (binOp != spv::OpNop) { assert(comparison == false); if (builder.isMatrix(left) || builder.isMatrix(right)) - return createBinaryMatrixOperation(binOp, precision, noContraction, typeId, left, right); + return createBinaryMatrixOperation(binOp, decorations, typeId, left, right); // No matrix involved; make both operands be the same number of components, if needed if (needMatchingVectors) - builder.promoteScalar(precision, left, right); + builder.promoteScalar(decorations.precision, left, right); spv::Id result = builder.createBinOp(binOp, typeId, left, right); - addDecoration(result, noContraction); - return builder.setPrecision(result, precision); + builder.addDecoration(result, decorations.noContraction); + builder.addDecoration(result, decorations.nonUniform); + return builder.setPrecision(result, decorations.precision); } if (! comparison) @@ -3842,8 +4187,11 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv // Handle comparison instructions if (reduceComparison && (op == glslang::EOpEqual || op == glslang::EOpNotEqual) - && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) - return builder.createCompositeCompare(precision, left, right, op == glslang::EOpEqual); + && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) { + spv::Id result = builder.createCompositeCompare(decorations.precision, left, right, op == glslang::EOpEqual); + builder.addDecoration(result, decorations.nonUniform); + return result; + } switch (op) { case glslang::EOpLessThan: @@ -3902,8 +4250,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv if (binOp != spv::OpNop) { spv::Id result = builder.createBinOp(binOp, typeId, left, right); - addDecoration(result, noContraction); - return builder.setPrecision(result, precision); + builder.addDecoration(result, decorations.noContraction); + builder.addDecoration(result, decorations.nonUniform); + return builder.setPrecision(result, decorations.precision); } return 0; @@ -3923,7 +4272,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv // matrix op scalar op in {+, -, /} // scalar op matrix op in {+, -, /} // -spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right) +spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecorations& decorations, spv::Id typeId, + spv::Id left, spv::Id right) { bool firstClass = true; @@ -3932,7 +4282,8 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec case spv::OpFDiv: if (builder.isMatrix(left) && builder.isScalar(right)) { // turn matrix / scalar into a multiply... - right = builder.createBinOp(spv::OpFDiv, builder.getTypeId(right), builder.makeFloatConstant(1.0F), right); + spv::Id resultType = builder.getTypeId(right); + right = builder.createBinOp(spv::OpFDiv, resultType, builder.makeFpConstant(resultType, 1.0), right); op = spv::OpMatrixTimesScalar; } else firstClass = false; @@ -3961,8 +4312,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec if (firstClass) { spv::Id result = builder.createBinOp(op, typeId, left, right); - addDecoration(result, noContraction); - return builder.setPrecision(result, precision); + builder.addDecoration(result, decorations.noContraction); + builder.addDecoration(result, decorations.nonUniform); + return builder.setPrecision(result, decorations.precision); } // Handle component-wise +, -, *, %, and / for all combinations of type. @@ -3989,9 +4341,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec std::vector results; spv::Id smearVec = spv::NoResult; if (builder.isScalar(left)) - smearVec = builder.smearScalar(precision, left, vecType); + smearVec = builder.smearScalar(decorations.precision, left, vecType); else if (builder.isScalar(right)) - smearVec = builder.smearScalar(precision, right, vecType); + smearVec = builder.smearScalar(decorations.precision, right, vecType); // do each vector op for (unsigned int c = 0; c < numCols; ++c) { @@ -4000,12 +4352,15 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec spv::Id leftVec = leftMat ? builder.createCompositeExtract( left, vecType, indexes) : smearVec; spv::Id rightVec = rightMat ? builder.createCompositeExtract(right, vecType, indexes) : smearVec; spv::Id result = builder.createBinOp(op, vecType, leftVec, rightVec); - addDecoration(result, noContraction); - results.push_back(builder.setPrecision(result, precision)); + builder.addDecoration(result, decorations.noContraction); + builder.addDecoration(result, decorations.nonUniform); + results.push_back(builder.setPrecision(result, decorations.precision)); } // put the pieces together - return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision); + spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision); + builder.addDecoration(result, decorations.nonUniform); + return result; } default: assert(0); @@ -4013,25 +4368,21 @@ spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Dec } } -spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy) +spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId, + spv::Id operand, glslang::TBasicType typeProxy) { spv::Op unaryOp = spv::OpNop; int extBuiltins = -1; int libCall = -1; -#ifdef AMD_EXTENSIONS - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; -#else - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; -#endif + bool isUnsigned = isTypeUnsignedInt(typeProxy); + bool isFloat = isTypeFloat(typeProxy); switch (op) { case glslang::EOpNegative: if (isFloat) { unaryOp = spv::OpFNegate; if (builder.isMatrixType(typeId)) - return createUnaryMatrixOperation(unaryOp, precision, noContraction, typeId, operand, typeProxy); + return createUnaryMatrixOperation(unaryOp, decorations, typeId, operand, typeProxy); } else unaryOp = spv::OpSNegate; break; @@ -4161,12 +4512,10 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: case glslang::EOpDoubleBitsToUint64: case glslang::EOpInt64BitsToDouble: case glslang::EOpUint64BitsToDouble: -#ifdef AMD_EXTENSIONS case glslang::EOpFloat16BitsToInt16: case glslang::EOpFloat16BitsToUint16: case glslang::EOpInt16BitsToFloat16: case glslang::EOpUint16BitsToFloat16: -#endif unaryOp = spv::OpBitcast; break; @@ -4211,10 +4560,12 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: case glslang::EOpUnpackInt2x32: case glslang::EOpPackUint2x32: case glslang::EOpUnpackUint2x32: - unaryOp = spv::OpBitcast; - break; - -#ifdef AMD_EXTENSIONS + case glslang::EOpPack16: + case glslang::EOpPack32: + case glslang::EOpPack64: + case glslang::EOpUnpack32: + case glslang::EOpUnpack16: + case glslang::EOpUnpack8: case glslang::EOpPackInt2x16: case glslang::EOpUnpackInt2x16: case glslang::EOpPackUint2x16: @@ -4227,7 +4578,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: case glslang::EOpUnpackFloat2x16: unaryOp = spv::OpBitcast; break; -#endif case glslang::EOpDPdx: unaryOp = spv::OpDPdx; @@ -4293,7 +4643,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: // Handle all of the atomics in one place, in createAtomicOperation() std::vector operands; operands.push_back(operand); - return createAtomicOperation(op, precision, typeId, operands, typeProxy); + return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy); } case glslang::EOpBitFieldReverse: @@ -4342,8 +4692,46 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: operands.push_back(operand); return createInvocationsOperation(op, typeId, operands, typeProxy); } - -#ifdef AMD_EXTENSIONS + case glslang::EOpSubgroupAll: + case glslang::EOpSubgroupAny: + case glslang::EOpSubgroupAllEqual: + case glslang::EOpSubgroupBroadcastFirst: + case glslang::EOpSubgroupBallot: + case glslang::EOpSubgroupInverseBallot: + case glslang::EOpSubgroupBallotBitCount: + case glslang::EOpSubgroupBallotInclusiveBitCount: + case glslang::EOpSubgroupBallotExclusiveBitCount: + case glslang::EOpSubgroupBallotFindLSB: + case glslang::EOpSubgroupBallotFindMSB: + case glslang::EOpSubgroupAdd: + case glslang::EOpSubgroupMul: + case glslang::EOpSubgroupMin: + case glslang::EOpSubgroupMax: + case glslang::EOpSubgroupAnd: + case glslang::EOpSubgroupOr: + case glslang::EOpSubgroupXor: + case glslang::EOpSubgroupInclusiveAdd: + case glslang::EOpSubgroupInclusiveMul: + case glslang::EOpSubgroupInclusiveMin: + case glslang::EOpSubgroupInclusiveMax: + case glslang::EOpSubgroupInclusiveAnd: + case glslang::EOpSubgroupInclusiveOr: + case glslang::EOpSubgroupInclusiveXor: + case glslang::EOpSubgroupExclusiveAdd: + case glslang::EOpSubgroupExclusiveMul: + case glslang::EOpSubgroupExclusiveMin: + case glslang::EOpSubgroupExclusiveMax: + case glslang::EOpSubgroupExclusiveAnd: + case glslang::EOpSubgroupExclusiveOr: + case glslang::EOpSubgroupExclusiveXor: + case glslang::EOpSubgroupQuadSwapHorizontal: + case glslang::EOpSubgroupQuadSwapVertical: + case glslang::EOpSubgroupQuadSwapDiagonal: { + std::vector operands; + operands.push_back(operand); + return createSubgroupOperation(op, typeId, operands, typeProxy); + } +#ifdef AMD_EXTENSIONS case glslang::EOpMbcnt: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); libCall = spv::MbcntAMD; @@ -4359,7 +4747,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: libCall = spv::CubeFaceCoordAMD; break; #endif - +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartition: + builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned); + builder.addCapability(spv::CapabilityGroupNonUniformPartitionedNV); + unaryOp = spv::OpGroupNonUniformPartitionNV; + break; +#endif default: return 0; } @@ -4373,12 +4767,14 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: id = builder.createUnaryOp(unaryOp, typeId, operand); } - addDecoration(id, noContraction); - return builder.setPrecision(id, precision); + builder.addDecoration(id, decorations.noContraction); + builder.addDecoration(id, decorations.nonUniform); + return builder.setPrecision(id, decorations.precision); } // Create a unary operation on a matrix -spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand, glslang::TBasicType /* typeProxy */) +spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorations& decorations, spv::Id typeId, + spv::Id operand, glslang::TBasicType /* typeProxy */) { // Handle unary operations vector by vector. // The result type is the same type as the original type. @@ -4400,40 +4796,162 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, spv::Deco indexes.push_back(c); spv::Id srcVec = builder.createCompositeExtract(operand, srcVecType, indexes); spv::Id destVec = builder.createUnaryOp(op, destVecType, srcVec); - addDecoration(destVec, noContraction); - results.push_back(builder.setPrecision(destVec, precision)); + builder.addDecoration(destVec, decorations.noContraction); + builder.addDecoration(destVec, decorations.nonUniform); + results.push_back(builder.setPrecision(destVec, decorations.precision)); } // put the pieces together - return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision); + spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision); + builder.addDecoration(result, decorations.nonUniform); + return result; +} + +spv::Id TGlslangToSpvTraverser::createConversionOperation(glslang::TOperator op, spv::Id operand, int vectorSize) +{ + spv::Op convOp = spv::OpNop; + spv::Id type = 0; + + spv::Id result = 0; + + switch(op) { + case glslang::EOpConvInt8ToUint16: + convOp = spv::OpSConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvInt8ToUint: + convOp = spv::OpSConvert; + type = builder.makeIntType(32); + break; + case glslang::EOpConvInt8ToUint64: + convOp = spv::OpSConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvInt16ToUint8: + convOp = spv::OpSConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvInt16ToUint: + convOp = spv::OpSConvert; + type = builder.makeIntType(32); + break; + case glslang::EOpConvInt16ToUint64: + convOp = spv::OpSConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvIntToUint8: + convOp = spv::OpSConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvIntToUint16: + convOp = spv::OpSConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvIntToUint64: + convOp = spv::OpSConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvInt64ToUint8: + convOp = spv::OpSConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvInt64ToUint16: + convOp = spv::OpSConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvInt64ToUint: + convOp = spv::OpSConvert; + type = builder.makeIntType(32); + break; + case glslang::EOpConvUint8ToInt16: + convOp = spv::OpUConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvUint8ToInt: + convOp = spv::OpUConvert; + type = builder.makeIntType(32); + break; + case glslang::EOpConvUint8ToInt64: + convOp = spv::OpUConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvUint16ToInt8: + convOp = spv::OpUConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvUint16ToInt: + convOp = spv::OpUConvert; + type = builder.makeIntType(32); + break; + case glslang::EOpConvUint16ToInt64: + convOp = spv::OpUConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvUintToInt8: + convOp = spv::OpUConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvUintToInt16: + convOp = spv::OpUConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvUintToInt64: + convOp = spv::OpUConvert; + type = builder.makeIntType(64); + break; + case glslang::EOpConvUint64ToInt8: + convOp = spv::OpUConvert; + type = builder.makeIntType(8); + break; + case glslang::EOpConvUint64ToInt16: + convOp = spv::OpUConvert; + type = builder.makeIntType(16); + break; + case glslang::EOpConvUint64ToInt: + convOp = spv::OpUConvert; + type = builder.makeIntType(32); + break; + + default: + assert(false && "Default missing"); + break; + } + + if (vectorSize > 0) + type = builder.makeVectorType(type, vectorSize); + + result = builder.createUnaryOp(convOp, type, operand); + return result; } -spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id destType, spv::Id operand, glslang::TBasicType typeProxy) +spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecorations& decorations, spv::Id destType, + spv::Id operand, glslang::TBasicType typeProxy) { spv::Op convOp = spv::OpNop; spv::Id zero = 0; spv::Id one = 0; - spv::Id type = 0; int vectorSize = builder.isVectorType(destType) ? builder.getNumTypeComponents(destType) : 0; switch (op) { + case glslang::EOpConvInt8ToBool: + case glslang::EOpConvUint8ToBool: + zero = builder.makeUint8Constant(0); + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); + case glslang::EOpConvInt16ToBool: + case glslang::EOpConvUint16ToBool: + zero = builder.makeUint16Constant(0); + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); case glslang::EOpConvIntToBool: case glslang::EOpConvUintToBool: + zero = builder.makeUintConstant(0); + zero = makeSmearedConstant(zero, vectorSize); + return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); case glslang::EOpConvInt64ToBool: case glslang::EOpConvUint64ToBool: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvInt16ToBool: - case glslang::EOpConvUint16ToBool: -#endif - if (op == glslang::EOpConvInt64ToBool || op == glslang::EOpConvUint64ToBool) - zero = builder.makeUint64Constant(0); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvInt16ToBool || op == glslang::EOpConvUint16ToBool) - zero = builder.makeUint16Constant(0); -#endif - else - zero = builder.makeUintConstant(0); + zero = builder.makeUint64Constant(0); zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); @@ -4447,12 +4965,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero); -#ifdef AMD_EXTENSIONS case glslang::EOpConvFloat16ToBool: zero = builder.makeFloat16Constant(0.0F); zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero); -#endif case glslang::EOpConvBoolToFloat: convOp = spv::OpSelect; @@ -4466,34 +4982,45 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec one = builder.makeDoubleConstant(1.0); break; -#ifdef AMD_EXTENSIONS case glslang::EOpConvBoolToFloat16: convOp = spv::OpSelect; zero = builder.makeFloat16Constant(0.0F); one = builder.makeFloat16Constant(1.0F); break; -#endif + + case glslang::EOpConvBoolToInt8: + zero = builder.makeInt8Constant(0); + one = builder.makeInt8Constant(1); + convOp = spv::OpSelect; + break; + + case glslang::EOpConvBoolToUint8: + zero = builder.makeUint8Constant(0); + one = builder.makeUint8Constant(1); + convOp = spv::OpSelect; + break; + + case glslang::EOpConvBoolToInt16: + zero = builder.makeInt16Constant(0); + one = builder.makeInt16Constant(1); + convOp = spv::OpSelect; + break; + + case glslang::EOpConvBoolToUint16: + zero = builder.makeUint16Constant(0); + one = builder.makeUint16Constant(1); + convOp = spv::OpSelect; + break; case glslang::EOpConvBoolToInt: case glslang::EOpConvBoolToInt64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvBoolToInt16: -#endif if (op == glslang::EOpConvBoolToInt64) zero = builder.makeInt64Constant(0); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvBoolToInt16) - zero = builder.makeInt16Constant(0); -#endif else zero = builder.makeIntConstant(0); if (op == glslang::EOpConvBoolToInt64) one = builder.makeInt64Constant(1); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvBoolToInt16) - one = builder.makeInt16Constant(1); -#endif else one = builder.makeIntConstant(1); @@ -4502,104 +5029,94 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvBoolToUint: case glslang::EOpConvBoolToUint64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvBoolToUint16: -#endif if (op == glslang::EOpConvBoolToUint64) zero = builder.makeUint64Constant(0); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvBoolToUint16) - zero = builder.makeUint16Constant(0); -#endif else zero = builder.makeUintConstant(0); if (op == glslang::EOpConvBoolToUint64) one = builder.makeUint64Constant(1); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvBoolToUint16) - one = builder.makeUint16Constant(1); -#endif else one = builder.makeUintConstant(1); convOp = spv::OpSelect; break; + case glslang::EOpConvInt8ToFloat16: + case glslang::EOpConvInt8ToFloat: + case glslang::EOpConvInt8ToDouble: + case glslang::EOpConvInt16ToFloat16: + case glslang::EOpConvInt16ToFloat: + case glslang::EOpConvInt16ToDouble: + case glslang::EOpConvIntToFloat16: case glslang::EOpConvIntToFloat: case glslang::EOpConvIntToDouble: case glslang::EOpConvInt64ToFloat: case glslang::EOpConvInt64ToDouble: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvInt16ToFloat: - case glslang::EOpConvInt16ToDouble: - case glslang::EOpConvInt16ToFloat16: - case glslang::EOpConvIntToFloat16: case glslang::EOpConvInt64ToFloat16: -#endif convOp = spv::OpConvertSToF; break; + case glslang::EOpConvUint8ToFloat16: + case glslang::EOpConvUint8ToFloat: + case glslang::EOpConvUint8ToDouble: + case glslang::EOpConvUint16ToFloat16: + case glslang::EOpConvUint16ToFloat: + case glslang::EOpConvUint16ToDouble: + case glslang::EOpConvUintToFloat16: case glslang::EOpConvUintToFloat: case glslang::EOpConvUintToDouble: case glslang::EOpConvUint64ToFloat: case glslang::EOpConvUint64ToDouble: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUint16ToFloat: - case glslang::EOpConvUint16ToDouble: - case glslang::EOpConvUint16ToFloat16: - case glslang::EOpConvUintToFloat16: case glslang::EOpConvUint64ToFloat16: -#endif convOp = spv::OpConvertUToF; break; case glslang::EOpConvDoubleToFloat: case glslang::EOpConvFloatToDouble: -#ifdef AMD_EXTENSIONS case glslang::EOpConvDoubleToFloat16: case glslang::EOpConvFloat16ToDouble: case glslang::EOpConvFloatToFloat16: case glslang::EOpConvFloat16ToFloat: -#endif convOp = spv::OpFConvert; if (builder.isMatrixType(destType)) - return createUnaryMatrixOperation(convOp, precision, noContraction, destType, operand, typeProxy); + return createUnaryMatrixOperation(convOp, decorations, destType, operand, typeProxy); break; - case glslang::EOpConvFloatToInt: - case glslang::EOpConvDoubleToInt: - case glslang::EOpConvFloatToInt64: - case glslang::EOpConvDoubleToInt64: -#ifdef AMD_EXTENSIONS + case glslang::EOpConvFloat16ToInt8: + case glslang::EOpConvFloatToInt8: + case glslang::EOpConvDoubleToInt8: + case glslang::EOpConvFloat16ToInt16: case glslang::EOpConvFloatToInt16: case glslang::EOpConvDoubleToInt16: - case glslang::EOpConvFloat16ToInt16: case glslang::EOpConvFloat16ToInt: + case glslang::EOpConvFloatToInt: + case glslang::EOpConvDoubleToInt: case glslang::EOpConvFloat16ToInt64: -#endif + case glslang::EOpConvFloatToInt64: + case glslang::EOpConvDoubleToInt64: convOp = spv::OpConvertFToS; break; + case glslang::EOpConvUint8ToInt8: + case glslang::EOpConvInt8ToUint8: + case glslang::EOpConvUint16ToInt16: + case glslang::EOpConvInt16ToUint16: case glslang::EOpConvUintToInt: case glslang::EOpConvIntToUint: case glslang::EOpConvUint64ToInt64: case glslang::EOpConvInt64ToUint64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUint16ToInt16: - case glslang::EOpConvInt16ToUint16: -#endif if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. - if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) - zero = builder.makeUint64Constant(0); -#ifdef AMD_EXTENSIONS - else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) + if(op == glslang::EOpConvUint8ToInt8 || op == glslang::EOpConvInt8ToUint8) { + zero = builder.makeUint8Constant(0); + } else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) { zero = builder.makeUint16Constant(0); -#endif - else + } else if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) { + zero = builder.makeUint64Constant(0); + } else { zero = builder.makeUintConstant(0); - + } zero = makeSmearedConstant(zero, vectorSize); // Use OpIAdd, instead of OpBitcast to do the conversion when // generating for OpSpecConstantOp instruction. @@ -4609,126 +5126,117 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec convOp = spv::OpBitcast; break; + case glslang::EOpConvFloat16ToUint8: + case glslang::EOpConvFloatToUint8: + case glslang::EOpConvDoubleToUint8: + case glslang::EOpConvFloat16ToUint16: + case glslang::EOpConvFloatToUint16: + case glslang::EOpConvDoubleToUint16: + case glslang::EOpConvFloat16ToUint: case glslang::EOpConvFloatToUint: case glslang::EOpConvDoubleToUint: case glslang::EOpConvFloatToUint64: case glslang::EOpConvDoubleToUint64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvFloatToUint16: - case glslang::EOpConvDoubleToUint16: - case glslang::EOpConvFloat16ToUint16: - case glslang::EOpConvFloat16ToUint: case glslang::EOpConvFloat16ToUint64: -#endif convOp = spv::OpConvertFToU; break; - case glslang::EOpConvIntToInt64: - case glslang::EOpConvInt64ToInt: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvIntToInt16: + case glslang::EOpConvInt8ToInt16: + case glslang::EOpConvInt8ToInt: + case glslang::EOpConvInt8ToInt64: + case glslang::EOpConvInt16ToInt8: case glslang::EOpConvInt16ToInt: - case glslang::EOpConvInt64ToInt16: case glslang::EOpConvInt16ToInt64: -#endif + case glslang::EOpConvIntToInt8: + case glslang::EOpConvIntToInt16: + case glslang::EOpConvIntToInt64: + case glslang::EOpConvInt64ToInt8: + case glslang::EOpConvInt64ToInt16: + case glslang::EOpConvInt64ToInt: convOp = spv::OpSConvert; break; - case glslang::EOpConvUintToUint64: - case glslang::EOpConvUint64ToUint: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUintToUint16: + case glslang::EOpConvUint8ToUint16: + case glslang::EOpConvUint8ToUint: + case glslang::EOpConvUint8ToUint64: + case glslang::EOpConvUint16ToUint8: case glslang::EOpConvUint16ToUint: - case glslang::EOpConvUint64ToUint16: case glslang::EOpConvUint16ToUint64: -#endif + case glslang::EOpConvUintToUint8: + case glslang::EOpConvUintToUint16: + case glslang::EOpConvUintToUint64: + case glslang::EOpConvUint64ToUint8: + case glslang::EOpConvUint64ToUint16: + case glslang::EOpConvUint64ToUint: convOp = spv::OpUConvert; break; - case glslang::EOpConvIntToUint64: - case glslang::EOpConvInt64ToUint: - case glslang::EOpConvUint64ToInt: - case glslang::EOpConvUintToInt64: -#ifdef AMD_EXTENSIONS + case glslang::EOpConvInt8ToUint16: + case glslang::EOpConvInt8ToUint: + case glslang::EOpConvInt8ToUint64: + case glslang::EOpConvInt16ToUint8: case glslang::EOpConvInt16ToUint: - case glslang::EOpConvUintToInt16: case glslang::EOpConvInt16ToUint64: - case glslang::EOpConvUint64ToInt16: - case glslang::EOpConvUint16ToInt: + case glslang::EOpConvIntToUint8: case glslang::EOpConvIntToUint16: - case glslang::EOpConvUint16ToInt64: + case glslang::EOpConvIntToUint64: + case glslang::EOpConvInt64ToUint8: case glslang::EOpConvInt64ToUint16: -#endif + case glslang::EOpConvInt64ToUint: + case glslang::EOpConvUint8ToInt16: + case glslang::EOpConvUint8ToInt: + case glslang::EOpConvUint8ToInt64: + case glslang::EOpConvUint16ToInt8: + case glslang::EOpConvUint16ToInt: + case glslang::EOpConvUint16ToInt64: + case glslang::EOpConvUintToInt8: + case glslang::EOpConvUintToInt16: + case glslang::EOpConvUintToInt64: + case glslang::EOpConvUint64ToInt8: + case glslang::EOpConvUint64ToInt16: + case glslang::EOpConvUint64ToInt: // OpSConvert/OpUConvert + OpBitCast - switch (op) { - case glslang::EOpConvIntToUint64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvInt16ToUint64: -#endif - convOp = spv::OpSConvert; - type = builder.makeIntType(64); - break; - case glslang::EOpConvInt64ToUint: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvInt16ToUint: -#endif - convOp = spv::OpSConvert; - type = builder.makeIntType(32); - break; - case glslang::EOpConvUint64ToInt: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUint16ToInt: -#endif - convOp = spv::OpUConvert; - type = builder.makeUintType(32); - break; - case glslang::EOpConvUintToInt64: -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUint16ToInt64: -#endif - convOp = spv::OpUConvert; - type = builder.makeUintType(64); - break; -#ifdef AMD_EXTENSIONS - case glslang::EOpConvUintToInt16: - case glslang::EOpConvUint64ToInt16: - convOp = spv::OpUConvert; - type = builder.makeUintType(16); - break; - case glslang::EOpConvIntToUint16: - case glslang::EOpConvInt64ToUint16: - convOp = spv::OpSConvert; - type = builder.makeIntType(16); - break; -#endif - default: - assert(0); - break; - } - - if (vectorSize > 0) - type = builder.makeVectorType(type, vectorSize); - - operand = builder.createUnaryOp(convOp, type, operand); + operand = createConversionOperation(op, operand, vectorSize); if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. -#ifdef AMD_EXTENSIONS - if (op == glslang::EOpConvIntToUint64 || op == glslang::EOpConvUintToInt64 || - op == glslang::EOpConvInt16ToUint64 || op == glslang::EOpConvUint16ToInt64) - zero = builder.makeUint64Constant(0); - else if (op == glslang::EOpConvIntToUint16 || op == glslang::EOpConvUintToInt16 || - op == glslang::EOpConvInt64ToUint16 || op == glslang::EOpConvUint64ToInt16) + switch(op) { + case glslang::EOpConvInt16ToUint8: + case glslang::EOpConvIntToUint8: + case glslang::EOpConvInt64ToUint8: + case glslang::EOpConvUint16ToInt8: + case glslang::EOpConvUintToInt8: + case glslang::EOpConvUint64ToInt8: + zero = builder.makeUint8Constant(0); + break; + case glslang::EOpConvInt8ToUint16: + case glslang::EOpConvIntToUint16: + case glslang::EOpConvInt64ToUint16: + case glslang::EOpConvUint8ToInt16: + case glslang::EOpConvUintToInt16: + case glslang::EOpConvUint64ToInt16: zero = builder.makeUint16Constant(0); - else + break; + case glslang::EOpConvInt8ToUint: + case glslang::EOpConvInt16ToUint: + case glslang::EOpConvInt64ToUint: + case glslang::EOpConvUint8ToInt: + case glslang::EOpConvUint16ToInt: + case glslang::EOpConvUint64ToInt: zero = builder.makeUintConstant(0); -#else - if (op == glslang::EOpConvIntToUint64 || op == glslang::EOpConvUintToInt64) + break; + case glslang::EOpConvInt8ToUint64: + case glslang::EOpConvInt16ToUint64: + case glslang::EOpConvIntToUint64: + case glslang::EOpConvUint8ToInt64: + case glslang::EOpConvUint16ToInt64: + case glslang::EOpConvUintToInt64: zero = builder.makeUint64Constant(0); - else - zero = builder.makeUintConstant(0); -#endif - + break; + default: + assert(false && "Default missing"); + break; + } zero = makeSmearedConstant(zero, vectorSize); // Use OpIAdd, instead of OpBitcast to do the conversion when // generating for OpSpecConstantOp instruction. @@ -4752,7 +5260,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec } else result = builder.createUnaryOp(convOp, destType, operand); - return builder.setPrecision(result, precision); + result = builder.setPrecision(result, decorations.precision); + builder.addDecoration(result, decorations.nonUniform); + return result; } spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vectorSize) @@ -4870,10 +5380,8 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv // Create group invocation operations. spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { -#ifdef AMD_EXTENSIONS - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; -#endif + bool isUnsigned = isTypeUnsignedInt(typeProxy); + bool isFloat = isTypeFloat(typeProxy); spv::Op opCode = spv::OpNop; std::vector spvGroupOperands; @@ -5134,15 +5642,353 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv return builder.createCompositeConstruct(typeId, results); } -spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) +// Create subgroup invocation operations. +spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { -#ifdef AMD_EXTENSIONS - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; -#else - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; - bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; + // Add the required capabilities. + switch (op) { + case glslang::EOpSubgroupElect: + builder.addCapability(spv::CapabilityGroupNonUniform); + break; + case glslang::EOpSubgroupAll: + case glslang::EOpSubgroupAny: + case glslang::EOpSubgroupAllEqual: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformVote); + break; + case glslang::EOpSubgroupBroadcast: + case glslang::EOpSubgroupBroadcastFirst: + case glslang::EOpSubgroupBallot: + case glslang::EOpSubgroupInverseBallot: + case glslang::EOpSubgroupBallotBitExtract: + case glslang::EOpSubgroupBallotBitCount: + case glslang::EOpSubgroupBallotInclusiveBitCount: + case glslang::EOpSubgroupBallotExclusiveBitCount: + case glslang::EOpSubgroupBallotFindLSB: + case glslang::EOpSubgroupBallotFindMSB: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformBallot); + break; + case glslang::EOpSubgroupShuffle: + case glslang::EOpSubgroupShuffleXor: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformShuffle); + break; + case glslang::EOpSubgroupShuffleUp: + case glslang::EOpSubgroupShuffleDown: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformShuffleRelative); + break; + case glslang::EOpSubgroupAdd: + case glslang::EOpSubgroupMul: + case glslang::EOpSubgroupMin: + case glslang::EOpSubgroupMax: + case glslang::EOpSubgroupAnd: + case glslang::EOpSubgroupOr: + case glslang::EOpSubgroupXor: + case glslang::EOpSubgroupInclusiveAdd: + case glslang::EOpSubgroupInclusiveMul: + case glslang::EOpSubgroupInclusiveMin: + case glslang::EOpSubgroupInclusiveMax: + case glslang::EOpSubgroupInclusiveAnd: + case glslang::EOpSubgroupInclusiveOr: + case glslang::EOpSubgroupInclusiveXor: + case glslang::EOpSubgroupExclusiveAdd: + case glslang::EOpSubgroupExclusiveMul: + case glslang::EOpSubgroupExclusiveMin: + case glslang::EOpSubgroupExclusiveMax: + case glslang::EOpSubgroupExclusiveAnd: + case glslang::EOpSubgroupExclusiveOr: + case glslang::EOpSubgroupExclusiveXor: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformArithmetic); + break; + case glslang::EOpSubgroupClusteredAdd: + case glslang::EOpSubgroupClusteredMul: + case glslang::EOpSubgroupClusteredMin: + case glslang::EOpSubgroupClusteredMax: + case glslang::EOpSubgroupClusteredAnd: + case glslang::EOpSubgroupClusteredOr: + case glslang::EOpSubgroupClusteredXor: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformClustered); + break; + case glslang::EOpSubgroupQuadBroadcast: + case glslang::EOpSubgroupQuadSwapHorizontal: + case glslang::EOpSubgroupQuadSwapVertical: + case glslang::EOpSubgroupQuadSwapDiagonal: + builder.addCapability(spv::CapabilityGroupNonUniform); + builder.addCapability(spv::CapabilityGroupNonUniformQuad); + break; +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedAdd: + case glslang::EOpSubgroupPartitionedMul: + case glslang::EOpSubgroupPartitionedMin: + case glslang::EOpSubgroupPartitionedMax: + case glslang::EOpSubgroupPartitionedAnd: + case glslang::EOpSubgroupPartitionedOr: + case glslang::EOpSubgroupPartitionedXor: + case glslang::EOpSubgroupPartitionedInclusiveAdd: + case glslang::EOpSubgroupPartitionedInclusiveMul: + case glslang::EOpSubgroupPartitionedInclusiveMin: + case glslang::EOpSubgroupPartitionedInclusiveMax: + case glslang::EOpSubgroupPartitionedInclusiveAnd: + case glslang::EOpSubgroupPartitionedInclusiveOr: + case glslang::EOpSubgroupPartitionedInclusiveXor: + case glslang::EOpSubgroupPartitionedExclusiveAdd: + case glslang::EOpSubgroupPartitionedExclusiveMul: + case glslang::EOpSubgroupPartitionedExclusiveMin: + case glslang::EOpSubgroupPartitionedExclusiveMax: + case glslang::EOpSubgroupPartitionedExclusiveAnd: + case glslang::EOpSubgroupPartitionedExclusiveOr: + case glslang::EOpSubgroupPartitionedExclusiveXor: + builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned); + builder.addCapability(spv::CapabilityGroupNonUniformPartitionedNV); + break; +#endif + default: assert(0 && "Unhandled subgroup operation!"); + } + + const bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; + const bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; + const bool isBool = typeProxy == glslang::EbtBool; + + spv::Op opCode = spv::OpNop; + + // Figure out which opcode to use. + switch (op) { + case glslang::EOpSubgroupElect: opCode = spv::OpGroupNonUniformElect; break; + case glslang::EOpSubgroupAll: opCode = spv::OpGroupNonUniformAll; break; + case glslang::EOpSubgroupAny: opCode = spv::OpGroupNonUniformAny; break; + case glslang::EOpSubgroupAllEqual: opCode = spv::OpGroupNonUniformAllEqual; break; + case glslang::EOpSubgroupBroadcast: opCode = spv::OpGroupNonUniformBroadcast; break; + case glslang::EOpSubgroupBroadcastFirst: opCode = spv::OpGroupNonUniformBroadcastFirst; break; + case glslang::EOpSubgroupBallot: opCode = spv::OpGroupNonUniformBallot; break; + case glslang::EOpSubgroupInverseBallot: opCode = spv::OpGroupNonUniformInverseBallot; break; + case glslang::EOpSubgroupBallotBitExtract: opCode = spv::OpGroupNonUniformBallotBitExtract; break; + case glslang::EOpSubgroupBallotBitCount: + case glslang::EOpSubgroupBallotInclusiveBitCount: + case glslang::EOpSubgroupBallotExclusiveBitCount: opCode = spv::OpGroupNonUniformBallotBitCount; break; + case glslang::EOpSubgroupBallotFindLSB: opCode = spv::OpGroupNonUniformBallotFindLSB; break; + case glslang::EOpSubgroupBallotFindMSB: opCode = spv::OpGroupNonUniformBallotFindMSB; break; + case glslang::EOpSubgroupShuffle: opCode = spv::OpGroupNonUniformShuffle; break; + case glslang::EOpSubgroupShuffleXor: opCode = spv::OpGroupNonUniformShuffleXor; break; + case glslang::EOpSubgroupShuffleUp: opCode = spv::OpGroupNonUniformShuffleUp; break; + case glslang::EOpSubgroupShuffleDown: opCode = spv::OpGroupNonUniformShuffleDown; break; + case glslang::EOpSubgroupAdd: + case glslang::EOpSubgroupInclusiveAdd: + case glslang::EOpSubgroupExclusiveAdd: + case glslang::EOpSubgroupClusteredAdd: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedAdd: + case glslang::EOpSubgroupPartitionedInclusiveAdd: + case glslang::EOpSubgroupPartitionedExclusiveAdd: +#endif + if (isFloat) { + opCode = spv::OpGroupNonUniformFAdd; + } else { + opCode = spv::OpGroupNonUniformIAdd; + } + break; + case glslang::EOpSubgroupMul: + case glslang::EOpSubgroupInclusiveMul: + case glslang::EOpSubgroupExclusiveMul: + case glslang::EOpSubgroupClusteredMul: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedMul: + case glslang::EOpSubgroupPartitionedInclusiveMul: + case glslang::EOpSubgroupPartitionedExclusiveMul: +#endif + if (isFloat) { + opCode = spv::OpGroupNonUniformFMul; + } else { + opCode = spv::OpGroupNonUniformIMul; + } + break; + case glslang::EOpSubgroupMin: + case glslang::EOpSubgroupInclusiveMin: + case glslang::EOpSubgroupExclusiveMin: + case glslang::EOpSubgroupClusteredMin: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedMin: + case glslang::EOpSubgroupPartitionedInclusiveMin: + case glslang::EOpSubgroupPartitionedExclusiveMin: +#endif + if (isFloat) { + opCode = spv::OpGroupNonUniformFMin; + } else if (isUnsigned) { + opCode = spv::OpGroupNonUniformUMin; + } else { + opCode = spv::OpGroupNonUniformSMin; + } + break; + case glslang::EOpSubgroupMax: + case glslang::EOpSubgroupInclusiveMax: + case glslang::EOpSubgroupExclusiveMax: + case glslang::EOpSubgroupClusteredMax: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedMax: + case glslang::EOpSubgroupPartitionedInclusiveMax: + case glslang::EOpSubgroupPartitionedExclusiveMax: +#endif + if (isFloat) { + opCode = spv::OpGroupNonUniformFMax; + } else if (isUnsigned) { + opCode = spv::OpGroupNonUniformUMax; + } else { + opCode = spv::OpGroupNonUniformSMax; + } + break; + case glslang::EOpSubgroupAnd: + case glslang::EOpSubgroupInclusiveAnd: + case glslang::EOpSubgroupExclusiveAnd: + case glslang::EOpSubgroupClusteredAnd: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedAnd: + case glslang::EOpSubgroupPartitionedInclusiveAnd: + case glslang::EOpSubgroupPartitionedExclusiveAnd: +#endif + if (isBool) { + opCode = spv::OpGroupNonUniformLogicalAnd; + } else { + opCode = spv::OpGroupNonUniformBitwiseAnd; + } + break; + case glslang::EOpSubgroupOr: + case glslang::EOpSubgroupInclusiveOr: + case glslang::EOpSubgroupExclusiveOr: + case glslang::EOpSubgroupClusteredOr: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedOr: + case glslang::EOpSubgroupPartitionedInclusiveOr: + case glslang::EOpSubgroupPartitionedExclusiveOr: +#endif + if (isBool) { + opCode = spv::OpGroupNonUniformLogicalOr; + } else { + opCode = spv::OpGroupNonUniformBitwiseOr; + } + break; + case glslang::EOpSubgroupXor: + case glslang::EOpSubgroupInclusiveXor: + case glslang::EOpSubgroupExclusiveXor: + case glslang::EOpSubgroupClusteredXor: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedXor: + case glslang::EOpSubgroupPartitionedInclusiveXor: + case glslang::EOpSubgroupPartitionedExclusiveXor: #endif + if (isBool) { + opCode = spv::OpGroupNonUniformLogicalXor; + } else { + opCode = spv::OpGroupNonUniformBitwiseXor; + } + break; + case glslang::EOpSubgroupQuadBroadcast: opCode = spv::OpGroupNonUniformQuadBroadcast; break; + case glslang::EOpSubgroupQuadSwapHorizontal: + case glslang::EOpSubgroupQuadSwapVertical: + case glslang::EOpSubgroupQuadSwapDiagonal: opCode = spv::OpGroupNonUniformQuadSwap; break; + default: assert(0 && "Unhandled subgroup operation!"); + } + + std::vector spvGroupOperands; + + // Every operation begins with the Execution Scope operand. + spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup)); + + // Next, for all operations that use a Group Operation, push that as an operand. + switch (op) { + default: break; + case glslang::EOpSubgroupBallotBitCount: + case glslang::EOpSubgroupAdd: + case glslang::EOpSubgroupMul: + case glslang::EOpSubgroupMin: + case glslang::EOpSubgroupMax: + case glslang::EOpSubgroupAnd: + case glslang::EOpSubgroupOr: + case glslang::EOpSubgroupXor: + spvGroupOperands.push_back(spv::GroupOperationReduce); + break; + case glslang::EOpSubgroupBallotInclusiveBitCount: + case glslang::EOpSubgroupInclusiveAdd: + case glslang::EOpSubgroupInclusiveMul: + case glslang::EOpSubgroupInclusiveMin: + case glslang::EOpSubgroupInclusiveMax: + case glslang::EOpSubgroupInclusiveAnd: + case glslang::EOpSubgroupInclusiveOr: + case glslang::EOpSubgroupInclusiveXor: + spvGroupOperands.push_back(spv::GroupOperationInclusiveScan); + break; + case glslang::EOpSubgroupBallotExclusiveBitCount: + case glslang::EOpSubgroupExclusiveAdd: + case glslang::EOpSubgroupExclusiveMul: + case glslang::EOpSubgroupExclusiveMin: + case glslang::EOpSubgroupExclusiveMax: + case glslang::EOpSubgroupExclusiveAnd: + case glslang::EOpSubgroupExclusiveOr: + case glslang::EOpSubgroupExclusiveXor: + spvGroupOperands.push_back(spv::GroupOperationExclusiveScan); + break; + case glslang::EOpSubgroupClusteredAdd: + case glslang::EOpSubgroupClusteredMul: + case glslang::EOpSubgroupClusteredMin: + case glslang::EOpSubgroupClusteredMax: + case glslang::EOpSubgroupClusteredAnd: + case glslang::EOpSubgroupClusteredOr: + case glslang::EOpSubgroupClusteredXor: + spvGroupOperands.push_back(spv::GroupOperationClusteredReduce); + break; +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedAdd: + case glslang::EOpSubgroupPartitionedMul: + case glslang::EOpSubgroupPartitionedMin: + case glslang::EOpSubgroupPartitionedMax: + case glslang::EOpSubgroupPartitionedAnd: + case glslang::EOpSubgroupPartitionedOr: + case glslang::EOpSubgroupPartitionedXor: + spvGroupOperands.push_back(spv::GroupOperationPartitionedReduceNV); + break; + case glslang::EOpSubgroupPartitionedInclusiveAdd: + case glslang::EOpSubgroupPartitionedInclusiveMul: + case glslang::EOpSubgroupPartitionedInclusiveMin: + case glslang::EOpSubgroupPartitionedInclusiveMax: + case glslang::EOpSubgroupPartitionedInclusiveAnd: + case glslang::EOpSubgroupPartitionedInclusiveOr: + case glslang::EOpSubgroupPartitionedInclusiveXor: + spvGroupOperands.push_back(spv::GroupOperationPartitionedInclusiveScanNV); + break; + case glslang::EOpSubgroupPartitionedExclusiveAdd: + case glslang::EOpSubgroupPartitionedExclusiveMul: + case glslang::EOpSubgroupPartitionedExclusiveMin: + case glslang::EOpSubgroupPartitionedExclusiveMax: + case glslang::EOpSubgroupPartitionedExclusiveAnd: + case glslang::EOpSubgroupPartitionedExclusiveOr: + case glslang::EOpSubgroupPartitionedExclusiveXor: + spvGroupOperands.push_back(spv::GroupOperationPartitionedExclusiveScanNV); + break; +#endif + } + + // Push back the operands next. + for (auto opIt : operands) { + spvGroupOperands.push_back(opIt); + } + + // Some opcodes have additional operands. + switch (op) { + default: break; + case glslang::EOpSubgroupQuadSwapHorizontal: spvGroupOperands.push_back(builder.makeUintConstant(0)); break; + case glslang::EOpSubgroupQuadSwapVertical: spvGroupOperands.push_back(builder.makeUintConstant(1)); break; + case glslang::EOpSubgroupQuadSwapDiagonal: spvGroupOperands.push_back(builder.makeUintConstant(2)); break; + } + + return builder.createOp(opCode, typeId, spvGroupOperands); +} + +spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) +{ + bool isUnsigned = isTypeUnsignedInt(typeProxy); + bool isFloat = isTypeFloat(typeProxy); spv::Op opCode = spv::OpNop; int extBuiltins = -1; @@ -5279,10 +6125,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: libCall = spv::GLSLstd450FrexpStruct; assert(builder.isPointerType(typeId1)); typeId1 = builder.getContainedTypeId(typeId1); -#ifdef AMD_EXTENSIONS int width = builder.getScalarTypeWidth(typeId1); -#else - int width = 32; +#ifdef AMD_EXTENSIONS + if (width == 16) + // Using 16-bit exp operand, enable extension SPV_AMD_gpu_shader_int16 + builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); #endif if (builder.getNumComponents(operands[0]) == 1) frexpIntType = builder.makeIntegerType(width, true); @@ -5299,6 +6146,45 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpReadInvocation: return createInvocationsOperation(op, typeId, operands, typeProxy); + case glslang::EOpSubgroupBroadcast: + case glslang::EOpSubgroupBallotBitExtract: + case glslang::EOpSubgroupShuffle: + case glslang::EOpSubgroupShuffleXor: + case glslang::EOpSubgroupShuffleUp: + case glslang::EOpSubgroupShuffleDown: + case glslang::EOpSubgroupClusteredAdd: + case glslang::EOpSubgroupClusteredMul: + case glslang::EOpSubgroupClusteredMin: + case glslang::EOpSubgroupClusteredMax: + case glslang::EOpSubgroupClusteredAnd: + case glslang::EOpSubgroupClusteredOr: + case glslang::EOpSubgroupClusteredXor: + case glslang::EOpSubgroupQuadBroadcast: +#ifdef NV_EXTENSIONS + case glslang::EOpSubgroupPartitionedAdd: + case glslang::EOpSubgroupPartitionedMul: + case glslang::EOpSubgroupPartitionedMin: + case glslang::EOpSubgroupPartitionedMax: + case glslang::EOpSubgroupPartitionedAnd: + case glslang::EOpSubgroupPartitionedOr: + case glslang::EOpSubgroupPartitionedXor: + case glslang::EOpSubgroupPartitionedInclusiveAdd: + case glslang::EOpSubgroupPartitionedInclusiveMul: + case glslang::EOpSubgroupPartitionedInclusiveMin: + case glslang::EOpSubgroupPartitionedInclusiveMax: + case glslang::EOpSubgroupPartitionedInclusiveAnd: + case glslang::EOpSubgroupPartitionedInclusiveOr: + case glslang::EOpSubgroupPartitionedInclusiveXor: + case glslang::EOpSubgroupPartitionedExclusiveAdd: + case glslang::EOpSubgroupPartitionedExclusiveMul: + case glslang::EOpSubgroupPartitionedExclusiveMin: + case glslang::EOpSubgroupPartitionedExclusiveMax: + case glslang::EOpSubgroupPartitionedExclusiveAnd: + case glslang::EOpSubgroupPartitionedExclusiveOr: + case glslang::EOpSubgroupPartitionedExclusiveXor: +#endif + return createSubgroupOperation(op, typeId, operands, typeProxy); + #ifdef AMD_EXTENSIONS case glslang::EOpSwizzleInvocations: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); @@ -5431,41 +6317,90 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.createNoResultOp(spv::OpEndPrimitive); return 0; case glslang::EOpBarrier: - builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, spv::MemorySemanticsMaskNone); + if (glslangIntermediate->getStage() == EShLangTessControl) { + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeInvocation, spv::MemorySemanticsMaskNone); + // TODO: prefer the following, when available: + // builder.createControlBarrier(spv::ScopePatch, spv::ScopePatch, + // spv::MemorySemanticsPatchMask | + // spv::MemorySemanticsAcquireReleaseMask); + } else { + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, + spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + } return 0; case glslang::EOpMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierAtomicCounter: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierBuffer: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierImage: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierShared: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpGroupMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpAllMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsAllMemory); + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, + spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; - case glslang::EOpGroupMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask); + case glslang::EOpDeviceMemoryBarrier: + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + return 0; + case glslang::EOpDeviceMemoryBarrierWithGroupSync: + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpWorkgroupMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, + spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; + case glslang::EOpSubgroupBarrier: + builder.createControlBarrier(spv::ScopeSubgroup, spv::ScopeSubgroup, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); + return spv::NoResult; + case glslang::EOpSubgroupMemoryBarrier: + builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); + return spv::NoResult; + case glslang::EOpSubgroupMemoryBarrierBuffer: + builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + return spv::NoResult; + case glslang::EOpSubgroupMemoryBarrierImage: + builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + return spv::NoResult; + case glslang::EOpSubgroupMemoryBarrierShared: + builder.createMemoryBarrier(spv::ScopeSubgroup, spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + return spv::NoResult; + case glslang::EOpSubgroupElect: { + std::vector operands; + return createSubgroupOperation(op, typeId, operands, glslang::EbtVoid); + } #ifdef AMD_EXTENSIONS case glslang::EOpTime: { @@ -5494,24 +6429,15 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol symbolValues[symbol->getId()] = id; if (symbol->getBasicType() != glslang::EbtBlock) { - addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); - addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); - addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier())); + builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); + builder.addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); + builder.addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier())); if (symbol->getType().getQualifier().hasSpecConstantId()) - addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId); + builder.addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId); if (symbol->getQualifier().hasIndex()) builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex); if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent); - if (glslangIntermediate->getXfbMode()) { - builder.addCapability(spv::CapabilityTransformFeedback); - if (symbol->getQualifier().hasXfbStride()) - builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); - if (symbol->getQualifier().hasXfbBuffer()) - builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer); - if (symbol->getQualifier().hasXfbOffset()) - builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset); - } // atomic counters use this: if (symbol->getQualifier().hasOffset()) builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset); @@ -5519,7 +6445,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol if (symbol->getQualifier().hasLocation()) builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation); - addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); + builder.addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(id, spv::DecorationStream, symbol->getQualifier().layoutStream); @@ -5538,21 +6464,30 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addCapability(spv::CapabilityTransformFeedback); if (symbol->getQualifier().hasXfbStride()) builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); - if (symbol->getQualifier().hasXfbBuffer()) + if (symbol->getQualifier().hasXfbBuffer()) { builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer); + unsigned stride = glslangIntermediate->getXfbStride(symbol->getQualifier().layoutXfbBuffer); + if (stride != glslang::TQualifier::layoutXfbStrideEnd) + builder.addDecoration(id, spv::DecorationXfbStride, stride); + } + if (symbol->getQualifier().hasXfbOffset()) + builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset); } if (symbol->getType().isImage()) { std::vector memory; TranslateMemoryDecoration(symbol->getType().getQualifier(), memory); for (unsigned int i = 0; i < memory.size(); ++i) - addDecoration(id, memory[i]); + builder.addDecoration(id, memory[i]); } // built-in variable decorations spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); if (builtIn != spv::BuiltInMax) - addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); + builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); + + // nonuniform + builder.addDecoration(id, TranslateNonUniformDecoration(symbol->getType().getQualifier())); #ifdef NV_EXTENSIONS if (builtIn == spv::BuiltInSampleMask) { @@ -5562,7 +6497,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol decoration = (spv::Decoration)spv::DecorationOverrideCoverageNV; else decoration = (spv::Decoration)spv::DecorationMax; - addDecoration(id, decoration); + builder.addDecoration(id, decoration); if (decoration != spv::DecorationMax) { builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage); } @@ -5570,53 +6505,32 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol else if (builtIn == spv::BuiltInLayer) { // SPV_NV_viewport_array2 extension if (symbol->getQualifier().layoutViewportRelative) { - addDecoration(id, (spv::Decoration)spv::DecorationViewportRelativeNV); + builder.addDecoration(id, (spv::Decoration)spv::DecorationViewportRelativeNV); builder.addCapability(spv::CapabilityShaderViewportMaskNV); builder.addExtension(spv::E_SPV_NV_viewport_array2); } if (symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048) { - addDecoration(id, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, symbol->getQualifier().layoutSecondaryViewportRelativeOffset); + builder.addDecoration(id, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, + symbol->getQualifier().layoutSecondaryViewportRelativeOffset); builder.addCapability(spv::CapabilityShaderStereoViewNV); builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); } } if (symbol->getQualifier().layoutPassthrough) { - addDecoration(id, spv::DecorationPassthroughNV); + builder.addDecoration(id, spv::DecorationPassthroughNV); builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV); builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); } #endif - return id; -} - -// If 'dec' is valid, add no-operand decoration to an object -void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec) -{ - if (dec != spv::DecorationMax) - builder.addDecoration(id, dec); -} - -// If 'dec' is valid, add a one-operand decoration to an object -void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec, unsigned value) -{ - if (dec != spv::DecorationMax) - builder.addDecoration(id, dec, value); -} - -// If 'dec' is valid, add a no-operand decoration to a struct member -void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec) -{ - if (dec != spv::DecorationMax) - builder.addMemberDecoration(id, (unsigned)member, dec); -} + if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) { + builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); + builder.addDecoration(id, (spv::Decoration)spv::DecorationHlslSemanticGOOGLE, + symbol->getType().getQualifier().semanticName); + } -// If 'dec' is valid, add a one-operand decoration to a struct member -void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value) -{ - if (dec != spv::DecorationMax) - builder.addMemberDecoration(id, (unsigned)member, dec, value); + return id; } // Make a full tree of instructions to build a SPIR-V specialization constant, @@ -5651,8 +6565,10 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n for (int dim = 0; dim < 3; ++dim) { bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); - if (specConst) - addDecoration(dimConstId.back(), spv::DecorationSpecId, glslangIntermediate->getLocalSizeSpecId(dim)); + if (specConst) { + builder.addDecoration(dimConstId.back(), spv::DecorationSpecId, + glslangIntermediate->getLocalSizeSpecId(dim)); + } } return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true); } @@ -5711,6 +6627,18 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) { bool zero = nextConst >= consts.size(); switch (glslangType.getBasicType()) { + case glslang::EbtInt8: + spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const())); + break; + case glslang::EbtUint8: + spvConsts.push_back(builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const())); + break; + case glslang::EbtInt16: + spvConsts.push_back(builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const())); + break; + case glslang::EbtUint16: + spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const())); + break; case glslang::EbtInt: spvConsts.push_back(builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst())); break; @@ -5723,25 +6651,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtUint64: spvConsts.push_back(builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const())); break; -#ifdef AMD_EXTENSIONS - case glslang::EbtInt16: - spvConsts.push_back(builder.makeInt16Constant(zero ? 0 : (short)consts[nextConst].getIConst())); - break; - case glslang::EbtUint16: - spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : (unsigned short)consts[nextConst].getUConst())); - break; -#endif case glslang::EbtFloat: spvConsts.push_back(builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; case glslang::EbtDouble: spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst())); break; -#ifdef AMD_EXTENSIONS case glslang::EbtFloat16: spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; -#endif case glslang::EbtBool: spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); break; @@ -5756,6 +6674,18 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla bool zero = nextConst >= consts.size(); spv::Id scalar = 0; switch (glslangType.getBasicType()) { + case glslang::EbtInt8: + scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant); + break; + case glslang::EbtUint8: + scalar = builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const(), specConstant); + break; + case glslang::EbtInt16: + scalar = builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const(), specConstant); + break; + case glslang::EbtUint16: + scalar = builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const(), specConstant); + break; case glslang::EbtInt: scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst(), specConstant); break; @@ -5768,25 +6698,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtUint64: scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); break; -#ifdef AMD_EXTENSIONS - case glslang::EbtInt16: - scalar = builder.makeInt16Constant(zero ? 0 : (short)consts[nextConst].getIConst(), specConstant); - break; - case glslang::EbtUint16: - scalar = builder.makeUint16Constant(zero ? 0 : (unsigned short)consts[nextConst].getUConst(), specConstant); - break; -#endif case glslang::EbtFloat: scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtDouble: scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant); break; -#ifdef AMD_EXTENSIONS case glslang::EbtFloat16: scalar = builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; -#endif case glslang::EbtBool: scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant); break; @@ -5933,6 +6853,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan return builder.createOp(spv::OpPhi, boolTypeId, phiOperands); } +#ifdef AMD_EXTENSIONS // Return type Id of the imported set of extended instructions corresponds to the name. // Import this set if it has not been imported yet. spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) @@ -5946,6 +6867,7 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) return extBuiltins; } } +#endif }; // end anonymous namespace @@ -5959,6 +6881,20 @@ void GetSpirvVersion(std::string& version) version = buf; } +// For low-order part of the generator's magic number. Bump up +// when there is a change in the style (e.g., if SSA form changes, +// or a different instruction sequence to do something gets used). +int GetSpirvGeneratorVersion() +{ + // return 1; // start + // return 2; // EOpAtomicCounterDecrement gets a post decrement, to map between GLSL -> SPIR-V + // return 3; // change/correct barrier-instruction operands, to match memory model group decisions + // return 4; // some deeper access chains: for dynamic vector component, and local Boolean component + // return 5; // make OpArrayLength result type be an int with signedness of 0 + return 6; // revert version 5 change, which makes a different (new) kind of incorrect code, + // versions 4 and 6 each generate OpArrayLength as it has long been done +} + // Write SPIR-V out to a binary file void OutputSpvBin(const std::vector& spirv, const char* baseName) { @@ -5980,7 +6916,9 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, out.open(baseName, std::ios::binary | std::ios::out); if (out.fail()) printf("ERROR: Failed to open file: %s\n", baseName); - out << "\t// " GLSLANG_REVISION " " GLSLANG_DATE << std::endl; + out << "\t// " << + glslang::GetSpirvGeneratorVersion() << "." << GLSLANG_MINOR_VERSION << "." << GLSLANG_PATCH_LEVEL << + std::endl; if (varName != nullptr) { out << "\t #pragma once" << std::endl; out << "const uint32_t " << varName << "[] = {" << std::endl; @@ -6003,12 +6941,6 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, out.close(); } -#ifdef ENABLE_OPT -void errHandler(const std::string& str) { - std::cerr << str << std::endl; -} -#endif - // // Set up the glslang traversal // @@ -6032,12 +6964,12 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vectortraverse(&it); it.finishSpv(); it.dumpSpv(spirv); -#ifdef ENABLE_OPT +#if ENABLE_OPT // If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan // eg. forward and remove memory writes of opaque types. if ((intermediate.getSource() == EShSourceHlsl || @@ -6054,30 +6986,35 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vectoroptimizeSize) { + optimizer.RegisterPass(CreateRedundancyEliminationPass()); + // TODO(greg-lunarg): Add this when AMD driver issues are resolved + // optimizer.RegisterPass(CreateCommonUniformElimPass()); + } optimizer.RegisterPass(CreateAggressiveDCEPass()); - // TODO(greg-lunarg): Add this when AMD driver issues are resolved - // if (options->optimizeSize) - // optimizer.RegisterPass(CreateCommonUniformElimPass()); if (!optimizer.Run(spirv.data(), spirv.size(), &spirv)) return; - - // Remove dead module-level objects: functions, types, vars - // TODO(greg-lunarg): Switch to spirv-opt versions when available - spv::spirvbin_t Remapper(0); - Remapper.registerErrorHandler(errHandler); - Remapper.remap(spirv, spv::spirvbin_t::DCE_ALL); } #endif diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.h index 0398501f59ffbcb546ad6e2220a0689acaec550d..f7f7cff620be71c05122f04b2457e918f148ce36 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/GlslangToSpv.h @@ -34,7 +34,7 @@ #pragma once -#if _MSC_VER >= 1900 +#if defined(_MSC_VER) && _MSC_VER >= 1900 #pragma warning(disable : 4464) // relative include path contains '..' #endif @@ -56,6 +56,7 @@ struct SpvOptions { }; void GetSpirvVersion(std::string&); +int GetSpirvGeneratorVersion(); void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, SpvOptions* options = nullptr); void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/SPVRemapper.cpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/SPVRemapper.cpp index 4d96df6e55ff6925a838eb43e3cdd89255206888..4bac145305f7fa414150226e4a077cf4bbf52b5d 100755 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/SPVRemapper.cpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/SPVRemapper.cpp @@ -256,7 +256,7 @@ namespace spv { spv::Id spirvbin_t::localId(spv::Id id, spv::Id newId) { - assert(id != spv::NoResult && newId != spv::NoResult); + //assert(id != spv::NoResult && newId != spv::NoResult); if (id > bound()) { error(std::string("ID out of range: ") + std::to_string(id)); @@ -1392,7 +1392,7 @@ namespace spv { int strippedPos = 0; for (unsigned word = 0; word < unsigned(spv.size()); ++word) { - if (strip_it != stripRange.end() && word >= strip_it->second) + while (strip_it != stripRange.end() && word >= strip_it->second) ++strip_it; if (strip_it == stripRange.end() || word < strip_it->first || word >= strip_it->second) diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.cpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.cpp index c795ca8945c8f23117cc429067f7c7d737aa77e5..27ce71caa3bbc01893c0156d6bd3b225354ffd0b 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.cpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.cpp @@ -46,9 +46,7 @@ #include "SpvBuilder.h" -#ifdef AMD_EXTENSIONS - #include "hex_float.h" -#endif +#include "hex_float.h" #ifndef _WIN32 #include @@ -56,7 +54,8 @@ namespace spv { -Builder::Builder(unsigned int magicNumber, SpvBuildLogger* buildLogger) : +Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogger* buildLogger) : + spvVersion(spvVersion), source(SourceLanguageUnknown), sourceVersion(0), sourceFileStringId(NoResult), @@ -193,6 +192,9 @@ Id Builder::makeIntegerType(int width, bool hasSign) // deal with capabilities switch (width) { + case 8: + addCapability(CapabilityInt8); + break; case 16: addCapability(CapabilityInt16); break; @@ -621,7 +623,7 @@ Id Builder::getContainedTypeId(Id typeId) const // See if a scalar constant of this type has already been created, so it // can be reused rather than duplicated. (Required by the specification). -Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const +Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) { Instruction* constant; for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) { @@ -636,7 +638,7 @@ Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned valu } // Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double' or 'int64'). -Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const +Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) { Instruction* constant; for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) { @@ -818,7 +820,6 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) return c->getResultId(); } -#ifdef AMD_EXTENSIONS Id Builder::makeFloat16Constant(float f16, bool specConstant) { Op opcode = specConstant ? OpSpecConstant : OpConstant; @@ -846,9 +847,27 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant) return c->getResultId(); } -#endif -Id Builder::findCompositeConstant(Op typeClass, const std::vector& comps) const +Id Builder::makeFpConstant(Id type, double d, bool specConstant) +{ + assert(isFloatType(type)); + + switch (getScalarTypeWidth(type)) { + case 16: + return makeFloat16Constant((float)d, specConstant); + case 32: + return makeFloatConstant((float)d, specConstant); + case 64: + return makeDoubleConstant(d, specConstant); + default: + break; + } + + assert(false); + return NoResult; +} + +Id Builder::findCompositeConstant(Op typeClass, const std::vector& comps) { Instruction* constant = 0; bool found = false; @@ -876,6 +895,30 @@ Id Builder::findCompositeConstant(Op typeClass, const std::vector& comps) co return found ? constant->getResultId() : NoResult; } +Id Builder::findStructConstant(Id typeId, const std::vector& comps) +{ + Instruction* constant = 0; + bool found = false; + for (int i = 0; i < (int)groupedStructConstants[typeId].size(); ++i) { + constant = groupedStructConstants[typeId][i]; + + // same contents? + bool mismatch = false; + for (int op = 0; op < constant->getNumOperands(); ++op) { + if (constant->getIdOperand(op) != comps[op]) { + mismatch = true; + break; + } + } + if (! mismatch) { + found = true; + break; + } + } + + return found ? constant->getResultId() : NoResult; +} + // Comments in header Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, bool specConstant) { @@ -886,25 +929,33 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, boo switch (typeClass) { case OpTypeVector: case OpTypeArray: - case OpTypeStruct: case OpTypeMatrix: + if (! specConstant) { + Id existing = findCompositeConstant(typeClass, members); + if (existing) + return existing; + } + break; + case OpTypeStruct: + if (! specConstant) { + Id existing = findStructConstant(typeId, members); + if (existing) + return existing; + } break; default: assert(0); return makeFloatConstant(0.0); } - if (! specConstant) { - Id existing = findCompositeConstant(typeClass, members); - if (existing) - return existing; - } - Instruction* c = new Instruction(getUniqueId(), typeId, opcode); for (int op = 0; op < (int)members.size(); ++op) c->addIdOperand(members[op]); constantsTypesGlobals.push_back(std::unique_ptr(c)); - groupedConstants[typeClass].push_back(c); + if (typeClass == OpTypeStruct) + groupedStructConstants[typeId].push_back(c); + else + groupedConstants[typeClass].push_back(c); module.mapInstruction(c); return c->getResultId(); @@ -961,6 +1012,7 @@ void Builder::addDecoration(Id id, Decoration decoration, int num) { if (decoration == spv::DecorationMax) return; + Instruction* dec = new Instruction(OpDecorate); dec->addIdOperand(id); dec->addImmediateOperand(decoration); @@ -970,8 +1022,37 @@ void Builder::addDecoration(Id id, Decoration decoration, int num) decorations.push_back(std::unique_ptr(dec)); } +void Builder::addDecoration(Id id, Decoration decoration, const char* s) +{ + if (decoration == spv::DecorationMax) + return; + + Instruction* dec = new Instruction(OpDecorateStringGOOGLE); + dec->addIdOperand(id); + dec->addImmediateOperand(decoration); + dec->addStringOperand(s); + + decorations.push_back(std::unique_ptr(dec)); +} + +void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) +{ + if (decoration == spv::DecorationMax) + return; + + Instruction* dec = new Instruction(OpDecorateId); + dec->addIdOperand(id); + dec->addImmediateOperand(decoration); + dec->addIdOperand(idDecoration); + + decorations.push_back(std::unique_ptr(dec)); +} + void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num) { + if (decoration == spv::DecorationMax) + return; + Instruction* dec = new Instruction(OpMemberDecorate); dec->addIdOperand(id); dec->addImmediateOperand(member); @@ -982,6 +1063,20 @@ void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decorat decorations.push_back(std::unique_ptr(dec)); } +void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const char *s) +{ + if (decoration == spv::DecorationMax) + return; + + Instruction* dec = new Instruction(OpMemberDecorateStringGOOGLE); + dec->addIdOperand(id); + dec->addImmediateOperand(member); + dec->addImmediateOperand(decoration); + dec->addStringOperand(s); + + decorations.push_back(std::unique_ptr(dec)); +} + // Comments in header Function* Builder::makeEntryPoint(const char* entryPoint) { @@ -1387,16 +1482,13 @@ Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vect return createCompositeInsert(source, target, typeId, channels.front()); Instruction* swizzle = new Instruction(getUniqueId(), typeId, OpVectorShuffle); + assert(isVector(target)); swizzle->addIdOperand(target); - if (accessChain.component != NoResult) - // For dynamic component selection, source does not involve in l-value swizzle - swizzle->addIdOperand(target); - else { - assert(getNumComponents(source) == (int)channels.size()); - assert(isVector(source)); - swizzle->addIdOperand(source); - } + + assert(getNumComponents(source) == (int)channels.size()); + assert(isVector(source)); + swizzle->addIdOperand(source); // Set up an identity shuffle from the base value to the result value unsigned int components[4]; @@ -1405,12 +1497,8 @@ Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vect components[i] = i; // Punch in the l-value swizzle - for (int i = 0; i < (int)channels.size(); ++i) { - if (accessChain.component != NoResult) - components[i] = channels[i]; // Only shuffle the base value - else - components[channels[i]] = numTargetComponents + i; - } + for (int i = 0; i < (int)channels.size(); ++i) + components[channels[i]] = numTargetComponents + i; // finish the instruction with these components selectors for (int i = 0; i < numTargetComponents; ++i) @@ -1725,7 +1813,11 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter break; } case OpImageQueryLod: +#ifdef AMD_EXTENSIONS + resultType = makeVectorType(getScalarTypeId(getTypeId(parameters.coords)), 2); +#else resultType = makeVectorType(makeFloatType(32), 2); +#endif break; case OpImageQueryLevels: case OpImageQuerySamples: @@ -2202,7 +2294,7 @@ void Builder::accessChainPushSwizzle(std::vector& swizzle, Id preSwizz accessChain.preSwizzleBaseType = preSwizzleBaseType; // if needed, propagate the swizzle for the current access chain - if (accessChain.swizzle.size()) { + if (accessChain.swizzle.size() > 0) { std::vector oldSwizzle = accessChain.swizzle; accessChain.swizzle.resize(0); for (unsigned int i = 0; i < swizzle.size(); ++i) { @@ -2223,34 +2315,28 @@ void Builder::accessChainStore(Id rvalue) transferAccessChainSwizzle(true); Id base = collapseAccessChain(); + Id source = rvalue; + + // dynamic component should be gone + assert(accessChain.component == NoResult); // If swizzle still exists, it is out-of-order or not full, we must load the target vector, // extract and insert elements to perform writeMask and/or swizzle. - Id source = NoResult; - if (accessChain.swizzle.size()) { + if (accessChain.swizzle.size() > 0) { Id tempBaseId = createLoad(base); - source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, rvalue, accessChain.swizzle); - } - - // dynamic component selection - if (accessChain.component != NoResult) { - Id tempBaseId = (source == NoResult) ? createLoad(base) : source; - source = createVectorInsertDynamic(tempBaseId, getTypeId(tempBaseId), rvalue, accessChain.component); + source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle); } - if (source == NoResult) - source = rvalue; - createStore(source, base); } // Comments in header -Id Builder::accessChainLoad(Decoration precision, Id resultType) +Id Builder::accessChainLoad(Decoration precision, Decoration nonUniform, Id resultType) { Id id; if (accessChain.isRValue) { - // transfer access chain, but keep it static, so we can stay in registers + // transfer access chain, but try to stay in registers transferAccessChainSwizzle(false); if (accessChain.indexChain.size() > 0) { Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType; @@ -2291,6 +2377,7 @@ Id Builder::accessChainLoad(Decoration precision, Id resultType) // load through the access chain id = createLoad(collapseAccessChain()); setPrecision(id, precision); + addDecoration(id, nonUniform); } // Done, unless there are swizzles to do @@ -2298,19 +2385,20 @@ Id Builder::accessChainLoad(Decoration precision, Id resultType) return id; // Do remaining swizzling - // First, static swizzling - if (accessChain.swizzle.size()) { - // static swizzle + + // Do the basic swizzle + if (accessChain.swizzle.size() > 0) { Id swizzledType = getScalarTypeId(getTypeId(id)); if (accessChain.swizzle.size() > 1) swizzledType = makeVectorType(swizzledType, (int)accessChain.swizzle.size()); id = createRvalueSwizzle(precision, swizzledType, id, accessChain.swizzle); } - // dynamic single-component selection + // Do the dynamic component if (accessChain.component != NoResult) id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision); + addDecoration(id, nonUniform); return id; } @@ -2403,7 +2491,7 @@ void Builder::dump(std::vector& out) const { // Header, before first instructions: out.push_back(MagicNumber); - out.push_back(Version); + out.push_back(spvVersion); out.push_back(builderNumber); out.push_back(uniqueId + 1); out.push_back(0); @@ -2433,7 +2521,6 @@ void Builder::dump(std::vector& out) const // Debug instructions dumpInstructions(out, strings); - dumpModuleProcesses(out); dumpSourceInstructions(out); for (int e = 0; e < (int)sourceExtensions.size(); ++e) { Instruction sourceExtInst(0, 0, OpSourceExtension); @@ -2441,7 +2528,7 @@ void Builder::dump(std::vector& out) const sourceExtInst.dump(out); } dumpInstructions(out, names); - dumpInstructions(out, lines); + dumpModuleProcesses(out); // Annotation instructions dumpInstructions(out, decorations); @@ -2457,26 +2544,66 @@ void Builder::dump(std::vector& out) const // Protected methods. // -// Turn the described access chain in 'accessChain' into an instruction +// Turn the described access chain in 'accessChain' into an instruction(s) // computing its address. This *cannot* include complex swizzles, which must -// be handled after this is called, but it does include swizzles that select -// an individual element, as a single address of a scalar type can be -// computed by an OpAccessChain instruction. +// be handled after this is called. +// +// Can generate code. Id Builder::collapseAccessChain() { assert(accessChain.isRValue == false); - if (accessChain.indexChain.size() > 0) { - if (accessChain.instr == 0) { - StorageClass storageClass = (StorageClass)module.getStorageClass(getTypeId(accessChain.base)); - accessChain.instr = createAccessChain(storageClass, accessChain.base, accessChain.indexChain); - } - + // did we already emit an access chain for this? + if (accessChain.instr != NoResult) return accessChain.instr; - } else + + // If we have a dynamic component, we can still transfer + // that into a final operand to the access chain. We need to remap the + // dynamic component through the swizzle to get a new dynamic component to + // update. + // + // This was not done in transferAccessChainSwizzle() because it might + // generate code. + remapDynamicSwizzle(); + if (accessChain.component != NoResult) { + // transfer the dynamic component to the access chain + accessChain.indexChain.push_back(accessChain.component); + accessChain.component = NoResult; + } + + // note that non-trivial swizzling is left pending + + // do we have an access chain? + if (accessChain.indexChain.size() == 0) return accessChain.base; - // note that non-trivial swizzling is left pending... + // emit the access chain + StorageClass storageClass = (StorageClass)module.getStorageClass(getTypeId(accessChain.base)); + accessChain.instr = createAccessChain(storageClass, accessChain.base, accessChain.indexChain); + + return accessChain.instr; +} + +// For a dynamic component selection of a swizzle. +// +// Turn the swizzle and dynamic component into just a dynamic component. +// +// Generates code. +void Builder::remapDynamicSwizzle() +{ + // do we have a swizzle to remap a dynamic component through? + if (accessChain.component != NoResult && accessChain.swizzle.size() > 1) { + // build a vector of the swizzle for the component to map into + std::vector components; + for (int c = 0; c < (int)accessChain.swizzle.size(); ++c) + components.push_back(makeUintConstant(accessChain.swizzle[c])); + Id mapType = makeVectorType(makeUintType(32), (int)accessChain.swizzle.size()); + Id map = makeCompositeConstant(mapType, components); + + // use it + accessChain.component = createVectorExtractDynamic(map, makeUintType(32), accessChain.component); + accessChain.swizzle.clear(); + } } // clear out swizzle if it is redundant, that is reselecting the same components @@ -2502,38 +2629,30 @@ void Builder::simplifyAccessChainSwizzle() // To the extent any swizzling can become part of the chain // of accesses instead of a post operation, make it so. -// If 'dynamic' is true, include transferring a non-static component index, -// otherwise, only transfer static indexes. +// If 'dynamic' is true, include transferring the dynamic component, +// otherwise, leave it pending. // -// Also, Boolean vectors are likely to be special. While -// for external storage, they should only be integer types, -// function-local bool vectors could use sub-word indexing, -// so keep that as a separate Insert/Extract on a loaded vector. +// Does not generate code. just updates the access chain. void Builder::transferAccessChainSwizzle(bool dynamic) { - // too complex? - if (accessChain.swizzle.size() > 1) - return; - // non existent? if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult) return; - // single component... - - // skip doing it for Boolean vectors - if (isBoolType(getContainedTypeId(accessChain.preSwizzleBaseType))) + // too complex? + // (this requires either a swizzle, or generating code for a dynamic component) + if (accessChain.swizzle.size() > 1) return; + // single component, either in the swizzle and/or dynamic component if (accessChain.swizzle.size() == 1) { - // handle static component + assert(accessChain.component == NoResult); + // handle static component selection accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle.front())); accessChain.swizzle.clear(); - // note, the only valid remaining dynamic access would be to this one - // component, so don't bother even looking at accessChain.component accessChain.preSwizzleBaseType = NoType; - accessChain.component = NoResult; } else if (dynamic && accessChain.component != NoResult) { + assert(accessChain.swizzle.size() == 0); // handle dynamic component accessChain.indexChain.push_back(accessChain.component); accessChain.preSwizzleBaseType = NoType; @@ -2572,12 +2691,15 @@ void Builder::createSelectionMerge(Block* mergeBlock, unsigned int control) buildPoint->addInstruction(std::unique_ptr(merge)); } -void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control) +void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, + unsigned int dependencyLength) { Instruction* merge = new Instruction(OpLoopMerge); merge->addIdOperand(mergeBlock->getId()); merge->addIdOperand(continueBlock->getId()); merge->addImmediateOperand(control); + if ((control & LoopControlDependencyLengthMask) != 0) + merge->addImmediateOperand(dependencyLength); buildPoint->addInstruction(std::unique_ptr(merge)); } @@ -2644,8 +2766,6 @@ void Builder::dumpInstructions(std::vector& out, const std::vector void Builder::dumpModuleProcesses(std::vector& out) const { for (int i = 0; i < (int)moduleProcesses.size(); ++i) { - // TODO: switch this out for the 1.1 headers - const spv::Op OpModuleProcessed = (spv::Op)330; Instruction moduleProcessed(OpModuleProcessed); moduleProcessed.addStringOperand(moduleProcesses[i]); moduleProcessed.dump(out); diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.h index 59b1da2eec3c99419584a48f2ff865beb8b2e298..099b1d957fe839c5b05a0caad52c43a6c01c634a 100755 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/SpvBuilder.h @@ -1,6 +1,7 @@ // // Copyright (C) 2014-2015 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -55,16 +56,19 @@ #include #include #include +#include namespace spv { class Builder { public: - Builder(unsigned int userNumber, SpvBuildLogger* logger); + Builder(unsigned int spvVersion, unsigned int userNumber, SpvBuildLogger* logger); virtual ~Builder(); static const int maxMatrixSize = 4; + unsigned int getSpvVersion() const { return spvVersion; } + void setSource(spv::SourceLanguage lang, int version) { source = lang; @@ -149,7 +153,7 @@ public: bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); } bool isSampledImage(Id resultId) const { return isSampledImageType(getTypeId(resultId)); } - bool isBoolType(Id typeId) const { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); } + bool isBoolType(Id typeId) { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); } bool isIntType(Id typeId) const { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) != 0; } bool isUintType(Id typeId) const { return getTypeClass(typeId) == OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) == 0; } bool isFloatType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat; } @@ -211,19 +215,18 @@ public: // For making new constants (will return old constant if the requested one was already made). Id makeBoolConstant(bool b, bool specConstant = false); + Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); } + Id makeUint8Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(8), u, specConstant); } + Id makeInt16Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)i, specConstant); } + Id makeUint16Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(16), u, specConstant); } Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); } Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); } Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); } Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); } -#ifdef AMD_EXTENSIONS - Id makeInt16Constant(short i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)((unsigned short)i), specConstant); } - Id makeUint16Constant(unsigned short u, bool specConstant = false) { return makeIntConstant(makeUintType(16), (unsigned)u, specConstant); } -#endif Id makeFloatConstant(float f, bool specConstant = false); Id makeDoubleConstant(double d, bool specConstant = false); -#ifdef AMD_EXTENSIONS Id makeFloat16Constant(float f16, bool specConstant = false); -#endif + Id makeFpConstant(Id type, double d, bool specConstant = false); // Turn the array of constants into a proper spv constant of the requested type. Id makeCompositeConstant(Id type, const std::vector& comps, bool specConst = false); @@ -234,7 +237,10 @@ public: void addName(Id, const char* name); void addMemberName(Id, int member, const char* name); void addDecoration(Id, Decoration, int num = -1); + void addDecoration(Id, Decoration, const char*); + void addDecorationId(Id id, Decoration, Id idDecoration); void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1); + void addMemberDecoration(Id, unsigned int member, Decoration, const char*); // At the end of what block do the next create*() instructions go? void setBuildPoint(Block* bp) { buildPoint = bp; } @@ -330,7 +336,7 @@ public: // Generally, the type of 'scalar' does not need to be the same type as the components in 'vector'. // The type of the created vector is a vector of components of the same type as the scalar. // - // Note: One of the arguments will change, with the result coming back that way rather than + // Note: One of the arguments will change, with the result coming back that way rather than // through the return value. void promoteScalar(Decoration precision, Id& left, Id& right); @@ -533,19 +539,22 @@ public: // push new swizzle onto the end of any existing swizzle, merging into a single swizzle void accessChainPushSwizzle(std::vector& swizzle, Id preSwizzleBaseType); - // push a variable component selection onto the access chain; supporting only one, so unsided + // push a dynamic component selection onto the access chain, only applicable with a + // non-trivial swizzle or no swizzle void accessChainPushComponent(Id component, Id preSwizzleBaseType) { - accessChain.component = component; - if (accessChain.preSwizzleBaseType == NoType) - accessChain.preSwizzleBaseType = preSwizzleBaseType; + if (accessChain.swizzle.size() != 1) { + accessChain.component = component; + if (accessChain.preSwizzleBaseType == NoType) + accessChain.preSwizzleBaseType = preSwizzleBaseType; + } } // use accessChain and swizzle to store value void accessChainStore(Id rvalue); // use accessChain and swizzle to load an r-value - Id accessChainLoad(Decoration precision, Id ResultType); + Id accessChainLoad(Decoration precision, Decoration nonUniform, Id ResultType); // get the direct pointer for an l-value Id accessChainGetLValue(); @@ -561,7 +570,7 @@ public: void createBranch(Block* block); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); - void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control); + void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, unsigned int dependencyLength); // Sets to generate opcode for specialization constants. void setToSpecConstCodeGenMode() { generatingOpCodeForSpecConst = true; } @@ -573,10 +582,12 @@ public: protected: Id makeIntConstant(Id typeId, unsigned value, bool specConstant); Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant); - Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const; - Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const; - Id findCompositeConstant(Op typeClass, const std::vector& comps) const; + Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value); + Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2); + Id findCompositeConstant(Op typeClass, const std::vector& comps); + Id findStructConstant(Id typeId, const std::vector& comps); Id collapseAccessChain(); + void remapDynamicSwizzle(); void transferAccessChainSwizzle(bool dynamic); void simplifyAccessChainSwizzle(); void createAndSetNoPredecessorBlock(const char*); @@ -585,6 +596,7 @@ public: void dumpInstructions(std::vector&, const std::vector >&) const; void dumpModuleProcesses(std::vector&) const; + unsigned int spvVersion; // the version of SPIR-V to emit in the header SourceLanguage source; int sourceVersion; spv::Id sourceFileStringId; @@ -611,15 +623,15 @@ public: std::vector > entryPoints; std::vector > executionModes; std::vector > names; - std::vector > lines; std::vector > decorations; std::vector > constantsTypesGlobals; std::vector > externals; std::vector > functions; // not output, internally used for quick & dirty canonical (unique) creation - std::vector groupedConstants[OpConstant]; // all types appear before OpConstant - std::vector groupedTypes[OpConstant]; + std::unordered_map> groupedConstants; // map type opcodes to constant inst. + std::unordered_map> groupedStructConstants; // map struct-id to constant instructions + std::unordered_map> groupedTypes; // map type opcodes to type instructions // stack of switches std::stack switchMerges; diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/disassemble.cpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/disassemble.cpp index c950a66a0e28f973efcc4ef39e71c0518e0f9902..c07dfc7879df7e955225436ec53941be92cc5f4b 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/disassemble.cpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/disassemble.cpp @@ -54,6 +54,7 @@ namespace spv { #ifdef AMD_EXTENSIONS #include "GLSL.ext.AMD.h" #endif + #ifdef NV_EXTENSIONS #include "GLSL.ext.NV.h" #endif @@ -80,12 +81,15 @@ static void Kill(std::ostream& out, const char* message) // used to identify the extended instruction library imported when printing enum ExtInstSet { GLSL450Inst, + #ifdef AMD_EXTENSIONS GLSLextAMDInst, #endif + #ifdef NV_EXTENSIONS GLSLextNVInst, #endif + OpenCLExtInst, }; @@ -653,7 +657,6 @@ static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint } #endif - #ifdef NV_EXTENSIONS static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint) { diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.cpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.cpp index f9d5254c7eca4c7f8eddc499fd5aff7266c4378f..a90596873547afa69f729dcd03a0ee3f931c015c 100755 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.cpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.cpp @@ -49,6 +49,7 @@ namespace spv { extern "C" { // Include C-based headers that don't have a namespace #include "GLSL.ext.KHR.h" + #include "GLSL.ext.EXT.h" #ifdef AMD_EXTENSIONS #include "GLSL.ext.AMD.h" #endif @@ -65,7 +66,7 @@ namespace spv { // the specification (or their sanitized versions for auto-generating the // spirv headers. // -// Also, the ceilings are declared next to these, to help keep them in sync. +// Also, for masks the ceilings are declared next to these, to help keep them in sync. // Ceilings should be // - one more than the maximum value an enumerant takes on, for non-mask enumerants // (for non-sparse enums, this is the number of enumerants) @@ -73,8 +74,6 @@ namespace spv { // (for non-sparse mask enums, this is the number of enumerants) // -const int SourceLanguageCeiling = 6; // HLSL todo: need official enumerant - const char* SourceString(int source) { switch (source) { @@ -85,13 +84,10 @@ const char* SourceString(int source) case 4: return "OpenCL_CPP"; case 5: return "HLSL"; - case SourceLanguageCeiling: default: return "Bad"; } } -const int ExecutionModelCeiling = 7; - const char* ExecutionModelString(int model) { switch (model) { @@ -103,13 +99,10 @@ const char* ExecutionModelString(int model) case 5: return "GLCompute"; case 6: return "Kernel"; - case ExecutionModelCeiling: default: return "Bad"; } } -const int AddressingModelCeiling = 3; - const char* AddressingString(int addr) { switch (addr) { @@ -117,13 +110,10 @@ const char* AddressingString(int addr) case 1: return "Physical32"; case 2: return "Physical64"; - case AddressingModelCeiling: default: return "Bad"; } } -const int MemoryModelCeiling = 3; - const char* MemoryString(int mem) { switch (mem) { @@ -131,7 +121,6 @@ const char* MemoryString(int mem) case 1: return "GLSL450"; case 2: return "OpenCL"; - case MemoryModelCeiling: default: return "Bad"; } } @@ -181,8 +170,6 @@ const char* ExecutionModeString(int mode) } } -const int StorageClassCeiling = 13; - const char* StorageClassString(int StorageClass) { switch (StorageClass) { @@ -200,7 +187,6 @@ const char* StorageClassString(int StorageClass) case 11: return "Image"; case 12: return "StorageBuffer"; - case StorageClassCeiling: default: return "Bad"; } } @@ -260,19 +246,21 @@ const char* DecorationString(int decoration) default: return "Bad"; #ifdef AMD_EXTENSIONS - case 4999: return "ExplicitInterpAMD"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; #endif #ifdef NV_EXTENSIONS - case 5248: return "OverrideCoverageNV"; - case 5250: return "PassthroughNV"; - case 5252: return "ViewportRelativeNV"; - case 5256: return "SecondaryViewportRelativeNV"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; #endif + + case DecorationNonUniformEXT: return "DecorationNonUniformEXT"; + case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE"; + case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE"; } } -const int BuiltInCeiling = 44; - const char* BuiltInString(int builtIn) { switch (builtIn) { @@ -351,13 +339,12 @@ const char* BuiltInString(int builtIn) case 5262: return "ViewportMaskPerViewNV"; #endif - case BuiltInCeiling: + case 5264: return "FullyCoveredEXT"; + default: return "Bad"; } } -const int DimensionCeiling = 7; - const char* DimensionString(int dim) { switch (dim) { @@ -369,13 +356,10 @@ const char* DimensionString(int dim) case 5: return "Buffer"; case 6: return "SubpassData"; - case DimensionCeiling: default: return "Bad"; } } -const int SamplerAddressingModeCeiling = 5; - const char* SamplerAddressingModeString(int mode) { switch (mode) { @@ -385,26 +369,20 @@ const char* SamplerAddressingModeString(int mode) case 3: return "Repeat"; case 4: return "RepeatMirrored"; - case SamplerAddressingModeCeiling: default: return "Bad"; } } -const int SamplerFilterModeCeiling = 2; - const char* SamplerFilterModeString(int mode) { switch (mode) { case 0: return "Nearest"; case 1: return "Linear"; - case SamplerFilterModeCeiling: default: return "Bad"; } } -const int ImageFormatCeiling = 40; - const char* ImageFormatString(int format) { switch (format) { @@ -461,14 +439,11 @@ const char* ImageFormatString(int format) case 38: return "R16ui"; case 39: return "R8ui"; - case ImageFormatCeiling: default: return "Bad"; } } -const int ImageChannelOrderCeiling = 19; - const char* ImageChannelOrderString(int format) { switch (format) { @@ -492,14 +467,11 @@ const char* ImageChannelOrderString(int format) case 17: return "sRGBA"; case 18: return "sBGRA"; - case ImageChannelOrderCeiling: default: return "Bad"; } } -const int ImageChannelDataTypeCeiling = 17; - const char* ImageChannelDataTypeString(int type) { switch (type) @@ -522,7 +494,6 @@ const char* ImageChannelDataTypeString(int type) case 15: return "UnormInt24"; case 16: return "UnormInt101010_2"; - case ImageChannelDataTypeCeiling: default: return "Bad"; } @@ -548,8 +519,6 @@ const char* ImageOperandsString(int format) } } -const int FPFastMathCeiling = 5; - const char* FPFastMathString(int mode) { switch (mode) { @@ -559,13 +528,10 @@ const char* FPFastMathString(int mode) case 3: return "AllowRecip"; case 4: return "Fast"; - case FPFastMathCeiling: default: return "Bad"; } } -const int FPRoundingModeCeiling = 4; - const char* FPRoundingModeString(int mode) { switch (mode) { @@ -574,26 +540,20 @@ const char* FPRoundingModeString(int mode) case 2: return "RTP"; case 3: return "RTN"; - case FPRoundingModeCeiling: default: return "Bad"; } } -const int LinkageTypeCeiling = 2; - const char* LinkageTypeString(int type) { switch (type) { case 0: return "Export"; case 1: return "Import"; - case LinkageTypeCeiling: default: return "Bad"; } } -const int FuncParamAttrCeiling = 8; - const char* FuncParamAttrString(int attr) { switch (attr) { @@ -606,13 +566,10 @@ const char* FuncParamAttrString(int attr) case 6: return "NoWrite"; case 7: return "NoReadWrite"; - case FuncParamAttrCeiling: default: return "Bad"; } } -const int AccessQualifierCeiling = 3; - const char* AccessQualifierString(int attr) { switch (attr) { @@ -620,7 +577,6 @@ const char* AccessQualifierString(int attr) case 1: return "WriteOnly"; case 2: return "ReadWrite"; - case AccessQualifierCeiling: default: return "Bad"; } } @@ -668,8 +624,6 @@ const char* FunctionControlString(int cont) } } -const int MemorySemanticsCeiling = 12; - const char* MemorySemanticsString(int mem) { // Note: No bits set (None) means "Relaxed" @@ -687,13 +641,10 @@ const char* MemorySemanticsString(int mem) case 10: return "AtomicCounterMemory"; case 11: return "ImageMemory"; - case MemorySemanticsCeiling: default: return "Bad"; } } -const int MemoryAccessCeiling = 3; - const char* MemoryAccessString(int mem) { switch (mem) { @@ -701,13 +652,10 @@ const char* MemoryAccessString(int mem) case 1: return "Aligned"; case 2: return "Nontemporal"; - case MemoryAccessCeiling: default: return "Bad"; } } -const int ScopeCeiling = 5; - const char* ScopeString(int mem) { switch (mem) { @@ -717,29 +665,29 @@ const char* ScopeString(int mem) case 3: return "Subgroup"; case 4: return "Invocation"; - case ScopeCeiling: default: return "Bad"; } } -const int GroupOperationCeiling = 3; - const char* GroupOperationString(int gop) { switch (gop) { - case 0: return "Reduce"; - case 1: return "InclusiveScan"; - case 2: return "ExclusiveScan"; + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; +#ifdef NV_EXTENSIONS + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; +#endif - case GroupOperationCeiling: default: return "Bad"; } } -const int KernelEnqueueFlagsCeiling = 3; - const char* KernelEnqueueFlagsString(int flag) { switch (flag) @@ -748,26 +696,20 @@ const char* KernelEnqueueFlagsString(int flag) case 1: return "WaitKernel"; case 2: return "WaitWorkGroup"; - case KernelEnqueueFlagsCeiling: default: return "Bad"; } } -const int KernelProfilingInfoCeiling = 1; - const char* KernelProfilingInfoString(int info) { switch (info) { case 0: return "CmdExecTime"; - case KernelProfilingInfoCeiling: default: return "Bad"; } } -const int CapabilityCeiling = 58; - const char* CapabilityString(int info) { switch (info) @@ -830,39 +772,63 @@ const char* CapabilityString(int info) case 55: return "StorageImageReadWithoutFormat"; case 56: return "StorageImageWriteWithoutFormat"; case 57: return "MultiViewport"; + case 61: return "GroupNonUniform"; + case 62: return "GroupNonUniformVote"; + case 63: return "GroupNonUniformArithmetic"; + case 64: return "GroupNonUniformBallot"; + case 65: return "GroupNonUniformShuffle"; + case 66: return "GroupNonUniformShuffleRelative"; + case 67: return "GroupNonUniformClustered"; + case 68: return "GroupNonUniformQuad"; - case 4423: return "SubgroupBallotKHR"; - case 4427: return "DrawParameters"; - case 4431: return "SubgroupVoteKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; - case 4433: return "StorageUniformBufferBlock16"; - case 4434: return "StorageUniform16"; - case 4435: return "StoragePushConstant16"; - case 4436: return "StorageInputOutput16"; + case CapabilityStorageUniformBufferBlock16: return "StorageUniformBufferBlock16"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; - case 4437: return "DeviceGroup"; - case 4439: return "MultiView"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; - case 5013: return "StencilExportEXT"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; #ifdef AMD_EXTENSIONS - case 5009: return "ImageGatherBiasLodAMD"; - case 5010: return "FragmentMaskAMD"; - case 5015: return "ImageReadWriteLodAMD"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; #endif - case 4445: return "AtomicStorageOps"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; - case 4447: return "SampleMaskPostDepthCoverage"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; #ifdef NV_EXTENSIONS - case 5251: return "GeometryShaderPassthroughNV"; - case 5254: return "ShaderViewportIndexLayerNV"; - case 5255: return "ShaderViewportMaskNV"; - case 5259: return "ShaderStereoViewNV"; - case 5260: return "PerViewAttributesNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; #endif - case CapabilityCeiling: + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + + case CapabilityShaderNonUniformEXT: return "CapabilityShaderNonUniformEXT"; + case CapabilityRuntimeDescriptorArrayEXT: return "CapabilityRuntimeDescriptorArrayEXT"; + case CapabilityInputAttachmentArrayDynamicIndexingEXT: return "CapabilityInputAttachmentArrayDynamicIndexingEXT"; + case CapabilityUniformTexelBufferArrayDynamicIndexingEXT: return "CapabilityUniformTexelBufferArrayDynamicIndexingEXT"; + case CapabilityStorageTexelBufferArrayDynamicIndexingEXT: return "CapabilityStorageTexelBufferArrayDynamicIndexingEXT"; + case CapabilityUniformBufferArrayNonUniformIndexingEXT: return "CapabilityUniformBufferArrayNonUniformIndexingEXT"; + case CapabilitySampledImageArrayNonUniformIndexingEXT: return "CapabilitySampledImageArrayNonUniformIndexingEXT"; + case CapabilityStorageBufferArrayNonUniformIndexingEXT: return "CapabilityStorageBufferArrayNonUniformIndexingEXT"; + case CapabilityStorageImageArrayNonUniformIndexingEXT: return "CapabilityStorageImageArrayNonUniformIndexingEXT"; + case CapabilityInputAttachmentArrayNonUniformIndexingEXT: return "CapabilityInputAttachmentArrayNonUniformIndexingEXT"; + case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "CapabilityUniformTexelBufferArrayNonUniformIndexingEXT"; + case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "CapabilityStorageTexelBufferArrayNonUniformIndexingEXT"; + default: return "Bad"; } } @@ -1192,6 +1158,44 @@ const char* OpcodeString(int op) case 319: return "OpAtomicFlagClear"; case 320: return "OpImageSparseRead"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpDecorateId: return "OpDecorateId"; + + case 333: return "OpGroupNonUniformElect"; + case 334: return "OpGroupNonUniformAll"; + case 335: return "OpGroupNonUniformAny"; + case 336: return "OpGroupNonUniformAllEqual"; + case 337: return "OpGroupNonUniformBroadcast"; + case 338: return "OpGroupNonUniformBroadcastFirst"; + case 339: return "OpGroupNonUniformBallot"; + case 340: return "OpGroupNonUniformInverseBallot"; + case 341: return "OpGroupNonUniformBallotBitExtract"; + case 342: return "OpGroupNonUniformBallotBitCount"; + case 343: return "OpGroupNonUniformBallotFindLSB"; + case 344: return "OpGroupNonUniformBallotFindMSB"; + case 345: return "OpGroupNonUniformShuffle"; + case 346: return "OpGroupNonUniformShuffleXor"; + case 347: return "OpGroupNonUniformShuffleUp"; + case 348: return "OpGroupNonUniformShuffleDown"; + case 349: return "OpGroupNonUniformIAdd"; + case 350: return "OpGroupNonUniformFAdd"; + case 351: return "OpGroupNonUniformIMul"; + case 352: return "OpGroupNonUniformFMul"; + case 353: return "OpGroupNonUniformSMin"; + case 354: return "OpGroupNonUniformUMin"; + case 355: return "OpGroupNonUniformFMin"; + case 356: return "OpGroupNonUniformSMax"; + case 357: return "OpGroupNonUniformUMax"; + case 358: return "OpGroupNonUniformFMax"; + case 359: return "OpGroupNonUniformBitwiseAnd"; + case 360: return "OpGroupNonUniformBitwiseOr"; + case 361: return "OpGroupNonUniformBitwiseXor"; + case 362: return "OpGroupNonUniformLogicalAnd"; + case 363: return "OpGroupNonUniformLogicalOr"; + case 364: return "OpGroupNonUniformLogicalXor"; + case 365: return "OpGroupNonUniformQuadBroadcast"; + case 366: return "OpGroupNonUniformQuadSwap"; + case 4421: return "OpSubgroupBallotKHR"; case 4422: return "OpSubgroupFirstInvocationKHR"; case 4428: return "OpSubgroupAllKHR"; @@ -1213,7 +1217,12 @@ const char* OpcodeString(int op) case 5012: return "OpFragmentFetchAMD"; #endif - case OpcodeCeiling: + case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE"; + case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE"; + +#ifdef NV_EXTENSIONS + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; +#endif default: return "Bad"; } @@ -1226,35 +1235,12 @@ OperandParameters ExecutionModeOperands[ExecutionModeCeiling]; OperandParameters DecorationOperands[DecorationCeiling]; EnumDefinition OperandClassParams[OperandCount]; -EnumParameters ExecutionModelParams[ExecutionModelCeiling]; -EnumParameters AddressingParams[AddressingModelCeiling]; -EnumParameters MemoryParams[MemoryModelCeiling]; EnumParameters ExecutionModeParams[ExecutionModeCeiling]; -EnumParameters StorageParams[StorageClassCeiling]; -EnumParameters SamplerAddressingModeParams[SamplerAddressingModeCeiling]; -EnumParameters SamplerFilterModeParams[SamplerFilterModeCeiling]; -EnumParameters ImageFormatParams[ImageFormatCeiling]; -EnumParameters ImageChannelOrderParams[ImageChannelOrderCeiling]; -EnumParameters ImageChannelDataTypeParams[ImageChannelDataTypeCeiling]; EnumParameters ImageOperandsParams[ImageOperandsCeiling]; -EnumParameters FPFastMathParams[FPFastMathCeiling]; -EnumParameters FPRoundingModeParams[FPRoundingModeCeiling]; -EnumParameters LinkageTypeParams[LinkageTypeCeiling]; EnumParameters DecorationParams[DecorationCeiling]; -EnumParameters BuiltInParams[BuiltInCeiling]; -EnumParameters DimensionalityParams[DimensionCeiling]; -EnumParameters FuncParamAttrParams[FuncParamAttrCeiling]; -EnumParameters AccessQualifierParams[AccessQualifierCeiling]; -EnumParameters GroupOperationParams[GroupOperationCeiling]; EnumParameters LoopControlParams[FunctionControlCeiling]; EnumParameters SelectionControlParams[SelectControlCeiling]; EnumParameters FunctionControlParams[FunctionControlCeiling]; -EnumParameters MemorySemanticsParams[MemorySemanticsCeiling]; -EnumParameters MemoryAccessParams[MemoryAccessCeiling]; -EnumParameters ScopeParams[ScopeCeiling]; -EnumParameters KernelEnqueueFlagsParams[KernelEnqueueFlagsCeiling]; -EnumParameters KernelProfilingInfoParams[KernelProfilingInfoCeiling]; -EnumParameters CapabilityParams[CapabilityCeiling]; // Set up all the parameterizing descriptions of the opcodes, operands, etc. void Parameterize() @@ -1304,7 +1290,10 @@ void Parameterize() InstructionDesc[OpImageWrite].setResultAndType(false, false); InstructionDesc[OpDecorationGroup].setResultAndType(true, false); InstructionDesc[OpDecorate].setResultAndType(false, false); + InstructionDesc[OpDecorateId].setResultAndType(false, false); + InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false); InstructionDesc[OpMemberDecorate].setResultAndType(false, false); + InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false); InstructionDesc[OpGroupDecorate].setResultAndType(false, false); InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); InstructionDesc[OpName].setResultAndType(false, false); @@ -1343,6 +1332,7 @@ void Parameterize() InstructionDesc[OpReleaseEvent].setResultAndType(false, false); InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); + InstructionDesc[OpModuleProcessed].setResultAndType(false, false); // Specific additional context-dependent operands @@ -1380,354 +1370,39 @@ void Parameterize() DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); - OperandClassParams[OperandSource].set(SourceLanguageCeiling, SourceString, 0); - OperandClassParams[OperandExecutionModel].set(ExecutionModelCeiling, ExecutionModelString, ExecutionModelParams); - OperandClassParams[OperandAddressing].set(AddressingModelCeiling, AddressingString, AddressingParams); - OperandClassParams[OperandMemory].set(MemoryModelCeiling, MemoryString, MemoryParams); + OperandClassParams[OperandSource].set(0, SourceString, 0); + OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); + OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); + OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); - OperandClassParams[OperandStorage].set(StorageClassCeiling, StorageClassString, StorageParams); - OperandClassParams[OperandDimensionality].set(DimensionCeiling, DimensionString, DimensionalityParams); - OperandClassParams[OperandSamplerAddressingMode].set(SamplerAddressingModeCeiling, SamplerAddressingModeString, SamplerAddressingModeParams); - OperandClassParams[OperandSamplerFilterMode].set(SamplerFilterModeCeiling, SamplerFilterModeString, SamplerFilterModeParams); - OperandClassParams[OperandSamplerImageFormat].set(ImageFormatCeiling, ImageFormatString, ImageFormatParams); - OperandClassParams[OperandImageChannelOrder].set(ImageChannelOrderCeiling, ImageChannelOrderString, ImageChannelOrderParams); - OperandClassParams[OperandImageChannelDataType].set(ImageChannelDataTypeCeiling, ImageChannelDataTypeString, ImageChannelDataTypeParams); + OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); + OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); + OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); + OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); + OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); + OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); + OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); - OperandClassParams[OperandFPFastMath].set(FPFastMathCeiling, FPFastMathString, FPFastMathParams, true); - OperandClassParams[OperandFPRoundingMode].set(FPRoundingModeCeiling, FPRoundingModeString, FPRoundingModeParams); - OperandClassParams[OperandLinkageType].set(LinkageTypeCeiling, LinkageTypeString, LinkageTypeParams); - OperandClassParams[OperandFuncParamAttr].set(FuncParamAttrCeiling, FuncParamAttrString, FuncParamAttrParams); - OperandClassParams[OperandAccessQualifier].set(AccessQualifierCeiling, AccessQualifierString, AccessQualifierParams); + OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); + OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); + OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); + OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); + OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); OperandClassParams[OperandDecoration].setOperands(DecorationOperands); - OperandClassParams[OperandBuiltIn].set(BuiltInCeiling, BuiltInString, BuiltInParams); + OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); - OperandClassParams[OperandMemorySemantics].set(MemorySemanticsCeiling, MemorySemanticsString, MemorySemanticsParams, true); - OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); - OperandClassParams[OperandScope].set(ScopeCeiling, ScopeString, ScopeParams); - OperandClassParams[OperandGroupOperation].set(GroupOperationCeiling, GroupOperationString, GroupOperationParams); - OperandClassParams[OperandKernelEnqueueFlags].set(KernelEnqueueFlagsCeiling, KernelEnqueueFlagsString, KernelEnqueueFlagsParams); - OperandClassParams[OperandKernelProfilingInfo].set(KernelProfilingInfoCeiling, KernelProfilingInfoString, KernelProfilingInfoParams, true); - OperandClassParams[OperandCapability].set(CapabilityCeiling, CapabilityString, CapabilityParams); - OperandClassParams[OperandOpcode].set(OpcodeCeiling, OpcodeString, 0); - - CapabilityParams[CapabilityShader].caps.push_back(CapabilityMatrix); - CapabilityParams[CapabilityGeometry].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityTessellation].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityVector16].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityFloat16Buffer].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityInt64Atomics].caps.push_back(CapabilityInt64); - CapabilityParams[CapabilityImageBasic].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityImageReadWrite].caps.push_back(CapabilityImageBasic); - CapabilityParams[CapabilityImageMipmap].caps.push_back(CapabilityImageBasic); - CapabilityParams[CapabilityPipes].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityDeviceEnqueue].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityLiteralSampler].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityAtomicStorage].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampleRateShading].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityTessellationPointSize].caps.push_back(CapabilityTessellation); - CapabilityParams[CapabilityGeometryPointSize].caps.push_back(CapabilityGeometry); - CapabilityParams[CapabilityImageGatherExtended].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityStorageImageExtendedFormats].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityStorageImageMultisample].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityUniformBufferArrayDynamicIndexing].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampledImageArrayDynamicIndexing].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityStorageBufferArrayDynamicIndexing].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityStorageImageArrayDynamicIndexing].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityClipDistance].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityCullDistance].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityGenericPointer].caps.push_back(CapabilityAddresses); - CapabilityParams[CapabilityInt8].caps.push_back(CapabilityKernel); - CapabilityParams[CapabilityInputAttachment].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityMinLod].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySparseResidency].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampled1D].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampledRect].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampledBuffer].caps.push_back(CapabilityShader); - CapabilityParams[CapabilitySampledCubeArray].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityImageMSArray].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityImage1D].caps.push_back(CapabilitySampled1D); - CapabilityParams[CapabilityImageRect].caps.push_back(CapabilitySampledRect); - CapabilityParams[CapabilityImageBuffer].caps.push_back(CapabilitySampledBuffer); - CapabilityParams[CapabilityImageCubeArray].caps.push_back(CapabilitySampledCubeArray); - CapabilityParams[CapabilityImageQuery].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityDerivativeControl].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityInterpolationFunction].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityTransformFeedback].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityGeometryStreams].caps.push_back(CapabilityGeometry); - CapabilityParams[CapabilityStorageImageReadWithoutFormat].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityStorageImageWriteWithoutFormat].caps.push_back(CapabilityShader); - CapabilityParams[CapabilityMultiViewport].caps.push_back(CapabilityGeometry); - - AddressingParams[AddressingModelPhysical32].caps.push_back(CapabilityAddresses); - AddressingParams[AddressingModelPhysical64].caps.push_back(CapabilityAddresses); - - MemoryParams[MemoryModelSimple].caps.push_back(CapabilityShader); - MemoryParams[MemoryModelGLSL450].caps.push_back(CapabilityShader); - MemoryParams[MemoryModelOpenCL].caps.push_back(CapabilityKernel); - - MemorySemanticsParams[MemorySemanticsUniformMemoryShift].caps.push_back(CapabilityShader); - MemorySemanticsParams[MemorySemanticsAtomicCounterMemoryShift].caps.push_back(CapabilityAtomicStorage); - - ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapabilityShader); - ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapabilityTessellation); - ExecutionModelParams[ExecutionModelTessellationEvaluation].caps.push_back(CapabilityTessellation); - ExecutionModelParams[ExecutionModelGeometry].caps.push_back(CapabilityGeometry); - ExecutionModelParams[ExecutionModelFragment].caps.push_back(CapabilityShader); - ExecutionModelParams[ExecutionModelGLCompute].caps.push_back(CapabilityShader); - ExecutionModelParams[ExecutionModelKernel].caps.push_back(CapabilityKernel); - - // Storage capabilites - StorageParams[StorageClassInput].caps.push_back(CapabilityShader); - StorageParams[StorageClassUniform].caps.push_back(CapabilityShader); - StorageParams[StorageClassOutput].caps.push_back(CapabilityShader); - StorageParams[StorageClassPrivate].caps.push_back(CapabilityShader); - StorageParams[StorageClassGeneric].caps.push_back(CapabilityKernel); - StorageParams[StorageClassAtomicCounter].caps.push_back(CapabilityAtomicStorage); - StorageParams[StorageClassPushConstant].caps.push_back(CapabilityShader); - - // Sampler Filter & Addressing mode capabilities - SamplerAddressingModeParams[SamplerAddressingModeNone].caps.push_back(CapabilityKernel); - SamplerAddressingModeParams[SamplerAddressingModeClampToEdge].caps.push_back(CapabilityKernel); - SamplerAddressingModeParams[SamplerAddressingModeClamp].caps.push_back(CapabilityKernel); - SamplerAddressingModeParams[SamplerAddressingModeRepeat].caps.push_back(CapabilityKernel); - SamplerAddressingModeParams[SamplerAddressingModeRepeatMirrored].caps.push_back(CapabilityKernel); - - SamplerFilterModeParams[SamplerFilterModeNearest].caps.push_back(CapabilityKernel); - SamplerFilterModeParams[SamplerFilterModeLinear].caps.push_back(CapabilityKernel); - - // image format capabilities - - // ES/Desktop float - ImageFormatParams[ImageFormatRgba32f].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba16f].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatR32f].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba8].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba8Snorm].caps.push_back(CapabilityShader); - - // Desktop float - ImageFormatParams[ImageFormatRg32f].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg16f].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR11fG11fB10f].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR16f].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRgba16].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRgb10A2].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg16].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg8].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR16].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR8].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRgba16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); - - // ES/Desktop int - ImageFormatParams[ImageFormatRgba32i].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba16i].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba8i].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatR32i].caps.push_back(CapabilityShader); - - // Desktop int - ImageFormatParams[ImageFormatRg32i].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg16i].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg8i].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR16i].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR8i].caps.push_back(CapabilityStorageImageExtendedFormats); - - // ES/Desktop uint - ImageFormatParams[ImageFormatRgba32ui].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba16ui].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatRgba8ui].caps.push_back(CapabilityShader); - ImageFormatParams[ImageFormatR32ui].caps.push_back(CapabilityShader); - - // Desktop uint - ImageFormatParams[ImageFormatRgb10a2ui].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg32ui].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg16ui].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatRg8ui].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR16ui].caps.push_back(CapabilityStorageImageExtendedFormats); - ImageFormatParams[ImageFormatR8ui].caps.push_back(CapabilityStorageImageExtendedFormats); - - // image channel order capabilities - for (int i = 0; i < ImageChannelOrderCeiling; ++i) { - ImageChannelOrderParams[i].caps.push_back(CapabilityKernel); - } - - // image channel type capabilities - for (int i = 0; i < ImageChannelDataTypeCeiling; ++i) { - ImageChannelDataTypeParams[i].caps.push_back(CapabilityKernel); - } - - // image lookup operands - ImageOperandsParams[ImageOperandsBiasShift].caps.push_back(CapabilityShader); - ImageOperandsParams[ImageOperandsOffsetShift].caps.push_back(CapabilityImageGatherExtended); - ImageOperandsParams[ImageOperandsMinLodShift].caps.push_back(CapabilityMinLod); - - // fast math flags capabilities - for (int i = 0; i < FPFastMathCeiling; ++i) { - FPFastMathParams[i].caps.push_back(CapabilityKernel); - } - - // fp rounding mode capabilities - for (int i = 0; i < FPRoundingModeCeiling; ++i) { - FPRoundingModeParams[i].caps.push_back(CapabilityKernel); - } - - // linkage types - for (int i = 0; i < LinkageTypeCeiling; ++i) { - LinkageTypeParams[i].caps.push_back(CapabilityLinkage); - } - - // function argument types - for (int i = 0; i < FuncParamAttrCeiling; ++i) { - FuncParamAttrParams[i].caps.push_back(CapabilityKernel); - } - - // function argument types - for (int i = 0; i < AccessQualifierCeiling; ++i) { - AccessQualifierParams[i].caps.push_back(CapabilityKernel); - } - - ExecutionModeParams[ExecutionModeInvocations].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeSpacingEqual].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeSpacingFractionalEven].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeSpacingFractionalOdd].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeVertexOrderCw].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeVertexOrderCcw].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModePixelCenterInteger].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeOriginUpperLeft].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeOriginLowerLeft].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeEarlyFragmentTests].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModePointMode].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeXfb].caps.push_back(CapabilityTransformFeedback); - ExecutionModeParams[ExecutionModeDepthReplacing].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeDepthGreater].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeDepthLess].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeDepthUnchanged].caps.push_back(CapabilityShader); - ExecutionModeParams[ExecutionModeLocalSizeHint].caps.push_back(CapabilityKernel); - ExecutionModeParams[ExecutionModeInputPoints].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeInputLines].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeInputLinesAdjacency].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeInputTrianglesAdjacency].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeQuads].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeIsolines].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityTessellation); - ExecutionModeParams[ExecutionModeOutputPoints].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeOutputLineStrip].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeOutputTriangleStrip].caps.push_back(CapabilityGeometry); - ExecutionModeParams[ExecutionModeVecTypeHint].caps.push_back(CapabilityKernel); - ExecutionModeParams[ExecutionModeContractionOff].caps.push_back(CapabilityKernel); - - DecorationParams[DecorationRelaxedPrecision].caps.push_back(CapabilityShader); - DecorationParams[DecorationBlock].caps.push_back(CapabilityShader); - DecorationParams[DecorationBufferBlock].caps.push_back(CapabilityShader); - DecorationParams[DecorationRowMajor].caps.push_back(CapabilityMatrix); - DecorationParams[DecorationColMajor].caps.push_back(CapabilityMatrix); - DecorationParams[DecorationGLSLShared].caps.push_back(CapabilityShader); - DecorationParams[DecorationGLSLPacked].caps.push_back(CapabilityShader); - DecorationParams[DecorationNoPerspective].caps.push_back(CapabilityShader); - DecorationParams[DecorationFlat].caps.push_back(CapabilityShader); - DecorationParams[DecorationPatch].caps.push_back(CapabilityTessellation); - DecorationParams[DecorationCentroid].caps.push_back(CapabilityShader); - DecorationParams[DecorationSample].caps.push_back(CapabilitySampleRateShading); - DecorationParams[DecorationInvariant].caps.push_back(CapabilityShader); - DecorationParams[DecorationConstant].caps.push_back(CapabilityKernel); - DecorationParams[DecorationUniform].caps.push_back(CapabilityShader); - DecorationParams[DecorationCPacked].caps.push_back(CapabilityKernel); - DecorationParams[DecorationSaturatedConversion].caps.push_back(CapabilityKernel); - DecorationParams[DecorationStream].caps.push_back(CapabilityGeometryStreams); - DecorationParams[DecorationLocation].caps.push_back(CapabilityShader); - DecorationParams[DecorationComponent].caps.push_back(CapabilityShader); - DecorationParams[DecorationOffset].caps.push_back(CapabilityShader); - DecorationParams[DecorationIndex].caps.push_back(CapabilityShader); - DecorationParams[DecorationBinding].caps.push_back(CapabilityShader); - DecorationParams[DecorationDescriptorSet].caps.push_back(CapabilityShader); - DecorationParams[DecorationXfbBuffer].caps.push_back(CapabilityTransformFeedback); - DecorationParams[DecorationXfbStride].caps.push_back(CapabilityTransformFeedback); - DecorationParams[DecorationArrayStride].caps.push_back(CapabilityShader); - DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityMatrix); - DecorationParams[DecorationFuncParamAttr].caps.push_back(CapabilityKernel); - DecorationParams[DecorationFPRoundingMode].caps.push_back(CapabilityKernel); - DecorationParams[DecorationFPFastMathMode].caps.push_back(CapabilityKernel); - DecorationParams[DecorationLinkageAttributes].caps.push_back(CapabilityLinkage); - DecorationParams[DecorationSpecId].caps.push_back(CapabilityShader); - DecorationParams[DecorationNoContraction].caps.push_back(CapabilityShader); - DecorationParams[DecorationInputAttachmentIndex].caps.push_back(CapabilityInputAttachment); - DecorationParams[DecorationAlignment].caps.push_back(CapabilityKernel); - - BuiltInParams[BuiltInPosition].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInPointSize].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityClipDistance); - BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityCullDistance); - - BuiltInParams[BuiltInVertexId].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInVertexId].desc = "Vertex ID, which takes on values 0, 1, 2, . . . ."; - - BuiltInParams[BuiltInInstanceId].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInInstanceId].desc = "Instance ID, which takes on values 0, 1, 2, . . . ."; - - BuiltInParams[BuiltInVertexIndex].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInVertexIndex].desc = "Vertex index, which takes on values base, base+1, base+2, . . . ."; - - BuiltInParams[BuiltInInstanceIndex].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInInstanceIndex].desc = "Instance index, which takes on values base, base+1, base+2, . . . ."; - - BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityGeometry); - BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityGeometry); - BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInLayer].caps.push_back(CapabilityGeometry); - BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityMultiViewport); - BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInTessCoord].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInPatchVertices].caps.push_back(CapabilityTessellation); - BuiltInParams[BuiltInFragCoord].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInPointCoord].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInFrontFacing].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInSampleId].caps.push_back(CapabilitySampleRateShading); - BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilitySampleRateShading); - BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilitySampleRateShading); - BuiltInParams[BuiltInFragDepth].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapabilityShader); - BuiltInParams[BuiltInWorkDim].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInGlobalSize].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInEnqueuedWorkgroupSize].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInGlobalOffset].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInGlobalLinearId].caps.push_back(CapabilityKernel); - - BuiltInParams[BuiltInSubgroupSize].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInSubgroupMaxSize].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInNumSubgroups].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInNumEnqueuedSubgroups].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInSubgroupId].caps.push_back(CapabilityKernel); - BuiltInParams[BuiltInSubgroupLocalInvocationId].caps.push_back(CapabilityKernel); - - DimensionalityParams[Dim1D].caps.push_back(CapabilitySampled1D); - DimensionalityParams[DimCube].caps.push_back(CapabilityShader); - DimensionalityParams[DimRect].caps.push_back(CapabilitySampledRect); - DimensionalityParams[DimBuffer].caps.push_back(CapabilitySampledBuffer); - DimensionalityParams[DimSubpassData].caps.push_back(CapabilityInputAttachment); - - // Group Operations - for (int i = 0; i < GroupOperationCeiling; ++i) { - GroupOperationParams[i].caps.push_back(CapabilityKernel); - } - - // Enqueue flags - for (int i = 0; i < KernelEnqueueFlagsCeiling; ++i) { - KernelEnqueueFlagsParams[i].caps.push_back(CapabilityKernel); - } - - // Profiling info - KernelProfilingInfoParams[0].caps.push_back(CapabilityKernel); + OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); + OperandClassParams[OperandMemoryAccess].set(0, MemoryAccessString, nullptr, true); + OperandClassParams[OperandScope].set(0, ScopeString, nullptr); + OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); + OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); + OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); + OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); + OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0); // set name of operator, an initial set of style operands, and the description @@ -1779,7 +1454,6 @@ void Parameterize() InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); - InstructionDesc[OpTypeMatrix].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); @@ -1797,31 +1471,19 @@ void Parameterize() InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); - InstructionDesc[OpTypeRuntimeArray].capabilities.push_back(CapabilityShader); InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); - InstructionDesc[OpTypeOpaque].capabilities.push_back(CapabilityKernel); InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); - InstructionDesc[OpTypeForwardPointer].capabilities.push_back(CapabilityAddresses); InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); - InstructionDesc[OpTypeEvent].capabilities.push_back(CapabilityKernel); - - InstructionDesc[OpTypeDeviceEvent].capabilities.push_back(CapabilityDeviceEnqueue); - - InstructionDesc[OpTypeReserveId].capabilities.push_back(CapabilityPipes); - - InstructionDesc[OpTypeQueue].capabilities.push_back(CapabilityDeviceEnqueue); - InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); - InstructionDesc[OpTypePipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); @@ -1830,7 +1492,6 @@ void Parameterize() InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpConstantSampler].capabilities.push_back(CapabilityLiteralSampler); InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); @@ -1868,11 +1529,24 @@ void Parameterize() InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateId].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <>."); + + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'"); + InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); @@ -1910,8 +1584,6 @@ void Parameterize() InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpCopyMemorySized].capabilities.push_back(CapabilityAddresses); - InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); @@ -1932,7 +1604,6 @@ void Parameterize() InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleImplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); @@ -1944,40 +1615,34 @@ void Parameterize() InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleDrefImplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleDrefExplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleProjImplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleProjExplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleProjDrefImplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSampleProjDrefExplicitLod].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); @@ -1989,122 +1654,96 @@ void Parameterize() InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageGather].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageDrefGather].capabilities.push_back(CapabilityShader); InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleImplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleExplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjImplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjExplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseFetch].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseGather].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseDrefGather].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpImageSparseRead].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); - InstructionDesc[OpImageSparseTexelsResident].capabilities.push_back(CapabilitySparseResidency); InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); - InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityKernel); - InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityImageQuery); InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityKernel); - InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityImageQuery); InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageQueryLod].capabilities.push_back(CapabilityImageQuery); InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityKernel); - InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityImageQuery); InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityKernel); - InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityImageQuery); InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryFormat].capabilities.push_back(CapabilityKernel); InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryOrder].capabilities.push_back(CapabilityKernel); InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); @@ -2115,12 +1754,10 @@ void Parameterize() InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpPtrAccessChain].capabilities.push_back(CapabilityAddresses); InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpInBoundsPtrAccessChain].capabilities.push_back(CapabilityAddresses); InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); @@ -2147,65 +1784,49 @@ void Parameterize() InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpSatConvertSToU].capabilities.push_back(CapabilityKernel); InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpSatConvertUToS].capabilities.push_back(CapabilityKernel); InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpConvertPtrToU].capabilities.push_back(CapabilityAddresses); InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); - InstructionDesc[OpConvertUToPtr].capabilities.push_back(CapabilityAddresses); InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpPtrCastToGeneric].capabilities.push_back(CapabilityKernel); InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericCastToPtr].capabilities.push_back(CapabilityKernel); InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); - InstructionDesc[OpGenericCastToPtrExplicit].capabilities.push_back(CapabilityKernel); InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericPtrMemSemantics].capabilities.push_back(CapabilityKernel); InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); - InstructionDesc[OpTranspose].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsFinite].capabilities.push_back(CapabilityKernel); InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); - InstructionDesc[OpIsNormal].capabilities.push_back(CapabilityKernel); InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); - InstructionDesc[OpSignBitSet].capabilities.push_back(CapabilityKernel); InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); - InstructionDesc[OpLessOrGreater].capabilities.push_back(CapabilityKernel); InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); - InstructionDesc[OpOrdered].capabilities.push_back(CapabilityKernel); InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); - InstructionDesc[OpUnordered].capabilities.push_back(CapabilityKernel); InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); - InstructionDesc[OpArrayLength].capabilities.push_back(CapabilityShader); InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); @@ -2252,23 +1873,18 @@ void Parameterize() InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpMatrixTimesScalar].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpVectorTimesMatrix].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpMatrixTimesVector].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpMatrixTimesMatrix].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); - InstructionDesc[OpOuterProduct].capabilities.push_back(CapabilityMatrix); InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); @@ -2319,23 +1935,19 @@ void Parameterize() InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitFieldInsert].capabilities.push_back(CapabilityShader); InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); - - InstructionDesc[OpBitFieldSExtract].capabilities.push_back(CapabilityShader); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpBitFieldUExtract].capabilities.push_back(CapabilityShader); InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpBitReverse].capabilities.push_back(CapabilityShader); InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); @@ -2410,42 +2022,27 @@ void Parameterize() InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpDPdx].capabilities.push_back(CapabilityShader); InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdy].capabilities.push_back(CapabilityShader); InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidth].capabilities.push_back(CapabilityShader); InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdxFine].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdyFine].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidthFine].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdxCoarse].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpDPdyCoarse].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpFwidthCoarse].capabilities.push_back(CapabilityDerivativeControl); InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpEmitVertex].capabilities.push_back(CapabilityGeometry); - - InstructionDesc[OpEndPrimitive].capabilities.push_back(CapabilityGeometry); - InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpEmitStreamVertex].capabilities.push_back(CapabilityGeometryStreams); InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpEndStreamPrimitive].capabilities.push_back(CapabilityGeometryStreams); InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); @@ -2485,7 +2082,6 @@ void Parameterize() InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); - InstructionDesc[OpAtomicCompareExchangeWeak].capabilities.push_back(CapabilityKernel); InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); @@ -2543,16 +2139,15 @@ void Parameterize() InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFlagTestAndSet].capabilities.push_back(CapabilityKernel); InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFlagClear].capabilities.push_back(CapabilityKernel); InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); + InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); @@ -2568,19 +2163,15 @@ void Parameterize() InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); - InstructionDesc[OpKill].capabilities.push_back(CapabilityShader); InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); - InstructionDesc[OpLifetimeStart].capabilities.push_back(CapabilityKernel); InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); - InstructionDesc[OpLifetimeStop].capabilities.push_back(CapabilityKernel); - InstructionDesc[OpGroupAsyncCopy].capabilities.push_back(CapabilityKernel); InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); @@ -2588,77 +2179,62 @@ void Parameterize() InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); - InstructionDesc[OpGroupWaitEvents].capabilities.push_back(CapabilityKernel); InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); - InstructionDesc[OpGroupAll].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); - InstructionDesc[OpGroupAny].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); - InstructionDesc[OpGroupBroadcast].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); - InstructionDesc[OpGroupIAdd].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupFAdd].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupUMin].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupSMin].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupFMin].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupUMax].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupSMax].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupFMax].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); - InstructionDesc[OpReadPipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpWritePipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpReservedReadPipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); @@ -2666,7 +2242,6 @@ void Parameterize() InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpReservedWritePipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); @@ -2674,127 +2249,99 @@ void Parameterize() InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpReserveReadPipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpReserveWritePipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpCommitReadPipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpCommitWritePipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpIsValidReserveId].capabilities.push_back(CapabilityPipes); InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpGetNumPipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpGetMaxPipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpGroupReserveReadPipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpGroupReserveWritePipePackets].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpGroupCommitReadPipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpGroupCommitWritePipe].capabilities.push_back(CapabilityPipes); InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - InstructionDesc[OpBuildNDRange].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); - InstructionDesc[OpGetDefaultQueue].capabilities.push_back(CapabilityDeviceEnqueue); - - InstructionDesc[OpCaptureEventProfilingInfo].capabilities.push_back(CapabilityDeviceEnqueue); - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); - InstructionDesc[OpSetUserEventStatus].capabilities.push_back(CapabilityDeviceEnqueue); - InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); - InstructionDesc[OpIsValidEvent].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); - InstructionDesc[OpCreateUserEvent].capabilities.push_back(CapabilityDeviceEnqueue); - - InstructionDesc[OpRetainEvent].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); - InstructionDesc[OpReleaseEvent].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); - InstructionDesc[OpGetKernelWorkGroupSize].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpEnqueueKernel].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); @@ -2807,82 +2354,215 @@ void Parameterize() InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); - InstructionDesc[OpEnqueueMarker].capabilities.push_back(CapabilityDeviceEnqueue); InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); + InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'"); + + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID"); + + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit"); + + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask"); + + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'"); + InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); - InstructionDesc[OpSubgroupAnyKHR].capabilities.push_back(CapabilitySubgroupVoteKHR); InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'"); - InstructionDesc[OpSubgroupAllKHR].capabilities.push_back(CapabilitySubgroupVoteKHR); InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'"); - InstructionDesc[OpSubgroupAllEqualKHR].capabilities.push_back(CapabilitySubgroupVoteKHR); InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'"); - InstructionDesc[OpSubgroupReadInvocationKHR].capabilities.push_back(CapabilityGroups); InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); + InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'"); + #ifdef AMD_EXTENSIONS - InstructionDesc[OpGroupIAddNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupFAddNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupUMinNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); - InstructionDesc[OpGroupSMinNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); - InstructionDesc[OpGroupFMinNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); - InstructionDesc[OpGroupUMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); - InstructionDesc[OpGroupSMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); - InstructionDesc[OpGroupFMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); - InstructionDesc[OpFragmentMaskFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD); InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpFragmentFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD); InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); #endif + +#ifdef NV_EXTENSIONS + InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X"); +#endif } }; // end spv namespace diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.h index 710ca1a52be64020decaf2e8bee92f1d77c221a7..7d0475d3ebb1fa6134605077b5fa418ad4f9bcbe 100644 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/doc.h @@ -190,7 +190,6 @@ protected: class EnumParameters { public: EnumParameters() : desc(0) { } - EnumCaps caps; const char* desc; }; @@ -235,7 +234,6 @@ public: bool hasType() const { return typePresent != 0; } const char* opDesc; - EnumCaps capabilities; OpcodeClass opClass; OperandParameters operands; @@ -244,8 +242,6 @@ protected: int resultPresent : 1; }; -const int OpcodeCeiling = 321; - // The set of objects that hold all the instruction/operand // parameterization information. extern InstructionParameters InstructionDesc[]; diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/spirv.hpp b/sources/third_party/shaderc/third_party/glslang/SPIRV/spirv.hpp old mode 100755 new mode 100644 index 8bddf7e503a319f6706cba7fadb9b94b80ca5da3..e21762dbeca3c21cfc1977b21c626af60542b042 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/spirv.hpp +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -46,12 +46,12 @@ namespace spv { typedef unsigned int Id; -#define SPV_VERSION 0x10000 -#define SPV_REVISION 12 +#define SPV_VERSION 0x10300 +#define SPV_REVISION 1 static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010000; -static const unsigned int Revision = 12; +static const unsigned int Version = 0x00010300; +static const unsigned int Revision = 1; static const unsigned int OpCodeMask = 0xffff; static const unsigned int WordCountShift = 16; @@ -122,7 +122,15 @@ enum ExecutionMode { ExecutionModeOutputTriangleStrip = 29, ExecutionModeVecTypeHint = 30, ExecutionModeContractionOff = 31, + ExecutionModeInitializer = 33, + ExecutionModeFinalizer = 34, + ExecutionModeSubgroupSize = 35, + ExecutionModeSubgroupsPerWorkgroup = 36, + ExecutionModeSubgroupsPerWorkgroupId = 37, + ExecutionModeLocalSizeId = 38, + ExecutionModeLocalSizeHintId = 39, ExecutionModePostDepthCoverage = 4446, + ExecutionModeStencilRefReplacingEXT = 5027, ExecutionModeMax = 0x7fffffff, }; @@ -377,11 +385,17 @@ enum Decoration { DecorationNoContraction = 42, DecorationInputAttachmentIndex = 43, DecorationAlignment = 44, + DecorationMaxByteOffset = 45, + DecorationAlignmentId = 46, + DecorationMaxByteOffsetId = 47, DecorationExplicitInterpAMD = 4999, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationNonUniformEXT = 5300, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, DecorationMax = 0x7fffffff, }; @@ -427,10 +441,15 @@ enum BuiltIn { BuiltInSubgroupLocalInvocationId = 41, BuiltInVertexIndex = 42, BuiltInInstanceIndex = 43, + BuiltInSubgroupEqMask = 4416, BuiltInSubgroupEqMaskKHR = 4416, + BuiltInSubgroupGeMask = 4417, BuiltInSubgroupGeMaskKHR = 4417, + BuiltInSubgroupGtMask = 4418, BuiltInSubgroupGtMaskKHR = 4418, + BuiltInSubgroupLeMask = 4419, BuiltInSubgroupLeMaskKHR = 4419, + BuiltInSubgroupLtMask = 4420, BuiltInSubgroupLtMaskKHR = 4420, BuiltInBaseVertex = 4424, BuiltInBaseInstance = 4425, @@ -450,6 +469,7 @@ enum BuiltIn { BuiltInSecondaryViewportMaskNV = 5258, BuiltInPositionPerViewNV = 5261, BuiltInViewportMaskPerViewNV = 5262, + BuiltInFullyCoveredEXT = 5264, BuiltInMax = 0x7fffffff, }; @@ -468,6 +488,8 @@ enum SelectionControlMask { enum LoopControlShift { LoopControlUnrollShift = 0, LoopControlDontUnrollShift = 1, + LoopControlDependencyInfiniteShift = 2, + LoopControlDependencyLengthShift = 3, LoopControlMax = 0x7fffffff, }; @@ -475,6 +497,8 @@ enum LoopControlMask { LoopControlMaskNone = 0, LoopControlUnrollMask = 0x00000001, LoopControlDontUnrollMask = 0x00000002, + LoopControlDependencyInfiniteMask = 0x00000004, + LoopControlDependencyLengthMask = 0x00000008, }; enum FunctionControlShift { @@ -548,6 +572,10 @@ enum GroupOperation { GroupOperationReduce = 0, GroupOperationInclusiveScan = 1, GroupOperationExclusiveScan = 2, + GroupOperationClusteredReduce = 3, + GroupOperationPartitionedReduceNV = 6, + GroupOperationPartitionedInclusiveScanNV = 7, + GroupOperationPartitionedExclusiveScanNV = 8, GroupOperationMax = 0x7fffffff, }; @@ -625,6 +653,17 @@ enum Capability { CapabilityStorageImageReadWithoutFormat = 55, CapabilityStorageImageWriteWithoutFormat = 56, CapabilityMultiViewport = 57, + CapabilitySubgroupDispatch = 58, + CapabilityNamedBarrier = 59, + CapabilityPipeStorage = 60, + CapabilityGroupNonUniform = 61, + CapabilityGroupNonUniformVote = 62, + CapabilityGroupNonUniformArithmetic = 63, + CapabilityGroupNonUniformBallot = 64, + CapabilityGroupNonUniformShuffle = 65, + CapabilityGroupNonUniformShuffleRelative = 66, + CapabilityGroupNonUniformClustered = 67, + CapabilityGroupNonUniformQuad = 68, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, CapabilitySubgroupVoteKHR = 4431, @@ -640,8 +679,11 @@ enum Capability { CapabilityVariablePointers = 4442, CapabilityAtomicStorageOps = 4445, CapabilitySampleMaskPostDepthCoverage = 4447, + CapabilityFloat16ImageAMD = 5008, CapabilityImageGatherBiasLodAMD = 5009, + CapabilityFragmentMaskAMD = 5010, CapabilityStencilExportEXT = 5013, + CapabilityImageReadWriteLodAMD = 5015, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, CapabilityShaderViewportIndexLayerEXT = 5254, @@ -649,6 +691,23 @@ enum Capability { CapabilityShaderViewportMaskNV = 5255, CapabilityShaderStereoViewNV = 5259, CapabilityPerViewAttributesNV = 5260, + CapabilityFragmentFullyCoveredEXT = 5265, + CapabilityGroupNonUniformPartitionedNV = 5297, + CapabilityShaderNonUniformEXT = 5301, + CapabilityRuntimeDescriptorArrayEXT = 5302, + CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, + CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, + CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, + CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, + CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, + CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, + CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, + CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, + CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, + CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilitySubgroupShuffleINTEL = 5568, + CapabilitySubgroupBufferBlockIOINTEL = 5569, + CapabilitySubgroupImageBlockIOINTEL = 5570, CapabilityMax = 0x7fffffff, }; @@ -947,6 +1006,52 @@ enum Op { OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -961,6 +1066,19 @@ enum Op { OpGroupFMaxNonUniformAMD = 5005, OpGroupUMaxNonUniformAMD = 5006, OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpGroupNonUniformPartitionNV = 5296, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, OpMax = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/glslang/SPIRV/spvIR.h b/sources/third_party/shaderc/third_party/glslang/SPIRV/spvIR.h index 6880595e9f6bf51984aa12deef33aba02c09b6c4..faa2701fff7f1a56f18509652dad558704730dc6 100755 --- a/sources/third_party/shaderc/third_party/glslang/SPIRV/spvIR.h +++ b/sources/third_party/shaderc/third_party/glslang/SPIRV/spvIR.h @@ -74,11 +74,8 @@ const Decoration NoPrecision = DecorationMax; POTENTIALLY_UNUSED const MemorySemanticsMask MemorySemanticsAllMemory = - (MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask | - MemorySemanticsUniformMemoryMask | - MemorySemanticsSubgroupMemoryMask | + (MemorySemanticsMask)(MemorySemanticsUniformMemoryMask | MemorySemanticsWorkgroupMemoryMask | - MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsAtomicCounterMemoryMask | MemorySemanticsImageMemoryMask); diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/BaseTypes.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/BaseTypes.h index 0a46a7c0f069cfdc32ad734e6976a987866ed087..46fe159b49ce45449ec807b29065e3d220c5f089 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/BaseTypes.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/BaseTypes.h @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -46,17 +47,15 @@ enum TBasicType { EbtVoid, EbtFloat, EbtDouble, -#ifdef AMD_EXTENSIONS EbtFloat16, -#endif + EbtInt8, + EbtUint8, + EbtInt16, + EbtUint16, EbtInt, EbtUint, EbtInt64, EbtUint64, -#ifdef AMD_EXTENSIONS - EbtInt16, - EbtUint16, -#endif EbtBool, EbtAtomicUint, EbtSampler, @@ -141,6 +140,8 @@ enum TBuiltInVariable { EbvLocalInvocationId, EbvGlobalInvocationId, EbvLocalInvocationIndex, + EbvNumSubgroups, + EbvSubgroupID, EbvSubGroupSize, EbvSubGroupInvocation, EbvSubGroupEqMask, @@ -148,6 +149,13 @@ enum TBuiltInVariable { EbvSubGroupGtMask, EbvSubGroupLeMask, EbvSubGroupLtMask, + EbvSubgroupSize2, + EbvSubgroupInvocation2, + EbvSubgroupEqMask2, + EbvSubgroupGeMask2, + EbvSubgroupGtMask2, + EbvSubgroupLeMask2, + EbvSubgroupLtMask2, EbvVertexId, EbvInstanceId, EbvVertexIndex, @@ -218,6 +226,7 @@ enum TBuiltInVariable { EbvSecondaryViewportMaskNV, EbvPositionPerViewNV, EbvViewportMaskPerViewNV, + EbvFragFullyCoveredNV, #endif // HLSL built-ins that live only temporarily, until they get remapped @@ -355,6 +364,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case EbvPositionPerViewNV: return "PositionPerViewNV"; case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case EbvFragFullyCoveredNV: return "FragFullyCoveredNV"; #endif default: return "unknown built-in variable"; } @@ -371,7 +381,7 @@ enum TPrecisionQualifier { __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { - switch(p) { + switch (p) { case EpqNone: return ""; break; case EpqLow: return "lowp"; break; case EpqMedium: return "mediump"; break; @@ -380,6 +390,75 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) } } +__inline bool isTypeSignedInt(TBasicType type) +{ + switch (type) { + case EbtInt8: + case EbtInt16: + case EbtInt: + case EbtInt64: + return true; + default: + return false; + } +} + +__inline bool isTypeUnsignedInt(TBasicType type) +{ + switch (type) { + case EbtUint8: + case EbtUint16: + case EbtUint: + case EbtUint64: + return true; + default: + return false; + } +} + +__inline bool isTypeInt(TBasicType type) +{ + return isTypeSignedInt(type) || isTypeUnsignedInt(type); +} + +__inline bool isTypeFloat(TBasicType type) +{ + switch (type) { + case EbtFloat: + case EbtDouble: + case EbtFloat16: + return true; + default: + return false; + } +} + +__inline int getTypeRank(TBasicType type) { + int res = -1; + switch(type) { + case EbtInt8: + case EbtUint8: + res = 0; + break; + case EbtInt16: + case EbtUint16: + res = 1; + break; + case EbtInt: + case EbtUint: + res = 2; + break; + case EbtInt64: + case EbtUint64: + res = 3; + break; + default: + assert(false); + break; + } + return res; +} + } // end namespace glslang #endif // _BASICTYPES_INCLUDED_ diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/Common.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/Common.h index 6e201e38379f9d5d7c1d061964c28ee7c6348967..35eaa31048e84ed00bfbe780edcbe60e21648ada 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/Common.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/Common.h @@ -37,9 +37,24 @@ #ifndef _COMMON_INCLUDED_ #define _COMMON_INCLUDED_ + +#if defined(__ANDROID__) || _MSC_VER < 1700 +#include +namespace std { +template +std::string to_string(const T& val) { + std::ostringstream os; + os << val; + return os.str(); +} +} +#endif + #if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API #include + #ifndef snprintf #define snprintf sprintf_s + #endif #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args)) #elif defined (solaris) #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) @@ -51,31 +66,20 @@ #define UINT_PTR uintptr_t #endif -#if defined(__ANDROID__) || _MSC_VER < 1700 -#include -namespace std { -template -std::string to_string(const T& val) { - std::ostringstream os; - os << val; - return os.str(); -} -} -#endif - #if defined(_MSC_VER) && _MSC_VER < 1800 -inline long long int strtoll (const char* str, char** endptr, int base) -{ - return _strtoi64(str, endptr, base); -} -inline unsigned long long int strtoull (const char* str, char** endptr, int base) -{ - return _strtoui64(str, endptr, base); -} -inline long long int atoll (const char* str) -{ - return strtoll(str, NULL, 10); -} + #include + inline long long int strtoll (const char* str, char** endptr, int base) + { + return _strtoi64(str, endptr, base); + } + inline unsigned long long int strtoull (const char* str, char** endptr, int base) + { + return _strtoui64(str, endptr, base); + } + inline long long int atoll (const char* str) + { + return strtoll(str, NULL, 10); + } #endif #if defined(_MSC_VER) @@ -155,7 +159,7 @@ inline TString* NewPoolTString(const char* s) return new(memory) TString(s); } -template inline T* NewPoolObject(T) +template inline T* NewPoolObject(T*) { return new(GetThreadPoolAllocator().allocate(sizeof(T))) T; } @@ -240,7 +244,10 @@ struct TSourceLoc { int column; }; -typedef TMap TPragmaTable; +class TPragmaTable : public TMap { +public: + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) +}; const int MaxTokenLength = 1024; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/ConstantUnion.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/ConstantUnion.h index f66a7ff5192d351ae59942c1de46a4c636266c63..3e93340151838ca942270114eb3081a925c5d3cb 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/ConstantUnion.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/ConstantUnion.h @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -37,6 +38,9 @@ #ifndef _CONSTANT_UNION_INCLUDED_ #define _CONSTANT_UNION_INCLUDED_ +#include "../Include/Common.h" +#include "../Include/BaseTypes.h" + namespace glslang { class TConstUnion { @@ -45,6 +49,30 @@ public: TConstUnion() : iConst(0), type(EbtInt) { } + void setI8Const(signed char i) + { + i8Const = i; + type = EbtInt8; + } + + void setU8Const(unsigned char u) + { + u8Const = u; + type = EbtUint8; + } + + void setI16Const(signed short i) + { + i16Const = i; + type = EbtInt16; + } + + void setU16Const(unsigned short u) + { + u16Const = u; + type = EbtUint16; + } + void setIConst(int i) { iConst = i; @@ -87,6 +115,10 @@ public: type = EbtString; } + signed char getI8Const() const { return i8Const; } + unsigned char getU8Const() const { return u8Const; } + signed short getI16Const() const { return i16Const; } + unsigned short getU16Const() const { return u16Const; } int getIConst() const { return iConst; } unsigned int getUConst() const { return uConst; } long long getI64Const() const { return i64Const; } @@ -95,6 +127,38 @@ public: bool getBConst() const { return bConst; } const TString* getSConst() const { return sConst; } + bool operator==(const signed char i) const + { + if (i == i8Const) + return true; + + return false; + } + + bool operator==(const unsigned char u) const + { + if (u == u8Const) + return true; + + return false; + } + + bool operator==(const signed short i) const + { + if (i == i16Const) + return true; + + return false; + } + + bool operator==(const unsigned short u) const + { + if (u == u16Const) + return true; + + return false; + } + bool operator==(const int i) const { if (i == iConst) @@ -149,6 +213,26 @@ public: return false; switch (type) { + case EbtInt16: + if (constant.i16Const == i16Const) + return true; + + break; + case EbtUint16: + if (constant.u16Const == u16Const) + return true; + + break; + case EbtInt8: + if (constant.i8Const == i8Const) + return true; + + break; + case EbtUint8: + if (constant.u8Const == u8Const) + return true; + + break; case EbtInt: if (constant.iConst == iConst) return true; @@ -186,6 +270,26 @@ public: return false; } + bool operator!=(const signed char i) const + { + return !operator==(i); + } + + bool operator!=(const unsigned char u) const + { + return !operator==(u); + } + + bool operator!=(const signed short i) const + { + return !operator==(i); + } + + bool operator!=(const unsigned short u) const + { + return !operator==(u); + } + bool operator!=(const int i) const { return !operator==(i); @@ -225,6 +329,26 @@ public: { assert(type == constant.type); switch (type) { + case EbtInt8: + if (i8Const > constant.i8Const) + return true; + + return false; + case EbtUint8: + if (u8Const > constant.u8Const) + return true; + + return false; + case EbtInt16: + if (i16Const > constant.i16Const) + return true; + + return false; + case EbtUint16: + if (u16Const > constant.u16Const) + return true; + + return false; case EbtInt: if (iConst > constant.iConst) return true; @@ -260,6 +384,26 @@ public: { assert(type == constant.type); switch (type) { + case EbtInt8: + if (i8Const < constant.i8Const) + return true; + + return false; + case EbtUint8: + if (u8Const < constant.u8Const) + return true; + + return false; + case EbtInt16: + if (i16Const < constant.i16Const) + return true; + + return false; + case EbtUint16: + if (u16Const < constant.u16Const) + return true; + + return false; case EbtInt: if (iConst < constant.iConst) return true; @@ -296,9 +440,13 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; - case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break; - case EbtUint: returnValue.setUConst(uConst + constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break; + case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; + case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break; + case EbtUint8: returnValue.setU8Const(u8Const + constant.u8Const); break; + case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break; + case EbtUint: returnValue.setUConst(uConst + constant.uConst); break; case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break; case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break; default: assert(false && "Default missing"); @@ -312,9 +460,13 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; - case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break; - case EbtUint: returnValue.setUConst(uConst - constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break; + case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; + case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break; + case EbtUint8: returnValue.setU8Const(u8Const - constant.u8Const); break; + case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break; + case EbtUint: returnValue.setUConst(uConst - constant.uConst); break; case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break; case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break; default: assert(false && "Default missing"); @@ -328,9 +480,13 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; - case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break; - case EbtUint: returnValue.setUConst(uConst * constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break; + case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; + case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break; + case EbtUint8: returnValue.setU8Const(u8Const * constant.u8Const); break; + case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break; + case EbtUint: returnValue.setUConst(uConst * constant.uConst); break; case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break; case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break; default: assert(false && "Default missing"); @@ -344,9 +500,13 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; - case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break; - case EbtUint: returnValue.setUConst(uConst % constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break; + case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break; + case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; + case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break; + case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break; + case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break; + case EbtUint: returnValue.setUConst(uConst % constant.uConst); break; case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break; default: assert(false && "Default missing"); } @@ -358,8 +518,64 @@ public: { TConstUnion returnValue; switch (type) { + case EbtInt8: + switch (constant.type) { + case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break; + case EbtUint8: returnValue.setI8Const(i8Const >> constant.u8Const); break; + case EbtInt16: returnValue.setI8Const(i8Const >> constant.i16Const); break; + case EbtUint16: returnValue.setI8Const(i8Const >> constant.u16Const); break; + case EbtInt: returnValue.setI8Const(i8Const >> constant.iConst); break; + case EbtUint: returnValue.setI8Const(i8Const >> constant.uConst); break; + case EbtInt64: returnValue.setI8Const(i8Const >> constant.i64Const); break; + case EbtUint64: returnValue.setI8Const(i8Const >> constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtUint8: + switch (constant.type) { + case EbtInt8: returnValue.setU8Const(u8Const >> constant.i8Const); break; + case EbtUint8: returnValue.setU8Const(u8Const >> constant.u8Const); break; + case EbtInt16: returnValue.setU8Const(u8Const >> constant.i16Const); break; + case EbtUint16: returnValue.setU8Const(u8Const >> constant.u16Const); break; + case EbtInt: returnValue.setU8Const(u8Const >> constant.iConst); break; + case EbtUint: returnValue.setU8Const(u8Const >> constant.uConst); break; + case EbtInt64: returnValue.setU8Const(u8Const >> constant.i64Const); break; + case EbtUint64: returnValue.setU8Const(u8Const >> constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtInt16: + switch (constant.type) { + case EbtInt8: returnValue.setI16Const(i16Const >> constant.i8Const); break; + case EbtUint8: returnValue.setI16Const(i16Const >> constant.u8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const >> constant.i16Const); break; + case EbtUint16: returnValue.setI16Const(i16Const >> constant.u16Const); break; + case EbtInt: returnValue.setI16Const(i16Const >> constant.iConst); break; + case EbtUint: returnValue.setI16Const(i16Const >> constant.uConst); break; + case EbtInt64: returnValue.setI16Const(i16Const >> constant.i64Const); break; + case EbtUint64: returnValue.setI16Const(i16Const >> constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtUint16: + switch (constant.type) { + case EbtInt8: returnValue.setU16Const(u16Const >> constant.i8Const); break; + case EbtUint8: returnValue.setU16Const(u16Const >> constant.u8Const); break; + case EbtInt16: returnValue.setU16Const(u16Const >> constant.i16Const); break; + case EbtUint16: returnValue.setU16Const(u16Const >> constant.u16Const); break; + case EbtInt: returnValue.setU16Const(u16Const >> constant.iConst); break; + case EbtUint: returnValue.setU16Const(u16Const >> constant.uConst); break; + case EbtInt64: returnValue.setU16Const(u16Const >> constant.i64Const); break; + case EbtUint64: returnValue.setU16Const(u16Const >> constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; case EbtInt: switch (constant.type) { + case EbtInt8: returnValue.setIConst(iConst >> constant.i8Const); break; + case EbtUint8: returnValue.setIConst(iConst >> constant.u8Const); break; + case EbtInt16: returnValue.setIConst(iConst >> constant.i16Const); break; + case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break; case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break; case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break; @@ -369,6 +585,10 @@ public: break; case EbtUint: switch (constant.type) { + case EbtInt8: returnValue.setUConst(uConst >> constant.i8Const); break; + case EbtUint8: returnValue.setUConst(uConst >> constant.u8Const); break; + case EbtInt16: returnValue.setUConst(uConst >> constant.i16Const); break; + case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break; case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break; case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break; case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break; @@ -378,6 +598,10 @@ public: break; case EbtInt64: switch (constant.type) { + case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break; + case EbtUint8: returnValue.setI64Const(i64Const >> constant.u8Const); break; + case EbtInt16: returnValue.setI64Const(i64Const >> constant.i16Const); break; + case EbtUint16: returnValue.setI64Const(i64Const >> constant.u16Const); break; case EbtInt: returnValue.setI64Const(i64Const >> constant.iConst); break; case EbtUint: returnValue.setI64Const(i64Const >> constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const >> constant.i64Const); break; @@ -387,6 +611,10 @@ public: break; case EbtUint64: switch (constant.type) { + case EbtInt8: returnValue.setU64Const(u64Const >> constant.i8Const); break; + case EbtUint8: returnValue.setU64Const(u64Const >> constant.u8Const); break; + case EbtInt16: returnValue.setU64Const(u64Const >> constant.i16Const); break; + case EbtUint16: returnValue.setU64Const(u64Const >> constant.u16Const); break; case EbtInt: returnValue.setU64Const(u64Const >> constant.iConst); break; case EbtUint: returnValue.setU64Const(u64Const >> constant.uConst); break; case EbtInt64: returnValue.setU64Const(u64Const >> constant.i64Const); break; @@ -404,8 +632,64 @@ public: { TConstUnion returnValue; switch (type) { + case EbtInt8: + switch (constant.type) { + case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break; + case EbtUint8: returnValue.setI8Const(i8Const << constant.u8Const); break; + case EbtInt16: returnValue.setI8Const(i8Const << constant.i16Const); break; + case EbtUint16: returnValue.setI8Const(i8Const << constant.u16Const); break; + case EbtInt: returnValue.setI8Const(i8Const << constant.iConst); break; + case EbtUint: returnValue.setI8Const(i8Const << constant.uConst); break; + case EbtInt64: returnValue.setI8Const(i8Const << constant.i64Const); break; + case EbtUint64: returnValue.setI8Const(i8Const << constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtUint8: + switch (constant.type) { + case EbtInt8: returnValue.setU8Const(u8Const << constant.i8Const); break; + case EbtUint8: returnValue.setU8Const(u8Const << constant.u8Const); break; + case EbtInt16: returnValue.setU8Const(u8Const << constant.i16Const); break; + case EbtUint16: returnValue.setU8Const(u8Const << constant.u16Const); break; + case EbtInt: returnValue.setU8Const(u8Const << constant.iConst); break; + case EbtUint: returnValue.setU8Const(u8Const << constant.uConst); break; + case EbtInt64: returnValue.setU8Const(u8Const << constant.i64Const); break; + case EbtUint64: returnValue.setU8Const(u8Const << constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtInt16: + switch (constant.type) { + case EbtInt8: returnValue.setI16Const(i16Const << constant.i8Const); break; + case EbtUint8: returnValue.setI16Const(i16Const << constant.u8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const << constant.i16Const); break; + case EbtUint16: returnValue.setI16Const(i16Const << constant.u16Const); break; + case EbtInt: returnValue.setI16Const(i16Const << constant.iConst); break; + case EbtUint: returnValue.setI16Const(i16Const << constant.uConst); break; + case EbtInt64: returnValue.setI16Const(i16Const << constant.i64Const); break; + case EbtUint64: returnValue.setI16Const(i16Const << constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; + case EbtUint16: + switch (constant.type) { + case EbtInt8: returnValue.setU16Const(u16Const << constant.i8Const); break; + case EbtUint8: returnValue.setU16Const(u16Const << constant.u8Const); break; + case EbtInt16: returnValue.setU16Const(u16Const << constant.i16Const); break; + case EbtUint16: returnValue.setU16Const(u16Const << constant.u16Const); break; + case EbtInt: returnValue.setU16Const(u16Const << constant.iConst); break; + case EbtUint: returnValue.setU16Const(u16Const << constant.uConst); break; + case EbtInt64: returnValue.setU16Const(u16Const << constant.i64Const); break; + case EbtUint64: returnValue.setU16Const(u16Const << constant.u64Const); break; + default: assert(false && "Default missing"); + } + break; case EbtInt: switch (constant.type) { + case EbtInt8: returnValue.setIConst(iConst << constant.i8Const); break; + case EbtUint8: returnValue.setIConst(iConst << constant.u8Const); break; + case EbtInt16: returnValue.setIConst(iConst << constant.i16Const); break; + case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break; case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; case EbtUint: returnValue.setIConst(iConst << constant.uConst); break; case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break; @@ -415,6 +699,10 @@ public: break; case EbtUint: switch (constant.type) { + case EbtInt8: returnValue.setUConst(uConst << constant.i8Const); break; + case EbtUint8: returnValue.setUConst(uConst << constant.u8Const); break; + case EbtInt16: returnValue.setUConst(uConst << constant.i16Const); break; + case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break; case EbtInt: returnValue.setUConst(uConst << constant.iConst); break; case EbtUint: returnValue.setUConst(uConst << constant.uConst); break; case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break; @@ -422,8 +710,12 @@ public: default: assert(false && "Default missing"); } break; - case EbtInt64: + case EbtInt64: switch (constant.type) { + case EbtInt8: returnValue.setI64Const(i64Const << constant.i8Const); break; + case EbtUint8: returnValue.setI64Const(i64Const << constant.u8Const); break; + case EbtInt16: returnValue.setI64Const(i64Const << constant.i16Const); break; + case EbtUint16: returnValue.setI64Const(i64Const << constant.u16Const); break; case EbtInt: returnValue.setI64Const(i64Const << constant.iConst); break; case EbtUint: returnValue.setI64Const(i64Const << constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const << constant.i64Const); break; @@ -433,6 +725,10 @@ public: break; case EbtUint64: switch (constant.type) { + case EbtInt8: returnValue.setU64Const(u64Const << constant.i8Const); break; + case EbtUint8: returnValue.setU64Const(u64Const << constant.u8Const); break; + case EbtInt16: returnValue.setU64Const(u64Const << constant.i16Const); break; + case EbtUint16: returnValue.setU64Const(u64Const << constant.u16Const); break; case EbtInt: returnValue.setU64Const(u64Const << constant.iConst); break; case EbtUint: returnValue.setU64Const(u64Const << constant.uConst); break; case EbtInt64: returnValue.setU64Const(u64Const << constant.i64Const); break; @@ -451,8 +747,12 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; - case EbtUint: returnValue.setUConst(uConst & constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const & constant.i8Const); break; + case EbtUint8: returnValue.setU8Const(u8Const & constant.u8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const & constant.i16Const); break; + case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break; + case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; + case EbtUint: returnValue.setUConst(uConst & constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break; default: assert(false && "Default missing"); @@ -466,8 +766,12 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; - case EbtUint: returnValue.setUConst(uConst | constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const | constant.i8Const); break; + case EbtUint8: returnValue.setU8Const(u8Const | constant.u8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const | constant.i16Const); break; + case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break; + case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; + case EbtUint: returnValue.setUConst(uConst | constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break; default: assert(false && "Default missing"); @@ -481,8 +785,12 @@ public: TConstUnion returnValue; assert(type == constant.type); switch (type) { - case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; - case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break; + case EbtInt8: returnValue.setI8Const(i8Const ^ constant.i8Const); break; + case EbtUint8: returnValue.setU8Const(u8Const ^ constant.u8Const); break; + case EbtInt16: returnValue.setI16Const(i16Const ^ constant.i16Const); break; + case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break; + case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; + case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break; default: assert(false && "Default missing"); @@ -495,8 +803,12 @@ public: { TConstUnion returnValue; switch (type) { - case EbtInt: returnValue.setIConst(~iConst); break; - case EbtUint: returnValue.setUConst(~uConst); break; + case EbtInt8: returnValue.setI8Const(~i8Const); break; + case EbtUint8: returnValue.setU8Const(~u8Const); break; + case EbtInt16: returnValue.setI16Const(~i16Const); break; + case EbtUint16: returnValue.setU16Const(~u16Const); break; + case EbtInt: returnValue.setIConst(~iConst); break; + case EbtUint: returnValue.setUConst(~uConst); break; case EbtInt64: returnValue.setI64Const(~i64Const); break; case EbtUint64: returnValue.setU64Const(~u64Const); break; default: assert(false && "Default missing"); @@ -533,6 +845,10 @@ public: private: union { + signed char i8Const; // used for i8vec, scalar int8s + unsigned char u8Const; // used for u8vec, scalar uint8s + signed short i16Const; // used for i16vec, scalar int16s + unsigned short u16Const; // used for u16vec, scalar uint16s int iConst; // used for ivec, scalar ints unsigned int uConst; // used for uvec, scalar uints long long i64Const; // used for i64vec, scalar int64s @@ -595,9 +911,6 @@ public: if (! unionArray || ! rhs.unionArray) return false; - if (! unionArray || ! rhs.unionArray) - return false; - return *unionArray == *rhs.unionArray; } bool operator!=(const TConstUnionArray& rhs) const { return ! operator==(rhs); } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/InitializeGlobals.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/InitializeGlobals.h index 4cf2dca7c400ef5eb31d2188aef886b70c6220ae..95d0a40e99a89f9806330d37d8b9d830e8392d62 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/InitializeGlobals.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/InitializeGlobals.h @@ -37,10 +37,7 @@ namespace glslang { -void InitializeMemoryPools(); -void FreeGlobalPools(); bool InitializePoolIndex(); -void FreePoolIndex(); } // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/PoolAlloc.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/PoolAlloc.h index 69bacb156f87996a36346204e5ff005ed954b56d..0e237a6a2c08514fb29250855b74ff05151391b4 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/PoolAlloc.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/PoolAlloc.h @@ -250,15 +250,8 @@ private: // different times. But a simple use is to have a global pop // with everyone using the same global allocator. // -typedef TPoolAllocator* PoolAllocatorPointer; extern TPoolAllocator& GetThreadPoolAllocator(); - -struct TThreadMemoryPools -{ - TPoolAllocator* threadPoolAllocator; -}; - -void SetThreadPoolAllocator(TPoolAllocator& poolAllocator); +void SetThreadPoolAllocator(TPoolAllocator* poolAllocator); // // This STL compatible allocator is intended to be used as the allocator diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/ShHandle.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/ShHandle.h index 64ba6d636c0e180ead9757f3ef1755eaa969a1f4..df07bd8edad8bf0fe5533f78b7ca3d2e2d221476 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/ShHandle.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/ShHandle.h @@ -56,11 +56,14 @@ class TUniformMap; // class TShHandleBase { public: - TShHandleBase() { } - virtual ~TShHandleBase() { } + TShHandleBase() { pool = new glslang::TPoolAllocator; } + virtual ~TShHandleBase() { delete pool; } virtual TCompiler* getAsCompiler() { return 0; } virtual TLinker* getAsLinker() { return 0; } virtual TUniformMap* getAsUniformMap() { return 0; } + virtual glslang::TPoolAllocator* getPool() const { return pool; } +private: + glslang::TPoolAllocator* pool; }; // diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/Types.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/Types.h index b5b91f527ea07440eb19a8b1858cefa916745be4..39d6737cfc61241ccdab6e2a21ad388d20e8d4de 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/Types.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/Types.h @@ -2,6 +2,7 @@ // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -204,9 +205,18 @@ struct TSampler { // misnomer now; includes images, textures without sampler, } switch (type) { - case EbtFloat: break; - case EbtInt: s.append("i"); break; - case EbtUint: s.append("u"); break; + case EbtFloat: break; +#ifdef AMD_EXTENSIONS + case EbtFloat16: s.append("f16"); break; +#endif + case EbtInt8: s.append("i8"); break; + case EbtUint16: s.append("u8"); break; + case EbtInt16: s.append("i16"); break; + case EbtUint8: s.append("u16"); break; + case EbtInt: s.append("i"); break; + case EbtUint: s.append("u"); break; + case EbtInt64: s.append("i64"); break; + case EbtUint64: s.append("u64"); break; default: break; // some compilers want this } if (image) { @@ -427,6 +437,7 @@ public: clearInterstage(); clearMemory(); specConstant = false; + nonUniform = false; clearLayout(); } @@ -460,7 +471,7 @@ public: // Drop just the storage qualification, which perhaps should // never be done, as it is fundamentally inconsistent, but need to // explore what downstream consumers need. - // E.g., in a deference, it is an inconsistency between: + // E.g., in a dereference, it is an inconsistency between: // A) partially dereferenced resource is still in the storage class it started in // B) partially dereferenced resource is a new temporary object // If A, then nothing should change, if B, then everything should change, but this is half way. @@ -468,6 +479,7 @@ public: { storage = EvqTemporary; specConstant = false; + nonUniform = false; } const char* semanticName; @@ -492,6 +504,7 @@ public: bool readonly : 1; bool writeonly : 1; bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant + bool nonUniform : 1; bool isMemory() const { @@ -505,6 +518,12 @@ public: return flat || smooth || nopersp; #endif } +#ifdef AMD_EXTENSIONS + bool isExplicitInterpolation() const + { + return explicitInterp; + } +#endif bool isAuxiliary() const { return centroid || patch || sample; @@ -650,15 +669,19 @@ public: layoutXfbOffset = layoutXfbOffsetEnd; } - bool hasLayout() const + bool hasNonXfbLayout() const { return hasUniformLayout() || hasAnyLocation() || hasStream() || - hasXfb() || hasFormat() || layoutPushConstant; } + bool hasLayout() const + { + return hasNonXfbLayout() || + hasXfb(); + } TLayoutMatrix layoutMatrix : 3; TLayoutPacking layoutPacking : 4; int layoutOffset; @@ -813,6 +836,10 @@ public: // true front-end constant. return specConstant; } + bool isNonUniform() const + { + return nonUniform; + } bool isFrontEndConstant() const { // True if the front-end knows the final constant value. @@ -1152,6 +1179,7 @@ public: sampler.clear(); qualifier.clear(); qualifier.storage = q; + assert(!(isMatrix() && vectorSize != 0)); // prevent vectorSize != 0 on matrices } // for explicit precision qualifier TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0, @@ -1164,6 +1192,7 @@ public: qualifier.storage = q; qualifier.precision = p; assert(p >= EpqNone && p <= EpqHigh); + assert(!(isMatrix() && vectorSize != 0)); // prevent vectorSize != 0 on matrices } // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : @@ -1293,31 +1322,9 @@ public: void makeVector() { vector1 = true; } - // Merge type from parent, where a parentType is at the beginning of a declaration, - // establishing some characteristics for all subsequent names, while this type - // is on the individual names. - void mergeType(const TPublicType& parentType) - { - // arrayness is currently the only child aspect that has to be preserved - basicType = parentType.basicType; - vectorSize = parentType.vectorSize; - matrixCols = parentType.matrixCols; - matrixRows = parentType.matrixRows; - vector1 = false; // TPublicType is only GLSL which so far has no vec1 - qualifier = parentType.qualifier; - sampler = parentType.sampler; - if (parentType.arraySizes) - newArraySizes(*parentType.arraySizes); - if (parentType.userDef) { - structure = parentType.userDef->getWritableStruct(); - setTypeName(parentType.userDef->getTypeName()); - } - } - virtual void hideMember() { basicType = EbtVoid; vectorSize = 1; } virtual bool hiddenMember() const { return basicType == EbtVoid; } - virtual void setTypeName(const TString& n) { typeName = NewPoolTString(n.c_str()); } virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); } virtual const TString& getTypeName() const { @@ -1347,33 +1354,31 @@ public: virtual bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; } virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); } virtual const TArraySizes* getArraySizes() const { return arraySizes; } - virtual TArraySizes& getArraySizes() { assert(arraySizes != nullptr); return *arraySizes; } + virtual TArraySizes* getArraySizes() { return arraySizes; } virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } virtual bool isVector() const { return vectorSize > 1 || vector1; } virtual bool isMatrix() const { return matrixCols ? true : false; } virtual bool isArray() const { return arraySizes != nullptr; } - virtual bool isExplicitlySizedArray() const { return isArray() && getOuterArraySize() != UnsizedArraySize; } - virtual bool isImplicitlySizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage != EvqBuffer; } - virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; } + virtual bool isSizedArray() const { return isArray() && arraySizes->isSized(); } + virtual bool isUnsizedArray() const { return isArray() && !arraySizes->isSized(); } + virtual bool isArrayVariablyIndexed() const { assert(isArray()); return arraySizes->isVariablyIndexed(); } + virtual void setArrayVariablyIndexed() { assert(isArray()); arraySizes->setVariablyIndexed(); } + virtual void updateImplicitArraySize(int size) { assert(isArray()); arraySizes->updateImplicitSize(size); } virtual bool isStruct() const { return structure != nullptr; } -#ifdef AMD_EXTENSIONS virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; } -#else - virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; } -#endif virtual bool isIntegerDomain() const { switch (basicType) { + case EbtInt8: + case EbtUint8: + case EbtInt16: + case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: -#endif case EbtAtomicUint: return true; default: @@ -1385,11 +1390,12 @@ public: virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } // "Image" is a superset of "Subpass" - virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } + virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } + virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); } // return true if this type contains any subtype which satisfies the given predicate. - template + template bool contains(P predicate) const { if (predicate(this)) @@ -1418,10 +1424,10 @@ public: return contains([this](const TType* t) { return t != this && t->isStruct(); } ); } - // Recursively check the structure for any implicitly-sized arrays, needed for triggering a copyUp(). - virtual bool containsImplicitlySizedArray() const + // Recursively check the structure for any unsized arrays, needed for triggering a copyUp(). + virtual bool containsUnsizedArray() const { - return contains([](const TType* t) { return t->isImplicitlySizedArray(); } ); + return contains([](const TType* t) { return t->isUnsizedArray(); } ); } virtual bool containsOpaque() const @@ -1442,17 +1448,15 @@ public: case EbtVoid: case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif + case EbtInt8: + case EbtUint8: + case EbtInt16: + case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: -#endif case EbtBool: return true; default: @@ -1487,34 +1491,51 @@ public: assert(type.arraySizes != nullptr); *arraySizes = *type.arraySizes; } - void newArraySizes(const TArraySizes& s) + void copyArraySizes(const TArraySizes& s) { // For setting a fresh new set of array sizes, not yet worrying about sharing. arraySizes = new TArraySizes; *arraySizes = s; } + void transferArraySizes(TArraySizes* s) + { + // For setting an already allocated set of sizes that this type can use + // (no copy made). + arraySizes = s; + } void clearArraySizes() { - arraySizes = 0; + arraySizes = nullptr; } - void addArrayOuterSizes(const TArraySizes& s) + + // Add inner array sizes, to any existing sizes, via copy; the + // sizes passed in can still be reused for other purposes. + void copyArrayInnerSizes(const TArraySizes* s) { - if (arraySizes == nullptr) - newArraySizes(s); - else - arraySizes->addOuterSizes(s); + if (s != nullptr) { + if (arraySizes == nullptr) + copyArraySizes(*s); + else + arraySizes->addInnerSizes(*s); + } } void changeOuterArraySize(int s) { arraySizes->changeOuterSize(s); } - void setImplicitArraySize(int s) { arraySizes->setImplicitSize(s); } - // Recursively make the implicit array size the explicit array size, through the type tree. - void adoptImplicitArraySizes() + // Recursively make the implicit array size the explicit array size. + // Expicit arrays are compile-time or link-time sized, never run-time sized. + // Sometimes, policy calls for an array to be run-time sized even if it was + // never variably indexed: Don't turn a 'skipNonvariablyIndexed' array into + // an explicit array. + void adoptImplicitArraySizes(bool skipNonvariablyIndexed) { - if (isImplicitlySizedArray()) + if (isUnsizedArray() && !(skipNonvariablyIndexed || isArrayVariablyIndexed())) changeOuterArraySize(getImplicitArraySize()); - if (isStruct()) { - for (int i = 0; i < (int)structure->size(); ++i) - (*structure)[i].type->adoptImplicitArraySizes(); + if (isStruct() && structure->size() > 0) { + int lastMember = (int)structure->size() - 1; + for (int i = 0; i < lastMember; ++i) + (*structure)[i].type->adoptImplicitArraySizes(false); + // implement the "last member of an SSBO" policy + (*structure)[lastMember].type->adoptImplicitArraySizes(getQualifier().storage == EvqBuffer); } } @@ -1529,17 +1550,15 @@ public: case EbtVoid: return "void"; case EbtFloat: return "float"; case EbtDouble: return "double"; -#ifdef AMD_EXTENSIONS case EbtFloat16: return "float16_t"; -#endif + case EbtInt8: return "int8_t"; + case EbtUint8: return "uint8_t"; + case EbtInt16: return "int16_t"; + case EbtUint16: return "uint16_t"; case EbtInt: return "int"; case EbtUint: return "uint"; case EbtInt64: return "int64_t"; case EbtUint64: return "uint64_t"; -#ifdef AMD_EXTENSIONS - case EbtInt16: return "int16_t"; - case EbtUint16: return "uint16_t"; -#endif case EbtBool: return "bool"; case EbtAtomicUint: return "atomic_uint"; case EbtSampler: return "sampler/image"; @@ -1678,16 +1697,26 @@ public: appendStr(" writeonly"); if (qualifier.specConstant) appendStr(" specialization-constant"); + if (qualifier.nonUniform) + appendStr(" nonuniform"); appendStr(" "); appendStr(getStorageQualifierString()); if (isArray()) { for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) { int size = arraySizes->getDimSize(i); - if (size == 0) - appendStr(" implicitly-sized array of"); + if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) + appendStr(" runtime-sized array of"); else { - appendStr(" "); - appendInt(arraySizes->getDimSize(i)); + if (size == UnsizedArraySize) { + appendStr(" unsized"); + if (i == 0) { + appendStr(" "); + appendInt(arraySizes->getImplicitSize()); + } + } else { + appendStr(" "); + appendInt(arraySizes->getDimSize(i)); + } appendStr("-element array of"); } } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/arrays.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/arrays.h index bc21c6c5e547196b936e6772dbe5083f078b94f0..af8f560b3b23859717e53948a2f52776021b049c 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/arrays.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/arrays.h @@ -41,6 +41,8 @@ #ifndef _ARRAYS_INCLUDED #define _ARRAYS_INCLUDED +#include + namespace glslang { // This is used to mean there is no size yet (unsized), it is waiting to get a size from somewhere else. @@ -130,10 +132,10 @@ struct TSmallArrayVector { sizes->push_back(pair); } - void push_front(const TSmallArrayVector& newDims) + void push_back(const TSmallArrayVector& newDims) { alloc(); - sizes->insert(sizes->begin(), newDims.sizes->begin(), newDims.sizes->end()); + sizes->insert(sizes->end(), newDims.sizes->begin(), newDims.sizes->end()); } void pop_front() @@ -220,12 +222,13 @@ protected: struct TArraySizes { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TArraySizes() : implicitArraySize(1) { } + TArraySizes() : implicitArraySize(1), variablyIndexed(false) { } // For breaking into two non-shared copies, independently modifiable. TArraySizes& operator=(const TArraySizes& from) { implicitArraySize = from.implicitArraySize; + variablyIndexed = from.variablyIndexed; sizes = from.sizes; return *this; @@ -252,10 +255,11 @@ struct TArraySizes { void addInnerSize(int s) { addInnerSize((unsigned)s, nullptr); } void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); } void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); } + void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); } void changeOuterSize(int s) { sizes.changeFront((unsigned)s); } - int getImplicitSize() const { return (int)implicitArraySize; } - void setImplicitSize(int s) { implicitArraySize = s; } - bool isInnerImplicit() const + int getImplicitSize() const { return implicitArraySize; } + void updateImplicitSize(int s) { implicitArraySize = std::max(implicitArraySize, s); } + bool isInnerUnsized() const { for (int d = 1; d < sizes.size(); ++d) { if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) @@ -264,6 +268,15 @@ struct TArraySizes { return false; } + bool clearInnerUnsized() + { + for (int d = 1; d < sizes.size(); ++d) { + if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) + setDimSize(d, 1); + } + + return false; + } bool isInnerSpecialization() const { for (int d = 1; d < sizes.size(); ++d) { @@ -278,8 +291,8 @@ struct TArraySizes { return sizes.getDimNode(0) != nullptr; } - bool isImplicit() const { return getOuterSize() == UnsizedArraySize || isInnerImplicit(); } - void addOuterSizes(const TArraySizes& s) { sizes.push_front(s.sizes); } + bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); } + bool isSized() const { return getOuterSize() != UnsizedArraySize; } void dereference() { sizes.pop_front(); } void copyDereferenced(const TArraySizes& rhs) { @@ -302,6 +315,9 @@ struct TArraySizes { return true; } + void setVariablyIndexed() { variablyIndexed = true; } + bool isVariablyIndexed() const { return variablyIndexed; } + bool operator==(const TArraySizes& rhs) { return sizes == rhs.sizes; } bool operator!=(const TArraySizes& rhs) { return sizes != rhs.sizes; } @@ -310,9 +326,12 @@ protected: TArraySizes(const TArraySizes&); - // for tracking maximum referenced index, before an explicit size is given - // applies only to the outer-most dimension + // For tracking maximum referenced compile-time constant index. + // Applies only to the outer-most dimension. Potentially becomes + // the implicit size of the array, if not variably indexed and + // otherwise legal. int implicitArraySize; + bool variablyIndexed; // true if array is indexed with a non compile-time constant }; } // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/intermediate.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/intermediate.h old mode 100644 new mode 100755 index 963419a8ed2410933974c1625f5d30ac57603524..19eb7aa8766e0e182192ce94ab2a3872192e4cb1 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/intermediate.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/intermediate.h @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -46,7 +47,7 @@ #ifndef __INTERMEDIATE_H #define __INTERMEDIATE_H -#if _MSC_VER >= 1900 +#if defined(_MSC_VER) && _MSC_VER >= 1900 #pragma warning(disable : 4464) // relative include path contains '..' #pragma warning(disable : 5026) // 'glslang::TIntermUnary': move constructor was implicitly defined as deleted #endif @@ -84,100 +85,189 @@ enum TOperator { EOpPreIncrement, EOpPreDecrement, + // (u)int* -> bool + EOpConvInt8ToBool, + EOpConvUint8ToBool, + EOpConvInt16ToBool, + EOpConvUint16ToBool, EOpConvIntToBool, EOpConvUintToBool, - EOpConvFloatToBool, - EOpConvDoubleToBool, EOpConvInt64ToBool, EOpConvUint64ToBool, - EOpConvBoolToFloat, - EOpConvIntToFloat, - EOpConvUintToFloat, - EOpConvDoubleToFloat, - EOpConvInt64ToFloat, - EOpConvUint64ToFloat, - EOpConvUintToInt, - EOpConvFloatToInt, + + // float* -> bool + EOpConvFloat16ToBool, + EOpConvFloatToBool, + EOpConvDoubleToBool, + + // bool -> (u)int* + EOpConvBoolToInt8, + EOpConvBoolToUint8, + EOpConvBoolToInt16, + EOpConvBoolToUint16, EOpConvBoolToInt, - EOpConvDoubleToInt, - EOpConvInt64ToInt, - EOpConvUint64ToInt, - EOpConvIntToUint, - EOpConvFloatToUint, EOpConvBoolToUint, - EOpConvDoubleToUint, - EOpConvInt64ToUint, - EOpConvUint64ToUint, - EOpConvIntToDouble, - EOpConvUintToDouble, - EOpConvFloatToDouble, - EOpConvBoolToDouble, - EOpConvInt64ToDouble, - EOpConvUint64ToDouble, EOpConvBoolToInt64, - EOpConvIntToInt64, - EOpConvUintToInt64, - EOpConvFloatToInt64, - EOpConvDoubleToInt64, - EOpConvUint64ToInt64, EOpConvBoolToUint64, + + // bool -> float* + EOpConvBoolToFloat16, + EOpConvBoolToFloat, + EOpConvBoolToDouble, + + // int8_t -> (u)int* + EOpConvInt8ToInt16, + EOpConvInt8ToInt, + EOpConvInt8ToInt64, + EOpConvInt8ToUint8, + EOpConvInt8ToUint16, + EOpConvInt8ToUint, + EOpConvInt8ToUint64, + + // uint8_t -> (u)int* + EOpConvUint8ToInt8, + EOpConvUint8ToInt16, + EOpConvUint8ToInt, + EOpConvUint8ToInt64, + EOpConvUint8ToUint16, + EOpConvUint8ToUint, + EOpConvUint8ToUint64, + + // int8_t -> float* + EOpConvInt8ToFloat16, + EOpConvInt8ToFloat, + EOpConvInt8ToDouble, + + // uint8_t -> float* + EOpConvUint8ToFloat16, + EOpConvUint8ToFloat, + EOpConvUint8ToDouble, + + // int16_t -> (u)int* + EOpConvInt16ToInt8, + EOpConvInt16ToInt, + EOpConvInt16ToInt64, + EOpConvInt16ToUint8, + EOpConvInt16ToUint16, + EOpConvInt16ToUint, + EOpConvInt16ToUint64, + + // uint16_t -> (u)int* + EOpConvUint16ToInt8, + EOpConvUint16ToInt16, + EOpConvUint16ToInt, + EOpConvUint16ToInt64, + EOpConvUint16ToUint8, + EOpConvUint16ToUint, + EOpConvUint16ToUint64, + + // int16_t -> float* + EOpConvInt16ToFloat16, + EOpConvInt16ToFloat, + EOpConvInt16ToDouble, + + // uint16_t -> float* + EOpConvUint16ToFloat16, + EOpConvUint16ToFloat, + EOpConvUint16ToDouble, + + // int32_t -> (u)int* + EOpConvIntToInt8, + EOpConvIntToInt16, + EOpConvIntToInt64, + EOpConvIntToUint8, + EOpConvIntToUint16, + EOpConvIntToUint, EOpConvIntToUint64, + + // uint32_t -> (u)int* + EOpConvUintToInt8, + EOpConvUintToInt16, + EOpConvUintToInt, + EOpConvUintToInt64, + EOpConvUintToUint8, + EOpConvUintToUint16, EOpConvUintToUint64, - EOpConvFloatToUint64, - EOpConvDoubleToUint64, - EOpConvInt64ToUint64, -#ifdef AMD_EXTENSIONS - EOpConvBoolToFloat16, + + // int32_t -> float* EOpConvIntToFloat16, + EOpConvIntToFloat, + EOpConvIntToDouble, + + // uint32_t -> float* EOpConvUintToFloat16, - EOpConvFloatToFloat16, - EOpConvDoubleToFloat16, + EOpConvUintToFloat, + EOpConvUintToDouble, + + // int64_t -> (u)int* + EOpConvInt64ToInt8, + EOpConvInt64ToInt16, + EOpConvInt64ToInt, + EOpConvInt64ToUint8, + EOpConvInt64ToUint16, + EOpConvInt64ToUint, + EOpConvInt64ToUint64, + + // uint64_t -> (u)int* + EOpConvUint64ToInt8, + EOpConvUint64ToInt16, + EOpConvUint64ToInt, + EOpConvUint64ToInt64, + EOpConvUint64ToUint8, + EOpConvUint64ToUint16, + EOpConvUint64ToUint, + + // int64_t -> float* EOpConvInt64ToFloat16, + EOpConvInt64ToFloat, + EOpConvInt64ToDouble, + + // uint64_t -> float* EOpConvUint64ToFloat16, - EOpConvFloat16ToBool, + EOpConvUint64ToFloat, + EOpConvUint64ToDouble, + + // float16_t -> (u)int* + EOpConvFloat16ToInt8, + EOpConvFloat16ToInt16, EOpConvFloat16ToInt, + EOpConvFloat16ToInt64, + EOpConvFloat16ToUint8, + EOpConvFloat16ToUint16, EOpConvFloat16ToUint, + EOpConvFloat16ToUint64, + + // float16_t -> float* EOpConvFloat16ToFloat, EOpConvFloat16ToDouble, - EOpConvFloat16ToInt64, - EOpConvFloat16ToUint64, - EOpConvBoolToInt16, - EOpConvIntToInt16, - EOpConvUintToInt16, + // float -> (u)int* + EOpConvFloatToInt8, EOpConvFloatToInt16, - EOpConvDoubleToInt16, - EOpConvFloat16ToInt16, - EOpConvInt64ToInt16, - EOpConvUint64ToInt16, - EOpConvUint16ToInt16, - EOpConvInt16ToBool, - EOpConvInt16ToInt, - EOpConvInt16ToUint, - EOpConvInt16ToFloat, - EOpConvInt16ToDouble, - EOpConvInt16ToFloat16, - EOpConvInt16ToInt64, - EOpConvInt16ToUint64, - - EOpConvBoolToUint16, - EOpConvIntToUint16, - EOpConvUintToUint16, + EOpConvFloatToInt, + EOpConvFloatToInt64, + EOpConvFloatToUint8, EOpConvFloatToUint16, + EOpConvFloatToUint, + EOpConvFloatToUint64, + + // float -> float* + EOpConvFloatToFloat16, + EOpConvFloatToDouble, + + // float64 _t-> (u)int* + EOpConvDoubleToInt8, + EOpConvDoubleToInt16, + EOpConvDoubleToInt, + EOpConvDoubleToInt64, + EOpConvDoubleToUint8, EOpConvDoubleToUint16, - EOpConvFloat16ToUint16, - EOpConvInt64ToUint16, - EOpConvUint64ToUint16, - EOpConvInt16ToUint16, - EOpConvUint16ToBool, - EOpConvUint16ToInt, - EOpConvUint16ToUint, - EOpConvUint16ToFloat, - EOpConvUint16ToDouble, - EOpConvUint16ToFloat16, - EOpConvUint16ToInt64, - EOpConvUint16ToUint64, -#endif + EOpConvDoubleToUint, + EOpConvDoubleToUint64, + + // float64_t -> float* + EOpConvDoubleToFloat16, + EOpConvDoubleToFloat, // // binary operations @@ -280,12 +370,10 @@ enum TOperator { EOpDoubleBitsToUint64, EOpInt64BitsToDouble, EOpUint64BitsToDouble, -#ifdef AMD_EXTENSIONS EOpFloat16BitsToInt16, EOpFloat16BitsToUint16, EOpInt16BitsToFloat16, EOpUint16BitsToFloat16, -#endif EOpPackSnorm2x16, EOpUnpackSnorm2x16, EOpPackUnorm2x16, @@ -302,7 +390,6 @@ enum TOperator { EOpUnpackInt2x32, EOpPackUint2x32, EOpUnpackUint2x32, -#ifdef AMD_EXTENSIONS EOpPackFloat2x16, EOpUnpackFloat2x16, EOpPackInt2x16, @@ -313,7 +400,12 @@ enum TOperator { EOpUnpackInt4x16, EOpPackUint4x16, EOpUnpackUint4x16, -#endif + EOpPack16, + EOpPack32, + EOpPack64, + EOpUnpack32, + EOpUnpack16, + EOpUnpack8, EOpLength, EOpDistance, @@ -379,6 +471,90 @@ enum TOperator { EOpAllInvocations, EOpAllInvocationsEqual, + EOpSubgroupGuardStart, + EOpSubgroupBarrier, + EOpSubgroupMemoryBarrier, + EOpSubgroupMemoryBarrierBuffer, + EOpSubgroupMemoryBarrierImage, + EOpSubgroupMemoryBarrierShared, // compute only + EOpSubgroupElect, + EOpSubgroupAll, + EOpSubgroupAny, + EOpSubgroupAllEqual, + EOpSubgroupBroadcast, + EOpSubgroupBroadcastFirst, + EOpSubgroupBallot, + EOpSubgroupInverseBallot, + EOpSubgroupBallotBitExtract, + EOpSubgroupBallotBitCount, + EOpSubgroupBallotInclusiveBitCount, + EOpSubgroupBallotExclusiveBitCount, + EOpSubgroupBallotFindLSB, + EOpSubgroupBallotFindMSB, + EOpSubgroupShuffle, + EOpSubgroupShuffleXor, + EOpSubgroupShuffleUp, + EOpSubgroupShuffleDown, + EOpSubgroupAdd, + EOpSubgroupMul, + EOpSubgroupMin, + EOpSubgroupMax, + EOpSubgroupAnd, + EOpSubgroupOr, + EOpSubgroupXor, + EOpSubgroupInclusiveAdd, + EOpSubgroupInclusiveMul, + EOpSubgroupInclusiveMin, + EOpSubgroupInclusiveMax, + EOpSubgroupInclusiveAnd, + EOpSubgroupInclusiveOr, + EOpSubgroupInclusiveXor, + EOpSubgroupExclusiveAdd, + EOpSubgroupExclusiveMul, + EOpSubgroupExclusiveMin, + EOpSubgroupExclusiveMax, + EOpSubgroupExclusiveAnd, + EOpSubgroupExclusiveOr, + EOpSubgroupExclusiveXor, + EOpSubgroupClusteredAdd, + EOpSubgroupClusteredMul, + EOpSubgroupClusteredMin, + EOpSubgroupClusteredMax, + EOpSubgroupClusteredAnd, + EOpSubgroupClusteredOr, + EOpSubgroupClusteredXor, + EOpSubgroupQuadBroadcast, + EOpSubgroupQuadSwapHorizontal, + EOpSubgroupQuadSwapVertical, + EOpSubgroupQuadSwapDiagonal, + +#ifdef NV_EXTENSIONS + EOpSubgroupPartition, + EOpSubgroupPartitionedAdd, + EOpSubgroupPartitionedMul, + EOpSubgroupPartitionedMin, + EOpSubgroupPartitionedMax, + EOpSubgroupPartitionedAnd, + EOpSubgroupPartitionedOr, + EOpSubgroupPartitionedXor, + EOpSubgroupPartitionedInclusiveAdd, + EOpSubgroupPartitionedInclusiveMul, + EOpSubgroupPartitionedInclusiveMin, + EOpSubgroupPartitionedInclusiveMax, + EOpSubgroupPartitionedInclusiveAnd, + EOpSubgroupPartitionedInclusiveOr, + EOpSubgroupPartitionedInclusiveXor, + EOpSubgroupPartitionedExclusiveAdd, + EOpSubgroupPartitionedExclusiveMul, + EOpSubgroupPartitionedExclusiveMin, + EOpSubgroupPartitionedExclusiveMax, + EOpSubgroupPartitionedExclusiveAnd, + EOpSubgroupPartitionedExclusiveOr, + EOpSubgroupPartitionedExclusiveXor, +#endif + + EOpSubgroupGuardStop, + #ifdef AMD_EXTENSIONS EOpMinInvocations, EOpMaxInvocations, @@ -451,32 +627,36 @@ enum TOperator { EOpConstructGuardStart, EOpConstructInt, // these first scalar forms also identify what implicit conversion is needed EOpConstructUint, - EOpConstructInt64, - EOpConstructUint64, -#ifdef AMD_EXTENSIONS + EOpConstructInt8, + EOpConstructUint8, EOpConstructInt16, EOpConstructUint16, -#endif + EOpConstructInt64, + EOpConstructUint64, EOpConstructBool, EOpConstructFloat, EOpConstructDouble, -#ifdef AMD_EXTENSIONS - EOpConstructFloat16, -#endif EOpConstructVec2, EOpConstructVec3, EOpConstructVec4, EOpConstructDVec2, EOpConstructDVec3, EOpConstructDVec4, -#ifdef AMD_EXTENSIONS - EOpConstructF16Vec2, - EOpConstructF16Vec3, - EOpConstructF16Vec4, -#endif EOpConstructBVec2, EOpConstructBVec3, EOpConstructBVec4, + EOpConstructI8Vec2, + EOpConstructI8Vec3, + EOpConstructI8Vec4, + EOpConstructU8Vec2, + EOpConstructU8Vec3, + EOpConstructU8Vec4, + EOpConstructI16Vec2, + EOpConstructI16Vec3, + EOpConstructI16Vec4, + EOpConstructU16Vec2, + EOpConstructU16Vec3, + EOpConstructU16Vec4, EOpConstructIVec2, EOpConstructIVec3, EOpConstructIVec4, @@ -489,14 +669,6 @@ enum TOperator { EOpConstructU64Vec2, EOpConstructU64Vec3, EOpConstructU64Vec4, -#ifdef AMD_EXTENSIONS - EOpConstructI16Vec2, - EOpConstructI16Vec3, - EOpConstructI16Vec4, - EOpConstructU16Vec2, - EOpConstructU16Vec3, - EOpConstructU16Vec4, -#endif EOpConstructMat2x2, EOpConstructMat2x3, EOpConstructMat2x4, @@ -542,7 +714,10 @@ enum TOperator { EOpConstructBMat4x2, EOpConstructBMat4x3, EOpConstructBMat4x4, -#ifdef AMD_EXTENSIONS + EOpConstructFloat16, + EOpConstructF16Vec2, + EOpConstructF16Vec3, + EOpConstructF16Vec4, EOpConstructF16Mat2x2, EOpConstructF16Mat2x3, EOpConstructF16Mat2x4, @@ -552,9 +727,9 @@ enum TOperator { EOpConstructF16Mat4x2, EOpConstructF16Mat4x3, EOpConstructF16Mat4x4, -#endif EOpConstructStruct, EOpConstructTextureSampler, + EOpConstructNonuniform, // expected to be transformed away, not present in final AST EOpConstructGuardEnd, // @@ -581,7 +756,11 @@ enum TOperator { // Array operators // - EOpArrayLength, // "Array" distinguishes from length(v) built-in function, but it applies to vectors and matrices as well. + // Can apply to arrays, vectors, or matrices. + // Can be decomposed to a constant at compile time, but this does not always happen, + // due to link-time effects. So, consumer can expect either a link-time sized or + // run-time sized array. + EOpArrayLength, // // Image operations @@ -722,7 +901,8 @@ enum TOperator { EOpInterlockedOr, // ... EOpInterlockedXor, // ... EOpAllMemoryBarrierWithGroupSync, // memory barriers without non-hlsl AST equivalents - EOpGroupMemoryBarrierWithGroupSync, // ... + EOpDeviceMemoryBarrier, // ... + EOpDeviceMemoryBarrierWithGroupSync, // ... EOpWorkgroupMemoryBarrier, // ... EOpWorkgroupMemoryBarrierWithGroupSync, // ... EOpEvaluateAttributeSnapped, // InterpolateAtOffset with int position on 16x16 grid @@ -776,6 +956,12 @@ enum TOperator { // matrix EOpMatrixSwizzle, // select multiple matrix components (non-column) + + // SM6 wave ops + EOpWaveGetLaneCount, // Will decompose to gl_SubgroupSize. + EOpWaveGetLaneIndex, // Will decompose to gl_SubgroupInvocationID. + EOpWaveActiveCountBits, // Will decompose to subgroupBallotBitCount(subgroupBallot()). + EOpWavePrefixCountBits, // Will decompose to subgroupBallotInclusiveBitCount(subgroupBallot()). }; class TIntermTraverser; @@ -818,7 +1004,7 @@ public: virtual glslang::TIntermMethod* getAsMethodNode() { return 0; } virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; } virtual glslang::TIntermBranch* getAsBranchNode() { return 0; } - virtual glslang::TIntermLoop* getAsLoopNode() { return 0; } + virtual glslang::TIntermLoop* getAsLoopNode() { return 0; } virtual const glslang::TIntermTyped* getAsTyped() const { return 0; } virtual const glslang::TIntermOperator* getAsOperator() const { return 0; } @@ -831,7 +1017,7 @@ public: virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; } virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; } virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; } - virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; } + virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; } virtual ~TIntermNode() { } protected: @@ -884,24 +1070,6 @@ protected: TType type; }; -// -// Selection control hints -// -enum TSelectionControl { - ESelectionControlNone, - ESelectionControlFlatten, - ESelectionControlDontFlatten, -}; - -// -// Loop control hints -// -enum TLoopControl { - ELoopControlNone, - ELoopControlUnroll, - ELoopControlDontUnroll, -}; - // // Handle for, do-while, and while loops. // @@ -912,26 +1080,36 @@ public: test(aTest), terminal(aTerminal), first(testFirst), - control(ELoopControlNone) + unroll(false), + dontUnroll(false), + dependency(0) { } - virtual TIntermLoop* getAsLoopNode() { return this; } - virtual const TIntermLoop* getAsLoopNode() const { return this; } + virtual TIntermLoop* getAsLoopNode() { return this; } + virtual const TIntermLoop* getAsLoopNode() const { return this; } virtual void traverse(TIntermTraverser*); TIntermNode* getBody() const { return body; } TIntermTyped* getTest() const { return test; } TIntermTyped* getTerminal() const { return terminal; } bool testFirst() const { return first; } - void setLoopControl(TLoopControl c) { control = c; } - TLoopControl getLoopControl() const { return control; } + void setUnroll() { unroll = true; } + void setDontUnroll() { dontUnroll = true; } + bool getUnroll() const { return unroll; } + bool getDontUnroll() const { return dontUnroll; } + + static const unsigned int dependencyInfinite = 0xFFFFFFFF; + void setLoopDependency(int d) { dependency = d; } + int getLoopDependency() const { return dependency; } protected: TIntermNode* body; // code to loop over TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops TIntermTyped* terminal; // exists for for-loops bool first; // true for while and for, not for do-while - TLoopControl control; // loop control hint + bool unroll; // true if unroll requested + bool dontUnroll; // true if request to not unroll + unsigned int dependency; // loop dependency hint; 0 means not set or unknown }; // @@ -1303,8 +1481,8 @@ typedef TVector TQualifierList; // class TIntermAggregate : public TIntermOperator { public: - TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } - TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } + TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(nullptr) { } + TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(nullptr) { } ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } @@ -1322,7 +1500,7 @@ public: void setDebug(bool d) { debug = d; } bool getOptimize() const { return optimize; } bool getDebug() const { return debug; } - void addToPragmaTable(const TPragmaTable& pTable); + void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor @@ -1342,22 +1520,35 @@ protected: class TIntermSelection : public TIntermTyped { public: TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) : - TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB), control(ESelectionControlNone) {} + TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB), + shortCircuit(true), + flatten(false), dontFlatten(false) {} TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) : - TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB), control(ESelectionControlNone) {} + TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB), + shortCircuit(true), + flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermTyped* getCondition() const { return condition; } virtual TIntermNode* getTrueBlock() const { return trueBlock; } virtual TIntermNode* getFalseBlock() const { return falseBlock; } virtual TIntermSelection* getAsSelectionNode() { return this; } virtual const TIntermSelection* getAsSelectionNode() const { return this; } - void setSelectionControl(TSelectionControl c) { control = c; } - TSelectionControl getSelectionControl() const { return control; } + + void setNoShortCircuit() { shortCircuit = false; } + bool getShortCircuit() const { return shortCircuit; } + + void setFlatten() { flatten = true; } + void setDontFlatten() { dontFlatten = true; } + bool getFlatten() const { return flatten; } + bool getDontFlatten() const { return dontFlatten; } + protected: TIntermTyped* condition; TIntermNode* trueBlock; TIntermNode* falseBlock; - TSelectionControl control; // selection control hint + bool shortCircuit; // normally all if-then-else and all GLSL ?: short-circuit, but HLSL ?: does not + bool flatten; // true if flatten requested + bool dontFlatten; // true if requested to not flatten }; // @@ -1368,18 +1559,24 @@ protected: // class TIntermSwitch : public TIntermNode { public: - TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b), control(ESelectionControlNone) { } + TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b), + flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermNode* getCondition() const { return condition; } virtual TIntermAggregate* getBody() const { return body; } virtual TIntermSwitch* getAsSwitchNode() { return this; } virtual const TIntermSwitch* getAsSwitchNode() const { return this; } - void setSelectionControl(TSelectionControl c) { control = c; } - TSelectionControl getSelectionControl() const { return control; } + + void setFlatten() { flatten = true; } + void setDontFlatten() { dontFlatten = true; } + bool getFlatten() const { return flatten; } + bool getDontFlatten() const { return dontFlatten; } + protected: TIntermTyped* condition; TIntermAggregate* body; - TSelectionControl control; // selection control hint + bool flatten; // true if flatten requested + bool dontFlatten; // true if requested to not flatten }; enum TVisit diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.h b/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.h index 218f8b67f512e5898cf86738a68bde7e968b6267..34799935c93ba77033790ccf9e62dd61dc65ec5f 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.h @@ -1,6 +1,3 @@ // This header is generated by the make-revision script. -// For the version, it uses the latest git tag followed by the number of commits. -// For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.2000" -#define GLSLANG_DATE "12-Apr-2017" +#define GLSLANG_PATCH_LEVEL 2705 diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.template b/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.template index 4a16beeb0f8a27744e11e787126985356ec3450c..6c13630b27e66b20c27607737997a20b52c2eb76 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.template +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Include/revision.template @@ -1,13 +1,13 @@ -// The file revision.h should be updated to the latest version, somehow, on -// check-in, if glslang has changed. -// -// revision.template is the source for revision.h when using SubWCRev as the -// method of updating revision.h. You don't have to do it this way, the -// requirement is only that revision.h gets updated. -// -// revision.h is under source control so that not all consumers of glslang -// source have to figure out how to create revision.h just to get a build -// going. However, if it is not updated, it can be a version behind. - -#define GLSLANG_REVISION "$WCREV$" -#define GLSLANG_DATE "$WCDATE$" +// The file revision.h should be updated to the latest version, somehow, on +// check-in, if glslang has changed. +// +// revision.template is the source for revision.h when using SubWCRev as the +// method of updating revision.h. You don't have to do it this way, the +// requirement is only that revision.h gets updated. +// +// revision.h is under source control so that not all consumers of glslang +// source have to figure out how to create revision.h just to get a build +// going. However, if it is not updated, it can be a version behind. + +#define GLSLANG_REVISION "$WCREV$" +#define GLSLANG_DATE "$WCDATE$" diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Constant.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Constant.cpp index 625b8e940a69bed719d7d6e471d6714f6287316e..142492dc33a0ebe72c92e5308a435d3f3f43d8aa 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Constant.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Constant.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -38,6 +39,7 @@ #include #include #include +#include namespace { @@ -176,11 +178,40 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right switch (getType().getBasicType()) { case EbtDouble: case EbtFloat: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif newConstArray[i].setDConst(leftUnionArray[i].getDConst() / rightUnionArray[i].getDConst()); break; + case EbtInt8: + if (rightUnionArray[i] == 0) + newConstArray[i].setI8Const(0x7F); + else if (rightUnionArray[i].getI8Const() == -1 && leftUnionArray[i].getI8Const() == (signed char)0x80) + newConstArray[i].setI8Const((signed char)0x80); + else + newConstArray[i].setI8Const(leftUnionArray[i].getI8Const() / rightUnionArray[i].getI8Const()); + break; + + case EbtUint8: + if (rightUnionArray[i] == 0) { + newConstArray[i].setU8Const(0xFF); + } else + newConstArray[i].setU8Const(leftUnionArray[i].getU8Const() / rightUnionArray[i].getU8Const()); + break; + + case EbtInt16: + if (rightUnionArray[i] == 0) + newConstArray[i].setI16Const(0x7FFF); + else if (rightUnionArray[i].getI16Const() == -1 && leftUnionArray[i].getI16Const() == (signed short)0x8000) + newConstArray[i].setI16Const(short(0x8000)); + else + newConstArray[i].setI16Const(leftUnionArray[i].getI16Const() / rightUnionArray[i].getI16Const()); + break; + + case EbtUint16: + if (rightUnionArray[i] == 0) { + newConstArray[i].setU16Const(0xFFFF); + } else + newConstArray[i].setU16Const(leftUnionArray[i].getU16Const() / rightUnionArray[i].getU16Const()); + break; case EbtInt: if (rightUnionArray[i] == 0) @@ -213,23 +244,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right } else newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const()); break; -#ifdef AMD_EXTENSIONS - case EbtInt16: - if (rightUnionArray[i] == 0) - newConstArray[i].setIConst(0x7FFF); - else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == (int)0x8000) - newConstArray[i].setIConst(0x8000); - else - newConstArray[i].setIConst(leftUnionArray[i].getIConst() / rightUnionArray[i].getIConst()); - break; - - case EbtUint16: - if (rightUnionArray[i] == 0) { - newConstArray[i].setUConst(0xFFFFu); - } else - newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); - break; -#endif default: return 0; } @@ -263,8 +277,31 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right for (int i = 0; i < newComps; i++) { if (rightUnionArray[i] == 0) newConstArray[i] = leftUnionArray[i]; - else - newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; + else { + switch (getType().getBasicType()) { + case EbtInt: + if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == INT_MIN) { + newConstArray[i].setIConst(0); + break; + } else goto modulo_default; + + case EbtInt64: + if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) { + newConstArray[i].setI64Const(0); + break; + } else goto modulo_default; +#ifdef AMD_EXTENSIONS + case EbtInt16: + if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == SHRT_MIN) { + newConstArray[i].setIConst(0); + break; + } else goto modulo_default; +#endif + default: + modulo_default: + newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; + } + } } break; @@ -387,6 +424,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) resultSize = 2; break; + case EOpPack16: + case EOpPack32: + case EOpPack64: + case EOpUnpack32: + case EOpUnpack16: + case EOpUnpack8: case EOpNormalize: componentWise = false; resultSize = objectSize; @@ -445,6 +488,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpPackSnorm2x16: case EOpPackUnorm2x16: case EOpPackHalf2x16: + case EOpPack16: + case EOpPack32: + case EOpPack64: + case EOpUnpack32: + case EOpUnpack16: + case EOpUnpack8: case EOpUnpackSnorm2x16: case EOpUnpackUnorm2x16: @@ -470,17 +519,13 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpNegative: switch (getType().getBasicType()) { case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; -#ifdef AMD_EXTENSIONS - case EbtInt16: -#endif + case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break; + case EbtUint8: newConstArray[i].setU8Const(static_cast(-static_cast(unionArray[i].getU8Const()))); break; + case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break; + case EbtUint16:newConstArray[i].setU16Const(static_cast(-static_cast(unionArray[i].getU16Const()))); break; case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break; -#ifdef AMD_EXTENSIONS - case EbtUint16: -#endif case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break; case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; @@ -635,13 +680,10 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpDoubleBitsToUint64: case EOpInt64BitsToDouble: case EOpUint64BitsToDouble: -#ifdef AMD_EXTENSIONS case EOpFloat16BitsToInt16: case EOpFloat16BitsToUint16: case EOpInt16BitsToFloat16: case EOpUint16BitsToFloat16: -#endif - default: return 0; } @@ -725,20 +767,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) for (unsigned int arg = 0; arg < children.size(); ++arg) childConstUnions.push_back(children[arg]->getAsConstantUnion()->getConstArray()); - // Second, do the actual folding - - bool isFloatingPoint = children[0]->getAsTyped()->getBasicType() == EbtFloat || -#ifdef AMD_EXTENSIONS - children[0]->getAsTyped()->getBasicType() == EbtFloat16 || -#endif - children[0]->getAsTyped()->getBasicType() == EbtDouble; - bool isSigned = children[0]->getAsTyped()->getBasicType() == EbtInt || -#ifdef AMD_EXTENSIONS - children[0]->getAsTyped()->getBasicType() == EbtInt16 || -#endif - children[0]->getAsTyped()->getBasicType() == EbtInt64; - bool isInt64 = children[0]->getAsTyped()->getBasicType() == EbtInt64 || - children[0]->getAsTyped()->getBasicType() == EbtUint64; if (componentwise) { for (int comp = 0; comp < objectSize; comp++) { @@ -759,53 +787,114 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) newConstArray[comp].setDConst(pow(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); break; case EOpMin: - if (isFloatingPoint) + switch(children[0]->getAsTyped()->getBasicType()) { + case EbtFloat16: + case EbtFloat: + case EbtDouble: newConstArray[comp].setDConst(std::min(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); - else if (isSigned) { - if (isInt64) - newConstArray[comp].setI64Const(std::min(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); - else - newConstArray[comp].setIConst(std::min(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); - } else { - if (isInt64) - newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); - else - newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); + break; + case EbtInt8: + newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); + break; + case EbtUint8: + newConstArray[comp].setU8Const(std::min(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const())); + break; + case EbtInt16: + newConstArray[comp].setI16Const(std::min(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const())); + break; + case EbtUint16: + newConstArray[comp].setU16Const(std::min(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const())); + break; + case EbtInt: + newConstArray[comp].setIConst(std::min(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); + break; + case EbtUint: + newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); + break; + case EbtInt64: + newConstArray[comp].setI64Const(std::min(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); + break; + case EbtUint64: + newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); + break; + default: assert(false && "Default missing"); } break; case EOpMax: - if (isFloatingPoint) + switch(children[0]->getAsTyped()->getBasicType()) { + case EbtFloat16: + case EbtFloat: + case EbtDouble: newConstArray[comp].setDConst(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); - else if (isSigned) { - if (isInt64) - newConstArray[comp].setI64Const(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); - else - newConstArray[comp].setIConst(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); - } else { - if (isInt64) - newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); - else - newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); + break; + case EbtInt8: + newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); + break; + case EbtUint8: + newConstArray[comp].setU8Const(std::max(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const())); + break; + case EbtInt16: + newConstArray[comp].setI16Const(std::max(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const())); + break; + case EbtUint16: + newConstArray[comp].setU16Const(std::max(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const())); + break; + case EbtInt: + newConstArray[comp].setIConst(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); + break; + case EbtUint: + newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); + break; + case EbtInt64: + newConstArray[comp].setI64Const(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); + break; + case EbtUint64: + newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); + break; + default: assert(false && "Default missing"); } break; case EOpClamp: - if (isFloatingPoint) + switch(children[0]->getAsTyped()->getBasicType()) { + case EbtFloat16: + case EbtFloat: + case EbtDouble: newConstArray[comp].setDConst(std::min(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()), childConstUnions[2][arg2comp].getDConst())); - else if (isSigned) { - if (isInt64) - newConstArray[comp].setI64Const(std::min(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()), - childConstUnions[2][arg2comp].getI64Const())); - else - newConstArray[comp].setIConst(std::min(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()), + break; + case EbtInt8: + newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()), + childConstUnions[2][arg2comp].getI8Const())); + break; + case EbtUint8: + newConstArray[comp].setU8Const(std::min(std::max(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const()), + childConstUnions[2][arg2comp].getU8Const())); + break; + case EbtInt16: + newConstArray[comp].setI16Const(std::min(std::max(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const()), + childConstUnions[2][arg2comp].getI16Const())); + break; + case EbtUint16: + newConstArray[comp].setU16Const(std::min(std::max(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const()), + childConstUnions[2][arg2comp].getU16Const())); + break; + case EbtInt: + newConstArray[comp].setIConst(std::min(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()), childConstUnions[2][arg2comp].getIConst())); - } else { - if (isInt64) - newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()), - childConstUnions[2][arg2comp].getU64Const())); - else - newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()), + break; + case EbtUint: + newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()), childConstUnions[2][arg2comp].getUConst())); + break; + case EbtInt64: + newConstArray[comp].setI64Const(std::min(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()), + childConstUnions[2][arg2comp].getI64Const())); + break; + case EbtUint64: + newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()), + childConstUnions[2][arg2comp].getU64Const())); + break; + default: assert(false && "Default missing"); } break; case EOpLessThan: diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.cpp old mode 100644 new mode 100755 index a837efddbefacfd697a666319552ff95f6dfbdbd..5ae4dbd0560c9a0a7115a6e928cf64ee2e961f37 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.cpp @@ -1,7 +1,8 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. -// Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2015-2017 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -83,6 +84,13 @@ TBuiltIns::TBuiltIns() // Set up textual representations for making all the permutations // of texturing/imaging functions. prefixes[EbtFloat] = ""; +#ifdef AMD_EXTENSIONS + prefixes[EbtFloat16] = "f16"; +#endif + prefixes[EbtInt8] = "i8"; + prefixes[EbtUint8] = "u8"; + prefixes[EbtInt16] = "i16"; + prefixes[EbtUint16] = "u16"; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; postfixes[2] = "2"; @@ -799,7 +807,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "bvec3 notEqual(u64vec3, u64vec3);" "bvec4 notEqual(u64vec4, u64vec4);" -#ifdef AMD_EXTENSIONS "int findLSB(int64_t);" "ivec2 findLSB(i64vec2);" "ivec3 findLSB(i64vec3);" @@ -819,7 +826,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "ivec2 findMSB(u64vec2);" "ivec3 findMSB(u64vec3);" "ivec4 findMSB(u64vec4);" -#endif + "\n" ); } @@ -888,6 +895,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 mid3(f16vec3, f16vec3, f16vec3);" "f16vec4 mid3(f16vec4, f16vec4, f16vec4);" + "int16_t min3(int16_t, int16_t, int16_t);" + "i16vec2 min3(i16vec2, i16vec2, i16vec2);" + "i16vec3 min3(i16vec3, i16vec3, i16vec3);" + "i16vec4 min3(i16vec4, i16vec4, i16vec4);" + + "int16_t max3(int16_t, int16_t, int16_t);" + "i16vec2 max3(i16vec2, i16vec2, i16vec2);" + "i16vec3 max3(i16vec3, i16vec3, i16vec3);" + "i16vec4 max3(i16vec4, i16vec4, i16vec4);" + + "int16_t mid3(int16_t, int16_t, int16_t);" + "i16vec2 mid3(i16vec2, i16vec2, i16vec2);" + "i16vec3 mid3(i16vec3, i16vec3, i16vec3);" + "i16vec4 mid3(i16vec4, i16vec4, i16vec4);" + + "uint16_t min3(uint16_t, uint16_t, uint16_t);" + "u16vec2 min3(u16vec2, u16vec2, u16vec2);" + "u16vec3 min3(u16vec3, u16vec3, u16vec3);" + "u16vec4 min3(u16vec4, u16vec4, u16vec4);" + + "uint16_t max3(uint16_t, uint16_t, uint16_t);" + "u16vec2 max3(u16vec2, u16vec2, u16vec2);" + "u16vec3 max3(u16vec3, u16vec3, u16vec3);" + "u16vec4 max3(u16vec4, u16vec4, u16vec4);" + + "uint16_t mid3(uint16_t, uint16_t, uint16_t);" + "u16vec2 mid3(u16vec2, u16vec2, u16vec2);" + "u16vec3 mid3(u16vec3, u16vec3, u16vec3);" + "u16vec4 mid3(u16vec4, u16vec4, u16vec4);" + "\n" ); } @@ -1384,7 +1421,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // // Noise functions. // - if (profile != EEsProfile) { + if (spvVersion.spv == 0 && profile != EEsProfile) { commonBuiltins.append( "float noise1(float x);" "float noise1(vec2 x);" @@ -1627,6 +1664,1087 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + commonBuiltins.append( + "void subgroupBarrier();" + "void subgroupMemoryBarrier();" + "void subgroupMemoryBarrierBuffer();" + "void subgroupMemoryBarrierImage();" + "bool subgroupElect();" + + "bool subgroupAll(bool);\n" + "bool subgroupAny(bool);\n" + + "bool subgroupAllEqual(float);\n" + "bool subgroupAllEqual(vec2);\n" + "bool subgroupAllEqual(vec3);\n" + "bool subgroupAllEqual(vec4);\n" + "bool subgroupAllEqual(int);\n" + "bool subgroupAllEqual(ivec2);\n" + "bool subgroupAllEqual(ivec3);\n" + "bool subgroupAllEqual(ivec4);\n" + "bool subgroupAllEqual(uint);\n" + "bool subgroupAllEqual(uvec2);\n" + "bool subgroupAllEqual(uvec3);\n" + "bool subgroupAllEqual(uvec4);\n" + "bool subgroupAllEqual(bool);\n" + "bool subgroupAllEqual(bvec2);\n" + "bool subgroupAllEqual(bvec3);\n" + "bool subgroupAllEqual(bvec4);\n" + + "float subgroupBroadcast(float, uint);\n" + "vec2 subgroupBroadcast(vec2, uint);\n" + "vec3 subgroupBroadcast(vec3, uint);\n" + "vec4 subgroupBroadcast(vec4, uint);\n" + "int subgroupBroadcast(int, uint);\n" + "ivec2 subgroupBroadcast(ivec2, uint);\n" + "ivec3 subgroupBroadcast(ivec3, uint);\n" + "ivec4 subgroupBroadcast(ivec4, uint);\n" + "uint subgroupBroadcast(uint, uint);\n" + "uvec2 subgroupBroadcast(uvec2, uint);\n" + "uvec3 subgroupBroadcast(uvec3, uint);\n" + "uvec4 subgroupBroadcast(uvec4, uint);\n" + "bool subgroupBroadcast(bool, uint);\n" + "bvec2 subgroupBroadcast(bvec2, uint);\n" + "bvec3 subgroupBroadcast(bvec3, uint);\n" + "bvec4 subgroupBroadcast(bvec4, uint);\n" + + "float subgroupBroadcastFirst(float);\n" + "vec2 subgroupBroadcastFirst(vec2);\n" + "vec3 subgroupBroadcastFirst(vec3);\n" + "vec4 subgroupBroadcastFirst(vec4);\n" + "int subgroupBroadcastFirst(int);\n" + "ivec2 subgroupBroadcastFirst(ivec2);\n" + "ivec3 subgroupBroadcastFirst(ivec3);\n" + "ivec4 subgroupBroadcastFirst(ivec4);\n" + "uint subgroupBroadcastFirst(uint);\n" + "uvec2 subgroupBroadcastFirst(uvec2);\n" + "uvec3 subgroupBroadcastFirst(uvec3);\n" + "uvec4 subgroupBroadcastFirst(uvec4);\n" + "bool subgroupBroadcastFirst(bool);\n" + "bvec2 subgroupBroadcastFirst(bvec2);\n" + "bvec3 subgroupBroadcastFirst(bvec3);\n" + "bvec4 subgroupBroadcastFirst(bvec4);\n" + + "uvec4 subgroupBallot(bool);\n" + "bool subgroupInverseBallot(uvec4);\n" + "bool subgroupBallotBitExtract(uvec4, uint);\n" + "uint subgroupBallotBitCount(uvec4);\n" + "uint subgroupBallotInclusiveBitCount(uvec4);\n" + "uint subgroupBallotExclusiveBitCount(uvec4);\n" + "uint subgroupBallotFindLSB(uvec4);\n" + "uint subgroupBallotFindMSB(uvec4);\n" + + "float subgroupShuffle(float, uint);\n" + "vec2 subgroupShuffle(vec2, uint);\n" + "vec3 subgroupShuffle(vec3, uint);\n" + "vec4 subgroupShuffle(vec4, uint);\n" + "int subgroupShuffle(int, uint);\n" + "ivec2 subgroupShuffle(ivec2, uint);\n" + "ivec3 subgroupShuffle(ivec3, uint);\n" + "ivec4 subgroupShuffle(ivec4, uint);\n" + "uint subgroupShuffle(uint, uint);\n" + "uvec2 subgroupShuffle(uvec2, uint);\n" + "uvec3 subgroupShuffle(uvec3, uint);\n" + "uvec4 subgroupShuffle(uvec4, uint);\n" + "bool subgroupShuffle(bool, uint);\n" + "bvec2 subgroupShuffle(bvec2, uint);\n" + "bvec3 subgroupShuffle(bvec3, uint);\n" + "bvec4 subgroupShuffle(bvec4, uint);\n" + + "float subgroupShuffleXor(float, uint);\n" + "vec2 subgroupShuffleXor(vec2, uint);\n" + "vec3 subgroupShuffleXor(vec3, uint);\n" + "vec4 subgroupShuffleXor(vec4, uint);\n" + "int subgroupShuffleXor(int, uint);\n" + "ivec2 subgroupShuffleXor(ivec2, uint);\n" + "ivec3 subgroupShuffleXor(ivec3, uint);\n" + "ivec4 subgroupShuffleXor(ivec4, uint);\n" + "uint subgroupShuffleXor(uint, uint);\n" + "uvec2 subgroupShuffleXor(uvec2, uint);\n" + "uvec3 subgroupShuffleXor(uvec3, uint);\n" + "uvec4 subgroupShuffleXor(uvec4, uint);\n" + "bool subgroupShuffleXor(bool, uint);\n" + "bvec2 subgroupShuffleXor(bvec2, uint);\n" + "bvec3 subgroupShuffleXor(bvec3, uint);\n" + "bvec4 subgroupShuffleXor(bvec4, uint);\n" + + "float subgroupShuffleUp(float, uint delta);\n" + "vec2 subgroupShuffleUp(vec2, uint delta);\n" + "vec3 subgroupShuffleUp(vec3, uint delta);\n" + "vec4 subgroupShuffleUp(vec4, uint delta);\n" + "int subgroupShuffleUp(int, uint delta);\n" + "ivec2 subgroupShuffleUp(ivec2, uint delta);\n" + "ivec3 subgroupShuffleUp(ivec3, uint delta);\n" + "ivec4 subgroupShuffleUp(ivec4, uint delta);\n" + "uint subgroupShuffleUp(uint, uint delta);\n" + "uvec2 subgroupShuffleUp(uvec2, uint delta);\n" + "uvec3 subgroupShuffleUp(uvec3, uint delta);\n" + "uvec4 subgroupShuffleUp(uvec4, uint delta);\n" + "bool subgroupShuffleUp(bool, uint delta);\n" + "bvec2 subgroupShuffleUp(bvec2, uint delta);\n" + "bvec3 subgroupShuffleUp(bvec3, uint delta);\n" + "bvec4 subgroupShuffleUp(bvec4, uint delta);\n" + + "float subgroupShuffleDown(float, uint delta);\n" + "vec2 subgroupShuffleDown(vec2, uint delta);\n" + "vec3 subgroupShuffleDown(vec3, uint delta);\n" + "vec4 subgroupShuffleDown(vec4, uint delta);\n" + "int subgroupShuffleDown(int, uint delta);\n" + "ivec2 subgroupShuffleDown(ivec2, uint delta);\n" + "ivec3 subgroupShuffleDown(ivec3, uint delta);\n" + "ivec4 subgroupShuffleDown(ivec4, uint delta);\n" + "uint subgroupShuffleDown(uint, uint delta);\n" + "uvec2 subgroupShuffleDown(uvec2, uint delta);\n" + "uvec3 subgroupShuffleDown(uvec3, uint delta);\n" + "uvec4 subgroupShuffleDown(uvec4, uint delta);\n" + "bool subgroupShuffleDown(bool, uint delta);\n" + "bvec2 subgroupShuffleDown(bvec2, uint delta);\n" + "bvec3 subgroupShuffleDown(bvec3, uint delta);\n" + "bvec4 subgroupShuffleDown(bvec4, uint delta);\n" + + "float subgroupAdd(float);\n" + "vec2 subgroupAdd(vec2);\n" + "vec3 subgroupAdd(vec3);\n" + "vec4 subgroupAdd(vec4);\n" + "int subgroupAdd(int);\n" + "ivec2 subgroupAdd(ivec2);\n" + "ivec3 subgroupAdd(ivec3);\n" + "ivec4 subgroupAdd(ivec4);\n" + "uint subgroupAdd(uint);\n" + "uvec2 subgroupAdd(uvec2);\n" + "uvec3 subgroupAdd(uvec3);\n" + "uvec4 subgroupAdd(uvec4);\n" + + "float subgroupMul(float);\n" + "vec2 subgroupMul(vec2);\n" + "vec3 subgroupMul(vec3);\n" + "vec4 subgroupMul(vec4);\n" + "int subgroupMul(int);\n" + "ivec2 subgroupMul(ivec2);\n" + "ivec3 subgroupMul(ivec3);\n" + "ivec4 subgroupMul(ivec4);\n" + "uint subgroupMul(uint);\n" + "uvec2 subgroupMul(uvec2);\n" + "uvec3 subgroupMul(uvec3);\n" + "uvec4 subgroupMul(uvec4);\n" + + "float subgroupMin(float);\n" + "vec2 subgroupMin(vec2);\n" + "vec3 subgroupMin(vec3);\n" + "vec4 subgroupMin(vec4);\n" + "int subgroupMin(int);\n" + "ivec2 subgroupMin(ivec2);\n" + "ivec3 subgroupMin(ivec3);\n" + "ivec4 subgroupMin(ivec4);\n" + "uint subgroupMin(uint);\n" + "uvec2 subgroupMin(uvec2);\n" + "uvec3 subgroupMin(uvec3);\n" + "uvec4 subgroupMin(uvec4);\n" + + "float subgroupMax(float);\n" + "vec2 subgroupMax(vec2);\n" + "vec3 subgroupMax(vec3);\n" + "vec4 subgroupMax(vec4);\n" + "int subgroupMax(int);\n" + "ivec2 subgroupMax(ivec2);\n" + "ivec3 subgroupMax(ivec3);\n" + "ivec4 subgroupMax(ivec4);\n" + "uint subgroupMax(uint);\n" + "uvec2 subgroupMax(uvec2);\n" + "uvec3 subgroupMax(uvec3);\n" + "uvec4 subgroupMax(uvec4);\n" + + "int subgroupAnd(int);\n" + "ivec2 subgroupAnd(ivec2);\n" + "ivec3 subgroupAnd(ivec3);\n" + "ivec4 subgroupAnd(ivec4);\n" + "uint subgroupAnd(uint);\n" + "uvec2 subgroupAnd(uvec2);\n" + "uvec3 subgroupAnd(uvec3);\n" + "uvec4 subgroupAnd(uvec4);\n" + "bool subgroupAnd(bool);\n" + "bvec2 subgroupAnd(bvec2);\n" + "bvec3 subgroupAnd(bvec3);\n" + "bvec4 subgroupAnd(bvec4);\n" + + "int subgroupOr(int);\n" + "ivec2 subgroupOr(ivec2);\n" + "ivec3 subgroupOr(ivec3);\n" + "ivec4 subgroupOr(ivec4);\n" + "uint subgroupOr(uint);\n" + "uvec2 subgroupOr(uvec2);\n" + "uvec3 subgroupOr(uvec3);\n" + "uvec4 subgroupOr(uvec4);\n" + "bool subgroupOr(bool);\n" + "bvec2 subgroupOr(bvec2);\n" + "bvec3 subgroupOr(bvec3);\n" + "bvec4 subgroupOr(bvec4);\n" + + "int subgroupXor(int);\n" + "ivec2 subgroupXor(ivec2);\n" + "ivec3 subgroupXor(ivec3);\n" + "ivec4 subgroupXor(ivec4);\n" + "uint subgroupXor(uint);\n" + "uvec2 subgroupXor(uvec2);\n" + "uvec3 subgroupXor(uvec3);\n" + "uvec4 subgroupXor(uvec4);\n" + "bool subgroupXor(bool);\n" + "bvec2 subgroupXor(bvec2);\n" + "bvec3 subgroupXor(bvec3);\n" + "bvec4 subgroupXor(bvec4);\n" + + "float subgroupInclusiveAdd(float);\n" + "vec2 subgroupInclusiveAdd(vec2);\n" + "vec3 subgroupInclusiveAdd(vec3);\n" + "vec4 subgroupInclusiveAdd(vec4);\n" + "int subgroupInclusiveAdd(int);\n" + "ivec2 subgroupInclusiveAdd(ivec2);\n" + "ivec3 subgroupInclusiveAdd(ivec3);\n" + "ivec4 subgroupInclusiveAdd(ivec4);\n" + "uint subgroupInclusiveAdd(uint);\n" + "uvec2 subgroupInclusiveAdd(uvec2);\n" + "uvec3 subgroupInclusiveAdd(uvec3);\n" + "uvec4 subgroupInclusiveAdd(uvec4);\n" + + "float subgroupInclusiveMul(float);\n" + "vec2 subgroupInclusiveMul(vec2);\n" + "vec3 subgroupInclusiveMul(vec3);\n" + "vec4 subgroupInclusiveMul(vec4);\n" + "int subgroupInclusiveMul(int);\n" + "ivec2 subgroupInclusiveMul(ivec2);\n" + "ivec3 subgroupInclusiveMul(ivec3);\n" + "ivec4 subgroupInclusiveMul(ivec4);\n" + "uint subgroupInclusiveMul(uint);\n" + "uvec2 subgroupInclusiveMul(uvec2);\n" + "uvec3 subgroupInclusiveMul(uvec3);\n" + "uvec4 subgroupInclusiveMul(uvec4);\n" + + "float subgroupInclusiveMin(float);\n" + "vec2 subgroupInclusiveMin(vec2);\n" + "vec3 subgroupInclusiveMin(vec3);\n" + "vec4 subgroupInclusiveMin(vec4);\n" + "int subgroupInclusiveMin(int);\n" + "ivec2 subgroupInclusiveMin(ivec2);\n" + "ivec3 subgroupInclusiveMin(ivec3);\n" + "ivec4 subgroupInclusiveMin(ivec4);\n" + "uint subgroupInclusiveMin(uint);\n" + "uvec2 subgroupInclusiveMin(uvec2);\n" + "uvec3 subgroupInclusiveMin(uvec3);\n" + "uvec4 subgroupInclusiveMin(uvec4);\n" + + "float subgroupInclusiveMax(float);\n" + "vec2 subgroupInclusiveMax(vec2);\n" + "vec3 subgroupInclusiveMax(vec3);\n" + "vec4 subgroupInclusiveMax(vec4);\n" + "int subgroupInclusiveMax(int);\n" + "ivec2 subgroupInclusiveMax(ivec2);\n" + "ivec3 subgroupInclusiveMax(ivec3);\n" + "ivec4 subgroupInclusiveMax(ivec4);\n" + "uint subgroupInclusiveMax(uint);\n" + "uvec2 subgroupInclusiveMax(uvec2);\n" + "uvec3 subgroupInclusiveMax(uvec3);\n" + "uvec4 subgroupInclusiveMax(uvec4);\n" + + "int subgroupInclusiveAnd(int);\n" + "ivec2 subgroupInclusiveAnd(ivec2);\n" + "ivec3 subgroupInclusiveAnd(ivec3);\n" + "ivec4 subgroupInclusiveAnd(ivec4);\n" + "uint subgroupInclusiveAnd(uint);\n" + "uvec2 subgroupInclusiveAnd(uvec2);\n" + "uvec3 subgroupInclusiveAnd(uvec3);\n" + "uvec4 subgroupInclusiveAnd(uvec4);\n" + "bool subgroupInclusiveAnd(bool);\n" + "bvec2 subgroupInclusiveAnd(bvec2);\n" + "bvec3 subgroupInclusiveAnd(bvec3);\n" + "bvec4 subgroupInclusiveAnd(bvec4);\n" + + "int subgroupInclusiveOr(int);\n" + "ivec2 subgroupInclusiveOr(ivec2);\n" + "ivec3 subgroupInclusiveOr(ivec3);\n" + "ivec4 subgroupInclusiveOr(ivec4);\n" + "uint subgroupInclusiveOr(uint);\n" + "uvec2 subgroupInclusiveOr(uvec2);\n" + "uvec3 subgroupInclusiveOr(uvec3);\n" + "uvec4 subgroupInclusiveOr(uvec4);\n" + "bool subgroupInclusiveOr(bool);\n" + "bvec2 subgroupInclusiveOr(bvec2);\n" + "bvec3 subgroupInclusiveOr(bvec3);\n" + "bvec4 subgroupInclusiveOr(bvec4);\n" + + "int subgroupInclusiveXor(int);\n" + "ivec2 subgroupInclusiveXor(ivec2);\n" + "ivec3 subgroupInclusiveXor(ivec3);\n" + "ivec4 subgroupInclusiveXor(ivec4);\n" + "uint subgroupInclusiveXor(uint);\n" + "uvec2 subgroupInclusiveXor(uvec2);\n" + "uvec3 subgroupInclusiveXor(uvec3);\n" + "uvec4 subgroupInclusiveXor(uvec4);\n" + "bool subgroupInclusiveXor(bool);\n" + "bvec2 subgroupInclusiveXor(bvec2);\n" + "bvec3 subgroupInclusiveXor(bvec3);\n" + "bvec4 subgroupInclusiveXor(bvec4);\n" + + "float subgroupExclusiveAdd(float);\n" + "vec2 subgroupExclusiveAdd(vec2);\n" + "vec3 subgroupExclusiveAdd(vec3);\n" + "vec4 subgroupExclusiveAdd(vec4);\n" + "int subgroupExclusiveAdd(int);\n" + "ivec2 subgroupExclusiveAdd(ivec2);\n" + "ivec3 subgroupExclusiveAdd(ivec3);\n" + "ivec4 subgroupExclusiveAdd(ivec4);\n" + "uint subgroupExclusiveAdd(uint);\n" + "uvec2 subgroupExclusiveAdd(uvec2);\n" + "uvec3 subgroupExclusiveAdd(uvec3);\n" + "uvec4 subgroupExclusiveAdd(uvec4);\n" + + "float subgroupExclusiveMul(float);\n" + "vec2 subgroupExclusiveMul(vec2);\n" + "vec3 subgroupExclusiveMul(vec3);\n" + "vec4 subgroupExclusiveMul(vec4);\n" + "int subgroupExclusiveMul(int);\n" + "ivec2 subgroupExclusiveMul(ivec2);\n" + "ivec3 subgroupExclusiveMul(ivec3);\n" + "ivec4 subgroupExclusiveMul(ivec4);\n" + "uint subgroupExclusiveMul(uint);\n" + "uvec2 subgroupExclusiveMul(uvec2);\n" + "uvec3 subgroupExclusiveMul(uvec3);\n" + "uvec4 subgroupExclusiveMul(uvec4);\n" + + "float subgroupExclusiveMin(float);\n" + "vec2 subgroupExclusiveMin(vec2);\n" + "vec3 subgroupExclusiveMin(vec3);\n" + "vec4 subgroupExclusiveMin(vec4);\n" + "int subgroupExclusiveMin(int);\n" + "ivec2 subgroupExclusiveMin(ivec2);\n" + "ivec3 subgroupExclusiveMin(ivec3);\n" + "ivec4 subgroupExclusiveMin(ivec4);\n" + "uint subgroupExclusiveMin(uint);\n" + "uvec2 subgroupExclusiveMin(uvec2);\n" + "uvec3 subgroupExclusiveMin(uvec3);\n" + "uvec4 subgroupExclusiveMin(uvec4);\n" + + "float subgroupExclusiveMax(float);\n" + "vec2 subgroupExclusiveMax(vec2);\n" + "vec3 subgroupExclusiveMax(vec3);\n" + "vec4 subgroupExclusiveMax(vec4);\n" + "int subgroupExclusiveMax(int);\n" + "ivec2 subgroupExclusiveMax(ivec2);\n" + "ivec3 subgroupExclusiveMax(ivec3);\n" + "ivec4 subgroupExclusiveMax(ivec4);\n" + "uint subgroupExclusiveMax(uint);\n" + "uvec2 subgroupExclusiveMax(uvec2);\n" + "uvec3 subgroupExclusiveMax(uvec3);\n" + "uvec4 subgroupExclusiveMax(uvec4);\n" + + "int subgroupExclusiveAnd(int);\n" + "ivec2 subgroupExclusiveAnd(ivec2);\n" + "ivec3 subgroupExclusiveAnd(ivec3);\n" + "ivec4 subgroupExclusiveAnd(ivec4);\n" + "uint subgroupExclusiveAnd(uint);\n" + "uvec2 subgroupExclusiveAnd(uvec2);\n" + "uvec3 subgroupExclusiveAnd(uvec3);\n" + "uvec4 subgroupExclusiveAnd(uvec4);\n" + "bool subgroupExclusiveAnd(bool);\n" + "bvec2 subgroupExclusiveAnd(bvec2);\n" + "bvec3 subgroupExclusiveAnd(bvec3);\n" + "bvec4 subgroupExclusiveAnd(bvec4);\n" + + "int subgroupExclusiveOr(int);\n" + "ivec2 subgroupExclusiveOr(ivec2);\n" + "ivec3 subgroupExclusiveOr(ivec3);\n" + "ivec4 subgroupExclusiveOr(ivec4);\n" + "uint subgroupExclusiveOr(uint);\n" + "uvec2 subgroupExclusiveOr(uvec2);\n" + "uvec3 subgroupExclusiveOr(uvec3);\n" + "uvec4 subgroupExclusiveOr(uvec4);\n" + "bool subgroupExclusiveOr(bool);\n" + "bvec2 subgroupExclusiveOr(bvec2);\n" + "bvec3 subgroupExclusiveOr(bvec3);\n" + "bvec4 subgroupExclusiveOr(bvec4);\n" + + "int subgroupExclusiveXor(int);\n" + "ivec2 subgroupExclusiveXor(ivec2);\n" + "ivec3 subgroupExclusiveXor(ivec3);\n" + "ivec4 subgroupExclusiveXor(ivec4);\n" + "uint subgroupExclusiveXor(uint);\n" + "uvec2 subgroupExclusiveXor(uvec2);\n" + "uvec3 subgroupExclusiveXor(uvec3);\n" + "uvec4 subgroupExclusiveXor(uvec4);\n" + "bool subgroupExclusiveXor(bool);\n" + "bvec2 subgroupExclusiveXor(bvec2);\n" + "bvec3 subgroupExclusiveXor(bvec3);\n" + "bvec4 subgroupExclusiveXor(bvec4);\n" + + "float subgroupClusteredAdd(float, uint);\n" + "vec2 subgroupClusteredAdd(vec2, uint);\n" + "vec3 subgroupClusteredAdd(vec3, uint);\n" + "vec4 subgroupClusteredAdd(vec4, uint);\n" + "int subgroupClusteredAdd(int, uint);\n" + "ivec2 subgroupClusteredAdd(ivec2, uint);\n" + "ivec3 subgroupClusteredAdd(ivec3, uint);\n" + "ivec4 subgroupClusteredAdd(ivec4, uint);\n" + "uint subgroupClusteredAdd(uint, uint);\n" + "uvec2 subgroupClusteredAdd(uvec2, uint);\n" + "uvec3 subgroupClusteredAdd(uvec3, uint);\n" + "uvec4 subgroupClusteredAdd(uvec4, uint);\n" + + "float subgroupClusteredMul(float, uint);\n" + "vec2 subgroupClusteredMul(vec2, uint);\n" + "vec3 subgroupClusteredMul(vec3, uint);\n" + "vec4 subgroupClusteredMul(vec4, uint);\n" + "int subgroupClusteredMul(int, uint);\n" + "ivec2 subgroupClusteredMul(ivec2, uint);\n" + "ivec3 subgroupClusteredMul(ivec3, uint);\n" + "ivec4 subgroupClusteredMul(ivec4, uint);\n" + "uint subgroupClusteredMul(uint, uint);\n" + "uvec2 subgroupClusteredMul(uvec2, uint);\n" + "uvec3 subgroupClusteredMul(uvec3, uint);\n" + "uvec4 subgroupClusteredMul(uvec4, uint);\n" + + "float subgroupClusteredMin(float, uint);\n" + "vec2 subgroupClusteredMin(vec2, uint);\n" + "vec3 subgroupClusteredMin(vec3, uint);\n" + "vec4 subgroupClusteredMin(vec4, uint);\n" + "int subgroupClusteredMin(int, uint);\n" + "ivec2 subgroupClusteredMin(ivec2, uint);\n" + "ivec3 subgroupClusteredMin(ivec3, uint);\n" + "ivec4 subgroupClusteredMin(ivec4, uint);\n" + "uint subgroupClusteredMin(uint, uint);\n" + "uvec2 subgroupClusteredMin(uvec2, uint);\n" + "uvec3 subgroupClusteredMin(uvec3, uint);\n" + "uvec4 subgroupClusteredMin(uvec4, uint);\n" + + "float subgroupClusteredMax(float, uint);\n" + "vec2 subgroupClusteredMax(vec2, uint);\n" + "vec3 subgroupClusteredMax(vec3, uint);\n" + "vec4 subgroupClusteredMax(vec4, uint);\n" + "int subgroupClusteredMax(int, uint);\n" + "ivec2 subgroupClusteredMax(ivec2, uint);\n" + "ivec3 subgroupClusteredMax(ivec3, uint);\n" + "ivec4 subgroupClusteredMax(ivec4, uint);\n" + "uint subgroupClusteredMax(uint, uint);\n" + "uvec2 subgroupClusteredMax(uvec2, uint);\n" + "uvec3 subgroupClusteredMax(uvec3, uint);\n" + "uvec4 subgroupClusteredMax(uvec4, uint);\n" + + "int subgroupClusteredAnd(int, uint);\n" + "ivec2 subgroupClusteredAnd(ivec2, uint);\n" + "ivec3 subgroupClusteredAnd(ivec3, uint);\n" + "ivec4 subgroupClusteredAnd(ivec4, uint);\n" + "uint subgroupClusteredAnd(uint, uint);\n" + "uvec2 subgroupClusteredAnd(uvec2, uint);\n" + "uvec3 subgroupClusteredAnd(uvec3, uint);\n" + "uvec4 subgroupClusteredAnd(uvec4, uint);\n" + "bool subgroupClusteredAnd(bool, uint);\n" + "bvec2 subgroupClusteredAnd(bvec2, uint);\n" + "bvec3 subgroupClusteredAnd(bvec3, uint);\n" + "bvec4 subgroupClusteredAnd(bvec4, uint);\n" + + "int subgroupClusteredOr(int, uint);\n" + "ivec2 subgroupClusteredOr(ivec2, uint);\n" + "ivec3 subgroupClusteredOr(ivec3, uint);\n" + "ivec4 subgroupClusteredOr(ivec4, uint);\n" + "uint subgroupClusteredOr(uint, uint);\n" + "uvec2 subgroupClusteredOr(uvec2, uint);\n" + "uvec3 subgroupClusteredOr(uvec3, uint);\n" + "uvec4 subgroupClusteredOr(uvec4, uint);\n" + "bool subgroupClusteredOr(bool, uint);\n" + "bvec2 subgroupClusteredOr(bvec2, uint);\n" + "bvec3 subgroupClusteredOr(bvec3, uint);\n" + "bvec4 subgroupClusteredOr(bvec4, uint);\n" + + "int subgroupClusteredXor(int, uint);\n" + "ivec2 subgroupClusteredXor(ivec2, uint);\n" + "ivec3 subgroupClusteredXor(ivec3, uint);\n" + "ivec4 subgroupClusteredXor(ivec4, uint);\n" + "uint subgroupClusteredXor(uint, uint);\n" + "uvec2 subgroupClusteredXor(uvec2, uint);\n" + "uvec3 subgroupClusteredXor(uvec3, uint);\n" + "uvec4 subgroupClusteredXor(uvec4, uint);\n" + "bool subgroupClusteredXor(bool, uint);\n" + "bvec2 subgroupClusteredXor(bvec2, uint);\n" + "bvec3 subgroupClusteredXor(bvec3, uint);\n" + "bvec4 subgroupClusteredXor(bvec4, uint);\n" + + "float subgroupQuadBroadcast(float, uint);\n" + "vec2 subgroupQuadBroadcast(vec2, uint);\n" + "vec3 subgroupQuadBroadcast(vec3, uint);\n" + "vec4 subgroupQuadBroadcast(vec4, uint);\n" + "int subgroupQuadBroadcast(int, uint);\n" + "ivec2 subgroupQuadBroadcast(ivec2, uint);\n" + "ivec3 subgroupQuadBroadcast(ivec3, uint);\n" + "ivec4 subgroupQuadBroadcast(ivec4, uint);\n" + "uint subgroupQuadBroadcast(uint, uint);\n" + "uvec2 subgroupQuadBroadcast(uvec2, uint);\n" + "uvec3 subgroupQuadBroadcast(uvec3, uint);\n" + "uvec4 subgroupQuadBroadcast(uvec4, uint);\n" + "bool subgroupQuadBroadcast(bool, uint);\n" + "bvec2 subgroupQuadBroadcast(bvec2, uint);\n" + "bvec3 subgroupQuadBroadcast(bvec3, uint);\n" + "bvec4 subgroupQuadBroadcast(bvec4, uint);\n" + + "float subgroupQuadSwapHorizontal(float);\n" + "vec2 subgroupQuadSwapHorizontal(vec2);\n" + "vec3 subgroupQuadSwapHorizontal(vec3);\n" + "vec4 subgroupQuadSwapHorizontal(vec4);\n" + "int subgroupQuadSwapHorizontal(int);\n" + "ivec2 subgroupQuadSwapHorizontal(ivec2);\n" + "ivec3 subgroupQuadSwapHorizontal(ivec3);\n" + "ivec4 subgroupQuadSwapHorizontal(ivec4);\n" + "uint subgroupQuadSwapHorizontal(uint);\n" + "uvec2 subgroupQuadSwapHorizontal(uvec2);\n" + "uvec3 subgroupQuadSwapHorizontal(uvec3);\n" + "uvec4 subgroupQuadSwapHorizontal(uvec4);\n" + "bool subgroupQuadSwapHorizontal(bool);\n" + "bvec2 subgroupQuadSwapHorizontal(bvec2);\n" + "bvec3 subgroupQuadSwapHorizontal(bvec3);\n" + "bvec4 subgroupQuadSwapHorizontal(bvec4);\n" + + "float subgroupQuadSwapVertical(float);\n" + "vec2 subgroupQuadSwapVertical(vec2);\n" + "vec3 subgroupQuadSwapVertical(vec3);\n" + "vec4 subgroupQuadSwapVertical(vec4);\n" + "int subgroupQuadSwapVertical(int);\n" + "ivec2 subgroupQuadSwapVertical(ivec2);\n" + "ivec3 subgroupQuadSwapVertical(ivec3);\n" + "ivec4 subgroupQuadSwapVertical(ivec4);\n" + "uint subgroupQuadSwapVertical(uint);\n" + "uvec2 subgroupQuadSwapVertical(uvec2);\n" + "uvec3 subgroupQuadSwapVertical(uvec3);\n" + "uvec4 subgroupQuadSwapVertical(uvec4);\n" + "bool subgroupQuadSwapVertical(bool);\n" + "bvec2 subgroupQuadSwapVertical(bvec2);\n" + "bvec3 subgroupQuadSwapVertical(bvec3);\n" + "bvec4 subgroupQuadSwapVertical(bvec4);\n" + + "float subgroupQuadSwapDiagonal(float);\n" + "vec2 subgroupQuadSwapDiagonal(vec2);\n" + "vec3 subgroupQuadSwapDiagonal(vec3);\n" + "vec4 subgroupQuadSwapDiagonal(vec4);\n" + "int subgroupQuadSwapDiagonal(int);\n" + "ivec2 subgroupQuadSwapDiagonal(ivec2);\n" + "ivec3 subgroupQuadSwapDiagonal(ivec3);\n" + "ivec4 subgroupQuadSwapDiagonal(ivec4);\n" + "uint subgroupQuadSwapDiagonal(uint);\n" + "uvec2 subgroupQuadSwapDiagonal(uvec2);\n" + "uvec3 subgroupQuadSwapDiagonal(uvec3);\n" + "uvec4 subgroupQuadSwapDiagonal(uvec4);\n" + "bool subgroupQuadSwapDiagonal(bool);\n" + "bvec2 subgroupQuadSwapDiagonal(bvec2);\n" + "bvec3 subgroupQuadSwapDiagonal(bvec3);\n" + "bvec4 subgroupQuadSwapDiagonal(bvec4);\n" + +#ifdef NV_EXTENSIONS + "uvec4 subgroupPartitionNV(float);\n" + "uvec4 subgroupPartitionNV(vec2);\n" + "uvec4 subgroupPartitionNV(vec3);\n" + "uvec4 subgroupPartitionNV(vec4);\n" + "uvec4 subgroupPartitionNV(int);\n" + "uvec4 subgroupPartitionNV(ivec2);\n" + "uvec4 subgroupPartitionNV(ivec3);\n" + "uvec4 subgroupPartitionNV(ivec4);\n" + "uvec4 subgroupPartitionNV(uint);\n" + "uvec4 subgroupPartitionNV(uvec2);\n" + "uvec4 subgroupPartitionNV(uvec3);\n" + "uvec4 subgroupPartitionNV(uvec4);\n" + "uvec4 subgroupPartitionNV(bool);\n" + "uvec4 subgroupPartitionNV(bvec2);\n" + "uvec4 subgroupPartitionNV(bvec3);\n" + "uvec4 subgroupPartitionNV(bvec4);\n" + + "float subgroupPartitionedAddNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedAddNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedAddNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedAddNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedAddNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedAddNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedAddNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedAddNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedAddNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedAddNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedAddNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedAddNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedMulNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedMulNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedMulNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedMulNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedMulNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedMulNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedMulNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedMulNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedMulNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedMulNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedMulNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedMulNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedMinNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedMinNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedMinNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedMinNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedMinNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedMinNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedMinNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedMinNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedMinNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedMinNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedMinNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedMinNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedMaxNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedMaxNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedMaxNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedMaxNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedMaxNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedMaxNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedMaxNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedMaxNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedMaxNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedMaxNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedMaxNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedMaxNV(uvec4, uvec4 ballot);\n" + + "int subgroupPartitionedAndNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedAndNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedAndNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedAndNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedAndNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedAndNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedAndNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedAndNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedAndNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedAndNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedAndNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedAndNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedOrNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedOrNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedOrNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedOrNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedOrNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedOrNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedOrNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedOrNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedOrNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedOrNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedOrNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedOrNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedXorNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedXorNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedXorNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedXorNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedXorNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedXorNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedXorNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedXorNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedXorNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedXorNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedXorNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedXorNV(bvec4, uvec4 ballot);\n" + + "float subgroupPartitionedInclusiveAddNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedInclusiveAddNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedInclusiveAddNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedInclusiveAddNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedInclusiveAddNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveAddNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveAddNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveAddNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveAddNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveAddNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveAddNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveAddNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedInclusiveMulNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedInclusiveMulNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedInclusiveMulNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedInclusiveMulNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedInclusiveMulNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveMulNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveMulNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveMulNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveMulNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveMulNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveMulNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveMulNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedInclusiveMinNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedInclusiveMinNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedInclusiveMinNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedInclusiveMinNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedInclusiveMinNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveMinNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveMinNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveMinNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveMinNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveMinNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveMinNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveMinNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedInclusiveMaxNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedInclusiveMaxNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedInclusiveMaxNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedInclusiveMaxNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedInclusiveMaxNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveMaxNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveMaxNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveMaxNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveMaxNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveMaxNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveMaxNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveMaxNV(uvec4, uvec4 ballot);\n" + + "int subgroupPartitionedInclusiveAndNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveAndNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveAndNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveAndNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveAndNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveAndNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveAndNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveAndNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedInclusiveAndNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedInclusiveAndNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedInclusiveAndNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedInclusiveAndNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedInclusiveOrNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveOrNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveOrNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveOrNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveOrNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveOrNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveOrNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveOrNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedInclusiveOrNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedInclusiveOrNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedInclusiveOrNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedInclusiveOrNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedInclusiveXorNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedInclusiveXorNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedInclusiveXorNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedInclusiveXorNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedInclusiveXorNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedInclusiveXorNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedInclusiveXorNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedInclusiveXorNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedInclusiveXorNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedInclusiveXorNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedInclusiveXorNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedInclusiveXorNV(bvec4, uvec4 ballot);\n" + + "float subgroupPartitionedExclusiveAddNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedExclusiveAddNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedExclusiveAddNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedExclusiveAddNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedExclusiveAddNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveAddNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveAddNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveAddNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveAddNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveAddNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveAddNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveAddNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedExclusiveMulNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedExclusiveMulNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedExclusiveMulNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedExclusiveMulNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedExclusiveMulNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveMulNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveMulNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveMulNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveMulNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveMulNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveMulNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveMulNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedExclusiveMinNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedExclusiveMinNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedExclusiveMinNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedExclusiveMinNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedExclusiveMinNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveMinNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveMinNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveMinNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveMinNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveMinNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveMinNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveMinNV(uvec4, uvec4 ballot);\n" + + "float subgroupPartitionedExclusiveMaxNV(float, uvec4 ballot);\n" + "vec2 subgroupPartitionedExclusiveMaxNV(vec2, uvec4 ballot);\n" + "vec3 subgroupPartitionedExclusiveMaxNV(vec3, uvec4 ballot);\n" + "vec4 subgroupPartitionedExclusiveMaxNV(vec4, uvec4 ballot);\n" + "int subgroupPartitionedExclusiveMaxNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveMaxNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveMaxNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveMaxNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveMaxNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveMaxNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveMaxNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveMaxNV(uvec4, uvec4 ballot);\n" + + "int subgroupPartitionedExclusiveAndNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveAndNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveAndNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveAndNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveAndNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveAndNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveAndNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveAndNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedExclusiveAndNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedExclusiveAndNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedExclusiveAndNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedExclusiveAndNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedExclusiveOrNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveOrNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveOrNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveOrNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveOrNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveOrNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveOrNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveOrNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedExclusiveOrNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedExclusiveOrNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedExclusiveOrNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedExclusiveOrNV(bvec4, uvec4 ballot);\n" + + "int subgroupPartitionedExclusiveXorNV(int, uvec4 ballot);\n" + "ivec2 subgroupPartitionedExclusiveXorNV(ivec2, uvec4 ballot);\n" + "ivec3 subgroupPartitionedExclusiveXorNV(ivec3, uvec4 ballot);\n" + "ivec4 subgroupPartitionedExclusiveXorNV(ivec4, uvec4 ballot);\n" + "uint subgroupPartitionedExclusiveXorNV(uint, uvec4 ballot);\n" + "uvec2 subgroupPartitionedExclusiveXorNV(uvec2, uvec4 ballot);\n" + "uvec3 subgroupPartitionedExclusiveXorNV(uvec3, uvec4 ballot);\n" + "uvec4 subgroupPartitionedExclusiveXorNV(uvec4, uvec4 ballot);\n" + "bool subgroupPartitionedExclusiveXorNV(bool, uvec4 ballot);\n" + "bvec2 subgroupPartitionedExclusiveXorNV(bvec2, uvec4 ballot);\n" + "bvec3 subgroupPartitionedExclusiveXorNV(bvec3, uvec4 ballot);\n" + "bvec4 subgroupPartitionedExclusiveXorNV(bvec4, uvec4 ballot);\n" +#endif + + "\n"); + + if (profile != EEsProfile && version >= 400) { + commonBuiltins.append( + "bool subgroupAllEqual(double);\n" + "bool subgroupAllEqual(dvec2);\n" + "bool subgroupAllEqual(dvec3);\n" + "bool subgroupAllEqual(dvec4);\n" + + "double subgroupBroadcast(double, uint);\n" + "dvec2 subgroupBroadcast(dvec2, uint);\n" + "dvec3 subgroupBroadcast(dvec3, uint);\n" + "dvec4 subgroupBroadcast(dvec4, uint);\n" + + "double subgroupBroadcastFirst(double);\n" + "dvec2 subgroupBroadcastFirst(dvec2);\n" + "dvec3 subgroupBroadcastFirst(dvec3);\n" + "dvec4 subgroupBroadcastFirst(dvec4);\n" + + "double subgroupShuffle(double, uint);\n" + "dvec2 subgroupShuffle(dvec2, uint);\n" + "dvec3 subgroupShuffle(dvec3, uint);\n" + "dvec4 subgroupShuffle(dvec4, uint);\n" + + "double subgroupShuffleXor(double, uint);\n" + "dvec2 subgroupShuffleXor(dvec2, uint);\n" + "dvec3 subgroupShuffleXor(dvec3, uint);\n" + "dvec4 subgroupShuffleXor(dvec4, uint);\n" + + "double subgroupShuffleUp(double, uint delta);\n" + "dvec2 subgroupShuffleUp(dvec2, uint delta);\n" + "dvec3 subgroupShuffleUp(dvec3, uint delta);\n" + "dvec4 subgroupShuffleUp(dvec4, uint delta);\n" + + "double subgroupShuffleDown(double, uint delta);\n" + "dvec2 subgroupShuffleDown(dvec2, uint delta);\n" + "dvec3 subgroupShuffleDown(dvec3, uint delta);\n" + "dvec4 subgroupShuffleDown(dvec4, uint delta);\n" + + "double subgroupAdd(double);\n" + "dvec2 subgroupAdd(dvec2);\n" + "dvec3 subgroupAdd(dvec3);\n" + "dvec4 subgroupAdd(dvec4);\n" + + "double subgroupMul(double);\n" + "dvec2 subgroupMul(dvec2);\n" + "dvec3 subgroupMul(dvec3);\n" + "dvec4 subgroupMul(dvec4);\n" + + "double subgroupMin(double);\n" + "dvec2 subgroupMin(dvec2);\n" + "dvec3 subgroupMin(dvec3);\n" + "dvec4 subgroupMin(dvec4);\n" + + "double subgroupMax(double);\n" + "dvec2 subgroupMax(dvec2);\n" + "dvec3 subgroupMax(dvec3);\n" + "dvec4 subgroupMax(dvec4);\n" + + "double subgroupInclusiveAdd(double);\n" + "dvec2 subgroupInclusiveAdd(dvec2);\n" + "dvec3 subgroupInclusiveAdd(dvec3);\n" + "dvec4 subgroupInclusiveAdd(dvec4);\n" + + "double subgroupInclusiveMul(double);\n" + "dvec2 subgroupInclusiveMul(dvec2);\n" + "dvec3 subgroupInclusiveMul(dvec3);\n" + "dvec4 subgroupInclusiveMul(dvec4);\n" + + "double subgroupInclusiveMin(double);\n" + "dvec2 subgroupInclusiveMin(dvec2);\n" + "dvec3 subgroupInclusiveMin(dvec3);\n" + "dvec4 subgroupInclusiveMin(dvec4);\n" + + "double subgroupInclusiveMax(double);\n" + "dvec2 subgroupInclusiveMax(dvec2);\n" + "dvec3 subgroupInclusiveMax(dvec3);\n" + "dvec4 subgroupInclusiveMax(dvec4);\n" + + "double subgroupExclusiveAdd(double);\n" + "dvec2 subgroupExclusiveAdd(dvec2);\n" + "dvec3 subgroupExclusiveAdd(dvec3);\n" + "dvec4 subgroupExclusiveAdd(dvec4);\n" + + "double subgroupExclusiveMul(double);\n" + "dvec2 subgroupExclusiveMul(dvec2);\n" + "dvec3 subgroupExclusiveMul(dvec3);\n" + "dvec4 subgroupExclusiveMul(dvec4);\n" + + "double subgroupExclusiveMin(double);\n" + "dvec2 subgroupExclusiveMin(dvec2);\n" + "dvec3 subgroupExclusiveMin(dvec3);\n" + "dvec4 subgroupExclusiveMin(dvec4);\n" + + "double subgroupExclusiveMax(double);\n" + "dvec2 subgroupExclusiveMax(dvec2);\n" + "dvec3 subgroupExclusiveMax(dvec3);\n" + "dvec4 subgroupExclusiveMax(dvec4);\n" + + "double subgroupClusteredAdd(double, uint);\n" + "dvec2 subgroupClusteredAdd(dvec2, uint);\n" + "dvec3 subgroupClusteredAdd(dvec3, uint);\n" + "dvec4 subgroupClusteredAdd(dvec4, uint);\n" + + "double subgroupClusteredMul(double, uint);\n" + "dvec2 subgroupClusteredMul(dvec2, uint);\n" + "dvec3 subgroupClusteredMul(dvec3, uint);\n" + "dvec4 subgroupClusteredMul(dvec4, uint);\n" + + "double subgroupClusteredMin(double, uint);\n" + "dvec2 subgroupClusteredMin(dvec2, uint);\n" + "dvec3 subgroupClusteredMin(dvec3, uint);\n" + "dvec4 subgroupClusteredMin(dvec4, uint);\n" + + "double subgroupClusteredMax(double, uint);\n" + "dvec2 subgroupClusteredMax(dvec2, uint);\n" + "dvec3 subgroupClusteredMax(dvec3, uint);\n" + "dvec4 subgroupClusteredMax(dvec4, uint);\n" + + "double subgroupQuadBroadcast(double, uint);\n" + "dvec2 subgroupQuadBroadcast(dvec2, uint);\n" + "dvec3 subgroupQuadBroadcast(dvec3, uint);\n" + "dvec4 subgroupQuadBroadcast(dvec4, uint);\n" + + "double subgroupQuadSwapHorizontal(double);\n" + "dvec2 subgroupQuadSwapHorizontal(dvec2);\n" + "dvec3 subgroupQuadSwapHorizontal(dvec3);\n" + "dvec4 subgroupQuadSwapHorizontal(dvec4);\n" + + "double subgroupQuadSwapVertical(double);\n" + "dvec2 subgroupQuadSwapVertical(dvec2);\n" + "dvec3 subgroupQuadSwapVertical(dvec3);\n" + "dvec4 subgroupQuadSwapVertical(dvec4);\n" + + "double subgroupQuadSwapDiagonal(double);\n" + "dvec2 subgroupQuadSwapDiagonal(dvec2);\n" + "dvec3 subgroupQuadSwapDiagonal(dvec3);\n" + "dvec4 subgroupQuadSwapDiagonal(dvec4);\n" + + +#ifdef NV_EXTENSIONS + "uvec4 subgroupPartitionNV(double);\n" + "uvec4 subgroupPartitionNV(dvec2);\n" + "uvec4 subgroupPartitionNV(dvec3);\n" + "uvec4 subgroupPartitionNV(dvec4);\n" + + "double subgroupPartitionedAddNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedAddNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedAddNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedAddNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedMulNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedMulNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedMulNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedMulNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedMinNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedMinNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedMinNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedMinNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedMaxNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedMaxNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedMaxNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedMaxNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedInclusiveAddNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedInclusiveAddNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedInclusiveAddNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedInclusiveAddNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedInclusiveMulNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedInclusiveMulNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedInclusiveMulNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedInclusiveMulNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedInclusiveMinNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedInclusiveMinNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedInclusiveMinNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedInclusiveMinNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedInclusiveMaxNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedInclusiveMaxNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedInclusiveMaxNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedInclusiveMaxNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedExclusiveAddNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedExclusiveAddNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedExclusiveAddNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedExclusiveAddNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedExclusiveMulNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedExclusiveMulNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedExclusiveMulNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedExclusiveMulNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedExclusiveMinNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedExclusiveMinNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedExclusiveMinNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedExclusiveMinNV(dvec4, uvec4 ballot);\n" + + "double subgroupPartitionedExclusiveMaxNV(double, uvec4 ballot);\n" + "dvec2 subgroupPartitionedExclusiveMaxNV(dvec2, uvec4 ballot);\n" + "dvec3 subgroupPartitionedExclusiveMaxNV(dvec3, uvec4 ballot);\n" + "dvec4 subgroupPartitionedExclusiveMaxNV(dvec4, uvec4 ballot);\n" +#endif + + "\n"); + } + + stageBuiltins[EShLangCompute].append( + "void subgroupMemoryBarrierShared();" + + "\n" + ); + } + if (profile != EEsProfile && version >= 460) { commonBuiltins.append( "bool anyInvocation(bool);" @@ -1675,6 +2793,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsAMD(f16vec3);" "f16vec4 minInvocationsAMD(f16vec4);" + "int16_t minInvocationsAMD(int16_t);" + "i16vec2 minInvocationsAMD(i16vec2);" + "i16vec3 minInvocationsAMD(i16vec3);" + "i16vec4 minInvocationsAMD(i16vec4);" + + "uint16_t minInvocationsAMD(uint16_t);" + "u16vec2 minInvocationsAMD(u16vec2);" + "u16vec3 minInvocationsAMD(u16vec3);" + "u16vec4 minInvocationsAMD(u16vec4);" + "float minInvocationsInclusiveScanAMD(float);" "vec2 minInvocationsInclusiveScanAMD(vec2);" "vec3 minInvocationsInclusiveScanAMD(vec3);" @@ -1710,6 +2838,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 minInvocationsInclusiveScanAMD(f16vec4);" + "int16_t minInvocationsInclusiveScanAMD(int16_t);" + "i16vec2 minInvocationsInclusiveScanAMD(i16vec2);" + "i16vec3 minInvocationsInclusiveScanAMD(i16vec3);" + "i16vec4 minInvocationsInclusiveScanAMD(i16vec4);" + + "uint16_t minInvocationsInclusiveScanAMD(uint16_t);" + "u16vec2 minInvocationsInclusiveScanAMD(u16vec2);" + "u16vec3 minInvocationsInclusiveScanAMD(u16vec3);" + "u16vec4 minInvocationsInclusiveScanAMD(u16vec4);" + "float minInvocationsExclusiveScanAMD(float);" "vec2 minInvocationsExclusiveScanAMD(vec2);" "vec3 minInvocationsExclusiveScanAMD(vec3);" @@ -1745,6 +2883,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 minInvocationsExclusiveScanAMD(f16vec4);" + "int16_t minInvocationsExclusiveScanAMD(int16_t);" + "i16vec2 minInvocationsExclusiveScanAMD(i16vec2);" + "i16vec3 minInvocationsExclusiveScanAMD(i16vec3);" + "i16vec4 minInvocationsExclusiveScanAMD(i16vec4);" + + "uint16_t minInvocationsExclusiveScanAMD(uint16_t);" + "u16vec2 minInvocationsExclusiveScanAMD(u16vec2);" + "u16vec3 minInvocationsExclusiveScanAMD(u16vec3);" + "u16vec4 minInvocationsExclusiveScanAMD(u16vec4);" + "float maxInvocationsAMD(float);" "vec2 maxInvocationsAMD(vec2);" "vec3 maxInvocationsAMD(vec3);" @@ -1780,6 +2928,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsAMD(f16vec3);" "f16vec4 maxInvocationsAMD(f16vec4);" + "int16_t maxInvocationsAMD(int16_t);" + "i16vec2 maxInvocationsAMD(i16vec2);" + "i16vec3 maxInvocationsAMD(i16vec3);" + "i16vec4 maxInvocationsAMD(i16vec4);" + + "uint16_t maxInvocationsAMD(uint16_t);" + "u16vec2 maxInvocationsAMD(u16vec2);" + "u16vec3 maxInvocationsAMD(u16vec3);" + "u16vec4 maxInvocationsAMD(u16vec4);" + "float maxInvocationsInclusiveScanAMD(float);" "vec2 maxInvocationsInclusiveScanAMD(vec2);" "vec3 maxInvocationsInclusiveScanAMD(vec3);" @@ -1815,6 +2973,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 maxInvocationsInclusiveScanAMD(f16vec4);" + "int16_t maxInvocationsInclusiveScanAMD(int16_t);" + "i16vec2 maxInvocationsInclusiveScanAMD(i16vec2);" + "i16vec3 maxInvocationsInclusiveScanAMD(i16vec3);" + "i16vec4 maxInvocationsInclusiveScanAMD(i16vec4);" + + "uint16_t maxInvocationsInclusiveScanAMD(uint16_t);" + "u16vec2 maxInvocationsInclusiveScanAMD(u16vec2);" + "u16vec3 maxInvocationsInclusiveScanAMD(u16vec3);" + "u16vec4 maxInvocationsInclusiveScanAMD(u16vec4);" + "float maxInvocationsExclusiveScanAMD(float);" "vec2 maxInvocationsExclusiveScanAMD(vec2);" "vec3 maxInvocationsExclusiveScanAMD(vec3);" @@ -1850,6 +3018,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 maxInvocationsExclusiveScanAMD(f16vec4);" + "int16_t maxInvocationsExclusiveScanAMD(int16_t);" + "i16vec2 maxInvocationsExclusiveScanAMD(i16vec2);" + "i16vec3 maxInvocationsExclusiveScanAMD(i16vec3);" + "i16vec4 maxInvocationsExclusiveScanAMD(i16vec4);" + + "uint16_t maxInvocationsExclusiveScanAMD(uint16_t);" + "u16vec2 maxInvocationsExclusiveScanAMD(u16vec2);" + "u16vec3 maxInvocationsExclusiveScanAMD(u16vec3);" + "u16vec4 maxInvocationsExclusiveScanAMD(u16vec4);" + "float addInvocationsAMD(float);" "vec2 addInvocationsAMD(vec2);" "vec3 addInvocationsAMD(vec3);" @@ -1885,6 +3063,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsAMD(f16vec3);" "f16vec4 addInvocationsAMD(f16vec4);" + "int16_t addInvocationsAMD(int16_t);" + "i16vec2 addInvocationsAMD(i16vec2);" + "i16vec3 addInvocationsAMD(i16vec3);" + "i16vec4 addInvocationsAMD(i16vec4);" + + "uint16_t addInvocationsAMD(uint16_t);" + "u16vec2 addInvocationsAMD(u16vec2);" + "u16vec3 addInvocationsAMD(u16vec3);" + "u16vec4 addInvocationsAMD(u16vec4);" + "float addInvocationsInclusiveScanAMD(float);" "vec2 addInvocationsInclusiveScanAMD(vec2);" "vec3 addInvocationsInclusiveScanAMD(vec3);" @@ -1920,6 +3108,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 addInvocationsInclusiveScanAMD(f16vec4);" + "int16_t addInvocationsInclusiveScanAMD(int16_t);" + "i16vec2 addInvocationsInclusiveScanAMD(i16vec2);" + "i16vec3 addInvocationsInclusiveScanAMD(i16vec3);" + "i16vec4 addInvocationsInclusiveScanAMD(i16vec4);" + + "uint16_t addInvocationsInclusiveScanAMD(uint16_t);" + "u16vec2 addInvocationsInclusiveScanAMD(u16vec2);" + "u16vec3 addInvocationsInclusiveScanAMD(u16vec3);" + "u16vec4 addInvocationsInclusiveScanAMD(u16vec4);" + "float addInvocationsExclusiveScanAMD(float);" "vec2 addInvocationsExclusiveScanAMD(vec2);" "vec3 addInvocationsExclusiveScanAMD(vec3);" @@ -1955,6 +3153,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 addInvocationsExclusiveScanAMD(f16vec4);" + "int16_t addInvocationsExclusiveScanAMD(int16_t);" + "i16vec2 addInvocationsExclusiveScanAMD(i16vec2);" + "i16vec3 addInvocationsExclusiveScanAMD(i16vec3);" + "i16vec4 addInvocationsExclusiveScanAMD(i16vec4);" + + "uint16_t addInvocationsExclusiveScanAMD(uint16_t);" + "u16vec2 addInvocationsExclusiveScanAMD(u16vec2);" + "u16vec3 addInvocationsExclusiveScanAMD(u16vec3);" + "u16vec4 addInvocationsExclusiveScanAMD(u16vec4);" + "float minInvocationsNonUniformAMD(float);" "vec2 minInvocationsNonUniformAMD(vec2);" "vec3 minInvocationsNonUniformAMD(vec3);" @@ -1990,6 +3198,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsNonUniformAMD(f16vec3);" "f16vec4 minInvocationsNonUniformAMD(f16vec4);" + "int16_t minInvocationsNonUniformAMD(int16_t);" + "i16vec2 minInvocationsNonUniformAMD(i16vec2);" + "i16vec3 minInvocationsNonUniformAMD(i16vec3);" + "i16vec4 minInvocationsNonUniformAMD(i16vec4);" + + "uint16_t minInvocationsNonUniformAMD(uint16_t);" + "u16vec2 minInvocationsNonUniformAMD(u16vec2);" + "u16vec3 minInvocationsNonUniformAMD(u16vec3);" + "u16vec4 minInvocationsNonUniformAMD(u16vec4);" + "float minInvocationsInclusiveScanNonUniformAMD(float);" "vec2 minInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 minInvocationsInclusiveScanNonUniformAMD(vec3);" @@ -2025,6 +3243,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 minInvocationsInclusiveScanNonUniformAMD(f16vec4);" + "int16_t minInvocationsInclusiveScanNonUniformAMD(int16_t);" + "i16vec2 minInvocationsInclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 minInvocationsInclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 minInvocationsInclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t minInvocationsInclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 minInvocationsInclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 minInvocationsInclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 minInvocationsInclusiveScanNonUniformAMD(u16vec4);" + "float minInvocationsExclusiveScanNonUniformAMD(float);" "vec2 minInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 minInvocationsExclusiveScanNonUniformAMD(vec3);" @@ -2060,6 +3288,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 minInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 minInvocationsExclusiveScanNonUniformAMD(f16vec4);" + "int16_t minInvocationsExclusiveScanNonUniformAMD(int16_t);" + "i16vec2 minInvocationsExclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 minInvocationsExclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 minInvocationsExclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t minInvocationsExclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 minInvocationsExclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 minInvocationsExclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 minInvocationsExclusiveScanNonUniformAMD(u16vec4);" + "float maxInvocationsNonUniformAMD(float);" "vec2 maxInvocationsNonUniformAMD(vec2);" "vec3 maxInvocationsNonUniformAMD(vec3);" @@ -2095,6 +3333,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsNonUniformAMD(f16vec4);" + "int16_t maxInvocationsNonUniformAMD(int16_t);" + "i16vec2 maxInvocationsNonUniformAMD(i16vec2);" + "i16vec3 maxInvocationsNonUniformAMD(i16vec3);" + "i16vec4 maxInvocationsNonUniformAMD(i16vec4);" + + "uint16_t maxInvocationsNonUniformAMD(uint16_t);" + "u16vec2 maxInvocationsNonUniformAMD(u16vec2);" + "u16vec3 maxInvocationsNonUniformAMD(u16vec3);" + "u16vec4 maxInvocationsNonUniformAMD(u16vec4);" + "float maxInvocationsInclusiveScanNonUniformAMD(float);" "vec2 maxInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 maxInvocationsInclusiveScanNonUniformAMD(vec3);" @@ -2130,6 +3378,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsInclusiveScanNonUniformAMD(f16vec4);" + "int16_t maxInvocationsInclusiveScanNonUniformAMD(int16_t);" + "i16vec2 maxInvocationsInclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 maxInvocationsInclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 maxInvocationsInclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t maxInvocationsInclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 maxInvocationsInclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 maxInvocationsInclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 maxInvocationsInclusiveScanNonUniformAMD(u16vec4);" + "float maxInvocationsExclusiveScanNonUniformAMD(float);" "vec2 maxInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 maxInvocationsExclusiveScanNonUniformAMD(vec3);" @@ -2165,6 +3423,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 maxInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsExclusiveScanNonUniformAMD(f16vec4);" + "int16_t maxInvocationsExclusiveScanNonUniformAMD(int16_t);" + "i16vec2 maxInvocationsExclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 maxInvocationsExclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 maxInvocationsExclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t maxInvocationsExclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 maxInvocationsExclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 maxInvocationsExclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 maxInvocationsExclusiveScanNonUniformAMD(u16vec4);" + "float addInvocationsNonUniformAMD(float);" "vec2 addInvocationsNonUniformAMD(vec2);" "vec3 addInvocationsNonUniformAMD(vec3);" @@ -2200,6 +3468,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsNonUniformAMD(f16vec3);" "f16vec4 addInvocationsNonUniformAMD(f16vec4);" + "int16_t addInvocationsNonUniformAMD(int16_t);" + "i16vec2 addInvocationsNonUniformAMD(i16vec2);" + "i16vec3 addInvocationsNonUniformAMD(i16vec3);" + "i16vec4 addInvocationsNonUniformAMD(i16vec4);" + + "uint16_t addInvocationsNonUniformAMD(uint16_t);" + "u16vec2 addInvocationsNonUniformAMD(u16vec2);" + "u16vec3 addInvocationsNonUniformAMD(u16vec3);" + "u16vec4 addInvocationsNonUniformAMD(u16vec4);" + "float addInvocationsInclusiveScanNonUniformAMD(float);" "vec2 addInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 addInvocationsInclusiveScanNonUniformAMD(vec3);" @@ -2235,6 +3513,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 addInvocationsInclusiveScanNonUniformAMD(f16vec4);" + "int16_t addInvocationsInclusiveScanNonUniformAMD(int16_t);" + "i16vec2 addInvocationsInclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 addInvocationsInclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 addInvocationsInclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t addInvocationsInclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 addInvocationsInclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 addInvocationsInclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 addInvocationsInclusiveScanNonUniformAMD(u16vec4);" + "float addInvocationsExclusiveScanNonUniformAMD(float);" "vec2 addInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 addInvocationsExclusiveScanNonUniformAMD(vec3);" @@ -2270,6 +3558,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 addInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 addInvocationsExclusiveScanNonUniformAMD(f16vec4);" + "int16_t addInvocationsExclusiveScanNonUniformAMD(int16_t);" + "i16vec2 addInvocationsExclusiveScanNonUniformAMD(i16vec2);" + "i16vec3 addInvocationsExclusiveScanNonUniformAMD(i16vec3);" + "i16vec4 addInvocationsExclusiveScanNonUniformAMD(i16vec4);" + + "uint16_t addInvocationsExclusiveScanNonUniformAMD(uint16_t);" + "u16vec2 addInvocationsExclusiveScanNonUniformAMD(u16vec2);" + "u16vec3 addInvocationsExclusiveScanNonUniformAMD(u16vec3);" + "u16vec4 addInvocationsExclusiveScanNonUniformAMD(u16vec4);" + "float swizzleInvocationsAMD(float, uvec4);" "vec2 swizzleInvocationsAMD(vec2, uvec4);" "vec3 swizzleInvocationsAMD(vec3, uvec4);" @@ -2330,7 +3628,31 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - // GL_AMD_gpu_shader_half_float + // GL_AMD_shader_fragment_mask + if (profile != EEsProfile && version >= 450) { + commonBuiltins.append( + "uint fragmentMaskFetchAMD(sampler2DMS, ivec2);" + "uint fragmentMaskFetchAMD(isampler2DMS, ivec2);" + "uint fragmentMaskFetchAMD(usampler2DMS, ivec2);" + + "uint fragmentMaskFetchAMD(sampler2DMSArray, ivec3);" + "uint fragmentMaskFetchAMD(isampler2DMSArray, ivec3);" + "uint fragmentMaskFetchAMD(usampler2DMSArray, ivec3);" + + "vec4 fragmentFetchAMD(sampler2DMS, ivec2, uint);" + "ivec4 fragmentFetchAMD(isampler2DMS, ivec2, uint);" + "uvec4 fragmentFetchAMD(usampler2DMS, ivec2, uint);" + + "vec4 fragmentFetchAMD(sampler2DMSArray, ivec3, uint);" + "ivec4 fragmentFetchAMD(isampler2DMSArray, ivec3, uint);" + "uvec4 fragmentFetchAMD(usampler2DMSArray, ivec3, uint);" + + "\n"); + } + +#endif // AMD_EXTENSIONS + + // GL_AMD_gpu_shader_half_float/Explicit types if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "float16_t radians(float16_t);" @@ -2678,9 +4000,168 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - // GL_AMD_gpu_shader_int16 + // Explicit types if (profile != EEsProfile && version >= 450) { commonBuiltins.append( + "int8_t abs(int8_t);" + "i8vec2 abs(i8vec2);" + "i8vec3 abs(i8vec3);" + "i8vec4 abs(i8vec4);" + + "int8_t sign(int8_t);" + "i8vec2 sign(i8vec2);" + "i8vec3 sign(i8vec3);" + "i8vec4 sign(i8vec4);" + + "int8_t min(int8_t x, int8_t y);" + "i8vec2 min(i8vec2 x, int8_t y);" + "i8vec3 min(i8vec3 x, int8_t y);" + "i8vec4 min(i8vec4 x, int8_t y);" + "i8vec2 min(i8vec2 x, i8vec2 y);" + "i8vec3 min(i8vec3 x, i8vec3 y);" + "i8vec4 min(i8vec4 x, i8vec4 y);" + + "uint8_t min(uint8_t x, uint8_t y);" + "u8vec2 min(u8vec2 x, uint8_t y);" + "u8vec3 min(u8vec3 x, uint8_t y);" + "u8vec4 min(u8vec4 x, uint8_t y);" + "u8vec2 min(u8vec2 x, u8vec2 y);" + "u8vec3 min(u8vec3 x, u8vec3 y);" + "u8vec4 min(u8vec4 x, u8vec4 y);" + + "int8_t max(int8_t x, int8_t y);" + "i8vec2 max(i8vec2 x, int8_t y);" + "i8vec3 max(i8vec3 x, int8_t y);" + "i8vec4 max(i8vec4 x, int8_t y);" + "i8vec2 max(i8vec2 x, i8vec2 y);" + "i8vec3 max(i8vec3 x, i8vec3 y);" + "i8vec4 max(i8vec4 x, i8vec4 y);" + + "uint8_t max(uint8_t x, uint8_t y);" + "u8vec2 max(u8vec2 x, uint8_t y);" + "u8vec3 max(u8vec3 x, uint8_t y);" + "u8vec4 max(u8vec4 x, uint8_t y);" + "u8vec2 max(u8vec2 x, u8vec2 y);" + "u8vec3 max(u8vec3 x, u8vec3 y);" + "u8vec4 max(u8vec4 x, u8vec4 y);" + + "int8_t clamp(int8_t x, int8_t minVal, int8_t maxVal);" + "i8vec2 clamp(i8vec2 x, int8_t minVal, int8_t maxVal);" + "i8vec3 clamp(i8vec3 x, int8_t minVal, int8_t maxVal);" + "i8vec4 clamp(i8vec4 x, int8_t minVal, int8_t maxVal);" + "i8vec2 clamp(i8vec2 x, i8vec2 minVal, i8vec2 maxVal);" + "i8vec3 clamp(i8vec3 x, i8vec3 minVal, i8vec3 maxVal);" + "i8vec4 clamp(i8vec4 x, i8vec4 minVal, i8vec4 maxVal);" + + "uint8_t clamp(uint8_t x, uint8_t minVal, uint8_t maxVal);" + "u8vec2 clamp(u8vec2 x, uint8_t minVal, uint8_t maxVal);" + "u8vec3 clamp(u8vec3 x, uint8_t minVal, uint8_t maxVal);" + "u8vec4 clamp(u8vec4 x, uint8_t minVal, uint8_t maxVal);" + "u8vec2 clamp(u8vec2 x, u8vec2 minVal, u8vec2 maxVal);" + "u8vec3 clamp(u8vec3 x, u8vec3 minVal, u8vec3 maxVal);" + "u8vec4 clamp(u8vec4 x, u8vec4 minVal, u8vec4 maxVal);" + + "int8_t mix(int8_t, int8_t, bool);" + "i8vec2 mix(i8vec2, i8vec2, bvec2);" + "i8vec3 mix(i8vec3, i8vec3, bvec3);" + "i8vec4 mix(i8vec4, i8vec4, bvec4);" + "uint8_t mix(uint8_t, uint8_t, bool);" + "u8vec2 mix(u8vec2, u8vec2, bvec2);" + "u8vec3 mix(u8vec3, u8vec3, bvec3);" + "u8vec4 mix(u8vec4, u8vec4, bvec4);" + + "bvec2 lessThan(i8vec2, i8vec2);" + "bvec3 lessThan(i8vec3, i8vec3);" + "bvec4 lessThan(i8vec4, i8vec4);" + "bvec2 lessThan(u8vec2, u8vec2);" + "bvec3 lessThan(u8vec3, u8vec3);" + "bvec4 lessThan(u8vec4, u8vec4);" + + "bvec2 lessThanEqual(i8vec2, i8vec2);" + "bvec3 lessThanEqual(i8vec3, i8vec3);" + "bvec4 lessThanEqual(i8vec4, i8vec4);" + "bvec2 lessThanEqual(u8vec2, u8vec2);" + "bvec3 lessThanEqual(u8vec3, u8vec3);" + "bvec4 lessThanEqual(u8vec4, u8vec4);" + + "bvec2 greaterThan(i8vec2, i8vec2);" + "bvec3 greaterThan(i8vec3, i8vec3);" + "bvec4 greaterThan(i8vec4, i8vec4);" + "bvec2 greaterThan(u8vec2, u8vec2);" + "bvec3 greaterThan(u8vec3, u8vec3);" + "bvec4 greaterThan(u8vec4, u8vec4);" + + "bvec2 greaterThanEqual(i8vec2, i8vec2);" + "bvec3 greaterThanEqual(i8vec3, i8vec3);" + "bvec4 greaterThanEqual(i8vec4, i8vec4);" + "bvec2 greaterThanEqual(u8vec2, u8vec2);" + "bvec3 greaterThanEqual(u8vec3, u8vec3);" + "bvec4 greaterThanEqual(u8vec4, u8vec4);" + + "bvec2 equal(i8vec2, i8vec2);" + "bvec3 equal(i8vec3, i8vec3);" + "bvec4 equal(i8vec4, i8vec4);" + "bvec2 equal(u8vec2, u8vec2);" + "bvec3 equal(u8vec3, u8vec3);" + "bvec4 equal(u8vec4, u8vec4);" + + "bvec2 notEqual(i8vec2, i8vec2);" + "bvec3 notEqual(i8vec3, i8vec3);" + "bvec4 notEqual(i8vec4, i8vec4);" + "bvec2 notEqual(u8vec2, u8vec2);" + "bvec3 notEqual(u8vec3, u8vec3);" + "bvec4 notEqual(u8vec4, u8vec4);" + + " int8_t bitfieldExtract( int8_t, int8_t, int8_t);" + "i8vec2 bitfieldExtract(i8vec2, int8_t, int8_t);" + "i8vec3 bitfieldExtract(i8vec3, int8_t, int8_t);" + "i8vec4 bitfieldExtract(i8vec4, int8_t, int8_t);" + + " uint8_t bitfieldExtract( uint8_t, int8_t, int8_t);" + "u8vec2 bitfieldExtract(u8vec2, int8_t, int8_t);" + "u8vec3 bitfieldExtract(u8vec3, int8_t, int8_t);" + "u8vec4 bitfieldExtract(u8vec4, int8_t, int8_t);" + + " int8_t bitfieldInsert( int8_t base, int8_t, int8_t, int8_t);" + "i8vec2 bitfieldInsert(i8vec2 base, i8vec2, int8_t, int8_t);" + "i8vec3 bitfieldInsert(i8vec3 base, i8vec3, int8_t, int8_t);" + "i8vec4 bitfieldInsert(i8vec4 base, i8vec4, int8_t, int8_t);" + + " uint8_t bitfieldInsert( uint8_t base, uint8_t, int8_t, int8_t);" + "u8vec2 bitfieldInsert(u8vec2 base, u8vec2, int8_t, int8_t);" + "u8vec3 bitfieldInsert(u8vec3 base, u8vec3, int8_t, int8_t);" + "u8vec4 bitfieldInsert(u8vec4 base, u8vec4, int8_t, int8_t);" + + " int8_t bitCount( int8_t);" + "i8vec2 bitCount(i8vec2);" + "i8vec3 bitCount(i8vec3);" + "i8vec4 bitCount(i8vec4);" + + " int8_t bitCount( uint8_t);" + "i8vec2 bitCount(u8vec2);" + "i8vec3 bitCount(u8vec3);" + "i8vec4 bitCount(u8vec4);" + + " int8_t findLSB( int8_t);" + "i8vec2 findLSB(i8vec2);" + "i8vec3 findLSB(i8vec3);" + "i8vec4 findLSB(i8vec4);" + + " int8_t findLSB( uint8_t);" + "i8vec2 findLSB(u8vec2);" + "i8vec3 findLSB(u8vec3);" + "i8vec4 findLSB(u8vec4);" + + " int8_t findMSB( int8_t);" + "i8vec2 findMSB(i8vec2);" + "i8vec3 findMSB(i8vec3);" + "i8vec4 findMSB(i8vec4);" + + " int8_t findMSB( uint8_t);" + "i8vec2 findMSB(u8vec2);" + "i8vec3 findMSB(u8vec3);" + "i8vec4 findMSB(u8vec4);" + "int16_t abs(int16_t);" "i16vec2 abs(i16vec2);" "i16vec3 abs(i16vec3);" @@ -2691,50 +4172,53 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "i16vec3 sign(i16vec3);" "i16vec4 sign(i16vec4);" - "int16_t min(int16_t, int16_t);" - "i16vec2 min(i16vec2, int16_t);" - "i16vec3 min(i16vec3, int16_t);" - "i16vec4 min(i16vec4, int16_t);" - "i16vec2 min(i16vec2, i16vec2);" - "i16vec3 min(i16vec3, i16vec3);" - "i16vec4 min(i16vec4, i16vec4);" - "uint16_t min(uint16_t, uint16_t);" - "u16vec2 min(u16vec2, uint16_t);" - "u16vec3 min(u16vec3, uint16_t);" - "u16vec4 min(u16vec4, uint16_t);" - "u16vec2 min(u16vec2, u16vec2);" - "u16vec3 min(u16vec3, u16vec3);" - "u16vec4 min(u16vec4, u16vec4);" - - "int16_t max(int16_t, int16_t);" - "i16vec2 max(i16vec2, int16_t);" - "i16vec3 max(i16vec3, int16_t);" - "i16vec4 max(i16vec4, int16_t);" - "i16vec2 max(i16vec2, i16vec2);" - "i16vec3 max(i16vec3, i16vec3);" - "i16vec4 max(i16vec4, i16vec4);" - "uint16_t max(uint16_t, uint16_t);" - "u16vec2 max(u16vec2, uint16_t);" - "u16vec3 max(u16vec3, uint16_t);" - "u16vec4 max(u16vec4, uint16_t);" - "u16vec2 max(u16vec2, u16vec2);" - "u16vec3 max(u16vec3, u16vec3);" - "u16vec4 max(u16vec4, u16vec4);" - - "int16_t clamp(int16_t, int16_t, int16_t);" - "i16vec2 clamp(i16vec2, int16_t, int16_t);" - "i16vec3 clamp(i16vec3, int16_t, int16_t);" - "i16vec4 clamp(i16vec4, int16_t, int16_t);" - "i16vec2 clamp(i16vec2, i16vec2, i16vec2);" - "i16vec3 clamp(i16vec3, i16vec3, i16vec3);" - "i16vec4 clamp(i16vec4, i16vec4, i16vec4);" - "uint16_t clamp(uint16_t, uint16_t, uint16_t);" - "u16vec2 clamp(u16vec2, uint16_t, uint16_t);" - "u16vec3 clamp(u16vec3, uint16_t, uint16_t);" - "u16vec4 clamp(u16vec4, uint16_t, uint16_t);" - "u16vec2 clamp(u16vec2, u16vec2, u16vec2);" - "u16vec3 clamp(u16vec3, u16vec3, u16vec3);" - "u16vec4 clamp(u16vec4, u16vec4, u16vec4);" + "int16_t min(int16_t x, int16_t y);" + "i16vec2 min(i16vec2 x, int16_t y);" + "i16vec3 min(i16vec3 x, int16_t y);" + "i16vec4 min(i16vec4 x, int16_t y);" + "i16vec2 min(i16vec2 x, i16vec2 y);" + "i16vec3 min(i16vec3 x, i16vec3 y);" + "i16vec4 min(i16vec4 x, i16vec4 y);" + + "uint16_t min(uint16_t x, uint16_t y);" + "u16vec2 min(u16vec2 x, uint16_t y);" + "u16vec3 min(u16vec3 x, uint16_t y);" + "u16vec4 min(u16vec4 x, uint16_t y);" + "u16vec2 min(u16vec2 x, u16vec2 y);" + "u16vec3 min(u16vec3 x, u16vec3 y);" + "u16vec4 min(u16vec4 x, u16vec4 y);" + + "int16_t max(int16_t x, int16_t y);" + "i16vec2 max(i16vec2 x, int16_t y);" + "i16vec3 max(i16vec3 x, int16_t y);" + "i16vec4 max(i16vec4 x, int16_t y);" + "i16vec2 max(i16vec2 x, i16vec2 y);" + "i16vec3 max(i16vec3 x, i16vec3 y);" + "i16vec4 max(i16vec4 x, i16vec4 y);" + + "uint16_t max(uint16_t x, uint16_t y);" + "u16vec2 max(u16vec2 x, uint16_t y);" + "u16vec3 max(u16vec3 x, uint16_t y);" + "u16vec4 max(u16vec4 x, uint16_t y);" + "u16vec2 max(u16vec2 x, u16vec2 y);" + "u16vec3 max(u16vec3 x, u16vec3 y);" + "u16vec4 max(u16vec4 x, u16vec4 y);" + + "int16_t clamp(int16_t x, int16_t minVal, int16_t maxVal);" + "i16vec2 clamp(i16vec2 x, int16_t minVal, int16_t maxVal);" + "i16vec3 clamp(i16vec3 x, int16_t minVal, int16_t maxVal);" + "i16vec4 clamp(i16vec4 x, int16_t minVal, int16_t maxVal);" + "i16vec2 clamp(i16vec2 x, i16vec2 minVal, i16vec2 maxVal);" + "i16vec3 clamp(i16vec3 x, i16vec3 minVal, i16vec3 maxVal);" + "i16vec4 clamp(i16vec4 x, i16vec4 minVal, i16vec4 maxVal);" + + "uint16_t clamp(uint16_t x, uint16_t minVal, uint16_t maxVal);" + "u16vec2 clamp(u16vec2 x, uint16_t minVal, uint16_t maxVal);" + "u16vec3 clamp(u16vec3 x, uint16_t minVal, uint16_t maxVal);" + "u16vec4 clamp(u16vec4 x, uint16_t minVal, uint16_t maxVal);" + "u16vec2 clamp(u16vec2 x, u16vec2 minVal, u16vec2 maxVal);" + "u16vec3 clamp(u16vec3 x, u16vec3 minVal, u16vec3 maxVal);" + "u16vec4 clamp(u16vec4 x, u16vec4 minVal, u16vec4 maxVal);" "int16_t mix(int16_t, int16_t, bool);" "i16vec2 mix(i16vec2, i16vec2, bvec2);" @@ -2755,6 +4239,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 ldexp(f16vec3, i16vec3);" "f16vec4 ldexp(f16vec4, i16vec4);" + "int16_t halfBitsToInt16(float16_t);" + "i16vec2 halfBitsToInt16(f16vec2);" + "i16vec3 halhBitsToInt16(f16vec3);" + "i16vec4 halfBitsToInt16(f16vec4);" + + "uint16_t halfBitsToUint16(float16_t);" + "u16vec2 halfBitsToUint16(f16vec2);" + "u16vec3 halfBitsToUint16(f16vec3);" + "u16vec4 halfBitsToUint16(f16vec4);" + "int16_t float16BitsToInt16(float16_t);" "i16vec2 float16BitsToInt16(f16vec2);" "i16vec3 float16BitsToInt16(f16vec3);" @@ -2775,6 +4269,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f16vec3 uint16BitsToFloat16(u16vec3);" "f16vec4 uint16BitsToFloat16(u16vec4);" + "float16_t int16BitsToHalf(int16_t);" + "f16vec2 int16BitsToHalf(i16vec2);" + "f16vec3 int16BitsToHalf(i16vec3);" + "f16vec4 int16BitsToHalf(i16vec4);" + + "float16_t uint16BitsToHalf(uint16_t);" + "f16vec2 uint16BitsToHalf(u16vec2);" + "f16vec3 uint16BitsToHalf(u16vec3);" + "f16vec4 uint16BitsToHalf(u16vec4);" + "int packInt2x16(i16vec2);" "uint packUint2x16(u16vec2);" "int64_t packInt4x16(i16vec4);" @@ -2826,33 +4330,245 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "bvec3 notEqual(u16vec3, u16vec3);" "bvec4 notEqual(u16vec4, u16vec4);" + " int16_t bitfieldExtract( int16_t, int16_t, int16_t);" + "i16vec2 bitfieldExtract(i16vec2, int16_t, int16_t);" + "i16vec3 bitfieldExtract(i16vec3, int16_t, int16_t);" + "i16vec4 bitfieldExtract(i16vec4, int16_t, int16_t);" + + " uint16_t bitfieldExtract( uint16_t, int16_t, int16_t);" + "u16vec2 bitfieldExtract(u16vec2, int16_t, int16_t);" + "u16vec3 bitfieldExtract(u16vec3, int16_t, int16_t);" + "u16vec4 bitfieldExtract(u16vec4, int16_t, int16_t);" + + " int16_t bitfieldInsert( int16_t base, int16_t, int16_t, int16_t);" + "i16vec2 bitfieldInsert(i16vec2 base, i16vec2, int16_t, int16_t);" + "i16vec3 bitfieldInsert(i16vec3 base, i16vec3, int16_t, int16_t);" + "i16vec4 bitfieldInsert(i16vec4 base, i16vec4, int16_t, int16_t);" + + " uint16_t bitfieldInsert( uint16_t base, uint16_t, int16_t, int16_t);" + "u16vec2 bitfieldInsert(u16vec2 base, u16vec2, int16_t, int16_t);" + "u16vec3 bitfieldInsert(u16vec3 base, u16vec3, int16_t, int16_t);" + "u16vec4 bitfieldInsert(u16vec4 base, u16vec4, int16_t, int16_t);" + + " int16_t bitCount( int16_t);" + "i16vec2 bitCount(i16vec2);" + "i16vec3 bitCount(i16vec3);" + "i16vec4 bitCount(i16vec4);" + + " int16_t bitCount( uint16_t);" + "i16vec2 bitCount(u16vec2);" + "i16vec3 bitCount(u16vec3);" + "i16vec4 bitCount(u16vec4);" + + " int16_t findLSB( int16_t);" + "i16vec2 findLSB(i16vec2);" + "i16vec3 findLSB(i16vec3);" + "i16vec4 findLSB(i16vec4);" + + " int16_t findLSB( uint16_t);" + "i16vec2 findLSB(u16vec2);" + "i16vec3 findLSB(u16vec3);" + "i16vec4 findLSB(u16vec4);" + + " int16_t findMSB( int16_t);" + "i16vec2 findMSB(i16vec2);" + "i16vec3 findMSB(i16vec3);" + "i16vec4 findMSB(i16vec4);" + + " int16_t findMSB( uint16_t);" + "i16vec2 findMSB(u16vec2);" + "i16vec3 findMSB(u16vec3);" + "i16vec4 findMSB(u16vec4);" + + "int16_t pack16(i8vec2);" + "uint16_t pack16(u8vec2);" + "int32_t pack32(i8vec4);" + "uint32_t pack32(u8vec4);" + "int32_t pack32(i16vec2);" + "uint32_t pack32(u16vec2);" + "int64_t pack64(i16vec4);" + "uint64_t pack64(u16vec4);" + "int64_t pack64(i32vec2);" + "uint64_t pack64(u32vec2);" + + "i8vec2 unpack8(int16_t);" + "u8vec2 unpack8(uint16_t);" + "i8vec4 unpack8(int32_t);" + "u8vec4 unpack8(uint32_t);" + "i16vec2 unpack16(int32_t);" + "u16vec2 unpack16(uint32_t);" + "i16vec4 unpack16(int64_t);" + "u16vec4 unpack16(uint64_t);" + "i32vec2 unpack32(int64_t);" + "u32vec2 unpack32(uint64_t);" + + "float64_t radians(float64_t);" + "f64vec2 radians(f64vec2);" + "f64vec3 radians(f64vec3);" + "f64vec4 radians(f64vec4);" + + "float64_t degrees(float64_t);" + "f64vec2 degrees(f64vec2);" + "f64vec3 degrees(f64vec3);" + "f64vec4 degrees(f64vec4);" + + "float64_t sin(float64_t);" + "f64vec2 sin(f64vec2);" + "f64vec3 sin(f64vec3);" + "f64vec4 sin(f64vec4);" + + "float64_t cos(float64_t);" + "f64vec2 cos(f64vec2);" + "f64vec3 cos(f64vec3);" + "f64vec4 cos(f64vec4);" + + "float64_t tan(float64_t);" + "f64vec2 tan(f64vec2);" + "f64vec3 tan(f64vec3);" + "f64vec4 tan(f64vec4);" + + "float64_t asin(float64_t);" + "f64vec2 asin(f64vec2);" + "f64vec3 asin(f64vec3);" + "f64vec4 asin(f64vec4);" + + "float64_t acos(float64_t);" + "f64vec2 acos(f64vec2);" + "f64vec3 acos(f64vec3);" + "f64vec4 acos(f64vec4);" + + "float64_t atan(float64_t, float64_t);" + "f64vec2 atan(f64vec2, f64vec2);" + "f64vec3 atan(f64vec3, f64vec3);" + "f64vec4 atan(f64vec4, f64vec4);" + + "float64_t atan(float64_t);" + "f64vec2 atan(f64vec2);" + "f64vec3 atan(f64vec3);" + "f64vec4 atan(f64vec4);" + + "float64_t sinh(float64_t);" + "f64vec2 sinh(f64vec2);" + "f64vec3 sinh(f64vec3);" + "f64vec4 sinh(f64vec4);" + + "float64_t cosh(float64_t);" + "f64vec2 cosh(f64vec2);" + "f64vec3 cosh(f64vec3);" + "f64vec4 cosh(f64vec4);" + + "float64_t tanh(float64_t);" + "f64vec2 tanh(f64vec2);" + "f64vec3 tanh(f64vec3);" + "f64vec4 tanh(f64vec4);" + + "float64_t asinh(float64_t);" + "f64vec2 asinh(f64vec2);" + "f64vec3 asinh(f64vec3);" + "f64vec4 asinh(f64vec4);" + + "float64_t acosh(float64_t);" + "f64vec2 acosh(f64vec2);" + "f64vec3 acosh(f64vec3);" + "f64vec4 acosh(f64vec4);" + + "float64_t atanh(float64_t);" + "f64vec2 atanh(f64vec2);" + "f64vec3 atanh(f64vec3);" + "f64vec4 atanh(f64vec4);" + + "float64_t pow(float64_t, float64_t);" + "f64vec2 pow(f64vec2, f64vec2);" + "f64vec3 pow(f64vec3, f64vec3);" + "f64vec4 pow(f64vec4, f64vec4);" + + "float64_t exp(float64_t);" + "f64vec2 exp(f64vec2);" + "f64vec3 exp(f64vec3);" + "f64vec4 exp(f64vec4);" + + "float64_t log(float64_t);" + "f64vec2 log(f64vec2);" + "f64vec3 log(f64vec3);" + "f64vec4 log(f64vec4);" + + "float64_t exp2(float64_t);" + "f64vec2 exp2(f64vec2);" + "f64vec3 exp2(f64vec3);" + "f64vec4 exp2(f64vec4);" + + "float64_t log2(float64_t);" + "f64vec2 log2(f64vec2);" + "f64vec3 log2(f64vec3);" + "f64vec4 log2(f64vec4);" "\n"); - } - - // GL_AMD_shader_fragment_mask - if (profile != EEsProfile && version >= 450) { - commonBuiltins.append( - "uint fragmentMaskFetchAMD(sampler2DMS, ivec2);" - "uint fragmentMaskFetchAMD(isampler2DMS, ivec2);" - "uint fragmentMaskFetchAMD(usampler2DMS, ivec2);" - - "uint fragmentMaskFetchAMD(sampler2DMSArray, ivec3);" - "uint fragmentMaskFetchAMD(isampler2DMSArray, ivec3);" - "uint fragmentMaskFetchAMD(usampler2DMSArray, ivec3);" - - "vec4 fragmentFetchAMD(sampler2DMS, ivec2, uint);" - "ivec4 fragmentFetchAMD(isampler2DMS, ivec2, uint);" - "uvec4 fragmentFetchAMD(usampler2DMS, ivec2, uint);" + } + if (profile != EEsProfile && version >= 450) { + stageBuiltins[EShLangFragment].append( + "float64_t dFdx(float64_t);" + "f64vec2 dFdx(f64vec2);" + "f64vec3 dFdx(f64vec3);" + "f64vec4 dFdx(f64vec4);" + + "float64_t dFdy(float64_t);" + "f64vec2 dFdy(f64vec2);" + "f64vec3 dFdy(f64vec3);" + "f64vec4 dFdy(f64vec4);" + + "float64_t dFdxFine(float64_t);" + "f64vec2 dFdxFine(f64vec2);" + "f64vec3 dFdxFine(f64vec3);" + "f64vec4 dFdxFine(f64vec4);" + + "float64_t dFdyFine(float64_t);" + "f64vec2 dFdyFine(f64vec2);" + "f64vec3 dFdyFine(f64vec3);" + "f64vec4 dFdyFine(f64vec4);" + + "float64_t dFdxCoarse(float64_t);" + "f64vec2 dFdxCoarse(f64vec2);" + "f64vec3 dFdxCoarse(f64vec3);" + "f64vec4 dFdxCoarse(f64vec4);" + + "float64_t dFdyCoarse(float64_t);" + "f64vec2 dFdyCoarse(f64vec2);" + "f64vec3 dFdyCoarse(f64vec3);" + "f64vec4 dFdyCoarse(f64vec4);" + + "float64_t fwidth(float64_t);" + "f64vec2 fwidth(f64vec2);" + "f64vec3 fwidth(f64vec3);" + "f64vec4 fwidth(f64vec4);" + + "float64_t fwidthFine(float64_t);" + "f64vec2 fwidthFine(f64vec2);" + "f64vec3 fwidthFine(f64vec3);" + "f64vec4 fwidthFine(f64vec4);" + + "float64_t fwidthCoarse(float64_t);" + "f64vec2 fwidthCoarse(f64vec2);" + "f64vec3 fwidthCoarse(f64vec3);" + "f64vec4 fwidthCoarse(f64vec4);" + + "float64_t interpolateAtCentroid(float64_t);" + "f64vec2 interpolateAtCentroid(f64vec2);" + "f64vec3 interpolateAtCentroid(f64vec3);" + "f64vec4 interpolateAtCentroid(f64vec4);" + + "float64_t interpolateAtSample(float64_t, int);" + "f64vec2 interpolateAtSample(f64vec2, int);" + "f64vec3 interpolateAtSample(f64vec3, int);" + "f64vec4 interpolateAtSample(f64vec4, int);" + + "float64_t interpolateAtOffset(float64_t, f64vec2);" + "f64vec2 interpolateAtOffset(f64vec2, f64vec2);" + "f64vec3 interpolateAtOffset(f64vec3, f64vec2);" + "f64vec4 interpolateAtOffset(f64vec4, f64vec2);" - "vec4 fragmentFetchAMD(sampler2DMSArray, ivec3, uint);" - "ivec4 fragmentFetchAMD(isampler2DMSArray, ivec3, uint);" - "uvec4 fragmentFetchAMD(usampler2DMSArray, ivec3, uint);" + "\n"); - "\n"); } -#endif - //============================================================================ // // Prototypes for built-in functions seen by vertex shaders only. @@ -3192,7 +4908,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } // GL_AMD_shader_fragment_mask - if (profile != EEsProfile && version >= 450 && spvVersion.vulkan >= 100) { + if (profile != EEsProfile && version >= 450 && spvVersion.vulkan > 0) { stageBuiltins[EShLangFragment].append( "uint fragmentMaskFetchAMD(subpassInputMS);" "uint fragmentMaskFetchAMD(isubpassInputMS);" @@ -3491,7 +5207,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangVertex].append( "int gl_InstanceID;" // needs qualifier fixed later ); - if (spvVersion.vulkan >= 100 && version >= 140) + if (spvVersion.vulkan > 0 && version >= 140) stageBuiltins[EShLangVertex].append( "in int gl_VertexIndex;" "in int gl_InstanceIndex;" @@ -3541,7 +5257,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp int gl_VertexID;" // needs qualifier fixed later "in highp int gl_InstanceID;" // needs qualifier fixed later ); - if (spvVersion.vulkan >= 100) + if (spvVersion.vulkan > 0) stageBuiltins[EShLangVertex].append( "in highp int gl_VertexIndex;" "in highp int gl_InstanceIndex;" @@ -3963,6 +5679,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in vec3 gl_BaryCoordPullModelAMD;" ); #endif + +#ifdef NV_EXTENSIONS + if (version >= 430) + stageBuiltins[EShLangFragment].append( + "in bool gl_FragFullyCoveredNV;" + ); +#endif } else { // ES profile @@ -4011,17 +5734,30 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // GL_ARB_shader_ballot if (profile != EEsProfile && version >= 450) { - commonBuiltins.append( + const char* ballotDecls = "uniform uint gl_SubGroupSizeARB;" - "in uint gl_SubGroupInvocationARB;" "in uint64_t gl_SubGroupEqMaskARB;" "in uint64_t gl_SubGroupGeMaskARB;" "in uint64_t gl_SubGroupGtMaskARB;" "in uint64_t gl_SubGroupLeMaskARB;" "in uint64_t gl_SubGroupLtMaskARB;" - - "\n"); + "\n"; + const char* fragmentBallotDecls = + "uniform uint gl_SubGroupSizeARB;" + "flat in uint gl_SubGroupInvocationARB;" + "flat in uint64_t gl_SubGroupEqMaskARB;" + "flat in uint64_t gl_SubGroupGeMaskARB;" + "flat in uint64_t gl_SubGroupGtMaskARB;" + "flat in uint64_t gl_SubGroupLeMaskARB;" + "flat in uint64_t gl_SubGroupLtMaskARB;" + "\n"; + stageBuiltins[EShLangVertex] .append(ballotDecls); + stageBuiltins[EShLangTessControl] .append(ballotDecls); + stageBuiltins[EShLangTessEvaluation].append(ballotDecls); + stageBuiltins[EShLangGeometry] .append(ballotDecls); + stageBuiltins[EShLangCompute] .append(ballotDecls); + stageBuiltins[EShLangFragment] .append(fragmentBallotDecls); } if ((profile != EEsProfile && version >= 140) || @@ -4032,6 +5768,39 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + const char* ballotDecls = + "in mediump uint gl_SubgroupSize;" + "in mediump uint gl_SubgroupInvocationID;" + "in highp uvec4 gl_SubgroupEqMask;" + "in highp uvec4 gl_SubgroupGeMask;" + "in highp uvec4 gl_SubgroupGtMask;" + "in highp uvec4 gl_SubgroupLeMask;" + "in highp uvec4 gl_SubgroupLtMask;" + "\n"; + const char* fragmentBallotDecls = + "flat in mediump uint gl_SubgroupSize;" + "flat in mediump uint gl_SubgroupInvocationID;" + "flat in highp uvec4 gl_SubgroupEqMask;" + "flat in highp uvec4 gl_SubgroupGeMask;" + "flat in highp uvec4 gl_SubgroupGtMask;" + "flat in highp uvec4 gl_SubgroupLeMask;" + "flat in highp uvec4 gl_SubgroupLtMask;" + "\n"; + stageBuiltins[EShLangVertex] .append(ballotDecls); + stageBuiltins[EShLangTessControl] .append(ballotDecls); + stageBuiltins[EShLangTessEvaluation].append(ballotDecls); + stageBuiltins[EShLangGeometry] .append(ballotDecls); + stageBuiltins[EShLangCompute] .append(ballotDecls); + stageBuiltins[EShLangFragment] .append(fragmentBallotDecls); + + stageBuiltins[EShLangCompute].append( + "highp in uint gl_NumSubgroups;" + "highp in uint gl_SubgroupID;" + "\n"); + } + if (version >= 300 /* both ES and non-ES */) { stageBuiltins[EShLangFragment].append( "flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2 @@ -4052,8 +5821,11 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // In this function proper, enumerate the types, then calls the next set of functions // to enumerate all the uses for that type. // - +#ifdef AMD_EXTENSIONS + TBasicType bTypes[4] = { EbtFloat, EbtFloat16, EbtInt, EbtUint }; +#else TBasicType bTypes[3] = { EbtFloat, EbtInt, EbtUint }; +#endif bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140); bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130); @@ -4093,12 +5865,20 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c continue; if (ms && arrayed && profile == EEsProfile && version < 310) continue; +#ifdef AMD_EXTENSIONS + for (int bType = 0; bType < 4; ++bType) { // float, float16, int, uint results + + if (shadow && bType > 1) + continue; + if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile ||version < 450)) + continue; +#else for (int bType = 0; bType < 3; ++bType) { // float, int, uint results if (shadow && bType > 0) continue; - +#endif if (dim == EsdRect && version < 140 && bType > 0) continue; @@ -4216,15 +5996,37 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int // if (profile != EEsProfile && version >= 400 && ! sampler.image && sampler.dim != EsdRect && ! sampler.ms && sampler.dim != EsdBuffer) { - stageBuiltins[EShLangFragment].append("vec2 textureQueryLod("); - stageBuiltins[EShLangFragment].append(typeName); - if (dimMap[sampler.dim] == 1) - stageBuiltins[EShLangFragment].append(", float"); - else { - stageBuiltins[EShLangFragment].append(", vec"); - stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]); +#ifdef AMD_EXTENSIONS + for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) { + if (f16TexAddr && sampler.type != EbtFloat16) + continue; +#endif + stageBuiltins[EShLangFragment].append("vec2 textureQueryLod("); + stageBuiltins[EShLangFragment].append(typeName); + if (dimMap[sampler.dim] == 1) +#ifdef AMD_EXTENSIONS + if (f16TexAddr) + stageBuiltins[EShLangFragment].append(", float16_t"); + else + stageBuiltins[EShLangFragment].append(", float"); +#else + stageBuiltins[EShLangFragment].append(", float"); +#endif + else { +#ifdef AMD_EXTENSIONS + if (f16TexAddr) + stageBuiltins[EShLangFragment].append(", f16vec"); + else + stageBuiltins[EShLangFragment].append(", vec"); +#else + stageBuiltins[EShLangFragment].append(", vec"); +#endif + stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]); + } + stageBuiltins[EShLangFragment].append(");\n"); +#ifdef AMD_EXTENSIONS } - stageBuiltins[EShLangFragment].append(");\n"); +#endif } // @@ -4414,7 +6216,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, if (bias && (lod || sampler.ms)) continue; - if (bias && sampler.dim == Esd2D && sampler.shadow && sampler.arrayed) + if (bias && (sampler.dim == Esd2D || sampler.dim == EsdCube) && sampler.shadow && sampler.arrayed) continue; if (bias && (sampler.dim == EsdRect || sampler.dim == EsdBuffer)) continue; @@ -4463,149 +6265,237 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, continue; if (extraProj && (sampler.dim == Esd3D || sampler.shadow)) continue; +#ifdef AMD_EXTENSIONS + for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing - for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { // loop over "bool" lod clamp - - if (lodClamp && (profile == EEsProfile || version < 450)) + if (f16TexAddr && sampler.type != EbtFloat16) continue; - if (lodClamp && (proj || lod || fetch)) - continue; - - for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + if (f16TexAddr && sampler.shadow && ! compare) { + compare = true; // compare argument is always present + totalDims--; + } +#endif + for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { // loop over "bool" lod clamp - if (sparse && (profile == EEsProfile || version < 450)) + if (lodClamp && (profile == EEsProfile || version < 450)) continue; - // Sparse sampling is not for 1D/1D array texture, buffer texture, and projective texture - if (sparse && (sampler.dim == Esd1D || sampler.dim == EsdBuffer || proj)) + if (lodClamp && (proj || lod || fetch)) continue; - TString s; + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + + if (sparse && (profile == EEsProfile || version < 450)) + continue; + // Sparse sampling is not for 1D/1D array texture, buffer texture, and projective texture + if (sparse && (sampler.dim == Esd1D || sampler.dim == EsdBuffer || proj)) + continue; - // return type - if (sparse) - s.append("int "); - else { - if (sampler.shadow) - s.append("float "); + TString s; + + // return type + if (sparse) + s.append("int "); else { - s.append(prefixes[sampler.type]); - s.append("vec4 "); + if (sampler.shadow) +#ifdef AMD_EXTENSIONS + if (sampler.type == EbtFloat16) + s.append("float16_t "); + else + s.append("float "); +#else + s.append("float "); +#endif + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } } - } - // name - if (sparse) { - if (fetch) - s.append("sparseTexel"); - else - s.append("sparseTexture"); - } else { - if (fetch) - s.append("texel"); - else - s.append("texture"); - } - if (proj) - s.append("Proj"); - if (lod) - s.append("Lod"); - if (grad) - s.append("Grad"); - if (fetch) - s.append("Fetch"); - if (offset) - s.append("Offset"); - if (lodClamp) - s.append("Clamp"); - if (lodClamp || sparse) - s.append("ARB"); - s.append("("); - - // sampler type - s.append(typeName); - - // P coordinate - if (extraProj) - s.append(",vec4"); - else { - s.append(","); - TBasicType t = fetch ? EbtInt : EbtFloat; - if (totalDims == 1) - s.append(TType::getBasicString(t)); + // name + if (sparse) { + if (fetch) + s.append("sparseTexel"); + else + s.append("sparseTexture"); + } else { - s.append(prefixes[t]); - s.append("vec"); - s.append(postfixes[totalDims]); + if (fetch) + s.append("texel"); + else + s.append("texture"); } - } - - if (bias && compare) - continue; - - // non-optional lod argument (lod that's not driven by lod loop) or sample - if ((fetch && sampler.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) || - (sampler.ms && fetch)) - s.append(",int"); - - // non-optional lod - if (lod) - s.append(",float"); - - // gradient arguments - if (grad) { - if (dimMap[sampler.dim] == 1) - s.append(",float,float"); + if (proj) + s.append("Proj"); + if (lod) + s.append("Lod"); + if (grad) + s.append("Grad"); + if (fetch) + s.append("Fetch"); + if (offset) + s.append("Offset"); + if (lodClamp) + s.append("Clamp"); + if (lodClamp || sparse) + s.append("ARB"); + s.append("("); + + // sampler type + s.append(typeName); +#ifdef AMD_EXTENSIONS + // P coordinate + if (extraProj) { + if (f16TexAddr) + s.append(",f16vec4"); + else + s.append(",vec4"); + } else { + s.append(","); + TBasicType t = fetch ? EbtInt : (f16TexAddr ? EbtFloat16 : EbtFloat); + if (totalDims == 1) + s.append(TType::getBasicString(t)); + else { + s.append(prefixes[t]); + s.append("vec"); + s.append(postfixes[totalDims]); + } + } +#else + // P coordinate + if (extraProj) + s.append(",vec4"); else { - s.append(",vec"); - s.append(postfixes[dimMap[sampler.dim]]); - s.append(",vec"); - s.append(postfixes[dimMap[sampler.dim]]); + s.append(","); + TBasicType t = fetch ? EbtInt : EbtFloat; + if (totalDims == 1) + s.append(TType::getBasicString(t)); + else { + s.append(prefixes[t]); + s.append("vec"); + s.append(postfixes[totalDims]); + } } - } +#endif + // non-optional compare + if (compare) + s.append(",float"); - // offset - if (offset) { - if (dimMap[sampler.dim] == 1) + // non-optional lod argument (lod that's not driven by lod loop) or sample + if ((fetch && sampler.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) || + (sampler.ms && fetch)) s.append(",int"); - else { - s.append(",ivec"); - s.append(postfixes[dimMap[sampler.dim]]); +#ifdef AMD_EXTENSIONS + // non-optional lod + if (lod) { + if (f16TexAddr) + s.append(",float16_t"); + else + s.append(",float"); } - } - - // non-optional compare - if (compare) - s.append(",float"); - - // lod clamp - if (lodClamp) - s.append(",float"); - // texel out (for sparse texture) - if (sparse) { - s.append(",out "); - if (sampler.shadow) - s.append("float "); - else { - s.append(prefixes[sampler.type]); - s.append("vec4 "); + // gradient arguments + if (grad) { + if (dimMap[sampler.dim] == 1) { + if (f16TexAddr) + s.append(",float16_t,float16_t"); + else + s.append(",float,float"); + } else { + if (f16TexAddr) + s.append(",f16vec"); + else + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + if (f16TexAddr) + s.append(",f16vec"); + else + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + } + } +#else + // non-optional lod + if (lod) + s.append(",float"); + + // gradient arguments + if (grad) { + if (dimMap[sampler.dim] == 1) + s.append(",float,float"); + else { + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + s.append(",vec"); + s.append(postfixes[dimMap[sampler.dim]]); + } + } +#endif + // offset + if (offset) { + if (dimMap[sampler.dim] == 1) + s.append(",int"); + else { + s.append(",ivec"); + s.append(postfixes[dimMap[sampler.dim]]); + } } - } - - // optional bias - if (bias) - s.append(",float"); - s.append(");\n"); +#ifdef AMD_EXTENSIONS + // lod clamp + if (lodClamp) { + if (f16TexAddr) + s.append(",float16_t"); + else + s.append(",float"); + } +#else + // lod clamp + if (lodClamp) + s.append(",float"); +#endif + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + if (sampler.shadow) +#ifdef AMD_EXTENSIONS + if (sampler.type == EbtFloat16) + s.append("float16_t"); + else + s.append("float"); +#else + s.append("float"); +#endif + else { + s.append(prefixes[sampler.type]); + s.append("vec4"); + } + } +#ifdef AMD_EXTENSIONS + // optional bias + if (bias) { + if (f16TexAddr) + s.append(",float16_t"); + else + s.append(",float"); + } +#else + // optional bias + if (bias) + s.append(",float"); +#endif + s.append(");\n"); - // Add to the per-language set of built-ins + // Add to the per-language set of built-ins + if (bias || lodClamp) + stageBuiltins[EShLangFragment].append(s); + else + commonBuiltins.append(s); - if (bias || lodClamp) - stageBuiltins[EShLangFragment].append(s); - else - commonBuiltins.append(s); + } } +#ifdef AMD_EXTENSIONS } +#endif } } } @@ -4638,81 +6528,96 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in if (version < 140 && sampler.dim == EsdRect && sampler.type != EbtFloat) return; - for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets +#ifdef AMD_EXTENSIONS + for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing - for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument + if (f16TexAddr && sampler.type != EbtFloat16) + continue; +#endif + for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets - if (comp > 0 && sampler.shadow) - continue; + for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument - if (offset > 0 && sampler.dim == EsdCube) - continue; + if (comp > 0 && sampler.shadow) + continue; - for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not - if (sparse && (profile == EEsProfile || version < 450)) + if (offset > 0 && sampler.dim == EsdCube) continue; - TString s; + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + if (sparse && (profile == EEsProfile || version < 450)) + continue; - // return type - if (sparse) - s.append("int "); - else { - s.append(prefixes[sampler.type]); - s.append("vec4 "); - } + TString s; - // name - if (sparse) - s.append("sparseTextureGather"); - else - s.append("textureGather"); - switch (offset) { - case 1: - s.append("Offset"); - break; - case 2: - s.append("Offsets"); - default: - break; - } + // return type + if (sparse) + s.append("int "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } - if (sparse) - s.append("ARB"); - s.append("("); + // name + if (sparse) + s.append("sparseTextureGather"); + else + s.append("textureGather"); + switch (offset) { + case 1: + s.append("Offset"); + break; + case 2: + s.append("Offsets"); + default: + break; + } + if (sparse) + s.append("ARB"); + s.append("("); - // sampler type argument - s.append(typeName); + // sampler type argument + s.append(typeName); - // P coordinate argument - s.append(",vec"); - int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); - s.append(postfixes[totalDims]); + // P coordinate argument +#ifdef AMD_EXTENSIONS + if (f16TexAddr) + s.append(",f16vec"); + else + s.append(",vec"); +#else + s.append(",vec"); +#endif + int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); + s.append(postfixes[totalDims]); + + // refZ argument + if (sampler.shadow) + s.append(",float"); + + // offset argument + if (offset > 0) { + s.append(",ivec2"); + if (offset == 2) + s.append("[4]"); + } - // refZ argument - if (sampler.shadow) - s.append(",float"); + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } - // offset argument - if (offset > 0) { - s.append(",ivec2"); - if (offset == 2) - s.append("[4]"); - } + // comp argument + if (comp) + s.append(",int"); - // texel out (for sparse texture) - if (sparse) { - s.append(",out "); - s.append(prefixes[sampler.type]); - s.append("vec4 "); + s.append(");\n"); + commonBuiltins.append(s); +#ifdef AMD_EXTENSIONS } - - // comp argument - if (comp) - s.append(",int"); - - s.append(");\n"); - commonBuiltins.append(s); +#endif } } } @@ -4731,95 +6636,112 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in if ((lod && bias) || (lod == 0 && bias == 0)) continue; - for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets + for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing - for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument + if (f16TexAddr && sampler.type != EbtFloat16) + continue; - if (comp == 0 && bias) - continue; + for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets - if (offset > 0 && sampler.dim == EsdCube) - continue; + for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument - for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not - if (sparse && (profile == EEsProfile || version < 450)) + if (comp == 0 && bias) continue; - TString s; + if (offset > 0 && sampler.dim == EsdCube) + continue; - // return type - if (sparse) - s.append("int "); - else { - s.append(prefixes[sampler.type]); - s.append("vec4 "); - } + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + if (sparse && (profile == EEsProfile || version < 450)) + continue; - // name - if (sparse) - s.append("sparseTextureGather"); - else - s.append("textureGather"); - - if (lod) - s.append("Lod"); - - switch (offset) { - case 1: - s.append("Offset"); - break; - case 2: - s.append("Offsets"); - default: - break; - } + TString s; - if (lod) - s.append("AMD"); - else if (sparse) - s.append("ARB"); + // return type + if (sparse) + s.append("int "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } - s.append("("); + // name + if (sparse) + s.append("sparseTextureGather"); + else + s.append("textureGather"); + + if (lod) + s.append("Lod"); + + switch (offset) { + case 1: + s.append("Offset"); + break; + case 2: + s.append("Offsets"); + default: + break; + } - // sampler type argument - s.append(typeName); + if (lod) + s.append("AMD"); + else if (sparse) + s.append("ARB"); + + s.append("("); + + // sampler type argument + s.append(typeName); + + // P coordinate argument + if (f16TexAddr) + s.append(",f16vec"); + else + s.append(",vec"); + int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); + s.append(postfixes[totalDims]); + + // lod argument + if (lod) { + if (f16TexAddr) + s.append(",float16_t"); + else + s.append(",float"); + } - // P coordinate argument - s.append(",vec"); - int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); - s.append(postfixes[totalDims]); - - // lod argument - if (lod) - s.append(",float"); - - // offset argument - if (offset > 0) { - s.append(",ivec2"); - if (offset == 2) - s.append("[4]"); - } + // offset argument + if (offset > 0) { + s.append(",ivec2"); + if (offset == 2) + s.append("[4]"); + } - // texel out (for sparse texture) - if (sparse) { - s.append(",out "); - s.append(prefixes[sampler.type]); - s.append("vec4 "); - } + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } - // comp argument - if (comp) - s.append(",int"); + // comp argument + if (comp) + s.append(",int"); - // bias argument - if (bias) - s.append(",float"); + // bias argument + if (bias) { + if (f16TexAddr) + s.append(",float16_t"); + else + s.append(",float"); + } - s.append(");\n"); - if (bias) - stageBuiltins[EShLangFragment].append(s); - else - commonBuiltins.append(s); + s.append(");\n"); + if (bias) + stageBuiltins[EShLangFragment].append(s); + else + commonBuiltins.append(s); + } } } } @@ -5406,9 +7328,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan >= 100) + if (spvVersion.vulkan > 0) // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + else + BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); if (version >= 430) { symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote); @@ -5507,7 +7431,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); } - if (spvVersion.vulkan >= 100) { + if (spvVersion.vulkan > 0) { BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable); BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); } @@ -5647,6 +7571,25 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } + + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + + BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); + BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); + BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); + BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); + BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); + BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); + BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); + } break; @@ -5858,6 +7801,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } #endif +#ifdef NV_EXTENSIONS + if (profile != EEsProfile && version >= 430) { + symbolTable.setVariableExtensions("gl_FragFullyCoveredNV", 1, &E_GL_NV_conservative_raster_underestimation); + BuiltInVariable("gl_FragFullyCoveredNV", EbvFragFullyCoveredNV, symbolTable); + } +#endif + symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth); if (profile == EEsProfile && version < 320) { @@ -5885,6 +7835,130 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_ViewID_OVR", EbvViewIndex, symbolTable); } + // GL_ARB_shader_ballot + if (profile != EEsProfile) { + symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); + + BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); + BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); + BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); + BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); + BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); + BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); + + if (spvVersion.vulkan > 0) + // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan + SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + else + BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); + } + + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + + BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); + BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); + BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); + BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); + BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); + BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); + BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); + + symbolTable.setFunctionExtensions("subgroupBarrier", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setFunctionExtensions("subgroupMemoryBarrier", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setFunctionExtensions("subgroupMemoryBarrierBuffer", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setFunctionExtensions("subgroupMemoryBarrierImage", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setFunctionExtensions("subgroupElect", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setFunctionExtensions("subgroupAll", 1, &E_GL_KHR_shader_subgroup_vote); + symbolTable.setFunctionExtensions("subgroupAny", 1, &E_GL_KHR_shader_subgroup_vote); + symbolTable.setFunctionExtensions("subgroupAllEqual", 1, &E_GL_KHR_shader_subgroup_vote); + symbolTable.setFunctionExtensions("subgroupBroadcast", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBroadcastFirst", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallot", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupInverseBallot", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotBitExtract", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotInclusiveBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotExclusiveBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotFindLSB", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupBallotFindMSB", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setFunctionExtensions("subgroupShuffle", 1, &E_GL_KHR_shader_subgroup_shuffle); + symbolTable.setFunctionExtensions("subgroupShuffleXor", 1, &E_GL_KHR_shader_subgroup_shuffle); + symbolTable.setFunctionExtensions("subgroupShuffleUp", 1, &E_GL_KHR_shader_subgroup_shuffle_relative); + symbolTable.setFunctionExtensions("subgroupShuffleDown", 1, &E_GL_KHR_shader_subgroup_shuffle_relative); + symbolTable.setFunctionExtensions("subgroupAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupInclusiveXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupExclusiveXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); + symbolTable.setFunctionExtensions("subgroupClusteredAdd", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredMul", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredMin", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredMax", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredAnd", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredOr", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupClusteredXor", 1, &E_GL_KHR_shader_subgroup_clustered); + symbolTable.setFunctionExtensions("subgroupQuadBroadcast", 1, &E_GL_KHR_shader_subgroup_quad); + symbolTable.setFunctionExtensions("subgroupQuadSwapHorizontal", 1, &E_GL_KHR_shader_subgroup_quad); + symbolTable.setFunctionExtensions("subgroupQuadSwapVertical", 1, &E_GL_KHR_shader_subgroup_quad); + symbolTable.setFunctionExtensions("subgroupQuadSwapDiagonal", 1, &E_GL_KHR_shader_subgroup_quad); + +#ifdef NV_EXTENSIONS + symbolTable.setFunctionExtensions("subgroupPartitionNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); + symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); +#endif + + } + if (profile == EEsProfile) { symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); @@ -5923,6 +7997,49 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_ARB_compute_shader); } + // GL_ARB_shader_ballot + if (profile != EEsProfile) { + symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); + symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); + + BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); + BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); + BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); + BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); + BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); + BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); + + if (spvVersion.vulkan > 0) + // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan + SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + else + BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); + } + + // GL_ARB_shader_ballot + if (spvVersion.vulkan > 0) { + symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); + symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); + + BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); + BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); + BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); + BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); + BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); + BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); + BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); + } + if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -5931,6 +8048,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + symbolTable.setVariableExtensions("gl_NumSubgroups", 1, &E_GL_KHR_shader_subgroup_basic); + symbolTable.setVariableExtensions("gl_SubgroupID", 1, &E_GL_KHR_shader_subgroup_basic); + + BuiltInVariable("gl_NumSubgroups", EbvNumSubgroups, symbolTable); + BuiltInVariable("gl_SubgroupID", EbvSubgroupID, symbolTable); + + symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic); + } break; default: @@ -6016,12 +8143,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64); symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble); symbolTable.relateToOperator("uint64BitsToDouble", EOpUint64BitsToDouble); -#ifdef AMD_EXTENSIONS + symbolTable.relateToOperator("halfBitsToInt16", EOpFloat16BitsToInt16); + symbolTable.relateToOperator("halfBitsToUint16", EOpFloat16BitsToUint16); symbolTable.relateToOperator("float16BitsToInt16", EOpFloat16BitsToInt16); symbolTable.relateToOperator("float16BitsToUint16", EOpFloat16BitsToUint16); symbolTable.relateToOperator("int16BitsToFloat16", EOpInt16BitsToFloat16); symbolTable.relateToOperator("uint16BitsToFloat16", EOpUint16BitsToFloat16); -#endif + + symbolTable.relateToOperator("int16BitsToHalf", EOpInt16BitsToFloat16); + symbolTable.relateToOperator("uint16BitsToHalf", EOpUint16BitsToFloat16); symbolTable.relateToOperator("packSnorm2x16", EOpPackSnorm2x16); symbolTable.relateToOperator("unpackSnorm2x16", EOpUnpackSnorm2x16); @@ -6044,7 +8174,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("packUint2x32", EOpPackUint2x32); symbolTable.relateToOperator("unpackUint2x32", EOpUnpackUint2x32); -#ifdef AMD_EXTENSIONS symbolTable.relateToOperator("packInt2x16", EOpPackInt2x16); symbolTable.relateToOperator("unpackInt2x16", EOpUnpackInt2x16); symbolTable.relateToOperator("packUint2x16", EOpPackUint2x16); @@ -6054,10 +8183,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("unpackInt4x16", EOpUnpackInt4x16); symbolTable.relateToOperator("packUint4x16", EOpPackUint4x16); symbolTable.relateToOperator("unpackUint4x16", EOpUnpackUint4x16); - symbolTable.relateToOperator("packFloat2x16", EOpPackFloat2x16); symbolTable.relateToOperator("unpackFloat2x16", EOpUnpackFloat2x16); -#endif + + symbolTable.relateToOperator("pack16", EOpPack16); + symbolTable.relateToOperator("pack32", EOpPack32); + symbolTable.relateToOperator("pack64", EOpPack64); + + symbolTable.relateToOperator("unpack32", EOpUnpack32); + symbolTable.relateToOperator("unpack16", EOpUnpack16); + symbolTable.relateToOperator("unpack8", EOpUnpack8); symbolTable.relateToOperator("length", EOpLength); symbolTable.relateToOperator("distance", EOpDistance); @@ -6301,6 +8436,90 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("fragmentFetchAMD", EOpFragmentFetch); #endif } + + // GL_KHR_shader_subgroup + if (spvVersion.vulkan > 0) { + symbolTable.relateToOperator("subgroupBarrier", EOpSubgroupBarrier); + symbolTable.relateToOperator("subgroupMemoryBarrier", EOpSubgroupMemoryBarrier); + symbolTable.relateToOperator("subgroupMemoryBarrierBuffer", EOpSubgroupMemoryBarrierBuffer); + symbolTable.relateToOperator("subgroupMemoryBarrierImage", EOpSubgroupMemoryBarrierImage); + symbolTable.relateToOperator("subgroupElect", EOpSubgroupElect); + symbolTable.relateToOperator("subgroupAll", EOpSubgroupAll); + symbolTable.relateToOperator("subgroupAny", EOpSubgroupAny); + symbolTable.relateToOperator("subgroupAllEqual", EOpSubgroupAllEqual); + symbolTable.relateToOperator("subgroupBroadcast", EOpSubgroupBroadcast); + symbolTable.relateToOperator("subgroupBroadcastFirst", EOpSubgroupBroadcastFirst); + symbolTable.relateToOperator("subgroupBallot", EOpSubgroupBallot); + symbolTable.relateToOperator("subgroupInverseBallot", EOpSubgroupInverseBallot); + symbolTable.relateToOperator("subgroupBallotBitExtract", EOpSubgroupBallotBitExtract); + symbolTable.relateToOperator("subgroupBallotBitCount", EOpSubgroupBallotBitCount); + symbolTable.relateToOperator("subgroupBallotInclusiveBitCount", EOpSubgroupBallotInclusiveBitCount); + symbolTable.relateToOperator("subgroupBallotExclusiveBitCount", EOpSubgroupBallotExclusiveBitCount); + symbolTable.relateToOperator("subgroupBallotFindLSB", EOpSubgroupBallotFindLSB); + symbolTable.relateToOperator("subgroupBallotFindMSB", EOpSubgroupBallotFindMSB); + symbolTable.relateToOperator("subgroupShuffle", EOpSubgroupShuffle); + symbolTable.relateToOperator("subgroupShuffleXor", EOpSubgroupShuffleXor); + symbolTable.relateToOperator("subgroupShuffleUp", EOpSubgroupShuffleUp); + symbolTable.relateToOperator("subgroupShuffleDown", EOpSubgroupShuffleDown); + symbolTable.relateToOperator("subgroupAdd", EOpSubgroupAdd); + symbolTable.relateToOperator("subgroupMul", EOpSubgroupMul); + symbolTable.relateToOperator("subgroupMin", EOpSubgroupMin); + symbolTable.relateToOperator("subgroupMax", EOpSubgroupMax); + symbolTable.relateToOperator("subgroupAnd", EOpSubgroupAnd); + symbolTable.relateToOperator("subgroupOr", EOpSubgroupOr); + symbolTable.relateToOperator("subgroupXor", EOpSubgroupXor); + symbolTable.relateToOperator("subgroupInclusiveAdd", EOpSubgroupInclusiveAdd); + symbolTable.relateToOperator("subgroupInclusiveMul", EOpSubgroupInclusiveMul); + symbolTable.relateToOperator("subgroupInclusiveMin", EOpSubgroupInclusiveMin); + symbolTable.relateToOperator("subgroupInclusiveMax", EOpSubgroupInclusiveMax); + symbolTable.relateToOperator("subgroupInclusiveAnd", EOpSubgroupInclusiveAnd); + symbolTable.relateToOperator("subgroupInclusiveOr", EOpSubgroupInclusiveOr); + symbolTable.relateToOperator("subgroupInclusiveXor", EOpSubgroupInclusiveXor); + symbolTable.relateToOperator("subgroupExclusiveAdd", EOpSubgroupExclusiveAdd); + symbolTable.relateToOperator("subgroupExclusiveMul", EOpSubgroupExclusiveMul); + symbolTable.relateToOperator("subgroupExclusiveMin", EOpSubgroupExclusiveMin); + symbolTable.relateToOperator("subgroupExclusiveMax", EOpSubgroupExclusiveMax); + symbolTable.relateToOperator("subgroupExclusiveAnd", EOpSubgroupExclusiveAnd); + symbolTable.relateToOperator("subgroupExclusiveOr", EOpSubgroupExclusiveOr); + symbolTable.relateToOperator("subgroupExclusiveXor", EOpSubgroupExclusiveXor); + symbolTable.relateToOperator("subgroupClusteredAdd", EOpSubgroupClusteredAdd); + symbolTable.relateToOperator("subgroupClusteredMul", EOpSubgroupClusteredMul); + symbolTable.relateToOperator("subgroupClusteredMin", EOpSubgroupClusteredMin); + symbolTable.relateToOperator("subgroupClusteredMax", EOpSubgroupClusteredMax); + symbolTable.relateToOperator("subgroupClusteredAnd", EOpSubgroupClusteredAnd); + symbolTable.relateToOperator("subgroupClusteredOr", EOpSubgroupClusteredOr); + symbolTable.relateToOperator("subgroupClusteredXor", EOpSubgroupClusteredXor); + symbolTable.relateToOperator("subgroupQuadBroadcast", EOpSubgroupQuadBroadcast); + symbolTable.relateToOperator("subgroupQuadSwapHorizontal", EOpSubgroupQuadSwapHorizontal); + symbolTable.relateToOperator("subgroupQuadSwapVertical", EOpSubgroupQuadSwapVertical); + symbolTable.relateToOperator("subgroupQuadSwapDiagonal", EOpSubgroupQuadSwapDiagonal); + +#ifdef NV_EXTENSIONS + symbolTable.relateToOperator("subgroupPartitionNV", EOpSubgroupPartition); + symbolTable.relateToOperator("subgroupPartitionedAddNV", EOpSubgroupPartitionedAdd); + symbolTable.relateToOperator("subgroupPartitionedMulNV", EOpSubgroupPartitionedMul); + symbolTable.relateToOperator("subgroupPartitionedMinNV", EOpSubgroupPartitionedMin); + symbolTable.relateToOperator("subgroupPartitionedMaxNV", EOpSubgroupPartitionedMax); + symbolTable.relateToOperator("subgroupPartitionedAndNV", EOpSubgroupPartitionedAnd); + symbolTable.relateToOperator("subgroupPartitionedOrNV", EOpSubgroupPartitionedOr); + symbolTable.relateToOperator("subgroupPartitionedXorNV", EOpSubgroupPartitionedXor); + symbolTable.relateToOperator("subgroupPartitionedInclusiveAddNV", EOpSubgroupPartitionedInclusiveAdd); + symbolTable.relateToOperator("subgroupPartitionedInclusiveMulNV", EOpSubgroupPartitionedInclusiveMul); + symbolTable.relateToOperator("subgroupPartitionedInclusiveMinNV", EOpSubgroupPartitionedInclusiveMin); + symbolTable.relateToOperator("subgroupPartitionedInclusiveMaxNV", EOpSubgroupPartitionedInclusiveMax); + symbolTable.relateToOperator("subgroupPartitionedInclusiveAndNV", EOpSubgroupPartitionedInclusiveAnd); + symbolTable.relateToOperator("subgroupPartitionedInclusiveOrNV", EOpSubgroupPartitionedInclusiveOr); + symbolTable.relateToOperator("subgroupPartitionedInclusiveXorNV", EOpSubgroupPartitionedInclusiveXor); + symbolTable.relateToOperator("subgroupPartitionedExclusiveAddNV", EOpSubgroupPartitionedExclusiveAdd); + symbolTable.relateToOperator("subgroupPartitionedExclusiveMulNV", EOpSubgroupPartitionedExclusiveMul); + symbolTable.relateToOperator("subgroupPartitionedExclusiveMinNV", EOpSubgroupPartitionedExclusiveMin); + symbolTable.relateToOperator("subgroupPartitionedExclusiveMaxNV", EOpSubgroupPartitionedExclusiveMax); + symbolTable.relateToOperator("subgroupPartitionedExclusiveAndNV", EOpSubgroupPartitionedExclusiveAnd); + symbolTable.relateToOperator("subgroupPartitionedExclusiveOrNV", EOpSubgroupPartitionedExclusiveOr); + symbolTable.relateToOperator("subgroupPartitionedExclusiveXorNV", EOpSubgroupPartitionedExclusiveXor); +#endif + } + if (profile == EEsProfile) { symbolTable.relateToOperator("shadow2DEXT", EOpTexture); symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj); @@ -6341,12 +8560,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion #ifdef AMD_EXTENSIONS if (profile != EEsProfile) symbolTable.relateToOperator("interpolateAtVertexAMD", EOpInterpolateAtVertex); - break; #endif + break; case EShLangCompute: - symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); - symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); + symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); + symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); + symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); break; default: @@ -6382,9 +8602,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion if (version == 100 || IncludeLegacy(version, profile, spvVersion) || (! ForwardCompatibility && profile != EEsProfile && version < 420)) { TPrecisionQualifier pq = profile == EEsProfile ? EpqMedium : EpqNone; TType fragData(EbtFloat, EvqFragColor, pq, 4); - TArraySizes& arraySizes = *new TArraySizes; - arraySizes.addInnerSize(resources.maxDrawBuffers); - fragData.newArraySizes(arraySizes); + TArraySizes* arraySizes = new TArraySizes; + arraySizes->addInnerSize(resources.maxDrawBuffers); + fragData.transferArraySizes(arraySizes); symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData)); SpecialQualifier("gl_FragData", EvqFragColor, EbvFragData, symbolTable); } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.h index 6b54c4da623b01bfde0530c792d889431fefae37..b5de3242332e86ab8d482ca086eafc14da826ebd 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Initialize.h @@ -67,7 +67,6 @@ public: virtual const TString& getStageString(EShLanguage language) const { return stageBuiltins[language]; } virtual void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable) = 0; - virtual void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) = 0; protected: @@ -89,7 +88,6 @@ public: void initialize(const TBuiltInResource& resources, int version, EProfile, const SpvVersion& spvVersion, EShLanguage); void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable); - void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources); protected: diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Intermediate.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Intermediate.cpp index 78e656309c794c40e7628b1d19dec44c3611edd8..0333e5d01f87c5265d5bc640c9b49e4d57b89d29 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -2,6 +2,7 @@ // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2015 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -46,6 +47,7 @@ #include #include +#include namespace glslang { @@ -118,16 +120,12 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn return nullptr; // Try converting the children's base types to compatible types. - TIntermTyped* child = addConversion(op, left->getType(), right); - if (child) - right = child; - else { - child = addConversion(op, right->getType(), left); - if (child) - left = child; - else - return nullptr; - } + auto children = addConversion(op, left, right); + left = std::get<0>(children); + right = std::get<1>(children); + + if (left == nullptr || right == nullptr) + return nullptr; // Convert the children's type shape to be compatible. addBiShapeConversion(op, left, right); @@ -161,6 +159,11 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn if (specConstantPropagates(*node->getLeft(), *node->getRight()) && isSpecializationOperation(*node)) node->getWritableType().getQualifier().makeSpecConstant(); + // If must propagate nonuniform, make a nonuniform. + if ((node->getLeft()->getQualifier().nonUniform || node->getRight()->getQualifier().nonUniform) && + isNonuniformPropagating(node->getOp())) + node->getWritableType().getQualifier().nonUniform = true; + return node; } @@ -304,20 +307,18 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo // TBasicType newType = EbtVoid; switch (op) { + case EOpConstructInt8: newType = EbtInt8; break; + case EOpConstructUint8: newType = EbtUint8; break; + case EOpConstructInt16: newType = EbtInt16; break; + case EOpConstructUint16: newType = EbtUint16; break; case EOpConstructInt: newType = EbtInt; break; case EOpConstructUint: newType = EbtUint; break; case EOpConstructInt64: newType = EbtInt64; break; case EOpConstructUint64: newType = EbtUint64; break; -#ifdef AMD_EXTENSIONS - case EOpConstructInt16: newType = EbtInt16; break; - case EOpConstructUint16: newType = EbtUint16; break; -#endif case EOpConstructBool: newType = EbtBool; break; case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructDouble: newType = EbtDouble; break; -#ifdef AMD_EXTENSIONS case EOpConstructFloat16: newType = EbtFloat16; break; -#endif default: break; // some compilers want this } @@ -336,20 +337,18 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo // TODO: but, did this bypass constant folding? // switch (op) { + case EOpConstructInt8: + case EOpConstructUint8: + case EOpConstructInt16: + case EOpConstructUint16: case EOpConstructInt: case EOpConstructUint: case EOpConstructInt64: case EOpConstructUint64: -#ifdef AMD_EXTENSIONS - case EOpConstructInt16: - case EOpConstructUint16: -#endif case EOpConstructBool: case EOpConstructFloat: case EOpConstructDouble: -#ifdef AMD_EXTENSIONS case EOpConstructFloat16: -#endif return child; default: break; // some compilers want this } @@ -373,10 +372,15 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo if (node->getOperand()->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*node)) node->getWritableType().getQualifier().makeSpecConstant(); + // If must propagate nonuniform, make a nonuniform. + if (node->getOperand()->getQualifier().nonUniform && isNonuniformPropagating(node->getOp())) + node->getWritableType().getQualifier().nonUniform = true; + return node; } -TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOperator op, bool unary, TIntermNode* childNode, const TType& returnType) +TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOperator op, bool unary, + TIntermNode* childNode, const TType& returnType) { if (unary) { // @@ -420,7 +424,7 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o // // Make sure we have an aggregate. If not turn it into one. // - if (node) { + if (node != nullptr) { aggNode = node->getAsAggregate(); if (aggNode == nullptr || aggNode->getOp() != EOpNull) { // @@ -446,27 +450,14 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o return fold(aggNode); } -// -// Convert the node's type to the given type, as allowed by the operation involved: 'op'. -// For implicit conversions, 'op' is not the requested conversion, it is the explicit -// operation requiring the implicit conversion. -// -// Returns a node representing the conversion, which could be the same -// node passed in if no conversion was needed. -// -// Generally, this is focused on basic type conversion, not shape conversion. -// See addShapeConversion(). -// -// Return nullptr if a conversion can't be done. -// -TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) const +bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const { // // Does the base type even allow the operation? // switch (node->getBasicType()) { case EbtVoid: - return nullptr; + return false; case EbtAtomicUint: case EbtSampler: // opaque types can be passed to functions @@ -484,188 +475,19 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt break; // otherwise, opaque types can't even be operated on, let alone converted - return nullptr; + return false; default: break; } - // Otherwise, if types are identical, no problem - if (type == node->getType()) - return node; - - // If one's a structure, then no conversions. - if (type.isStruct() || node->isStruct()) - return nullptr; - - // If one's an array, then no conversions. - if (type.isArray() || node->getType().isArray()) - return nullptr; - - // Note: callers are responsible for other aspects of shape, - // like vector and matrix sizes. - - TBasicType promoteTo; - - switch (op) { - // - // Explicit conversions (unary operations) - // - case EOpConstructBool: - promoteTo = EbtBool; - break; - case EOpConstructFloat: - promoteTo = EbtFloat; - break; - case EOpConstructDouble: - promoteTo = EbtDouble; - break; -#ifdef AMD_EXTENSIONS - case EOpConstructFloat16: - promoteTo = EbtFloat16; - break; -#endif - case EOpConstructInt: - promoteTo = EbtInt; - break; - case EOpConstructUint: - promoteTo = EbtUint; - break; - case EOpConstructInt64: - promoteTo = EbtInt64; - break; - case EOpConstructUint64: - promoteTo = EbtUint64; - break; -#ifdef AMD_EXTENSIONS - case EOpConstructInt16: - promoteTo = EbtInt16; - break; - case EOpConstructUint16: - promoteTo = EbtUint16; - break; -#endif - - // - // List all the binary ops that can implicitly convert one operand to the other's type; - // This implements the 'policy' for implicit type conversion. - // - case EOpLessThan: - case EOpGreaterThan: - case EOpLessThanEqual: - case EOpGreaterThanEqual: - case EOpEqual: - case EOpNotEqual: - - case EOpAdd: - case EOpSub: - case EOpMul: - case EOpDiv: - case EOpMod: - - case EOpVectorTimesScalar: - case EOpVectorTimesMatrix: - case EOpMatrixTimesVector: - case EOpMatrixTimesScalar: - - case EOpAnd: - case EOpInclusiveOr: - case EOpExclusiveOr: - case EOpAndAssign: - case EOpInclusiveOrAssign: - case EOpExclusiveOrAssign: - case EOpLogicalNot: - case EOpLogicalAnd: - case EOpLogicalOr: - case EOpLogicalXor: - - case EOpFunctionCall: - case EOpReturn: - case EOpAssign: - case EOpAddAssign: - case EOpSubAssign: - case EOpMulAssign: - case EOpVectorTimesScalarAssign: - case EOpMatrixTimesScalarAssign: - case EOpDivAssign: - case EOpModAssign: - - case EOpAtan: - case EOpClamp: - case EOpCross: - case EOpDistance: - case EOpDot: - case EOpDst: - case EOpFaceForward: - case EOpFma: - case EOpFrexp: - case EOpLdexp: - case EOpMix: - case EOpLit: - case EOpMax: - case EOpMin: - case EOpModf: - case EOpPow: - case EOpReflect: - case EOpRefract: - case EOpSmoothStep: - case EOpStep: - - case EOpSequence: - case EOpConstructStruct: - - if (type.getBasicType() == node->getType().getBasicType()) - return node; - - if (canImplicitlyPromote(node->getType().getBasicType(), type.getBasicType(), op)) - promoteTo = type.getBasicType(); - else - return nullptr; - - break; - - // Shifts can have mixed types as long as they are integer, without converting. - // It's the left operand's type that determines the resulting type, so no issue - // with assign shift ops either. - case EOpLeftShift: - case EOpRightShift: - case EOpLeftShiftAssign: - case EOpRightShiftAssign: - if ((type.getBasicType() == EbtInt || - type.getBasicType() == EbtUint || -#ifdef AMD_EXTENSIONS - type.getBasicType() == EbtInt16 || - type.getBasicType() == EbtUint16 || -#endif - type.getBasicType() == EbtInt64 || - type.getBasicType() == EbtUint64) && - (node->getType().getBasicType() == EbtInt || - node->getType().getBasicType() == EbtUint || -#ifdef AMD_EXTENSIONS - node->getType().getBasicType() == EbtInt16 || - node->getType().getBasicType() == EbtUint16 || -#endif - node->getType().getBasicType() == EbtInt64 || - node->getType().getBasicType() == EbtUint64)) - - return node; - else if (source == EShSourceHlsl && node->getType().getBasicType() == EbtBool) { - promoteTo = type.getBasicType(); - break; - } else - return nullptr; - - default: - // default is to require a match; all exceptions should have case statements above - - if (type.getBasicType() == node->getType().getBasicType()) - return node; - else - return nullptr; - } - - if (node->getAsConstantUnion()) - return promoteConstantUnion(promoteTo, node->getAsConstantUnion()); + return true; +} +// This is 'mechanism' here, it does any conversion told. +// It is about basic type, not about shape. +// The policy comes from the shader or the calling code. +TIntermUnary* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped* node) const +{ // // Add a new newNode for the conversion. // @@ -673,50 +495,47 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt TOperator newOp = EOpNull; - // This is 'mechanism' here, it does any conversion told. The policy comes - // from the shader or the above code. - switch (promoteTo) { + switch (convertTo) { case EbtDouble: switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToDouble; break; - case EbtUint: newOp = EOpConvUintToDouble; break; - case EbtBool: newOp = EOpConvBoolToDouble; break; - case EbtFloat: newOp = EOpConvFloatToDouble; break; -#ifdef AMD_EXTENSIONS + case EbtInt8: newOp = EOpConvInt8ToDouble; break; + case EbtUint8: newOp = EOpConvUint8ToDouble; break; + case EbtInt16: newOp = EOpConvInt16ToDouble; break; + case EbtUint16: newOp = EOpConvUint16ToDouble; break; + case EbtInt: newOp = EOpConvIntToDouble; break; + case EbtUint: newOp = EOpConvUintToDouble; break; + case EbtBool: newOp = EOpConvBoolToDouble; break; + case EbtFloat: newOp = EOpConvFloatToDouble; break; case EbtFloat16: newOp = EOpConvFloat16ToDouble; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToDouble; break; - case EbtUint64: newOp = EOpConvUint64ToDouble; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToDouble; break; - case EbtUint16: newOp = EOpConvUint16ToDouble; break; -#endif + case EbtInt64: newOp = EOpConvInt64ToDouble; break; + case EbtUint64: newOp = EOpConvUint64ToDouble; break; default: return nullptr; } break; case EbtFloat: switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToFloat; break; - case EbtUint: newOp = EOpConvUintToFloat; break; - case EbtBool: newOp = EOpConvBoolToFloat; break; - case EbtDouble: newOp = EOpConvDoubleToFloat; break; -#ifdef AMD_EXTENSIONS + case EbtInt8: newOp = EOpConvInt8ToFloat; break; + case EbtUint8: newOp = EOpConvUint8ToFloat; break; + case EbtInt16: newOp = EOpConvInt16ToFloat; break; + case EbtUint16: newOp = EOpConvUint16ToFloat; break; + case EbtInt: newOp = EOpConvIntToFloat; break; + case EbtUint: newOp = EOpConvUintToFloat; break; + case EbtBool: newOp = EOpConvBoolToFloat; break; + case EbtDouble: newOp = EOpConvDoubleToFloat; break; case EbtFloat16: newOp = EOpConvFloat16ToFloat; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToFloat; break; - case EbtUint64: newOp = EOpConvUint64ToFloat; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToFloat; break; - case EbtUint16: newOp = EOpConvUint16ToFloat; break; -#endif + case EbtInt64: newOp = EOpConvInt64ToFloat; break; + case EbtUint64: newOp = EOpConvUint64ToFloat; break; default: return nullptr; } break; -#ifdef AMD_EXTENSIONS case EbtFloat16: switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToFloat16; break; + case EbtUint8: newOp = EOpConvUint8ToFloat16; break; + case EbtInt16: newOp = EOpConvInt16ToFloat16; break; + case EbtUint16: newOp = EOpConvUint16ToFloat16; break; case EbtInt: newOp = EOpConvIntToFloat16; break; case EbtUint: newOp = EOpConvUintToFloat16; break; case EbtBool: newOp = EOpConvBoolToFloat16; break; @@ -724,145 +543,170 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtDouble: newOp = EOpConvDoubleToFloat16; break; case EbtInt64: newOp = EOpConvInt64ToFloat16; break; case EbtUint64: newOp = EOpConvUint64ToFloat16; break; - case EbtInt16: newOp = EOpConvInt16ToFloat16; break; - case EbtUint16: newOp = EOpConvUint16ToFloat16; break; default: return nullptr; } break; -#endif case EbtBool: switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToBool; break; - case EbtUint: newOp = EOpConvUintToBool; break; - case EbtFloat: newOp = EOpConvFloatToBool; break; - case EbtDouble: newOp = EOpConvDoubleToBool; break; -#ifdef AMD_EXTENSIONS + case EbtInt8: newOp = EOpConvInt8ToBool; break; + case EbtUint8: newOp = EOpConvUint8ToBool; break; + case EbtInt16: newOp = EOpConvInt16ToBool; break; + case EbtUint16: newOp = EOpConvUint16ToBool; break; + case EbtInt: newOp = EOpConvIntToBool; break; + case EbtUint: newOp = EOpConvUintToBool; break; + case EbtFloat: newOp = EOpConvFloatToBool; break; + case EbtDouble: newOp = EOpConvDoubleToBool; break; case EbtFloat16: newOp = EOpConvFloat16ToBool; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToBool; break; - case EbtUint64: newOp = EOpConvUint64ToBool; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToBool; break; - case EbtUint16: newOp = EOpConvUint16ToBool; break; -#endif - default: - return nullptr; - } - break; - case EbtInt: - switch (node->getBasicType()) { - case EbtUint: newOp = EOpConvUintToInt; break; - case EbtBool: newOp = EOpConvBoolToInt; break; - case EbtFloat: newOp = EOpConvFloatToInt; break; - case EbtDouble: newOp = EOpConvDoubleToInt; break; -#ifdef AMD_EXTENSIONS - case EbtFloat16: newOp = EOpConvFloat16ToInt; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToInt; break; - case EbtUint64: newOp = EOpConvUint64ToInt; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToInt; break; - case EbtUint16: newOp = EOpConvUint16ToInt; break; -#endif - default: - return nullptr; - } - break; - case EbtUint: - switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToUint; break; - case EbtBool: newOp = EOpConvBoolToUint; break; - case EbtFloat: newOp = EOpConvFloatToUint; break; - case EbtDouble: newOp = EOpConvDoubleToUint; break; -#ifdef AMD_EXTENSIONS - case EbtFloat16: newOp = EOpConvFloat16ToUint; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToUint; break; - case EbtUint64: newOp = EOpConvUint64ToUint; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToUint; break; - case EbtUint16: newOp = EOpConvUint16ToUint; break; -#endif + case EbtInt64: newOp = EOpConvInt64ToBool; break; + case EbtUint64: newOp = EOpConvUint64ToBool; break; default: return nullptr; } break; - case EbtInt64: + case EbtInt8: switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToInt64; break; - case EbtUint: newOp = EOpConvUintToInt64; break; - case EbtBool: newOp = EOpConvBoolToInt64; break; - case EbtFloat: newOp = EOpConvFloatToInt64; break; - case EbtDouble: newOp = EOpConvDoubleToInt64; break; -#ifdef AMD_EXTENSIONS - case EbtFloat16: newOp = EOpConvFloat16ToInt64; break; -#endif - case EbtUint64: newOp = EOpConvUint64ToInt64; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToInt64; break; - case EbtUint16: newOp = EOpConvUint16ToInt64; break; -#endif + case EbtUint8: newOp = EOpConvUint8ToInt8; break; + case EbtInt16: newOp = EOpConvInt16ToInt8; break; + case EbtUint16: newOp = EOpConvUint16ToInt8; break; + case EbtInt: newOp = EOpConvIntToInt8; break; + case EbtUint: newOp = EOpConvUintToInt8; break; + case EbtInt64: newOp = EOpConvInt64ToInt8; break; + case EbtUint64: newOp = EOpConvUint64ToInt8; break; + case EbtBool: newOp = EOpConvBoolToInt8; break; + case EbtFloat: newOp = EOpConvFloatToInt8; break; + case EbtDouble: newOp = EOpConvDoubleToInt8; break; + case EbtFloat16: newOp = EOpConvFloat16ToInt8; break; default: return nullptr; } break; - case EbtUint64: + case EbtUint8: switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToUint64; break; - case EbtUint: newOp = EOpConvUintToUint64; break; - case EbtBool: newOp = EOpConvBoolToUint64; break; - case EbtFloat: newOp = EOpConvFloatToUint64; break; - case EbtDouble: newOp = EOpConvDoubleToUint64; break; -#ifdef AMD_EXTENSIONS - case EbtFloat16: newOp = EOpConvFloat16ToUint64; break; -#endif - case EbtInt64: newOp = EOpConvInt64ToUint64; break; -#ifdef AMD_EXTENSIONS - case EbtInt16: newOp = EOpConvInt16ToUint64; break; - case EbtUint16: newOp = EOpConvUint16ToUint64; break; -#endif + case EbtInt8: newOp = EOpConvInt8ToUint8; break; + case EbtInt16: newOp = EOpConvInt16ToUint8; break; + case EbtUint16: newOp = EOpConvUint16ToUint8; break; + case EbtInt: newOp = EOpConvIntToUint8; break; + case EbtUint: newOp = EOpConvUintToUint8; break; + case EbtInt64: newOp = EOpConvInt64ToUint8; break; + case EbtUint64: newOp = EOpConvUint64ToUint8; break; + case EbtBool: newOp = EOpConvBoolToUint8; break; + case EbtFloat: newOp = EOpConvFloatToUint8; break; + case EbtDouble: newOp = EOpConvDoubleToUint8; break; + case EbtFloat16: newOp = EOpConvFloat16ToUint8; break; default: return nullptr; } break; -#ifdef AMD_EXTENSIONS + case EbtInt16: switch (node->getBasicType()) { + case EbtUint8: newOp = EOpConvUint8ToInt16; break; + case EbtInt8: newOp = EOpConvInt8ToInt16; break; + case EbtUint16: newOp = EOpConvUint16ToInt16; break; case EbtInt: newOp = EOpConvIntToInt16; break; case EbtUint: newOp = EOpConvUintToInt16; break; + case EbtInt64: newOp = EOpConvInt64ToInt16; break; + case EbtUint64: newOp = EOpConvUint64ToInt16; break; case EbtBool: newOp = EOpConvBoolToInt16; break; case EbtFloat: newOp = EOpConvFloatToInt16; break; case EbtDouble: newOp = EOpConvDoubleToInt16; break; case EbtFloat16: newOp = EOpConvFloat16ToInt16; break; - case EbtInt64: newOp = EOpConvInt64ToInt16; break; - case EbtUint64: newOp = EOpConvUint64ToInt16; break; - case EbtUint16: newOp = EOpConvUint16ToInt16; break; default: return nullptr; } break; case EbtUint16: switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToUint16; break; + case EbtUint8: newOp = EOpConvUint8ToUint16; break; + case EbtInt16: newOp = EOpConvInt16ToUint16; break; case EbtInt: newOp = EOpConvIntToUint16; break; case EbtUint: newOp = EOpConvUintToUint16; break; + case EbtInt64: newOp = EOpConvInt64ToUint16; break; + case EbtUint64: newOp = EOpConvUint64ToUint16; break; case EbtBool: newOp = EOpConvBoolToUint16; break; case EbtFloat: newOp = EOpConvFloatToUint16; break; case EbtDouble: newOp = EOpConvDoubleToUint16; break; case EbtFloat16: newOp = EOpConvFloat16ToUint16; break; - case EbtInt64: newOp = EOpConvInt64ToUint16; break; - case EbtUint64: newOp = EOpConvUint64ToUint16; break; - case EbtInt16: newOp = EOpConvInt16ToUint16; break; default: return nullptr; } break; -#endif + + case EbtInt: + switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToInt; break; + case EbtUint8: newOp = EOpConvUint8ToInt; break; + case EbtInt16: newOp = EOpConvInt16ToInt; break; + case EbtUint16: newOp = EOpConvUint16ToInt; break; + case EbtUint: newOp = EOpConvUintToInt; break; + case EbtBool: newOp = EOpConvBoolToInt; break; + case EbtFloat: newOp = EOpConvFloatToInt; break; + case EbtDouble: newOp = EOpConvDoubleToInt; break; + case EbtFloat16: newOp = EOpConvFloat16ToInt; break; + case EbtInt64: newOp = EOpConvInt64ToInt; break; + case EbtUint64: newOp = EOpConvUint64ToInt; break; + default: + return nullptr; + } + break; + case EbtUint: + switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToUint; break; + case EbtUint8: newOp = EOpConvUint8ToUint; break; + case EbtInt16: newOp = EOpConvInt16ToUint; break; + case EbtUint16: newOp = EOpConvUint16ToUint; break; + case EbtInt: newOp = EOpConvIntToUint; break; + case EbtBool: newOp = EOpConvBoolToUint; break; + case EbtFloat: newOp = EOpConvFloatToUint; break; + case EbtDouble: newOp = EOpConvDoubleToUint; break; + case EbtFloat16: newOp = EOpConvFloat16ToUint; break; + case EbtInt64: newOp = EOpConvInt64ToUint; break; + case EbtUint64: newOp = EOpConvUint64ToUint; break; + default: + return nullptr; + } + break; + case EbtInt64: + switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToInt64; break; + case EbtUint8: newOp = EOpConvUint8ToInt64; break; + case EbtInt16: newOp = EOpConvInt16ToInt64; break; + case EbtUint16: newOp = EOpConvUint16ToInt64; break; + case EbtInt: newOp = EOpConvIntToInt64; break; + case EbtUint: newOp = EOpConvUintToInt64; break; + case EbtBool: newOp = EOpConvBoolToInt64; break; + case EbtFloat: newOp = EOpConvFloatToInt64; break; + case EbtDouble: newOp = EOpConvDoubleToInt64; break; + case EbtFloat16: newOp = EOpConvFloat16ToInt64; break; + case EbtUint64: newOp = EOpConvUint64ToInt64; break; + default: + return nullptr; + } + break; + case EbtUint64: + switch (node->getBasicType()) { + case EbtInt8: newOp = EOpConvInt8ToUint64; break; + case EbtUint8: newOp = EOpConvUint8ToUint64; break; + case EbtInt16: newOp = EOpConvInt16ToUint64; break; + case EbtUint16: newOp = EOpConvUint16ToUint64; break; + case EbtInt: newOp = EOpConvIntToUint64; break; + case EbtUint: newOp = EOpConvUintToUint64; break; + case EbtBool: newOp = EOpConvBoolToUint64; break; + case EbtFloat: newOp = EOpConvFloatToUint64; break; + case EbtDouble: newOp = EOpConvDoubleToUint64; break; + case EbtFloat16: newOp = EOpConvFloat16ToUint64; break; + case EbtInt64: newOp = EOpConvInt64ToUint64; break; + default: + return nullptr; + } + break; default: return nullptr; } - TType newType(promoteTo, EvqTemporary, node->getVectorSize(), node->getMatrixCols(), node->getMatrixRows()); + TType newType(convertTo, EvqTemporary, node->getVectorSize(), node->getMatrixCols(), node->getMatrixRows()); newNode = addUnaryNode(newOp, node, node->getLoc(), newType); // TODO: it seems that some unary folding operations should occur here, but are not @@ -874,6 +718,298 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt return newNode; } +// For converting a pair of operands to a binary operation to compatible +// types with each other, relative to the operation in 'op'. +// This does not cover assignment operations, which is asymmetric in that the +// left type is not changeable. +// See addConversion(op, type, node) for assignments and unary operation +// conversions. +// +// Generally, this is focused on basic type conversion, not shape conversion. +// See addShapeConversion() for shape conversions. +// +// Returns the converted pair of nodes. +// Returns when there is no conversion. +std::tuple +TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1) const +{ + if (!isConversionAllowed(op, node0) || !isConversionAllowed(op, node1)) + return std::make_tuple(nullptr, nullptr); + + if (node0->getType() != node1->getType()) { + // If differing structure, then no conversions. + if (node0->isStruct() || node1->isStruct()) + return std::make_tuple(nullptr, nullptr); + + // If differing arrays, then no conversions. + if (node0->getType().isArray() || node1->getType().isArray()) + return std::make_tuple(nullptr, nullptr); + } + + auto promoteTo = std::make_tuple(EbtNumTypes, EbtNumTypes); + + switch (op) { + // + // List all the binary ops that can implicitly convert one operand to the other's type; + // This implements the 'policy' for implicit type conversion. + // + case EOpLessThan: + case EOpGreaterThan: + case EOpLessThanEqual: + case EOpGreaterThanEqual: + case EOpEqual: + case EOpNotEqual: + + case EOpAdd: + case EOpSub: + case EOpMul: + case EOpDiv: + case EOpMod: + + case EOpVectorTimesScalar: + case EOpVectorTimesMatrix: + case EOpMatrixTimesVector: + case EOpMatrixTimesScalar: + + case EOpAnd: + case EOpInclusiveOr: + case EOpExclusiveOr: + + case EOpSequence: // used by ?: + + if (node0->getBasicType() == node1->getBasicType()) + return std::make_tuple(node0, node1); + + promoteTo = getConversionDestinatonType(node0->getBasicType(), node1->getBasicType(), op); + if (std::get<0>(promoteTo) == EbtNumTypes || std::get<1>(promoteTo) == EbtNumTypes) + return std::make_tuple(nullptr, nullptr); + + break; + + case EOpLogicalAnd: + case EOpLogicalOr: + case EOpLogicalXor: + if (source == EShSourceHlsl) + promoteTo = std::make_tuple(EbtBool, EbtBool); + else + return std::make_tuple(node0, node1); + break; + + // There are no conversions needed for GLSL; the shift amount just needs to be an + // integer type, as does the base. + // HLSL can promote bools to ints to make this work. + case EOpLeftShift: + case EOpRightShift: + if (source == EShSourceHlsl) { + TBasicType node0BasicType = node0->getBasicType(); + if (node0BasicType == EbtBool) + node0BasicType = EbtInt; + if (node1->getBasicType() == EbtBool) + promoteTo = std::make_tuple(node0BasicType, EbtInt); + else + promoteTo = std::make_tuple(node0BasicType, node1->getBasicType()); + } else { + if (isTypeInt(node0->getBasicType()) && isTypeInt(node1->getBasicType())) + return std::make_tuple(node0, node1); + else + return std::make_tuple(nullptr, nullptr); + } + break; + + default: + if (node0->getType() == node1->getType()) + return std::make_tuple(node0, node1); + + return std::make_tuple(nullptr, nullptr); + } + + TIntermTyped* newNode0; + TIntermTyped* newNode1; + + if (std::get<0>(promoteTo) != node0->getType().getBasicType()) { + if (node0->getAsConstantUnion()) + newNode0 = promoteConstantUnion(std::get<0>(promoteTo), node0->getAsConstantUnion()); + else + newNode0 = createConversion(std::get<0>(promoteTo), node0); + } else + newNode0 = node0; + + if (std::get<1>(promoteTo) != node1->getType().getBasicType()) { + if (node1->getAsConstantUnion()) + newNode1 = promoteConstantUnion(std::get<1>(promoteTo), node1->getAsConstantUnion()); + else + newNode1 = createConversion(std::get<1>(promoteTo), node1); + } else + newNode1 = node1; + + return std::make_tuple(newNode0, newNode1); +} + +// +// Convert the node's type to the given type, as allowed by the operation involved: 'op'. +// For implicit conversions, 'op' is not the requested conversion, it is the explicit +// operation requiring the implicit conversion. +// +// Binary operation conversions should be handled by addConversion(op, node, node), not here. +// +// Returns a node representing the conversion, which could be the same +// node passed in if no conversion was needed. +// +// Generally, this is focused on basic type conversion, not shape conversion. +// See addShapeConversion() for shape conversions. +// +// Return nullptr if a conversion can't be done. +// +TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) const +{ + if (!isConversionAllowed(op, node)) + return nullptr; + + // Otherwise, if types are identical, no problem + if (type == node->getType()) + return node; + + // If one's a structure, then no conversions. + if (type.isStruct() || node->isStruct()) + return nullptr; + + // If one's an array, then no conversions. + if (type.isArray() || node->getType().isArray()) + return nullptr; + + // Note: callers are responsible for other aspects of shape, + // like vector and matrix sizes. + + TBasicType promoteTo; + + switch (op) { + // + // Explicit conversions (unary operations) + // + case EOpConstructBool: + promoteTo = EbtBool; + break; + case EOpConstructFloat: + promoteTo = EbtFloat; + break; + case EOpConstructDouble: + promoteTo = EbtDouble; + break; + case EOpConstructFloat16: + promoteTo = EbtFloat16; + break; + case EOpConstructInt8: + promoteTo = EbtInt8; + break; + case EOpConstructUint8: + promoteTo = EbtUint8; + break; + case EOpConstructInt16: + promoteTo = EbtInt16; + break; + case EOpConstructUint16: + promoteTo = EbtUint16; + break; + case EOpConstructInt: + promoteTo = EbtInt; + break; + case EOpConstructUint: + promoteTo = EbtUint; + break; + case EOpConstructInt64: + promoteTo = EbtInt64; + break; + case EOpConstructUint64: + promoteTo = EbtUint64; + break; + + case EOpLogicalNot: + + case EOpFunctionCall: + + case EOpReturn: + case EOpAssign: + case EOpAddAssign: + case EOpSubAssign: + case EOpMulAssign: + case EOpVectorTimesScalarAssign: + case EOpMatrixTimesScalarAssign: + case EOpDivAssign: + case EOpModAssign: + case EOpAndAssign: + case EOpInclusiveOrAssign: + case EOpExclusiveOrAssign: + + case EOpAtan: + case EOpClamp: + case EOpCross: + case EOpDistance: + case EOpDot: + case EOpDst: + case EOpFaceForward: + case EOpFma: + case EOpFrexp: + case EOpLdexp: + case EOpMix: + case EOpLit: + case EOpMax: + case EOpMin: + case EOpModf: + case EOpPow: + case EOpReflect: + case EOpRefract: + case EOpSmoothStep: + case EOpStep: + + case EOpSequence: + case EOpConstructStruct: + + if (type.getBasicType() == node->getType().getBasicType()) + return node; + + if (canImplicitlyPromote(node->getBasicType(), type.getBasicType(), op)) + promoteTo = type.getBasicType(); + else + return nullptr; + break; + + // For GLSL, there are no conversions needed; the shift amount just needs to be an + // integer type, as do the base/result. + // HLSL can convert the shift from a bool to an int. + case EOpLeftShiftAssign: + case EOpRightShiftAssign: + { + if (source == EShSourceHlsl && node->getType().getBasicType() == EbtBool) + promoteTo = type.getBasicType(); + else { + if (isTypeInt(type.getBasicType()) && isTypeInt(node->getBasicType())) + return node; + else + return nullptr; + } + break; + } + + default: + // default is to require a match; all exceptions should have case statements above + + if (type.getBasicType() == node->getType().getBasicType()) + return node; + else + return nullptr; + } + + if (node->getAsConstantUnion()) + return promoteConstantUnion(promoteTo, node->getAsConstantUnion()); + + // + // Add a new newNode for the conversion. + // + TIntermUnary* newNode = createConversion(promoteTo, node); + + return newNode; +} + // Convert the node's shape of type for the given type, as allowed by the // operation involved: 'op'. This is for situations where there is only one // direction to consider doing the shape conversion. @@ -1019,12 +1155,11 @@ void TIntermediate::addBiShapeConversion(TOperator op, TIntermTyped*& lhsNode, T rhsNode = addShapeConversion(lhsNode->getType(), rhsNode); } -// Convert the node's shape of type for the given type. It's not necessarily -// an error if they are different and not converted, as some operations accept -// mixed types. Promotion will do final shape checking. +// Convert the node's shape of type for the given type, as allowed by the +// operation involved: 'op'. // -// If there is a chance of two nodes, with conversions possible in each direction, -// the policy for what to ask for must be in the caller; this will do what is asked. +// Generally, the AST represents allowed GLSL shapes, so this isn't needed +// for GLSL. Bad shapes are caught in conversion or promotion. // // Return 'node' if no conversion was done. Promotion handles final shape // checking. @@ -1080,6 +1215,166 @@ TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* return node; } +bool TIntermediate::isIntegralPromotion(TBasicType from, TBasicType to) const +{ + // integral promotions + if (to == EbtInt) { + switch(from) { + case EbtInt8: + case EbtInt16: + case EbtUint8: + case EbtUint16: + return true; + default: + break; + } + } + return false; +} + +bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const +{ + // floating-point promotions + if (to == EbtDouble) { + switch(from) { + case EbtFloat16: + case EbtFloat: + return true; + default: + break; + } + } + return false; +} + +bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const +{ + switch (from) { + case EbtInt8: + switch (to) { + case EbtUint8: + case EbtInt16: + case EbtUint16: + case EbtUint: + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtUint8: + switch (to) { + case EbtInt16: + case EbtUint16: + case EbtUint: + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtInt16: + switch(to) { + case EbtUint16: + case EbtUint: + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtUint16: + switch(to) { + case EbtUint: + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtInt: + switch(to) { + case EbtUint: + return version >= 400 || (source == EShSourceHlsl); + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtUint: + switch(to) { + case EbtInt64: + case EbtUint64: + return true; + default: + break; + } + break; + case EbtInt64: + if (to == EbtUint64) { + return true; + } + break; + default: + break; + } + return false; +} + +bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const +{ + if (to == EbtFloat && from == EbtFloat16) { + return true; + } else { + return false; + } +} + +bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const +{ + switch (from) { + case EbtInt8: + case EbtUint8: + case EbtInt16: + case EbtUint16: + switch (to) { + case EbtFloat16: + case EbtFloat: + case EbtDouble: + return true; + default: + break; + } + break; + case EbtInt: + case EbtUint: + switch(to) { + case EbtFloat: + case EbtDouble: + return true; + default: + break; + } + break; + case EbtInt64: + case EbtUint64: + if (to == EbtDouble) { + return true; + } + break; + + default: + break; + } + return false; +} + // // See if the 'from' type is allowed to be implicitly converted to the // 'to' type. This is not about vector/array/struct, only about basic type. @@ -1125,120 +1420,337 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat } } - switch (to) { - case EbtDouble: - switch (from) { - case EbtInt: - case EbtUint: - case EbtInt64: - case EbtUint64: -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: -#endif - case EbtFloat: + bool explicitTypesEnabled = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int32) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int64) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float16) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float32) || + extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float64); + + if (explicitTypesEnabled) { + // integral promotions + if (isIntegralPromotion(from, to)) { + return true; + } + + // floating-point promotions + if (isFPPromotion(from, to)) { + return true; + } + + // integral conversions + if (isIntegralConversion(from, to)) { + return true; + } + + // floating-point conversions + if (isFPConversion(from, to)) { + return true; + } + + // floating-integral conversions + if (isFPIntegralConversion(from, to)) { + return true; + } + + // hlsl supported conversions + if (source == EShSourceHlsl) { + if (from == EbtBool && (to == EbtInt || to == EbtUint || to == EbtFloat)) + return true; + } + } else { + switch (to) { case EbtDouble: + switch (from) { + case EbtInt: + case EbtUint: + case EbtInt64: + case EbtUint64: #ifdef AMD_EXTENSIONS - case EbtFloat16: + case EbtInt16: + case EbtUint16: #endif - return true; - default: - return false; - } - case EbtFloat: - switch (from) { - case EbtInt: - case EbtUint: + case EbtFloat: + case EbtDouble: #ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: + case EbtFloat16: #endif + return true; + default: + return false; + } case EbtFloat: + switch (from) { + case EbtInt: + case EbtUint: #ifdef AMD_EXTENSIONS - case EbtFloat16: + case EbtInt16: + case EbtUint16: #endif - return true; - case EbtBool: - return (source == EShSourceHlsl); - default: - return false; - } - case EbtUint: - switch (from) { - case EbtInt: - return version >= 400 || (source == EShSourceHlsl); + case EbtFloat: +#ifdef AMD_EXTENSIONS + case EbtFloat16: +#endif + return true; + case EbtBool: + return (source == EShSourceHlsl); + default: + return false; + } case EbtUint: + switch (from) { + case EbtInt: + return version >= 400 || (source == EShSourceHlsl); + case EbtUint: #ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: + case EbtInt16: + case EbtUint16: #endif - return true; - case EbtBool: - return (source == EShSourceHlsl); - default: - return false; - } - case EbtInt: - switch (from) { + return true; + case EbtBool: + return (source == EShSourceHlsl); + default: + return false; + } case EbtInt: + switch (from) { + case EbtInt: #ifdef AMD_EXTENSIONS - case EbtInt16: + case EbtInt16: +#endif + return true; + case EbtBool: + return (source == EShSourceHlsl); + default: + return false; + } + case EbtUint64: + switch (from) { + case EbtInt: + case EbtUint: + case EbtInt64: + case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif + return true; + default: + return false; + } + case EbtInt64: + switch (from) { + case EbtInt: + case EbtInt64: +#ifdef AMD_EXTENSIONS + case EbtInt16: +#endif + return true; + default: + return false; + } +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch (from) { + case EbtInt16: + case EbtUint16: + case EbtFloat16: + return true; + default: + return false; + } + case EbtUint16: + switch (from) { + case EbtInt16: + case EbtUint16: + return true; + default: + return false; + } #endif - return true; - case EbtBool: - return (source == EShSourceHlsl); default: return false; } - case EbtUint64: - switch (from) { - case EbtInt: + } + + return false; +} + +static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType) { + switch(sintType) { + case EbtInt8: + switch(uintType) { + case EbtUint8: + case EbtUint16: case EbtUint: - case EbtInt64: case EbtUint64: -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: -#endif - return true; + return false; default: + assert(false); return false; } - case EbtInt64: - switch (from) { - case EbtInt: - case EbtInt64: -#ifdef AMD_EXTENSIONS - case EbtInt16: -#endif + break; + case EbtInt16: + switch(uintType) { + case EbtUint8: return true; + case EbtUint16: + case EbtUint: + case EbtUint64: + return false; default: + assert(false); return false; } -#ifdef AMD_EXTENSIONS - case EbtFloat16: - switch (from) { - case EbtInt16: + break; + case EbtInt: + switch(uintType) { + case EbtUint8: case EbtUint16: - case EbtFloat16: return true; + case EbtUint: + return false; default: + assert(false); return false; } - case EbtUint16: - switch (from) { - case EbtInt16: + break; + case EbtInt64: + switch(uintType) { + case EbtUint8: case EbtUint16: + case EbtUint: return true; + case EbtUint64: + return false; default: + assert(false); return false; } -#endif + break; default: + assert(false); return false; } } + +static TBasicType getCorrespondingUnsignedType(TBasicType type) { + switch(type) { + case EbtInt8: + return EbtUint8; + case EbtInt16: + return EbtUint16; + case EbtInt: + return EbtUint; + case EbtInt64: + return EbtUint64; + default: + assert(false); + return EbtNumTypes; + } +} + +// Implements the following rules +// - If either operand has type float64_t or derived from float64_t, +// the other shall be converted to float64_t or derived type. +// - Otherwise, if either operand has type float32_t or derived from +// float32_t, the other shall be converted to float32_t or derived type. +// - Otherwise, if either operand has type float16_t or derived from +// float16_t, the other shall be converted to float16_t or derived type. +// - Otherwise, if both operands have integer types the following rules +// shall be applied to the operands: +// - If both operands have the same type, no further conversion +// is needed. +// - Otherwise, if both operands have signed integer types or both +// have unsigned integer types, the operand with the type of lesser +// integer conversion rank shall be converted to the type of the +// operand with greater rank. +// - Otherwise, if the operand that has unsigned integer type has rank +// greater than or equal to the rank of the type of the other +// operand, the operand with signed integer type shall be converted +// to the type of the operand with unsigned integer type. +// - Otherwise, if the type of the operand with signed integer type can +// represent all of the values of the type of the operand with +// unsigned integer type, the operand with unsigned integer type +// shall be converted to the type of the operand with signed +// integer type. +// - Otherwise, both operands shall be converted to the unsigned +// integer type corresponding to the type of the operand with signed +// integer type. + +std::tuple TIntermediate::getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const +{ + TBasicType res0 = EbtNumTypes; + TBasicType res1 = EbtNumTypes; + + if (profile == EEsProfile || version == 110) + return std::make_tuple(res0, res1);; + + if (source == EShSourceHlsl) { + if (canImplicitlyPromote(type1, type0, op)) { + res0 = type0; + res1 = type0; + } else if (canImplicitlyPromote(type0, type1, op)) { + res0 = type1; + res1 = type1; + } + return std::make_tuple(res0, res1); + } + + if ((type0 == EbtDouble && canImplicitlyPromote(type1, EbtDouble, op)) || + (type1 == EbtDouble && canImplicitlyPromote(type0, EbtDouble, op)) ) { + res0 = EbtDouble; + res1 = EbtDouble; + } else if ((type0 == EbtFloat && canImplicitlyPromote(type1, EbtFloat, op)) || + (type1 == EbtFloat && canImplicitlyPromote(type0, EbtFloat, op)) ) { + res0 = EbtFloat; + res1 = EbtFloat; + } else if ((type0 == EbtFloat16 && canImplicitlyPromote(type1, EbtFloat16, op)) || + (type1 == EbtFloat16 && canImplicitlyPromote(type0, EbtFloat16, op)) ) { + res0 = EbtFloat16; + res1 = EbtFloat16; + } else if (isTypeInt(type0) && isTypeInt(type1) && + (canImplicitlyPromote(type0, type1, op) || canImplicitlyPromote(type1, type0, op))) { + if ((isTypeSignedInt(type0) && isTypeSignedInt(type1)) || + (isTypeUnsignedInt(type0) && isTypeUnsignedInt(type1))) { + if (getTypeRank(type0) < getTypeRank(type1)) { + res0 = type1; + res1 = type1; + } else { + res0 = type0; + res1 = type0; + } + } else if (isTypeUnsignedInt(type0) && (getTypeRank(type0) > getTypeRank(type1))) { + res0 = type0; + res1 = type0; + } else if (isTypeUnsignedInt(type1) && (getTypeRank(type1) > getTypeRank(type0))) { + res0 = type1; + res1 = type1; + } else if (isTypeSignedInt(type0)) { + if (canSignedIntTypeRepresentAllUnsignedValues(type0, type1)) { + res0 = type0; + res1 = type0; + } else { + res0 = getCorrespondingUnsignedType(type0); + res1 = getCorrespondingUnsignedType(type0); + } + } else if (isTypeSignedInt(type1)) { + if (canSignedIntTypeRepresentAllUnsignedValues(type1, type0)) { + res0 = type1; + res1 = type1; + } else { + res0 = getCorrespondingUnsignedType(type1); + res1 = getCorrespondingUnsignedType(type1); + } + } + } + + return std::make_tuple(res0, res1); +} + // // Given a type, find what operation would fully construct it. // @@ -1246,6 +1758,9 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const { TOperator op = EOpNull; + if (type.getQualifier().nonUniform) + return EOpConstructNonuniform; + switch (type.getBasicType()) { case EbtStruct: op = EOpConstructStruct; @@ -1331,7 +1846,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const } } break; -#ifdef AMD_EXTENSIONS case EbtFloat16: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { @@ -1361,17 +1875,52 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const break; } } - else { - switch (type.getVectorSize()) { - case 1: op = EOpConstructFloat16; break; - case 2: op = EOpConstructF16Vec2; break; - case 3: op = EOpConstructF16Vec3; break; - case 4: op = EOpConstructF16Vec4; break; - default: break; // some compilers want this - } + else { + switch (type.getVectorSize()) { + case 1: op = EOpConstructFloat16; break; + case 2: op = EOpConstructF16Vec2; break; + case 3: op = EOpConstructF16Vec3; break; + case 4: op = EOpConstructF16Vec4; break; + default: break; // some compilers want this + } + } + break; + case EbtInt8: + switch(type.getVectorSize()) { + case 1: op = EOpConstructInt8; break; + case 2: op = EOpConstructI8Vec2; break; + case 3: op = EOpConstructI8Vec3; break; + case 4: op = EOpConstructI8Vec4; break; + default: break; // some compilers want this + } + break; + case EbtUint8: + switch(type.getVectorSize()) { + case 1: op = EOpConstructUint8; break; + case 2: op = EOpConstructU8Vec2; break; + case 3: op = EOpConstructU8Vec3; break; + case 4: op = EOpConstructU8Vec4; break; + default: break; // some compilers want this + } + break; + case EbtInt16: + switch(type.getVectorSize()) { + case 1: op = EOpConstructInt16; break; + case 2: op = EOpConstructI16Vec2; break; + case 3: op = EOpConstructI16Vec3; break; + case 4: op = EOpConstructI16Vec4; break; + default: break; // some compilers want this + } + break; + case EbtUint16: + switch(type.getVectorSize()) { + case 1: op = EOpConstructUint16; break; + case 2: op = EOpConstructU16Vec2; break; + case 3: op = EOpConstructU16Vec3; break; + case 4: op = EOpConstructU16Vec4; break; + default: break; // some compilers want this } break; -#endif case EbtInt: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { @@ -1466,26 +2015,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const default: break; // some compilers want this } break; -#ifdef AMD_EXTENSIONS - case EbtInt16: - switch(type.getVectorSize()) { - case 1: op = EOpConstructInt16; break; - case 2: op = EOpConstructI16Vec2; break; - case 3: op = EOpConstructI16Vec3; break; - case 4: op = EOpConstructI16Vec4; break; - default: break; // some compilers want this - } - break; - case EbtUint16: - switch(type.getVectorSize()) { - case 1: op = EOpConstructUint16; break; - case 2: op = EOpConstructU16Vec2; break; - case 3: op = EOpConstructU16Vec3; break; - case 4: op = EOpConstructU16Vec4; break; - default: break; // some compilers want this - } - break; -#endif case EbtBool: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { @@ -1614,7 +2143,7 @@ TIntermAggregate* TIntermediate::makeAggregate(const TSourceLoc& loc) // // Returns the selection node created. // -TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc, TSelectionControl control) +TIntermSelection* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc) { // // Don't prune the false path for compile-time constants; it's needed @@ -1623,7 +2152,6 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair no TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2); node->setLoc(loc); - node->setSelectionControl(control); return node; } @@ -1666,27 +2194,28 @@ TIntermTyped* TIntermediate::addMethod(TIntermTyped* object, const TType& type, // // Returns the selection node created, or nullptr if one could not be. // -TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc& loc, TSelectionControl control) +TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, + const TSourceLoc& loc) { // If it's void, go to the if-then-else selection() if (trueBlock->getBasicType() == EbtVoid && falseBlock->getBasicType() == EbtVoid) { TIntermNodePair pair = { trueBlock, falseBlock }; - return addSelection(cond, pair, loc, control); + TIntermSelection* selection = addSelection(cond, pair, loc); + if (getSource() == EShSourceHlsl) + selection->setNoShortCircuit(); + + return selection; } // // Get compatible types. // - TIntermTyped* child = addConversion(EOpSequence, trueBlock->getType(), falseBlock); - if (child) - falseBlock = child; - else { - child = addConversion(EOpSequence, falseBlock->getType(), trueBlock); - if (child) - trueBlock = child; - else - return nullptr; - } + auto children = addConversion(EOpSequence, trueBlock, falseBlock); + trueBlock = std::get<0>(children); + falseBlock = std::get<1>(children); + + if (trueBlock == nullptr || falseBlock == nullptr) + return nullptr; // Handle a vector condition as a mix if (!cond->getType().isScalarOrVec1()) { @@ -1742,6 +2271,9 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true else node->getQualifier().makeTemporary(); + if (getSource() == EShSourceHlsl) + node->setNoShortCircuit(); + return node; } @@ -1761,6 +2293,37 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(const TConstUnionArray& un return node; } +TIntermConstantUnion* TIntermediate::addConstantUnion(signed char i8, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setI8Const(i8); + + return addConstantUnion(unionArray, TType(EbtInt8, EvqConst), loc, literal); +} + +TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned char u8, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setUConst(u8); + + return addConstantUnion(unionArray, TType(EbtUint8, EvqConst), loc, literal); +} + +TIntermConstantUnion* TIntermediate::addConstantUnion(signed short i16, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setI16Const(i16); + + return addConstantUnion(unionArray, TType(EbtInt16, EvqConst), loc, literal); +} + +TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned short u16, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setU16Const(u16); + + return addConstantUnion(unionArray, TType(EbtUint16, EvqConst), loc, literal); +} TIntermConstantUnion* TIntermediate::addConstantUnion(int i, const TSourceLoc& loc, bool literal) const { @@ -1794,24 +2357,6 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned long long u64, co return addConstantUnion(unionArray, TType(EbtUint64, EvqConst), loc, literal); } -#ifdef AMD_EXTENSIONS -TIntermConstantUnion* TIntermediate::addConstantUnion(short i16, const TSourceLoc& loc, bool literal) const -{ - TConstUnionArray unionArray(1); - unionArray[0].setIConst(i16); - - return addConstantUnion(unionArray, TType(EbtInt16, EvqConst), loc, literal); -} - -TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned short u16, const TSourceLoc& loc, bool literal) const -{ - TConstUnionArray unionArray(1); - unionArray[0].setUConst(u16); - - return addConstantUnion(unionArray, TType(EbtUint16, EvqConst), loc, literal); -} -#endif - TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); @@ -1822,11 +2367,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseType, const TSourceLoc& loc, bool literal) const { -#ifdef AMD_EXTENSIONS assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16); -#else - assert(baseType == EbtFloat || baseType == EbtDouble); -#endif TConstUnionArray unionArray(1); unionArray[0].setDConst(d); @@ -1909,11 +2450,11 @@ const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool // // Create while and do-while loop nodes. // -TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc, TLoopControl control) +TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, + const TSourceLoc& loc) { TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); - node->setLoopControl(control); return node; } @@ -1921,11 +2462,11 @@ TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TInte // // Create a for-loop sequence. // -TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc, TLoopControl control) +TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, + TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc, TIntermLoop*& node) { - TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst); + node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); - node->setLoopControl(control); // make a sequence of the initializer and statement, but try to reuse the // aggregate already created for whatever is in the initializer, if there is one @@ -2121,12 +2662,10 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const case EOpVectorSwizzle: case EOpConvFloatToDouble: case EOpConvDoubleToFloat: -#ifdef AMD_EXTENSIONS case EOpConvFloat16ToFloat: case EOpConvFloatToFloat16: case EOpConvFloat16ToDouble: case EOpConvDoubleToFloat16: -#endif return true; default: return false; @@ -2150,51 +2689,97 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const case EOpIndexDirectStruct: case EOpVectorSwizzle: - // conversion constructors + // (u)int* -> bool + case EOpConvInt8ToBool: + case EOpConvInt16ToBool: case EOpConvIntToBool: + case EOpConvInt64ToBool: + case EOpConvUint8ToBool: + case EOpConvUint16ToBool: case EOpConvUintToBool: - case EOpConvUintToInt: + case EOpConvUint64ToBool: + + // bool -> (u)int* + case EOpConvBoolToInt8: + case EOpConvBoolToInt16: case EOpConvBoolToInt: - case EOpConvIntToUint: - case EOpConvBoolToUint: - case EOpConvInt64ToBool: case EOpConvBoolToInt64: - case EOpConvUint64ToBool: + case EOpConvBoolToUint8: + case EOpConvBoolToUint16: + case EOpConvBoolToUint: case EOpConvBoolToUint64: - case EOpConvInt64ToInt: - case EOpConvIntToInt64: - case EOpConvUint64ToUint: - case EOpConvUintToUint64: - case EOpConvInt64ToUint64: - case EOpConvUint64ToInt64: - case EOpConvInt64ToUint: - case EOpConvUintToInt64: - case EOpConvUint64ToInt: - case EOpConvIntToUint64: -#ifdef AMD_EXTENSIONS - case EOpConvInt16ToBool: - case EOpConvBoolToInt16: + + // int8_t -> (u)int* + case EOpConvInt8ToInt16: + case EOpConvInt8ToInt: + case EOpConvInt8ToInt64: + case EOpConvInt8ToUint8: + case EOpConvInt8ToUint16: + case EOpConvInt8ToUint: + case EOpConvInt8ToUint64: + + // int16_t -> (u)int* + case EOpConvInt16ToInt8: case EOpConvInt16ToInt: - case EOpConvIntToInt16: - case EOpConvInt16ToUint: - case EOpConvUintToInt16: case EOpConvInt16ToInt64: - case EOpConvInt64ToInt16: + case EOpConvInt16ToUint8: + case EOpConvInt16ToUint16: + case EOpConvInt16ToUint: case EOpConvInt16ToUint64: - case EOpConvUint64ToInt16: - case EOpConvUint16ToBool: - case EOpConvBoolToUint16: - case EOpConvUint16ToInt: + + // int32_t -> (u)int* + case EOpConvIntToInt8: + case EOpConvIntToInt16: + case EOpConvIntToInt64: + case EOpConvIntToUint8: case EOpConvIntToUint16: - case EOpConvUint16ToUint: - case EOpConvUintToUint16: - case EOpConvUint16ToInt64: + case EOpConvIntToUint: + case EOpConvIntToUint64: + + // int64_t -> (u)int* + case EOpConvInt64ToInt8: + case EOpConvInt64ToInt16: + case EOpConvInt64ToInt: + case EOpConvInt64ToUint8: case EOpConvInt64ToUint16: + case EOpConvInt64ToUint: + case EOpConvInt64ToUint64: + + // uint8_t -> (u)int* + case EOpConvUint8ToInt8: + case EOpConvUint8ToInt16: + case EOpConvUint8ToInt: + case EOpConvUint8ToInt64: + case EOpConvUint8ToUint16: + case EOpConvUint8ToUint: + case EOpConvUint8ToUint64: + + // uint16_t -> (u)int* + case EOpConvUint16ToInt8: + case EOpConvUint16ToInt16: + case EOpConvUint16ToInt: + case EOpConvUint16ToInt64: + case EOpConvUint16ToUint8: + case EOpConvUint16ToUint: case EOpConvUint16ToUint64: + + // uint32_t -> (u)int* + case EOpConvUintToInt8: + case EOpConvUintToInt16: + case EOpConvUintToInt: + case EOpConvUintToInt64: + case EOpConvUintToUint8: + case EOpConvUintToUint16: + case EOpConvUintToUint64: + + // uint64_t -> (u)int* + case EOpConvUint64ToInt8: + case EOpConvUint64ToInt16: + case EOpConvUint64ToInt: + case EOpConvUint64ToInt64: + case EOpConvUint64ToUint8: case EOpConvUint64ToUint16: - case EOpConvInt16ToUint16: - case EOpConvUint16ToInt16: -#endif + case EOpConvUint64ToUint: // unary operations case EOpNegative: @@ -2228,6 +2813,64 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const } } +// Is the operation one that must propagate nonuniform? +bool TIntermediate::isNonuniformPropagating(TOperator op) const +{ + // "* All Operators in Section 5.1 (Operators), except for assignment, + // arithmetic assignment, and sequence + // * Component selection in Section 5.5 + // * Matrix components in Section 5.6 + // * Structure and Array Operations in Section 5.7, except for the length + // method." + switch (op) { + case EOpPostIncrement: + case EOpPostDecrement: + case EOpPreIncrement: + case EOpPreDecrement: + + case EOpNegative: + case EOpLogicalNot: + case EOpVectorLogicalNot: + case EOpBitwiseNot: + + case EOpAdd: + case EOpSub: + case EOpMul: + case EOpDiv: + case EOpMod: + case EOpRightShift: + case EOpLeftShift: + case EOpAnd: + case EOpInclusiveOr: + case EOpExclusiveOr: + case EOpEqual: + case EOpNotEqual: + case EOpLessThan: + case EOpGreaterThan: + case EOpLessThanEqual: + case EOpGreaterThanEqual: + case EOpVectorTimesScalar: + case EOpVectorTimesMatrix: + case EOpMatrixTimesVector: + case EOpMatrixTimesScalar: + + case EOpLogicalOr: + case EOpLogicalXor: + case EOpLogicalAnd: + + case EOpIndexDirect: + case EOpIndexIndirect: + case EOpIndexDirectStruct: + case EOpVectorSwizzle: + return true; + + default: + break; + } + + return false; +} + //////////////////////////////////////////////////////////////// // // Member functions of the nodes used for building the tree. @@ -2312,7 +2955,7 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) // Convert operand to a boolean type if (operand->getBasicType() != EbtBool) { // Add constructor to boolean type. If that fails, we can't do it, so return false. - TIntermTyped* converted = convertToBasicType(op, EbtBool, operand); + TIntermTyped* converted = addConversion(op, TType(EbtBool), operand); if (converted == nullptr) return false; @@ -2321,15 +2964,7 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) } break; case EOpBitwiseNot: - if (operand->getBasicType() != EbtInt && - operand->getBasicType() != EbtUint && -#ifdef AMD_EXTENSIONS - operand->getBasicType() != EbtInt16 && - operand->getBasicType() != EbtUint16 && -#endif - operand->getBasicType() != EbtInt64 && - operand->getBasicType() != EbtUint64) - + if (!isTypeInt(operand->getBasicType())) return false; break; case EOpNegative: @@ -2337,18 +2972,9 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: - if (operand->getBasicType() != EbtInt && - operand->getBasicType() != EbtUint && - operand->getBasicType() != EbtInt64 && - operand->getBasicType() != EbtUint64 && -#ifdef AMD_EXTENSIONS - operand->getBasicType() != EbtInt16 && - operand->getBasicType() != EbtUint16 && -#endif + if (!isTypeInt(operand->getBasicType()) && operand->getBasicType() != EbtFloat && -#ifdef AMD_EXTENSIONS operand->getBasicType() != EbtFloat16 && -#endif operand->getBasicType() != EbtDouble) return false; @@ -2368,34 +2994,12 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) void TIntermUnary::updatePrecision() { -#ifdef AMD_EXTENSIONS if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { -#else - if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { -#endif if (operand->getQualifier().precision > getQualifier().precision) getQualifier().precision = operand->getQualifier().precision; } } -// If it is not already, convert this node to the given basic type. -TIntermTyped* TIntermediate::convertToBasicType(TOperator op, TBasicType basicType, TIntermTyped* node) const -{ - if (node == nullptr) - return nullptr; - - // It's already this basic type: nothing needs to be done, so use the node directly. - if (node->getBasicType() == basicType) - return node; - - const TType& type = node->getType(); - const TType newType(basicType, type.getQualifier().storage, - type.getVectorSize(), type.getMatrixCols(), type.getMatrixRows(), type.isVector()); - - // Add constructor to the right vectorness of the right type. If that fails, we can't do it, so return nullptr. - return addConversion(op, newType, node); -} - // // See TIntermediate::promote // @@ -2468,12 +3072,19 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) case EOpSub: case EOpDiv: case EOpMul: - left = addConversion(op, TType(EbtInt, EvqTemporary, left->getVectorSize()), left); - right = addConversion(op, TType(EbtInt, EvqTemporary, right->getVectorSize()), right); + if (left->getBasicType() == EbtBool) + left = createConversion(EbtInt, left); + if (right->getBasicType() == EbtBool) + right = createConversion(EbtInt, right); if (left == nullptr || right == nullptr) return false; node.setLeft(left); node.setRight(right); + + // Update the original base assumption on result type.. + node.setType(left->getType()); + node.getWritableType().getQualifier().clear(); + break; default: @@ -2515,21 +3126,17 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: - if (getSource() == EShSourceHlsl) { - TIntermTyped* convertedL = convertToBasicType(op, EbtBool, left); - TIntermTyped* convertedR = convertToBasicType(op, EbtBool, right); - if (convertedL == nullptr || convertedR == nullptr) + // logical ops operate only on Booleans or vectors of Booleans. + if (left->getBasicType() != EbtBool || left->isMatrix()) return false; - node.setLeft(left = convertedL); // also updates stack variable - node.setRight(right = convertedR); // also updates stack variable - } else { + + if (getSource() == EShSourceGlsl) { // logical ops operate only on scalar Booleans and will promote to scalar Boolean. - if (left->getBasicType() != EbtBool || left->isVector() || left->isMatrix()) + if (left->isVector()) return false; } node.setType(TType(EbtBool, EvqTemporary, left->getVectorSize())); - break; case EOpRightShift: @@ -2550,16 +3157,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) break; // Check for integer-only operands. - if ((left->getBasicType() != EbtInt && left->getBasicType() != EbtUint && -#ifdef AMD_EXTENSIONS - left->getBasicType() != EbtInt16 && left->getBasicType() != EbtUint16 && -#endif - left->getBasicType() != EbtInt64 && left->getBasicType() != EbtUint64) || - (right->getBasicType() != EbtInt && right->getBasicType() != EbtUint && -#ifdef AMD_EXTENSIONS - right->getBasicType() != EbtInt16 && right->getBasicType() != EbtUint16 && -#endif - right->getBasicType() != EbtInt64 && right->getBasicType() != EbtUint64)) + if (!isTypeInt(left->getBasicType()) && !isTypeInt(right->getBasicType())) return false; if (left->isMatrix() || right->isMatrix()) return false; @@ -2700,7 +3298,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) node.setOp(op = EOpMatrixTimesScalarAssign); } } else if (left->isMatrix() && right->isMatrix()) { - if (left->getMatrixCols() != left->getMatrixRows() || left->getMatrixCols() != right->getMatrixCols() || left->getMatrixCols() != right->getMatrixRows()) + if (left->getMatrixCols() != right->getMatrixCols() || left->getMatrixCols() != right->getMatrixRows()) return false; node.setOp(op = EOpMatrixTimesMatrixAssign); } else if (!left->isMatrix() && !right->isMatrix()) { @@ -2860,11 +3458,7 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node) void TIntermBinary::updatePrecision() { -#ifdef AMD_EXTENSIONS if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat || getBasicType() == EbtFloat16) { -#else - if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { -#endif getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision); if (getQualifier().precision != EpqNone) { left->propagatePrecision(getQualifier().precision); @@ -2875,11 +3469,7 @@ void TIntermBinary::updatePrecision() void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision) { -#ifdef AMD_EXTENSIONS if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat && getBasicType() != EbtFloat16)) -#else - if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat)) -#endif return; getQualifier().precision = newPrecision; @@ -2954,9 +3544,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i] = rightUnionArray[i]; break; default: @@ -2982,16 +3570,13 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i] = rightUnionArray[i]; break; default: return node; } break; -#ifdef AMD_EXTENSIONS case EbtFloat16: switch (node->getType().getBasicType()) { case EbtInt: @@ -3018,7 +3603,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC return node; } break; -#endif case EbtInt: switch (node->getType().getBasicType()) { case EbtInt: @@ -3038,9 +3622,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i].setIConst(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -3066,9 +3648,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i].setUConst(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -3094,9 +3674,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i].setBConst(rightUnionArray[i].getDConst() != 0.0); break; default: @@ -3122,9 +3700,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i].setI64Const(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -3150,9 +3726,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif leftUnionArray[i].setU64Const(static_cast(rightUnionArray[i].getDConst())); break; default: @@ -3170,10 +3744,10 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC node->getLoc()); } -void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) +void TIntermAggregate::setPragmaTable(const TPragmaTable& pTable) { - assert(!pragmaTable); - pragmaTable = new TPragmaTable(); + assert(pragmaTable == nullptr); + pragmaTable = new TPragmaTable; *pragmaTable = pTable; } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseContextBase.cpp index bbc3cac085f7233f8f7e9c6704a7e9ca62a6fb3b..bfa9de4dff7d3047ece19f0596ff5e485e3755f2 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseContextBase.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseContextBase.cpp @@ -228,6 +228,7 @@ void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, // must still be valid. // It is okay if the symbol's type will be subsequently edited; // the modifications will be tracked. +// Order is preserved, to avoid creating novel forward references. void TParseContextBase::trackLinkage(TSymbol& symbol) { if (!parsingBuiltins) @@ -242,7 +243,7 @@ void TParseContextBase::checkIndex(const TSourceLoc& loc, const TType& type, int error(loc, "", "[", "index out of range '%d'", index); index = 0; } else if (type.isArray()) { - if (type.isExplicitlySizedArray() && index >= type.getOuterArraySize()) { + if (type.isSizedArray() && index >= type.getOuterArraySize()) { error(loc, "", "[", "array index out of range '%d'", index); index = type.getOuterArraySize() - 1; } @@ -602,7 +603,7 @@ void TParseContextBase::finish() if (parsingBuiltins) return; - // Transfer the linkage symbols to AST nodes + // Transfer the linkage symbols to AST nodes, preserving order. TIntermAggregate* linkage = new TIntermAggregate; for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i) intermediate.addSymbolLinkageNode(linkage, **i); diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.cpp index a648b9bbab9c06ebc8a01e1d05eebb6b248ac247..45c050d451dc096319e9b3f46bf7e3fd10a0f83e 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -2,6 +2,7 @@ // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2015 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -266,6 +267,8 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& if (tokens.size() != 1) error(loc, "extra tokens", "#pragma", ""); intermediate.setUseStorageBuffer(); + } else if (tokens[0].compare("once") == 0) { + warn(loc, "not implemented", "#pragma once", ""); } } @@ -281,17 +284,17 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str()); if (symbol && symbol->isReadOnly()) { - // All shared things containing an implicitly sized array must be copied up + // All shared things containing an unsized array must be copied up // on first use, so that all future references will share its array structure, // so that editing the implicit size will effect all nodes consuming it, // and so that editing the implicit size won't change the shared one. // // If this is a variable or a block, check it and all it contains, but if this // is a member of an anonymous block, check the whole block, as the whole block - // will need to be copied up if it contains an implicitly-sized array. - if (symbol->getType().containsImplicitlySizedArray() || + // will need to be copied up if it contains an unsized array. + if (symbol->getType().containsUnsizedArray() || (symbol->getAsAnonMember() && - symbol->getAsAnonMember()->getAnonContainer().getType().containsImplicitlySizedArray())) + symbol->getAsAnonMember()->getAnonContainer().getType().containsUnsizedArray())) makeEditable(symbol); } @@ -369,21 +372,29 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } else { // at least one of base and index is not a front-end constant variable... + if (index->getQualifier().isFrontEndConstant()) + checkIndex(loc, base->getType(), indexValue); + if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) handleIoResizeArrayAccess(loc, base); if (index->getQualifier().isFrontEndConstant()) { - if (base->getType().isImplicitlySizedArray()) - updateImplicitArraySize(loc, base, indexValue); + if (base->getType().isUnsizedArray()) + base->getWritableType().updateImplicitArraySize(indexValue + 1); else checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { - if (base->getType().isImplicitlySizedArray()) { + if (base->getType().isUnsizedArray()) { + // we have a variable index into an unsized array, which is okay, + // depending on the situation if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) error(loc, "", "[", "array must be sized by a redeclaration or layout qualifier before being indexed with a variable"); - else - error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); + else { + // it is okay for a run-time sized array + checkRuntimeSizable(loc, *base); + } + base->getWritableType().setArrayVariablyIndexed(); } if (base->getBasicType() == EbtBlock) { if (base->getQualifier().storage == EvqBuffer) @@ -424,6 +435,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } result->setType(newType); + // Propagate nonuniform + if (base->getQualifier().isNonUniform() || index->getQualifier().isNonUniform()) + result->getWritableType().getQualifier().nonUniform = true; + if (anyIndexLimits) handleIndexLimits(loc, base, index); } @@ -482,7 +497,7 @@ void TParseContext::fixIoArraySize(const TSourceLoc& loc, TType& type) if (language == EShLangTessControl || language == EShLangTessEvaluation) { if (type.getOuterArraySize() != resources.maxPatchVertices) { - if (type.isExplicitlySizedArray()) + if (type.isSizedArray()) error(loc, "tessellation input array size must be gl_MaxPatchVertices or implicitly sized", "[]", ""); type.changeOuterArraySize(resources.maxPatchVertices); } @@ -515,7 +530,7 @@ void TParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TInterm return; // fix array size, if it can be fixed and needs to be fixed (will allow variable indexing) - if (symbolNode->getType().isImplicitlySizedArray()) { + if (symbolNode->getType().isUnsizedArray()) { int newSize = getIoArrayImplicitSize(); if (newSize > 0) symbolNode->getWritableType().changeOuterArraySize(newSize); @@ -565,7 +580,7 @@ int TParseContext::getIoArrayImplicitSize() const void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredSize, const char* feature, TType& type, const TString& name) { - if (type.isImplicitlySizedArray()) + if (type.isUnsizedArray()) type.changeOuterArraySize(requiredSize); else if (type.getOuterArraySize() != requiredSize) { if (language == EShLangGeometry) @@ -732,6 +747,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm if (base->getQualifier().noContraction) result->getWritableType().getQualifier().noContraction = true; + // Propagate nonuniform + if (base->getQualifier().isNonUniform()) + result->getWritableType().getQualifier().nonUniform = true; + return result; } @@ -776,7 +795,7 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getType() != function.getType()) - error(loc, "overloaded functions must have the same return type", function.getType().getBasicTypeString().c_str(), ""); + error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); @@ -950,7 +969,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && fnCandidate->getNumExtensions()) requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str()); - if (arguments) { + if (arguments != nullptr) { // Make sure qualifications work for these arguments. TIntermAggregate* aggregate = arguments->getAsAggregate(); for (int i = 0; i < fnCandidate->getParamCount(); ++i) { @@ -988,7 +1007,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) { // A function call mapped to a built-in operation. - result = handleBuiltInFunctionCall(loc, *arguments, *fnCandidate); + result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); } else { // This is a function call not mapped to built-in operator. // It could still be a built-in function, but only if PureOperatorBuiltins == false. @@ -1036,20 +1055,24 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction return result; } -TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNode& arguments, +TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNode* arguments, const TFunction& function) { checkLocation(loc, function.getBuiltInOp()); TIntermTyped *result = intermediate.addBuiltInFunctionCall(loc, function.getBuiltInOp(), function.getParamCount() == 1, - &arguments, function.getType()); + arguments, function.getType()); if (obeyPrecisionQualifiers()) computeBuiltinPrecisions(*result, function); - if (result == nullptr) { - error(arguments.getLoc(), " wrong operand type", "Internal Error", - "built in unary operator function. Type: %s", - static_cast(&arguments)->getCompleteString().c_str()); + if (result == nullptr) { + if (arguments == nullptr) + error(loc, " wrong operand type", "Internal Error", + "built in unary operator function. Type: %s", ""); + else + error(arguments->getLoc(), " wrong operand type", "Internal Error", + "built in unary operator function. Type: %s", + static_cast(arguments)->getCompleteString().c_str()); } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); @@ -1208,10 +1231,7 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction else { const TType& type = intermNode->getAsTyped()->getType(); if (type.isArray()) { - if (type.isRuntimeSizedArray()) { - // Create a unary op and let the back end handle it - return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); - } else if (type.isImplicitlySizedArray()) { + if (type.isUnsizedArray()) { if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) { // We could be between a layout declaration that gives a built-in io array implicit size and // a user redeclaration of that array, meaning we have to substitute its implicit size here @@ -1224,7 +1244,10 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction if (length == 0) { if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier"); - else + else if (isRuntimeLength(*intermNode->getAsTyped())) { + // Create a unary op and let the back end handle it + return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); + } else error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method"); } } else if (type.getOuterArrayNode()) { @@ -1378,6 +1401,8 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan arg0 = unaryArg; } + TString featureString; + const char* feature = nullptr; switch (callNode.getOp()) { case EOpTextureGather: case EOpTextureGatherOffset: @@ -1386,8 +1411,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan // Figure out which variants are allowed by what extensions, // and what arguments must be constant for which situations. - TString featureString = fnCandidate.getName() + "(...)"; - const char* feature = featureString.c_str(); + featureString = fnCandidate.getName(); + featureString += "(...)"; + feature = featureString.c_str(); profileRequires(loc, EEsProfile, 310, nullptr, feature); int compArg = -1; // track which argument, if any, is the constant component argument switch (callNode.getOp()) { @@ -1443,8 +1469,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan bias = fnCandidate.getParamCount() > 4; if (bias) { - TString biasFeatureString = fnCandidate.getName() + "with bias argument"; - const char* feature = biasFeatureString.c_str(); + featureString = fnCandidate.getName(); + featureString += "with bias argument"; + feature = featureString.c_str(); profileRequires(loc, ~EEsProfile, 450, nullptr, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); } @@ -1466,8 +1493,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan bias = fnCandidate.getParamCount() > 5; if (bias) { - TString featureString = fnCandidate.getName() + "with bias argument"; - const char* feature = featureString.c_str(); + featureString = fnCandidate.getName(); + featureString += "with bias argument"; + feature = featureString.c_str(); profileRequires(loc, ~EEsProfile, 450, nullptr, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); } @@ -1482,6 +1510,39 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan requireExtensions(loc, 1, &E_GL_ARB_sparse_texture2, fnCandidate.getName().c_str()); break; } + + case EOpSwizzleInvocations: + { + if (! (*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "offset", ""); + else { + unsigned offset[4] = {}; + offset[0] = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); + offset[1] = (*argp)[1]->getAsConstantUnion()->getConstArray()[1].getUConst(); + offset[2] = (*argp)[1]->getAsConstantUnion()->getConstArray()[2].getUConst(); + offset[3] = (*argp)[1]->getAsConstantUnion()->getConstArray()[3].getUConst(); + if (offset[0] > 3 || offset[1] > 3 || offset[2] > 3 || offset[3] > 3) + error(loc, "components must be in the range [0, 3]", "offset", ""); + } + + break; + } + + case EOpSwizzleInvocationsMasked: + { + if (! (*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "mask", ""); + else { + unsigned mask[3] = {}; + mask[0] = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); + mask[1] = (*argp)[1]->getAsConstantUnion()->getConstArray()[1].getUConst(); + mask[2] = (*argp)[1]->getAsConstantUnion()->getConstArray()[2].getUConst(); + if (mask[0] > 31 || mask[1] > 31 || mask[2] > 31) + error(loc, "components must be in the range [0, 31]", "mask", ""); + } + + break; + } #endif case EOpTextureOffset: @@ -1509,6 +1570,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } if (arg > 0) { + +#ifdef AMD_EXTENSIONS + bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow; + if (f16ShadowCompare) + ++arg; +#endif if (! (*argp)[arg]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "texel offset", ""); else { @@ -1574,6 +1641,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpInterpolateAtCentroid: case EOpInterpolateAtSample: case EOpInterpolateAtOffset: +#ifdef AMD_EXTENSIONS + case EOpInterpolateAtVertex: +#endif // Make sure the first argument is an interpolant, or an array element of an interpolant if (arg0->getType().getQualifier().storage != EvqVaryingIn) { // It might still be an array element. @@ -1588,6 +1658,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn) error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), ""); } + +#ifdef AMD_EXTENSIONS + if (callNode.getOp() == EOpInterpolateAtVertex) { + if (!arg0->getType().getQualifier().isExplicitInterpolation()) + error(loc, "argument must be qualified as __explicitInterpAMD in", "interpolant", ""); + else { + if (! (*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "vertex index", ""); + else { + unsigned vertexIdx = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (vertexIdx > 2) + error(loc, "must be in the range [0, 2]", "vertex index", ""); + } + } + } +#endif + break; case EOpEmitStreamVertex: @@ -1595,9 +1682,33 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan intermediate.setMultiStream(); break; + case EOpSubgroupClusteredAdd: + case EOpSubgroupClusteredMul: + case EOpSubgroupClusteredMin: + case EOpSubgroupClusteredMax: + case EOpSubgroupClusteredAnd: + case EOpSubgroupClusteredOr: + case EOpSubgroupClusteredXor: + if ((*argp)[1]->getAsConstantUnion() == nullptr) + error(loc, "argument must be compile-time constant", "cluster size", ""); + else { + int size = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getIConst(); + if (size < 1) + error(loc, "argument must be at least 1", "cluster size", ""); + else if (!IsPow2(size)) + error(loc, "argument must be a power of 2", "cluster size", ""); + } + break; + default: break; } + + if (callNode.getOp() > EOpSubgroupGuardStart && callNode.getOp() < EOpSubgroupGuardStop) { + // these require SPIR-V 1.3 + if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_3) + error(loc, "requires SPIR-V 1.3", "subgroup op", ""); + } } extern bool PureOperatorBuiltins; @@ -2159,7 +2270,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructDMat4x2: case EOpConstructDMat4x3: case EOpConstructDMat4x4: -#ifdef AMD_EXTENSIONS case EOpConstructF16Mat2x2: case EOpConstructF16Mat2x3: case EOpConstructF16Mat2x4: @@ -2169,7 +2279,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructF16Mat4x2: case EOpConstructF16Mat4x3: case EOpConstructF16Mat4x4: -#endif constructingMatrix = true; break; default: @@ -2190,7 +2299,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T bool floatArgument = false; for (int arg = 0; arg < function.getParamCount(); ++arg) { if (function[arg].type->isArray()) { - if (! function[arg].type->isExplicitlySizedArray()) { + if (function[arg].type->isUnsizedArray()) { // Can't construct from an unsized array. error(loc, "array argument must be sized", "constructor", ""); return true; @@ -2226,18 +2335,30 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // Finish pinning down spec-const semantics if (specConstType) { switch (op) { + case EOpConstructInt8: + case EOpConstructUint8: + case EOpConstructInt16: + case EOpConstructUint16: case EOpConstructInt: case EOpConstructUint: case EOpConstructInt64: case EOpConstructUint64: -#ifdef AMD_EXTENSIONS - case EOpConstructInt16: - case EOpConstructUint16: -#endif case EOpConstructBool: case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: + case EOpConstructI8Vec2: + case EOpConstructI8Vec3: + case EOpConstructI8Vec4: + case EOpConstructU8Vec2: + case EOpConstructU8Vec3: + case EOpConstructU8Vec4: + case EOpConstructI16Vec2: + case EOpConstructI16Vec3: + case EOpConstructI16Vec4: + case EOpConstructU16Vec2: + case EOpConstructU16Vec3: + case EOpConstructU16Vec4: case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: @@ -2250,14 +2371,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: -#ifdef AMD_EXTENSIONS - case EOpConstructI16Vec2: - case EOpConstructI16Vec3: - case EOpConstructI16Vec4: - case EOpConstructU16Vec2: - case EOpConstructU16Vec3: - case EOpConstructU16Vec4: -#endif // This was the list of valid ones, if they aren't converting from float // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); @@ -2284,7 +2397,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T return true; } - if (type.isImplicitlySizedArray()) { + if (type.isUnsizedArray()) { // auto adapt the constructor type to the number of arguments type.changeOuterArraySize(function.getParamCount()); } else if (type.getOuterArraySize() != function.getParamCount()) { @@ -2296,20 +2409,21 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // Types have to match, but we're still making the type. // Finish making the type, and the comparison is done later // when checking for conversion. - TArraySizes& arraySizes = type.getArraySizes(); + TArraySizes& arraySizes = *type.getArraySizes(); // At least the dimensionalities have to match. - if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) { + if (! function[0].type->isArray() || + arraySizes.getNumDims() != function[0].type->getArraySizes()->getNumDims() + 1) { error(loc, "array constructor argument not correct type to construct array element", "constructor", ""); return true; } - if (arraySizes.isInnerImplicit()) { + if (arraySizes.isInnerUnsized()) { // "Arrays of arrays ..., and the size for any dimension is optional" // That means we need to adopt (from the first argument) the other array sizes into the type. for (int d = 1; d < arraySizes.getNumDims(); ++d) { if (arraySizes.getDimSize(d) == UnsizedArraySize) { - arraySizes.setDimSize(d, function[0].type->getArraySizes().getDimSize(d - 1)); + arraySizes.setDimSize(d, function[0].type->getArraySizes()->getDimSize(d - 1)); } } } @@ -2510,17 +2624,33 @@ void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& t } } +// +// Qualifier checks knowing the qualifier and that it is a member of a struct/block. +// +void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType) +{ + globalQualifierFixCheck(publicType.loc, publicType.qualifier); + checkNoShaderLayouts(publicType.loc, publicType.shaderQualifiers); + if (publicType.qualifier.isNonUniform()) { + error(publicType.loc, "not allowed on block or structure members", "nonuniformEXT", ""); + publicType.qualifier.nonUniform = false; + } +} + // // Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier) { + bool nonuniformOkay = false; + // move from parameter/unknown qualifiers to pipeline in/out qualifiers switch (qualifier.storage) { case EvqIn: profileRequires(loc, ENoProfile, 130, nullptr, "in for stage inputs"); profileRequires(loc, EEsProfile, 300, nullptr, "in for stage inputs"); qualifier.storage = EvqVaryingIn; + nonuniformOkay = true; break; case EvqOut: profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs"); @@ -2531,10 +2661,17 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q qualifier.storage = EvqVaryingIn; error(loc, "cannot use 'inout' at global scope", "", ""); break; + case EvqGlobal: + case EvqTemporary: + nonuniformOkay = true; + break; default: break; } + if (!nonuniformOkay && qualifier.nonUniform) + error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", ""); + invariantCheck(loc, qualifier); } @@ -2560,17 +2697,12 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali // now, knowing it is a shader in/out, do all the in/out semantic checks - if (publicType.basicType == EbtBool) { + if (publicType.basicType == EbtBool && !parsingBuiltins) { error(loc, "cannot be bool", GetStorageQualifierString(qualifier.storage), ""); return; } - if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || -#ifdef AMD_EXTENSIONS - publicType.basicType == EbtInt16 || publicType.basicType == EbtUint16 || -#endif - publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 || - publicType.basicType == EbtDouble) + if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output"); #ifdef AMD_EXTENSIONS @@ -2578,13 +2710,13 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali #else if (!qualifier.flat) { #endif - if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || -#ifdef AMD_EXTENSIONS - publicType.basicType == EbtInt16 || publicType.basicType == EbtUint16 || -#endif - publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 || + if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble || - (publicType.userDef && (publicType.userDef->containsBasicType(EbtInt) || + (publicType.userDef && (publicType.userDef->containsBasicType(EbtInt8) || + publicType.userDef->containsBasicType(EbtUint8) || + publicType.userDef->containsBasicType(EbtInt16) || + publicType.userDef->containsBasicType(EbtUint16) || + publicType.userDef->containsBasicType(EbtInt) || publicType.userDef->containsBasicType(EbtUint) || publicType.userDef->containsBasicType(EbtInt64) || publicType.userDef->containsBasicType(EbtUint64) || @@ -2686,8 +2818,8 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali error(loc, "can't use auxiliary qualifier on a fragment output", "centroid/sample/patch", ""); if (qualifier.isInterpolation()) error(loc, "can't use interpolation qualifier on a fragment output", "flat/smooth/noperspective", ""); - if (publicType.basicType == EbtDouble) - error(loc, "cannot contain a double", GetStorageQualifierString(qualifier.storage), ""); + if (publicType.basicType == EbtDouble || publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64) + error(loc, "cannot contain a double, int64, or uint64", GetStorageQualifierString(qualifier.storage), ""); break; case EShLangCompute: @@ -2788,6 +2920,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); MERGE_SINGLETON(specConstant); + MERGE_SINGLETON(nonUniform); if (repeated) error(loc, "replicated qualifiers", "", ""); @@ -2988,7 +3121,7 @@ bool TParseContext::arrayError(const TSourceLoc& loc, const TType& type) // void TParseContext::arraySizeRequiredCheck(const TSourceLoc& loc, const TArraySizes& arraySizes) { - if (arraySizes.isImplicit()) + if (arraySizes.hasUnsized()) error(loc, "array size required", "", ""); } @@ -3002,7 +3135,7 @@ void TParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& typ } } -void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TArraySizes* arraySizes, bool initializer, bool lastMember) +void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, TArraySizes* arraySizes, bool initializer, bool lastMember) { assert(arraySizes); @@ -3015,8 +3148,10 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua return; // No environment allows any non-outer-dimension to be implicitly sized - if (arraySizes->isInnerImplicit()) + if (arraySizes->isInnerUnsized()) { error(loc, "only outermost dimension of an array of arrays can be implicitly sized", "[]", ""); + arraySizes->clearInnerUnsized(); + } if (arraySizes->isInnerSpecialization()) error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", ""); @@ -3061,8 +3196,11 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua arraySizeRequiredCheck(loc, *arraySizes); } -void TParseContext::arrayOfArrayVersionCheck(const TSourceLoc& loc) +void TParseContext::arrayOfArrayVersionCheck(const TSourceLoc& loc, const TArraySizes* sizes) { + if (sizes == nullptr || sizes->getNumDims() == 1) + return; + const char* feature = "arrays of arrays"; requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature); @@ -3070,36 +3208,6 @@ void TParseContext::arrayOfArrayVersionCheck(const TSourceLoc& loc) profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature); } -void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TArraySizes* sizes1, const TArraySizes* sizes2) -{ - if ((sizes1 && sizes2) || - (sizes1 && sizes1->getNumDims() > 1) || - (sizes2 && sizes2->getNumDims() > 1)) - arrayOfArrayVersionCheck(loc); -} - -void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TType* type, const TArraySizes* sizes2) -{ - // skip checking for multiple dimensions on the type; it was caught earlier - if ((type && type->isArray() && sizes2) || - (sizes2 && sizes2->getNumDims() > 1)) - arrayOfArrayVersionCheck(loc); -} - -// Merge array dimensions listed in 'sizes' onto the type's array dimensions. -// -// From the spec: "vec4[2] a[3]; // size-3 array of size-2 array of vec4" -// -// That means, the 'sizes' go in front of the 'type' as outermost sizes. -// 'type' is the type part of the declaration (to the left) -// 'sizes' is the arrayness tagged on the identifier (to the right) -// -void TParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes) -{ - if (sizes) - type.addArrayOuterSizes(*sizes); -} - // // Do all the semantic checking for declaring or redeclaring an array, with and // without a size, and make the right changes to the symbol table. @@ -3169,7 +3277,7 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie return; } - if (existingType.isExplicitlySizedArray()) { + if (existingType.isSizedArray()) { // be more leniant for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize())) error(loc, "redeclaration of array with size", identifier.c_str(), ""); @@ -3184,64 +3292,37 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie checkIoArraysConsistency(loc); } -void TParseContext::updateImplicitArraySize(const TSourceLoc& loc, TIntermNode *node, int index) +// Policy and error check for needing a runtime sized array. +void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base) { - // maybe there is nothing to do... - TIntermTyped* typedNode = node->getAsTyped(); - if (typedNode->getType().getImplicitArraySize() > index) + // runtime length implies runtime sizeable, so no problem + if (isRuntimeLength(base)) return; - // something to do... - - // Figure out what symbol to lookup, as we will use its type to edit for the size change, - // as that type will be shared through shallow copies for future references. - TSymbol* symbol = nullptr; - int blockIndex = -1; - const TString* lookupName = nullptr; - if (node->getAsSymbolNode()) - lookupName = &node->getAsSymbolNode()->getName(); - else if (node->getAsBinaryNode()) { - const TIntermBinary* deref = node->getAsBinaryNode(); - // This has to be the result of a block dereference, unless it's bad shader code - // If it's a uniform block, then an error will be issued elsewhere, but - // return early now to avoid crashing later in this function. - if (deref->getLeft()->getBasicType() != EbtBlock || - deref->getLeft()->getType().getQualifier().storage == EvqUniform || - deref->getRight()->getAsConstantUnion() == nullptr) - return; - - const TIntermTyped* left = deref->getLeft(); - const TIntermTyped* right = deref->getRight(); + // check for additional things allowed by GL_EXT_nonuniform_qualifier + if (base.getBasicType() == EbtSampler || + (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) + requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index"); + else + error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); +} - if (left->getAsBinaryNode()) { - left = left->getAsBinaryNode()->getLeft(); // Block array access - assert(left->isArray()); +// Policy decision for whether a run-time .length() is allowed. +bool TParseContext::isRuntimeLength(const TIntermTyped& base) const +{ + if (base.getType().getQualifier().storage == EvqBuffer) { + // in a buffer block + const TIntermBinary* binary = base.getAsBinaryNode(); + if (binary != nullptr && binary->getOp() == EOpIndexDirectStruct) { + // is it the last member? + const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); + const int memberCount = (int)binary->getLeft()->getType().getStruct()->size(); + if (index == memberCount - 1) + return true; } - - if (! left->getAsSymbolNode()) - return; - - blockIndex = right->getAsConstantUnion()->getConstArray()[0].getIConst(); - - lookupName = &left->getAsSymbolNode()->getName(); - if (IsAnonymous(*lookupName)) - lookupName = &(*left->getType().getStruct())[blockIndex].type->getFieldName(); } - // Lookup the symbol, should only fail if shader code is incorrect - symbol = symbolTable.find(*lookupName); - if (symbol == nullptr) - return; - - if (symbol->getAsFunction()) { - error(loc, "array variable name expected", symbol->getName().c_str(), ""); - return; - } - - if (symbol->getType().isStruct() && blockIndex != -1) - (*symbol->getWritableType().getStruct())[blockIndex].type->setImplicitArraySize(index + 1); - else - symbol->getWritableType().setImplicitArraySize(index + 1); + return false; } // Returns true if the first argument to the #line directive is the line number for the next line. @@ -3476,17 +3557,25 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT return; } + // Fix XFB stuff up, it applies to the order of the redeclaration, not + // the order of the original members. + if (currentBlockQualifier.storage == EvqVaryingOut && globalOutputDefaults.hasXfbBuffer()) { + if (!currentBlockQualifier.hasXfbBuffer()) + currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; + fixBlockXfbOffsets(currentBlockQualifier, newTypeList); + } + // Edit and error check the container against the redeclaration // - remove unused members // - ensure remaining qualifiers/types match + TType& type = block->getWritableType(); #ifdef NV_EXTENSIONS // if gl_PerVertex is redeclared for the purpose of passing through "gl_Position" - // for passthrough purpose, the redclared block should have the same qualifers as + // for passthrough purpose, the redeclared block should have the same qualifers as // the current one - if (currentBlockQualifier.layoutPassthrough) - { + if (currentBlockQualifier.layoutPassthrough) { type.getQualifier().layoutPassthrough = currentBlockQualifier.layoutPassthrough; type.getQualifier().storage = currentBlockQualifier.storage; type.getQualifier().layoutStream = currentBlockQualifier.layoutStream; @@ -3521,16 +3610,19 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT error(memberLoc, "cannot redeclare block member with a different type", member->type->getFieldName().c_str(), ""); if (oldType.isArray() != newType.isArray()) error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), ""); - else if (! oldType.sameArrayness(newType) && oldType.isExplicitlySizedArray()) + else if (! oldType.sameArrayness(newType) && oldType.isSizedArray()) error(memberLoc, "cannot change array size of redeclared block member", member->type->getFieldName().c_str(), ""); else if (newType.isArray()) arrayLimitCheck(loc, member->type->getFieldName(), newType.getOuterArraySize()); if (newType.getQualifier().isMemory()) error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); - if (newType.getQualifier().hasLayout()) - error(memberLoc, "cannot add layout to redeclared block member", member->type->getFieldName().c_str(), ""); + if (newType.getQualifier().hasNonXfbLayout()) + error(memberLoc, "cannot add non-XFB layout to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().patch) error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), ""); + if (newType.getQualifier().hasXfbBuffer() && + newType.getQualifier().layoutXfbBuffer != currentBlockQualifier.layoutXfbBuffer) + error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); oldType.getQualifier().centroid = newType.getQualifier().centroid; oldType.getQualifier().sample = newType.getQualifier().sample; oldType.getQualifier().invariant = newType.getQualifier().invariant; @@ -3538,10 +3630,21 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT oldType.getQualifier().smooth = newType.getQualifier().smooth; oldType.getQualifier().flat = newType.getQualifier().flat; oldType.getQualifier().nopersp = newType.getQualifier().nopersp; - - if (oldType.isImplicitlySizedArray() && newType.isExplicitlySizedArray()) + oldType.getQualifier().layoutXfbOffset = newType.getQualifier().layoutXfbOffset; + oldType.getQualifier().layoutXfbBuffer = newType.getQualifier().layoutXfbBuffer; + oldType.getQualifier().layoutXfbStride = newType.getQualifier().layoutXfbStride; + if (oldType.getQualifier().layoutXfbOffset != TQualifier::layoutXfbBufferEnd) { + // if any member as an xfb_offset, then the block's xfb_buffer inherents current xfb_buffer, + // and for xfb processing, the member needs it as well, along with xfb_stride + type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; + oldType.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; + } + if (oldType.isUnsizedArray() && newType.isSizedArray()) oldType.changeOuterArraySize(newType.getOuterArraySize()); + // check and process the member's type, which will include managing xfb information + layoutTypeCheck(loc, oldType); + // go to next member ++member; } else { @@ -3562,11 +3665,11 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT if (type.isArray() != (arraySizes != nullptr)) error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), ""); else if (type.isArray()) { - if (type.isExplicitlySizedArray() && arraySizes->getOuterSize() == UnsizedArraySize) - error(loc, "block already declared with size, can't redeclare as implicitly-sized", blockName.c_str(), ""); - else if (type.isExplicitlySizedArray() && type.getArraySizes() != *arraySizes) + if (type.isSizedArray() && !arraySizes->isSized()) + error(loc, "block already declared with size, can't redeclare as unsized", blockName.c_str(), ""); + else if (type.isSizedArray() && *type.getArraySizes() != *arraySizes) error(loc, "cannot change array size of redeclared block", blockName.c_str(), ""); - else if (type.isImplicitlySizedArray() && arraySizes->getOuterSize() != UnsizedArraySize) + else if (!type.isSizedArray() && arraySizes->isSized()) type.changeOuterArraySize(arraySizes->getOuterSize()); } @@ -3586,7 +3689,7 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT trackLinkage(*block); } -void TParseContext::paramCheckFix(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type) +void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type) { switch (qualifier) { case EvqConst: @@ -3632,8 +3735,10 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali else warn(loc, "qualifier has no effect on non-output parameters", "precise", ""); } + if (qualifier.isNonUniform()) + type.getQualifier().nonUniform = qualifier.nonUniform; - paramCheckFix(loc, qualifier.storage, type); + paramCheckFixStorage(loc, qualifier.storage, type); } void TParseContext::nestedBlockCheck(const TSourceLoc& loc) @@ -3872,6 +3977,28 @@ void TParseContext::finish() default: break; } + +#ifdef NV_EXTENSIONS + // Set default outputs for GL_NV_geometry_shader_passthrough + if (language == EShLangGeometry && extensionTurnedOn(E_SPV_NV_geometry_shader_passthrough)) { + if (intermediate.getOutputPrimitive() == ElgNone) { + switch (intermediate.getInputPrimitive()) { + case ElgPoints: intermediate.setOutputPrimitive(ElgPoints); break; + case ElgLines: intermediate.setOutputPrimitive(ElgLineStrip); break; + case ElgTriangles: intermediate.setOutputPrimitive(ElgTriangles); break; + default: break; + } + } + if (intermediate.getVertices() == TQualifier::layoutNotSet) { + switch (intermediate.getInputPrimitive()) { + case ElgPoints: intermediate.setVertices(1); break; + case ElgLines: intermediate.setVertices(2); break; + case ElgTriangles: intermediate.setVertices(3); break; + default: break; + } + } + } +#endif } // @@ -4505,7 +4632,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb // they are not allowed on block members. For arrayed interfaces (those generally having an // extra level of arrayness due to interface expansion), the outer array is stripped before // applying this rule." -void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool memberWithLocation, TArraySizes* arraySizes) +void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool memberWithLocation, + TArraySizes* arraySizes) { if (memberWithLocation && arraySizes != nullptr) { if (arraySizes->getNumDims() > (currentBlockQualifier.isArrayedIo(language) ? 1 : 0)) @@ -4554,6 +4682,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) break; case EvqUniform: case EvqBuffer: + if (type.getBasicType() == EbtBlock) + error(loc, "cannot apply to uniform or buffer block", "location", ""); break; default: error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); @@ -4580,11 +4710,9 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // containing a double, the offset must also be a multiple of 8..." if (type.containsBasicType(EbtDouble) && ! IsMultipleOfPow2(qualifier.layoutXfbOffset, 8)) error(loc, "type contains double; xfb_offset must be a multiple of 8", "xfb_offset", ""); -#ifdef AMD_EXTENSIONS // ..., if applied to an aggregate containing a float16_t, the offset must also be a multiple of 2..." else if (type.containsBasicType(EbtFloat16) && !IsMultipleOfPow2(qualifier.layoutXfbOffset, 2)) error(loc, "type contains half float; xfb_offset must be a multiple of 2", "xfb_offset", ""); -#endif else if (! IsMultipleOfPow2(qualifier.layoutXfbOffset, 4)) error(loc, "must be a multiple of size of first component", "xfb_offset", ""); } @@ -4608,13 +4736,19 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (type.getBasicType() == EbtSampler) { int lastBinding = qualifier.layoutBinding; if (type.isArray()) { - if (type.isImplicitlySizedArray()) { + if (spvVersion.vulkan > 0) lastBinding += 1; - warn(loc, "assuming array size of one for compile-time checking of binding numbers for implicitly-sized array", "[]", ""); - } else - lastBinding += type.getCumulativeArraySize(); + else { + if (type.isSizedArray()) + lastBinding += type.getCumulativeArraySize(); + else { + lastBinding += 1; + if (spvVersion.vulkan == 0) + warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); + } + } } - if (lastBinding >= resources.maxCombinedTextureImageUnits) + if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); } if (type.getBasicType() == EbtAtomicUint) { @@ -4623,12 +4757,23 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) return; } } - } + } else if (!intermediate.getAutoMapBindings()) { + // some types require bindings - // atomic_uint - if (type.getBasicType() == EbtAtomicUint) { - if (! type.getQualifier().hasBinding()) + // atomic_uint + if (type.getBasicType() == EbtAtomicUint) error(loc, "layout(binding=X) is required", "atomic_uint", ""); + + // SPIR-V + if (spvVersion.spv > 0) { + if (qualifier.isUniformOrBuffer()) { + if (type.getBasicType() == EbtBlock && !qualifier.layoutPushConstant && + !qualifier.layoutAttachment) + error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", ""); + else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler) + error(loc, "sampler/texture/image requires layout(binding=X)", "binding", ""); + } + } } // "The offset qualifier can only be used on block members of blocks..." @@ -4684,20 +4829,18 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) error(loc, "can only be applied to a scalar", "constant_id", ""); switch (type.getBasicType()) { + case EbtInt8: + case EbtUint8: + case EbtInt16: + case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: -#endif case EbtBool: case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif break; default: error(loc, "cannot be applied to this type", "constant_id", ""); @@ -4783,11 +4926,11 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "requires uniform or buffer storage qualifier", "binding", ""); } if (qualifier.hasStream()) { - if (qualifier.storage != EvqVaryingOut) + if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "stream", ""); } if (qualifier.hasXfb()) { - if (qualifier.storage != EvqVaryingOut) + if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "xfb layout qualifier", ""); } if (qualifier.hasUniformLayout()) { @@ -4863,7 +5006,7 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) // Check for overlap int numOffsets = 4; if (symbol.getType().isArray()) { - if (symbol.getType().isExplicitlySizedArray() && ! symbol.getType().getArraySizes()->isInnerImplicit()) + if (symbol.getType().isSizedArray() && !symbol.getType().getArraySizes()->isInnerUnsized()) numOffsets *= symbol.getType().getCumulativeArraySize(); else { // "It is a compile-time error to declare an unsized array of atomic_uint." @@ -4894,10 +5037,21 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct return nullptr; } + bool explicitTypesEnabled = extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int32) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int64) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float32) || + extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float64); + if (profile == EEsProfile || version < 120) function = findFunctionExact(loc, call, builtIn); else if (version < 400) function = findFunction120(loc, call, builtIn); + else if (explicitTypesEnabled) + function = findFunctionExplicitTypes(loc, call, builtIn); else function = findFunction400(loc, call, builtIn); @@ -5082,6 +5236,85 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu return bestMatch; } +// "To determine whether the conversion for a single argument in one match +// is better than that for another match, the conversion is assigned of the +// three ranks ordered from best to worst: +// 1. Exact match: no conversion. +// 2. Promotion: integral or floating-point promotion. +// 3. Conversion: integral conversion, floating-point conversion, +// floating-integral conversion. +// A conversion C1 is better than a conversion C2 if the rank of C1 is +// better than the rank of C2." +const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn) +{ + // first, look for an exact match + TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); + if (symbol) + return symbol->getAsFunction(); + + // no exact match, use the generic selector, parameterized by the GLSL rules + + // create list of candidates to send + TVector candidateList; + symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); + + // can 'from' convert to 'to'? + const auto convertible = [this](const TType& from, const TType& to, TOperator, int) -> bool { + if (from == to) + return true; + if (from.isArray() || to.isArray() || ! from.sameElementShape(to)) + return false; + return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType()); + }; + + // Is 'to2' a better conversion than 'to1'? + // Ties should not be considered as better. + // Assumes 'convertible' already said true. + const auto better = [this](const TType& from, const TType& to1, const TType& to2) -> bool { + // 1. exact match + if (from == to2) + return from != to1; + if (from == to1) + return false; + + // 2. Promotion (integral, floating-point) is better + TBasicType from_type = from.getBasicType(); + TBasicType to1_type = to1.getBasicType(); + TBasicType to2_type = to2.getBasicType(); + bool isPromotion1 = (intermediate.isIntegralPromotion(from_type, to1_type) || + intermediate.isFPPromotion(from_type, to1_type)); + bool isPromotion2 = (intermediate.isIntegralPromotion(from_type, to2_type) || + intermediate.isFPPromotion(from_type, to2_type)); + if (isPromotion2) + return !isPromotion1; + if(isPromotion1) + return false; + + // 3. Conversion (integral, floating-point , floating-integral) + bool isConversion1 = (intermediate.isIntegralConversion(from_type, to1_type) || + intermediate.isFPConversion(from_type, to1_type) || + intermediate.isFPIntegralConversion(from_type, to1_type)); + bool isConversion2 = (intermediate.isIntegralConversion(from_type, to2_type) || + intermediate.isFPConversion(from_type, to2_type) || + intermediate.isFPIntegralConversion(from_type, to2_type)); + + return isConversion2 && !isConversion1; + }; + + // for ambiguity reporting + bool tie = false; + + // send to the generic selector + const TFunction* bestMatch = selectFunction(candidateList, call, convertible, better, tie); + + if (bestMatch == nullptr) + error(loc, "no matching overloaded function found", call.getName().c_str(), ""); + else if (tie) + error(loc, "ambiguous best function under implicit type conversion", call.getName().c_str(), ""); + + return bestMatch; +} + // When a declaration includes a type, but not a variable name, it can be // to establish defaults. void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) @@ -5110,15 +5343,15 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType // 'publicType' is the type part of the declaration (to the left) // 'arraySizes' is the arrayness tagged on the identifier (to the right) // -TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes* arraySizes, TIntermTyped* initializer) +TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, + TArraySizes* arraySizes, TIntermTyped* initializer) { - TType type(publicType); // shallow copy; 'type' shares the arrayness and structure definition with 'publicType' - if (type.isImplicitlySizedArray()) { - // Because "int[] a = int[2](...), b = int[3](...)" makes two arrays a and b - // of different sizes, for this case sharing the shallow copy of arrayness - // with the publicType oversubscribes it, so get a deep copy of the arrayness. - type.newArraySizes(*publicType.arraySizes); - } + // Make a fresh type that combines the characteristics from the individual + // identifier syntax and the declaration-type syntax. + TType type(publicType); + type.transferArraySizes(arraySizes); + type.copyArrayInnerSizes(publicType.arraySizes); + arrayOfArrayVersionCheck(loc, type.getArraySizes()); if (voidErrorCheck(loc, identifier, type.getBasicType())) return nullptr; @@ -5145,15 +5378,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden inheritGlobalDefaults(type.getQualifier()); // Declare the variable - if (arraySizes || type.isArray()) { - // Arrayness is potentially coming both from the type and from the - // variable: "int[] a[];" or just one or the other. - // Merge it all to the type, so all arrayness is part of the type. - arrayDimCheck(loc, &type, arraySizes); - arrayDimMerge(type, arraySizes); - + if (type.isArray()) { // Check that implicit sizing is only where allowed. - arraySizesCheck(loc, type.getQualifier(), &type.getArraySizes(), initializer != nullptr, false); + arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer != nullptr, false); if (! arrayQualifierError(loc, type.getQualifier()) && ! arrayError(loc, type)) declareArray(loc, identifier, type, symbol); @@ -5284,8 +5511,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp } // Fix outer arrayness if variable is unsized, getting size from the initializer - if (initializer->getType().isExplicitlySizedArray() && - variable->getType().isImplicitlySizedArray()) + if (initializer->getType().isSizedArray() && variable->getType().isUnsizedArray()) variable->getWritableType().changeOuterArraySize(initializer->getType().getOuterArraySize()); // Inner arrayness can also get set by an initializer @@ -5294,8 +5520,10 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp variable->getType().getArraySizes()->getNumDims()) { // adopt unsized sizes from the initializer's sizes for (int d = 1; d < variable->getType().getArraySizes()->getNumDims(); ++d) { - if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize) - variable->getWritableType().getArraySizes().setDimSize(d, initializer->getType().getArraySizes()->getDimSize(d)); + if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize) { + variable->getWritableType().getArraySizes()->setDimSize(d, + initializer->getType().getArraySizes()->getDimSize(d)); + } } } @@ -5406,16 +5634,16 @@ TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const // Later on, initializer execution code will deal with array size logic. TType arrayType; arrayType.shallowCopy(type); // sharing struct stuff is fine - arrayType.newArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below + arrayType.copyArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below // edit array sizes to fill in unsized dimensions arrayType.changeOuterArraySize((int)initList->getSequence().size()); TIntermTyped* firstInit = initList->getSequence()[0]->getAsTyped(); if (arrayType.isArrayOfArrays() && firstInit->getType().isArray() && - arrayType.getArraySizes().getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) { - for (int d = 1; d < arrayType.getArraySizes().getNumDims(); ++d) { - if (arrayType.getArraySizes().getDimSize(d) == UnsizedArraySize) - arrayType.getArraySizes().setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1)); + arrayType.getArraySizes()->getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) { + for (int d = 1; d < arrayType.getArraySizes()->getNumDims(); ++d) { + if (arrayType.getArraySizes()->getDimSize(d) == UnsizedArraySize) + arrayType.getArraySizes()->setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1)); } } @@ -5565,8 +5793,22 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* // // Returns nullptr for an error or the constructed node. // -TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, bool subset) +TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, + bool subset) { + // If we are changing a matrix in both domain of basic type and to a non matrix, + // do the shape change first (by default, below, basic type is changed before shape). + // This avoids requesting a matrix of a new type that is going to be discarded anyway. + // TODO: This could be generalized to more type combinations, but that would require + // more extensive testing and full algorithm rework. For now, the need to do two changes makes + // the recursive call work, and avoids the most aggregious case of creating integer matrices. + if (node->getType().isMatrix() && (type.isScalar() || type.isVector()) && + type.isFloatingDomain() != node->getType().isFloatingDomain()) { + TType transitionType(node->getBasicType(), glslang::EvqTemporary, type.getVectorSize(), 0, 0, node->isVector()); + TOperator transitionOp = intermediate.mapTypeToConstructorOp(transitionType); + node = constructBuiltIn(transitionType, transitionOp, node, loc, false); + } + TIntermTyped* newNode; TOperator basicOp; @@ -5606,7 +5848,6 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T basicOp = EOpConstructDouble; break; -#ifdef AMD_EXTENSIONS case EOpConstructF16Vec2: case EOpConstructF16Vec3: case EOpConstructF16Vec4: @@ -5622,7 +5863,34 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructFloat16: basicOp = EOpConstructFloat16; break; -#endif + + case EOpConstructI8Vec2: + case EOpConstructI8Vec3: + case EOpConstructI8Vec4: + case EOpConstructInt8: + basicOp = EOpConstructInt8; + break; + + case EOpConstructU8Vec2: + case EOpConstructU8Vec3: + case EOpConstructU8Vec4: + case EOpConstructUint8: + basicOp = EOpConstructUint8; + break; + + case EOpConstructI16Vec2: + case EOpConstructI16Vec3: + case EOpConstructI16Vec4: + case EOpConstructInt16: + basicOp = EOpConstructInt16; + break; + + case EOpConstructU16Vec2: + case EOpConstructU16Vec3: + case EOpConstructU16Vec4: + case EOpConstructUint16: + basicOp = EOpConstructUint16; + break; case EOpConstructIVec2: case EOpConstructIVec3: @@ -5652,22 +5920,6 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T basicOp = EOpConstructUint64; break; -#ifdef AMD_EXTENSIONS - case EOpConstructI16Vec2: - case EOpConstructI16Vec3: - case EOpConstructI16Vec4: - case EOpConstructInt16: - basicOp = EOpConstructInt16; - break; - - case EOpConstructU16Vec2: - case EOpConstructU16Vec3: - case EOpConstructU16Vec4: - case EOpConstructUint16: - basicOp = EOpConstructUint16; - break; -#endif - case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: @@ -5675,6 +5927,11 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T basicOp = EOpConstructBool; break; + case EOpConstructNonuniform: + node->getWritableType().getQualifier().nonUniform = true; + return node; + break; + default: error(loc, "unsupported construction", "", ""); @@ -5719,13 +5976,14 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& // // Do everything needed to add an interface block. // -void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes) +void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, + TArraySizes* arraySizes) { blockStageIoCheck(loc, currentBlockQualifier); blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr); - if (arraySizes) { + if (arraySizes != nullptr) { arraySizesCheck(loc, currentBlockQualifier, arraySizes, false, false); - arrayDimCheck(loc, arraySizes, 0); + arrayOfArrayVersionCheck(loc, arraySizes); if (arraySizes->getNumDims() > 1) requireProfile(loc, ~EEsProfile, "array-of-array of block"); } @@ -5742,7 +6000,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); if (memberType.isArray()) - arraySizesCheck(memberLoc, currentBlockQualifier, &memberType.getArraySizes(), false, member == typeList.size() - 1); + arraySizesCheck(memberLoc, currentBlockQualifier, memberType.getArraySizes(), false, member == typeList.size() - 1); if (memberQualifier.hasOffset()) { if (spvVersion.spv == 0) { requireProfile(memberLoc, ~EEsProfile, "offset on block member"); @@ -5864,8 +6122,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // TType blockType(&typeList, *blockName, currentBlockQualifier); - if (arraySizes) - blockType.newArraySizes(*arraySizes); + if (arraySizes != nullptr) + blockType.transferArraySizes(arraySizes); else ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName); @@ -6032,7 +6290,8 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi memberQualifier.layoutLocation = nextLocation; memberQualifier.layoutComponent = TQualifier::layoutComponentEnd; } - nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type); + nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize( + *typeList[member].type, language); } } } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.h index 73b9798b516334f1453fc3b53bf02b9ef5333f8c..21779c71023f4bfd47acb8c4a3bdd18bba923707 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ParseHelper.h @@ -44,13 +44,15 @@ #ifndef _PARSER_HELPER_INCLUDED_ #define _PARSER_HELPER_INCLUDED_ +#include +#include + #include "parseVersions.h" #include "../Include/ShHandle.h" #include "SymbolTable.h" #include "localintermediate.h" #include "Scan.h" -#include -#include +#include "attribute.h" namespace glslang { @@ -185,7 +187,7 @@ protected: TParseContextBase& operator=(TParseContextBase&); const bool parsingBuiltins; // true if parsing built-in symbols/functions - TVector linkageSymbols; // these need to be transferred to 'linkage', after all editing is done + TVector linkageSymbols; // will be transferred to 'linkage', after all editing is done, order preserving TScanContext* scanContext; TPpContext* ppContext; TBuiltInResource resources; @@ -307,7 +309,7 @@ public: TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&); TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*); - TIntermTyped* handleBuiltInFunctionCall(TSourceLoc, TIntermNode& arguments, const TFunction& function); + TIntermTyped* handleBuiltInFunctionCall(TSourceLoc, TIntermNode* arguments, const TFunction& function); void computeBuiltinPrecisions(TIntermTyped&, const TFunction&); TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*); void checkLocation(const TSourceLoc&, TOperator); @@ -338,17 +340,15 @@ public: bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); void structArrayCheck(const TSourceLoc&, const TType& structure); - void arraySizesCheck(const TSourceLoc&, const TQualifier&, const TArraySizes*, bool initializer, bool lastMember); - void arrayOfArrayVersionCheck(const TSourceLoc&); - void arrayDimCheck(const TSourceLoc&, const TArraySizes* sizes1, const TArraySizes* sizes2); - void arrayDimCheck(const TSourceLoc&, const TType*, const TArraySizes*); - void arrayDimMerge(TType& type, const TArraySizes* sizes); + void arraySizesCheck(const TSourceLoc&, const TQualifier&, TArraySizes*, bool initializer, bool lastMember); + void arrayOfArrayVersionCheck(const TSourceLoc&, const TArraySizes*); bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); void boolCheck(const TSourceLoc&, const TIntermTyped*); void boolCheck(const TSourceLoc&, const TPublicType&); void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer); void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier); void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier); + void memberQualifierCheck(glslang::TPublicType&); void globalQualifierFixCheck(const TSourceLoc&, TQualifier&); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); @@ -361,7 +361,7 @@ public: bool containsFieldWithBasicType(const TType& type ,TBasicType basicType); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes); - void paramCheckFix(const TSourceLoc&, const TStorageQualifier&, TType& type); + void paramCheckFixStorage(const TSourceLoc&, const TStorageQualifier&, TType& type); void paramCheckFix(const TSourceLoc&, const TQualifier&, TType& type); void nestedBlockCheck(const TSourceLoc&); void nestedStructCheck(const TSourceLoc&); @@ -390,6 +390,7 @@ public: const TFunction* findFunctionExact(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunction120(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn); + const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn); void declareTypeDefaults(const TSourceLoc&, const TPublicType&); TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0); TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&); @@ -408,7 +409,17 @@ public: void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); - void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index); + TAttributeType attributeFromName(const TString& name) const; + TAttributes* makeAttributes(const TString& identifier) const; + TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const; + TAttributes* mergeAttributes(TAttributes*, TAttributes*) const; + + // Determine selection control from attributes + void handleSelectionAttributes(const TAttributes& attributes, TIntermNode*); + void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*); + + // Determine loop control from attributes + void handleLoopAttributes(const TAttributes& attributes, TIntermNode*); protected: void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type); @@ -416,6 +427,8 @@ protected: TVariable* makeInternalVariable(const char* name, const TType&) const; TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&); void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&); + void checkRuntimeSizable(const TSourceLoc&, const TIntermTyped&); + bool isRuntimeLength(const TIntermTyped&) const; TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer); void finish() override; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/PoolAlloc.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/PoolAlloc.cpp index 4007c386153dd75829228f462082a9dfccb4ae98..84c40f4e79522aea79a5cf42921434e21e887fd5 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/PoolAlloc.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/PoolAlloc.cpp @@ -40,35 +40,22 @@ namespace glslang { +// Process-wide TLS index OS_TLSIndex PoolIndex; -void InitializeMemoryPools() +// Return the thread-specific current pool. +TPoolAllocator& GetThreadPoolAllocator() { - TThreadMemoryPools* pools = static_cast(OS_GetTLSValue(PoolIndex)); - if (pools) - return; - - TPoolAllocator *threadPoolAllocator = new TPoolAllocator(); - - TThreadMemoryPools* threadData = new TThreadMemoryPools(); - - threadData->threadPoolAllocator = threadPoolAllocator; - - OS_SetTLSValue(PoolIndex, threadData); + return *static_cast(OS_GetTLSValue(PoolIndex)); } -void FreeGlobalPools() +// Set the thread-specific current pool. +void SetThreadPoolAllocator(TPoolAllocator* poolAllocator) { - // Release the allocated memory for this thread. - TThreadMemoryPools* globalPools = static_cast(OS_GetTLSValue(PoolIndex)); - if (! globalPools) - return; - - GetThreadPoolAllocator().popAll(); - delete &GetThreadPoolAllocator(); - delete globalPools; + OS_SetTLSValue(PoolIndex, poolAllocator); } +// Process-wide set up of the TLS pool storage. bool InitializePoolIndex() { // Allocate a TLS index. @@ -78,26 +65,6 @@ bool InitializePoolIndex() return true; } -void FreePoolIndex() -{ - // Release the TLS index. - OS_FreeTLSIndex(PoolIndex); -} - -TPoolAllocator& GetThreadPoolAllocator() -{ - TThreadMemoryPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - return *threadData->threadPoolAllocator; -} - -void SetThreadPoolAllocator(TPoolAllocator& poolAllocator) -{ - TThreadMemoryPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - threadData->threadPoolAllocator = &poolAllocator; -} - // // Implement the functionality of the TPoolAllocator class, which // is documented in PoolAlloc.h. @@ -234,13 +201,16 @@ void TPoolAllocator::pop() currentPageOffset = stack.back().offset; while (inUseList != page) { - // invoke destructor to free allocation list - inUseList->~tHeader(); - tHeader* nextInUse = inUseList->nextPage; - if (inUseList->pageCount > 1) + size_t pageCount = inUseList->pageCount; + + // This technically ends the lifetime of the header as C++ object, + // but we will still control the memory and reuse it. + inUseList->~tHeader(); // currently, just a debug allocation checker + + if (pageCount > 1) { delete [] reinterpret_cast(inUseList); - else { + } else { inUseList->nextPage = freeList; freeList = inUseList; } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Scan.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Scan.cpp index 68d1500b4ad505e44dc9efb4c6513f217eac4465..7232baeb2913fa3a7b0ec5069cdd15b848f96e03 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Scan.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Scan.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -45,6 +46,7 @@ #include "../Include/Types.h" #include "SymbolTable.h" #include "ParseHelper.h" +#include "attribute.h" #include "glslang_tab.cpp.h" #include "ScanContext.h" #include "Scan.h" @@ -339,6 +341,7 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["const"] = CONST; (*KeywordMap)["uniform"] = UNIFORM; + (*KeywordMap)["nonuniformEXT"] = NONUNIFORM; (*KeywordMap)["in"] = IN; (*KeywordMap)["out"] = OUT; (*KeywordMap)["inout"] = INOUT; @@ -463,16 +466,34 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["u64vec3"] = U64VEC3; (*KeywordMap)["u64vec4"] = U64VEC4; -#ifdef AMD_EXTENSIONS + // GL_KHX_shader_explicit_arithmetic_types + (*KeywordMap)["int8_t"] = INT8_T; + (*KeywordMap)["i8vec2"] = I8VEC2; + (*KeywordMap)["i8vec3"] = I8VEC3; + (*KeywordMap)["i8vec4"] = I8VEC4; + (*KeywordMap)["uint8_t"] = UINT8_T; + (*KeywordMap)["u8vec2"] = U8VEC2; + (*KeywordMap)["u8vec3"] = U8VEC3; + (*KeywordMap)["u8vec4"] = U8VEC4; + (*KeywordMap)["int16_t"] = INT16_T; - (*KeywordMap)["uint16_t"] = UINT16_T; (*KeywordMap)["i16vec2"] = I16VEC2; (*KeywordMap)["i16vec3"] = I16VEC3; (*KeywordMap)["i16vec4"] = I16VEC4; + (*KeywordMap)["uint16_t"] = UINT16_T; (*KeywordMap)["u16vec2"] = U16VEC2; (*KeywordMap)["u16vec3"] = U16VEC3; (*KeywordMap)["u16vec4"] = U16VEC4; + (*KeywordMap)["int32_t"] = INT32_T; + (*KeywordMap)["i32vec2"] = I32VEC2; + (*KeywordMap)["i32vec3"] = I32VEC3; + (*KeywordMap)["i32vec4"] = I32VEC4; + (*KeywordMap)["uint32_t"] = UINT32_T; + (*KeywordMap)["u32vec2"] = U32VEC2; + (*KeywordMap)["u32vec3"] = U32VEC3; + (*KeywordMap)["u32vec4"] = U32VEC4; + (*KeywordMap)["float16_t"] = FLOAT16_T; (*KeywordMap)["f16vec2"] = F16VEC2; (*KeywordMap)["f16vec3"] = F16VEC3; @@ -489,7 +510,39 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["f16mat4x2"] = F16MAT4X2; (*KeywordMap)["f16mat4x3"] = F16MAT4X3; (*KeywordMap)["f16mat4x4"] = F16MAT4X4; -#endif + + (*KeywordMap)["float32_t"] = FLOAT32_T; + (*KeywordMap)["f32vec2"] = F32VEC2; + (*KeywordMap)["f32vec3"] = F32VEC3; + (*KeywordMap)["f32vec4"] = F32VEC4; + (*KeywordMap)["f32mat2"] = F32MAT2; + (*KeywordMap)["f32mat3"] = F32MAT3; + (*KeywordMap)["f32mat4"] = F32MAT4; + (*KeywordMap)["f32mat2x2"] = F32MAT2X2; + (*KeywordMap)["f32mat2x3"] = F32MAT2X3; + (*KeywordMap)["f32mat2x4"] = F32MAT2X4; + (*KeywordMap)["f32mat3x2"] = F32MAT3X2; + (*KeywordMap)["f32mat3x3"] = F32MAT3X3; + (*KeywordMap)["f32mat3x4"] = F32MAT3X4; + (*KeywordMap)["f32mat4x2"] = F32MAT4X2; + (*KeywordMap)["f32mat4x3"] = F32MAT4X3; + (*KeywordMap)["f32mat4x4"] = F32MAT4X4; + (*KeywordMap)["float64_t"] = FLOAT64_T; + (*KeywordMap)["f64vec2"] = F64VEC2; + (*KeywordMap)["f64vec3"] = F64VEC3; + (*KeywordMap)["f64vec4"] = F64VEC4; + (*KeywordMap)["f64mat2"] = F64MAT2; + (*KeywordMap)["f64mat3"] = F64MAT3; + (*KeywordMap)["f64mat4"] = F64MAT4; + (*KeywordMap)["f64mat2x2"] = F64MAT2X2; + (*KeywordMap)["f64mat2x3"] = F64MAT2X3; + (*KeywordMap)["f64mat2x4"] = F64MAT2X4; + (*KeywordMap)["f64mat3x2"] = F64MAT3X2; + (*KeywordMap)["f64mat3x3"] = F64MAT3X3; + (*KeywordMap)["f64mat3x4"] = F64MAT3X4; + (*KeywordMap)["f64mat4x2"] = F64MAT4X2; + (*KeywordMap)["f64mat4x3"] = F64MAT4X3; + (*KeywordMap)["f64mat4x4"] = F64MAT4X4; (*KeywordMap)["sampler2D"] = SAMPLER2D; (*KeywordMap)["samplerCube"] = SAMPLERCUBE; @@ -578,6 +631,54 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["usubpassInput"] = USUBPASSINPUT; (*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS; +#ifdef AMD_EXTENSIONS + (*KeywordMap)["f16sampler1D"] = F16SAMPLER1D; + (*KeywordMap)["f16sampler2D"] = F16SAMPLER2D; + (*KeywordMap)["f16sampler3D"] = F16SAMPLER3D; + (*KeywordMap)["f16sampler2DRect"] = F16SAMPLER2DRECT; + (*KeywordMap)["f16samplerCube"] = F16SAMPLERCUBE; + (*KeywordMap)["f16sampler1DArray"] = F16SAMPLER1DARRAY; + (*KeywordMap)["f16sampler2DArray"] = F16SAMPLER2DARRAY; + (*KeywordMap)["f16samplerCubeArray"] = F16SAMPLERCUBEARRAY; + (*KeywordMap)["f16samplerBuffer"] = F16SAMPLERBUFFER; + (*KeywordMap)["f16sampler2DMS"] = F16SAMPLER2DMS; + (*KeywordMap)["f16sampler2DMSArray"] = F16SAMPLER2DMSARRAY; + (*KeywordMap)["f16sampler1DShadow"] = F16SAMPLER1DSHADOW; + (*KeywordMap)["f16sampler2DShadow"] = F16SAMPLER2DSHADOW; + (*KeywordMap)["f16sampler2DRectShadow"] = F16SAMPLER2DRECTSHADOW; + (*KeywordMap)["f16samplerCubeShadow"] = F16SAMPLERCUBESHADOW; + (*KeywordMap)["f16sampler1DArrayShadow"] = F16SAMPLER1DARRAYSHADOW; + (*KeywordMap)["f16sampler2DArrayShadow"] = F16SAMPLER2DARRAYSHADOW; + (*KeywordMap)["f16samplerCubeArrayShadow"] = F16SAMPLERCUBEARRAYSHADOW; + + (*KeywordMap)["f16image1D"] = F16IMAGE1D; + (*KeywordMap)["f16image2D"] = F16IMAGE2D; + (*KeywordMap)["f16image3D"] = F16IMAGE3D; + (*KeywordMap)["f16image2DRect"] = F16IMAGE2DRECT; + (*KeywordMap)["f16imageCube"] = F16IMAGECUBE; + (*KeywordMap)["f16image1DArray"] = F16IMAGE1DARRAY; + (*KeywordMap)["f16image2DArray"] = F16IMAGE2DARRAY; + (*KeywordMap)["f16imageCubeArray"] = F16IMAGECUBEARRAY; + (*KeywordMap)["f16imageBuffer"] = F16IMAGEBUFFER; + (*KeywordMap)["f16image2DMS"] = F16IMAGE2DMS; + (*KeywordMap)["f16image2DMSArray"] = F16IMAGE2DMSARRAY; + + (*KeywordMap)["f16texture1D"] = F16TEXTURE1D; + (*KeywordMap)["f16texture2D"] = F16TEXTURE2D; + (*KeywordMap)["f16texture3D"] = F16TEXTURE3D; + (*KeywordMap)["f16texture2DRect"] = F16TEXTURE2DRECT; + (*KeywordMap)["f16textureCube"] = F16TEXTURECUBE; + (*KeywordMap)["f16texture1DArray"] = F16TEXTURE1DARRAY; + (*KeywordMap)["f16texture2DArray"] = F16TEXTURE2DARRAY; + (*KeywordMap)["f16textureCubeArray"] = F16TEXTURECUBEARRAY; + (*KeywordMap)["f16textureBuffer"] = F16TEXTUREBUFFER; + (*KeywordMap)["f16texture2DMS"] = F16TEXTURE2DMS; + (*KeywordMap)["f16texture2DMSArray"] = F16TEXTURE2DMSARRAY; + + (*KeywordMap)["f16subpassInput"] = F16SUBPASSINPUT; + (*KeywordMap)["f16subpassInputMS"] = F16SUBPASSINPUTMS; +#endif + (*KeywordMap)["noperspective"] = NOPERSPECTIVE; (*KeywordMap)["smooth"] = SMOOTH; (*KeywordMap)["flat"] = FLAT; @@ -714,19 +815,15 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) parseContext.error(loc, "not supported", "::", ""); break; - case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; - case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; - case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; - case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; -#ifdef AMD_EXTENSIONS - case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; - case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; -#endif - case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; - case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; -#ifdef AMD_EXTENSIONS - case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; -#endif + case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; + case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; + case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; + case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; + case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; + case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; + case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; + case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; + case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; case PpAtomIdentifier: { int token = tokenizeIdentifier(); @@ -777,6 +874,12 @@ int TScanContext::tokenizeIdentifier() case CASE: return keyword; + case NONUNIFORM: + if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier)) + return keyword; + else + return identifierOrType(); + case SWITCH: case DEFAULT: if ((parseContext.profile == EEsProfile && parseContext.version < 300) || @@ -841,7 +944,8 @@ int TScanContext::tokenizeIdentifier() case VOLATILE: if (parseContext.profile == EEsProfile && parseContext.version >= 310) return keyword; - if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) + if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || + (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) reservedWord(); return keyword; @@ -865,7 +969,7 @@ int TScanContext::tokenizeIdentifier() case PATCH: if (parseContext.symbolTable.atBuiltInLevel() || (parseContext.profile == EEsProfile && - (parseContext.version >= 320 || + (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))) || (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader))) return keyword; @@ -985,12 +1089,29 @@ int TScanContext::tokenizeIdentifier() case U64VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) && - parseContext.profile != EEsProfile && parseContext.version >= 450)) + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int64)))) + return keyword; + return identifierOrType(); + + case INT8_T: + case UINT8_T: + case I8VEC2: + case I8VEC3: + case I8VEC4: + case U8VEC2: + case U8VEC3: + case U8VEC4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8)) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); -#ifdef AMD_EXTENSIONS case INT16_T: case UINT16_T: case I16VEC2: @@ -1001,10 +1122,77 @@ int TScanContext::tokenizeIdentifier() case U16VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) && + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + ( +#ifdef AMD_EXTENSIONS + parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) || +#endif + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16)))) + return keyword; + return identifierOrType(); + case INT32_T: + case UINT32_T: + case I32VEC2: + case I32VEC3: + case I32VEC4: + case U32VEC2: + case U32VEC3: + case U32VEC4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int32)) && parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); + case FLOAT32_T: + case F32VEC2: + case F32VEC3: + case F32VEC4: + case F32MAT2: + case F32MAT3: + case F32MAT4: + case F32MAT2X2: + case F32MAT2X3: + case F32MAT2X4: + case F32MAT3X2: + case F32MAT3X3: + case F32MAT3X4: + case F32MAT4X2: + case F32MAT4X3: + case F32MAT4X4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float32)) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) + return keyword; + return identifierOrType(); + + case FLOAT64_T: + case F64VEC2: + case F64VEC3: + case F64VEC4: + case F64MAT2: + case F64MAT3: + case F64MAT4: + case F64MAT2X2: + case F64MAT2X3: + case F64MAT2X4: + case F64MAT3X2: + case F64MAT3X3: + case F64MAT3X4: + case F64MAT4X2: + case F64MAT4X3: + case F64MAT4X4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float64)) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) + return keyword; + return identifierOrType(); case FLOAT16_T: case F16VEC2: @@ -1024,11 +1212,16 @@ int TScanContext::tokenizeIdentifier() case F16MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) && - parseContext.profile != EEsProfile && parseContext.version >= 450)) + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + ( +#ifdef AMD_EXTENSIONS + parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) || +#endif + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16)))) return keyword; + return identifierOrType(); -#endif case SAMPLERCUBEARRAY: case SAMPLERCUBEARRAYSHADOW: @@ -1115,7 +1308,7 @@ int TScanContext::tokenizeIdentifier() case SAMPLER3D: afterType = true; if (parseContext.profile == EEsProfile && parseContext.version < 300) { - if (! parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) + if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) reservedWord(); } return keyword; @@ -1193,7 +1386,7 @@ int TScanContext::tokenizeIdentifier() case TEXTURE1DARRAY: case SAMPLER: case SAMPLERSHADOW: - if (parseContext.spvVersion.vulkan >= 100) + if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); @@ -1204,12 +1397,71 @@ int TScanContext::tokenizeIdentifier() case ISUBPASSINPUTMS: case USUBPASSINPUT: case USUBPASSINPUTMS: - if (parseContext.spvVersion.vulkan >= 100) + if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); +#ifdef AMD_EXTENSIONS + case F16SAMPLER1D: + case F16SAMPLER2D: + case F16SAMPLER3D: + case F16SAMPLER2DRECT: + case F16SAMPLERCUBE: + case F16SAMPLER1DARRAY: + case F16SAMPLER2DARRAY: + case F16SAMPLERCUBEARRAY: + case F16SAMPLERBUFFER: + case F16SAMPLER2DMS: + case F16SAMPLER2DMSARRAY: + case F16SAMPLER1DSHADOW: + case F16SAMPLER2DSHADOW: + case F16SAMPLER1DARRAYSHADOW: + case F16SAMPLER2DARRAYSHADOW: + case F16SAMPLER2DRECTSHADOW: + case F16SAMPLERCUBESHADOW: + case F16SAMPLERCUBEARRAYSHADOW: + + case F16IMAGE1D: + case F16IMAGE2D: + case F16IMAGE3D: + case F16IMAGE2DRECT: + case F16IMAGECUBE: + case F16IMAGE1DARRAY: + case F16IMAGE2DARRAY: + case F16IMAGECUBEARRAY: + case F16IMAGEBUFFER: + case F16IMAGE2DMS: + case F16IMAGE2DMSARRAY: + + case F16TEXTURE1D: + case F16TEXTURE2D: + case F16TEXTURE3D: + case F16TEXTURE2DRECT: + case F16TEXTURECUBE: + case F16TEXTURE1DARRAY: + case F16TEXTURE2DARRAY: + case F16TEXTURECUBEARRAY: + case F16TEXTUREBUFFER: + case F16TEXTURE2DMS: + case F16TEXTURE2DMSARRAY: + + case F16SUBPASSINPUT: + case F16SUBPASSINPUTMS: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float_fetch) && + parseContext.profile != EEsProfile && parseContext.version >= 450)) + return keyword; + return identifierOrType(); +#endif + case NOPERSPECTIVE: +#ifdef NV_EXTENSIONS + if (parseContext.profile == EEsProfile && parseContext.version >= 300 && + parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation)) + return keyword; +#endif return es30ReservedFromGLSL(130); case SMOOTH: @@ -1403,7 +1655,8 @@ int TScanContext::dMat() int TScanContext::firstGenerationImage(bool inEs310) { if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile != EEsProfile && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || + (parseContext.profile != EEsProfile && (parseContext.version >= 420 || + parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310)) return keyword; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ShaderLang.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ShaderLang.cpp index 05d22126d4cb9dc25656c3c43c967a95c07c6add..4f39f3453e5d6d677996d0539ce82657a7a83599 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -69,6 +69,10 @@ namespace { // anonymous namespace for file-local functions and symbols +// Total number of successful initializers of glslang: a refcount +// Shared global; access should be protected by a global mutex/critical section. +int NumberOfClients = 0; + using namespace glslang; // Create a language specific version of parseables. @@ -217,7 +221,7 @@ enum EPrecisionClass { TSymbolTable* CommonSymbolTable[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EPcCount] = {}; TSymbolTable* SharedSymbolTables[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EShLangCount] = {}; -TPoolAllocator* PerProcessGPA = 0; +TPoolAllocator* PerProcessGPA = nullptr; // // Parse and add to the given symbol table the content of the given shader string. @@ -361,7 +365,7 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf // pool allocator intact, so: // - Switch to a new pool for parsing the built-ins // - Do the parsing, which builds the symbol table, using the new pool -// - Switch to the process-global pool to save a copy the resulting symbol table +// - Switch to the process-global pool to save a copy of the resulting symbol table // - Free up the new pool used to parse the built-ins // - Switch back to the original thread's pool // @@ -388,8 +392,8 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); - TPoolAllocator* builtInPoolAllocator = new TPoolAllocator(); - SetThreadPoolAllocator(*builtInPoolAllocator); + TPoolAllocator* builtInPoolAllocator = new TPoolAllocator; + SetThreadPoolAllocator(builtInPoolAllocator); // Dynamically allocate the local symbol tables so we can control when they are deallocated WRT when the pool is popped. TSymbolTable* commonTable[EPcCount]; @@ -403,7 +407,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spvVersion, source); // Switch to the process-global pool - SetThreadPoolAllocator(*PerProcessGPA); + SetThreadPoolAllocator(PerProcessGPA); // Copy the local symbol tables from the new pool to the global tables using the process-global pool for (int precClass = 0; precClass < EPcCount; ++precClass) { @@ -430,7 +434,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp delete stageTables[stage]; delete builtInPoolAllocator; - SetThreadPoolAllocator(previousAllocator); + SetThreadPoolAllocator(&previousAllocator); glslang::ReleaseGlobalLock(); } @@ -574,7 +578,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo if (spvVersion.spv != 0) { switch (profile) { case EEsProfile: - if (spvVersion.vulkan >= 100 && version < 310) { + if (spvVersion.vulkan > 0 && version < 310) { correct = false; infoSink.info.message(EPrefixError, "#version: ES shaders for Vulkan SPIR-V require version 310 or higher"); version = 310; @@ -589,7 +593,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo infoSink.info.message(EPrefixError, "#version: compilation for SPIR-V does not support the compatibility profile"); break; default: - if (spvVersion.vulkan >= 100 && version < 140) { + if (spvVersion.vulkan > 0 && version < 140) { correct = false; infoSink.info.message(EPrefixError, "#version: Desktop shaders for Vulkan SPIR-V require version 140 or higher"); version = 140; @@ -615,9 +619,9 @@ void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages { // Set up environmental defaults, first ignoring 'environment'. if (messages & EShMsgSpvRules) - spvVersion.spv = 0x00010000; + spvVersion.spv = EShTargetSpv_1_0; if (messages & EShMsgVulkanRules) { - spvVersion.vulkan = 100; + spvVersion.vulkan = EShTargetVulkan_1_0; spvVersion.vulkanGlsl = 100; } else if (spvVersion.spv != 0) spvVersion.openGl = 100; @@ -722,9 +726,6 @@ bool ProcessDeferred( const std::string sourceEntryPointName = "", const TEnvironment* environment = nullptr) // optional way of fully setting all versions, overriding the above { - if (! InitThread()) - return false; - // This must be undone (.pop()) by the caller, after it finishes consuming the created tree. GetThreadPoolAllocator().push(); @@ -743,9 +744,9 @@ bool ProcessDeferred( const int numPre = 2; const int numPost = requireNonempty? 1 : 0; const int numTotal = numPre + numStrings + numPost; - size_t* lengths = new size_t[numTotal]; - const char** strings = new const char*[numTotal]; - const char** names = new const char*[numTotal]; + std::unique_ptr lengths(new size_t[numTotal]); + std::unique_ptr strings(new const char*[numTotal]); + std::unique_ptr names(new const char*[numTotal]); for (int s = 0; s < numStrings; ++s) { strings[s + numPre] = shaderStrings[s]; if (inputLengths == nullptr || inputLengths[s] < 0) @@ -767,6 +768,8 @@ bool ProcessDeferred( SpvVersion spvVersion; EShLanguage stage = compiler->getLanguage(); TranslateEnvironment(environment, messages, source, stage, spvVersion); + if (environment != nullptr && environment->target.hlslFunctionality1) + intermediate.setHlslFunctionality1(); // First, without using the preprocessor or parser, find the #version, so we know what // symbol tables, processing rules, etc. to set up. This does not need the extra strings @@ -813,7 +816,7 @@ bool ProcessDeferred( intermediate.setProfile(profile); intermediate.setSpv(spvVersion); RecordProcesses(intermediate, messages, sourceEntryPointName); - if (spvVersion.vulkan >= 100) + if (spvVersion.vulkan > 0) intermediate.setOriginUpperLeft(); if ((messages & EShMsgHlslOffsets) || source == EShSourceHlsl) intermediate.setHlslOffsets(); @@ -831,25 +834,24 @@ bool ProcessDeferred( [stage]; // Dynamically allocate the symbol table so we can control when it is deallocated WRT the pool. - TSymbolTable* symbolTableMemory = new TSymbolTable; - TSymbolTable& symbolTable = *symbolTableMemory; + std::unique_ptr symbolTable(new TSymbolTable); if (cachedTable) - symbolTable.adoptLevels(*cachedTable); + symbolTable->adoptLevels(*cachedTable); // Add built-in symbols that are potentially context dependent; // they get popped again further down. - if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion, - stage, source)) + if (! AddContextSpecificSymbols(resources, compiler->infoSink, *symbolTable, version, profile, spvVersion, + stage, source)) { return false; + } // // Now we can process the full shader under proper symbols and rules. // - TParseContextBase* parseContext = CreateParseContext(symbolTable, intermediate, version, profile, source, - stage, compiler->infoSink, - spvVersion, forwardCompatible, messages, false, sourceEntryPointName); - + std::unique_ptr parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source, + stage, compiler->infoSink, + spvVersion, forwardCompatible, messages, false, sourceEntryPointName)); TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer); // only GLSL (bison triggered, really) needs an externally set scan context @@ -885,23 +887,14 @@ bool ProcessDeferred( lengths[postIndex] = strlen(strings[numStrings + numPre]); names[postIndex] = nullptr; } - TInputScanner fullInput(numStrings + numPre + numPost, strings, lengths, names, numPre, numPost); + TInputScanner fullInput(numStrings + numPre + numPost, strings.get(), lengths.get(), names.get(), numPre, numPost); // Push a new symbol allocation scope that will get used for the shader's globals. - symbolTable.push(); + symbolTable->push(); bool success = processingContext(*parseContext, ppContext, fullInput, - versionWillBeError, symbolTable, + versionWillBeError, *symbolTable, intermediate, optLevel, messages); - - // Clean up the symbol table. The AST is self-sufficient now. - delete symbolTableMemory; - - delete parseContext; - delete [] lengths; - delete [] strings; - delete [] names; - return success; } @@ -911,7 +904,7 @@ bool ProcessDeferred( class SourceLineSynchronizer { public: SourceLineSynchronizer(const std::function& lastSourceIndex, - std::stringstream* output) + std::string* output) : getLastSourceIndex(lastSourceIndex), output(output), lastSource(-1), lastLine(0) {} // SourceLineSynchronizer(const SourceLineSynchronizer&) = delete; // SourceLineSynchronizer& operator=(const SourceLineSynchronizer&) = delete; @@ -926,7 +919,7 @@ public: // used. We also need to output a newline to separate the output // from the previous source string (if there is one). if (lastSource != -1 || lastLine != 0) - *output << std::endl; + *output += '\n'; lastSource = getLastSourceIndex(); lastLine = -1; return true; @@ -941,7 +934,7 @@ public: syncToMostRecentString(); const bool newLineStarted = lastLine < tokenLine; for (; lastLine < tokenLine; ++lastLine) { - if (lastLine > 0) *output << std::endl; + if (lastLine > 0) *output += '\n'; } return newLineStarted; } @@ -955,8 +948,8 @@ private: // A function for getting the index of the last valid source string we've // read tokens from. const std::function getLastSourceIndex; - // output stream for newlines. - std::stringstream* output; + // output string for newlines. + std::string* output; // lastSource is the source string index (starting from 0) of the last token // processed. It is tracked in order for newlines to be inserted when a new // source string starts. -1 means we haven't started processing any source @@ -987,27 +980,33 @@ struct DoPreprocessing { parseContext.setScanner(&input); ppContext.setInput(input, versionWillBeError); - std::stringstream outputStream; + std::string outputBuffer; SourceLineSynchronizer lineSync( - std::bind(&TInputScanner::getLastValidSourceIndex, &input), &outputStream); + std::bind(&TInputScanner::getLastValidSourceIndex, &input), &outputBuffer); - parseContext.setExtensionCallback([&lineSync, &outputStream]( + parseContext.setExtensionCallback([&lineSync, &outputBuffer]( int line, const char* extension, const char* behavior) { lineSync.syncToLine(line); - outputStream << "#extension " << extension << " : " << behavior; + outputBuffer += "#extension "; + outputBuffer += extension; + outputBuffer += " : "; + outputBuffer += behavior; }); - parseContext.setLineCallback([&lineSync, &outputStream, &parseContext]( + parseContext.setLineCallback([&lineSync, &outputBuffer, &parseContext]( int curLineNum, int newLineNum, bool hasSource, int sourceNum, const char* sourceName) { // SourceNum is the number of the source-string that is being parsed. lineSync.syncToLine(curLineNum); - outputStream << "#line " << newLineNum; + outputBuffer += "#line "; + outputBuffer += std::to_string(newLineNum); if (hasSource) { - outputStream << " "; + outputBuffer += ' '; if (sourceName != nullptr) { - outputStream << "\"" << sourceName << "\""; + outputBuffer += '\"'; + outputBuffer += sourceName; + outputBuffer += '\"'; } else { - outputStream << sourceNum; + outputBuffer += std::to_string(sourceNum); } } if (parseContext.lineDirectiveShouldSetNextLine()) { @@ -1015,33 +1014,36 @@ struct DoPreprocessing { // directive. So the new line number for the current line is newLineNum -= 1; } - outputStream << std::endl; + outputBuffer += '\n'; // And we are at the next line of the #line directive now. lineSync.setLineNum(newLineNum + 1); }); parseContext.setVersionCallback( - [&lineSync, &outputStream](int line, int version, const char* str) { + [&lineSync, &outputBuffer](int line, int version, const char* str) { lineSync.syncToLine(line); - outputStream << "#version " << version; + outputBuffer += "#version "; + outputBuffer += std::to_string(version); if (str) { - outputStream << " " << str; + outputBuffer += ' '; + outputBuffer += str; } }); - parseContext.setPragmaCallback([&lineSync, &outputStream]( + parseContext.setPragmaCallback([&lineSync, &outputBuffer]( int line, const glslang::TVector& ops) { lineSync.syncToLine(line); - outputStream << "#pragma "; + outputBuffer += "#pragma "; for(size_t i = 0; i < ops.size(); ++i) { - outputStream << ops[i]; + outputBuffer += ops[i].c_str(); } }); - parseContext.setErrorCallback([&lineSync, &outputStream]( + parseContext.setErrorCallback([&lineSync, &outputBuffer]( int line, const char* errorMessage) { lineSync.syncToLine(line); - outputStream << "#error " << errorMessage; + outputBuffer += "#error "; + outputBuffer += errorMessage; }); int lastToken = EndOfInput; // lastToken records the last token processed. @@ -1057,7 +1059,7 @@ struct DoPreprocessing { // Don't emit whitespace onto empty lines. // Copy any whitespace characters at the start of a line // from the input to the output. - outputStream << std::string(ppToken.loc.column - 1, ' '); + outputBuffer += std::string(ppToken.loc.column - 1, ' '); } // Output a space in between tokens, but not at the start of a line, @@ -1067,13 +1069,13 @@ struct DoPreprocessing { (unNeededSpaceTokens.find((char)token) == std::string::npos) && (unNeededSpaceTokens.find((char)lastToken) == std::string::npos) && (noSpaceBeforeTokens.find((char)token) == std::string::npos)) { - outputStream << " "; + outputBuffer += ' '; } lastToken = token; - outputStream << ppToken.name; + outputBuffer += ppToken.name; } while (true); - outputStream << std::endl; - *outputString = outputStream.str(); + outputBuffer += '\n'; + *outputString = std::move(outputBuffer); bool success = true; if (parseContext.getNumErrors() > 0) { @@ -1196,7 +1198,11 @@ int ShInitialize() if (! InitProcess()) return 0; - if (! PerProcessGPA) + glslang::GetGlobalLock(); + ++NumberOfClients; + glslang::ReleaseGlobalLock(); + + if (PerProcessGPA == nullptr) PerProcessGPA = new TPoolAllocator(); glslang::TScanContext::fillInKeywordMap(); @@ -1262,6 +1268,14 @@ void ShDestruct(ShHandle handle) // int __fastcall ShFinalize() { + glslang::GetGlobalLock(); + --NumberOfClients; + assert(NumberOfClients >= 0); + bool finalize = NumberOfClients == 0; + glslang::ReleaseGlobalLock(); + if (! finalize) + return 1; + for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { for (int p = 0; p < ProfileCount; ++p) { @@ -1288,10 +1302,9 @@ int __fastcall ShFinalize() } } - if (PerProcessGPA) { - PerProcessGPA->popAll(); + if (PerProcessGPA != nullptr) { delete PerProcessGPA; - PerProcessGPA = 0; + PerProcessGPA = nullptr; } glslang::TScanContext::deleteKeywordMap(); @@ -1332,6 +1345,8 @@ int ShCompile( if (compiler == 0) return 0; + SetThreadPoolAllocator(compiler->getPool()); + compiler->infoSink.info.erase(); compiler->infoSink.debug.erase(); @@ -1389,6 +1404,8 @@ int ShLinkExt( TShHandleBase* base = reinterpret_cast(linkHandle); TLinker* linker = static_cast(base->getAsLinker()); + SetThreadPoolAllocator(linker->getPool()); + if (linker == 0) return 0; @@ -1423,9 +1440,6 @@ void ShSetEncryptionMethod(ShHandle handle) // const char* ShGetInfoLog(const ShHandle handle) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1449,9 +1463,6 @@ const char* ShGetInfoLog(const ShHandle handle) // const void* ShGetExecutable(const ShHandle handle) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1474,9 +1485,6 @@ const void* ShGetExecutable(const ShHandle handle) // int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1496,9 +1504,6 @@ int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* t // int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1517,9 +1522,6 @@ int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* tab // int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1541,9 +1543,6 @@ int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) // int ShGetUniformLocation(const ShHandle handle, const char* name) { - if (!InitThread()) - return 0; - if (handle == 0) return -1; @@ -1570,14 +1569,17 @@ namespace glslang { #include "../Include/revision.h" +#define QUOTE(s) #s +#define STR(n) QUOTE(n) + const char* GetEsslVersionString() { - return "OpenGL ES GLSL 3.00 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; + return "OpenGL ES GLSL 3.20 glslang Khronos. " STR(GLSLANG_MINOR_VERSION) "." STR(GLSLANG_PATCH_LEVEL); } const char* GetGlslVersionString() { - return "4.20 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; + return "4.60 glslang Khronos. " STR(GLSLANG_MINOR_VERSION) "." STR(GLSLANG_PATCH_LEVEL); } int GetKhronosToolId() @@ -1602,8 +1604,9 @@ public: }; TShader::TShader(EShLanguage s) - : pool(0), stage(s), lengths(nullptr), stringNames(nullptr), preamble("") + : stage(s), lengths(nullptr), stringNames(nullptr), preamble("") { + pool = new TPoolAllocator; infoSink = new TInfoSink; compiler = new TDeferredCompiler(stage, *infoSink); intermediate = new TIntermediate(s); @@ -1613,6 +1616,7 @@ TShader::TShader(EShLanguage s) environment.input.dialect = EShClientNone; environment.client.client = EShClientNone; environment.target.language = EShTargetNone; + environment.target.hlslFunctionality1 = false; } TShader::~TShader() @@ -1667,8 +1671,8 @@ void TShader::setShiftBinding(TResourceType res, unsigned int base) { } // Set binding base for given resource type for a given binding set. -void TShader::setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base) { - intermediate->setShiftBindingForSet(res, set, base); +void TShader::setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set) { + intermediate->setShiftBindingForSet(res, base, set); } // Set binding base for sampler types @@ -1687,6 +1691,8 @@ void TShader::setShiftUavBinding(unsigned int base) { setShiftBinding(EResUa void TShader::setShiftSsboBinding(unsigned int base) { setShiftBinding(EResSsbo, base); } // Enables binding automapping using TIoMapper void TShader::setAutoMapBindings(bool map) { intermediate->setAutoMapBindings(map); } +// Enables position.Y output negation in vertex shader +void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } // Fragile: currently within one stage: simple auto-assignment of location void TShader::setAutoMapLocations(bool map) { intermediate->setAutoMapLocations(map); } // See comment above TDefaultHlslIoMapper in iomapper.cpp: @@ -1706,9 +1712,8 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion { if (! InitThread()) return false; + SetThreadPoolAllocator(pool); - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); if (! preamble) preamble = ""; @@ -1730,9 +1735,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, { if (! InitThread()) return false; + SetThreadPoolAllocator(pool); - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); if (! preamble) preamble = ""; @@ -1752,8 +1756,9 @@ const char* TShader::getInfoDebugLog() return infoSink->debug.c_str(); } -TProgram::TProgram() : pool(0), reflection(0), ioMapper(nullptr), linked(false) +TProgram::TProgram() : reflection(0), ioMapper(nullptr), linked(false) { + pool = new TPoolAllocator; infoSink = new TInfoSink; for (int s = 0; s < EShLangCount; ++s) { intermediate[s] = 0; @@ -1788,8 +1793,7 @@ bool TProgram::link(EShMessages messages) bool error = false; - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); + SetThreadPoolAllocator(pool); for (int s = 0; s < EShLangCount; ++s) { if (! linkStage((EShLanguage)s, messages)) @@ -1906,6 +1910,7 @@ const char* TProgram::getUniformBlockName(int index) const { return reflection int TProgram::getUniformBlockSize(int index) const { return reflection->getUniformBlock(index).size; } int TProgram::getUniformIndex(const char* name) const { return reflection->getIndex(name); } int TProgram::getUniformBinding(int index) const { return reflection->getUniform(index).getBinding(); } +int TProgram::getUniformBlockBinding(int index) const { return reflection->getUniformBlock(index).getBinding(); } int TProgram::getUniformBlockIndex(int index) const { return reflection->getUniform(index).index; } int TProgram::getUniformBlockCounterIndex(int index) const { return reflection->getUniformBlock(index).counterIndex; } int TProgram::getUniformType(int index) const { return reflection->getUniform(index).glDefineType; } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/SymbolTable.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/SymbolTable.cpp index 233033e7846e0b6b584f04d4fa9d9c8922e0453a..db46e1075d7b519c24fe0391c74e663db0ed268e 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -60,21 +61,22 @@ void TType::buildMangledName(TString& mangledName) const switch (basicType) { case EbtFloat: mangledName += 'f'; break; case EbtDouble: mangledName += 'd'; break; -#ifdef AMD_EXTENSIONS case EbtFloat16: mangledName += "f16"; break; -#endif case EbtInt: mangledName += 'i'; break; case EbtUint: mangledName += 'u'; break; - case EbtInt64: mangledName += "i64"; break; - case EbtUint64: mangledName += "u64"; break; -#ifdef AMD_EXTENSIONS + case EbtInt8: mangledName += "i8"; break; + case EbtUint8: mangledName += "u8"; break; case EbtInt16: mangledName += "i16"; break; case EbtUint16: mangledName += "u16"; break; -#endif + case EbtInt64: mangledName += "i64"; break; + case EbtUint64: mangledName += "u64"; break; case EbtBool: mangledName += 'b'; break; case EbtAtomicUint: mangledName += "au"; break; case EbtSampler: switch (sampler.type) { +#ifdef AMD_EXTENSIONS + case EbtFloat16: mangledName += "f16"; break; +#endif case EbtInt: mangledName += "i"; break; case EbtUint: mangledName += "u"; break; default: break; // some compilers want this diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.cpp old mode 100644 new mode 100755 index b1893b37ea02dd0752ad657cbf9dde79c78fcdde..51b643085392fe266e022882bb2024cec6897f78 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -185,9 +186,20 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_post_depth_coverage] = EBhDisable; extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_arithmetic] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_ballot] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_shuffle] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_shuffle_relative] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_clustered] = EBhDisable; + extensionBehavior[E_GL_KHR_shader_subgroup_quad] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable; extensionBehavior[E_GL_EXT_shader_image_load_formatted] = EBhDisable; extensionBehavior[E_GL_EXT_post_depth_coverage] = EBhDisable; + extensionBehavior[E_GL_EXT_control_flow_attributes] = EBhDisable; + extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable; // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; @@ -203,6 +215,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_AMD_gpu_shader_int16] = EBhDisable; extensionBehavior[E_GL_AMD_shader_image_load_store_lod] = EBhDisable; extensionBehavior[E_GL_AMD_shader_fragment_mask] = EBhDisable; + extensionBehavior[E_GL_AMD_gpu_shader_half_float_fetch] = EBhDisable; #endif #ifdef NV_EXTENSIONS @@ -212,6 +225,9 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_NV_stereo_view_rendering] = EBhDisable; extensionBehavior[E_GL_NVX_multiview_per_view_attributes] = EBhDisable; extensionBehavior[E_GL_NV_shader_atomic_int64] = EBhDisable; + extensionBehavior[E_GL_NV_conservative_raster_underestimation] = EBhDisable; + extensionBehavior[E_GL_NV_shader_noperspective_interpolation] = EBhDisable; + extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable; #endif // AEP @@ -249,6 +265,16 @@ void TParseVersions::initializeExtensionBehavior() // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; extensionBehavior[E_GL_OVR_multiview2] = EBhDisable; + + // explicit types + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int8] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int16] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int32] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int64] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float16] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float32] = EBhDisable; + extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float64] = EBhDisable; } // Get code that is not part of a shared symbol table, is specific to this shader, @@ -296,6 +322,13 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_OES_texture_cube_map_array 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" ; + +#ifdef NV_EXTENSIONS + if (profile == EEsProfile && version >= 300) { + preamble += "#define GL_NV_shader_noperspective_interpolation 1\n"; + } +#endif + } else { preamble = "#define GL_FRAGMENT_PRECISION_HIGH 1\n" @@ -327,6 +360,18 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_image_load_formatted 1\n" "#define GL_EXT_post_depth_coverage 1\n" + "#define GL_EXT_control_flow_attributes 1\n" + "#define GL_EXT_nonuniform_qualifier 1\n" + + // GL_KHR_shader_subgroup + "#define GL_KHR_shader_subgroup_basic 1\n" + "#define GL_KHR_shader_subgroup_vote 1\n" + "#define GL_KHR_shader_subgroup_arithmetic 1\n" + "#define GL_KHR_shader_subgroup_ballot 1\n" + "#define GL_KHR_shader_subgroup_shuffle 1\n" + "#define GL_KHR_shader_subgroup_shuffle_relative 1\n" + "#define GL_KHR_shader_subgroup_clustered 1\n" + "#define GL_KHR_shader_subgroup_quad 1\n" #ifdef AMD_EXTENSIONS "#define GL_AMD_shader_ballot 1\n" @@ -338,6 +383,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_AMD_gpu_shader_int16 1\n" "#define GL_AMD_shader_image_load_store_lod 1\n" "#define GL_AMD_shader_fragment_mask 1\n" + "#define GL_AMD_gpu_shader_half_float_fetch 1\n" #endif #ifdef NV_EXTENSIONS @@ -345,7 +391,17 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_geometry_shader_passthrough 1\n" "#define GL_NV_viewport_array2 1\n" "#define GL_NV_shader_atomic_int64 1\n" + "#define GL_NV_conservative_raster_underestimation 1\n" + "#define GL_NV_shader_subgroup_partitioned 1\n" #endif + "#define GL_KHX_shader_explicit_arithmetic_types 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_int8 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_int16 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_int32 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_int64 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_float16 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_float32 1\n" + "#define GL_KHX_shader_explicit_arithmetic_types_float64 1\n" ; if (version >= 150) { @@ -568,7 +624,8 @@ bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExte // void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { - if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; + if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) + return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) @@ -586,7 +643,8 @@ void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, // void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { - if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; + if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) + return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) @@ -624,7 +682,8 @@ bool TParseVersions::extensionTurnedOn(const char* const extension) bool TParseVersions::extensionsTurnedOn(int numExtensions, const char* const extensions[]) { for (int i = 0; i < numExtensions; ++i) { - if (extensionTurnedOn(extensions[i])) return true; + if (extensionTurnedOn(extensions[i])) + return true; } return false; } @@ -680,6 +739,25 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString); else if (strcmp(extension, "GL_GOOGLE_include_directive") == 0) updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString); + // subgroup_* to subgroup_basic + else if (strcmp(extension, "GL_KHR_shader_subgroup_vote") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_arithmetic") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_ballot") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_shuffle") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_shuffle_relative") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_clustered") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); + else if (strcmp(extension, "GL_KHR_shader_subgroup_quad") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); +#ifdef NV_EXTENSIONS + else if (strcmp(extension, "GL_NV_shader_subgroup_partitioned") == 0) + updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); +#endif } void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior) @@ -737,23 +815,71 @@ void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) profileRequires(loc, ECompatibilityProfile, 400, nullptr, op); } -#ifdef AMD_EXTENSIONS -// Call for any operation needing GLSL 16-bit integer data-type support. -void TParseVersions::int16Check(const TSourceLoc& loc, const char* op, bool builtIn) +// Call for any operation needing GLSL float16 data-type support. +void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { +#if AMD_EXTENSIONS + const char* const extensions[3] = {E_GL_AMD_gpu_shader_half_float, + E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_float16}; + +#else + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_float16}; +#endif + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + +// Call for any operation needing GLSL float32 data-type support. +void TParseVersions::explicitFloat32Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_float32}; + requireExtensions(loc, 2, extensions, "explicit types"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + +// Call for any operation needing GLSL float64 data-type support. +void TParseVersions::explicitFloat64Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_float64}; + requireExtensions(loc, 2, extensions, "explicit types"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + +// Call for any operation needing GLSL explicit int8 data-type support. +void TParseVersions::explicitInt8Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { - requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_int16, "shader int16"); + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int8}; + requireExtensions(loc, 2, extensions, "explicit types"); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); } } -// Call for any operation needing GLSL float16 data-type support. -void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) +#ifdef AMD_EXTENSIONS +// Call for any operation needing GLSL float16 opaque-type support +void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { - requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float, "shader half float"); + requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float_fetch, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); @@ -761,11 +887,46 @@ void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool bu } #endif +// Call for any operation needing GLSL explicit int16 data-type support. +void TParseVersions::explicitInt16Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (! builtIn) { +#if AMD_EXTENSIONS + const char* const extensions[3] = {E_GL_AMD_gpu_shader_int16, + E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int16}; +#else + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int16}; +#endif + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + +// Call for any operation needing GLSL explicit int32 data-type support. +void TParseVersions::explicitInt32Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (! builtIn) { + const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int32}; + requireExtensions(loc, 2, extensions, "explicit types"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + // Call for any operation needing GLSL 64-bit integer data-type support. void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { - requireExtensions(loc, 1, &E_GL_ARB_gpu_shader_int64, "shader int64"); + const char* const extensions[3] = {E_GL_ARB_gpu_shader_int64, + E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int64}; + requireExtensions(loc, 3, extensions, "shader int64"); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); @@ -782,7 +943,7 @@ void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) // Call for any operation removed because Vulkan SPIR-V is being generated. void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op) { - if (spvVersion.vulkan >= 100) + if (spvVersion.vulkan > 0) error(loc, "not allowed when using GLSL for Vulkan", op, ""); } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.h old mode 100644 new mode 100755 index bd57103afeae694ae24c76a1d7f833d39c97db77..b297d27b5c783b7776d71b2fa1530e3ca64db0e7 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/Versions.h @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -83,7 +84,7 @@ struct SpvVersion { SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {} unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX" - int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use (100 means 1.0) + int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX" }; @@ -139,6 +140,15 @@ const char* const E_GL_ARB_shader_stencil_export = "GL_ARB_shader_stencil const char* const E_GL_ARB_post_depth_coverage = "GL_ARB_post_depth_coverage"; const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array"; +const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic"; +const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote"; +const char* const E_GL_KHR_shader_subgroup_arithmetic = "GL_KHR_shader_subgroup_arithmetic"; +const char* const E_GL_KHR_shader_subgroup_ballot = "GL_KHR_shader_subgroup_ballot"; +const char* const E_GL_KHR_shader_subgroup_shuffle = "GL_KHR_shader_subgroup_shuffle"; +const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_subgroup_shuffle_relative"; +const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered"; +const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad"; + const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; @@ -146,6 +156,8 @@ const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_lo const char* const E_GL_EXT_device_group = "GL_EXT_device_group"; const char* const E_GL_EXT_multiview = "GL_EXT_multiview"; const char* const E_GL_EXT_post_depth_coverage = "GL_EXT_post_depth_coverage"; +const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_flow_attributes"; +const char* const E_GL_EXT_nonuniform_qualifier = "GL_EXT_nonuniform_qualifier"; // Arrays of extensions for the above viewportEXTs duplications @@ -173,6 +185,7 @@ const char* const E_GL_AMD_texture_gather_bias_lod = "GL_AMD_textur const char* const E_GL_AMD_gpu_shader_int16 = "GL_AMD_gpu_shader_int16"; const char* const E_GL_AMD_shader_image_load_store_lod = "GL_AMD_shader_image_load_store_lod"; const char* const E_GL_AMD_shader_fragment_mask = "GL_AMD_shader_fragment_mask"; +const char* const E_GL_AMD_gpu_shader_half_float_fetch = "GL_AMD_gpu_shader_half_float_fetch"; #endif #ifdef NV_EXTENSIONS @@ -183,6 +196,9 @@ const char* const E_GL_NV_viewport_array2 = "GL_NV_viewpor const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_view_rendering"; const char* const E_GL_NVX_multiview_per_view_attributes = "GL_NVX_multiview_per_view_attributes"; const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_atomic_int64"; +const char* const E_GL_NV_conservative_raster_underestimation = "GL_NV_conservative_raster_underestimation"; +const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_noperspective_interpolation"; +const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned"; // Arrays of extensions for the above viewportEXTs duplications @@ -218,6 +234,16 @@ const char* const E_GL_OES_tessellation_point_size = "GL_OES_tessel const char* const E_GL_OES_texture_buffer = "GL_OES_texture_buffer"; const char* const E_GL_OES_texture_cube_map_array = "GL_OES_texture_cube_map_array"; +// KHX +const char* const E_GL_KHX_shader_explicit_arithmetic_types = "GL_KHX_shader_explicit_arithmetic_types"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_int8 = "GL_KHX_shader_explicit_arithmetic_types_int8"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_int16 = "GL_KHX_shader_explicit_arithmetic_types_int16"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_int32 = "GL_KHX_shader_explicit_arithmetic_types_int32"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_int64 = "GL_KHX_shader_explicit_arithmetic_types_int64"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_float16 = "GL_KHX_shader_explicit_arithmetic_types_float16"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_float32 = "GL_KHX_shader_explicit_arithmetic_types_float32"; +const char* const E_GL_KHX_shader_explicit_arithmetic_types_float64 = "GL_KHX_shader_explicit_arithmetic_types_float64"; + // Arrays of extensions for the above AEP duplications const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader }; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.cpp new file mode 100644 index 0000000000000000000000000000000000000000..73b665d80820f1c80affa2212f83cf0a3880e0ec --- /dev/null +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.cpp @@ -0,0 +1,257 @@ +// +// Copyright (C) 2017 LunarG, Inc. +// Copyright (C) 2018 Google, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of Google, Inc., nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#include "attribute.h" +#include "../Include/intermediate.h" +#include "ParseHelper.h" + +namespace glslang { + +// extract integers out of attribute arguments stored in attribute aggregate +bool TAttributeArgs::getInt(int& value, int argNum) const +{ + const TConstUnion* intConst = getConstUnion(EbtInt, argNum); + + if (intConst == nullptr) + return false; + + value = intConst->getIConst(); + return true; +} + +// extract strings out of attribute arguments stored in attribute aggregate. +// convert to lower case if converToLower is true (for case-insensitive compare convenience) +bool TAttributeArgs::getString(TString& value, int argNum, bool convertToLower) const +{ + const TConstUnion* stringConst = getConstUnion(EbtString, argNum); + + if (stringConst == nullptr) + return false; + + value = *stringConst->getSConst(); + + // Convenience. + if (convertToLower) + std::transform(value.begin(), value.end(), value.begin(), ::tolower); + + return true; +} + +// How many arguments were supplied? +int TAttributeArgs::size() const +{ + return args == nullptr ? 0 : (int)args->getSequence().size(); +} + +// Helper to get attribute const union. Returns nullptr on failure. +const TConstUnion* TAttributeArgs::getConstUnion(TBasicType basicType, int argNum) const +{ + if (args == nullptr) + return nullptr; + + if (argNum >= (int)args->getSequence().size()) + return nullptr; + + const TConstUnion* constVal = &args->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; + if (constVal == nullptr || constVal->getType() != basicType) + return nullptr; + + return constVal; +} + +// Implementation of TParseContext parts of attributes +TAttributeType TParseContext::attributeFromName(const TString& name) const +{ + if (name == "branch" || name == "dont_flatten") + return EatBranch; + else if (name == "flatten") + return EatFlatten; + else if (name == "unroll") + return EatUnroll; + else if (name == "loop" || name == "dont_unroll") + return EatLoop; + else if (name == "dependency_infinite") + return EatDependencyInfinite; + else if (name == "dependency_length") + return EatDependencyLength; + else + return EatNone; +} + +// Make an initial leaf for the grammar from a no-argument attribute +TAttributes* TParseContext::makeAttributes(const TString& identifier) const +{ + TAttributes *attributes = nullptr; + attributes = NewPoolObject(attributes); + TAttributeArgs args = { attributeFromName(identifier), nullptr }; + attributes->push_back(args); + return attributes; +} + +// Make an initial leaf for the grammar from a one-argument attribute +TAttributes* TParseContext::makeAttributes(const TString& identifier, TIntermNode* node) const +{ + TAttributes *attributes = nullptr; + attributes = NewPoolObject(attributes); + + // for now, node is always a simple single expression, but other code expects + // a list, so make it so + TIntermAggregate* agg = intermediate.makeAggregate(node); + TAttributeArgs args = { attributeFromName(identifier), agg }; + attributes->push_back(args); + return attributes; +} + +// Merge two sets of attributes into a single set. +// The second argument is destructively consumed. +TAttributes* TParseContext::mergeAttributes(TAttributes* attr1, TAttributes* attr2) const +{ + attr1->splice(attr1->end(), *attr2); + return attr1; +} + +// +// Selection attributes +// +void TParseContext::handleSelectionAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermSelection* selection = node->getAsSelectionNode(); + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(node->getLoc(), "attribute does not apply to a selection", "", ""); + break; + } + } +} + +// +// Switch attributes +// +void TParseContext::handleSwitchAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermSwitch* selection = node->getAsSwitchNode(); + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(node->getLoc(), "attribute does not apply to a switch", "", ""); + break; + } + } +} + +// +// Loop attributes +// +void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermLoop* loop = node->getAsLoopNode(); + if (loop == nullptr) { + // the actual loop might be part of a sequence + TIntermAggregate* agg = node->getAsAggregate(); + if (agg == nullptr) + return; + for (auto it = agg->getSequence().begin(); it != agg->getSequence().end(); ++it) { + loop = (*it)->getAsLoopNode(); + if (loop != nullptr) + break; + } + if (loop == nullptr) + return; + } + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->name != EatDependencyLength && it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + int value; + switch (it->name) { + case EatUnroll: + loop->setUnroll(); + break; + case EatLoop: + loop->setDontUnroll(); + break; + case EatDependencyInfinite: + loop->setLoopDependency(TIntermLoop::dependencyInfinite); + break; + case EatDependencyLength: + if (it->size() == 1 && it->getInt(value)) { + if (value <= 0) + error(node->getLoc(), "must be positive", "dependency_length", ""); + loop->setLoopDependency(value); + } else + warn(node->getLoc(), "expected a single integer argument", "dependency_length", ""); + break; + default: + warn(node->getLoc(), "attribute does not apply to a loop", "", ""); + break; + } + } +} + + +} // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.h new file mode 100644 index 0000000000000000000000000000000000000000..8d0c5bcafbf3d69caaa6df8d4c3dd24d237e4d7f --- /dev/null +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/attribute.h @@ -0,0 +1,102 @@ +// +// Copyright (C) 2017 LunarG, Inc. +// Copyright (C) 2018 Google, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#ifndef _ATTRIBUTE_INCLUDED_ +#define _ATTRIBUTE_INCLUDED_ + +#include "../Include/Common.h" +#include "../Include/ConstantUnion.h" + +namespace glslang { + + enum TAttributeType { + EatNone, + EatAllow_uav_condition, + EatBranch, + EatCall, + EatDomain, + EatEarlyDepthStencil, + EatFastOpt, + EatFlatten, + EatForceCase, + EatInstance, + EatMaxTessFactor, + EatNumThreads, + EatMaxVertexCount, + EatOutputControlPoints, + EatOutputTopology, + EatPartitioning, + EatPatchConstantFunc, + EatPatchSize, + EatUnroll, + EatLoop, + EatBinding, + EatGlobalBinding, + EatLocation, + EatInputAttachment, + EatBuiltIn, + EatPushConstant, + EatConstantId, + EatDependencyInfinite, + EatDependencyLength + }; + + class TIntermAggregate; + + struct TAttributeArgs { + TAttributeType name; + const TIntermAggregate* args; + + // Obtain attribute as integer + // Return false if it cannot be obtained + bool getInt(int& value, int argNum = 0) const; + + // Obtain attribute as string, with optional to-lower transform + // Return false if it cannot be obtained + bool getString(TString& value, int argNum = 0, bool convertToLower = true) const; + + // How many arguments were provided to the attribute? + int size() const; + + protected: + const TConstUnion* getConstUnion(TBasicType basicType, int argNum) const; + }; + + typedef TList TAttributes; + +} // end namespace glslang + +#endif // _ATTRIBUTE_INCLUDED_ diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/gl_types.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/gl_types.h index ae00ae57ecfd130b75eaa740f95cd1a6c2c83862..c9fee9ecce69d36268757dfd104d6ee240fcff11 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/gl_types.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/gl_types.h @@ -117,6 +117,40 @@ #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D +#ifdef AMD_EXTENSIONS +#define GL_FLOAT16_SAMPLER_1D_AMD 0x91CE +#define GL_FLOAT16_SAMPLER_2D_AMD 0x91CF +#define GL_FLOAT16_SAMPLER_3D_AMD 0x91D0 +#define GL_FLOAT16_SAMPLER_CUBE_AMD 0x91D1 +#define GL_FLOAT16_SAMPLER_2D_RECT_AMD 0x91D2 +#define GL_FLOAT16_SAMPLER_1D_ARRAY_AMD 0x91D3 +#define GL_FLOAT16_SAMPLER_2D_ARRAY_AMD 0x91D4 +#define GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD 0x91D5 +#define GL_FLOAT16_SAMPLER_BUFFER_AMD 0x91D6 +#define GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD 0x91D7 +#define GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD 0x91D8 + +#define GL_FLOAT16_SAMPLER_1D_SHADOW_AMD 0x91D9 +#define GL_FLOAT16_SAMPLER_2D_SHADOW_AMD 0x91DA +#define GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD 0x91DB +#define GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD 0x91DC +#define GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD 0x91DD +#define GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD 0x91DE +#define GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD 0x91DF + +#define GL_FLOAT16_IMAGE_1D_AMD 0x91E0 +#define GL_FLOAT16_IMAGE_2D_AMD 0x91E1 +#define GL_FLOAT16_IMAGE_3D_AMD 0x91E2 +#define GL_FLOAT16_IMAGE_2D_RECT_AMD 0x91E3 +#define GL_FLOAT16_IMAGE_CUBE_AMD 0x91E4 +#define GL_FLOAT16_IMAGE_1D_ARRAY_AMD 0x91E5 +#define GL_FLOAT16_IMAGE_2D_ARRAY_AMD 0x91E6 +#define GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD 0x91E7 +#define GL_FLOAT16_IMAGE_BUFFER_AMD 0x91E8 +#define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD 0x91E9 +#define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD 0x91EA +#endif + #define GL_INT_SAMPLER_1D 0x8DC9 #define GL_INT_SAMPLER_2D 0x8DCA #define GL_INT_SAMPLER_3D 0x8DCB diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang.y b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang.y index a0119357481c42d66a41bbf7bc3f977a42d156f3..e65483a82e391c8f7c80634880d50527c2cb28f5 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang.y +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang.y @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -58,6 +59,7 @@ Jutta Degener, 1995 #include "SymbolTable.h" #include "ParseHelper.h" #include "../Public/ShaderLang.h" +#include "attribute.h" using namespace glslang; @@ -86,6 +88,7 @@ using namespace glslang; TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -121,15 +124,28 @@ extern int yylex(YYSTYPE*, TParseContext&); %expect 1 // One shift reduce conflict because of if | else %token ATTRIBUTE VARYING -%token CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T INT16_T UINT16_T FLOAT16_T +%token FLOAT16_T FLOAT FLOAT32_T DOUBLE FLOAT64_T +%token CONST BOOL INT UINT INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T %token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE -%token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 I64VEC2 I64VEC3 I64VEC4 UVEC2 UVEC3 UVEC4 U64VEC2 U64VEC3 U64VEC4 VEC2 VEC3 VEC4 +%token BVEC2 BVEC3 BVEC4 +%token IVEC2 IVEC3 IVEC4 +%token UVEC2 UVEC3 UVEC4 +%token I64VEC2 I64VEC3 I64VEC4 +%token U64VEC2 U64VEC3 U64VEC4 +%token I32VEC2 I32VEC3 I32VEC4 +%token U32VEC2 U32VEC3 U32VEC4 +%token I16VEC2 I16VEC3 I16VEC4 +%token U16VEC2 U16VEC3 U16VEC4 +%token I8VEC2 I8VEC3 I8VEC4 +%token U8VEC2 U8VEC3 U8VEC4 +%token VEC2 VEC3 VEC4 %token MAT2 MAT3 MAT4 CENTROID IN OUT INOUT -%token UNIFORM PATCH SAMPLE BUFFER SHARED +%token UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY %token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 %token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 -%token I16VEC2 I16VEC3 I16VEC4 U16VEC2 U16VEC3 U16VEC4 +%token F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 +%token F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 %token NOPERSPECTIVE FLAT SMOOTH LAYOUT __EXPLICITINTERPAMD %token MAT2X2 MAT2X3 MAT2X4 @@ -141,6 +157,12 @@ extern int yylex(YYSTYPE*, TParseContext&); %token F16MAT2X2 F16MAT2X3 F16MAT2X4 %token F16MAT3X2 F16MAT3X3 F16MAT3X4 %token F16MAT4X2 F16MAT4X3 F16MAT4X4 +%token F32MAT2X2 F32MAT2X3 F32MAT2X4 +%token F32MAT3X2 F32MAT3X3 F32MAT3X4 +%token F32MAT4X2 F32MAT4X3 F32MAT4X4 +%token F64MAT2X2 F64MAT2X3 F64MAT2X4 +%token F64MAT3X2 F64MAT3X3 F64MAT3X4 +%token F64MAT4X2 F64MAT4X3 F64MAT4X4 %token ATOMIC_UINT // combined image/sampler @@ -157,6 +179,12 @@ extern int yylex(YYSTYPE*, TParseContext&); %token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY %token SAMPLEREXTERNALOES +%token F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE +%token F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY +%token F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY +%token F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW +%token F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW + // pure sampler %token SAMPLER SAMPLERSHADOW @@ -172,8 +200,13 @@ extern int yylex(YYSTYPE*, TParseContext&); %token TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS %token TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY +%token F16TEXTURE1D F16TEXTURE2D F16TEXTURE3D F16TEXTURE2DRECT F16TEXTURECUBE +%token F16TEXTURE1DARRAY F16TEXTURE2DARRAY F16TEXTURECUBEARRAY +%token F16TEXTUREBUFFER F16TEXTURE2DMS F16TEXTURE2DMSARRAY + // input attachments %token SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS +%token F16SUBPASSINPUT F16SUBPASSINPUTMS %token IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D %token UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D @@ -186,10 +219,14 @@ extern int yylex(YYSTYPE*, TParseContext&); %token IMAGE2DMS IIMAGE2DMS UIMAGE2DMS %token IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY +%token F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT +%token F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY +%token F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY + %token STRUCT VOID WHILE %token IDENTIFIER TYPE_NAME -%token FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT INT16CONSTANT UINT16CONSTANT BOOLCONSTANT FLOAT16CONSTANT +%token FLOATCONSTANT DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT INT32CONSTANT UINT32CONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT FLOAT16CONSTANT %token LEFT_OP RIGHT_OP %token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP %token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN @@ -218,12 +255,12 @@ extern int yylex(YYSTYPE*, TParseContext&); %type translation_unit function_definition %type statement simple_statement %type statement_list switch_statement_list compound_statement -%type declaration_statement selection_statement expression_statement -%type switch_statement case_label +%type declaration_statement selection_statement selection_statement_nonattributed expression_statement +%type switch_statement switch_statement_nonattributed case_label %type declaration external_declaration %type for_init_statement compound_statement_no_new_scope %type selection_rest_statement for_rest_statement -%type iteration_statement jump_statement statement_no_new_scope statement_scoped +%type iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped %type single_declaration init_declarator_list %type parameter_declaration parameter_declarator parameter_type_specifier @@ -231,6 +268,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %type array_specifier %type precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier %type layout_qualifier layout_qualifier_id_list layout_qualifier_id +%type non_uniform_qualifier %type type_qualifier fully_specified_type type_specifier %type single_type_qualifier @@ -246,6 +284,8 @@ extern int yylex(YYSTYPE*, TParseContext&); %type identifier_list +%type attribute attribute_list single_attribute + %start translation_unit %% @@ -259,6 +299,14 @@ primary_expression : variable_identifier { $$ = $1; } + | INT32CONSTANT { + parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); + $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); + } + | UINT32CONSTANT { + parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); + $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); + } | INTCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); } @@ -275,16 +323,12 @@ primary_expression $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); } | INT16CONSTANT { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit integer literal"); + parseContext.explicitInt16Check($1.loc, "16-bit integer literal"); $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); -#endif } | UINT16CONSTANT { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit unsigned integer literal"); + parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal"); $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); -#endif } | FLOATCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); @@ -294,10 +338,8 @@ primary_expression $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); } | FLOAT16CONSTANT { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float literal"); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); -#endif } | BOOLCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); @@ -432,6 +474,11 @@ function_identifier $$.function = new TFunction(&empty, TType(EbtVoid), EOpNull); } } + | non_uniform_qualifier { + // Constructor + $$.intermNode = 0; + $$.function = parseContext.handleConstructorCall($1.loc, $1); + } ; unary_expression @@ -893,14 +940,16 @@ parameter_declarator parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); } - parseContext.arrayDimCheck($2.loc, $1.arraySizes, $3.arraySizes); + TType* type = new TType($1); + type->transferArraySizes($3.arraySizes); + type->copyArrayInnerSizes($1.arraySizes); + parseContext.arrayOfArrayVersionCheck($2.loc, type->getArraySizes()); parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes); parseContext.reservedErrorCheck($2.loc, *$2.string); - $1.arraySizes = $3.arraySizes; + TParameter param = { $2.string, type }; - TParameter param = { $2.string, new TType($1)}; $$.loc = $2.loc; $$.param = param; } @@ -925,7 +974,7 @@ parameter_declaration $$ = $1; parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFix($1.loc, EvqTemporary, *$$.param.type); + parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); } // @@ -945,7 +994,7 @@ parameter_declaration $$ = $1; parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFix($1.loc, EvqTemporary, *$$.param.type); + parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); } ; @@ -1034,7 +1083,7 @@ fully_specified_type } if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier)) - $2.arraySizes = 0; + $2.arraySizes = nullptr; parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); $2.shaderQualifiers.merge($1.shaderQualifiers); @@ -1076,7 +1125,11 @@ interpolation_qualifier } | NOPERSPECTIVE { parseContext.globalCheck($1.loc, "noperspective"); +#ifdef NV_EXTENSIONS + parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); +#else parseContext.requireProfile($1.loc, ~EEsProfile, "noperspective"); +#endif parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective"); $$.init($1.loc); $$.qualifier.nopersp = true; @@ -1170,6 +1223,9 @@ single_type_qualifier // allow inheritance of storage qualifier from block declaration $$ = $1; } + | non_uniform_qualifier { + $$ = $1; + } ; storage_qualifier @@ -1290,6 +1346,13 @@ storage_qualifier } ; +non_uniform_qualifier + : NONUNIFORM { + $$.init($1.loc); + $$.qualifier.nonUniform = true; + } + ; + type_name_list : IDENTIFIER { // TODO @@ -1307,7 +1370,7 @@ type_specifier $$.qualifier.precision = parseContext.getDefaultPrecision($$); } | type_specifier_nonarray array_specifier { - parseContext.arrayDimCheck($2.loc, $2.arraySizes, 0); + parseContext.arrayOfArrayVersionCheck($2.loc, $2.arraySizes); $$ = $1; $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.arraySizes = $2.arraySizes; @@ -1356,11 +1419,19 @@ type_specifier_nonarray $$.basicType = EbtDouble; } | FLOAT16_T { -#ifdef AMD_EXTENSIONS - parseContext.float16Check($1.loc, "half float", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; -#endif + } + | FLOAT32_T { + parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat; + } + | FLOAT64_T { + parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; } | INT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -1371,29 +1442,45 @@ type_specifier_nonarray $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint; } - | INT64_T { - parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + | INT8_T { + parseContext.explicitInt8Check($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; + $$.basicType = EbtInt8; } - | UINT64_T { - parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + | UINT8_T { + parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; + $$.basicType = EbtUint8; } | INT16_T { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitInt16Check($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtInt16; -#endif } | UINT16_T { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint16; -#endif + } + | INT32_T { + parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt; + } + | UINT32_T { + parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint; + } + | INT64_T { + parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt64; + } + | UINT64_T { + parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint64; } | BOOL { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -1433,28 +1520,58 @@ type_specifier_nonarray $$.setVector(4); } | F16VEC2 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setVector(2); -#endif } | F16VEC3 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setVector(3); -#endif } | F16VEC4 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setVector(4); -#endif + } + | F32VEC2 { + parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat; + $$.setVector(2); + } + | F32VEC3 { + parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat; + $$.setVector(3); + } + | F32VEC4 { + parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat; + $$.setVector(4); + } + | F64VEC2 { + parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setVector(2); + } + | F64VEC3 { + parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setVector(3); + } + | F64VEC4 { + parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setVector(4); } | BVEC2 { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -1486,47 +1603,77 @@ type_specifier_nonarray $$.basicType = EbtInt; $$.setVector(4); } - | I64VEC2 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I8VEC2 { + parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt8; + $$.setVector(2); + } + | I8VEC3 { + parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt8; + $$.setVector(3); + } + | I8VEC4 { + parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt8; + $$.setVector(4); + } + | I16VEC2 { + parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(2); + } + | I16VEC3 { + parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(3); + } + | I16VEC4 { + parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(4); + } + | I32VEC2 { + parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; + $$.basicType = EbtInt; $$.setVector(2); } - | I64VEC3 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I32VEC3 { + parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; + $$.basicType = EbtInt; $$.setVector(3); } - | I64VEC4 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I32VEC4 { + parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; + $$.basicType = EbtInt; $$.setVector(4); } - | I16VEC2 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I64VEC2 { + parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; + $$.basicType = EbtInt64; $$.setVector(2); -#endif } - | I16VEC3 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I64VEC3 { + parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; + $$.basicType = EbtInt64; $$.setVector(3); -#endif } - | I16VEC4 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + | I64VEC4 { + parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; + $$.basicType = EbtInt64; $$.setVector(4); -#endif } | UVEC2 { parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); @@ -1546,47 +1693,77 @@ type_specifier_nonarray $$.basicType = EbtUint; $$.setVector(4); } - | U64VEC2 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + | U8VEC2 { + parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; + $$.basicType = EbtUint8; $$.setVector(2); } - | U64VEC3 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + | U8VEC3 { + parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; + $$.basicType = EbtInt8; $$.setVector(3); } - | U64VEC4 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + | U8VEC4 { + parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; + $$.basicType = EbtUint8; $$.setVector(4); } | U16VEC2 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint16; $$.setVector(2); -#endif } | U16VEC3 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint16; $$.setVector(3); -#endif } | U16VEC4 { -#ifdef AMD_EXTENSIONS - parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint16; $$.setVector(4); -#endif + } + | U32VEC2 { + parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint; + $$.setVector(2); + } + | U32VEC3 { + parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint; + $$.setVector(3); + } + | U32VEC4 { + parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint; + $$.setVector(4); + } + | U64VEC2 { + parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint64; + $$.setVector(2); + } + | U64VEC3 { + parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint64; + $$.setVector(3); + } + | U64VEC4 { + parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint64; + $$.setVector(4); } | MAT2 { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -1721,157 +1898,277 @@ type_specifier_nonarray $$.setMatrix(4, 4); } | F16MAT2 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(2, 2); -#endif } | F16MAT3 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(3, 3); -#endif } | F16MAT4 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(4, 4); -#endif } | F16MAT2X2 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(2, 2); -#endif } | F16MAT2X3 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(2, 3); -#endif } | F16MAT2X4 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(2, 4); -#endif } | F16MAT3X2 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(3, 2); -#endif } | F16MAT3X3 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(3, 3); -#endif } | F16MAT3X4 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(3, 4); -#endif } | F16MAT4X2 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(4, 2); -#endif } | F16MAT4X3 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(4, 3); -#endif } | F16MAT4X4 { -#ifdef AMD_EXTENSIONS parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat16; $$.setMatrix(4, 4); -#endif } - | ATOMIC_UINT { - parseContext.vulkanRemoved($1.loc, "atomic counter types"); + | F32MAT2 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAtomicUint; + $$.basicType = EbtFloat; + $$.setMatrix(2, 2); } - | SAMPLER1D { + | F32MAT3 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D); + $$.basicType = EbtFloat; + $$.setMatrix(3, 3); } - | SAMPLER2D { + | F32MAT4 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); + $$.basicType = EbtFloat; + $$.setMatrix(4, 4); } - | SAMPLER3D { + | F32MAT2X2 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd3D); + $$.basicType = EbtFloat; + $$.setMatrix(2, 2); } - | SAMPLERCUBE { + | F32MAT2X3 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube); + $$.basicType = EbtFloat; + $$.setMatrix(2, 3); } - | SAMPLER1DSHADOW { + | F32MAT2X4 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, false, true); + $$.basicType = EbtFloat; + $$.setMatrix(2, 4); } - | SAMPLER2DSHADOW { + | F32MAT3X2 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, true); + $$.basicType = EbtFloat; + $$.setMatrix(3, 2); } - | SAMPLERCUBESHADOW { + | F32MAT3X3 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, false, true); + $$.basicType = EbtFloat; + $$.setMatrix(3, 3); } - | SAMPLER1DARRAY { + | F32MAT3X4 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true); + $$.basicType = EbtFloat; + $$.setMatrix(3, 4); } - | SAMPLER2DARRAY { + | F32MAT4X2 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true); + $$.basicType = EbtFloat; + $$.setMatrix(4, 2); } - | SAMPLER1DARRAYSHADOW { + | F32MAT4X3 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true, true); + $$.basicType = EbtFloat; + $$.setMatrix(4, 3); } - | SAMPLER2DARRAYSHADOW { + | F32MAT4X4 { + parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtFloat; + $$.setMatrix(4, 4); + } + | F64MAT2 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(2, 2); + } + | F64MAT3 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(3, 3); + } + | F64MAT4 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(4, 4); + } + | F64MAT2X2 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(2, 2); + } + | F64MAT2X3 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(2, 3); + } + | F64MAT2X4 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(2, 4); + } + | F64MAT3X2 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(3, 2); + } + | F64MAT3X3 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(3, 3); + } + | F64MAT3X4 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(3, 4); + } + | F64MAT4X2 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(4, 2); + } + | F64MAT4X3 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(4, 3); + } + | F64MAT4X4 { + parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtDouble; + $$.setMatrix(4, 4); + } + | ATOMIC_UINT { + parseContext.vulkanRemoved($1.loc, "atomic counter types"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtAtomicUint; + } + | SAMPLER1D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd1D); + } + | SAMPLER2D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd2D); + } + | SAMPLER3D { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd3D); + } + | SAMPLERCUBE { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, EsdCube); + } + | SAMPLER1DSHADOW { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd1D, false, true); + } + | SAMPLER2DSHADOW { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd2D, false, true); + } + | SAMPLERCUBESHADOW { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, EsdCube, false, true); + } + | SAMPLER1DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd1D, true); + } + | SAMPLER2DARRAY { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd2D, true); + } + | SAMPLER1DARRAYSHADOW { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat, Esd1D, true, true); + } + | SAMPLER2DARRAYSHADOW { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd2D, true, true); @@ -1886,6 +2183,110 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, EsdCube, true, true); } + | F16SAMPLER1D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd1D); +#endif + } + | F16SAMPLER2D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D); +#endif + } + | F16SAMPLER3D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd3D); +#endif + } + | F16SAMPLERCUBE { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdCube); +#endif + } + | F16SAMPLER1DSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd1D, false, true); +#endif + } + | F16SAMPLER2DSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D, false, true); +#endif + } + | F16SAMPLERCUBESHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdCube, false, true); +#endif + } + | F16SAMPLER1DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd1D, true); +#endif + } + | F16SAMPLER2DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D, true); +#endif + } + | F16SAMPLER1DARRAYSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd1D, true, true); +#endif + } + | F16SAMPLER2DARRAYSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D, true, true); +#endif + } + | F16SAMPLERCUBEARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdCube, true); +#endif + } + | F16SAMPLERCUBEARRAYSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdCube, true, true); +#endif + } | ISAMPLER1D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -1966,6 +2367,22 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, EsdRect, false, true); } + | F16SAMPLER2DRECT { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdRect); +#endif + } + | F16SAMPLER2DRECTSHADOW { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdRect, false, true); +#endif + } | ISAMPLER2DRECT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -1981,6 +2398,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, EsdBuffer); } + | F16SAMPLERBUFFER { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, EsdBuffer); +#endif + } | ISAMPLERBUFFER { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -1996,6 +2421,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd2D, false, false, true); } + | F16SAMPLER2DMS { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D, false, false, true); +#endif + } | ISAMPLER2DMS { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2011,6 +2444,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd2D, true, false, true); } + | F16SAMPLER2DMSARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.set(EbtFloat16, Esd2D, true, false, true); +#endif + } | ISAMPLER2DMSARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2036,36 +2477,92 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd1D); } + | F16TEXTURE1D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd1D); +#endif + } | TEXTURE2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd2D); } + | F16TEXTURE2D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd2D); +#endif + } | TEXTURE3D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd3D); } + | F16TEXTURE3D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd3D); +#endif + } | TEXTURECUBE { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, EsdCube); } + | F16TEXTURECUBE { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, EsdCube); +#endif + } | TEXTURE1DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd1D, true); } + | F16TEXTURE1DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd1D, true); +#endif + } | TEXTURE2DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd2D, true); } + | F16TEXTURE2DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd2D, true); +#endif + } | TEXTURECUBEARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, EsdCube, true); } + | F16TEXTURECUBEARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, EsdCube, true); +#endif + } | ITEXTURE1D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2141,6 +2638,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, EsdRect); } + | F16TEXTURE2DRECT { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, EsdRect); +#endif + } | ITEXTURE2DRECT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2156,6 +2661,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, EsdBuffer); } + | F16TEXTUREBUFFER { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, EsdBuffer); +#endif + } | ITEXTUREBUFFER { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2171,6 +2684,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); } + | F16TEXTURE2DMS { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true); +#endif + } | ITEXTURE2DMS { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2186,6 +2707,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); } + | F16TEXTURE2DMSARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true); +#endif + } | ITEXTURE2DMSARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2201,6 +2730,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd1D); } + | F16IMAGE1D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd1D); +#endif + } | IIMAGE1D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2216,6 +2753,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd2D); } + | F16IMAGE2D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd2D); +#endif + } | IIMAGE2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2231,6 +2776,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd3D); } + | F16IMAGE3D { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd3D); +#endif + } | IIMAGE3D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2246,6 +2799,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, EsdRect); } + | F16IMAGE2DRECT { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, EsdRect); +#endif + } | IIMAGE2DRECT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2261,6 +2822,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, EsdCube); } + | F16IMAGECUBE { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, EsdCube); +#endif + } | IIMAGECUBE { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2276,6 +2845,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, EsdBuffer); } + | F16IMAGEBUFFER { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, EsdBuffer); +#endif + } | IIMAGEBUFFER { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2291,6 +2868,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd1D, true); } + | F16IMAGE1DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd1D, true); +#endif + } | IIMAGE1DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2306,6 +2891,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd2D, true); } + | F16IMAGE2DARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd2D, true); +#endif + } | IIMAGE2DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2321,6 +2914,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, EsdCube, true); } + | F16IMAGECUBEARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, EsdCube, true); +#endif + } | IIMAGECUBEARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2336,6 +2937,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd2D, false, false, true); } + | F16IMAGE2DMS { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd2D, false, false, true); +#endif + } | IIMAGE2DMS { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2351,6 +2960,14 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setImage(EbtFloat, Esd2D, true, false, true); } + | F16IMAGE2DMSARRAY { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setImage(EbtFloat16, Esd2D, true, false, true); +#endif + } | IIMAGE2DMSARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2379,6 +2996,24 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setSubpass(EbtFloat, true); } + | F16SUBPASSINPUT { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtFloat16); +#endif + } + | F16SUBPASSINPUTMS { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); + parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setSubpass(EbtFloat16, true); +#endif + } | ISUBPASSINPUT { parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -2493,12 +3128,15 @@ struct_declaration parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); for (unsigned int i = 0; i < $$->size(); ++i) { - parseContext.arrayDimCheck($1.loc, (*$$)[i].type, $1.arraySizes); - (*$$)[i].type->mergeType($1); + TType type($1); + type.setFieldName((*$$)[i].type->getFieldName()); + type.transferArraySizes((*$$)[i].type->getArraySizes()); + type.copyArrayInnerSizes($1.arraySizes); + parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); + (*$$)[i].type->shallowCopy(type); } } | type_qualifier type_specifier struct_declarator_list SEMICOLON { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); if ($2.arraySizes) { parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); @@ -2508,14 +3146,18 @@ struct_declaration $$ = $3; - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); + parseContext.memberQualifierCheck($1); parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); for (unsigned int i = 0; i < $$->size(); ++i) { - parseContext.arrayDimCheck($1.loc, (*$$)[i].type, $2.arraySizes); - (*$$)[i].type->mergeType($2); + TType type($2); + type.setFieldName((*$$)[i].type->getFieldName()); + type.transferArraySizes((*$$)[i].type->getArraySizes()); + type.copyArrayInnerSizes($2.arraySizes); + parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); + (*$$)[i].type->shallowCopy(type); } } ; @@ -2537,12 +3179,12 @@ struct_declarator $$.type->setFieldName(*$1.string); } | IDENTIFIER array_specifier { - parseContext.arrayDimCheck($1.loc, $2.arraySizes, 0); + parseContext.arrayOfArrayVersionCheck($1.loc, $2.arraySizes); $$.type = new TType(EbtVoid); $$.loc = $1.loc; $$.type->setFieldName(*$1.string); - $$.type->newArraySizes(*$2.arraySizes); + $$.type->transferArraySizes($2.arraySizes); } ; @@ -2673,6 +3315,15 @@ expression_statement ; selection_statement + : selection_statement_nonattributed { + $$ = $1; + } + | attribute selection_statement_nonattributed { + parseContext.handleSelectionAttributes(*$1, $2); + $$ = $2; + } + +selection_statement_nonattributed : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { parseContext.boolCheck($1.loc, $3); $$ = parseContext.intermediate.addSelection($3, $5, $1.loc); @@ -2709,6 +3360,15 @@ condition ; switch_statement + : switch_statement_nonattributed { + $$ = $1; + } + | attribute switch_statement_nonattributed { + parseContext.handleSwitchAttributes(*$1, $2); + $$ = $2; + } + +switch_statement_nonattributed : SWITCH LEFT_PAREN expression RIGHT_PAREN { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -2762,6 +3422,15 @@ case_label ; iteration_statement + : iteration_statement_nonattributed { + $$ = $1; + } + | attribute iteration_statement_nonattributed { + parseContext.handleLoopAttributes(*$1, $2); + $$ = $2; + } + +iteration_statement_nonattributed : WHILE LEFT_PAREN { if (! parseContext.limits.whileLoops) parseContext.error($1.loc, "while loops not available", "limitation", ""); @@ -2916,8 +3585,30 @@ function_definition // information. This information can be queried from the parse tree $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - $$->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); + $$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); } ; +attribute + : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { + $$ = $3; + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); + } + +attribute_list + : single_attribute { + $$ = $1; + } + | attribute_list COMMA single_attribute { + $$ = parseContext.mergeAttributes($1, $3); + } + +single_attribute + : IDENTIFIER { + $$ = parseContext.makeAttributes(*$1.string); + } + | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { + $$ = parseContext.makeAttributes(*$1.string, $3); + } + %% diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp index fabec4b68147e10f80078fe7aae035920b572e6e..38672d67d3aaa9b036f8c3ae770ba251187b131f 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp @@ -62,7 +62,7 @@ /* Copy the first part of user declarations. */ -#line 41 "MachineIndependent/glslang.y" /* yacc.c:339 */ +#line 42 "MachineIndependent/glslang.y" /* yacc.c:339 */ /* Based on: @@ -83,11 +83,12 @@ Jutta Degener, 1995 #include "SymbolTable.h" #include "ParseHelper.h" #include "../Public/ShaderLang.h" +#include "attribute.h" using namespace glslang; -#line 91 "MachineIndependent/glslang_tab.cpp" /* yacc.c:339 */ +#line 92 "MachineIndependent/glslang_tab.cpp" /* yacc.c:339 */ # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -124,299 +125,392 @@ extern int yydebug; { ATTRIBUTE = 258, VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, + FLOAT16_T = 260, + FLOAT = 261, + FLOAT32_T = 262, DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - INT16_T = 268, - UINT16_T = 269, - FLOAT16_T = 270, - BREAK = 271, - CONTINUE = 272, - DO = 273, - ELSE = 274, - FOR = 275, - IF = 276, - DISCARD = 277, - RETURN = 278, - SWITCH = 279, - CASE = 280, - DEFAULT = 281, - SUBROUTINE = 282, - BVEC2 = 283, - BVEC3 = 284, - BVEC4 = 285, - IVEC2 = 286, - IVEC3 = 287, - IVEC4 = 288, - I64VEC2 = 289, - I64VEC3 = 290, - I64VEC4 = 291, - UVEC2 = 292, - UVEC3 = 293, - UVEC4 = 294, - U64VEC2 = 295, - U64VEC3 = 296, - U64VEC4 = 297, - VEC2 = 298, - VEC3 = 299, - VEC4 = 300, - MAT2 = 301, - MAT3 = 302, - MAT4 = 303, - CENTROID = 304, - IN = 305, - OUT = 306, - INOUT = 307, - UNIFORM = 308, - PATCH = 309, - SAMPLE = 310, - BUFFER = 311, - SHARED = 312, - COHERENT = 313, - VOLATILE = 314, - RESTRICT = 315, - READONLY = 316, - WRITEONLY = 317, - DVEC2 = 318, - DVEC3 = 319, - DVEC4 = 320, - DMAT2 = 321, - DMAT3 = 322, - DMAT4 = 323, - F16VEC2 = 324, - F16VEC3 = 325, - F16VEC4 = 326, - F16MAT2 = 327, - F16MAT3 = 328, - F16MAT4 = 329, - I16VEC2 = 330, - I16VEC3 = 331, - I16VEC4 = 332, - U16VEC2 = 333, - U16VEC3 = 334, - U16VEC4 = 335, - NOPERSPECTIVE = 336, - FLAT = 337, - SMOOTH = 338, - LAYOUT = 339, - __EXPLICITINTERPAMD = 340, - MAT2X2 = 341, - MAT2X3 = 342, - MAT2X4 = 343, - MAT3X2 = 344, - MAT3X3 = 345, - MAT3X4 = 346, - MAT4X2 = 347, - MAT4X3 = 348, - MAT4X4 = 349, - DMAT2X2 = 350, - DMAT2X3 = 351, - DMAT2X4 = 352, - DMAT3X2 = 353, - DMAT3X3 = 354, - DMAT3X4 = 355, - DMAT4X2 = 356, - DMAT4X3 = 357, - DMAT4X4 = 358, - F16MAT2X2 = 359, - F16MAT2X3 = 360, - F16MAT2X4 = 361, - F16MAT3X2 = 362, - F16MAT3X3 = 363, - F16MAT3X4 = 364, - F16MAT4X2 = 365, - F16MAT4X3 = 366, - F16MAT4X4 = 367, - ATOMIC_UINT = 368, - SAMPLER1D = 369, - SAMPLER2D = 370, - SAMPLER3D = 371, - SAMPLERCUBE = 372, - SAMPLER1DSHADOW = 373, - SAMPLER2DSHADOW = 374, - SAMPLERCUBESHADOW = 375, - SAMPLER1DARRAY = 376, - SAMPLER2DARRAY = 377, - SAMPLER1DARRAYSHADOW = 378, - SAMPLER2DARRAYSHADOW = 379, - ISAMPLER1D = 380, - ISAMPLER2D = 381, - ISAMPLER3D = 382, - ISAMPLERCUBE = 383, - ISAMPLER1DARRAY = 384, - ISAMPLER2DARRAY = 385, - USAMPLER1D = 386, - USAMPLER2D = 387, - USAMPLER3D = 388, - USAMPLERCUBE = 389, - USAMPLER1DARRAY = 390, - USAMPLER2DARRAY = 391, - SAMPLER2DRECT = 392, - SAMPLER2DRECTSHADOW = 393, - ISAMPLER2DRECT = 394, - USAMPLER2DRECT = 395, - SAMPLERBUFFER = 396, - ISAMPLERBUFFER = 397, - USAMPLERBUFFER = 398, - SAMPLERCUBEARRAY = 399, - SAMPLERCUBEARRAYSHADOW = 400, - ISAMPLERCUBEARRAY = 401, - USAMPLERCUBEARRAY = 402, - SAMPLER2DMS = 403, - ISAMPLER2DMS = 404, - USAMPLER2DMS = 405, - SAMPLER2DMSARRAY = 406, - ISAMPLER2DMSARRAY = 407, - USAMPLER2DMSARRAY = 408, - SAMPLEREXTERNALOES = 409, - SAMPLER = 410, - SAMPLERSHADOW = 411, - TEXTURE1D = 412, - TEXTURE2D = 413, - TEXTURE3D = 414, - TEXTURECUBE = 415, - TEXTURE1DARRAY = 416, - TEXTURE2DARRAY = 417, - ITEXTURE1D = 418, - ITEXTURE2D = 419, - ITEXTURE3D = 420, - ITEXTURECUBE = 421, - ITEXTURE1DARRAY = 422, - ITEXTURE2DARRAY = 423, - UTEXTURE1D = 424, - UTEXTURE2D = 425, - UTEXTURE3D = 426, - UTEXTURECUBE = 427, - UTEXTURE1DARRAY = 428, - UTEXTURE2DARRAY = 429, - TEXTURE2DRECT = 430, - ITEXTURE2DRECT = 431, - UTEXTURE2DRECT = 432, - TEXTUREBUFFER = 433, - ITEXTUREBUFFER = 434, - UTEXTUREBUFFER = 435, - TEXTURECUBEARRAY = 436, - ITEXTURECUBEARRAY = 437, - UTEXTURECUBEARRAY = 438, - TEXTURE2DMS = 439, - ITEXTURE2DMS = 440, - UTEXTURE2DMS = 441, - TEXTURE2DMSARRAY = 442, - ITEXTURE2DMSARRAY = 443, - UTEXTURE2DMSARRAY = 444, - SUBPASSINPUT = 445, - SUBPASSINPUTMS = 446, - ISUBPASSINPUT = 447, - ISUBPASSINPUTMS = 448, - USUBPASSINPUT = 449, - USUBPASSINPUTMS = 450, - IMAGE1D = 451, - IIMAGE1D = 452, - UIMAGE1D = 453, - IMAGE2D = 454, - IIMAGE2D = 455, - UIMAGE2D = 456, - IMAGE3D = 457, - IIMAGE3D = 458, - UIMAGE3D = 459, - IMAGE2DRECT = 460, - IIMAGE2DRECT = 461, - UIMAGE2DRECT = 462, - IMAGECUBE = 463, - IIMAGECUBE = 464, - UIMAGECUBE = 465, - IMAGEBUFFER = 466, - IIMAGEBUFFER = 467, - UIMAGEBUFFER = 468, - IMAGE1DARRAY = 469, - IIMAGE1DARRAY = 470, - UIMAGE1DARRAY = 471, - IMAGE2DARRAY = 472, - IIMAGE2DARRAY = 473, - UIMAGE2DARRAY = 474, - IMAGECUBEARRAY = 475, - IIMAGECUBEARRAY = 476, - UIMAGECUBEARRAY = 477, - IMAGE2DMS = 478, - IIMAGE2DMS = 479, - UIMAGE2DMS = 480, - IMAGE2DMSARRAY = 481, - IIMAGE2DMSARRAY = 482, - UIMAGE2DMSARRAY = 483, - STRUCT = 484, - VOID = 485, - WHILE = 486, - IDENTIFIER = 487, - TYPE_NAME = 488, - FLOATCONSTANT = 489, - DOUBLECONSTANT = 490, - INTCONSTANT = 491, - UINTCONSTANT = 492, - INT64CONSTANT = 493, - UINT64CONSTANT = 494, - INT16CONSTANT = 495, - UINT16CONSTANT = 496, - BOOLCONSTANT = 497, - FLOAT16CONSTANT = 498, - LEFT_OP = 499, - RIGHT_OP = 500, - INC_OP = 501, - DEC_OP = 502, - LE_OP = 503, - GE_OP = 504, - EQ_OP = 505, - NE_OP = 506, - AND_OP = 507, - OR_OP = 508, - XOR_OP = 509, - MUL_ASSIGN = 510, - DIV_ASSIGN = 511, - ADD_ASSIGN = 512, - MOD_ASSIGN = 513, - LEFT_ASSIGN = 514, - RIGHT_ASSIGN = 515, - AND_ASSIGN = 516, - XOR_ASSIGN = 517, - OR_ASSIGN = 518, - SUB_ASSIGN = 519, - LEFT_PAREN = 520, - RIGHT_PAREN = 521, - LEFT_BRACKET = 522, - RIGHT_BRACKET = 523, - LEFT_BRACE = 524, - RIGHT_BRACE = 525, - DOT = 526, - COMMA = 527, - COLON = 528, - EQUAL = 529, - SEMICOLON = 530, - BANG = 531, - DASH = 532, - TILDE = 533, - PLUS = 534, - STAR = 535, - SLASH = 536, - PERCENT = 537, - LEFT_ANGLE = 538, - RIGHT_ANGLE = 539, - VERTICAL_BAR = 540, - CARET = 541, - AMPERSAND = 542, - QUESTION = 543, - INVARIANT = 544, - PRECISE = 545, - HIGH_PRECISION = 546, - MEDIUM_PRECISION = 547, - LOW_PRECISION = 548, - PRECISION = 549, - PACKED = 550, - RESOURCE = 551, - SUPERP = 552 + FLOAT64_T = 264, + CONST = 265, + BOOL = 266, + INT = 267, + UINT = 268, + INT64_T = 269, + UINT64_T = 270, + INT32_T = 271, + UINT32_T = 272, + INT16_T = 273, + UINT16_T = 274, + INT8_T = 275, + UINT8_T = 276, + BREAK = 277, + CONTINUE = 278, + DO = 279, + ELSE = 280, + FOR = 281, + IF = 282, + DISCARD = 283, + RETURN = 284, + SWITCH = 285, + CASE = 286, + DEFAULT = 287, + SUBROUTINE = 288, + BVEC2 = 289, + BVEC3 = 290, + BVEC4 = 291, + IVEC2 = 292, + IVEC3 = 293, + IVEC4 = 294, + UVEC2 = 295, + UVEC3 = 296, + UVEC4 = 297, + I64VEC2 = 298, + I64VEC3 = 299, + I64VEC4 = 300, + U64VEC2 = 301, + U64VEC3 = 302, + U64VEC4 = 303, + I32VEC2 = 304, + I32VEC3 = 305, + I32VEC4 = 306, + U32VEC2 = 307, + U32VEC3 = 308, + U32VEC4 = 309, + I16VEC2 = 310, + I16VEC3 = 311, + I16VEC4 = 312, + U16VEC2 = 313, + U16VEC3 = 314, + U16VEC4 = 315, + I8VEC2 = 316, + I8VEC3 = 317, + I8VEC4 = 318, + U8VEC2 = 319, + U8VEC3 = 320, + U8VEC4 = 321, + VEC2 = 322, + VEC3 = 323, + VEC4 = 324, + MAT2 = 325, + MAT3 = 326, + MAT4 = 327, + CENTROID = 328, + IN = 329, + OUT = 330, + INOUT = 331, + UNIFORM = 332, + PATCH = 333, + SAMPLE = 334, + BUFFER = 335, + SHARED = 336, + NONUNIFORM = 337, + COHERENT = 338, + VOLATILE = 339, + RESTRICT = 340, + READONLY = 341, + WRITEONLY = 342, + DVEC2 = 343, + DVEC3 = 344, + DVEC4 = 345, + DMAT2 = 346, + DMAT3 = 347, + DMAT4 = 348, + F16VEC2 = 349, + F16VEC3 = 350, + F16VEC4 = 351, + F16MAT2 = 352, + F16MAT3 = 353, + F16MAT4 = 354, + F32VEC2 = 355, + F32VEC3 = 356, + F32VEC4 = 357, + F32MAT2 = 358, + F32MAT3 = 359, + F32MAT4 = 360, + F64VEC2 = 361, + F64VEC3 = 362, + F64VEC4 = 363, + F64MAT2 = 364, + F64MAT3 = 365, + F64MAT4 = 366, + NOPERSPECTIVE = 367, + FLAT = 368, + SMOOTH = 369, + LAYOUT = 370, + __EXPLICITINTERPAMD = 371, + MAT2X2 = 372, + MAT2X3 = 373, + MAT2X4 = 374, + MAT3X2 = 375, + MAT3X3 = 376, + MAT3X4 = 377, + MAT4X2 = 378, + MAT4X3 = 379, + MAT4X4 = 380, + DMAT2X2 = 381, + DMAT2X3 = 382, + DMAT2X4 = 383, + DMAT3X2 = 384, + DMAT3X3 = 385, + DMAT3X4 = 386, + DMAT4X2 = 387, + DMAT4X3 = 388, + DMAT4X4 = 389, + F16MAT2X2 = 390, + F16MAT2X3 = 391, + F16MAT2X4 = 392, + F16MAT3X2 = 393, + F16MAT3X3 = 394, + F16MAT3X4 = 395, + F16MAT4X2 = 396, + F16MAT4X3 = 397, + F16MAT4X4 = 398, + F32MAT2X2 = 399, + F32MAT2X3 = 400, + F32MAT2X4 = 401, + F32MAT3X2 = 402, + F32MAT3X3 = 403, + F32MAT3X4 = 404, + F32MAT4X2 = 405, + F32MAT4X3 = 406, + F32MAT4X4 = 407, + F64MAT2X2 = 408, + F64MAT2X3 = 409, + F64MAT2X4 = 410, + F64MAT3X2 = 411, + F64MAT3X3 = 412, + F64MAT3X4 = 413, + F64MAT4X2 = 414, + F64MAT4X3 = 415, + F64MAT4X4 = 416, + ATOMIC_UINT = 417, + SAMPLER1D = 418, + SAMPLER2D = 419, + SAMPLER3D = 420, + SAMPLERCUBE = 421, + SAMPLER1DSHADOW = 422, + SAMPLER2DSHADOW = 423, + SAMPLERCUBESHADOW = 424, + SAMPLER1DARRAY = 425, + SAMPLER2DARRAY = 426, + SAMPLER1DARRAYSHADOW = 427, + SAMPLER2DARRAYSHADOW = 428, + ISAMPLER1D = 429, + ISAMPLER2D = 430, + ISAMPLER3D = 431, + ISAMPLERCUBE = 432, + ISAMPLER1DARRAY = 433, + ISAMPLER2DARRAY = 434, + USAMPLER1D = 435, + USAMPLER2D = 436, + USAMPLER3D = 437, + USAMPLERCUBE = 438, + USAMPLER1DARRAY = 439, + USAMPLER2DARRAY = 440, + SAMPLER2DRECT = 441, + SAMPLER2DRECTSHADOW = 442, + ISAMPLER2DRECT = 443, + USAMPLER2DRECT = 444, + SAMPLERBUFFER = 445, + ISAMPLERBUFFER = 446, + USAMPLERBUFFER = 447, + SAMPLERCUBEARRAY = 448, + SAMPLERCUBEARRAYSHADOW = 449, + ISAMPLERCUBEARRAY = 450, + USAMPLERCUBEARRAY = 451, + SAMPLER2DMS = 452, + ISAMPLER2DMS = 453, + USAMPLER2DMS = 454, + SAMPLER2DMSARRAY = 455, + ISAMPLER2DMSARRAY = 456, + USAMPLER2DMSARRAY = 457, + SAMPLEREXTERNALOES = 458, + F16SAMPLER1D = 459, + F16SAMPLER2D = 460, + F16SAMPLER3D = 461, + F16SAMPLER2DRECT = 462, + F16SAMPLERCUBE = 463, + F16SAMPLER1DARRAY = 464, + F16SAMPLER2DARRAY = 465, + F16SAMPLERCUBEARRAY = 466, + F16SAMPLERBUFFER = 467, + F16SAMPLER2DMS = 468, + F16SAMPLER2DMSARRAY = 469, + F16SAMPLER1DSHADOW = 470, + F16SAMPLER2DSHADOW = 471, + F16SAMPLER1DARRAYSHADOW = 472, + F16SAMPLER2DARRAYSHADOW = 473, + F16SAMPLER2DRECTSHADOW = 474, + F16SAMPLERCUBESHADOW = 475, + F16SAMPLERCUBEARRAYSHADOW = 476, + SAMPLER = 477, + SAMPLERSHADOW = 478, + TEXTURE1D = 479, + TEXTURE2D = 480, + TEXTURE3D = 481, + TEXTURECUBE = 482, + TEXTURE1DARRAY = 483, + TEXTURE2DARRAY = 484, + ITEXTURE1D = 485, + ITEXTURE2D = 486, + ITEXTURE3D = 487, + ITEXTURECUBE = 488, + ITEXTURE1DARRAY = 489, + ITEXTURE2DARRAY = 490, + UTEXTURE1D = 491, + UTEXTURE2D = 492, + UTEXTURE3D = 493, + UTEXTURECUBE = 494, + UTEXTURE1DARRAY = 495, + UTEXTURE2DARRAY = 496, + TEXTURE2DRECT = 497, + ITEXTURE2DRECT = 498, + UTEXTURE2DRECT = 499, + TEXTUREBUFFER = 500, + ITEXTUREBUFFER = 501, + UTEXTUREBUFFER = 502, + TEXTURECUBEARRAY = 503, + ITEXTURECUBEARRAY = 504, + UTEXTURECUBEARRAY = 505, + TEXTURE2DMS = 506, + ITEXTURE2DMS = 507, + UTEXTURE2DMS = 508, + TEXTURE2DMSARRAY = 509, + ITEXTURE2DMSARRAY = 510, + UTEXTURE2DMSARRAY = 511, + F16TEXTURE1D = 512, + F16TEXTURE2D = 513, + F16TEXTURE3D = 514, + F16TEXTURE2DRECT = 515, + F16TEXTURECUBE = 516, + F16TEXTURE1DARRAY = 517, + F16TEXTURE2DARRAY = 518, + F16TEXTURECUBEARRAY = 519, + F16TEXTUREBUFFER = 520, + F16TEXTURE2DMS = 521, + F16TEXTURE2DMSARRAY = 522, + SUBPASSINPUT = 523, + SUBPASSINPUTMS = 524, + ISUBPASSINPUT = 525, + ISUBPASSINPUTMS = 526, + USUBPASSINPUT = 527, + USUBPASSINPUTMS = 528, + F16SUBPASSINPUT = 529, + F16SUBPASSINPUTMS = 530, + IMAGE1D = 531, + IIMAGE1D = 532, + UIMAGE1D = 533, + IMAGE2D = 534, + IIMAGE2D = 535, + UIMAGE2D = 536, + IMAGE3D = 537, + IIMAGE3D = 538, + UIMAGE3D = 539, + IMAGE2DRECT = 540, + IIMAGE2DRECT = 541, + UIMAGE2DRECT = 542, + IMAGECUBE = 543, + IIMAGECUBE = 544, + UIMAGECUBE = 545, + IMAGEBUFFER = 546, + IIMAGEBUFFER = 547, + UIMAGEBUFFER = 548, + IMAGE1DARRAY = 549, + IIMAGE1DARRAY = 550, + UIMAGE1DARRAY = 551, + IMAGE2DARRAY = 552, + IIMAGE2DARRAY = 553, + UIMAGE2DARRAY = 554, + IMAGECUBEARRAY = 555, + IIMAGECUBEARRAY = 556, + UIMAGECUBEARRAY = 557, + IMAGE2DMS = 558, + IIMAGE2DMS = 559, + UIMAGE2DMS = 560, + IMAGE2DMSARRAY = 561, + IIMAGE2DMSARRAY = 562, + UIMAGE2DMSARRAY = 563, + F16IMAGE1D = 564, + F16IMAGE2D = 565, + F16IMAGE3D = 566, + F16IMAGE2DRECT = 567, + F16IMAGECUBE = 568, + F16IMAGE1DARRAY = 569, + F16IMAGE2DARRAY = 570, + F16IMAGECUBEARRAY = 571, + F16IMAGEBUFFER = 572, + F16IMAGE2DMS = 573, + F16IMAGE2DMSARRAY = 574, + STRUCT = 575, + VOID = 576, + WHILE = 577, + IDENTIFIER = 578, + TYPE_NAME = 579, + FLOATCONSTANT = 580, + DOUBLECONSTANT = 581, + INT16CONSTANT = 582, + UINT16CONSTANT = 583, + INT32CONSTANT = 584, + UINT32CONSTANT = 585, + INTCONSTANT = 586, + UINTCONSTANT = 587, + INT64CONSTANT = 588, + UINT64CONSTANT = 589, + BOOLCONSTANT = 590, + FLOAT16CONSTANT = 591, + LEFT_OP = 592, + RIGHT_OP = 593, + INC_OP = 594, + DEC_OP = 595, + LE_OP = 596, + GE_OP = 597, + EQ_OP = 598, + NE_OP = 599, + AND_OP = 600, + OR_OP = 601, + XOR_OP = 602, + MUL_ASSIGN = 603, + DIV_ASSIGN = 604, + ADD_ASSIGN = 605, + MOD_ASSIGN = 606, + LEFT_ASSIGN = 607, + RIGHT_ASSIGN = 608, + AND_ASSIGN = 609, + XOR_ASSIGN = 610, + OR_ASSIGN = 611, + SUB_ASSIGN = 612, + LEFT_PAREN = 613, + RIGHT_PAREN = 614, + LEFT_BRACKET = 615, + RIGHT_BRACKET = 616, + LEFT_BRACE = 617, + RIGHT_BRACE = 618, + DOT = 619, + COMMA = 620, + COLON = 621, + EQUAL = 622, + SEMICOLON = 623, + BANG = 624, + DASH = 625, + TILDE = 626, + PLUS = 627, + STAR = 628, + SLASH = 629, + PERCENT = 630, + LEFT_ANGLE = 631, + RIGHT_ANGLE = 632, + VERTICAL_BAR = 633, + CARET = 634, + AMPERSAND = 635, + QUESTION = 636, + INVARIANT = 637, + PRECISE = 638, + HIGH_PRECISION = 639, + MEDIUM_PRECISION = 640, + LOW_PRECISION = 641, + PRECISION = 642, + PACKED = 643, + RESOURCE = 644, + SUPERP = 645 }; #endif @@ -425,7 +519,7 @@ extern int yydebug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 68 "MachineIndependent/glslang.y" /* yacc.c:355 */ +#line 70 "MachineIndependent/glslang.y" /* yacc.c:355 */ struct { glslang::TSourceLoc loc; @@ -447,6 +541,7 @@ union YYSTYPE TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -459,7 +554,7 @@ union YYSTYPE }; } interm; -#line 463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */ +#line 558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -472,7 +567,7 @@ int yyparse (glslang::TParseContext* pParseContext); #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 102 "MachineIndependent/glslang.y" /* yacc.c:358 */ +#line 105 "MachineIndependent/glslang.y" /* yacc.c:358 */ /* windows only pragma */ @@ -488,7 +583,7 @@ int yyparse (glslang::TParseContext* pParseContext); extern int yylex(YYSTYPE*, TParseContext&); -#line 492 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */ +#line 587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -709,23 +804,23 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 274 +#define YYFINAL 366 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 6614 +#define YYLAST 8949 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 298 +#define YYNTOKENS 391 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 100 +#define YYNNTS 107 /* YYNRULES -- Number of rules. */ -#define YYNRULES 450 +#define YYNRULES 556 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 582 +#define YYNSTATES 697 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 552 +#define YYMAXUTOK 645 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -789,59 +884,78 @@ static const yytype_uint16 yytranslate[] = 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297 + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 253, 253, 259, 262, 265, 269, 273, 277, 283, - 289, 292, 296, 302, 305, 313, 316, 319, 322, 325, - 330, 338, 345, 352, 358, 362, 369, 372, 378, 385, - 395, 403, 408, 438, 444, 448, 452, 472, 473, 474, - 475, 481, 482, 487, 492, 501, 502, 507, 515, 516, - 522, 531, 532, 537, 542, 547, 555, 556, 564, 575, - 576, 585, 586, 595, 596, 605, 606, 614, 615, 623, - 624, 632, 633, 633, 651, 652, 667, 671, 675, 679, - 684, 688, 692, 696, 700, 704, 708, 715, 718, 729, - 736, 741, 746, 754, 758, 762, 766, 771, 776, 785, - 785, 796, 800, 807, 814, 817, 824, 832, 852, 875, - 890, 913, 924, 934, 944, 954, 963, 966, 970, 974, - 979, 987, 992, 997, 1002, 1007, 1016, 1027, 1054, 1063, - 1070, 1077, 1084, 1096, 1102, 1105, 1112, 1116, 1120, 1128, - 1137, 1140, 1151, 1154, 1157, 1161, 1165, 1169, 1176, 1180, - 1192, 1206, 1211, 1217, 1223, 1230, 1236, 1241, 1246, 1251, - 1259, 1263, 1267, 1271, 1275, 1279, 1285, 1294, 1297, 1305, - 1309, 1318, 1323, 1331, 1335, 1345, 1349, 1353, 1358, 1365, - 1369, 1374, 1379, 1384, 1391, 1398, 1402, 1407, 1412, 1417, - 1423, 1429, 1435, 1443, 1451, 1459, 1464, 1469, 1474, 1479, - 1484, 1489, 1495, 1501, 1507, 1515, 1523, 1531, 1537, 1543, - 1549, 1555, 1561, 1567, 1575, 1583, 1591, 1596, 1601, 1606, - 1611, 1616, 1621, 1626, 1631, 1636, 1641, 1646, 1651, 1657, - 1663, 1669, 1675, 1681, 1687, 1693, 1699, 1705, 1711, 1717, - 1723, 1731, 1739, 1747, 1755, 1763, 1771, 1779, 1787, 1795, - 1803, 1811, 1819, 1824, 1829, 1834, 1839, 1844, 1849, 1854, - 1859, 1864, 1869, 1874, 1879, 1884, 1889, 1894, 1899, 1904, - 1909, 1914, 1919, 1924, 1929, 1934, 1939, 1944, 1949, 1954, - 1959, 1964, 1969, 1974, 1979, 1984, 1989, 1994, 1999, 2004, - 2009, 2014, 2019, 2024, 2029, 2034, 2039, 2044, 2049, 2054, - 2059, 2064, 2069, 2074, 2079, 2084, 2089, 2094, 2099, 2104, - 2109, 2114, 2119, 2124, 2129, 2134, 2139, 2144, 2149, 2154, - 2159, 2164, 2169, 2174, 2179, 2184, 2189, 2194, 2199, 2204, - 2209, 2214, 2219, 2224, 2229, 2234, 2239, 2244, 2249, 2254, - 2259, 2264, 2269, 2274, 2279, 2284, 2289, 2294, 2299, 2304, - 2309, 2314, 2319, 2324, 2329, 2334, 2339, 2344, 2349, 2354, - 2359, 2364, 2370, 2376, 2382, 2388, 2394, 2400, 2406, 2411, - 2427, 2432, 2437, 2445, 2445, 2456, 2456, 2466, 2469, 2482, - 2500, 2524, 2528, 2534, 2539, 2550, 2553, 2559, 2568, 2571, - 2577, 2581, 2582, 2588, 2589, 2590, 2591, 2592, 2593, 2594, - 2598, 2599, 2603, 2599, 2615, 2616, 2620, 2620, 2627, 2627, - 2641, 2644, 2652, 2660, 2671, 2672, 2676, 2683, 2687, 2695, - 2699, 2712, 2712, 2732, 2735, 2741, 2753, 2765, 2765, 2780, - 2780, 2796, 2796, 2817, 2820, 2826, 2829, 2835, 2839, 2846, - 2851, 2856, 2863, 2866, 2875, 2879, 2888, 2891, 2894, 2902, - 2902 + 0, 293, 293, 299, 302, 306, 310, 313, 317, 321, + 325, 329, 333, 336, 340, 344, 347, 355, 358, 361, + 364, 367, 372, 380, 387, 394, 400, 404, 411, 414, + 420, 427, 437, 445, 450, 477, 485, 491, 495, 499, + 519, 520, 521, 522, 528, 529, 534, 539, 548, 549, + 554, 562, 563, 569, 578, 579, 584, 589, 594, 602, + 603, 611, 622, 623, 632, 633, 642, 643, 652, 653, + 661, 662, 670, 671, 679, 680, 680, 698, 699, 714, + 718, 722, 726, 731, 735, 739, 743, 747, 751, 755, + 762, 765, 776, 783, 788, 793, 801, 805, 809, 813, + 818, 823, 832, 832, 843, 847, 854, 861, 864, 871, + 879, 899, 922, 937, 962, 973, 983, 993, 1003, 1012, + 1015, 1019, 1023, 1028, 1036, 1041, 1046, 1051, 1056, 1065, + 1076, 1103, 1112, 1119, 1126, 1137, 1149, 1155, 1158, 1165, + 1169, 1173, 1181, 1190, 1193, 1204, 1207, 1210, 1214, 1218, + 1222, 1226, 1232, 1236, 1248, 1262, 1267, 1273, 1279, 1286, + 1292, 1297, 1302, 1307, 1315, 1319, 1323, 1327, 1331, 1335, + 1341, 1350, 1357, 1360, 1368, 1372, 1381, 1386, 1394, 1398, + 1408, 1412, 1416, 1421, 1426, 1431, 1436, 1440, 1445, 1450, + 1455, 1460, 1465, 1470, 1475, 1480, 1485, 1489, 1494, 1499, + 1504, 1510, 1516, 1522, 1528, 1534, 1540, 1546, 1552, 1558, + 1564, 1570, 1576, 1581, 1586, 1591, 1596, 1601, 1606, 1612, + 1618, 1624, 1630, 1636, 1642, 1648, 1654, 1660, 1666, 1672, + 1678, 1684, 1690, 1696, 1702, 1708, 1714, 1720, 1726, 1732, + 1738, 1744, 1750, 1756, 1762, 1768, 1773, 1778, 1783, 1788, + 1793, 1798, 1803, 1808, 1813, 1818, 1823, 1828, 1834, 1840, + 1846, 1852, 1858, 1864, 1870, 1876, 1882, 1888, 1894, 1900, + 1906, 1912, 1918, 1924, 1930, 1936, 1942, 1948, 1954, 1960, + 1966, 1972, 1978, 1984, 1990, 1996, 2002, 2008, 2014, 2020, + 2026, 2032, 2038, 2044, 2050, 2056, 2062, 2068, 2074, 2080, + 2086, 2092, 2098, 2104, 2110, 2116, 2121, 2126, 2131, 2136, + 2141, 2146, 2151, 2156, 2161, 2166, 2171, 2176, 2181, 2186, + 2194, 2202, 2210, 2218, 2226, 2234, 2242, 2250, 2258, 2266, + 2274, 2282, 2290, 2295, 2300, 2305, 2310, 2315, 2320, 2325, + 2330, 2335, 2340, 2345, 2350, 2355, 2360, 2365, 2370, 2378, + 2386, 2391, 2396, 2401, 2409, 2414, 2419, 2424, 2432, 2437, + 2442, 2447, 2455, 2460, 2465, 2470, 2475, 2480, 2488, 2493, + 2501, 2506, 2514, 2519, 2527, 2532, 2540, 2545, 2553, 2558, + 2566, 2571, 2576, 2581, 2586, 2591, 2596, 2601, 2606, 2611, + 2616, 2621, 2626, 2631, 2636, 2641, 2649, 2654, 2659, 2664, + 2672, 2677, 2682, 2687, 2695, 2700, 2705, 2710, 2718, 2723, + 2728, 2733, 2741, 2746, 2751, 2756, 2764, 2769, 2774, 2779, + 2787, 2792, 2797, 2802, 2810, 2815, 2820, 2825, 2833, 2838, + 2843, 2848, 2856, 2861, 2866, 2871, 2879, 2884, 2889, 2894, + 2902, 2907, 2912, 2917, 2925, 2930, 2935, 2940, 2948, 2953, + 2958, 2963, 2971, 2976, 2981, 2987, 2993, 2999, 3008, 3017, + 3023, 3029, 3035, 3041, 3046, 3062, 3067, 3072, 3080, 3080, + 3091, 3091, 3101, 3104, 3117, 3139, 3166, 3170, 3176, 3181, + 3192, 3195, 3201, 3210, 3213, 3219, 3223, 3224, 3230, 3231, + 3232, 3233, 3234, 3235, 3236, 3240, 3241, 3245, 3241, 3257, + 3258, 3262, 3262, 3269, 3269, 3283, 3286, 3294, 3302, 3313, + 3314, 3318, 3321, 3327, 3334, 3338, 3346, 3350, 3363, 3366, + 3372, 3372, 3392, 3395, 3401, 3413, 3425, 3428, 3434, 3434, + 3449, 3449, 3465, 3465, 3486, 3489, 3495, 3498, 3504, 3508, + 3515, 3520, 3525, 3532, 3535, 3544, 3548, 3557, 3560, 3563, + 3571, 3571, 3593, 3599, 3602, 3607, 3610 }; #endif @@ -850,25 +964,34 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "CONST", "BOOL", - "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "INT16_T", - "UINT16_T", "FLOAT16_T", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", - "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", - "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", - "I64VEC4", "UVEC2", "UVEC3", "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", - "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID", "IN", "OUT", - "INOUT", "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED", "COHERENT", - "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", "DVEC2", "DVEC3", - "DVEC4", "DMAT2", "DMAT3", "DMAT4", "F16VEC2", "F16VEC3", "F16VEC4", - "F16MAT2", "F16MAT3", "F16MAT4", "I16VEC2", "I16VEC3", "I16VEC4", - "U16VEC2", "U16VEC3", "U16VEC4", "NOPERSPECTIVE", "FLAT", "SMOOTH", - "LAYOUT", "__EXPLICITINTERPAMD", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", - "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", - "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", - "DMAT4X4", "F16MAT2X2", "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", - "F16MAT3X3", "F16MAT3X4", "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", - "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", - "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", + "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "FLOAT16_T", + "FLOAT", "FLOAT32_T", "DOUBLE", "FLOAT64_T", "CONST", "BOOL", "INT", + "UINT", "INT64_T", "UINT64_T", "INT32_T", "UINT32_T", "INT16_T", + "UINT16_T", "INT8_T", "UINT8_T", "BREAK", "CONTINUE", "DO", "ELSE", + "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", + "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", + "UVEC2", "UVEC3", "UVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "U64VEC2", + "U64VEC3", "U64VEC4", "I32VEC2", "I32VEC3", "I32VEC4", "U32VEC2", + "U32VEC3", "U32VEC4", "I16VEC2", "I16VEC3", "I16VEC4", "U16VEC2", + "U16VEC3", "U16VEC4", "I8VEC2", "I8VEC3", "I8VEC4", "U8VEC2", "U8VEC3", + "U8VEC4", "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID", + "IN", "OUT", "INOUT", "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED", + "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", + "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", "DMAT3", "DMAT4", + "F16VEC2", "F16VEC3", "F16VEC4", "F16MAT2", "F16MAT3", "F16MAT4", + "F32VEC2", "F32VEC3", "F32VEC4", "F32MAT2", "F32MAT3", "F32MAT4", + "F64VEC2", "F64VEC3", "F64VEC4", "F64MAT2", "F64MAT3", "F64MAT4", + "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "__EXPLICITINTERPAMD", + "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", + "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", + "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", "DMAT4X4", "F16MAT2X2", + "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", "F16MAT3X3", "F16MAT3X4", + "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", "F32MAT2X2", "F32MAT2X3", + "F32MAT2X4", "F32MAT3X2", "F32MAT3X3", "F32MAT3X4", "F32MAT4X2", + "F32MAT4X3", "F32MAT4X4", "F64MAT2X2", "F64MAT2X3", "F64MAT2X4", + "F64MAT3X2", "F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", + "F64MAT4X4", "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", + "SAMPLERCUBE", "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", @@ -878,27 +1001,41 @@ static const char *const yytname[] = "USAMPLERBUFFER", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", - "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLER", "SAMPLERSHADOW", - "TEXTURE1D", "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY", - "TEXTURE2DARRAY", "ITEXTURE1D", "ITEXTURE2D", "ITEXTURE3D", - "ITEXTURECUBE", "ITEXTURE1DARRAY", "ITEXTURE2DARRAY", "UTEXTURE1D", - "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", "UTEXTURE1DARRAY", - "UTEXTURE2DARRAY", "TEXTURE2DRECT", "ITEXTURE2DRECT", "UTEXTURE2DRECT", - "TEXTUREBUFFER", "ITEXTUREBUFFER", "UTEXTUREBUFFER", "TEXTURECUBEARRAY", - "ITEXTURECUBEARRAY", "UTEXTURECUBEARRAY", "TEXTURE2DMS", "ITEXTURE2DMS", - "UTEXTURE2DMS", "TEXTURE2DMSARRAY", "ITEXTURE2DMSARRAY", - "UTEXTURE2DMSARRAY", "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", - "ISUBPASSINPUTMS", "USUBPASSINPUT", "USUBPASSINPUTMS", "IMAGE1D", - "IIMAGE1D", "UIMAGE1D", "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", - "IIMAGE3D", "UIMAGE3D", "IMAGE2DRECT", "IIMAGE2DRECT", "UIMAGE2DRECT", - "IMAGECUBE", "IIMAGECUBE", "UIMAGECUBE", "IMAGEBUFFER", "IIMAGEBUFFER", - "UIMAGEBUFFER", "IMAGE1DARRAY", "IIMAGE1DARRAY", "UIMAGE1DARRAY", - "IMAGE2DARRAY", "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBEARRAY", - "IIMAGECUBEARRAY", "UIMAGECUBEARRAY", "IMAGE2DMS", "IIMAGE2DMS", - "UIMAGE2DMS", "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", - "STRUCT", "VOID", "WHILE", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", - "DOUBLECONSTANT", "INTCONSTANT", "UINTCONSTANT", "INT64CONSTANT", - "UINT64CONSTANT", "INT16CONSTANT", "UINT16CONSTANT", "BOOLCONSTANT", + "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "F16SAMPLER1D", + "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", + "F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY", "F16SAMPLERCUBEARRAY", + "F16SAMPLERBUFFER", "F16SAMPLER2DMS", "F16SAMPLER2DMSARRAY", + "F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW", "F16SAMPLER1DARRAYSHADOW", + "F16SAMPLER2DARRAYSHADOW", "F16SAMPLER2DRECTSHADOW", + "F16SAMPLERCUBESHADOW", "F16SAMPLERCUBEARRAYSHADOW", "SAMPLER", + "SAMPLERSHADOW", "TEXTURE1D", "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", + "TEXTURE1DARRAY", "TEXTURE2DARRAY", "ITEXTURE1D", "ITEXTURE2D", + "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE1DARRAY", "ITEXTURE2DARRAY", + "UTEXTURE1D", "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", + "UTEXTURE1DARRAY", "UTEXTURE2DARRAY", "TEXTURE2DRECT", "ITEXTURE2DRECT", + "UTEXTURE2DRECT", "TEXTUREBUFFER", "ITEXTUREBUFFER", "UTEXTUREBUFFER", + "TEXTURECUBEARRAY", "ITEXTURECUBEARRAY", "UTEXTURECUBEARRAY", + "TEXTURE2DMS", "ITEXTURE2DMS", "UTEXTURE2DMS", "TEXTURE2DMSARRAY", + "ITEXTURE2DMSARRAY", "UTEXTURE2DMSARRAY", "F16TEXTURE1D", "F16TEXTURE2D", + "F16TEXTURE3D", "F16TEXTURE2DRECT", "F16TEXTURECUBE", + "F16TEXTURE1DARRAY", "F16TEXTURE2DARRAY", "F16TEXTURECUBEARRAY", + "F16TEXTUREBUFFER", "F16TEXTURE2DMS", "F16TEXTURE2DMSARRAY", + "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", "ISUBPASSINPUTMS", + "USUBPASSINPUT", "USUBPASSINPUTMS", "F16SUBPASSINPUT", + "F16SUBPASSINPUTMS", "IMAGE1D", "IIMAGE1D", "UIMAGE1D", "IMAGE2D", + "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D", "IMAGE2DRECT", + "IIMAGE2DRECT", "UIMAGE2DRECT", "IMAGECUBE", "IIMAGECUBE", "UIMAGECUBE", + "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER", "IMAGE1DARRAY", + "IIMAGE1DARRAY", "UIMAGE1DARRAY", "IMAGE2DARRAY", "IIMAGE2DARRAY", + "UIMAGE2DARRAY", "IMAGECUBEARRAY", "IIMAGECUBEARRAY", "UIMAGECUBEARRAY", + "IMAGE2DMS", "IIMAGE2DMS", "UIMAGE2DMS", "IMAGE2DMSARRAY", + "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "F16IMAGE1D", "F16IMAGE2D", + "F16IMAGE3D", "F16IMAGE2DRECT", "F16IMAGECUBE", "F16IMAGE1DARRAY", + "F16IMAGE2DARRAY", "F16IMAGECUBEARRAY", "F16IMAGEBUFFER", "F16IMAGE2DMS", + "F16IMAGE2DMSARRAY", "STRUCT", "VOID", "WHILE", "IDENTIFIER", + "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT", "INT16CONSTANT", + "UINT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INTCONSTANT", + "UINTCONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "BOOLCONSTANT", "FLOAT16CONSTANT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", @@ -928,20 +1065,24 @@ static const char *const yytname[] = "fully_specified_type", "invariant_qualifier", "interpolation_qualifier", "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", "precise_qualifier", "type_qualifier", "single_type_qualifier", - "storage_qualifier", "type_name_list", "type_specifier", - "array_specifier", "type_specifier_nonarray", "precision_qualifier", - "struct_specifier", "$@3", "$@4", "struct_declaration_list", - "struct_declaration", "struct_declarator_list", "struct_declarator", - "initializer", "initializer_list", "declaration_statement", "statement", + "storage_qualifier", "non_uniform_qualifier", "type_name_list", + "type_specifier", "array_specifier", "type_specifier_nonarray", + "precision_qualifier", "struct_specifier", "$@3", "$@4", + "struct_declaration_list", "struct_declaration", + "struct_declarator_list", "struct_declarator", "initializer", + "initializer_list", "declaration_statement", "statement", "simple_statement", "compound_statement", "$@5", "$@6", "statement_no_new_scope", "statement_scoped", "$@7", "$@8", "compound_statement_no_new_scope", "statement_list", "expression_statement", "selection_statement", - "selection_rest_statement", "condition", "switch_statement", "$@9", - "switch_statement_list", "case_label", "iteration_statement", "$@10", - "$@11", "$@12", "for_init_statement", "conditionopt", - "for_rest_statement", "jump_statement", "translation_unit", - "external_declaration", "function_definition", "$@13", YY_NULL + "selection_statement_nonattributed", "selection_rest_statement", + "condition", "switch_statement", "switch_statement_nonattributed", "$@9", + "switch_statement_list", "case_label", "iteration_statement", + "iteration_statement_nonattributed", "$@10", "$@11", "$@12", + "for_init_statement", "conditionopt", "for_rest_statement", + "jump_statement", "translation_unit", "external_declaration", + "function_definition", "$@13", "attribute", "attribute_list", + "single_attribute", YY_NULL }; #endif @@ -979,16 +1120,26 @@ static const yytype_uint16 yytoknum[] = 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552 + 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, + 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645 }; # endif -#define YYPACT_NINF -525 +#define YYPACT_NINF -634 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-525))) + (!!((Yystate) == (-634))) -#define YYTABLE_NINF -407 +#define YYTABLE_NINF -502 #define yytable_value_is_error(Yytable_value) \ 0 @@ -997,65 +1148,76 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 2619, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -243, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -228, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -215, -525, -525, -525, - -525, -525, -525, -525, -525, -157, -525, -216, -218, -205, - -141, 4260, -165, -525, -94, -525, -525, -525, -525, 3183, - -525, -525, -525, -117, -525, -525, 575, -525, -525, -80, - -48, -114, -525, 6381, -242, -525, -525, -113, -525, 4260, - -525, -525, -525, 4260, -75, -74, -525, -235, -190, -525, - -525, -525, 4765, -108, -525, -525, -525, -186, -525, -112, - -178, -525, -525, 4260, -115, -525, -226, 867, -525, -525, - -525, -525, -117, -229, -525, 5039, -224, -525, -71, -525, - -158, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, 5861, 5861, 5861, -525, -525, -525, -525, -525, - -525, -525, -223, -525, -525, -525, -102, -177, 6121, -100, - -525, 5861, -204, -171, -132, -221, -199, -124, -120, -111, - -84, -83, -233, -98, -525, 5313, -525, -60, 5861, -525, - -48, 4260, 4260, -59, 3456, -525, -525, -525, -99, -97, - -525, -90, -88, -96, 5587, -85, 5861, -92, -79, -81, - -525, -525, -191, -525, -525, -153, -525, -218, -78, -525, - -525, -525, -525, 1159, -525, -525, -525, -525, -525, -525, - -108, 5039, -193, 5039, -525, -525, 5039, 4260, -525, -47, - -525, -525, -525, -176, -525, -525, 5861, -42, -525, -525, - 5861, -73, -525, -525, -525, 5861, 5861, 5861, 5861, 5861, - 5861, 5861, 5861, 5861, 5861, 5861, 5861, 5861, 5861, 5861, - 5861, 5861, 5861, 5861, -525, -525, -525, -76, -525, -525, - -525, -525, 3724, -59, -117, -152, -525, -525, -525, -525, - -525, 1451, -525, 5861, -525, -525, -143, 5861, -180, -525, - -525, -525, 1451, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, 5861, 5861, -525, -525, -525, -525, - 5039, -525, -133, -525, 3992, -525, -525, -72, -77, -525, - -525, -525, -525, -525, -204, -204, -171, -171, -132, -132, - -132, -132, -221, -221, -199, -124, -120, -111, -84, -83, - 5861, -525, -525, -142, -108, -59, -525, -37, 2327, -175, - -525, -163, -525, 2892, 1451, -525, -525, -525, -525, 4491, - -525, -525, -129, -525, -525, -68, -525, -525, 2892, -70, - -525, -77, -32, 4260, -63, -66, -525, -525, 5861, 5861, - -525, -69, -61, 188, -58, 2035, -525, -56, -57, 1743, - -525, -525, -161, 5861, 1743, -70, -525, -525, 1451, 5039, - -525, -525, -525, -67, -77, -525, -525, 1451, -54, -525, - -525, -525 + 3391, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -311, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -295, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, -634, -301, -634, -634, + -634, -634, -634, -634, -634, -634, -241, -634, -302, -342, + -290, -254, 5696, -300, -634, -210, -634, -634, -634, -634, + 4160, -634, -634, -634, -634, -219, -634, -634, 696, -634, + -634, -189, -69, -207, -634, 8625, -320, -634, -634, -203, + -634, 5696, -634, -634, -634, 5696, -155, -154, -634, -324, + -288, -634, -634, -634, 6417, -190, -634, -634, -634, -292, + -634, -196, -287, -634, -634, 5696, -195, -634, -306, 1081, + -634, -634, -634, -634, -219, -325, -634, 6785, -310, -634, + -151, -634, -277, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, 7889, 7889, 7889, -634, + -634, -634, -634, -634, -634, -634, -309, -634, -634, -634, + -185, -283, 8257, -183, -634, 7889, -227, -263, -299, -318, + -194, -204, -202, -200, -165, -166, -321, -179, -634, -634, + 7153, -634, -140, 7889, -634, -69, 5696, 5696, -139, 4544, + -634, -634, -634, -182, -180, -634, -173, -169, -178, 7521, + -164, 7889, -174, -163, -167, -162, -634, -634, -252, -634, + -634, -237, -634, -342, -161, -158, -634, -634, -634, -634, + 1466, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -19, -190, 6785, -296, 6785, -634, -634, 6785, 5696, -634, + -127, -634, -634, -634, -278, -634, -634, 7889, -121, -634, + -634, 7889, -156, -634, -634, -634, 7889, 7889, 7889, 7889, + 7889, 7889, 7889, 7889, 7889, 7889, 7889, 7889, 7889, 7889, + 7889, 7889, 7889, 7889, 7889, -634, -634, -634, -157, -634, + -634, -634, -634, 4928, -139, -219, -236, -634, -634, -634, + -634, -634, 1851, -634, 7889, -634, -634, -230, 7889, -213, + -634, -634, -118, -634, 1851, -634, -634, -634, -634, -634, + -634, -634, -634, -634, -634, -634, 7889, 7889, -634, -634, + -634, -634, -634, -634, -634, 6785, -634, -270, -634, 5312, + -634, -634, -153, -150, -634, -634, -634, -634, -634, -227, + -227, -263, -263, -299, -299, -299, -299, -318, -318, -194, + -204, -202, -200, -165, -166, 7889, -634, -634, -226, -190, + -139, -634, -113, 3006, -275, -634, -253, -634, 3776, -148, + -282, -634, 1851, -634, -634, -634, -634, 6049, -634, -634, + -208, -634, -634, -147, -634, -634, 3776, -146, -634, -150, + -111, 5696, -145, 7889, -144, -118, -143, -634, -634, 7889, + 7889, -634, -149, -141, 196, -136, 2621, -634, -116, -120, + 2236, -137, -634, -634, -634, -634, -239, 7889, 2236, -146, + -634, -634, 1851, 6785, -634, -634, -634, -634, -119, -150, + -634, -634, 1851, -112, -634, -634, -634 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1063,95 +1225,108 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 149, 150, 148, 185, 176, 177, 179, 180, 181, - 182, 183, 184, 178, 165, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 207, 208, 209, 210, 211, 212, - 186, 187, 188, 216, 217, 218, 154, 152, 153, 151, - 157, 155, 156, 158, 159, 160, 161, 162, 163, 164, - 189, 190, 191, 228, 229, 230, 192, 193, 194, 240, - 241, 242, 204, 205, 206, 213, 214, 215, 131, 130, - 129, 0, 132, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 266, 267, 268, 269, 270, 271, 273, 274, - 275, 276, 277, 278, 280, 281, 282, 283, 284, 285, - 286, 264, 265, 272, 279, 287, 288, 289, 290, 291, - 292, 361, 293, 294, 295, 296, 297, 298, 299, 300, - 302, 303, 304, 305, 306, 307, 309, 310, 311, 312, - 313, 314, 316, 317, 318, 319, 320, 321, 301, 308, - 315, 322, 323, 324, 325, 326, 327, 362, 363, 364, - 365, 366, 367, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 0, 175, 369, 448, - 128, 139, 370, 371, 372, 0, 447, 0, 449, 0, - 105, 104, 0, 116, 121, 146, 145, 143, 147, 0, - 140, 142, 126, 169, 144, 368, 0, 444, 446, 0, - 0, 0, 375, 0, 0, 93, 90, 0, 103, 0, - 112, 106, 114, 0, 115, 0, 91, 122, 0, 96, - 141, 127, 0, 170, 1, 445, 167, 0, 138, 136, - 0, 134, 373, 0, 0, 94, 0, 0, 450, 107, - 111, 113, 109, 117, 108, 0, 123, 99, 0, 97, - 0, 2, 10, 11, 4, 5, 6, 7, 8, 9, - 13, 12, 0, 0, 0, 171, 39, 38, 40, 37, - 3, 15, 33, 17, 22, 23, 0, 0, 27, 0, - 41, 0, 45, 48, 51, 56, 59, 61, 63, 65, - 67, 69, 71, 0, 31, 0, 166, 0, 0, 133, - 0, 0, 0, 0, 0, 377, 92, 95, 0, 0, - 429, 0, 0, 0, 0, 0, 0, 0, 0, 401, - 410, 414, 41, 74, 87, 0, 390, 0, 126, 393, - 412, 392, 391, 0, 394, 395, 396, 397, 398, 399, - 110, 0, 118, 0, 385, 125, 0, 0, 101, 0, - 98, 34, 35, 0, 19, 20, 0, 0, 25, 24, - 0, 175, 28, 30, 36, 0, 0, 0, 0, 0, + 0, 153, 154, 183, 181, 184, 182, 185, 152, 196, + 186, 187, 194, 195, 192, 193, 190, 191, 188, 189, + 169, 212, 213, 214, 215, 216, 217, 230, 231, 232, + 227, 228, 229, 242, 243, 244, 224, 225, 226, 239, + 240, 241, 221, 222, 223, 236, 237, 238, 218, 219, + 220, 233, 234, 235, 197, 198, 199, 245, 246, 247, + 158, 156, 157, 155, 161, 159, 160, 162, 163, 171, + 164, 165, 166, 167, 168, 200, 201, 202, 257, 258, + 259, 203, 204, 205, 269, 270, 271, 206, 207, 208, + 281, 282, 283, 209, 210, 211, 293, 294, 295, 134, + 133, 132, 0, 135, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 332, 333, 334, 335, 336, 337, 339, 340, 341, + 342, 343, 344, 346, 347, 350, 351, 352, 354, 355, + 317, 318, 338, 345, 356, 358, 359, 360, 362, 363, + 454, 319, 320, 321, 348, 322, 326, 327, 330, 353, + 357, 361, 323, 324, 328, 329, 349, 325, 331, 364, + 365, 366, 368, 370, 372, 374, 376, 380, 381, 382, + 383, 384, 385, 387, 388, 389, 390, 391, 392, 394, + 396, 397, 398, 400, 401, 378, 386, 393, 402, 404, + 405, 406, 408, 409, 367, 369, 371, 395, 373, 375, + 377, 379, 399, 403, 407, 455, 456, 459, 460, 461, + 462, 457, 458, 410, 412, 413, 414, 416, 417, 418, + 420, 421, 422, 424, 425, 426, 428, 429, 430, 432, + 433, 434, 436, 437, 438, 440, 441, 442, 444, 445, + 446, 448, 449, 450, 452, 453, 411, 415, 419, 423, + 427, 435, 439, 443, 431, 447, 451, 0, 180, 464, + 549, 131, 142, 465, 466, 467, 0, 548, 0, 550, + 0, 108, 107, 0, 119, 124, 149, 148, 146, 150, + 0, 143, 145, 151, 129, 174, 147, 463, 0, 545, + 547, 0, 0, 0, 470, 0, 0, 96, 93, 0, + 106, 0, 115, 109, 117, 0, 118, 0, 94, 125, + 0, 99, 144, 130, 0, 175, 1, 546, 172, 0, + 141, 139, 0, 137, 468, 0, 0, 97, 0, 0, + 551, 110, 114, 116, 112, 120, 111, 0, 126, 102, + 0, 100, 0, 2, 12, 13, 10, 11, 4, 5, + 6, 7, 8, 9, 15, 14, 0, 0, 0, 176, + 42, 41, 43, 40, 3, 17, 36, 19, 24, 25, + 0, 0, 29, 0, 44, 0, 48, 51, 54, 59, + 62, 64, 66, 68, 70, 72, 74, 0, 35, 33, + 0, 170, 0, 0, 136, 0, 0, 0, 0, 0, + 472, 95, 98, 0, 0, 530, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 496, 505, 509, 44, 77, + 90, 0, 485, 0, 151, 129, 488, 507, 487, 486, + 0, 489, 490, 511, 491, 518, 492, 493, 526, 494, + 0, 113, 0, 121, 0, 480, 128, 0, 0, 104, + 0, 101, 37, 38, 0, 21, 22, 0, 0, 27, + 26, 0, 180, 30, 32, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 72, 172, 173, 0, 168, 89, - 137, 135, 0, 0, 383, 0, 381, 376, 378, 440, - 439, 0, 431, 0, 443, 441, 0, 0, 0, 426, - 427, 400, 0, 77, 78, 80, 79, 82, 83, 84, - 85, 86, 81, 76, 0, 0, 415, 411, 413, 120, - 0, 388, 0, 124, 0, 102, 14, 0, 21, 18, - 29, 42, 43, 44, 47, 46, 49, 50, 54, 55, - 52, 53, 57, 58, 60, 62, 64, 66, 68, 70, - 0, 174, 374, 0, 384, 0, 379, 0, 0, 0, - 442, 0, 425, 0, 402, 75, 88, 119, 386, 0, - 100, 16, 0, 380, 382, 0, 434, 433, 436, 408, - 421, 419, 0, 0, 0, 0, 387, 389, 0, 0, - 435, 0, 0, 418, 0, 0, 416, 0, 0, 0, - 403, 73, 0, 437, 0, 408, 407, 409, 423, 0, - 405, 428, 404, 0, 438, 432, 417, 424, 0, 420, - 430, 422 + 0, 0, 0, 0, 0, 75, 177, 178, 0, 173, + 92, 140, 138, 0, 0, 478, 0, 476, 471, 473, + 541, 540, 0, 532, 0, 544, 542, 0, 0, 0, + 525, 528, 0, 495, 0, 80, 81, 83, 82, 85, + 86, 87, 88, 89, 84, 79, 0, 0, 510, 506, + 508, 512, 519, 527, 123, 0, 483, 0, 127, 0, + 105, 16, 0, 23, 20, 31, 45, 46, 47, 50, + 49, 52, 53, 57, 58, 55, 56, 60, 61, 63, + 65, 67, 69, 71, 73, 0, 179, 469, 0, 479, + 0, 474, 0, 0, 0, 543, 0, 524, 0, 555, + 0, 553, 497, 78, 91, 122, 481, 0, 103, 18, + 0, 475, 477, 0, 535, 534, 537, 503, 520, 516, + 0, 0, 0, 0, 0, 0, 0, 482, 484, 0, + 0, 536, 0, 0, 515, 0, 0, 513, 0, 0, + 0, 0, 552, 554, 498, 76, 0, 538, 0, 503, + 502, 504, 522, 0, 500, 529, 499, 556, 0, 539, + 533, 514, 523, 0, 517, 531, 521 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -525, -525, -525, -525, -525, -525, -525, -525, -525, -525, - -525, -525, -103, -525, -278, -274, -297, -273, -214, -211, - -210, -212, -209, -208, -525, -261, -525, -292, -525, -308, - -525, 4, -525, -525, -525, 5, -525, -525, -525, -41, - -38, -39, -525, -525, -504, -525, -525, -525, -525, -123, - -525, -230, -237, -525, -525, 0, -246, -525, 1, -525, - -525, -525, -337, -342, -207, -286, -378, -525, -285, -376, - -524, -322, -525, -525, -330, -327, -525, -525, -22, -452, - -275, -525, -525, -298, -525, -525, -525, -525, -525, -525, - -525, -525, -525, -525, -525, -525, -525, -2, -525, -525 + -634, -634, -634, -634, -634, -634, -634, -634, -634, -634, + -634, -634, -289, -634, -358, -355, -401, -364, -279, -307, + -276, -280, -273, -281, -634, -354, -634, -378, -634, -367, + -397, 1, -634, -634, -634, 2, -634, -634, -634, -98, + -93, -92, -634, -634, -600, -634, -634, -634, -634, -181, + -634, -319, -326, -634, 6, -634, 0, -332, -634, -54, + -634, -634, -634, -428, -433, -272, -353, -477, -634, -357, + -467, -633, -400, -634, -634, -410, -408, -634, -634, -80, + -545, -350, -634, -216, -634, -371, -634, -214, -634, -634, + -634, -634, -212, -634, -634, -634, -634, -634, -634, -634, + -634, -61, -634, -634, -634, -634, -375 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 320, 321, 322, 487, 323, 324, 325, 326, 327, - 328, 329, 372, 331, 332, 333, 334, 335, 336, 337, - 338, 339, 340, 341, 342, 373, 510, 374, 474, 375, - 440, 376, 227, 397, 300, 377, 229, 230, 231, 260, - 261, 262, 232, 233, 234, 235, 236, 237, 280, 281, - 238, 239, 240, 241, 277, 344, 273, 243, 244, 245, - 351, 283, 354, 355, 445, 446, 395, 482, 379, 380, - 381, 382, 462, 545, 571, 553, 554, 555, 572, 383, - 384, 385, 556, 544, 386, 557, 578, 387, 388, 523, - 451, 518, 538, 551, 552, 389, 246, 247, 248, 257 + -1, 414, 415, 416, 592, 417, 418, 419, 420, 421, + 422, 423, 468, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 469, 615, 470, 576, 471, + 541, 472, 318, 498, 392, 473, 320, 321, 322, 352, + 353, 354, 323, 324, 325, 326, 327, 328, 372, 373, + 329, 330, 331, 332, 438, 369, 439, 365, 335, 336, + 337, 446, 375, 449, 450, 546, 547, 496, 587, 476, + 477, 478, 479, 564, 656, 685, 664, 665, 666, 686, + 480, 481, 482, 483, 667, 652, 484, 485, 668, 693, + 486, 487, 488, 628, 552, 623, 646, 662, 663, 489, + 338, 339, 340, 349, 490, 630, 631 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1159,155 +1334,118 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 242, 263, 270, 394, 226, 228, 403, 478, 286, 278, - 524, 343, 448, 479, 442, 481, 254, 251, 483, 542, - 433, 296, 249, 404, 405, 272, 270, 422, 423, 263, - 294, 567, 272, 285, 542, 570, 412, 250, 272, 295, - 570, 345, -32, 345, 406, 391, 390, 392, 407, 357, - 396, 426, 427, 352, 252, 434, 456, 256, 458, 255, - 484, 258, 424, 425, 463, 464, 465, 466, 467, 468, - 469, 470, 471, 472, 345, 517, 415, 416, 417, 297, - 346, 480, 298, 473, 437, 299, 347, 439, 349, 409, - 486, 539, 475, 522, 350, 410, 475, 475, 488, 394, - 448, 394, 527, 540, 394, 573, 418, 265, 419, 475, - 266, 475, 420, 421, 399, 270, 577, 400, 490, 475, - 515, 352, 476, 516, 352, 498, 499, 500, 501, 475, - 515, 259, 520, 533, 222, 223, 224, 528, 267, 529, - 494, 495, 448, 475, 548, 519, 496, 497, 478, 521, - 272, 547, 276, 502, 503, 282, 287, 292, 293, 345, - 356, 398, 348, 428, 408, 413, 429, 352, 431, 330, - 435, 432, 438, 444, 430, 452, 449, 453, 450, 454, - 457, 459, 525, 526, 279, 485, 460, -31, 394, 461, - 489, 579, 511, -26, 535, 475, 531, 549, 514, -406, - 558, 478, 532, 559, 560, 564, 563, 565, 580, 401, - 402, 369, 352, 568, 504, 541, 581, 569, 505, 507, - 506, 289, 290, 508, 291, 509, 253, 441, 414, 534, - 541, 264, 566, 536, 575, 288, 513, 394, 576, 271, - 550, 562, 330, 537, 275, 330, 242, 0, 0, 0, - 226, 228, 0, 284, 352, 574, 561, 0, 0, 264, - 0, 0, 0, 264, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, - 0, 0, 0, 353, 0, 0, 0, 378, 0, 0, - 0, 0, 0, 543, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 270, 0, 543, 0, - 0, 0, 491, 492, 493, 330, 330, 330, 330, 330, - 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, - 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 334, 317, 319, 355, 362, 455, 333, 456, 457, 495, + 437, 460, 370, 580, 378, 584, 549, 586, 543, 632, + 588, 346, 343, 523, 524, 534, 348, 388, 650, 362, + 505, 506, 355, 681, 386, 364, 364, 684, 521, 522, + 364, 504, 492, 387, 513, 684, 650, 341, 377, -34, + 440, 507, 491, 493, 440, 508, 447, 497, 525, 526, + 535, 344, 452, 342, 440, 357, 347, 441, 358, 350, + 589, 585, 444, 442, 389, 424, 510, 390, 445, 654, + 391, 591, 511, 655, 647, 622, 538, 577, 500, 540, + 577, 501, 557, 636, 559, 637, 565, 566, 567, 568, + 569, 570, 571, 572, 573, 574, 648, 519, 635, 520, + 549, 351, 577, 359, 495, 575, 495, 502, 503, 495, + 688, 362, 603, 604, 605, 606, 577, 447, 577, 620, + 447, 578, 621, 595, 368, 577, 515, 692, 625, 620, + 593, 364, 641, 313, 314, 315, 516, 517, 518, 527, + 528, 424, 577, 627, 424, 374, 549, 577, 659, 379, + 658, 599, 600, 607, 608, 580, 601, 602, 384, 385, + 440, 443, 499, 451, 509, 514, 529, 530, 531, 447, + 532, 533, 536, 539, 545, 553, 550, 624, 551, 554, + 555, 626, 560, 562, 558, 561, 590, -35, 633, 634, + -33, 563, 594, -28, 616, 629, 694, 495, 639, 643, + 653, 660, 669, 619, 670, 577, -501, 672, 678, 677, + 674, 679, 687, 610, 447, 580, 465, 596, 597, 598, + 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, + 424, 424, 424, 424, 424, 424, 682, 683, 640, 695, + 609, 696, 612, 614, 371, 611, 671, 382, 381, 495, + 613, 649, 345, 383, 542, 680, 644, 642, 690, 380, + 447, 691, 618, 645, 581, 661, 582, 367, 583, 649, + 673, 675, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 676, 0, 0, 0, 0, 0, 540, + 0, 0, 0, 463, 0, 495, 0, 0, 0, 651, + 689, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 356, 0, 0, 362, 0, 651, 333, 0, + 363, 0, 0, 0, 0, 0, 333, 0, 334, 317, + 319, 0, 0, 0, 333, 376, 0, 0, 0, 0, + 0, 356, 0, 0, 0, 356, 0, 333, 0, 0, + 0, 333, 0, 0, 424, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 448, 0, 0, 0, 475, + 0, 333, 0, 0, 0, 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 353, 443, 0, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 378, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 448, 544, 0, 448, + 0, 0, 333, 333, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, - 0, 378, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 378, 0, 0, 0, 0, 0, 0, 0, + 475, 0, 0, 0, 0, 0, 474, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 448, 0, + 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, - 0, 0, 0, 378, 378, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, - 0, 0, 0, 271, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 378, 0, 0, 0, 378, - 0, 0, 0, 0, 378, 0, 0, 0, 378, 0, - 0, 0, 0, 0, 0, 274, 0, 378, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 0, 0, 218, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 448, 0, 0, 0, 0, 0, 333, + 0, 0, 475, 0, 0, 0, 0, 0, 474, 0, + 0, 0, 0, 0, 475, 0, 0, 0, 0, 0, + 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 448, + 0, 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 475, 0, 0, 0, 0, 475, 474, + 0, 0, 475, 0, 474, 0, 0, 0, 474, 0, + 0, 0, 0, 0, 0, 0, 475, 0, 0, 0, + 0, 363, 474, 0, 0, 0, 0, 333, 0, 0, + 0, 0, 0, 0, 0, 0, 475, 0, 0, 0, + 475, 0, 474, 0, 0, 0, 474, 0, 475, 0, + 0, 0, 475, 0, 474, 0, 0, 0, 474, 0, + 0, 0, 475, 0, 0, 0, 366, 0, 474, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 0, 0, + 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 220, 221, 222, 223, 224, 225, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 358, 359, 360, 0, 361, 362, 363, - 364, 365, 366, 367, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 368, 301, - 218, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 0, 0, 312, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 314, 0, 0, 0, 369, 370, 0, 0, - 0, 0, 371, 316, 317, 318, 319, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 221, 222, 223, - 224, 225, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 358, 359, 360, 0, 361, - 362, 363, 364, 365, 366, 367, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 368, 301, 218, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 0, 0, 312, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 314, 0, 0, 0, 369, 477, - 0, 0, 0, 0, 371, 316, 317, 318, 319, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 220, 221, - 222, 223, 224, 225, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 358, 359, 360, - 0, 361, 362, 363, 364, 365, 366, 367, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 0, 0, 0, 0, 310, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 316, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 453, 454, 455, 0, 456, 457, 458, + 459, 460, 461, 462, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, @@ -1327,187 +1465,25 @@ static const yytype_int16 yytable[] = 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 368, 301, 218, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 0, 0, 312, 313, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, - 369, 0, 0, 0, 0, 0, 371, 316, 317, 318, - 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 220, 221, 222, 223, 224, 225, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 358, - 359, 360, 0, 361, 362, 363, 364, 365, 366, 367, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 368, 301, 218, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 0, 0, 312, - 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, - 0, 0, 287, 0, 0, 0, 0, 0, 371, 316, - 317, 318, 319, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 220, 221, 222, 223, 224, 225, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 358, 359, 360, 0, 361, 362, 363, 364, 365, - 366, 367, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 368, 301, 218, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 0, - 0, 312, 313, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 371, 316, 317, 318, 319, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 220, 221, 222, 223, 224, 225, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 0, 301, - 218, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 0, 0, 312, 313, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 371, 316, 317, 318, 319, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 221, 222, 223, - 224, 225, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 219, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 220, 221, - 222, 223, 224, 225, 0, 0, 0, 0, 0, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 0, 301, 218, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 0, 0, 312, 313, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 316, 317, - 318, 319, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 220, 221, 222, 223, 224, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 0, 268, 218, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 269, 1, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 463, 393, 309, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, 0, 0, + 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, + 0, 464, 0, 465, 466, 0, 0, 0, 0, 467, + 410, 411, 412, 413, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 311, 312, 313, 314, 315, 316, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 220, 221, 222, 223, 224, 0, 0, 0, - 0, 0, 0, 14, 15, 16, 17, 18, 19, 20, + 12, 13, 14, 15, 16, 17, 18, 19, 453, 454, + 455, 0, 456, 457, 458, 459, 460, 461, 462, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, @@ -1527,96 +1503,31 @@ static const yytype_int16 yytable[] = 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 0, 0, 218, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 447, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 0, 0, 0, 0, 0, 220, 221, 222, 223, 224, - 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 0, 0, 218, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 463, 393, + 309, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 0, 0, 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 512, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, - 0, 0, 0, 220, 221, 222, 223, 224, 0, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 0, 0, 218, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 530, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 0, 0, 0, 0, - 0, 220, 221, 222, 223, 224, 0, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 0, 0, 218, 0, 0, 0, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 0, 0, 0, 0, 408, 0, 464, 0, 465, 579, + 0, 0, 0, 0, 467, 410, 411, 412, 413, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 316, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 453, 454, 455, 0, 456, 457, 458, + 459, 460, 461, 462, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, - 221, 222, 223, 224, 50, 51, 52, 53, 54, 55, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 0, 73, 74, 75, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, @@ -1631,129 +1542,69 @@ static const yytype_int16 yytable[] = 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 0, 301, 218, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 0, 0, 312, 313, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, - 393, 546, 0, 0, 0, 0, 0, 316, 317, 318, - 319, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 0, 0, 0, 0, - 0, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 0, 301, 218, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 0, - 0, 312, 313, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 314, 0, 0, 315, 0, 0, 0, 0, 0, 0, - 0, 316, 317, 318, 319, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 0, 0, 0, 0, 0, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 0, 301, 218, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 0, 0, 312, 313, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 314, 0, 0, 0, 393, 0, - 0, 0, 0, 0, 0, 316, 317, 318, 319, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 0, 0, 0, 0, 0, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 0, 301, 218, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 0, 0, 312, - 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, - 0, 436, 0, 0, 0, 0, 0, 0, 0, 316, - 317, 318, 319, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 0, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 0, 301, - 218, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 0, 0, 312, 313, 0, 0, 0, 0, 0, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 463, 393, 309, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, 0, 0, + 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, + 0, 464, 0, 465, 0, 0, 0, 0, 0, 467, + 410, 411, 412, 413, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 311, 312, 313, 314, 315, 316, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 453, 454, + 455, 0, 456, 457, 458, 459, 460, 461, 462, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 463, 393, + 309, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 0, 0, 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 455, 316, 317, 318, 319, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 0, 0, 0, 0, 408, 0, 464, 0, 379, 0, + 0, 0, 0, 0, 467, 410, 411, 412, 413, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 316, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 453, 454, 455, 0, 456, 457, 458, + 459, 460, 461, 462, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 50, 51, 52, 53, 54, 55, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 0, 73, 74, 75, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, @@ -1768,18 +1619,69 @@ static const yytype_int16 yytable[] = 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 0, 301, 218, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 0, 0, 312, 313, 0, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 463, 393, 309, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, 0, 0, + 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, + 0, 464, 0, 0, 0, 0, 0, 0, 0, 467, + 410, 411, 412, 413, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 311, 312, 313, 314, 315, 316, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 0, 393, + 309, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 0, 0, 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 314, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 316, 317, 318, - 319, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 0, 0, 0, 0, 408, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 467, 410, 411, 412, 413, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 316, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 50, 51, 52, 53, 54, 55, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 0, 73, 74, 75, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, @@ -1794,155 +1696,25 @@ static const yytype_int16 yytable[] = 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 411, 0, 301, 218, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 0, 0, 312, 313, 0, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 0, 0, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 314, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 316, 317, 318, - 319, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 0, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 0, 0, 218 -}; - -static const yytype_int16 yycheck[] = -{ - 0, 231, 239, 295, 0, 0, 314, 383, 254, 57, - 462, 272, 354, 391, 351, 393, 232, 232, 396, 523, - 253, 267, 265, 246, 247, 267, 263, 248, 249, 259, - 265, 555, 267, 275, 538, 559, 328, 265, 267, 274, - 564, 267, 265, 267, 267, 274, 292, 293, 271, 275, - 274, 250, 251, 283, 269, 288, 364, 275, 366, 275, - 397, 266, 283, 284, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 267, 451, 280, 281, 282, 269, - 266, 274, 272, 274, 345, 275, 272, 348, 266, 266, - 266, 266, 272, 273, 272, 272, 272, 272, 406, 391, - 442, 393, 480, 266, 396, 266, 277, 272, 279, 272, - 275, 272, 244, 245, 272, 352, 568, 275, 410, 272, - 272, 351, 275, 275, 354, 422, 423, 424, 425, 272, - 272, 272, 275, 275, 291, 292, 293, 270, 232, 272, - 418, 419, 484, 272, 273, 453, 420, 421, 524, 457, - 267, 529, 232, 426, 427, 269, 269, 232, 232, 267, - 275, 232, 274, 287, 266, 265, 286, 397, 252, 272, - 268, 254, 232, 232, 285, 265, 275, 265, 275, 275, - 265, 273, 474, 475, 232, 232, 265, 265, 480, 270, - 232, 569, 268, 266, 231, 272, 268, 265, 444, 269, - 232, 577, 510, 266, 270, 266, 275, 19, 275, 312, - 313, 269, 442, 269, 428, 523, 270, 274, 429, 431, - 430, 259, 263, 432, 263, 433, 225, 350, 331, 515, - 538, 231, 554, 518, 564, 257, 443, 529, 565, 239, - 538, 549, 345, 518, 246, 348, 246, -1, -1, -1, - 246, 246, -1, 253, 484, 563, 548, -1, -1, 259, - -1, -1, -1, 263, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 569, -1, -1, - -1, -1, -1, 283, -1, -1, -1, 287, -1, -1, - -1, -1, -1, 523, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 543, -1, 538, -1, - -1, -1, 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, - 433, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 351, 352, -1, 354, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 397, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 442, -1, -1, -1, -1, -1, -1, -1, - -1, 451, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 462, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 484, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 518, -1, - -1, -1, -1, 523, 524, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 538, -1, - -1, -1, -1, 543, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 555, -1, -1, -1, 559, - -1, -1, -1, -1, 564, -1, -1, -1, 568, -1, - -1, -1, -1, -1, -1, 0, -1, 577, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, -1, -1, 233, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 275, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 289, 290, 291, 292, 293, 294, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, -1, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, -1, -1, 246, 247, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 265, -1, -1, -1, 269, 270, -1, -1, - -1, -1, 275, 276, 277, 278, 279, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 289, 290, 291, 292, - 293, 294, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, -1, 20, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 311, 312, 313, 314, 315, 316, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, @@ -1965,43 +1737,23 @@ static const yytype_int16 yycheck[] = 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, -1, -1, 246, 247, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 265, -1, -1, -1, 269, 270, - -1, -1, -1, -1, 275, 276, 277, 278, 279, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 289, 290, - 291, 292, 293, 294, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, -1, -1, 246, 247, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 265, -1, -1, -1, - 269, -1, -1, -1, -1, -1, 275, 276, 277, 278, - 279, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 289, 290, 291, 292, 293, 294, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, -1, 20, 21, 22, 23, 24, 25, 26, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 0, 393, + 309, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 0, 0, 406, 407, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 408, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 410, 411, 412, 413, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, @@ -2023,14 +1775,100 @@ static const yytype_int16 yycheck[] = 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, -1, -1, 246, - 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 265, -1, - -1, -1, 269, -1, -1, -1, -1, -1, 275, 276, - 277, 278, 279, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 289, 290, 291, 292, 293, 294, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, -1, 20, 21, 22, 23, 24, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 0, 360, 309, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 361, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 311, 312, 313, 314, 315, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 0, 0, 309, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 548, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 311, 312, 313, 314, + 315, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 0, 0, 309, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 617, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 311, 312, 313, 314, 315, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, @@ -2052,44 +1890,24 @@ static const yytype_int16 yycheck[] = 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, -1, - -1, 246, 247, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 265, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 275, 276, 277, 278, 279, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 289, 290, 291, 292, 293, 294, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, -1, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, -1, -1, 246, 247, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 265, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 275, 276, 277, 278, 279, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 289, 290, 291, 292, - 293, 294, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 27, 28, 29, 30, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 0, 0, 309, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 638, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 311, 312, 313, 314, 315, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, @@ -2110,21 +1928,29 @@ static const yytype_int16 yycheck[] = 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - -1, -1, 233, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 275, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 289, 290, - 291, 292, 293, 294, -1, -1, -1, -1, -1, 27, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 0, 0, + 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 4, 5, 6, 7, 0, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 0, 0, 0, 0, 0, 0, 0, 311, 312, + 313, 314, 315, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 58, 59, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 69, 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 98, 0, 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, @@ -2137,50 +1963,104 @@ static const yytype_int16 yycheck[] = 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, -1, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, -1, -1, 246, 247, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 265, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 276, 277, - 278, 279, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 289, 290, 291, 292, 293, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, -1, 232, 233, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 275, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 289, 290, 291, 292, 293, -1, -1, -1, - -1, -1, -1, 27, 28, 29, 30, 31, 32, 33, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 0, 393, 309, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, 405, 0, 0, 406, 407, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 408, 0, 0, + 0, 494, 657, 0, 0, 0, 0, 0, 410, 411, + 412, 413, 3, 4, 5, 6, 7, 0, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, + 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 0, + 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 0, + 393, 309, 394, 395, 396, 397, 398, 399, 400, 401, + 402, 403, 404, 405, 0, 0, 406, 407, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 408, 0, 0, 409, 0, + 0, 0, 0, 0, 0, 0, 410, 411, 412, 413, + 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, + 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, + 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 0, 393, 309, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + 404, 405, 0, 0, 406, 407, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 408, 0, 0, 0, 494, 0, 0, + 0, 0, 0, 0, 410, 411, 412, 413, 3, 4, + 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 54, 55, 56, 57, 58, 59, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, + 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, @@ -2193,21 +2073,31 @@ static const yytype_int16 yycheck[] = 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, -1, -1, 233, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 270, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - -1, -1, -1, -1, -1, 289, 290, 291, 292, 293, - -1, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 0, 393, 309, 394, 395, + 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 0, 0, 406, 407, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 408, 0, 0, 537, 0, 0, 0, 0, 0, + 0, 0, 410, 411, 412, 413, 3, 4, 5, 6, + 7, 0, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 56, 57, 58, 59, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 69, 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 96, 97, 98, 0, 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, @@ -2220,21 +2110,31 @@ static const yytype_int16 yycheck[] = 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, -1, -1, 233, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 270, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, - -1, -1, -1, 289, 290, 291, 292, 293, -1, 27, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 0, 393, 309, 394, 395, 396, 397, + 398, 399, 400, 401, 402, 403, 404, 405, 0, 0, + 406, 407, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 556, + 410, 411, 412, 413, 3, 4, 5, 6, 7, 0, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 58, 59, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 69, 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 98, 0, 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, @@ -2247,21 +2147,31 @@ static const yytype_int16 yycheck[] = 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, -1, -1, 233, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 270, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, - -1, 289, 290, 291, 292, 293, -1, 27, 28, 29, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 0, 393, 309, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, 405, 0, 0, 406, 407, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 408, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 410, 411, + 412, 413, 3, 4, 5, 6, 7, 0, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, + 0, 0, 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 0, + 0, 0, 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, @@ -2274,152 +2184,172 @@ static const yytype_int16 yycheck[] = 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, -1, -1, 233, -1, -1, -1, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 289, - 290, 291, 292, 293, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, -1, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, -1, -1, 246, 247, -1, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 512, 0, + 393, 309, 394, 395, 396, 397, 398, 399, 400, 401, + 402, 403, 404, 405, 0, 0, 406, 407, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 408, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 410, 411, 412, 413, + 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 0, 0, 0, + 0, 0, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 0, 0, 309 +}; + +static const yytype_int16 yycheck[] = +{ + 0, 0, 0, 322, 330, 24, 0, 26, 27, 387, + 364, 30, 81, 480, 346, 492, 449, 494, 446, 564, + 497, 323, 323, 341, 342, 346, 368, 359, 628, 355, + 339, 340, 351, 666, 358, 360, 360, 670, 337, 338, + 360, 408, 367, 367, 422, 678, 646, 358, 368, 358, + 360, 360, 384, 385, 360, 364, 375, 367, 376, 377, + 381, 362, 368, 358, 360, 365, 368, 359, 368, 359, + 498, 367, 359, 365, 362, 364, 359, 365, 365, 361, + 368, 359, 365, 365, 359, 552, 440, 365, 365, 443, + 365, 368, 459, 363, 461, 365, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 359, 370, 585, 372, + 543, 365, 365, 323, 492, 367, 494, 406, 407, 497, + 359, 447, 523, 524, 525, 526, 365, 446, 365, 365, + 449, 368, 368, 511, 323, 365, 425, 682, 368, 365, + 507, 360, 368, 384, 385, 386, 373, 374, 375, 343, + 344, 440, 365, 366, 443, 362, 589, 365, 366, 362, + 637, 519, 520, 527, 528, 632, 521, 522, 323, 323, + 360, 367, 323, 368, 359, 358, 380, 379, 378, 498, + 345, 347, 361, 323, 323, 358, 368, 554, 368, 358, + 368, 558, 366, 360, 358, 358, 323, 358, 576, 577, + 358, 363, 323, 359, 361, 323, 683, 585, 361, 322, + 358, 358, 323, 545, 359, 365, 362, 361, 359, 368, + 363, 25, 359, 530, 543, 692, 362, 516, 517, 518, + 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, + 529, 530, 531, 532, 533, 534, 362, 367, 615, 368, + 529, 363, 532, 534, 323, 531, 653, 355, 351, 637, + 533, 628, 316, 355, 445, 665, 623, 620, 678, 349, + 589, 679, 544, 623, 490, 646, 490, 338, 490, 646, + 655, 659, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 660, -1, -1, -1, -1, -1, 653, + -1, -1, -1, 322, -1, 683, -1, -1, -1, 628, + 677, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 322, -1, -1, 651, -1, 646, 322, -1, + 330, -1, -1, -1, -1, -1, 330, -1, 338, 338, + 338, -1, -1, -1, 338, 345, -1, -1, -1, -1, + -1, 351, -1, -1, -1, 355, -1, 351, -1, -1, + -1, 355, -1, -1, 653, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 375, -1, -1, -1, 379, + -1, 375, -1, -1, -1, 379, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 265, -1, -1, -1, - 269, 270, -1, -1, -1, -1, -1, 276, 277, 278, - 279, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, -1, -1, -1, -1, - -1, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, -1, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, -1, - -1, 246, 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 265, -1, -1, 268, -1, -1, -1, -1, -1, -1, - -1, 276, 277, 278, 279, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - -1, -1, -1, -1, -1, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - -1, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, -1, -1, 246, 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 265, -1, -1, -1, 269, -1, - -1, -1, -1, -1, -1, 276, 277, 278, 279, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, -1, -1, -1, -1, -1, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, -1, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, -1, -1, 246, - 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 265, -1, - -1, 268, -1, -1, -1, -1, -1, -1, -1, 276, - 277, 278, 279, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 446, 447, -1, 449, + -1, -1, 446, 447, -1, 449, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, - -1, -1, -1, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, -1, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, -1, -1, 246, 247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 265, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 275, 276, 277, 278, 279, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, + 480, -1, -1, -1, -1, -1, 480, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 498, -1, + -1, -1, -1, -1, 498, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 543, -1, -1, -1, -1, -1, 543, + -1, -1, 552, -1, -1, -1, -1, -1, 552, -1, + -1, -1, -1, -1, 564, -1, -1, -1, -1, -1, + 564, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 589, + -1, -1, -1, -1, -1, 589, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 623, -1, -1, -1, -1, 628, 623, + -1, -1, 632, -1, 628, -1, -1, -1, 632, -1, + -1, -1, -1, -1, -1, -1, 646, -1, -1, -1, + -1, 651, 646, -1, -1, -1, -1, 651, -1, -1, + -1, -1, -1, -1, -1, -1, 666, -1, -1, -1, + 670, -1, 666, -1, -1, -1, 670, -1, 678, -1, + -1, -1, 682, -1, 678, -1, -1, -1, 682, -1, + -1, -1, 692, -1, -1, -1, 0, -1, 692, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, -1, -1, + 324, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 368, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 387, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 63, 64, 65, 66, 67, 68, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, @@ -2434,18 +2364,69 @@ static const yytype_int16 yycheck[] = 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, -1, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, -1, -1, 246, 247, -1, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, -1, -1, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 358, + -1, 360, -1, 362, 363, -1, -1, -1, -1, 368, + 369, 370, 371, 372, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, 386, 387, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, -1, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, -1, -1, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 265, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 276, 277, 278, - 279, -1, -1, -1, -1, -1, -1, -1, -1, 28, + -1, -1, -1, -1, 358, -1, 360, -1, 362, 363, + -1, -1, -1, -1, 368, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 387, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 63, 64, 65, 66, 67, 68, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, @@ -2460,18 +2441,146 @@ static const yytype_int16 yycheck[] = 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, -1, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, -1, -1, 246, 247, -1, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, -1, -1, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 358, + -1, 360, -1, 362, -1, -1, -1, -1, -1, 368, + 369, 370, 371, 372, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, 386, 387, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, -1, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, -1, -1, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 265, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 276, 277, 278, - 279, -1, -1, -1, -1, -1, -1, -1, -1, 28, + -1, -1, -1, -1, 358, -1, 360, -1, 362, -1, + -1, -1, -1, -1, 368, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 387, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, -1, -1, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 358, + -1, 360, -1, -1, -1, -1, -1, -1, -1, 368, + 369, 370, 371, 372, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, 386, 387, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, -1, -1, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 63, 64, 65, 66, 67, 68, + -1, -1, -1, -1, 358, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 368, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 387, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, -1, -1, -1, -1, -1, 86, 87, 88, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, @@ -2486,4678 +2595,6308 @@ static const yytype_int16 yycheck[] = 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, -1, -1, 233 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 233, 275, - 289, 290, 291, 292, 293, 294, 329, 330, 333, 334, - 335, 336, 340, 341, 342, 343, 344, 345, 348, 349, - 350, 351, 353, 355, 356, 357, 394, 395, 396, 265, - 265, 232, 269, 356, 232, 275, 275, 397, 266, 272, - 337, 338, 339, 349, 353, 272, 275, 232, 232, 275, - 350, 353, 267, 354, 0, 395, 232, 352, 57, 232, - 346, 347, 269, 359, 353, 275, 354, 269, 376, 338, - 337, 339, 232, 232, 265, 274, 354, 269, 272, 275, - 332, 232, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 246, 247, 265, 268, 276, 277, 278, 279, - 299, 300, 301, 303, 304, 305, 306, 307, 308, 309, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, -1, -1, 324, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 368, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 382, 383, 384, 385, 386, 387, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, -1, -1, 339, 340, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 358, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 369, 370, 371, 372, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 353, 267, 266, 272, 274, 266, - 272, 358, 349, 353, 360, 361, 275, 275, 16, 17, - 18, 20, 21, 22, 23, 24, 25, 26, 231, 269, - 270, 275, 310, 323, 325, 327, 329, 333, 353, 366, - 367, 368, 369, 377, 378, 379, 382, 385, 386, 393, - 354, 274, 354, 269, 325, 364, 274, 331, 232, 272, - 275, 310, 310, 327, 246, 247, 267, 271, 266, 266, - 272, 230, 325, 265, 310, 280, 281, 282, 277, 279, - 244, 245, 248, 249, 283, 284, 250, 251, 287, 286, - 285, 252, 254, 253, 288, 268, 268, 323, 232, 323, - 328, 347, 360, 353, 232, 362, 363, 270, 361, 275, - 275, 388, 265, 265, 275, 275, 327, 265, 327, 273, - 265, 270, 370, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 274, 326, 272, 275, 270, 367, 364, - 274, 364, 365, 364, 360, 232, 266, 302, 327, 232, - 325, 310, 310, 310, 312, 312, 313, 313, 314, 314, - 314, 314, 315, 315, 316, 317, 318, 319, 320, 321, - 324, 268, 270, 362, 354, 272, 275, 367, 389, 327, - 275, 327, 273, 387, 377, 325, 325, 364, 270, 272, - 270, 268, 327, 275, 363, 231, 366, 378, 390, 266, - 266, 327, 342, 349, 381, 371, 270, 364, 273, 265, - 381, 391, 392, 373, 374, 375, 380, 383, 232, 266, - 270, 325, 327, 275, 266, 19, 369, 368, 269, 274, - 368, 372, 376, 266, 327, 372, 373, 377, 384, 364, - 275, 270 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = + 320, 321, -1, 323, 324, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 368, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 382, 383, 384, 385, 386, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, -1, -1, 324, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 363, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 382, 383, 384, 385, + 386, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + -1, -1, 324, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 363, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 382, 383, 384, 385, 386, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, -1, -1, 324, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 363, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 382, 383, 384, 385, 386, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, -1, -1, + 324, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 5, 6, 7, 8, 9, -1, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, -1, -1, -1, -1, -1, -1, -1, 382, 383, + 384, 385, 386, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 82, -1, -1, -1, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, -1, -1, -1, -1, -1, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, -1, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, -1, -1, 339, 340, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 358, -1, -1, + -1, 362, 363, -1, -1, -1, -1, -1, 369, 370, + 371, 372, 5, 6, 7, 8, 9, -1, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, + -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, -1, + -1, -1, -1, -1, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, -1, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, -1, -1, 339, 340, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 358, -1, -1, 361, -1, + -1, -1, -1, -1, -1, -1, 369, 370, 371, 372, + 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 82, -1, -1, + -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, -1, -1, -1, + -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, -1, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, -1, -1, 339, 340, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 358, -1, -1, -1, 362, -1, -1, + -1, -1, -1, -1, 369, 370, 371, 372, 5, 6, + 7, 8, 9, -1, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, -1, -1, -1, -1, -1, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, -1, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, + -1, -1, 339, 340, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 358, -1, -1, 361, -1, -1, -1, -1, -1, + -1, -1, 369, 370, 371, 372, 5, 6, 7, 8, + 9, -1, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 82, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, -1, -1, -1, -1, -1, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, -1, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, -1, -1, + 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 358, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 368, + 369, 370, 371, 372, 5, 6, 7, 8, 9, -1, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 82, -1, -1, -1, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, -1, -1, -1, -1, -1, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, -1, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, -1, -1, 339, 340, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 358, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, + 371, 372, 5, 6, 7, 8, 9, -1, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, + -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, -1, + -1, -1, -1, -1, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, -1, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, -1, -1, 339, 340, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 358, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 369, 370, 371, 372, + 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, -1, -1, -1, + -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, -1, -1, 324 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 324, + 368, 382, 383, 384, 385, 386, 387, 422, 423, 426, + 427, 428, 429, 433, 434, 435, 436, 437, 438, 441, + 442, 443, 444, 445, 447, 449, 450, 451, 491, 492, + 493, 358, 358, 323, 362, 450, 323, 368, 368, 494, + 359, 365, 430, 431, 432, 442, 447, 365, 368, 323, + 323, 368, 443, 447, 360, 448, 0, 492, 323, 446, + 81, 323, 439, 440, 362, 453, 447, 368, 448, 362, + 470, 431, 430, 432, 323, 323, 358, 367, 448, 362, + 365, 368, 425, 323, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 339, 340, 358, 361, + 369, 370, 371, 372, 392, 393, 394, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, 413, 414, 415, 416, 445, 447, + 360, 359, 365, 367, 359, 365, 452, 442, 447, 454, + 455, 368, 368, 22, 23, 24, 26, 27, 28, 29, + 30, 31, 32, 322, 360, 362, 363, 368, 403, 416, + 418, 420, 422, 426, 445, 447, 460, 461, 462, 463, + 471, 472, 473, 474, 477, 478, 481, 482, 483, 490, + 495, 448, 367, 448, 362, 418, 458, 367, 424, 323, + 365, 368, 403, 403, 420, 339, 340, 360, 364, 359, + 359, 365, 321, 418, 358, 403, 373, 374, 375, 370, + 372, 337, 338, 341, 342, 376, 377, 343, 344, 380, + 379, 378, 345, 347, 346, 381, 361, 361, 416, 323, + 416, 421, 440, 454, 447, 323, 456, 457, 363, 455, + 368, 368, 485, 358, 358, 368, 368, 420, 358, 420, + 366, 358, 360, 363, 464, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 357, 367, 419, 365, 368, 363, + 461, 474, 478, 483, 458, 367, 458, 459, 458, 454, + 323, 359, 395, 420, 323, 418, 403, 403, 403, 405, + 405, 406, 406, 407, 407, 407, 407, 408, 408, 409, + 410, 411, 412, 413, 414, 417, 361, 363, 456, 448, + 365, 368, 461, 486, 420, 368, 420, 366, 484, 323, + 496, 497, 471, 418, 418, 458, 363, 365, 363, 361, + 420, 368, 457, 322, 460, 472, 487, 359, 359, 420, + 435, 442, 476, 358, 361, 365, 465, 363, 458, 366, + 358, 476, 488, 489, 467, 468, 469, 475, 479, 323, + 359, 421, 361, 497, 363, 418, 420, 368, 359, 25, + 463, 462, 362, 367, 462, 466, 470, 359, 359, 420, + 466, 467, 471, 480, 458, 368, 363 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 391, 392, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 394, 394, 394, + 394, 394, 394, 395, 396, 397, 398, 398, 399, 399, + 400, 400, 401, 402, 402, 402, 403, 403, 403, 403, + 404, 404, 404, 404, 405, 405, 405, 405, 406, 406, + 406, 407, 407, 407, 408, 408, 408, 408, 408, 409, + 409, 409, 410, 410, 411, 411, 412, 412, 413, 413, + 414, 414, 415, 415, 416, 417, 416, 418, 418, 419, + 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, + 420, 420, 421, 422, 422, 422, 422, 422, 422, 422, + 422, 422, 424, 423, 425, 425, 426, 427, 427, 428, + 428, 429, 430, 430, 431, 431, 431, 431, 432, 433, + 433, 433, 433, 433, 434, 434, 434, 434, 434, 435, + 435, 436, 437, 437, 437, 437, 438, 439, 439, 440, + 440, 440, 441, 442, 442, 443, 443, 443, 443, 443, + 443, 443, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 445, 446, 446, 447, 447, 448, 448, 448, 448, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 450, 450, 450, 452, 451, + 453, 451, 454, 454, 455, 455, 456, 456, 457, 457, + 458, 458, 458, 459, 459, 460, 461, 461, 462, 462, + 462, 462, 462, 462, 462, 463, 464, 465, 463, 466, + 466, 468, 467, 469, 467, 470, 470, 471, 471, 472, + 472, 473, 473, 474, 475, 475, 476, 476, 477, 477, + 479, 478, 480, 480, 481, 481, 482, 482, 484, 483, + 485, 483, 486, 483, 487, 487, 488, 488, 489, 489, + 490, 490, 490, 490, 490, 491, 491, 492, 492, 492, + 494, 493, 495, 496, 496, 497, 497 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, + 3, 2, 2, 1, 1, 1, 2, 2, 2, 1, + 2, 3, 2, 1, 1, 1, 1, 2, 2, 2, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, + 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, + 1, 3, 1, 3, 1, 0, 6, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 2, 2, 4, 2, 3, 4, 2, + 3, 4, 0, 6, 2, 3, 2, 1, 1, 2, + 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, + 3, 4, 6, 5, 1, 2, 3, 5, 4, 1, + 2, 1, 1, 1, 1, 1, 4, 1, 3, 1, + 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 4, 1, 1, 3, 1, 2, 2, 3, 3, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, + 0, 5, 1, 2, 3, 4, 1, 3, 1, 2, + 1, 3, 4, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, + 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, + 2, 1, 2, 5, 3, 1, 1, 4, 1, 2, + 0, 8, 0, 1, 3, 2, 1, 2, 0, 6, + 0, 8, 0, 7, 1, 1, 1, 0, 2, 3, + 2, 2, 2, 3, 2, 1, 2, 1, 1, 1, + 0, 3, 5, 1, 3, 1, 4 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (pParseContext, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pParseContext); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (pParseContext); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pParseContext); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) { - 0, 298, 299, 300, 300, 300, 300, 300, 300, 300, - 300, 300, 300, 300, 300, 301, 301, 301, 301, 301, - 301, 302, 303, 304, 305, 305, 306, 306, 307, 307, - 308, 309, 309, 310, 310, 310, 310, 311, 311, 311, - 311, 312, 312, 312, 312, 313, 313, 313, 314, 314, - 314, 315, 315, 315, 315, 315, 316, 316, 316, 317, - 317, 318, 318, 319, 319, 320, 320, 321, 321, 322, - 322, 323, 324, 323, 325, 325, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 327, 327, 328, - 329, 329, 329, 329, 329, 329, 329, 329, 329, 331, - 330, 332, 332, 333, 334, 334, 335, 335, 336, 337, - 337, 338, 338, 338, 338, 339, 340, 340, 340, 340, - 340, 341, 341, 341, 341, 341, 342, 342, 343, 344, - 344, 344, 344, 345, 346, 346, 347, 347, 347, 348, - 349, 349, 350, 350, 350, 350, 350, 350, 351, 351, - 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, - 351, 351, 351, 351, 351, 351, 351, 352, 352, 353, - 353, 354, 354, 354, 354, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 356, 356, 356, 358, 357, 359, 357, 360, 360, 361, - 361, 362, 362, 363, 363, 364, 364, 364, 365, 365, - 366, 367, 367, 368, 368, 368, 368, 368, 368, 368, - 369, 370, 371, 369, 372, 372, 374, 373, 375, 373, - 376, 376, 377, 377, 378, 378, 379, 380, 380, 381, - 381, 383, 382, 384, 384, 385, 385, 387, 386, 388, - 386, 389, 386, 390, 390, 391, 391, 392, 392, 393, - 393, 393, 393, 393, 394, 394, 395, 395, 395, 397, - 396 -}; + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) +{ + YYUSE (yyvaluep); + YYUSE (pParseContext); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (glslang::TParseContext* pParseContext) +{ +/* The lookahead symbol. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 4, 1, 3, 2, - 2, 1, 1, 1, 2, 2, 2, 1, 2, 3, - 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, - 1, 1, 3, 3, 3, 1, 3, 3, 1, 3, - 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, - 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 3, 1, 0, 6, 1, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 2, 2, 4, 2, 3, 4, 2, 3, 4, 0, - 6, 2, 3, 2, 1, 1, 2, 3, 3, 2, - 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, - 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, - 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, - 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, - 4, 1, 3, 1, 2, 1, 3, 4, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, - 2, 3, 1, 2, 1, 2, 5, 3, 1, 1, - 4, 0, 8, 0, 1, 3, 2, 0, 6, 0, - 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, - 2, 2, 3, 2, 1, 2, 1, 1, 1, 0, - 3 -}; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + YYSIZE_T yystacksize; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) -#define YYRECOVERING() (!!yyerrstatus) + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (pParseContext, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; -/* Enable debugging if requested. */ -#if YYDEBUG + yysetstate: + *yyssp = yystate; -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } # endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (&yylval, parseContext); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 293 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); + } +#line 4016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 3: +#line 299 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } +#line 4024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, pParseContext); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) + case 4: +#line 302 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 4033 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 5: +#line 306 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 4042 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ + case 6: +#line 310 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 4050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (pParseContext); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} + case 7: +#line 313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 4059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 8: +#line 317 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); + } +#line 4068 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + case 9: +#line 321 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); + } +#line 4077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + case 10: +#line 325 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 4086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext); - YYFPRINTF (yyoutput, ")"); -} + case 11: +#line 329 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 4095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ + case 12: +#line 333 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); + } +#line 4103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) + case 13: +#line 336 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } - YYFPRINTF (stderr, "\n"); -} +#line 4112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) + case 14: +#line 340 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); + } +#line 4121 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 15: +#line 344 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); + } +#line 4129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ + case 16: +#line 347 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); + } +#line 4139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) + case 17: +#line 355 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , pParseContext); - YYFPRINTF (stderr, "\n"); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -} +#line 4147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \ -} while (0) + case 18: +#line 358 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); + } +#line 4155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ + case 19: +#line 361 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } +#line 4163 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 20: +#line 364 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); + } +#line 4171 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif + case 21: +#line 367 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); + } +#line 4181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). + case 22: +#line 372 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); + } +#line 4191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ + case 23: +#line 380 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } +#line 4200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif + case 24: +#line 387 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); + delete (yyvsp[0].interm).function; + } +#line 4209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 25: +#line 394 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[0].interm); + } +#line 4217 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 26: +#line 400 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).loc = (yyvsp[0].lex).loc; + } +#line 4226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 27: +#line 404 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).loc = (yyvsp[0].lex).loc; + } +#line 4235 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -#if YYERROR_VERBOSE + case 28: +#line 411 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[-1].interm); + } +#line 4243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif + case 29: +#line 414 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[0].interm); + } +#line 4251 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; + case 30: +#line 420 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + (yyvsp[-1].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[-1].interm).function; + (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); + } +#line 4263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - while ((*yyd++ = *yys++) != '\0') - continue; + case 31: +#line 427 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + (yyvsp[-2].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[-2].interm).function; + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); + } +#line 4275 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - return yyd - 1; -} -# endif -# endif + case 32: +#line 437 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[-1].interm); + } +#line 4283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') + case 33: +#line 445 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - YYSIZE_T yyn = 0; - char const *yyp = yystr; + // Constructor + (yyval.interm).intermNode = 0; + (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + } +#line 4293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + case 34: +#line 450 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // + // Should be a method or subroutine call, but we haven't recognized the arguments yet. + // + (yyval.interm).function = 0; + (yyval.interm).intermNode = 0; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); + if (method) { + (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); + (yyval.interm).intermNode = method->getObject(); + } else { + TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode(); + if (symbol) { + parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); + TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); + (yyval.interm).function = function; + } else + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); + } - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; + if ((yyval.interm).function == 0) { + // error recover + TString empty(""); + (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull); + } } +#line 4325 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif + case 35: +#line 477 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // Constructor + (yyval.interm).intermNode = 0; + (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + } +#line 4335 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. + case 36: +#line 485 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); + } +#line 4346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULL; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; + case 37: +#line 491 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); + } +#line 4355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) + case 38: +#line 495 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; + parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); + } +#line 4364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } + case 39: +#line 499 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].interm).op != EOpNull) { + char errorOp[2] = {0, 0}; + switch((yyvsp[-1].interm).op) { + case EOpNegative: errorOp[0] = '-'; break; + case EOpLogicalNot: errorOp[0] = '!'; break; + case EOpBitwiseNot: errorOp[0] = '~'; break; + default: break; // some compilers want this + } + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode)); + } else { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } +#line 4385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + case 40: +#line 519 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } +#line 4391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } + case 41: +#line 520 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } +#line 4397 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (*yymsg_alloc < yysize) + case 42: +#line 521 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } +#line 4403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 43: +#line 522 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } +#line 4410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 44: +#line 528 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 45: +#line 529 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 4426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ + case 46: +#line 534 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ + case 47: +#line 539 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) -{ - YYUSE (yyvaluep); - YYUSE (pParseContext); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + case 48: +#line 548 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4453 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} + case 49: +#line 549 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 50: +#line 554 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4473 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 51: +#line 562 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 52: +#line 563 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*----------. -| yyparse. | -`----------*/ + case 53: +#line 569 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -int -yyparse (glslang::TParseContext* pParseContext) -{ -/* The lookahead symbol. */ -int yychar; + case 54: +#line 578 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 55: +#line 579 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + case 56: +#line 584 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4527 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Number of syntax errors so far. */ - int yynerrs; + case 57: +#line 589 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + case 58: +#line 594 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + case 59: +#line 602 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + case 60: +#line 603 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); + parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + case 61: +#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); + parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + case 62: +#line 622 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4585 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YYSIZE_T yystacksize; + case 63: +#line 623 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; + case 64: +#line 632 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + case 65: +#line 633 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + case 66: +#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; + case 67: +#line 643 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 4630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; + case 68: +#line 652 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YYDPRINTF ((stderr, "Starting parse\n")); + case 69: +#line 653 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; + case 70: +#line 661 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; + case 71: +#line 662 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yysetstate: - *yyssp = yystate; + case 72: +#line 670 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4668 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (yyss + yystacksize - 1 <= yyssp) + case 73: +#line 671 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 4678 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + case 74: +#line 679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4684 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + case 75: +#line 680 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + ++parseContext.controlFlowNestingLevel; + } +#line 4692 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + case 76: +#line 683 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + --parseContext.controlFlowNestingLevel; + parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } + } +#line 4709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ + case 77: +#line 698 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4715 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; + case 78: +#line 699 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); + parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); + parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); + parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } + } +#line 4732 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + case 79: +#line 714 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpAssign; + } +#line 4741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + case 80: +#line 718 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpMulAssign; } +#line 4750 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + case 81: +#line 722 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpDivAssign; + } +#line 4759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (yystate == YYFINAL) - YYACCEPT; + case 82: +#line 726 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpModAssign; + } +#line 4769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - goto yybackup; + case 83: +#line 731 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpAddAssign; + } +#line 4778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*-----------. -| yybackup. | -`-----------*/ -yybackup: + case 84: +#line 735 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpSubAssign; + } +#line 4787 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + case 85: +#line 739 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; + } +#line 4796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; + case 86: +#line 743 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; + } +#line 4805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Not known => get a lookahead token if don't already have one. */ + case 87: +#line 747 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; + } +#line 4814 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) + case 88: +#line 751 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, parseContext); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; + } +#line 4823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 89: +#line 755 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } +#line 4832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - if (yychar <= YYEOF) + case 90: +#line 762 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } - else +#line 4840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 91: +#line 765 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } } +#line 4853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) + case 92: +#line 776 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; + parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; + case 93: +#line 783 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); + (yyval.interm.intermNode) = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + } +#line 4872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 94: +#line 788 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) + (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; + } +#line 4882 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; + case 95: +#line 793 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); + // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope + parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); + parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); + (yyval.interm.intermNode) = 0; + } +#line 4895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; + case 96: +#line 801 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); + (yyval.interm.intermNode) = 0; + } +#line 4904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. + case 97: +#line 805 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); + (yyval.interm.intermNode) = 0; + } +#line 4913 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + case 98: +#line 809 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); + (yyval.interm.intermNode) = 0; + } +#line 4922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + case 99: +#line 813 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); + (yyval.interm.intermNode) = 0; + } +#line 4932 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - YY_REDUCE_PRINT (yyn); - switch (yyn) + case 100: +#line 818 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - case 2: -#line 253 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); + parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); + (yyval.interm.intermNode) = 0; + } +#line 4942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 101: +#line 823 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); + parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); + (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); + parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); + (yyval.interm.intermNode) = 0; } -#line 3344 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 4953 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 3: -#line 259 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 102: +#line 832 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } +#line 4959 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 103: +#line 832 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + --parseContext.structNestingLevel; + parseContext.blockName = (yyvsp[-4].lex).string; + parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers); + parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier; + (yyval.interm).loc = (yyvsp[-5].interm.type).loc; + (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 3352 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 4973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 4: -#line 262 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 104: +#line 843 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + (yyval.interm.identifierList) = new TIdentifierList; + (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 3360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 4982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 5: -#line 265 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 105: +#line 847 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); + (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 3369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 4991 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 6: -#line 269 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 106: +#line 854 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); + (yyval.interm).function = (yyvsp[-1].interm.function); + (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 3378 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 7: -#line 273 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 107: +#line 861 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); + (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 3387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 8: -#line 277 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 108: +#line 864 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); -#endif + (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 3398 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 9: -#line 283 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 109: +#line 871 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); -#endif + // Add the parameter + (yyval.interm.function) = (yyvsp[-1].interm.function); + if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) + (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); + else + delete (yyvsp[0].interm).param.type; } -#line 3409 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5029 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 10: -#line 289 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 110: +#line 879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); + // + // Only first parameter of one-parameter functions can be void + // The check for named parameters not being void is done in parameter_declarator + // + if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { + // + // This parameter > first is void + // + parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); + delete (yyvsp[0].interm).param.type; + } else { + // Add the parameter + (yyval.interm.function) = (yyvsp[-2].interm.function); + (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); + } } -#line 3417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5051 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 11: -#line 292 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 111: +#line 899 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); + if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { + parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", + GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), ""); + } + if ((yyvsp[-2].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + + // Add the function as a prototype after parsing it (we do not support recursion) + TFunction *function; + TType type((yyvsp[-2].interm.type)); + + // Potentially rename shader entry point function. No-op most of the time. + parseContext.renameShaderFunction((yyvsp[-1].lex).string); + + // Make the function + function = new TFunction((yyvsp[-1].lex).string, type); + (yyval.interm.function) = function; } -#line 3426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 12: -#line 296 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 112: +#line 922 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); -#endif + if ((yyvsp[-1].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); + } + if ((yyvsp[-1].interm.type).basicType == EbtVoid) { + parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), ""); + } + parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string); + + TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).param = param; } -#line 3437 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 13: -#line 302 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 113: +#line 937 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); - } -#line 3445 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; + if ((yyvsp[-2].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + } + TType* type = new TType((yyvsp[-2].interm.type)); + type->transferArraySizes((yyvsp[0].interm).arraySizes); + type->copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); - case 14: -#line 305 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); - if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) - (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); - } -#line 3455 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; + parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, type->getArraySizes()); + parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes); + parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string); - case 15: -#line 313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - } -#line 3463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; + TParameter param = { (yyvsp[-1].lex).string, type }; - case 16: -#line 316 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm).loc = (yyvsp[-1].lex).loc; + (yyval.interm).param = param; } -#line 3471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5119 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 17: -#line 319 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 114: +#line 962 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm) = (yyvsp[0].interm); + if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); + } -#line 3479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5135 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 18: -#line 322 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 115: +#line 973 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); + (yyval.interm) = (yyvsp[0].interm); + + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); + parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 3487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 19: -#line 325 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 116: +#line 983 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm) = (yyvsp[0].interm); + if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 3497 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5162 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 20: -#line 330 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 117: +#line 993 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm) = (yyvsp[0].interm); + + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); + parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } -#line 3507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 21: -#line 338 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 118: +#line 1003 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; + (yyval.interm).param = param; + if ((yyvsp[0].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } -#line 3516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5185 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 22: -#line 345 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 119: +#line 1012 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); - delete (yyvsp[0].interm).function; + (yyval.interm) = (yyvsp[0].interm); } -#line 3525 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5193 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 23: -#line 352 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 120: +#line 1015 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm) = (yyvsp[-2].interm); + parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 3533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5202 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 24: -#line 358 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 121: +#line 1019 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-1].interm); - (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm) = (yyvsp[-3].interm); + parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 3542 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 25: -#line 362 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 122: +#line 1023 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-1].interm); - (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).type = (yyvsp[-5].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 3551 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 26: -#line 369 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 123: +#line 1028 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).type = (yyvsp[-4].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 3559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 27: -#line 372 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 124: +#line 1036 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); + (yyval.interm).type = (yyvsp[0].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } -#line 3567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 28: -#line 378 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 125: +#line 1041 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-1].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[-1].interm).function; - (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); + (yyval.interm).type = (yyvsp[-1].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } -#line 3579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5251 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 29: -#line 385 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 126: +#line 1046 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); - (yyvsp[-2].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[-2].interm).function; - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); + (yyval.interm).type = (yyvsp[-2].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } -#line 3591 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5261 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 30: -#line 395 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 127: +#line 1051 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).type = (yyvsp[-4].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 3599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5271 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 31: -#line 403 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 128: +#line 1056 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // Constructor - (yyval.interm).intermNode = 0; - (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + (yyval.interm).type = (yyvsp[-3].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 3609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 32: -#line 408 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 129: +#line 1065 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // - // Should be a method or subroutine call, but we haven't recognized the arguments yet. - // - (yyval.interm).function = 0; - (yyval.interm).intermNode = 0; + (yyval.interm.type) = (yyvsp[0].interm.type); - TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); - if (method) { - (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); - (yyval.interm).intermNode = method->getObject(); - } else { - TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode(); - if (symbol) { - parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); - TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); - (yyval.interm).function = function; - } else - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); + parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); + if ((yyvsp[0].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - if ((yyval.interm).function == 0) { - // error recover - TString empty(""); - (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull); - } + parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); } -#line 3641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5297 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 33: -#line 438 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 130: +#line 1076 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); - } -#line 3652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); - case 34: -#line 444 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { - parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); + if ((yyvsp[0].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + } + + if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) + (yyvsp[0].interm.type).arraySizes = nullptr; + + parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); + + (yyval.interm.type) = (yyvsp[0].interm.type); + + if (! (yyval.interm.type).qualifier.isInterpolation() && + ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || + (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) + (yyval.interm.type).qualifier.smooth = true; } -#line 3661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 35: -#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 131: +#line 1103 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); + parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); + parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.invariant = true; } -#line 3670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 36: -#line 452 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 132: +#line 1112 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[-1].interm).op != EOpNull) { - char errorOp[2] = {0, 0}; - switch((yyvsp[-1].interm).op) { - case EOpNegative: errorOp[0] = '-'; break; - case EOpLogicalNot: errorOp[0] = '!'; break; - case EOpBitwiseNot: errorOp[0] = '~'; break; - default: break; // some compilers want this - } - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode)); - } else { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) - (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); - } + parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.smooth = true; } -#line 3691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 37: -#line 472 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 3697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 38: -#line 473 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 3703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 39: -#line 474 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 3709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5349 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 40: -#line 475 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 3716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 133: +#line 1119 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.flat = true; + } +#line 5361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 41: -#line 481 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 134: +#line 1126 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); +#ifdef NV_EXTENSIONS + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); +#else + parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective"); +#endif + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.nopersp = true; + } +#line 5377 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 42: -#line 482 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 135: +#line 1137 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); +#ifdef AMD_EXTENSIONS + parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.explicitInterp = true; +#endif } -#line 3732 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 43: -#line 487 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 136: +#line 1149 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 3742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 44: -#line 492 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 137: +#line 1155 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3753 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 45: -#line 501 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3759 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 138: +#line 1158 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type) = (yyvsp[-2].interm.type); + (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); + parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + } +#line 5417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 46: -#line 502 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 139: +#line 1165 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } -#line 3769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 47: -#line 507 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 140: +#line 1169 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.type).init((yyvsp[-2].lex).loc); + parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); } -#line 3779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5435 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 48: -#line 515 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3785 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 141: +#line 1173 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { // because "shared" is both an identifier and a keyword + (yyval.interm.type).init((yyvsp[0].lex).loc); + TString strShared("shared"); + parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); + } +#line 5445 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 49: -#line 516 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 142: +#line 1181 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.noContraction = true; } -#line 3796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 50: -#line 522 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 143: +#line 1190 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3807 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5464 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 51: -#line 531 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 144: +#line 1193 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type) = (yyvsp[-1].interm.type); + if ((yyval.interm.type).basicType == EbtVoid) + (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType; + + (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + } +#line 5477 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 52: -#line 532 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 145: +#line 1204 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5485 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 53: -#line 537 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 146: +#line 1207 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5493 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 54: -#line 542 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 147: +#line 1210 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3843 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5502 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 55: -#line 547 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 148: +#line 1214 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 56: -#line 555 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3859 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 149: +#line 1218 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); + } +#line 5520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 57: -#line 556 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 150: +#line 1222 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); - parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 58: -#line 564 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 151: +#line 1226 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); - parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 3885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 59: -#line 575 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 152: +#line 1232 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + } +#line 5546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 60: -#line 576 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 153: +#line 1236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute"); + + parseContext.globalCheck((yyvsp[0].lex).loc, "attribute"); + + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 3902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 61: -#line 585 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 154: +#line 1248 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying"); + + parseContext.globalCheck((yyvsp[0].lex).loc, "varying"); + + (yyval.interm.type).init((yyvsp[0].lex).loc); + if (parseContext.language == EShLangVertex) + (yyval.interm.type).qualifier.storage = EvqVaryingOut; + else + (yyval.interm.type).qualifier.storage = EvqVaryingIn; + } +#line 5582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 62: -#line 586 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 155: +#line 1262 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqInOut; } -#line 3919 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 63: -#line 595 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 156: +#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalCheck((yyvsp[0].lex).loc, "in"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqIn; + } +#line 5603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 64: -#line 596 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 157: +#line 1273 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + parseContext.globalCheck((yyvsp[0].lex).loc, "out"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqOut; } -#line 3936 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 65: -#line 605 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 158: +#line 1279 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); + parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.centroid = true; + } +#line 5626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 159: +#line 1286 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.patch = true; + } +#line 5637 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 66: -#line 606 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 160: +#line 1292 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.sample = true; } -#line 3952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 67: -#line 614 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3958 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5647 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 68: -#line 615 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 161: +#line 1297 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 3968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5657 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 69: -#line 623 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 162: +#line 1302 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqBuffer; + } +#line 5667 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 70: -#line 624 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 163: +#line 1307 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqShared; } -#line 3984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 71: -#line 632 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 3990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 164: +#line 1315 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.coherent = true; + } +#line 5689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 72: -#line 633 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 165: +#line 1319 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - ++parseContext.controlFlowNestingLevel; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.volatil = true; } -#line 3998 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 73: -#line 636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 166: +#line 1323 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - --parseContext.controlFlowNestingLevel; - parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - } + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.restrict = true; } -#line 4015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 74: -#line 651 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 4021 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + case 167: +#line 1327 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.readonly = true; + } +#line 5716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 75: -#line 652 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 168: +#line 1331 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); - parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); - parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); - parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); - } + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.writeonly = true; } -#line 4038 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 76: -#line 667 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 169: +#line 1335 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpAssign; + parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); + parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[0].lex).loc); } -#line 4047 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 77: -#line 671 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 170: +#line 1341 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpMulAssign; + parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); + parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[-3].lex).loc); } -#line 4056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 78: -#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 171: +#line 1350 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpDivAssign; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.nonUniform = true; } -#line 4065 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 79: -#line 679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 172: +#line 1357 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpModAssign; + // TODO } -#line 4075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 80: -#line 684 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 173: +#line 1360 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpAddAssign; + // TODO: 4.0 semantics: subroutines + // 1) make sure each identifier is a type declared earlier with SUBROUTINE + // 2) save all of the identifiers for future comparison with the declared function } -#line 4084 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 81: -#line 688 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 174: +#line 1368 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).op = EOpSubAssign; + (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); } -#line 4093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 82: -#line 692 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 175: +#line 1372 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; + parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); + (yyval.interm.type) = (yyvsp[-1].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); + (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; } -#line 4102 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5794 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 83: -#line 696 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 176: +#line 1381 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; + (yyval.interm).loc = (yyvsp[-1].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; + (yyval.interm).arraySizes->addInnerSize(); } -#line 4111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5804 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 84: -#line 700 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 177: +#line 1386 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; + (yyval.interm).loc = (yyvsp[-2].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; + + TArraySize size; + parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); + (yyval.interm).arraySizes->addInnerSize(size); } -#line 4120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5817 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 85: -#line 704 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 178: +#line 1394 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; + (yyval.interm) = (yyvsp[-2].interm); + (yyval.interm).arraySizes->addInnerSize(); } -#line 4129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 86: -#line 708 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 179: +#line 1398 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); - (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; + (yyval.interm) = (yyvsp[-3].interm); + + TArraySize size; + parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); + (yyval.interm).arraySizes->addInnerSize(size); } -#line 4138 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5838 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 87: -#line 715 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 180: +#line 1408 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtVoid; } -#line 4146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5847 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 88: -#line 718 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 181: +#line 1412 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); - } + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; } -#line 4159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5856 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 89: -#line 729 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 182: +#line 1416 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); - (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; } -#line 4168 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5866 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 90: -#line 736 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 183: +#line 1421 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); - (yyval.interm.intermNode) = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + parseContext.float16Check((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; } -#line 4178 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5876 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 91: -#line 741 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 184: +#line 1426 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) - (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; } -#line 4188 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 92: -#line 746 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 185: +#line 1431 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); - - // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); - (yyval.interm.intermNode) = 0; + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; } -#line 4201 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 93: -#line 754 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 186: +#line 1436 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); - (yyval.interm.intermNode) = 0; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; } -#line 4210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 94: -#line 758 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 187: +#line 1440 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); - (yyval.interm.intermNode) = 0; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; } -#line 4219 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 95: -#line 762 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 188: +#line 1445 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); - (yyval.interm.intermNode) = 0; + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt8; } -#line 4228 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5925 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 96: -#line 766 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 189: +#line 1450 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); - parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); - (yyval.interm.intermNode) = 0; + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint8; } -#line 4238 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 97: -#line 771 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 190: +#line 1455 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); - parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); - (yyval.interm.intermNode) = 0; + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; } -#line 4248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5945 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 98: -#line 776 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 191: +#line 1460 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); - (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); - parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); - (yyval.interm.intermNode) = 0; + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; } -#line 4259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 99: -#line 785 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 4265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ - break; - - case 100: -#line 785 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 192: +#line 1465 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - --parseContext.structNestingLevel; - parseContext.blockName = (yyvsp[-4].lex).string; - parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier); - parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers); - parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier; - (yyval.interm).loc = (yyvsp[-5].interm.type).loc; - (yyval.interm).typeList = (yyvsp[-1].interm.typeList); + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; } -#line 4279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5965 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 101: -#line 796 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 193: +#line 1470 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.identifierList) = new TIdentifierList; - (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; } -#line 4288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5975 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 102: -#line 800 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 194: +#line 1475 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); - (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; } -#line 4297 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5985 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 103: -#line 807 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 195: +#line 1480 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).function = (yyvsp[-1].interm.function); - (yyval.interm).loc = (yyvsp[0].lex).loc; + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; } -#line 4306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 5995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 104: -#line 814 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 196: +#line 1485 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.function) = (yyvsp[0].interm.function); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; } -#line 4314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 105: -#line 817 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 197: +#line 1489 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.function) = (yyvsp[0].interm.function); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(2); } -#line 4322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6014 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 106: -#line 824 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 198: +#line 1494 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // Add the parameter - (yyval.interm.function) = (yyvsp[-1].interm.function); - if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) - (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); - else - delete (yyvsp[0].interm).param.type; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(3); } -#line 4335 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 107: -#line 832 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 199: +#line 1499 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); - delete (yyvsp[0].interm).param.type; - } else { - // Add the parameter - (yyval.interm.function) = (yyvsp[-2].interm.function); - (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); - } + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); } -#line 4357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 108: -#line 852 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 200: +#line 1504 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { - parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", - GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), ""); - } - if ((yyvsp[-2].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type((yyvsp[-2].interm.type)); - - // Potentially rename shader entry point function. No-op most of the time. - parseContext.renameShaderFunction((yyvsp[-1].lex).string); - - // Make the function - function = new TFunction((yyvsp[-1].lex).string, type); - (yyval.interm.function) = function; + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(2); } -#line 4381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 109: -#line 875 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 201: +#line 1510 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[-1].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); - } - if ((yyvsp[-1].interm.type).basicType == EbtVoid) { - parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), ""); - } - parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string); - - TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; - (yyval.interm).loc = (yyvsp[0].lex).loc; - (yyval.interm).param = param; + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(3); } -#line 4401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 110: -#line 890 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 202: +#line 1516 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[-2].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); - } - parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.type).arraySizes, (yyvsp[0].interm).arraySizes); - - parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes); - parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string); - - (yyvsp[-2].interm.type).arraySizes = (yyvsp[0].interm).arraySizes; - - TParameter param = { (yyvsp[-1].lex).string, new TType((yyvsp[-2].interm.type))}; - (yyval.interm).loc = (yyvsp[-1].lex).loc; - (yyval.interm).param = param; + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(4); } -#line 4423 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 111: -#line 913 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 203: +#line 1522 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); - if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); - - parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); - + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(2); } -#line 4439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6078 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 112: -#line 924 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 204: +#line 1528 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); - - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); - parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(3); } -#line 4451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6089 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 113: -#line 934 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 205: +#line 1534 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); - if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); - - parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(4); } -#line 4466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 114: -#line 944 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 206: +#line 1540 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); - - parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); - parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(2); } -#line 4478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 115: -#line 954 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 207: +#line 1546 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; - (yyval.interm).param = param; - if ((yyvsp[0].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(3); } -#line 4489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 116: -#line 963 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 208: +#line 1552 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[0].interm); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); } -#line 4497 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 117: -#line 966 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 209: +#line 1558 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-2].interm); - parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(2); } -#line 4506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6144 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 118: -#line 970 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 210: +#line 1564 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-3].interm); - parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(3); } -#line 4515 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 119: -#line 974 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 211: +#line 1570 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-5].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(4); } -#line 4525 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 120: -#line 979 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 212: +#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-4].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(2); } -#line 4535 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 121: -#line 987 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 213: +#line 1581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[0].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(3); } -#line 4545 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 122: -#line 992 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 214: +#line 1586 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-1].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(4); } -#line 4555 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 123: -#line 997 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 215: +#line 1591 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-2].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(2); } -#line 4565 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 124: -#line 1002 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 216: +#line 1596 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-4].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(3); } -#line 4575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 125: -#line 1007 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 217: +#line 1601 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[-3].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(4); } -#line 4585 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 126: -#line 1016 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 218: +#line 1606 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); - - parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); - if ((yyvsp[0].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - } - - parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt8; + (yyval.interm.type).setVector(2); } -#line 4601 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6237 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 127: -#line 1027 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 219: +#line 1612 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); - parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); - - if ((yyvsp[0].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - } - - if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) - (yyvsp[0].interm.type).arraySizes = 0; - - parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); - (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); - - (yyval.interm.type) = (yyvsp[0].interm.type); - - if (! (yyval.interm.type).qualifier.isInterpolation() && - ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || - (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) - (yyval.interm.type).qualifier.smooth = true; + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt8; + (yyval.interm.type).setVector(3); } -#line 4630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 128: -#line 1054 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 220: +#line 1618 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); - parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.invariant = true; + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt8; + (yyval.interm.type).setVector(4); } -#line 4641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 129: -#line 1063 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 221: +#line 1624 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.smooth = true; + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(2); } -#line 4653 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 130: -#line 1070 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 222: +#line 1630 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.flat = true; + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(3); } -#line 4665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 131: -#line 1077 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 223: +#line 1636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); - parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective"); - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.nopersp = true; + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(4); } -#line 4677 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6292 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 132: -#line 1084 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 224: +#line 1642 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.explicitInterp = true; -#endif + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(2); } -#line 4691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6303 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 133: -#line 1096 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 225: +#line 1648 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[-1].interm.type); + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(3); } -#line 4699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 134: -#line 1102 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 226: +#line 1654 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(4); } -#line 4707 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6325 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 135: -#line 1105 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 227: +#line 1660 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[-2].interm.type); - (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(2); } -#line 4717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 136: -#line 1112 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 228: +#line 1666 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(3); } -#line 4726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6347 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 137: -#line 1116 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 229: +#line 1672 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[-2].lex).loc); - parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(4); } -#line 4735 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6358 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 138: -#line 1120 "MachineIndependent/glslang.y" /* yacc.c:1646 */ - { // because "shared" is both an identifier and a keyword - (yyval.interm.type).init((yyvsp[0].lex).loc); - TString strShared("shared"); - parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); + case 230: +#line 1678 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(2); } -#line 4745 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 139: -#line 1128 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 231: +#line 1684 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.noContraction = true; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(3); } -#line 4756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6380 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 140: -#line 1137 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 232: +#line 1690 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(4); } -#line 4764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 141: -#line 1140 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 233: +#line 1696 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[-1].interm.type); - if ((yyval.interm.type).basicType == EbtVoid) - (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType; - - (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint8; + (yyval.interm.type).setVector(2); } -#line 4777 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 142: -#line 1151 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 234: +#line 1702 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt8; + (yyval.interm.type).setVector(3); } -#line 4785 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 143: -#line 1154 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 235: +#line 1708 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt8Check((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint8; + (yyval.interm.type).setVector(4); } -#line 4793 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 144: -#line 1157 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 236: +#line 1714 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(2); } -#line 4802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6435 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 145: -#line 1161 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 237: +#line 1720 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(3); } -#line 4811 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 146: -#line 1165 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 238: +#line 1726 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(4); } -#line 4820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 147: -#line 1169 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 239: +#line 1732 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[0].interm.type); + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(2); } -#line 4829 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6468 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 148: -#line 1176 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 240: +#line 1738 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(3); } -#line 4838 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6479 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 149: -#line 1180 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 241: +#line 1744 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute"); - - parseContext.globalCheck((yyvsp[0].lex).loc, "attribute"); - - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqVaryingIn; + parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(4); } -#line 4855 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 150: -#line 1192 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 242: +#line 1750 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying"); - - parseContext.globalCheck((yyvsp[0].lex).loc, "varying"); - - (yyval.interm.type).init((yyvsp[0].lex).loc); - if (parseContext.language == EShLangVertex) - (yyval.interm.type).qualifier.storage = EvqVaryingOut; - else - (yyval.interm.type).qualifier.storage = EvqVaryingIn; + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(2); } -#line 4874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6501 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 151: -#line 1206 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 243: +#line 1756 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqInOut; + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(3); } -#line 4884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6512 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 152: -#line 1211 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 244: +#line 1762 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "in"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later - (yyval.interm.type).qualifier.storage = EvqIn; + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(4); } -#line 4895 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 153: -#line 1217 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 245: +#line 1768 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "out"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later - (yyval.interm.type).qualifier.storage = EvqOut; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); } -#line 4906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 154: -#line 1223 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 246: +#line 1773 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.centroid = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); } -#line 4918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6543 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 155: -#line 1230 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 247: +#line 1778 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); - parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.patch = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } -#line 4929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 156: -#line 1236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 248: +#line 1783 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.sample = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); } -#line 4939 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6563 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 157: -#line 1241 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 249: +#line 1788 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqUniform; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 3); } -#line 4949 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6573 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 158: -#line 1246 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 250: +#line 1793 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqBuffer; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 4); } -#line 4959 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6583 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 159: -#line 1251 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 251: +#line 1798 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); - parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared"); - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.storage = EvqShared; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 2); } -#line 4972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6593 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 160: -#line 1259 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 252: +#line 1803 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.coherent = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); } -#line 4981 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 161: -#line 1263 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 253: +#line 1808 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.volatil = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 4); } -#line 4990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 162: -#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 254: +#line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.restrict = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 2); } -#line 4999 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 163: -#line 1271 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 255: +#line 1818 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.readonly = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 3); } -#line 5008 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6633 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 164: -#line 1275 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 256: +#line 1823 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[0].lex).loc); - (yyval.interm.type).qualifier.writeonly = true; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } -#line 5017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6643 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 165: -#line 1279 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 257: +#line 1828 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); - parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); } -#line 5028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6654 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 166: -#line 1285 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 258: +#line 1834 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); - parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[-3].lex).loc); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); } -#line 5039 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6665 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 167: -#line 1294 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 259: +#line 1840 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // TODO + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); } -#line 5047 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 168: -#line 1297 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 260: +#line 1846 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // TODO: 4.0 semantics: subroutines - // 1) make sure each identifier is a type declared earlier with SUBROUTINE - // 2) save all of the identifiers for future comparison with the declared function + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); } -#line 5057 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6687 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 169: -#line 1305 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 261: +#line 1852 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[0].interm.type); - (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 3); } -#line 5066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6698 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 170: -#line 1309 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 262: +#line 1858 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayDimCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes, 0); - (yyval.interm.type) = (yyvsp[-1].interm.type); - (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); - (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 4); } -#line 5077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 171: -#line 1318 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 263: +#line 1864 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[-1].lex).loc; - (yyval.interm).arraySizes = new TArraySizes; - (yyval.interm).arraySizes->addInnerSize(); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 2); } -#line 5087 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 172: -#line 1323 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 264: +#line 1870 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[-2].lex).loc; - (yyval.interm).arraySizes = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); - (yyval.interm).arraySizes->addInnerSize(size); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); } -#line 5100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 173: -#line 1331 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 265: +#line 1876 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-2].interm); - (yyval.interm).arraySizes->addInnerSize(); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 4); } -#line 5109 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 174: -#line 1335 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 266: +#line 1882 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[-3].interm); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 2); + } +#line 6753 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - TArraySize size; - parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); - (yyval.interm).arraySizes->addInnerSize(size); + case 267: +#line 1888 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 3); } -#line 5121 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6764 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 175: -#line 1345 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 268: +#line 1894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtVoid; + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); } -#line 5130 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6775 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 176: -#line 1349 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 269: +#line 1900 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(2, 2); } -#line 5139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6786 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 177: -#line 1353 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 270: +#line 1906 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(3, 3); } -#line 5149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 178: -#line 1358 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 271: +#line 1912 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; -#endif + (yyval.interm.type).setMatrix(4, 4); } -#line 5161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6808 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 179: -#line 1365 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 272: +#line 1918 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(2, 2); } -#line 5170 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 180: -#line 1369 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 273: +#line 1924 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(2, 3); } -#line 5180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6830 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 181: -#line 1374 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 274: +#line 1930 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(2, 4); } -#line 5190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6841 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 182: -#line 1379 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 275: +#line 1936 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(3, 2); } -#line 5200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6852 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 183: -#line 1384 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 276: +#line 1942 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt16; -#endif + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(3, 3); } -#line 5212 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6863 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 184: -#line 1391 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 277: +#line 1948 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint16; -#endif + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(3, 4); } -#line 5224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6874 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 185: -#line 1398 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 278: +#line 1954 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(4, 2); } -#line 5233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6885 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 186: -#line 1402 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 279: +#line 1960 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(4, 3); } -#line 5243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 187: -#line 1407 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 280: +#line 1966 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setMatrix(4, 4); } -#line 5253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6907 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 188: -#line 1412 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 281: +#line 1972 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(4); + (yyval.interm.type).setMatrix(2, 2); } -#line 5263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6918 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 189: -#line 1417 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 282: +#line 1978 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); } -#line 5274 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6929 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 190: -#line 1423 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 283: +#line 1984 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } -#line 5285 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 191: -#line 1429 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 284: +#line 1990 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); } -#line 5296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6951 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 192: -#line 1435 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 285: +#line 1996 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(2); -#endif + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 3); } -#line 5309 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 193: -#line 1443 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 286: +#line 2002 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(3); -#endif + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 4); } -#line 5322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 194: -#line 1451 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 287: +#line 2008 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(4); -#endif + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 2); } -#line 5335 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 195: -#line 1459 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 288: +#line 2014 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); } -#line 5345 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 6995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 196: -#line 1464 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 289: +#line 2020 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 4); } -#line 5355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 197: -#line 1469 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 290: +#line 2026 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 2); } -#line 5365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7017 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 198: -#line 1474 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 291: +#line 2032 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 3); } -#line 5375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 199: -#line 1479 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 292: +#line 2038 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } -#line 5385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7039 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 200: -#line 1484 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 293: +#line 2044 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); } -#line 5395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 201: -#line 1489 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 294: +#line 2050 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); } -#line 5406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 202: -#line 1495 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 295: +#line 2056 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); } -#line 5417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 203: -#line 1501 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 296: +#line 2062 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); } -#line 5428 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7083 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 204: -#line 1507 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 297: +#line 2068 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt16; - (yyval.interm.type).setVector(2); -#endif + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 3); } -#line 5441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7094 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 205: -#line 1515 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 298: +#line 2074 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt16; - (yyval.interm.type).setVector(3); -#endif + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 4); } -#line 5454 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7105 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 206: -#line 1523 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 299: +#line 2080 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt16; - (yyval.interm.type).setVector(4); -#endif + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 2); } -#line 5467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 207: -#line 1531 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 300: +#line 2086 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); } -#line 5478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7127 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 208: -#line 1537 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 301: +#line 2092 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 4); } -#line 5489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7138 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 209: -#line 1543 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 302: +#line 2098 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 2); } -#line 5500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 210: -#line 1549 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 303: +#line 2104 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(2); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 3); } -#line 5511 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7160 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 211: -#line 1555 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 304: +#line 2110 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(3); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); } -#line 5522 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7171 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 212: -#line 1561 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 305: +#line 2116 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(4); + (yyval.interm.type).basicType = EbtAtomicUint; } -#line 5533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 213: -#line 1567 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 306: +#line 2121 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint16; - (yyval.interm.type).setVector(2); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } -#line 5546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 214: -#line 1575 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 307: +#line 2126 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint16; - (yyval.interm.type).setVector(3); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } -#line 5559 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7201 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 215: -#line 1583 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 308: +#line 2131 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint16; - (yyval.interm.type).setVector(4); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } -#line 5572 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 216: -#line 1591 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 309: +#line 2136 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } -#line 5582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 217: -#line 1596 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 310: +#line 2141 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } -#line 5592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 218: -#line 1601 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 311: +#line 2146 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } -#line 5602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7241 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 219: -#line 1606 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 312: +#line 2151 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } -#line 5612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7251 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 220: -#line 1611 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 313: +#line 2156 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } -#line 5622 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7261 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 221: -#line 1616 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 314: +#line 2161 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } -#line 5632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7271 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 222: -#line 1621 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 315: +#line 2166 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } -#line 5642 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7281 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 223: -#line 1626 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 316: +#line 2171 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } -#line 5652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 224: -#line 1631 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 317: +#line 2176 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } -#line 5662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7301 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 225: -#line 1636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 318: +#line 2181 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } -#line 5672 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 226: -#line 1641 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 319: +#line 2186 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd1D); +#endif } -#line 5682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 227: -#line 1646 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 320: +#line 2194 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D); +#endif } -#line 5692 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 228: -#line 1651 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 321: +#line 2202 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd3D); +#endif } -#line 5703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7350 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 229: -#line 1657 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 322: +#line 2210 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, EsdCube); +#endif } -#line 5714 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7363 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 230: -#line 1663 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 323: +#line 2218 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true); +#endif } -#line 5725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 231: -#line 1669 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 324: +#line 2226 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true); +#endif } -#line 5736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 232: -#line 1675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 325: +#line 2234 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true); +#endif } -#line 5747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 233: -#line 1681 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 326: +#line 2242 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true); +#endif } -#line 5758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7415 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 234: -#line 1687 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 327: +#line 2250 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true); +#endif } -#line 5769 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7428 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 235: -#line 1693 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 328: +#line 2258 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true); +#endif } -#line 5780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 236: -#line 1699 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 329: +#line 2266 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true); +#endif } -#line 5791 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7454 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 237: -#line 1705 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 330: +#line 2274 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 2); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true); +#endif } -#line 5802 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 238: -#line 1711 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 331: +#line 2282 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 3); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true); +#endif } -#line 5813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 239: -#line 1717 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 332: +#line 2290 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd1D); } -#line 5824 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 240: -#line 1723 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 333: +#line 2295 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(2, 2); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D); } -#line 5837 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 241: -#line 1731 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 334: +#line 2300 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(3, 3); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd3D); } -#line 5850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7510 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 242: -#line 1739 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 335: +#line 2305 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(4, 4); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdCube); } -#line 5863 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 243: -#line 1747 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 336: +#line 2310 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(2, 2); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } -#line 5876 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7530 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 244: -#line 1755 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 337: +#line 2315 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(2, 3); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } -#line 5889 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 245: -#line 1763 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 338: +#line 2320 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(2, 4); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } -#line 5902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 246: -#line 1771 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 339: +#line 2325 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(3, 2); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd1D); } -#line 5915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7560 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 247: -#line 1779 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 340: +#line 2330 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(3, 3); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D); } -#line 5928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 248: -#line 1787 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 341: +#line 2335 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(3, 4); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd3D); } -#line 5941 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 249: -#line 1795 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 342: +#line 2340 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(4, 2); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdCube); } -#line 5954 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 250: -#line 1803 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 343: +#line 2345 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(4, 3); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } -#line 5967 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 251: -#line 1811 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 344: +#line 2350 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setMatrix(4, 4); -#endif + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } -#line 5980 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 252: -#line 1819 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 345: +#line 2355 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtAtomicUint; + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } -#line 5990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 253: -#line 1824 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 346: +#line 2360 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D); + (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } -#line 6000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 254: -#line 1829 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 347: +#line 2365 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D); + (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } -#line 6010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 255: -#line 1834 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 348: +#line 2370 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd3D); + (yyval.interm.type).sampler.set(EbtFloat16, EsdRect); +#endif } -#line 6020 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7653 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 256: -#line 1839 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 349: +#line 2378 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube); + (yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true); +#endif } -#line 6030 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7666 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 257: -#line 1844 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 350: +#line 2386 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); + (yyval.interm.type).sampler.set(EbtInt, EsdRect); } -#line 6040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 258: -#line 1849 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 351: +#line 2391 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); + (yyval.interm.type).sampler.set(EbtUint, EsdRect); } -#line 6050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 259: -#line 1854 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 352: +#line 2396 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); + (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } -#line 6060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 260: -#line 1859 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 353: +#line 2401 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); + (yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer); +#endif } -#line 6070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7709 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 261: -#line 1864 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 354: +#line 2409 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); + (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 6080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 262: -#line 1869 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 355: +#line 2414 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); + (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 6090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 263: -#line 1874 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 356: +#line 2419 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } -#line 6100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 264: -#line 1879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 357: +#line 2424 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true); +#endif } -#line 6110 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7752 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 265: -#line 1884 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 358: +#line 2432 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); + (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } -#line 6120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7762 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 266: -#line 1889 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 359: +#line 2437 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd1D); + (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } -#line 6130 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7772 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 267: -#line 1894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 360: +#line 2442 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } -#line 6140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7782 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 268: -#line 1899 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 361: +#line 2447 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd3D); + (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true); +#endif } -#line 6150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 269: -#line 1904 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 362: +#line 2455 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdCube); + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } -#line 6160 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 270: -#line 1909 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 363: +#line 2460 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } -#line 6170 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 271: -#line 1914 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 364: +#line 2465 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.setPureSampler(false); } -#line 6180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7825 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 272: -#line 1919 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 365: +#line 2470 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.setPureSampler(true); } -#line 6190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7835 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 273: -#line 1924 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 366: +#line 2475 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } -#line 6200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7845 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 274: -#line 1929 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 367: +#line 2480 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D); +#endif } -#line 6210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7858 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 275: -#line 1934 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 368: +#line 2488 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } -#line 6220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7868 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 276: -#line 1939 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 369: +#line 2493 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D); +#endif } -#line 6230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7881 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 277: -#line 1944 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 370: +#line 2501 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } -#line 6240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7891 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 278: -#line 1949 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 371: +#line 2506 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D); +#endif } -#line 6250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 279: -#line 1954 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 372: +#line 2514 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } -#line 6260 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 280: -#line 1959 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 373: +#line 2519 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube); +#endif } -#line 6270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7927 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 281: -#line 1964 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 374: +#line 2527 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } -#line 6280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7937 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 282: -#line 1969 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 375: +#line 2532 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true); +#endif } -#line 6290 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 283: -#line 1974 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 376: +#line 2540 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } -#line 6300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 284: -#line 1979 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 377: +#line 2545 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true); +#endif } -#line 6310 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7973 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 285: -#line 1984 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 378: +#line 2553 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } -#line 6320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7983 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 286: -#line 1989 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 379: +#line 2558 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true); +#endif } -#line 6330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 7996 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 287: -#line 1994 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 380: +#line 2566 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } -#line 6340 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 288: -#line 1999 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 381: +#line 2571 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } -#line 6350 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 289: -#line 2004 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 382: +#line 2576 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } -#line 6360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 290: -#line 2009 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 383: +#line 2581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } -#line 6370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 291: -#line 2014 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 384: +#line 2586 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } -#line 6380 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8046 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 292: -#line 2019 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 385: +#line 2591 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } -#line 6390 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 293: -#line 2024 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 386: +#line 2596 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setPureSampler(false); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } -#line 6400 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 294: -#line 2029 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 387: +#line 2601 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setPureSampler(true); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } -#line 6410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8076 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 295: -#line 2034 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 388: +#line 2606 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } -#line 6420 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 296: -#line 2039 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 389: +#line 2611 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } -#line 6430 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8096 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 297: -#line 2044 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 390: +#line 2616 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } -#line 6440 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 298: -#line 2049 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 391: +#line 2621 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } -#line 6450 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 299: -#line 2054 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 392: +#line 2626 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } -#line 6460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8126 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 300: -#line 2059 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 393: +#line 2631 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } -#line 6470 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 301: -#line 2064 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 394: +#line 2636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } -#line 6480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 302: -#line 2069 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 395: +#line 2641 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect); +#endif } -#line 6490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 303: -#line 2074 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 396: +#line 2649 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 6500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8169 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 304: -#line 2079 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 397: +#line 2654 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 6510 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8179 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 305: -#line 2084 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 398: +#line 2659 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } -#line 6520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8189 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 306: -#line 2089 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 399: +#line 2664 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer); +#endif } -#line 6530 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8202 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 307: -#line 2094 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 400: +#line 2672 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 6540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8212 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 308: -#line 2099 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 401: +#line 2677 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 6550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 309: -#line 2104 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 402: +#line 2682 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } -#line 6560 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 310: -#line 2109 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 403: +#line 2687 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true); +#endif } -#line 6570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8245 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 311: -#line 2114 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 404: +#line 2695 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } -#line 6580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 312: -#line 2119 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 405: +#line 2700 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } -#line 6590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 313: -#line 2124 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 406: +#line 2705 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } -#line 6600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8275 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 314: -#line 2129 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 407: +#line 2710 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true); +#endif } -#line 6610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 315: -#line 2134 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 408: +#line 2718 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } -#line 6620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8298 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 316: -#line 2139 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 409: +#line 2723 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } -#line 6630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8308 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 317: -#line 2144 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 410: +#line 2728 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } -#line 6640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8318 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 318: -#line 2149 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 411: +#line 2733 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D); +#endif } -#line 6650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8331 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 319: -#line 2154 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 412: +#line 2741 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 6660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8341 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 320: -#line 2159 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 413: +#line 2746 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 6670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8351 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 321: -#line 2164 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 414: +#line 2751 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } -#line 6680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8361 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 322: -#line 2169 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 415: +#line 2756 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D); +#endif } -#line 6690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8374 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 323: -#line 2174 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 416: +#line 2764 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 6700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8384 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 324: -#line 2179 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 417: +#line 2769 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 6710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8394 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 325: -#line 2184 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 418: +#line 2774 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } -#line 6720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8404 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 326: -#line 2189 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 419: +#line 2779 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D); +#endif } -#line 6730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 327: -#line 2194 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 420: +#line 2787 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 6740 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8427 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 328: -#line 2199 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 421: +#line 2792 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); + (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 6750 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8437 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 329: -#line 2204 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 422: +#line 2797 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } -#line 6760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 330: -#line 2209 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 423: +#line 2802 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); + (yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect); +#endif } -#line 6770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 331: -#line 2214 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 424: +#line 2810 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); + (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 6780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8470 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 332: -#line 2219 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 425: +#line 2815 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); + (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 6790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 333: -#line 2224 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 426: +#line 2820 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } -#line 6800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 334: -#line 2229 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 427: +#line 2825 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); + (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube); +#endif } -#line 6810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8503 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 335: -#line 2234 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 428: +#line 2833 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 6820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 336: -#line 2239 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 429: +#line 2838 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 6830 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 337: -#line 2244 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 430: +#line 2843 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } -#line 6840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 338: -#line 2249 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 431: +#line 2848 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); + (yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer); +#endif } -#line 6850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 339: -#line 2254 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 432: +#line 2856 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); + (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 6860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 340: -#line 2259 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 433: +#line 2861 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); + (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 6870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 341: -#line 2264 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 434: +#line 2866 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } -#line 6880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 342: -#line 2269 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 435: +#line 2871 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true); +#endif } -#line 6890 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8589 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 343: -#line 2274 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 436: +#line 2879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } -#line 6900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 344: -#line 2279 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 437: +#line 2884 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } -#line 6910 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8609 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 345: -#line 2284 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 438: +#line 2889 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } -#line 6920 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 346: -#line 2289 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 439: +#line 2894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true); +#endif } -#line 6930 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 347: -#line 2294 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 440: +#line 2902 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } -#line 6940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8642 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 348: -#line 2299 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 441: +#line 2907 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } -#line 6950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 349: -#line 2304 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 442: +#line 2912 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); } -#line 6960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 350: -#line 2309 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 443: +#line 2917 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true); +#endif } -#line 6970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8675 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 351: -#line 2314 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 444: +#line 2925 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } -#line 6980 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8685 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 352: -#line 2319 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 445: +#line 2930 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } -#line 6990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8695 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 353: -#line 2324 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 446: +#line 2935 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); } -#line 7000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8705 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 354: -#line 2329 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 447: +#line 2940 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true); +#endif } -#line 7010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8718 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 355: -#line 2334 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 448: +#line 2948 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } -#line 7020 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 356: -#line 2339 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 449: +#line 2953 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } -#line 7030 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8738 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 357: -#line 2344 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 450: +#line 2958 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); } -#line 7040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8748 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 358: -#line 2349 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 451: +#line 2963 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true); +#endif } -#line 7050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8761 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 359: -#line 2354 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 452: +#line 2971 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } -#line 7060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 360: -#line 2359 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 453: +#line 2976 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } -#line 7070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 361: -#line 2364 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 454: +#line 2981 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // GL_OES_EGL_image_external (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } -#line 7081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 362: -#line 2370 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 455: +#line 2987 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } -#line 7092 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 363: -#line 2376 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 456: +#line 2993 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } -#line 7103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8814 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 364: -#line 2382 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 457: +#line 2999 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtFloat16); +#endif + } +#line 8828 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 458: +#line 3008 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { +#ifdef AMD_EXTENSIONS + parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); +#endif + } +#line 8842 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 459: +#line 3017 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } -#line 7114 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 365: -#line 2388 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 460: +#line 3023 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } -#line 7125 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 366: -#line 2394 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 461: +#line 3029 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } -#line 7136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 367: -#line 2400 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 462: +#line 3035 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } -#line 7147 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 368: -#line 2406 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 463: +#line 3041 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.type) = (yyvsp[0].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } -#line 7157 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 369: -#line 2411 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 464: +#line 3046 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // // This is for user defined type names. The lexical phase looked up the @@ -7171,47 +8910,47 @@ yyreduce: } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 7175 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 370: -#line 2427 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 465: +#line 3062 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } -#line 7185 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 371: -#line 2432 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 466: +#line 3067 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } -#line 7195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8934 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 372: -#line 2437 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 467: +#line 3072 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); } -#line 7205 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8944 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 373: -#line 2445 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 468: +#line 3080 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 7211 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 374: -#line 2445 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 469: +#line 3080 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); @@ -7223,17 +8962,17 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 7227 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 375: -#line 2456 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 470: +#line 3091 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 7233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 376: -#line 2456 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 471: +#line 3091 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -7241,19 +8980,19 @@ yyreduce: (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 7245 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 377: -#line 2466 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 472: +#line 3101 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 7253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 8992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 378: -#line 2469 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 473: +#line 3104 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -7264,11 +9003,11 @@ yyreduce: (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 7268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9007 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 379: -#line 2482 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 474: +#line 3117 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -7283,17 +9022,20 @@ yyreduce: parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[-2].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + TType type((yyvsp[-2].interm.type)); + type.setFieldName((*(yyval.interm.typeList))[i].type->getFieldName()); + type.transferArraySizes((*(yyval.interm.typeList))[i].type->getArraySizes()); + type.copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); + parseContext.arrayOfArrayVersionCheck((*(yyval.interm.typeList))[i].loc, type.getArraySizes()); + (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 7291 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 380: -#line 2500 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 475: +#line 3139 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier); if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); @@ -7303,269 +9045,273 @@ yyreduce: (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); - parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); + parseContext.memberQualifierCheck((yyvsp[-3].interm.type)); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[-3].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + TType type((yyvsp[-2].interm.type)); + type.setFieldName((*(yyval.interm.typeList))[i].type->getFieldName()); + type.transferArraySizes((*(yyval.interm.typeList))[i].type->getArraySizes()); + type.copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); + parseContext.arrayOfArrayVersionCheck((*(yyval.interm.typeList))[i].loc, type.getArraySizes()); + (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 7317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9063 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 381: -#line 2524 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 476: +#line 3166 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 7326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 382: -#line 2528 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 477: +#line 3170 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 7334 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 383: -#line 2534 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 478: +#line 3176 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); } -#line 7344 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 384: -#line 2539 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 479: +#line 3181 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes, 0); + parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[-1].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); - (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[0].interm).arraySizes); + (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 7357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9103 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 385: -#line 2550 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 480: +#line 3192 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 7365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9111 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 386: -#line 2553 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 481: +#line 3195 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); } -#line 7376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 387: -#line 2559 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 482: +#line 3201 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 7387 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9133 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 388: -#line 2568 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 483: +#line 3210 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 7395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 389: -#line 2571 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 484: +#line 3213 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 7403 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 390: -#line 2577 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 485: +#line 3219 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7409 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9155 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 391: -#line 2581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 486: +#line 3223 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7415 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 392: -#line 2582 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 487: +#line 3224 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 393: -#line 2588 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 488: +#line 3230 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7427 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9173 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 394: -#line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 489: +#line 3231 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7433 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9179 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 395: -#line 2590 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 490: +#line 3232 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7439 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9185 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 396: -#line 2591 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 491: +#line 3233 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7445 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9191 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 397: -#line 2592 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 492: +#line 3234 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7451 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9197 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 398: -#line 2593 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 493: +#line 3235 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9203 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 399: -#line 2594 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 494: +#line 3236 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7463 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9209 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 400: -#line 2598 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 495: +#line 3240 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; } -#line 7469 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9215 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 401: -#line 2599 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 496: +#line 3241 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 7478 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 402: -#line 2603 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 497: +#line 3245 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 7487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9233 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 403: -#line 2607 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 498: +#line 3249 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 7497 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9243 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 404: -#line 2615 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 499: +#line 3257 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7503 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9249 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 405: -#line 2616 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 500: +#line 3258 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7509 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9255 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 406: -#line 2620 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 501: +#line 3262 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { ++parseContext.controlFlowNestingLevel; } -#line 7517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 407: -#line 2623 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 502: +#line 3265 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9272 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 408: -#line 2627 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 503: +#line 3269 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9282 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 409: -#line 2632 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 504: +#line 3274 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9293 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 410: -#line 2641 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 505: +#line 3283 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; } -#line 7555 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9301 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 411: -#line 2644 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 506: +#line 3286 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); } -#line 7565 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 412: -#line 2652 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 507: +#line 3294 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || @@ -7574,11 +9320,11 @@ yyreduce: (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 7578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9324 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 413: -#line 2660 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 508: +#line 3302 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { @@ -7587,59 +9333,76 @@ yyreduce: } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 7591 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 414: -#line 2671 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 509: +#line 3313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; } -#line 7597 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9343 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 415: -#line 2672 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 510: +#line 3314 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 7603 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9349 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 416: -#line 2676 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 511: +#line 3318 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9357 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 512: +#line 3321 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 513: +#line 3327 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); } -#line 7612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 417: -#line 2683 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 514: +#line 3334 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 7621 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9384 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 418: -#line 2687 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 515: +#line 3338 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 7630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9393 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 419: -#line 2695 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 516: +#line 3346 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 7639 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 420: -#line 2699 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 517: +#line 3350 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); @@ -7650,11 +9413,28 @@ yyreduce: else (yyval.interm.intermTypedNode) = 0; } -#line 7654 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9417 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 421: -#line 2712 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 518: +#line 3363 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9425 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 519: +#line 3366 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9434 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 520: +#line 3372 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -7663,11 +9443,11 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 7667 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 422: -#line 2720 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 521: +#line 3380 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); @@ -7677,27 +9457,27 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7681 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 423: -#line 2732 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 522: +#line 3392 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; } -#line 7689 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9469 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 424: -#line 2735 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 523: +#line 3395 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9477 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 425: -#line 2741 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 524: +#line 3401 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -7710,11 +9490,11 @@ yyreduce: (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 7714 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 426: -#line 2753 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 525: +#line 3413 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -7724,11 +9504,28 @@ yyreduce: else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 7728 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9508 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 427: -#line 2765 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 526: +#line 3425 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 527: +#line 3428 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 9525 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 528: +#line 3434 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -7737,11 +9534,11 @@ yyreduce: ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7741 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9538 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 428: -#line 2773 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 529: +#line 3442 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); @@ -7749,21 +9546,21 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7753 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 429: -#line 2780 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 530: +#line 3449 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7763 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9560 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 430: -#line 2785 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 531: +#line 3454 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); @@ -7775,22 +9572,22 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 431: -#line 2796 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 532: +#line 3465 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 7790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 432: -#line 2802 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 533: +#line 3471 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -7803,81 +9600,81 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 7807 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9604 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 433: -#line 2817 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 534: +#line 3486 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7815 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 434: -#line 2820 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 535: +#line 3489 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 435: -#line 2826 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 536: +#line 3495 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 7831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9628 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 436: -#line 2829 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 537: +#line 3498 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermTypedNode) = 0; } -#line 7839 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 437: -#line 2835 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 538: +#line 3504 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 7848 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9645 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 438: -#line 2839 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 539: +#line 3508 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 7857 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9654 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 439: -#line 2846 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 540: +#line 3515 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (parseContext.loopNestingLevel <= 0) parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); } -#line 7867 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9664 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 440: -#line 2851 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 541: +#line 3520 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); } -#line 7877 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9674 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 441: -#line 2856 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 542: +#line 3525 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -7885,83 +9682,83 @@ yyreduce: if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 7889 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 442: -#line 2863 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 543: +#line 3532 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 7897 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9694 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 443: -#line 2866 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 544: +#line 3535 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 7906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9703 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 444: -#line 2875 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 545: +#line 3544 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 7915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9712 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 445: -#line 2879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 546: +#line 3548 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if ((yyvsp[0].interm.intermNode) != nullptr) { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } } -#line 7926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 446: -#line 2888 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 547: +#line 3557 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7934 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9731 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 447: -#line 2891 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 548: +#line 3560 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 7942 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 448: -#line 2894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 549: +#line 3563 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); (yyval.interm.intermNode) = nullptr; } -#line 7952 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9749 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 449: -#line 2902 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 550: +#line 3571 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); } -#line 7961 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9758 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 450: -#line 2906 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + case 551: +#line 3575 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) @@ -7975,13 +9772,54 @@ yyreduce: // information. This information can be queried from the parse tree (yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); + (yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); + } +#line 9778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 552: +#line 3593 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); + parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); + } +#line 9787 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 553: +#line 3599 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = (yyvsp[0].interm.attributes); + } +#line 9795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 554: +#line 3602 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); + } +#line 9803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 555: +#line 3607 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); + } +#line 9811 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 556: +#line 3610 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } -#line 7981 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9819 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; -#line 7985 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ +#line 9823 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -8209,5 +10047,5 @@ yyreturn: #endif return yyresult; } -#line 2923 "MachineIndependent/glslang.y" /* yacc.c:1906 */ +#line 3614 "MachineIndependent/glslang.y" /* yacc.c:1906 */ diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp.h index b2e00632d9adaa28240a86c8d24f14eacc6b1b40..7cfb79766fb1758c9a4975030024de8260945a1f 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/glslang_tab.cpp.h @@ -47,299 +47,392 @@ extern int yydebug; { ATTRIBUTE = 258, VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, + FLOAT16_T = 260, + FLOAT = 261, + FLOAT32_T = 262, DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - INT16_T = 268, - UINT16_T = 269, - FLOAT16_T = 270, - BREAK = 271, - CONTINUE = 272, - DO = 273, - ELSE = 274, - FOR = 275, - IF = 276, - DISCARD = 277, - RETURN = 278, - SWITCH = 279, - CASE = 280, - DEFAULT = 281, - SUBROUTINE = 282, - BVEC2 = 283, - BVEC3 = 284, - BVEC4 = 285, - IVEC2 = 286, - IVEC3 = 287, - IVEC4 = 288, - I64VEC2 = 289, - I64VEC3 = 290, - I64VEC4 = 291, - UVEC2 = 292, - UVEC3 = 293, - UVEC4 = 294, - U64VEC2 = 295, - U64VEC3 = 296, - U64VEC4 = 297, - VEC2 = 298, - VEC3 = 299, - VEC4 = 300, - MAT2 = 301, - MAT3 = 302, - MAT4 = 303, - CENTROID = 304, - IN = 305, - OUT = 306, - INOUT = 307, - UNIFORM = 308, - PATCH = 309, - SAMPLE = 310, - BUFFER = 311, - SHARED = 312, - COHERENT = 313, - VOLATILE = 314, - RESTRICT = 315, - READONLY = 316, - WRITEONLY = 317, - DVEC2 = 318, - DVEC3 = 319, - DVEC4 = 320, - DMAT2 = 321, - DMAT3 = 322, - DMAT4 = 323, - F16VEC2 = 324, - F16VEC3 = 325, - F16VEC4 = 326, - F16MAT2 = 327, - F16MAT3 = 328, - F16MAT4 = 329, - I16VEC2 = 330, - I16VEC3 = 331, - I16VEC4 = 332, - U16VEC2 = 333, - U16VEC3 = 334, - U16VEC4 = 335, - NOPERSPECTIVE = 336, - FLAT = 337, - SMOOTH = 338, - LAYOUT = 339, - __EXPLICITINTERPAMD = 340, - MAT2X2 = 341, - MAT2X3 = 342, - MAT2X4 = 343, - MAT3X2 = 344, - MAT3X3 = 345, - MAT3X4 = 346, - MAT4X2 = 347, - MAT4X3 = 348, - MAT4X4 = 349, - DMAT2X2 = 350, - DMAT2X3 = 351, - DMAT2X4 = 352, - DMAT3X2 = 353, - DMAT3X3 = 354, - DMAT3X4 = 355, - DMAT4X2 = 356, - DMAT4X3 = 357, - DMAT4X4 = 358, - F16MAT2X2 = 359, - F16MAT2X3 = 360, - F16MAT2X4 = 361, - F16MAT3X2 = 362, - F16MAT3X3 = 363, - F16MAT3X4 = 364, - F16MAT4X2 = 365, - F16MAT4X3 = 366, - F16MAT4X4 = 367, - ATOMIC_UINT = 368, - SAMPLER1D = 369, - SAMPLER2D = 370, - SAMPLER3D = 371, - SAMPLERCUBE = 372, - SAMPLER1DSHADOW = 373, - SAMPLER2DSHADOW = 374, - SAMPLERCUBESHADOW = 375, - SAMPLER1DARRAY = 376, - SAMPLER2DARRAY = 377, - SAMPLER1DARRAYSHADOW = 378, - SAMPLER2DARRAYSHADOW = 379, - ISAMPLER1D = 380, - ISAMPLER2D = 381, - ISAMPLER3D = 382, - ISAMPLERCUBE = 383, - ISAMPLER1DARRAY = 384, - ISAMPLER2DARRAY = 385, - USAMPLER1D = 386, - USAMPLER2D = 387, - USAMPLER3D = 388, - USAMPLERCUBE = 389, - USAMPLER1DARRAY = 390, - USAMPLER2DARRAY = 391, - SAMPLER2DRECT = 392, - SAMPLER2DRECTSHADOW = 393, - ISAMPLER2DRECT = 394, - USAMPLER2DRECT = 395, - SAMPLERBUFFER = 396, - ISAMPLERBUFFER = 397, - USAMPLERBUFFER = 398, - SAMPLERCUBEARRAY = 399, - SAMPLERCUBEARRAYSHADOW = 400, - ISAMPLERCUBEARRAY = 401, - USAMPLERCUBEARRAY = 402, - SAMPLER2DMS = 403, - ISAMPLER2DMS = 404, - USAMPLER2DMS = 405, - SAMPLER2DMSARRAY = 406, - ISAMPLER2DMSARRAY = 407, - USAMPLER2DMSARRAY = 408, - SAMPLEREXTERNALOES = 409, - SAMPLER = 410, - SAMPLERSHADOW = 411, - TEXTURE1D = 412, - TEXTURE2D = 413, - TEXTURE3D = 414, - TEXTURECUBE = 415, - TEXTURE1DARRAY = 416, - TEXTURE2DARRAY = 417, - ITEXTURE1D = 418, - ITEXTURE2D = 419, - ITEXTURE3D = 420, - ITEXTURECUBE = 421, - ITEXTURE1DARRAY = 422, - ITEXTURE2DARRAY = 423, - UTEXTURE1D = 424, - UTEXTURE2D = 425, - UTEXTURE3D = 426, - UTEXTURECUBE = 427, - UTEXTURE1DARRAY = 428, - UTEXTURE2DARRAY = 429, - TEXTURE2DRECT = 430, - ITEXTURE2DRECT = 431, - UTEXTURE2DRECT = 432, - TEXTUREBUFFER = 433, - ITEXTUREBUFFER = 434, - UTEXTUREBUFFER = 435, - TEXTURECUBEARRAY = 436, - ITEXTURECUBEARRAY = 437, - UTEXTURECUBEARRAY = 438, - TEXTURE2DMS = 439, - ITEXTURE2DMS = 440, - UTEXTURE2DMS = 441, - TEXTURE2DMSARRAY = 442, - ITEXTURE2DMSARRAY = 443, - UTEXTURE2DMSARRAY = 444, - SUBPASSINPUT = 445, - SUBPASSINPUTMS = 446, - ISUBPASSINPUT = 447, - ISUBPASSINPUTMS = 448, - USUBPASSINPUT = 449, - USUBPASSINPUTMS = 450, - IMAGE1D = 451, - IIMAGE1D = 452, - UIMAGE1D = 453, - IMAGE2D = 454, - IIMAGE2D = 455, - UIMAGE2D = 456, - IMAGE3D = 457, - IIMAGE3D = 458, - UIMAGE3D = 459, - IMAGE2DRECT = 460, - IIMAGE2DRECT = 461, - UIMAGE2DRECT = 462, - IMAGECUBE = 463, - IIMAGECUBE = 464, - UIMAGECUBE = 465, - IMAGEBUFFER = 466, - IIMAGEBUFFER = 467, - UIMAGEBUFFER = 468, - IMAGE1DARRAY = 469, - IIMAGE1DARRAY = 470, - UIMAGE1DARRAY = 471, - IMAGE2DARRAY = 472, - IIMAGE2DARRAY = 473, - UIMAGE2DARRAY = 474, - IMAGECUBEARRAY = 475, - IIMAGECUBEARRAY = 476, - UIMAGECUBEARRAY = 477, - IMAGE2DMS = 478, - IIMAGE2DMS = 479, - UIMAGE2DMS = 480, - IMAGE2DMSARRAY = 481, - IIMAGE2DMSARRAY = 482, - UIMAGE2DMSARRAY = 483, - STRUCT = 484, - VOID = 485, - WHILE = 486, - IDENTIFIER = 487, - TYPE_NAME = 488, - FLOATCONSTANT = 489, - DOUBLECONSTANT = 490, - INTCONSTANT = 491, - UINTCONSTANT = 492, - INT64CONSTANT = 493, - UINT64CONSTANT = 494, - INT16CONSTANT = 495, - UINT16CONSTANT = 496, - BOOLCONSTANT = 497, - FLOAT16CONSTANT = 498, - LEFT_OP = 499, - RIGHT_OP = 500, - INC_OP = 501, - DEC_OP = 502, - LE_OP = 503, - GE_OP = 504, - EQ_OP = 505, - NE_OP = 506, - AND_OP = 507, - OR_OP = 508, - XOR_OP = 509, - MUL_ASSIGN = 510, - DIV_ASSIGN = 511, - ADD_ASSIGN = 512, - MOD_ASSIGN = 513, - LEFT_ASSIGN = 514, - RIGHT_ASSIGN = 515, - AND_ASSIGN = 516, - XOR_ASSIGN = 517, - OR_ASSIGN = 518, - SUB_ASSIGN = 519, - LEFT_PAREN = 520, - RIGHT_PAREN = 521, - LEFT_BRACKET = 522, - RIGHT_BRACKET = 523, - LEFT_BRACE = 524, - RIGHT_BRACE = 525, - DOT = 526, - COMMA = 527, - COLON = 528, - EQUAL = 529, - SEMICOLON = 530, - BANG = 531, - DASH = 532, - TILDE = 533, - PLUS = 534, - STAR = 535, - SLASH = 536, - PERCENT = 537, - LEFT_ANGLE = 538, - RIGHT_ANGLE = 539, - VERTICAL_BAR = 540, - CARET = 541, - AMPERSAND = 542, - QUESTION = 543, - INVARIANT = 544, - PRECISE = 545, - HIGH_PRECISION = 546, - MEDIUM_PRECISION = 547, - LOW_PRECISION = 548, - PRECISION = 549, - PACKED = 550, - RESOURCE = 551, - SUPERP = 552 + FLOAT64_T = 264, + CONST = 265, + BOOL = 266, + INT = 267, + UINT = 268, + INT64_T = 269, + UINT64_T = 270, + INT32_T = 271, + UINT32_T = 272, + INT16_T = 273, + UINT16_T = 274, + INT8_T = 275, + UINT8_T = 276, + BREAK = 277, + CONTINUE = 278, + DO = 279, + ELSE = 280, + FOR = 281, + IF = 282, + DISCARD = 283, + RETURN = 284, + SWITCH = 285, + CASE = 286, + DEFAULT = 287, + SUBROUTINE = 288, + BVEC2 = 289, + BVEC3 = 290, + BVEC4 = 291, + IVEC2 = 292, + IVEC3 = 293, + IVEC4 = 294, + UVEC2 = 295, + UVEC3 = 296, + UVEC4 = 297, + I64VEC2 = 298, + I64VEC3 = 299, + I64VEC4 = 300, + U64VEC2 = 301, + U64VEC3 = 302, + U64VEC4 = 303, + I32VEC2 = 304, + I32VEC3 = 305, + I32VEC4 = 306, + U32VEC2 = 307, + U32VEC3 = 308, + U32VEC4 = 309, + I16VEC2 = 310, + I16VEC3 = 311, + I16VEC4 = 312, + U16VEC2 = 313, + U16VEC3 = 314, + U16VEC4 = 315, + I8VEC2 = 316, + I8VEC3 = 317, + I8VEC4 = 318, + U8VEC2 = 319, + U8VEC3 = 320, + U8VEC4 = 321, + VEC2 = 322, + VEC3 = 323, + VEC4 = 324, + MAT2 = 325, + MAT3 = 326, + MAT4 = 327, + CENTROID = 328, + IN = 329, + OUT = 330, + INOUT = 331, + UNIFORM = 332, + PATCH = 333, + SAMPLE = 334, + BUFFER = 335, + SHARED = 336, + NONUNIFORM = 337, + COHERENT = 338, + VOLATILE = 339, + RESTRICT = 340, + READONLY = 341, + WRITEONLY = 342, + DVEC2 = 343, + DVEC3 = 344, + DVEC4 = 345, + DMAT2 = 346, + DMAT3 = 347, + DMAT4 = 348, + F16VEC2 = 349, + F16VEC3 = 350, + F16VEC4 = 351, + F16MAT2 = 352, + F16MAT3 = 353, + F16MAT4 = 354, + F32VEC2 = 355, + F32VEC3 = 356, + F32VEC4 = 357, + F32MAT2 = 358, + F32MAT3 = 359, + F32MAT4 = 360, + F64VEC2 = 361, + F64VEC3 = 362, + F64VEC4 = 363, + F64MAT2 = 364, + F64MAT3 = 365, + F64MAT4 = 366, + NOPERSPECTIVE = 367, + FLAT = 368, + SMOOTH = 369, + LAYOUT = 370, + __EXPLICITINTERPAMD = 371, + MAT2X2 = 372, + MAT2X3 = 373, + MAT2X4 = 374, + MAT3X2 = 375, + MAT3X3 = 376, + MAT3X4 = 377, + MAT4X2 = 378, + MAT4X3 = 379, + MAT4X4 = 380, + DMAT2X2 = 381, + DMAT2X3 = 382, + DMAT2X4 = 383, + DMAT3X2 = 384, + DMAT3X3 = 385, + DMAT3X4 = 386, + DMAT4X2 = 387, + DMAT4X3 = 388, + DMAT4X4 = 389, + F16MAT2X2 = 390, + F16MAT2X3 = 391, + F16MAT2X4 = 392, + F16MAT3X2 = 393, + F16MAT3X3 = 394, + F16MAT3X4 = 395, + F16MAT4X2 = 396, + F16MAT4X3 = 397, + F16MAT4X4 = 398, + F32MAT2X2 = 399, + F32MAT2X3 = 400, + F32MAT2X4 = 401, + F32MAT3X2 = 402, + F32MAT3X3 = 403, + F32MAT3X4 = 404, + F32MAT4X2 = 405, + F32MAT4X3 = 406, + F32MAT4X4 = 407, + F64MAT2X2 = 408, + F64MAT2X3 = 409, + F64MAT2X4 = 410, + F64MAT3X2 = 411, + F64MAT3X3 = 412, + F64MAT3X4 = 413, + F64MAT4X2 = 414, + F64MAT4X3 = 415, + F64MAT4X4 = 416, + ATOMIC_UINT = 417, + SAMPLER1D = 418, + SAMPLER2D = 419, + SAMPLER3D = 420, + SAMPLERCUBE = 421, + SAMPLER1DSHADOW = 422, + SAMPLER2DSHADOW = 423, + SAMPLERCUBESHADOW = 424, + SAMPLER1DARRAY = 425, + SAMPLER2DARRAY = 426, + SAMPLER1DARRAYSHADOW = 427, + SAMPLER2DARRAYSHADOW = 428, + ISAMPLER1D = 429, + ISAMPLER2D = 430, + ISAMPLER3D = 431, + ISAMPLERCUBE = 432, + ISAMPLER1DARRAY = 433, + ISAMPLER2DARRAY = 434, + USAMPLER1D = 435, + USAMPLER2D = 436, + USAMPLER3D = 437, + USAMPLERCUBE = 438, + USAMPLER1DARRAY = 439, + USAMPLER2DARRAY = 440, + SAMPLER2DRECT = 441, + SAMPLER2DRECTSHADOW = 442, + ISAMPLER2DRECT = 443, + USAMPLER2DRECT = 444, + SAMPLERBUFFER = 445, + ISAMPLERBUFFER = 446, + USAMPLERBUFFER = 447, + SAMPLERCUBEARRAY = 448, + SAMPLERCUBEARRAYSHADOW = 449, + ISAMPLERCUBEARRAY = 450, + USAMPLERCUBEARRAY = 451, + SAMPLER2DMS = 452, + ISAMPLER2DMS = 453, + USAMPLER2DMS = 454, + SAMPLER2DMSARRAY = 455, + ISAMPLER2DMSARRAY = 456, + USAMPLER2DMSARRAY = 457, + SAMPLEREXTERNALOES = 458, + F16SAMPLER1D = 459, + F16SAMPLER2D = 460, + F16SAMPLER3D = 461, + F16SAMPLER2DRECT = 462, + F16SAMPLERCUBE = 463, + F16SAMPLER1DARRAY = 464, + F16SAMPLER2DARRAY = 465, + F16SAMPLERCUBEARRAY = 466, + F16SAMPLERBUFFER = 467, + F16SAMPLER2DMS = 468, + F16SAMPLER2DMSARRAY = 469, + F16SAMPLER1DSHADOW = 470, + F16SAMPLER2DSHADOW = 471, + F16SAMPLER1DARRAYSHADOW = 472, + F16SAMPLER2DARRAYSHADOW = 473, + F16SAMPLER2DRECTSHADOW = 474, + F16SAMPLERCUBESHADOW = 475, + F16SAMPLERCUBEARRAYSHADOW = 476, + SAMPLER = 477, + SAMPLERSHADOW = 478, + TEXTURE1D = 479, + TEXTURE2D = 480, + TEXTURE3D = 481, + TEXTURECUBE = 482, + TEXTURE1DARRAY = 483, + TEXTURE2DARRAY = 484, + ITEXTURE1D = 485, + ITEXTURE2D = 486, + ITEXTURE3D = 487, + ITEXTURECUBE = 488, + ITEXTURE1DARRAY = 489, + ITEXTURE2DARRAY = 490, + UTEXTURE1D = 491, + UTEXTURE2D = 492, + UTEXTURE3D = 493, + UTEXTURECUBE = 494, + UTEXTURE1DARRAY = 495, + UTEXTURE2DARRAY = 496, + TEXTURE2DRECT = 497, + ITEXTURE2DRECT = 498, + UTEXTURE2DRECT = 499, + TEXTUREBUFFER = 500, + ITEXTUREBUFFER = 501, + UTEXTUREBUFFER = 502, + TEXTURECUBEARRAY = 503, + ITEXTURECUBEARRAY = 504, + UTEXTURECUBEARRAY = 505, + TEXTURE2DMS = 506, + ITEXTURE2DMS = 507, + UTEXTURE2DMS = 508, + TEXTURE2DMSARRAY = 509, + ITEXTURE2DMSARRAY = 510, + UTEXTURE2DMSARRAY = 511, + F16TEXTURE1D = 512, + F16TEXTURE2D = 513, + F16TEXTURE3D = 514, + F16TEXTURE2DRECT = 515, + F16TEXTURECUBE = 516, + F16TEXTURE1DARRAY = 517, + F16TEXTURE2DARRAY = 518, + F16TEXTURECUBEARRAY = 519, + F16TEXTUREBUFFER = 520, + F16TEXTURE2DMS = 521, + F16TEXTURE2DMSARRAY = 522, + SUBPASSINPUT = 523, + SUBPASSINPUTMS = 524, + ISUBPASSINPUT = 525, + ISUBPASSINPUTMS = 526, + USUBPASSINPUT = 527, + USUBPASSINPUTMS = 528, + F16SUBPASSINPUT = 529, + F16SUBPASSINPUTMS = 530, + IMAGE1D = 531, + IIMAGE1D = 532, + UIMAGE1D = 533, + IMAGE2D = 534, + IIMAGE2D = 535, + UIMAGE2D = 536, + IMAGE3D = 537, + IIMAGE3D = 538, + UIMAGE3D = 539, + IMAGE2DRECT = 540, + IIMAGE2DRECT = 541, + UIMAGE2DRECT = 542, + IMAGECUBE = 543, + IIMAGECUBE = 544, + UIMAGECUBE = 545, + IMAGEBUFFER = 546, + IIMAGEBUFFER = 547, + UIMAGEBUFFER = 548, + IMAGE1DARRAY = 549, + IIMAGE1DARRAY = 550, + UIMAGE1DARRAY = 551, + IMAGE2DARRAY = 552, + IIMAGE2DARRAY = 553, + UIMAGE2DARRAY = 554, + IMAGECUBEARRAY = 555, + IIMAGECUBEARRAY = 556, + UIMAGECUBEARRAY = 557, + IMAGE2DMS = 558, + IIMAGE2DMS = 559, + UIMAGE2DMS = 560, + IMAGE2DMSARRAY = 561, + IIMAGE2DMSARRAY = 562, + UIMAGE2DMSARRAY = 563, + F16IMAGE1D = 564, + F16IMAGE2D = 565, + F16IMAGE3D = 566, + F16IMAGE2DRECT = 567, + F16IMAGECUBE = 568, + F16IMAGE1DARRAY = 569, + F16IMAGE2DARRAY = 570, + F16IMAGECUBEARRAY = 571, + F16IMAGEBUFFER = 572, + F16IMAGE2DMS = 573, + F16IMAGE2DMSARRAY = 574, + STRUCT = 575, + VOID = 576, + WHILE = 577, + IDENTIFIER = 578, + TYPE_NAME = 579, + FLOATCONSTANT = 580, + DOUBLECONSTANT = 581, + INT16CONSTANT = 582, + UINT16CONSTANT = 583, + INT32CONSTANT = 584, + UINT32CONSTANT = 585, + INTCONSTANT = 586, + UINTCONSTANT = 587, + INT64CONSTANT = 588, + UINT64CONSTANT = 589, + BOOLCONSTANT = 590, + FLOAT16CONSTANT = 591, + LEFT_OP = 592, + RIGHT_OP = 593, + INC_OP = 594, + DEC_OP = 595, + LE_OP = 596, + GE_OP = 597, + EQ_OP = 598, + NE_OP = 599, + AND_OP = 600, + OR_OP = 601, + XOR_OP = 602, + MUL_ASSIGN = 603, + DIV_ASSIGN = 604, + ADD_ASSIGN = 605, + MOD_ASSIGN = 606, + LEFT_ASSIGN = 607, + RIGHT_ASSIGN = 608, + AND_ASSIGN = 609, + XOR_ASSIGN = 610, + OR_ASSIGN = 611, + SUB_ASSIGN = 612, + LEFT_PAREN = 613, + RIGHT_PAREN = 614, + LEFT_BRACKET = 615, + RIGHT_BRACKET = 616, + LEFT_BRACE = 617, + RIGHT_BRACE = 618, + DOT = 619, + COMMA = 620, + COLON = 621, + EQUAL = 622, + SEMICOLON = 623, + BANG = 624, + DASH = 625, + TILDE = 626, + PLUS = 627, + STAR = 628, + SLASH = 629, + PERCENT = 630, + LEFT_ANGLE = 631, + RIGHT_ANGLE = 632, + VERTICAL_BAR = 633, + CARET = 634, + AMPERSAND = 635, + QUESTION = 636, + INVARIANT = 637, + PRECISE = 638, + HIGH_PRECISION = 639, + MEDIUM_PRECISION = 640, + LOW_PRECISION = 641, + PRECISION = 642, + PACKED = 643, + RESOURCE = 644, + SUPERP = 645 }; #endif @@ -348,7 +441,7 @@ extern int yydebug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 68 "MachineIndependent/glslang.y" /* yacc.c:1909 */ +#line 70 "MachineIndependent/glslang.y" /* yacc.c:1909 */ struct { glslang::TSourceLoc loc; @@ -370,6 +463,7 @@ union YYSTYPE TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -382,7 +476,7 @@ union YYSTYPE }; } interm; -#line 386 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */ +#line 480 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/intermOut.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/intermOut.cpp index 7e15392da682c1772346a55ff869456c26b56836..4d6ad040b4643c580fb24f8a8c50a6d36aff5c81 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/intermOut.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/intermOut.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -224,48 +225,192 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpPreIncrement: out.debug << "Pre-Increment"; break; case EOpPreDecrement: out.debug << "Pre-Decrement"; break; + // * -> bool + case EOpConvInt8ToBool: out.debug << "Convert int8_t to bool"; break; + case EOpConvUint8ToBool: out.debug << "Convert uint8_t to bool"; break; + case EOpConvInt16ToBool: out.debug << "Convert int16_t to bool"; break; + case EOpConvUint16ToBool: out.debug << "Convert uint16_t to bool";break; case EOpConvIntToBool: out.debug << "Convert int to bool"; break; case EOpConvUintToBool: out.debug << "Convert uint to bool"; break; - case EOpConvFloatToBool: out.debug << "Convert float to bool"; break; - case EOpConvDoubleToBool: out.debug << "Convert double to bool"; break; case EOpConvInt64ToBool: out.debug << "Convert int64 to bool"; break; case EOpConvUint64ToBool: out.debug << "Convert uint64 to bool"; break; - case EOpConvIntToFloat: out.debug << "Convert int to float"; break; - case EOpConvUintToFloat: out.debug << "Convert uint to float"; break; - case EOpConvDoubleToFloat: out.debug << "Convert double to float"; break; - case EOpConvInt64ToFloat: out.debug << "Convert int64 to float"; break; - case EOpConvUint64ToFloat: out.debug << "Convert uint64 to float"; break; - case EOpConvBoolToFloat: out.debug << "Convert bool to float"; break; - case EOpConvUintToInt: out.debug << "Convert uint to int"; break; - case EOpConvFloatToInt: out.debug << "Convert float to int"; break; - case EOpConvDoubleToInt: out.debug << "Convert double to int"; break; - case EOpConvBoolToInt: out.debug << "Convert bool to int"; break; - case EOpConvInt64ToInt: out.debug << "Convert int64 to int"; break; - case EOpConvUint64ToInt: out.debug << "Convert uint64 to int"; break; - case EOpConvIntToUint: out.debug << "Convert int to uint"; break; - case EOpConvFloatToUint: out.debug << "Convert float to uint"; break; - case EOpConvDoubleToUint: out.debug << "Convert double to uint"; break; + case EOpConvFloat16ToBool: out.debug << "Convert float16_t to bool"; break; + case EOpConvFloatToBool: out.debug << "Convert float to bool"; break; + case EOpConvDoubleToBool: out.debug << "Convert double to bool"; break; + + // bool -> * + case EOpConvBoolToInt8: out.debug << "Convert bool to int8_t"; break; + case EOpConvBoolToUint8: out.debug << "Convert bool to uint8_t"; break; + case EOpConvBoolToInt16: out.debug << "Convert bool to in16t_t"; break; + case EOpConvBoolToUint16: out.debug << "Convert bool to uint16_t";break; + case EOpConvBoolToInt: out.debug << "Convert bool to int" ; break; case EOpConvBoolToUint: out.debug << "Convert bool to uint"; break; - case EOpConvInt64ToUint: out.debug << "Convert int64 to uint"; break; - case EOpConvUint64ToUint: out.debug << "Convert uint64 to uint"; break; + case EOpConvBoolToInt64: out.debug << "Convert bool to int64"; break; + case EOpConvBoolToUint64: out.debug << "Convert bool to uint64";break; + case EOpConvBoolToFloat16: out.debug << "Convert bool to float16_t"; break; + case EOpConvBoolToFloat: out.debug << "Convert bool to float"; break; + case EOpConvBoolToDouble: out.debug << "Convert bool to double"; break; + + // int8_t -> (u)int* + case EOpConvInt8ToInt16: out.debug << "Convert int8_t to int16_t";break; + case EOpConvInt8ToInt: out.debug << "Convert int8_t to int"; break; + case EOpConvInt8ToInt64: out.debug << "Convert int8_t to int64"; break; + case EOpConvInt8ToUint8: out.debug << "Convert int8_t to uint8_t";break; + case EOpConvInt8ToUint16: out.debug << "Convert int8_t to uint16_t";break; + case EOpConvInt8ToUint: out.debug << "Convert int8_t to uint"; break; + case EOpConvInt8ToUint64: out.debug << "Convert int8_t to uint64"; break; + + // uint8_t -> (u)int* + case EOpConvUint8ToInt8: out.debug << "Convert uint8_t to int8_t";break; + case EOpConvUint8ToInt16: out.debug << "Convert uint8_t to int16_t";break; + case EOpConvUint8ToInt: out.debug << "Convert uint8_t to int"; break; + case EOpConvUint8ToInt64: out.debug << "Convert uint8_t to int64"; break; + case EOpConvUint8ToUint16: out.debug << "Convert uint8_t to uint16_t";break; + case EOpConvUint8ToUint: out.debug << "Convert uint8_t to uint"; break; + case EOpConvUint8ToUint64: out.debug << "Convert uint8_t to uint64"; break; + + // int8_t -> float* + case EOpConvInt8ToFloat16: out.debug << "Convert int8_t to float16_t";break; + case EOpConvInt8ToFloat: out.debug << "Convert int8_t to float"; break; + case EOpConvInt8ToDouble: out.debug << "Convert int8_t to double"; break; + + // uint8_t -> float* + case EOpConvUint8ToFloat16: out.debug << "Convert uint8_t to float16_t";break; + case EOpConvUint8ToFloat: out.debug << "Convert uint8_t to float"; break; + case EOpConvUint8ToDouble: out.debug << "Convert uint8_t to double"; break; + + // int16_t -> (u)int* + case EOpConvInt16ToInt8: out.debug << "Convert int16_t to int8_t";break; + case EOpConvInt16ToInt: out.debug << "Convert int16_t to int"; break; + case EOpConvInt16ToInt64: out.debug << "Convert int16_t to int64"; break; + case EOpConvInt16ToUint8: out.debug << "Convert int16_t to uint8_t";break; + case EOpConvInt16ToUint16: out.debug << "Convert int16_t to uint16_t";break; + case EOpConvInt16ToUint: out.debug << "Convert int16_t to uint"; break; + case EOpConvInt16ToUint64: out.debug << "Convert int16_t to uint64"; break; + + // int16_t -> float* + case EOpConvInt16ToFloat16: out.debug << "Convert int16_t to float16_t";break; + case EOpConvInt16ToFloat: out.debug << "Convert int16_t to float"; break; + case EOpConvInt16ToDouble: out.debug << "Convert int16_t to double"; break; + + // uint16_t -> (u)int* + case EOpConvUint16ToInt8: out.debug << "Convert uint16_t to int8_t";break; + case EOpConvUint16ToInt16: out.debug << "Convert uint16_t to int16_t";break; + case EOpConvUint16ToInt: out.debug << "Convert uint16_t to int"; break; + case EOpConvUint16ToInt64: out.debug << "Convert uint16_t to int64"; break; + case EOpConvUint16ToUint8: out.debug << "Convert uint16_t to uint8_t";break; + case EOpConvUint16ToUint: out.debug << "Convert uint16_t to uint"; break; + case EOpConvUint16ToUint64: out.debug << "Convert uint16_t to uint64"; break; + + // uint16_t -> float* + case EOpConvUint16ToFloat16: out.debug << "Convert uint16_t to float16_t";break; + case EOpConvUint16ToFloat: out.debug << "Convert uint16_t to float"; break; + case EOpConvUint16ToDouble: out.debug << "Convert uint16_t to double"; break; + + // int32_t -> (u)int* + case EOpConvIntToInt8: out.debug << "Convert int to int8_t";break; + case EOpConvIntToInt16: out.debug << "Convert int to int16_t";break; + case EOpConvIntToInt64: out.debug << "Convert int to int64"; break; + case EOpConvIntToUint8: out.debug << "Convert int to uint8_t";break; + case EOpConvIntToUint16: out.debug << "Convert int to uint16_t";break; + case EOpConvIntToUint: out.debug << "Convert int to uint"; break; + case EOpConvIntToUint64: out.debug << "Convert int to uint64"; break; + + // int32_t -> float* + case EOpConvIntToFloat16: out.debug << "Convert int to float16_t";break; + case EOpConvIntToFloat: out.debug << "Convert int to float"; break; case EOpConvIntToDouble: out.debug << "Convert int to double"; break; - case EOpConvUintToDouble: out.debug << "Convert uint to double"; break; - case EOpConvFloatToDouble: out.debug << "Convert float to double"; break; - case EOpConvBoolToDouble: out.debug << "Convert bool to double"; break; - case EOpConvInt64ToDouble: out.debug << "Convert int64 to double"; break; - case EOpConvUint64ToDouble: out.debug << "Convert uint64 to double"; break; - case EOpConvBoolToInt64: out.debug << "Convert bool to int64"; break; - case EOpConvIntToInt64: out.debug << "Convert int to int64"; break; + + // uint32_t -> (u)int* + case EOpConvUintToInt8: out.debug << "Convert uint to int8_t";break; + case EOpConvUintToInt16: out.debug << "Convert uint to int16_t";break; + case EOpConvUintToInt: out.debug << "Convert uint to int";break; case EOpConvUintToInt64: out.debug << "Convert uint to int64"; break; - case EOpConvFloatToInt64: out.debug << "Convert float to int64"; break; - case EOpConvDoubleToInt64: out.debug << "Convert double to int64"; break; - case EOpConvUint64ToInt64: out.debug << "Convert uint64 to int64"; break; - case EOpConvBoolToUint64: out.debug << "Convert bool to uint64"; break; - case EOpConvIntToUint64: out.debug << "Convert int to uint64"; break; - case EOpConvUintToUint64: out.debug << "Convert uint to uint64"; break; + case EOpConvUintToUint8: out.debug << "Convert uint to uint8_t";break; + case EOpConvUintToUint16: out.debug << "Convert uint to uint16_t";break; + case EOpConvUintToUint64: out.debug << "Convert uint to uint64"; break; + + // uint32_t -> float* + case EOpConvUintToFloat16: out.debug << "Convert uint to float16_t";break; + case EOpConvUintToFloat: out.debug << "Convert uint to float"; break; + case EOpConvUintToDouble: out.debug << "Convert uint to double"; break; + + // int64 -> (u)int* + case EOpConvInt64ToInt8: out.debug << "Convert int64 to int8_t"; break; + case EOpConvInt64ToInt16: out.debug << "Convert int64 to int16_t"; break; + case EOpConvInt64ToInt: out.debug << "Convert int64 to int"; break; + case EOpConvInt64ToUint8: out.debug << "Convert int64 to uint8_t";break; + case EOpConvInt64ToUint16: out.debug << "Convert int64 to uint16_t";break; + case EOpConvInt64ToUint: out.debug << "Convert int64 to uint"; break; + case EOpConvInt64ToUint64: out.debug << "Convert int64 to uint64"; break; + + // int64 -> float* + case EOpConvInt64ToFloat16: out.debug << "Convert int64 to float16_t";break; + case EOpConvInt64ToFloat: out.debug << "Convert int64 to float"; break; + case EOpConvInt64ToDouble: out.debug << "Convert int64 to double"; break; + + // uint64 -> (u)int* + case EOpConvUint64ToInt8: out.debug << "Convert uint64 to int8_t";break; + case EOpConvUint64ToInt16: out.debug << "Convert uint64 to int16_t";break; + case EOpConvUint64ToInt: out.debug << "Convert uint64 to int"; break; + case EOpConvUint64ToInt64: out.debug << "Convert uint64 to int64"; break; + case EOpConvUint64ToUint8: out.debug << "Convert uint64 to uint8_t";break; + case EOpConvUint64ToUint16: out.debug << "Convert uint64 to uint16"; break; + case EOpConvUint64ToUint: out.debug << "Convert uint64 to uint"; break; + + // uint64 -> float* + case EOpConvUint64ToFloat16: out.debug << "Convert uint64 to float16_t";break; + case EOpConvUint64ToFloat: out.debug << "Convert uint64 to float"; break; + case EOpConvUint64ToDouble: out.debug << "Convert uint64 to double"; break; + + // float16_t -> int* + case EOpConvFloat16ToInt8: out.debug << "Convert float16_t to int8_t"; break; + case EOpConvFloat16ToInt16: out.debug << "Convert float16_t to int16_t"; break; + case EOpConvFloat16ToInt: out.debug << "Convert float16_t to int"; break; + case EOpConvFloat16ToInt64: out.debug << "Convert float16_t to int64"; break; + + // float16_t -> uint* + case EOpConvFloat16ToUint8: out.debug << "Convert float16_t to uint8_t"; break; + case EOpConvFloat16ToUint16: out.debug << "Convert float16_t to uint16_t"; break; + case EOpConvFloat16ToUint: out.debug << "Convert float16_t to uint"; break; + case EOpConvFloat16ToUint64: out.debug << "Convert float16_t to uint64"; break; + + // float16_t -> float* + case EOpConvFloat16ToFloat: out.debug << "Convert float16_t to float"; break; + case EOpConvFloat16ToDouble: out.debug << "Convert float16_t to double"; break; + + // float32 -> float* + case EOpConvFloatToFloat16: out.debug << "Convert float to float16_t"; break; + case EOpConvFloatToDouble: out.debug << "Convert float to double"; break; + + // float32_t -> int* + case EOpConvFloatToInt8: out.debug << "Convert float to int8_t"; break; + case EOpConvFloatToInt16: out.debug << "Convert float to int16_t"; break; + case EOpConvFloatToInt: out.debug << "Convert float to int"; break; + case EOpConvFloatToInt64: out.debug << "Convert float to int64"; break; + + // float32_t -> uint* + case EOpConvFloatToUint8: out.debug << "Convert float to uint8_t"; break; + case EOpConvFloatToUint16: out.debug << "Convert float to uint16_t"; break; + case EOpConvFloatToUint: out.debug << "Convert float to uint"; break; case EOpConvFloatToUint64: out.debug << "Convert float to uint64"; break; + + // double -> float* + case EOpConvDoubleToFloat16: out.debug << "Convert double to float16_t"; break; + case EOpConvDoubleToFloat: out.debug << "Convert double to float"; break; + + // double -> int* + case EOpConvDoubleToInt8: out.debug << "Convert double to int8_t"; break; + case EOpConvDoubleToInt16: out.debug << "Convert double to int16_t"; break; + case EOpConvDoubleToInt: out.debug << "Convert double to int"; break; + case EOpConvDoubleToInt64: out.debug << "Convert double to int64"; break; + + // float32_t -> uint* + case EOpConvDoubleToUint8: out.debug << "Convert double to uint8_t"; break; + case EOpConvDoubleToUint16: out.debug << "Convert double to uint16_t"; break; + case EOpConvDoubleToUint: out.debug << "Convert double to uint"; break; case EOpConvDoubleToUint64: out.debug << "Convert double to uint64"; break; - case EOpConvInt64ToUint64: out.debug << "Convert uint64 to uint64"; break; + case EOpRadians: out.debug << "radians"; break; case EOpDegrees: out.debug << "degrees"; break; @@ -309,12 +454,10 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpDoubleBitsToUint64: out.debug << "doubleBitsToUint64"; break; case EOpInt64BitsToDouble: out.debug << "int64BitsToDouble"; break; case EOpUint64BitsToDouble: out.debug << "uint64BitsToDouble"; break; -#ifdef AMD_EXTENSIONS case EOpFloat16BitsToInt16: out.debug << "float16BitsToInt16"; break; case EOpFloat16BitsToUint16: out.debug << "float16BitsToUint16"; break; case EOpInt16BitsToFloat16: out.debug << "int16BitsToFloat16"; break; case EOpUint16BitsToFloat16: out.debug << "uint16BitsToFloat16"; break; -#endif case EOpPackSnorm2x16: out.debug << "packSnorm2x16"; break; case EOpUnpackSnorm2x16:out.debug << "unpackSnorm2x16"; break; @@ -322,6 +465,12 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpUnpackUnorm2x16:out.debug << "unpackUnorm2x16"; break; case EOpPackHalf2x16: out.debug << "packHalf2x16"; break; case EOpUnpackHalf2x16: out.debug << "unpackHalf2x16"; break; + case EOpPack16: out.debug << "pack16"; break; + case EOpPack32: out.debug << "pack32"; break; + case EOpPack64: out.debug << "pack64"; break; + case EOpUnpack32: out.debug << "unpack32"; break; + case EOpUnpack16: out.debug << "unpack16"; break; + case EOpUnpack8: out.debug << "unpack8"; break; case EOpPackSnorm4x8: out.debug << "PackSnorm4x8"; break; case EOpUnpackSnorm4x8: out.debug << "UnpackSnorm4x8"; break; @@ -335,7 +484,6 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpPackUint2x32: out.debug << "packUint2x32"; break; case EOpUnpackUint2x32: out.debug << "unpackUint2x32"; break; -#ifdef AMD_EXTENSIONS case EOpPackInt2x16: out.debug << "packInt2x16"; break; case EOpUnpackInt2x16: out.debug << "unpackInt2x16"; break; case EOpPackUint2x16: out.debug << "packUint2x16"; break; @@ -345,10 +493,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpUnpackInt4x16: out.debug << "unpackInt4x16"; break; case EOpPackUint4x16: out.debug << "packUint4x16"; break; case EOpUnpackUint4x16: out.debug << "unpackUint4x16"; break; - case EOpPackFloat2x16: out.debug << "packFloat2x16"; break; case EOpUnpackFloat2x16: out.debug << "unpackFloat2x16"; break; -#endif case EOpLength: out.debug << "length"; break; case EOpNormalize: out.debug << "normalize"; break; @@ -402,6 +548,82 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpAllInvocations: out.debug << "allInvocations"; break; case EOpAllInvocationsEqual: out.debug << "allInvocationsEqual"; break; + case EOpSubgroupElect: out.debug << "subgroupElect"; break; + case EOpSubgroupAll: out.debug << "subgroupAll"; break; + case EOpSubgroupAny: out.debug << "subgroupAny"; break; + case EOpSubgroupAllEqual: out.debug << "subgroupAllEqual"; break; + case EOpSubgroupBroadcast: out.debug << "subgroupBroadcast"; break; + case EOpSubgroupBroadcastFirst: out.debug << "subgroupBroadcastFirst"; break; + case EOpSubgroupBallot: out.debug << "subgroupBallot"; break; + case EOpSubgroupInverseBallot: out.debug << "subgroupInverseBallot"; break; + case EOpSubgroupBallotBitExtract: out.debug << "subgroupBallotBitExtract"; break; + case EOpSubgroupBallotBitCount: out.debug << "subgroupBallotBitCount"; break; + case EOpSubgroupBallotInclusiveBitCount: out.debug << "subgroupBallotInclusiveBitCount"; break; + case EOpSubgroupBallotExclusiveBitCount: out.debug << "subgroupBallotExclusiveBitCount"; break; + case EOpSubgroupBallotFindLSB: out.debug << "subgroupBallotFindLSB"; break; + case EOpSubgroupBallotFindMSB: out.debug << "subgroupBallotFindMSB"; break; + case EOpSubgroupShuffle: out.debug << "subgroupShuffle"; break; + case EOpSubgroupShuffleXor: out.debug << "subgroupShuffleXor"; break; + case EOpSubgroupShuffleUp: out.debug << "subgroupShuffleUp"; break; + case EOpSubgroupShuffleDown: out.debug << "subgroupShuffleDown"; break; + case EOpSubgroupAdd: out.debug << "subgroupAdd"; break; + case EOpSubgroupMul: out.debug << "subgroupMul"; break; + case EOpSubgroupMin: out.debug << "subgroupMin"; break; + case EOpSubgroupMax: out.debug << "subgroupMax"; break; + case EOpSubgroupAnd: out.debug << "subgroupAnd"; break; + case EOpSubgroupOr: out.debug << "subgroupOr"; break; + case EOpSubgroupXor: out.debug << "subgroupXor"; break; + case EOpSubgroupInclusiveAdd: out.debug << "subgroupInclusiveAdd"; break; + case EOpSubgroupInclusiveMul: out.debug << "subgroupInclusiveMul"; break; + case EOpSubgroupInclusiveMin: out.debug << "subgroupInclusiveMin"; break; + case EOpSubgroupInclusiveMax: out.debug << "subgroupInclusiveMax"; break; + case EOpSubgroupInclusiveAnd: out.debug << "subgroupInclusiveAnd"; break; + case EOpSubgroupInclusiveOr: out.debug << "subgroupInclusiveOr"; break; + case EOpSubgroupInclusiveXor: out.debug << "subgroupInclusiveXor"; break; + case EOpSubgroupExclusiveAdd: out.debug << "subgroupExclusiveAdd"; break; + case EOpSubgroupExclusiveMul: out.debug << "subgroupExclusiveMul"; break; + case EOpSubgroupExclusiveMin: out.debug << "subgroupExclusiveMin"; break; + case EOpSubgroupExclusiveMax: out.debug << "subgroupExclusiveMax"; break; + case EOpSubgroupExclusiveAnd: out.debug << "subgroupExclusiveAnd"; break; + case EOpSubgroupExclusiveOr: out.debug << "subgroupExclusiveOr"; break; + case EOpSubgroupExclusiveXor: out.debug << "subgroupExclusiveXor"; break; + case EOpSubgroupClusteredAdd: out.debug << "subgroupClusteredAdd"; break; + case EOpSubgroupClusteredMul: out.debug << "subgroupClusteredMul"; break; + case EOpSubgroupClusteredMin: out.debug << "subgroupClusteredMin"; break; + case EOpSubgroupClusteredMax: out.debug << "subgroupClusteredMax"; break; + case EOpSubgroupClusteredAnd: out.debug << "subgroupClusteredAnd"; break; + case EOpSubgroupClusteredOr: out.debug << "subgroupClusteredOr"; break; + case EOpSubgroupClusteredXor: out.debug << "subgroupClusteredXor"; break; + case EOpSubgroupQuadBroadcast: out.debug << "subgroupQuadBroadcast"; break; + case EOpSubgroupQuadSwapHorizontal: out.debug << "subgroupQuadSwapHorizontal"; break; + case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break; + case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break; + +#ifdef NV_EXTENSIONS + case EOpSubgroupPartition: out.debug << "subgroupPartitionNV"; break; + case EOpSubgroupPartitionedAdd: out.debug << "subgroupPartitionedAddNV"; break; + case EOpSubgroupPartitionedMul: out.debug << "subgroupPartitionedMulNV"; break; + case EOpSubgroupPartitionedMin: out.debug << "subgroupPartitionedMinNV"; break; + case EOpSubgroupPartitionedMax: out.debug << "subgroupPartitionedMaxNV"; break; + case EOpSubgroupPartitionedAnd: out.debug << "subgroupPartitionedAndNV"; break; + case EOpSubgroupPartitionedOr: out.debug << "subgroupPartitionedOrNV"; break; + case EOpSubgroupPartitionedXor: out.debug << "subgroupPartitionedXorNV"; break; + case EOpSubgroupPartitionedInclusiveAdd: out.debug << "subgroupPartitionedInclusiveAddNV"; break; + case EOpSubgroupPartitionedInclusiveMul: out.debug << "subgroupPartitionedInclusiveMulNV"; break; + case EOpSubgroupPartitionedInclusiveMin: out.debug << "subgroupPartitionedInclusiveMinNV"; break; + case EOpSubgroupPartitionedInclusiveMax: out.debug << "subgroupPartitionedInclusiveMaxNV"; break; + case EOpSubgroupPartitionedInclusiveAnd: out.debug << "subgroupPartitionedInclusiveAndNV"; break; + case EOpSubgroupPartitionedInclusiveOr: out.debug << "subgroupPartitionedInclusiveOrNV"; break; + case EOpSubgroupPartitionedInclusiveXor: out.debug << "subgroupPartitionedInclusiveXorNV"; break; + case EOpSubgroupPartitionedExclusiveAdd: out.debug << "subgroupPartitionedExclusiveAddNV"; break; + case EOpSubgroupPartitionedExclusiveMul: out.debug << "subgroupPartitionedExclusiveMulNV"; break; + case EOpSubgroupPartitionedExclusiveMin: out.debug << "subgroupPartitionedExclusiveMinNV"; break; + case EOpSubgroupPartitionedExclusiveMax: out.debug << "subgroupPartitionedExclusiveMaxNV"; break; + case EOpSubgroupPartitionedExclusiveAnd: out.debug << "subgroupPartitionedExclusiveAndNV"; break; + case EOpSubgroupPartitionedExclusiveOr: out.debug << "subgroupPartitionedExclusiveOrNV"; break; + case EOpSubgroupPartitionedExclusiveXor: out.debug << "subgroupPartitionedExclusiveXorNV"; break; +#endif + case EOpClip: out.debug << "clip"; break; case EOpIsFinite: out.debug << "isfinite"; break; case EOpLog10: out.debug << "log10"; break; @@ -434,62 +656,11 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpMbcnt: out.debug << "mbcnt"; break; - case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; - case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; - case EOpFragmentMaskFetch: out.debug << "fragmentMaskFetchAMD"; break; case EOpFragmentFetch: out.debug << "fragmentFetchAMD"; break; - case EOpConvBoolToFloat16: out.debug << "Convert bool to float16"; break; - case EOpConvIntToFloat16: out.debug << "Convert int to float16"; break; - case EOpConvUintToFloat16: out.debug << "Convert uint to float16"; break; - case EOpConvFloatToFloat16: out.debug << "Convert float to float16"; break; - case EOpConvDoubleToFloat16: out.debug << "Convert double to float16"; break; - case EOpConvInt64ToFloat16: out.debug << "Convert int64 to float16"; break; - case EOpConvUint64ToFloat16: out.debug << "Convert uint64 to float16"; break; - case EOpConvFloat16ToBool: out.debug << "Convert float16 to bool"; break; - case EOpConvFloat16ToInt: out.debug << "Convert float16 to int"; break; - case EOpConvFloat16ToUint: out.debug << "Convert float16 to uint"; break; - case EOpConvFloat16ToFloat: out.debug << "Convert float16 to float"; break; - case EOpConvFloat16ToDouble: out.debug << "Convert float16 to double"; break; - case EOpConvFloat16ToInt64: out.debug << "Convert float16 to int64"; break; - case EOpConvFloat16ToUint64: out.debug << "Convert float16 to uint64"; break; - - case EOpConvBoolToInt16: out.debug << "Convert bool to int16"; break; - case EOpConvIntToInt16: out.debug << "Convert int to int16"; break; - case EOpConvUintToInt16: out.debug << "Convert uint to int16"; break; - case EOpConvFloatToInt16: out.debug << "Convert float to int16"; break; - case EOpConvDoubleToInt16: out.debug << "Convert double to int16"; break; - case EOpConvFloat16ToInt16: out.debug << "Convert float16 to int16"; break; - case EOpConvInt64ToInt16: out.debug << "Convert int64 to int16"; break; - case EOpConvUint64ToInt16: out.debug << "Convert uint64 to int16"; break; - case EOpConvUint16ToInt16: out.debug << "Convert uint16 to int16"; break; - case EOpConvInt16ToBool: out.debug << "Convert int16 to bool"; break; - case EOpConvInt16ToInt: out.debug << "Convert int16 to int"; break; - case EOpConvInt16ToUint: out.debug << "Convert int16 to uint"; break; - case EOpConvInt16ToFloat: out.debug << "Convert int16 to float"; break; - case EOpConvInt16ToDouble: out.debug << "Convert int16 to double"; break; - case EOpConvInt16ToFloat16: out.debug << "Convert int16 to float16"; break; - case EOpConvInt16ToInt64: out.debug << "Convert int16 to int64"; break; - case EOpConvInt16ToUint64: out.debug << "Convert int16 to uint64"; break; - - case EOpConvBoolToUint16: out.debug << "Convert bool to uint16"; break; - case EOpConvIntToUint16: out.debug << "Convert int to uint16"; break; - case EOpConvUintToUint16: out.debug << "Convert uint to uint16"; break; - case EOpConvFloatToUint16: out.debug << "Convert float to uint16"; break; - case EOpConvDoubleToUint16: out.debug << "Convert double to uint16"; break; - case EOpConvFloat16ToUint16: out.debug << "Convert float16 to uint16"; break; - case EOpConvInt64ToUint16: out.debug << "Convert int64 to uint16"; break; - case EOpConvUint64ToUint16: out.debug << "Convert uint64 to uint16"; break; - case EOpConvInt16ToUint16: out.debug << "Convert int16 to uint16"; break; - case EOpConvUint16ToBool: out.debug << "Convert uint16 to bool"; break; - case EOpConvUint16ToInt: out.debug << "Convert uint16 to int"; break; - case EOpConvUint16ToUint: out.debug << "Convert uint16 to uint"; break; - case EOpConvUint16ToFloat: out.debug << "Convert uint16 to float"; break; - case EOpConvUint16ToDouble: out.debug << "Convert uint16 to double"; break; - case EOpConvUint16ToFloat16: out.debug << "Convert uint16 to float16"; break; - case EOpConvUint16ToInt64: out.debug << "Convert uint16 to int64"; break; - case EOpConvUint16ToUint64: out.debug << "Convert uint16 to uint64"; break; + case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; + case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; #endif case EOpSubpassLoad: out.debug << "subpassLoad"; break; @@ -537,23 +708,30 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructBVec2: out.debug << "Construct bvec2"; break; case EOpConstructBVec3: out.debug << "Construct bvec3"; break; case EOpConstructBVec4: out.debug << "Construct bvec4"; break; + case EOpConstructInt8: out.debug << "Construct int8_t"; break; + case EOpConstructI8Vec2: out.debug << "Construct i8vec2"; break; + case EOpConstructI8Vec3: out.debug << "Construct i8vec3"; break; + case EOpConstructI8Vec4: out.debug << "Construct i8vec4"; break; case EOpConstructInt: out.debug << "Construct int"; break; case EOpConstructIVec2: out.debug << "Construct ivec2"; break; case EOpConstructIVec3: out.debug << "Construct ivec3"; break; case EOpConstructIVec4: out.debug << "Construct ivec4"; break; + case EOpConstructUint8: out.debug << "Construct uint8_t"; break; + case EOpConstructU8Vec2: out.debug << "Construct u8vec2"; break; + case EOpConstructU8Vec3: out.debug << "Construct u8vec3"; break; + case EOpConstructU8Vec4: out.debug << "Construct u8vec4"; break; case EOpConstructUint: out.debug << "Construct uint"; break; case EOpConstructUVec2: out.debug << "Construct uvec2"; break; case EOpConstructUVec3: out.debug << "Construct uvec3"; break; case EOpConstructUVec4: out.debug << "Construct uvec4"; break; - case EOpConstructInt64: out.debug << "Construct int64_t"; break; + case EOpConstructInt64: out.debug << "Construct int64"; break; case EOpConstructI64Vec2: out.debug << "Construct i64vec2"; break; case EOpConstructI64Vec3: out.debug << "Construct i64vec3"; break; case EOpConstructI64Vec4: out.debug << "Construct i64vec4"; break; - case EOpConstructUint64: out.debug << "Construct uint64_t"; break; + case EOpConstructUint64: out.debug << "Construct uint64"; break; case EOpConstructU64Vec2: out.debug << "Construct u64vec2"; break; case EOpConstructU64Vec3: out.debug << "Construct u64vec3"; break; case EOpConstructU64Vec4: out.debug << "Construct u64vec4"; break; -#ifdef AMD_EXTENSIONS case EOpConstructInt16: out.debug << "Construct int16_t"; break; case EOpConstructI16Vec2: out.debug << "Construct i16vec2"; break; case EOpConstructI16Vec3: out.debug << "Construct i16vec3"; break; @@ -562,7 +740,6 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructU16Vec2: out.debug << "Construct u16vec2"; break; case EOpConstructU16Vec3: out.debug << "Construct u16vec3"; break; case EOpConstructU16Vec4: out.debug << "Construct u16vec4"; break; -#endif case EOpConstructMat2x2: out.debug << "Construct mat2"; break; case EOpConstructMat2x3: out.debug << "Construct mat2x3"; break; case EOpConstructMat2x4: out.debug << "Construct mat2x4"; break; @@ -608,7 +785,6 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructBMat4x2: out.debug << "Construct bmat4x2"; break; case EOpConstructBMat4x3: out.debug << "Construct bmat4x3"; break; case EOpConstructBMat4x4: out.debug << "Construct bmat4"; break; -#ifdef AMD_EXTENSIONS case EOpConstructFloat16: out.debug << "Construct float16_t"; break; case EOpConstructF16Vec2: out.debug << "Construct f16vec2"; break; case EOpConstructF16Vec3: out.debug << "Construct f16vec3"; break; @@ -622,7 +798,6 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructF16Mat4x2: out.debug << "Construct f16mat4x2"; break; case EOpConstructF16Mat4x3: out.debug << "Construct f16mat4x3"; break; case EOpConstructF16Mat4x4: out.debug << "Construct f16mat4"; break; -#endif case EOpConstructStruct: out.debug << "Construct structure"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; @@ -791,10 +966,67 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpGenMul: out.debug << "mul"; break; case EOpAllMemoryBarrierWithGroupSync: out.debug << "AllMemoryBarrierWithGroupSync"; break; - case EOpGroupMemoryBarrierWithGroupSync: out.debug << "GroupMemoryBarrierWithGroupSync"; break; + case EOpDeviceMemoryBarrier: out.debug << "DeviceMemoryBarrier"; break; + case EOpDeviceMemoryBarrierWithGroupSync: out.debug << "DeviceMemoryBarrierWithGroupSync"; break; case EOpWorkgroupMemoryBarrier: out.debug << "WorkgroupMemoryBarrier"; break; case EOpWorkgroupMemoryBarrierWithGroupSync: out.debug << "WorkgroupMemoryBarrierWithGroupSync"; break; + case EOpSubgroupBarrier: out.debug << "subgroupBarrier"; break; + case EOpSubgroupMemoryBarrier: out.debug << "subgroupMemoryBarrier"; break; + case EOpSubgroupMemoryBarrierBuffer: out.debug << "subgroupMemoryBarrierBuffer"; break; + case EOpSubgroupMemoryBarrierImage: out.debug << "subgroupMemoryBarrierImage"; break; + case EOpSubgroupMemoryBarrierShared: out.debug << "subgroupMemoryBarrierShared"; break; + case EOpSubgroupElect: out.debug << "subgroupElect"; break; + case EOpSubgroupAll: out.debug << "subgroupAll"; break; + case EOpSubgroupAny: out.debug << "subgroupAny"; break; + case EOpSubgroupAllEqual: out.debug << "subgroupAllEqual"; break; + case EOpSubgroupBroadcast: out.debug << "subgroupBroadcast"; break; + case EOpSubgroupBroadcastFirst: out.debug << "subgroupBroadcastFirst"; break; + case EOpSubgroupBallot: out.debug << "subgroupBallot"; break; + case EOpSubgroupInverseBallot: out.debug << "subgroupInverseBallot"; break; + case EOpSubgroupBallotBitExtract: out.debug << "subgroupBallotBitExtract"; break; + case EOpSubgroupBallotBitCount: out.debug << "subgroupBallotBitCount"; break; + case EOpSubgroupBallotInclusiveBitCount: out.debug << "subgroupBallotInclusiveBitCount"; break; + case EOpSubgroupBallotExclusiveBitCount: out.debug << "subgroupBallotExclusiveBitCount"; break; + case EOpSubgroupBallotFindLSB: out.debug << "subgroupBallotFindLSB"; break; + case EOpSubgroupBallotFindMSB: out.debug << "subgroupBallotFindMSB"; break; + case EOpSubgroupShuffle: out.debug << "subgroupShuffle"; break; + case EOpSubgroupShuffleXor: out.debug << "subgroupShuffleXor"; break; + case EOpSubgroupShuffleUp: out.debug << "subgroupShuffleUp"; break; + case EOpSubgroupShuffleDown: out.debug << "subgroupShuffleDown"; break; + case EOpSubgroupAdd: out.debug << "subgroupAdd"; break; + case EOpSubgroupMul: out.debug << "subgroupMul"; break; + case EOpSubgroupMin: out.debug << "subgroupMin"; break; + case EOpSubgroupMax: out.debug << "subgroupMax"; break; + case EOpSubgroupAnd: out.debug << "subgroupAnd"; break; + case EOpSubgroupOr: out.debug << "subgroupOr"; break; + case EOpSubgroupXor: out.debug << "subgroupXor"; break; + case EOpSubgroupInclusiveAdd: out.debug << "subgroupInclusiveAdd"; break; + case EOpSubgroupInclusiveMul: out.debug << "subgroupInclusiveMul"; break; + case EOpSubgroupInclusiveMin: out.debug << "subgroupInclusiveMin"; break; + case EOpSubgroupInclusiveMax: out.debug << "subgroupInclusiveMax"; break; + case EOpSubgroupInclusiveAnd: out.debug << "subgroupInclusiveAnd"; break; + case EOpSubgroupInclusiveOr: out.debug << "subgroupInclusiveOr"; break; + case EOpSubgroupInclusiveXor: out.debug << "subgroupInclusiveXor"; break; + case EOpSubgroupExclusiveAdd: out.debug << "subgroupExclusiveAdd"; break; + case EOpSubgroupExclusiveMul: out.debug << "subgroupExclusiveMul"; break; + case EOpSubgroupExclusiveMin: out.debug << "subgroupExclusiveMin"; break; + case EOpSubgroupExclusiveMax: out.debug << "subgroupExclusiveMax"; break; + case EOpSubgroupExclusiveAnd: out.debug << "subgroupExclusiveAnd"; break; + case EOpSubgroupExclusiveOr: out.debug << "subgroupExclusiveOr"; break; + case EOpSubgroupExclusiveXor: out.debug << "subgroupExclusiveXor"; break; + case EOpSubgroupClusteredAdd: out.debug << "subgroupClusteredAdd"; break; + case EOpSubgroupClusteredMul: out.debug << "subgroupClusteredMul"; break; + case EOpSubgroupClusteredMin: out.debug << "subgroupClusteredMin"; break; + case EOpSubgroupClusteredMax: out.debug << "subgroupClusteredMax"; break; + case EOpSubgroupClusteredAnd: out.debug << "subgroupClusteredAnd"; break; + case EOpSubgroupClusteredOr: out.debug << "subgroupClusteredOr"; break; + case EOpSubgroupClusteredXor: out.debug << "subgroupClusteredXor"; break; + case EOpSubgroupQuadBroadcast: out.debug << "subgroupQuadBroadcast"; break; + case EOpSubgroupQuadSwapHorizontal: out.debug << "subgroupQuadSwapHorizontal"; break; + case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break; + case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break; + case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; @@ -816,7 +1048,15 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node OutputTreeText(out, node, depth); out.debug << "Test condition and select"; - out.debug << " (" << node->getCompleteString() << ")\n"; + out.debug << " (" << node->getCompleteString() << ")"; + + if (node->getShortCircuit() == false) + out.debug << ": no shortcircuit"; + if (node->getFlatten()) + out.debug << ": Flatten"; + if (node->getDontFlatten()) + out.debug << ": DontFlatten"; + out.debug << "\n"; ++depth; @@ -861,9 +1101,7 @@ static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const break; case EbtFloat: case EbtDouble: -#ifdef AMD_EXTENSIONS case EbtFloat16: -#endif { const double value = constUnion[i].getDConst(); // Print infinities and NaNs in a portable way. @@ -883,62 +1121,78 @@ static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const } } break; - case EbtInt: + case EbtInt8: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int"); + snprintf(buf, maxSize, "%d (%s)", constUnion[i].getI8Const(), "const int8_t"); out.debug << buf << "\n"; } break; - case EbtUint: + case EbtUint8: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint"); + snprintf(buf, maxSize, "%u (%s)", constUnion[i].getU8Const(), "const uint8_t"); out.debug << buf << "\n"; } break; - case EbtInt64: + case EbtInt16: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%lld (%s)", constUnion[i].getI64Const(), "const int64_t"); + snprintf(buf, maxSize, "%d (%s)", constUnion[i].getI16Const(), "const int16_t"); out.debug << buf << "\n"; } break; - case EbtUint64: + case EbtUint16: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%llu (%s)", constUnion[i].getU64Const(), "const uint64_t"); + snprintf(buf, maxSize, "%u (%s)", constUnion[i].getU16Const(), "const uint16_t"); out.debug << buf << "\n"; } break; -#ifdef AMD_EXTENSIONS - case EbtInt16: + case EbtInt: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int16_t"); + snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int"); out.debug << buf << "\n"; } break; - case EbtUint16: + case EbtUint: { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint16_t"); + snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint"); + + out.debug << buf << "\n"; + } + break; + case EbtInt64: + { + const int maxSize = 300; + char buf[maxSize]; + snprintf(buf, maxSize, "%lld (%s)", constUnion[i].getI64Const(), "const int64_t"); + + out.debug << buf << "\n"; + } + break; + case EbtUint64: + { + const int maxSize = 300; + char buf[maxSize]; + snprintf(buf, maxSize, "%llu (%s)", constUnion[i].getU64Const(), "const uint64_t"); out.debug << buf << "\n"; } break; -#endif default: out.info.message(EPrefixInternalError, "Unknown constant", node->getLoc()); break; @@ -978,7 +1232,17 @@ bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node) out.debug << "Loop with condition "; if (! node->testFirst()) out.debug << "not "; - out.debug << "tested first\n"; + out.debug << "tested first"; + + if (node->getUnroll()) + out.debug << ": Unroll"; + if (node->getDontUnroll()) + out.debug << ": DontUnroll"; + if (node->getLoopDependency()) { + out.debug << ": Dependency "; + out.debug << node->getLoopDependency(); + } + out.debug << "\n"; ++depth; @@ -1039,7 +1303,13 @@ bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node) TInfoSink& out = infoSink; OutputTreeText(out, node, depth); - out.debug << "switch\n"; + out.debug << "switch"; + + if (node->getFlatten()) + out.debug << ": Flatten"; + if (node->getDontFlatten()) + out.debug << ": DontFlatten"; + out.debug << "\n"; OutputTreeText(out, node, depth); out.debug << "condition\n"; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/iomapper.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/iomapper.cpp index a7d9d91d19c04afa2be3d95763a7f708ac5d5d8c..ad22353b45c79b54a0c674486cf4940739410643 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/iomapper.cpp @@ -353,7 +353,9 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver { TDefaultIoResolverBase(const TIntermediate &intermediate) : intermediate(intermediate), - nextUniformLocation(0) + nextUniformLocation(0), + nextInputLocation(0), + nextOutputLocation(0) { } int getBaseBinding(TResourceType res, unsigned int set) const { @@ -429,7 +431,9 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver // no locations added if already present, a built-in variable, a block, or an opaque if (type.getQualifier().hasLocation() || type.isBuiltIn() || - type.getBasicType() == EbtBlock || type.containsOpaque()) + type.getBasicType() == EbtBlock || + type.getBasicType() == EbtAtomicUint || + (type.containsOpaque() && intermediate.getSpv().openGl == 0)) return -1; // no locations on blocks of built-in variables @@ -440,13 +444,17 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver return -1; } - return nextUniformLocation++; + int location = nextUniformLocation; + + nextUniformLocation += TIntermediate::computeTypeUniformLocationSize(type); + + return location; } bool validateInOut(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override { return true; } - int resolveInOutLocation(EShLanguage /*stage*/, const char* /*name*/, const TType& type, bool /*is_live*/) override + int resolveInOutLocation(EShLanguage stage, const char* /*name*/, const TType& type, bool /*is_live*/) override { // kick out of not doing this if (!doAutoLocationMapping()) @@ -464,14 +472,15 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver return -1; } - // Placeholder. - // TODO: It would be nice to flesh this out using - // intermediate->computeTypeLocationSize(type), or functions that call it like - // intermediate->addUsedLocation() - // These in turn would want the intermediate, which is not available here, but - // is available in many places, and a lot of copying from it could be saved if - // it were just available. - return 0; + // point to the right input or output location counter + int& nextLocation = type.getQualifier().isPipeInput() ? nextInputLocation : nextOutputLocation; + + // Placeholder. This does not do proper cross-stage lining up, nor + // work with mixed location/no-location declarations. + int location = nextLocation; + nextLocation += TIntermediate::computeTypeLocationSize(type, stage); + + return location; } int resolveInOutComponent(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override { @@ -492,6 +501,8 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver protected: const TIntermediate &intermediate; int nextUniformLocation; + int nextInputLocation; + int nextOutputLocation; // Return descriptor set specific base if there is one, and the generic base otherwise. int selectBaseBinding(int base, int descriptorSetBase) const { @@ -593,7 +604,7 @@ protected: /******************************************************************************** The following IO resolver maps types in HLSL register space, as follows: -t – for shader resource views (SRV) +t - for shader resource views (SRV) TEXTURE1D TEXTURE1DARRAY TEXTURE2D @@ -608,7 +619,7 @@ t – for shader resource views (SRV) BUFFER TBUFFER -s – for samplers +s - for samplers SAMPLER SAMPLER1D SAMPLER2D @@ -617,7 +628,7 @@ s – for samplers SAMPLERSTATE SAMPLERCOMPARISONSTATE -u – for unordered access views (UAV) +u - for unordered access views (UAV) RWBYTEADDRESSBUFFER RWSTRUCTUREDBUFFER APPENDSTRUCTUREDBUFFER @@ -629,7 +640,7 @@ u – for unordered access views (UAV) RWTEXTURE2DARRAY RWTEXTURE3D -b – for constant buffer views (CBV) +b - for constant buffer views (CBV) CBUFFER CONSTANTBUFFER ********************************************************************************/ diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/linkValidate.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/linkValidate.cpp index 9ca1557b50effb554d282ff59a028fa9c0b55aa2..c540ae64775f3f6cc16a175ef635d6d0ed3c3f6d 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -1,5 +1,6 @@ // // Copyright (C) 2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -267,10 +268,13 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin // Recursively merge the implicit array sizes through the objects' respective type trees. void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) { - if (type.isImplicitlySizedArray() && unitType.isArray()) { - int newImplicitArraySize = unitType.isImplicitlySizedArray() ? unitType.getImplicitArraySize() : unitType.getOuterArraySize(); - if (newImplicitArraySize > type.getImplicitArraySize ()) - type.setImplicitArraySize(newImplicitArraySize); + if (type.isUnsizedArray()) { + if (unitType.isUnsizedArray()) { + type.updateImplicitArraySize(unitType.getImplicitArraySize()); + if (unitType.isArrayVariablyIndexed()) + type.setArrayVariablyIndexed(); + } else if (unitType.isSizedArray()) + type.changeOuterArraySize(unitType.getOuterArraySize()); } // Type mismatches are caught and reported after this, just be careful for now. @@ -293,8 +297,13 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy // Types have to match if (symbol.getType() != unitSymbol.getType()) { - error(infoSink, "Types must match:"); - writeTypeComparison = true; + // but, we make an exception if one is an implicit array and the other is sized + if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() && + symbol.getType().sameElementType(unitSymbol.getType()) && + (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) { + error(infoSink, "Types must match:"); + writeTypeComparison = true; + } } // Qualifiers have to (almost) match @@ -510,7 +519,9 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) virtual void visitSymbol(TIntermSymbol* symbol) { // Implicitly size arrays. - symbol->getWritableType().adoptImplicitArraySizes(); + // If an unsized array is left as unsized, it effectively + // becomes run-time sized. + symbol->getWritableType().adoptImplicitArraySizes(false); } } finalLinkTraverser; @@ -765,7 +776,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ int size; if (qualifier.isUniformOrBuffer()) { - if (type.isExplicitlySizedArray()) + if (type.isSizedArray()) size = type.getCumulativeArraySize(); else size = 1; @@ -773,9 +784,9 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // Strip off the outer array dimension for those having an extra one. if (type.isArray() && qualifier.isArrayedIo(language)) { TType elementType(type, 0); - size = computeTypeLocationSize(elementType); + size = computeTypeLocationSize(elementType, language); } else - size = computeTypeLocationSize(type); + size = computeTypeLocationSize(type, language); } // Locations, and components within locations. @@ -836,8 +847,8 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // combine location and component ranges TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.layoutIndex : 0); - // check for collisions, except for vertex inputs on desktop - if (! (profile != EEsProfile && language == EShLangVertex && qualifier.isPipeInput())) + // check for collisions, except for vertex inputs on desktop targeting OpenGL + if (! (profile != EEsProfile && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) collision = checkLocationRange(set, range, type, typeCollision); if (collision < 0) @@ -907,18 +918,18 @@ bool TIntermediate::addUsedConstantId(int id) // Recursively figure out how many locations are used up by an input or output type. // Return the size of type, as measured by "locations". -int TIntermediate::computeTypeLocationSize(const TType& type) const +int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage) { // "If the declared input is an array of size n and each element takes m locations, it will be assigned m * n // consecutive locations..." if (type.isArray()) { // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness + // TODO: are there valid cases of having an unsized array with a location? If so, running this code too early. TType elementType(type, 0); - if (type.isImplicitlySizedArray()) { - // TODO: are there valid cases of having an implicitly-sized array with a location? If so, running this code too early. - return computeTypeLocationSize(elementType); - } else - return type.getOuterArraySize() * computeTypeLocationSize(elementType); + if (type.isSizedArray()) + return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage); + else + return computeTypeLocationSize(elementType, stage); } // "The locations consumed by block and structure members are determined by applying the rules above @@ -927,7 +938,7 @@ int TIntermediate::computeTypeLocationSize(const TType& type) const int size = 0; for (int member = 0; member < (int)type.getStruct()->size(); ++member) { TType memberType(type, member); - size += computeTypeLocationSize(memberType); + size += computeTypeLocationSize(memberType, stage); } return size; } @@ -941,7 +952,7 @@ int TIntermediate::computeTypeLocationSize(const TType& type) const if (type.isScalar()) return 1; if (type.isVector()) { - if (language == EShLangVertex && type.getQualifier().isPipeInput()) + if (stage == EShLangVertex && type.getQualifier().isPipeInput()) return 1; if (type.getBasicType() == EbtDouble && type.getVectorSize() > 2) return 2; @@ -954,13 +965,44 @@ int TIntermediate::computeTypeLocationSize(const TType& type) const // for an n-element array of m-component vectors..." if (type.isMatrix()) { TType columnType(type, 0); - return type.getMatrixCols() * computeTypeLocationSize(columnType); + return type.getMatrixCols() * computeTypeLocationSize(columnType, stage); } assert(0); return 1; } +// Same as computeTypeLocationSize but for uniforms +int TIntermediate::computeTypeUniformLocationSize(const TType& type) +{ + // "Individual elements of a uniform array are assigned + // consecutive locations with the first element taking location + // location." + if (type.isArray()) { + // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness + TType elementType(type, 0); + if (type.isSizedArray()) { + return type.getOuterArraySize() * computeTypeUniformLocationSize(elementType); + } else { + // TODO: are there valid cases of having an implicitly-sized array with a location? If so, running this code too early. + return computeTypeUniformLocationSize(elementType); + } + } + + // "Each subsequent inner-most member or element gets incremental + // locations for the entire structure or array." + if (type.isStruct()) { + int size = 0; + for (int member = 0; member < (int)type.getStruct()->size(); ++member) { + TType memberType(type, member); + size += computeTypeUniformLocationSize(memberType); + } + return size; + } + + return 1; +} + // Accumulate xfb buffer ranges and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1005,7 +1047,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains if (type.isArray()) { // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness - assert(type.isExplicitlySizedArray()); + assert(type.isSizedArray()); TType elementType(type, 0); return type.getOuterArraySize() * computeTypeXfbSize(elementType, containsDouble); } @@ -1064,11 +1106,11 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) case EbtInt64: case EbtUint64: case EbtDouble: size = 8; return 8; -#ifdef AMD_EXTENSIONS - case EbtInt16: - case EbtUint16: case EbtFloat16: size = 2; return 2; -#endif + case EbtInt8: + case EbtUint8: size = 1; return 1; + case EbtInt16: + case EbtUint16: size = 2; return 2; default: size = 4; return 4; } } @@ -1197,6 +1239,8 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b if (type.isVector()) { int scalarAlign = getBaseAlignmentScalar(type, size); switch (type.getVectorSize()) { + case 1: // HLSL has this, GLSL does not + return scalarAlign; case 2: size *= 2; return 2 * scalarAlign; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/localintermediate.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/localintermediate.h index 8495395251c49c874ab0c3eef32995d0486f4cce..17e076519282225cfb3e7b3edfb8ecb6ff159f07 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/localintermediate.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/localintermediate.h @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -78,7 +79,7 @@ public: assert(i < MaxSwizzleSelectors); return components[i]; } - + private: int size_; selectorType components[MaxSwizzleSelectors]; @@ -209,7 +210,7 @@ class TVariable; class TIntermediate { public: explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : - implicitThisName("@this"), + implicitThisName("@this"), implicitCounterName("@count"), language(l), source(EShSourceNone), profile(p), version(v), treeRoot(0), numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), @@ -217,6 +218,7 @@ public: pixelCenterInteger(false), originUpperLeft(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), postDepthCoverage(false), depthLayout(EldNone), depthReplacing(false), + hlslFunctionality1(false), blendEquations(0), xfbMode(false), multiStream(false), #ifdef NV_EXTENSIONS layoutOverrideCoverage(false), @@ -224,6 +226,7 @@ public: #endif autoMapBindings(false), autoMapLocations(false), + invertY(false), flattenUniformArrays(false), useUnknownFormat(false), hlslOffsets(false), @@ -271,7 +274,7 @@ public: unsigned int getShiftBinding(TResourceType res) const { return shiftBinding[res]; } - void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int shift) + void setShiftBindingForSet(TResourceType res, unsigned int shift, unsigned int set) { if (shift == 0) // ignore if there's no shift: it's a no-op. return; @@ -281,8 +284,8 @@ public: const char* name = getResourceName(res); if (name != nullptr) { processes.addProcess(name); - processes.addArgument(set); processes.addArgument(shift); + processes.addArgument(set); } } @@ -317,6 +320,14 @@ public: processes.addProcess("auto-map-locations"); } bool getAutoMapLocations() const { return autoMapLocations; } + void setInvertY(bool invert) + { + invertY = invert; + if (invertY) + processes.addProcess("invert-y"); + } + bool getInvertY() const { return invertY; } + void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; @@ -352,6 +363,13 @@ public: } bool usingHlslIoMapping() { return hlslIoMapping; } + template T addCounterBufferName(const T& name) const { return name + implicitCounterName; } + bool hasCounterBufferName(const TString& name) const { + size_t len = strlen(implicitCounterName); + return name.size() > len && + name.compare(name.size() - len, len, implicitCounterName) == 0; + } + void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; } void setVersion(int v) { version = v; } @@ -369,7 +387,7 @@ public: processes.addProcess("client opengl100"); // target-environment processes - if (spvVersion.vulkan == 100) + if (spvVersion.vulkan > 0) processes.addProcess("target-env vulkan1.0"); else if (spvVersion.vulkan > 0) processes.addProcess("target-env vulkanUnknown"); @@ -394,6 +412,7 @@ public: TIntermSymbol* addSymbol(const TType&, const TSourceLoc&); TIntermSymbol* addSymbol(const TIntermSymbol&); TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*) const; + std::tuple addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1) const; TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*); void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode); TIntermTyped* addShapeConversion(const TType&, TIntermTyped*); @@ -403,6 +422,11 @@ public: TIntermTyped* addUnaryMath(TOperator, TIntermTyped* child, TSourceLoc); TIntermTyped* addBuiltInFunctionCall(const TSourceLoc& line, TOperator, bool unary, TIntermNode*, const TType& returnType); bool canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op = EOpNull) const; + bool isIntegralPromotion(TBasicType from, TBasicType to) const; + bool isFPPromotion(TBasicType from, TBasicType to) const; + bool isIntegralConversion(TBasicType from, TBasicType to) const; + bool isFPConversion(TBasicType from, TBasicType to) const; + bool isFPIntegralConversion(TBasicType from, TBasicType to) const; TOperator mapTypeToConstructorOp(const TType&) const; TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right); TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&); @@ -411,27 +435,27 @@ public: TIntermAggregate* makeAggregate(const TSourceLoc&); TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, TSourceLoc); bool areAllChildConst(TIntermAggregate* aggrNode); - TIntermTyped* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&, TSelectionControl = ESelectionControlNone); - TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&, TSelectionControl = ESelectionControlNone); + TIntermSelection* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&); + TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&); TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc&); TIntermTyped* addMethod(TIntermTyped*, const TType&, const TString*, const TSourceLoc&); TIntermConstantUnion* addConstantUnion(const TConstUnionArray&, const TType&, const TSourceLoc&, bool literal = false) const; + TIntermConstantUnion* addConstantUnion(signed char, const TSourceLoc&, bool literal = false) const; + TIntermConstantUnion* addConstantUnion(unsigned char, const TSourceLoc&, bool literal = false) const; + TIntermConstantUnion* addConstantUnion(signed short, const TSourceLoc&, bool literal = false) const; + TIntermConstantUnion* addConstantUnion(unsigned short, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(int, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned int, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(long long, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned long long, const TSourceLoc&, bool literal = false) const; -#ifdef AMD_EXTENSIONS - TIntermConstantUnion* addConstantUnion(short, const TSourceLoc&, bool literal = false) const; - TIntermConstantUnion* addConstantUnion(unsigned short, const TSourceLoc&, bool literal = false) const; - -#endif TIntermConstantUnion* addConstantUnion(bool, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(double, TBasicType, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(const TString*, const TSourceLoc&, bool literal = false) const; TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) const; bool parseConstTree(TIntermNode*, TConstUnionArray, TOperator, const TType&, bool singleConstantParam = false); - TIntermLoop* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&, TLoopControl = ELoopControlNone); - TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&, TLoopControl = ELoopControlNone); + TIntermLoop* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&); + TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, + const TSourceLoc&, TIntermLoop*&); TIntermBranch* addBranch(TOperator, const TSourceLoc&); TIntermBranch* addBranch(TOperator, TIntermTyped*, const TSourceLoc&); template TIntermTyped* addSwizzle(TSwizzleSelectors&, const TSourceLoc&); @@ -443,9 +467,6 @@ public: TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc) const; TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, TSourceLoc, const TType&) const; - // Add conversion from node's type to given basic type. - TIntermTyped* convertToBasicType(TOperator op, TBasicType basicType, TIntermTyped* node) const; - // Constant folding (in Constant.cpp) TIntermTyped* fold(TIntermAggregate* aggrNode); TIntermTyped* foldConstructor(TIntermAggregate* aggrNode); @@ -551,6 +572,9 @@ public: void setDepthReplacing() { depthReplacing = true; } bool isDepthReplacing() const { return depthReplacing; } + void setHlslFunctionality1() { hlslFunctionality1 = true; } + bool getHlslFunctionality1() const { return hlslFunctionality1; } + void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); } unsigned int getBlendEquations() const { return blendEquations; } @@ -565,7 +589,8 @@ public: int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision); int addUsedOffsets(int binding, int offset, int numOffsets); bool addUsedConstantId(int id); - int computeTypeLocationSize(const TType&) const; + static int computeTypeLocationSize(const TType&, EShLanguage); + static int computeTypeUniformLocationSize(const TType&); bool setXfbBufferStride(int buffer, unsigned stride) { @@ -574,6 +599,7 @@ public: xfbBuffers[buffer].stride = stride; return true; } + unsigned getXfbStride(int buffer) const { return xfbBuffers[buffer].stride; } int addXfbBufferOffset(const TType&); unsigned int computeTypeXfbSize(const TType&, bool& containsDouble) const; static int getBaseAlignmentScalar(const TType&, int& size); @@ -593,7 +619,7 @@ public: return semanticNameSet.insert(name).first->c_str(); } - void setSourceFile(const char* file) { sourceFile = file; } + void setSourceFile(const char* file) { if (file != nullptr) sourceFile = file; } const std::string& getSourceFile() const { return sourceFile; } void addSourceText(const char* text) { sourceText = sourceText + text; } const std::string& getSourceText() const { return sourceText; } @@ -609,6 +635,7 @@ public: bool needsLegalization() const { return needToLegalize; } const char* const implicitThisName; + const char* const implicitCounterName; protected: TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); @@ -624,6 +651,7 @@ protected: TIntermSequence& findLinkerObjects() const; bool userOutputUsed() const; bool isSpecializationOperation(const TIntermOperator&) const; + bool isNonuniformPropagating(TOperator) const; bool promoteUnary(TIntermUnary&); bool promoteBinary(TIntermBinary&); void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&); @@ -632,6 +660,10 @@ protected: void pushSelector(TIntermSequence&, const TMatrixSelector&, const TSourceLoc&); bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&); void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root); + bool isConversionAllowed(TOperator op, TIntermTyped* node) const; + TIntermUnary* createConversion(TBasicType convertTo, TIntermTyped* node) const; + std::tuple getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const; + bool extensionRequested(const char *extension) const {return requestedExtensions.find(extension) != requestedExtensions.end();} static const char* getResourceName(TResourceType); const EShLanguage language; // stage, known at construction time @@ -639,8 +671,8 @@ protected: std::string entryPointName; std::string entryPointMangledName; - EProfile profile; - int version; + EProfile profile; // source profile + int version; // source version SpvVersion spvVersion; TIntermNode* treeRoot; std::set requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them @@ -664,6 +696,7 @@ protected: bool postDepthCoverage; TLayoutDepth depthLayout; bool depthReplacing; + bool hlslFunctionality1; int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift bool xfbMode; bool multiStream; @@ -682,6 +715,7 @@ protected: std::vector resourceSetBinding; bool autoMapBindings; bool autoMapLocations; + bool invertY; bool flattenUniformArrays; bool useUnknownFormat; bool hlslOffsets; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/parseVersions.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/parseVersions.h index 5f26b4371d9dc52a910c5a33a25f0940d7c10682..b2aaa39955f6d7f4316b17f202f2f1d91877d9df 100755 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/parseVersions.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/parseVersions.h @@ -1,5 +1,6 @@ // // Copyright (C) 2016 Google, Inc. +// Copyright (C) 2017 ARM Limited. // // All rights reserved. // @@ -77,11 +78,16 @@ public: virtual void updateExtensionBehavior(int line, const char* const extension, const char* behavior); virtual void fullIntegerCheck(const TSourceLoc&, const char* op); virtual void doubleCheck(const TSourceLoc&, const char* op); -#ifdef AMD_EXTENSIONS - virtual void int16Check(const TSourceLoc& loc, const char* op, bool builtIn = false); virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false); +#ifdef AMD_EXTENSIONS + virtual void float16OpaqueCheck(const TSourceLoc&, const char* op, bool builtIn = false); #endif virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void explicitInt8Check(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void explicitInt16Check(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void spvRemoved(const TSourceLoc&, const char* op); virtual void vulkanRemoved(const TSourceLoc&, const char* op); virtual void requireVulkan(const TSourceLoc&, const char* op); @@ -113,6 +119,7 @@ public: bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; } bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isReadingHLSL() const { return (messages & EShMsgReadHlsl) == EShMsgReadHlsl; } + bool hlslEnable16BitTypes() const { return (messages & EShMsgHlslEnable16BitTypes) != 0; } TInfoSink& infoSink; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp index aeb42a09a6fed888d5589da4374e6339a579a2d7..8048fa513d2837dc1bb9e4a47d76987f709774dd 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -731,12 +731,10 @@ int TPpContext::CPPerror(TPpToken* ppToken) TSourceLoc loc = ppToken->loc; while (token != '\n' && token != EndOfInput) { - if (token == PpAtomConstInt || token == PpAtomConstUint || + if (token == PpAtomConstInt16 || token == PpAtomConstUint16 || + token == PpAtomConstInt || token == PpAtomConstUint || token == PpAtomConstInt64 || token == PpAtomConstUint64 || -#ifdef AMD_EXTENSIONS - token == PpAtomConstInt16 || token == PpAtomConstUint16 || token == PpAtomConstFloat16 || -#endif token == PpAtomConstFloat || token == PpAtomConstDouble) { message.append(ppToken->name); } else if (token == PpAtomIdentifier || token == PpAtomConstString) { @@ -775,9 +773,7 @@ int TPpContext::CPPpragma(TPpToken* ppToken) #endif case PpAtomConstFloat: case PpAtomConstDouble: -#ifdef AMD_EXTENSIONS case PpAtomConstFloat16: -#endif tokens.push_back(ppToken->name); break; default: @@ -1157,7 +1153,6 @@ int TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOka } MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom); - int token; int depth = 0; // no recursive expansions @@ -1179,13 +1174,12 @@ int TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOka TSourceLoc loc = ppToken->loc; // in case we go to the next line before discovering the error in->mac = macro; if (macro->args.size() > 0 || macro->emptyArgs) { - token = scanToken(ppToken); + int token = scanToken(ppToken); if (newLineOkay) { while (token == '\n') token = scanToken(ppToken); } if (token != '(') { - parseContext.ppError(loc, "expected '(' following", "macro expansion", atomStrings.getString(macroAtom)); UngetToken(token, ppToken); delete in; return 0; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp index b58bbeeab9d955726b093e783e25d13c83ef2c13..f4eaf57d3527043c5d2b871312c7cfa12aafdc90 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. +// Copyright (C) 2017 ARM Limited. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -103,17 +104,6 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) { bool HasDecimalOrExponent = false; int isDouble = 0; - bool generateFloat16 = false; - bool acceptFloat16 = parseContext.intermediate.getSource() == EShSourceHlsl; - bool isFloat16 = false; - bool requireHF = false; -#ifdef AMD_EXTENSIONS - if (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float)) { - acceptFloat16 = true; - generateFloat16 = true; - requireHF = true; - } -#endif const auto saveName = [&](int ch) { if (len <= MaxTokenLength) @@ -128,7 +118,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) ch = getChar(); // 1.#INF or -1.#INF - if (parseContext.intermediate.getSource() == EShSourceHlsl && ch == '#') { + if (ch == '#' && (ifdepth > 0 || parseContext.intermediate.getSource() == EShSourceHlsl)) { if ((len < 2) || (len == 2 && ppToken->name[0] != '1') || (len == 3 && ppToken->name[1] != '1' && !(ppToken->name[0] == '-' || ppToken->name[0] == '+')) || @@ -182,28 +172,32 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } // Suffix: - + bool isFloat16 = false; if (ch == 'l' || ch == 'L') { - parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); - if (! HasDecimalOrExponent) + if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) + parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); + if (ifdepth == 0 && !HasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); - int ch2 = getChar(); - if (ch2 != 'f' && ch2 != 'F') { - ungetChar(); - ungetChar(); - } else { + if (parseContext.intermediate.getSource() == EShSourceGlsl) { + int ch2 = getChar(); + if (ch2 != 'f' && ch2 != 'F') { + ungetChar(); + ungetChar(); + } else { + saveName(ch); + saveName(ch2); + isDouble = 1; + } + } else if (parseContext.intermediate.getSource() == EShSourceHlsl) { saveName(ch); - saveName(ch2); isDouble = 1; } - } else if (acceptFloat16 && (ch == 'h' || ch == 'H')) { -#ifdef AMD_EXTENSIONS - if (generateFloat16) + } else if (ch == 'h' || ch == 'H') { + if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.float16Check(ppToken->loc, "half floating-point suffix"); -#endif - if (!HasDecimalOrExponent) + if (ifdepth == 0 && !HasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); - if (requireHF) { + if (parseContext.intermediate.getSource() == EShSourceGlsl) { int ch2 = getChar(); if (ch2 != 'f' && ch2 != 'F') { ungetChar(); @@ -211,17 +205,18 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } else { saveName(ch); saveName(ch2); - isFloat16 = generateFloat16; + isFloat16 = true; } - } else { + } else if (parseContext.intermediate.getSource() == EShSourceHlsl) { saveName(ch); - isFloat16 = generateFloat16; + isFloat16 = true; } } else if (ch == 'f' || ch == 'F') { - parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); - if (! parseContext.relaxedErrors()) + if (ifdepth == 0) + parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); + if (ifdepth == 0 && !parseContext.relaxedErrors()) parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); - if (! HasDecimalOrExponent) + if (ifdepth == 0 && !HasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); saveName(ch); } else @@ -333,19 +328,23 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) int ch = 0; int ii = 0; unsigned long long ival = 0; - bool enableInt64 = pp->parseContext.version >= 450 && pp->parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64); -#ifdef AMD_EXTENSIONS - bool enableInt16 = pp->parseContext.version >= 450 && pp->parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16); -#endif - bool acceptHalf = pp->parseContext.intermediate.getSource() == EShSourceHlsl; -#ifdef AMD_EXTENSIONS - if (pp->parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float)) - acceptHalf = true; -#endif - const auto floatingPointChar = [&](int ch) { return ch == '.' || ch == 'e' || ch == 'E' || ch == 'f' || ch == 'F' || - (acceptHalf && (ch == 'h' || ch == 'H')); }; + ch == 'h' || ch == 'H'; }; + + static const char* const Int64_Extensions[] = { + E_GL_ARB_gpu_shader_int64, + E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int64 }; + static const int Num_Int64_Extensions = sizeof(Int64_Extensions) / sizeof(Int64_Extensions[0]); + + static const char* const Int16_Extensions[] = { +#ifdef AMD_EXTENSIONS + E_GL_AMD_gpu_shader_int16, +#endif + E_GL_KHX_shader_explicit_arithmetic_types, + E_GL_KHX_shader_explicit_arithmetic_types_int16 }; + static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]); ppToken->ival = 0; ppToken->i64val = 0; @@ -409,9 +408,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) bool isUnsigned = false; bool isInt64 = false; -#ifdef AMD_EXTENSIONS bool isInt16 = false; -#endif ppToken->name[len++] = (char)ch; ch = getch(); if ((ch >= '0' && ch <= '9') || @@ -420,7 +417,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = 0; do { - if (len < MaxTokenLength && (ival <= 0x0fffffffu || (enableInt64 && ival <= 0x0fffffffffffffffull))) { + if (len < MaxTokenLength && ival <= 0x0fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch >= '0' && ch <= '9') { ii = ch - '0'; @@ -453,33 +450,31 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); #ifdef AMD_EXTENSIONS - if (enableInt16) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 's') || (ch == 'U' && nextCh == 'S')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt16 = true; - } else - ungetch(); - } + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); #endif - } else if (enableInt64 && (ch == 'l' || ch == 'L')) { + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; #ifdef AMD_EXTENSIONS - } else if (enableInt16 && (ch == 's' || ch == 'S')) { + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; @@ -488,15 +483,29 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ungetch(); ppToken->name[len] = '\0'; - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (pp->ifdepth == 0) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit hexadecimal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int64_Extensions, Int64_Extensions, "64-bit hexadecimal literal"); + } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; -#ifdef AMD_EXTENSIONS } else if (isInt16) { + if (pp->ifdepth == 0) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit hexadecimal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int16_Extensions, Int16_Extensions, "16-bit hexadecimal literal"); + } + } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; -#endif } else { + if (ival > 0xffffffffu && !AlreadyComplained) + pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } @@ -505,9 +514,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) bool isUnsigned = false; bool isInt64 = false; -#ifdef AMD_EXTENSIONS bool isInt16 = false; -#endif bool octalOverflow = false; bool nonOctal = false; ival = 0; @@ -520,7 +527,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } - if (ival <= 0x1fffffffu || (enableInt64 && ival <= 0x1fffffffffffffffull)) { + if (ival <= 0x1fffffffffffffffull) { ii = ch - '0'; ival = (ival << 3) | ii; } else @@ -553,33 +560,31 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); #ifdef AMD_EXTENSIONS - if (enableInt16) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 's') || (ch == 'U' && nextCh == 'S')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt16 = true; - } else - ungetch(); - } + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); #endif - } else if (enableInt64 && (ch == 'l' || ch == 'L')) { + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; #ifdef AMD_EXTENSIONS - } else if (enableInt16 && (ch == 's' || ch == 'S')) { + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; @@ -588,17 +593,32 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ungetch(); ppToken->name[len] = '\0'; + if (!isInt64 && ival > 0xffffffffu) + octalOverflow = true; + if (octalOverflow) pp->parseContext.ppError(ppToken->loc, "octal literal too big", "", ""); - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (pp->ifdepth == 0) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit octal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int64_Extensions, Int64_Extensions, "64-bit octal literal"); + } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; -#ifdef AMD_EXTENSIONS } else if (isInt16) { + if (pp->ifdepth == 0) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit octal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int16_Extensions, Int16_Extensions, "16-bit octal literal"); + } + } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; -#endif } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; @@ -625,41 +645,37 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) int numericLen = len; bool isUnsigned = false; bool isInt64 = false; -#ifdef AMD_EXTENSIONS bool isInt16 = false; -#endif if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); #ifdef AMD_EXTENSIONS - if (enableInt16) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 's') || (ch == 'U' && nextCh == 'S')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt16 = true; - } else - ungetch(); - } + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); #endif - } else if (enableInt64 && (ch == 'l' || ch == 'L')) { + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; #ifdef AMD_EXTENSIONS - } else if (enableInt16 && (ch == 's' || ch == 'S')) { + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; @@ -673,19 +689,15 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) const unsigned remainderMaxInt = 0xFFFFFFFFu - 10 * oneTenthMaxInt; const unsigned long long oneTenthMaxInt64 = 0xFFFFFFFFFFFFFFFFull / 10; const unsigned long long remainderMaxInt64 = 0xFFFFFFFFFFFFFFFFull - 10 * oneTenthMaxInt64; -#ifdef AMD_EXTENSIONS const unsigned short oneTenthMaxInt16 = 0xFFFFu / 10; const unsigned short remainderMaxInt16 = 0xFFFFu - 10 * oneTenthMaxInt16; -#endif for (int i = 0; i < numericLen; i++) { ch = ppToken->name[i] - '0'; bool overflow = false; if (isInt64) overflow = (ival > oneTenthMaxInt64 || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)); -#ifdef AMD_EXTENSIONS else if (isInt16) overflow = (ival > oneTenthMaxInt16 || (ival == oneTenthMaxInt16 && (unsigned short)ch > remainderMaxInt16)); -#endif else overflow = (ival > oneTenthMaxInt || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt)); if (overflow) { @@ -696,14 +708,24 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = ival * 10 + ch; } - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (pp->ifdepth == 0) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int64_Extensions, Int64_Extensions, "64-bit literal"); + } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; -#ifdef AMD_EXTENSIONS } else if (isInt16) { + if (pp->ifdepth == 0 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int16_Extensions, Int16_Extensions, "16-bit literal"); + } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; -#endif } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; @@ -953,19 +975,15 @@ int TPpContext::tokenize(TPpToken& ppToken) case PpAtomConstFloat: case PpAtomConstInt64: case PpAtomConstUint64: -#ifdef AMD_EXTENSIONS case PpAtomConstInt16: case PpAtomConstUint16: -#endif case PpAtomConstDouble: -#ifdef AMD_EXTENSIONS case PpAtomConstFloat16: -#endif if (ppToken.name[0] == '\0') continue; break; case PpAtomConstString: - if (parseContext.intermediate.getSource() != EShSourceHlsl) { + if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) { // HLSL allows string literals. parseContext.ppError(ppToken.loc, "string literals not supported", "\"\"", ""); continue; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp index bc145e251fcda5f3a020eef4f9daa590d7630b36..31e0d1f96909ebe280e71d99ff2b70f039f5a337 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -147,9 +147,7 @@ void TPpContext::TokenStream::putToken(int token, TPpToken* ppToken) #endif case PpAtomConstFloat: case PpAtomConstDouble: -#ifdef AMD_EXTENSIONS case PpAtomConstFloat16: -#endif str = ppToken->name; while (*str) { putSubtoken(*str); @@ -187,9 +185,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken case PpAtomIdentifier: case PpAtomConstFloat: case PpAtomConstDouble: -#ifdef AMD_EXTENSIONS case PpAtomConstFloat16: -#endif case PpAtomConstInt: case PpAtomConstUint: case PpAtomConstInt64: @@ -219,9 +215,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken break; case PpAtomConstFloat: case PpAtomConstDouble: -#ifdef AMD_EXTENSIONS case PpAtomConstFloat16: -#endif ppToken->dval = atof(ppToken->name); break; case PpAtomConstInt: diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h index d56df5765413fb229c9f22ce4dafd45bc8834c3c..7b0f815500c607c66b1a267da1f5ba63003ec0bd 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h @@ -127,10 +127,8 @@ enum EFixedAtoms { PpAtomConstUint, PpAtomConstInt64, PpAtomConstUint64, -#ifdef AMD_EXTENSIONS PpAtomConstInt16, PpAtomConstUint16, -#endif PpAtomConstFloat, PpAtomConstDouble, PpAtomConstFloat16, diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.cpp index 50fb602789ea6abe507fea2d834b4334f5b40162..4818b10832067005551414e3bba65356959ba4e4 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.cpp @@ -415,6 +415,36 @@ public: case EsdBuffer: return GL_SAMPLER_BUFFER; } +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch ((int)sampler.dim) { + case Esd1D: + switch ((int)sampler.shadow) { + case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_AMD : GL_FLOAT16_SAMPLER_1D_AMD; + case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_1D_SHADOW_AMD; + } + case Esd2D: + switch ((int)sampler.ms) { + case false: + switch ((int)sampler.shadow) { + case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_AMD; + case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_SHADOW_AMD; + } + case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD; + } + case Esd3D: + return GL_FLOAT16_SAMPLER_3D_AMD; + case EsdCube: + switch ((int)sampler.shadow) { + case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_SAMPLER_CUBE_AMD; + case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD; + } + case EsdRect: + return sampler.shadow ? GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_RECT_AMD; + case EsdBuffer: + return GL_FLOAT16_SAMPLER_BUFFER_AMD; + } +#endif case EbtInt: switch ((int)sampler.dim) { case Esd1D: @@ -477,6 +507,26 @@ public: case EsdBuffer: return GL_IMAGE_BUFFER; } +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch ((int)sampler.dim) { + case Esd1D: + return sampler.arrayed ? GL_FLOAT16_IMAGE_1D_ARRAY_AMD : GL_FLOAT16_IMAGE_1D_AMD; + case Esd2D: + switch ((int)sampler.ms) { + case false: return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_AMD; + case true: return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD; + } + case Esd3D: + return GL_FLOAT16_IMAGE_3D_AMD; + case EsdCube: + return sampler.arrayed ? GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_IMAGE_CUBE_AMD; + case EsdRect: + return GL_FLOAT16_IMAGE_2D_RECT_AMD; + case EsdBuffer: + return GL_FLOAT16_IMAGE_BUFFER_AMD; + } +#endif case EbtInt: switch ((int)sampler.dim) { case Esd1D: @@ -716,11 +766,11 @@ void TReflection::buildAttributeReflection(EShLanguage stage, const TIntermediat } // build counter block index associations for buffers -void TReflection::buildCounterIndices() +void TReflection::buildCounterIndices(const TIntermediate& intermediate) { // search for ones that have counters for (int i = 0; i < int(indexToUniformBlock.size()); ++i) { - const TString counterName(indexToUniformBlock[i].name + "@count"); + const TString counterName(intermediate.addCounterBufferName(indexToUniformBlock[i].name)); const int index = getIndex(counterName); if (index >= 0) @@ -752,7 +802,7 @@ bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate) function->traverse(&it); } - buildCounterIndices(); + buildCounterIndices(intermediate); return true; } diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.h b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.h index fedfbe8d4a0592d9a9f2f26c780ca0fb3d90620d..bf233e33eb662c4c257fe16925610594cf30506d 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.h @@ -156,7 +156,7 @@ public: protected: friend class glslang::TReflectionTraverser; - void buildCounterIndices(); + void buildCounterIndices(const TIntermediate&); void buildAttributeReflection(EShLanguage, const TIntermediate&); // Need a TString hash: typedef std::unordered_map TNameToIndex; diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/OSDependent/Unix/ossource.cpp b/sources/third_party/shaderc/third_party/glslang/glslang/OSDependent/Unix/ossource.cpp index 24b77e1620ef7f198a15a8788fb0f0beff07acae..f59bbceb4a9a6b25d22841193e7606f603c75ea0 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/OSDependent/Unix/ossource.cpp +++ b/sources/third_party/shaderc/third_party/glslang/glslang/OSDependent/Unix/ossource.cpp @@ -43,6 +43,9 @@ #include #include #include +#include +#include +#include namespace glslang { @@ -184,8 +187,18 @@ void ReleaseGlobalLock() pthread_mutex_unlock(&gMutex); } +// #define DUMP_COUNTERS + void OS_DumpMemoryCounters() { +#ifdef DUMP_COUNTERS + struct rusage usage; + + if (getrusage(RUSAGE_SELF, &usage) == 0) + printf("Working set size: %ld\n", usage.ru_maxrss * 1024); +#else + printf("Recompile with DUMP_COUNTERS defined to see counters.\n"); +#endif } } // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/glslang/Public/ShaderLang.h b/sources/third_party/shaderc/third_party/glslang/glslang/Public/ShaderLang.h index f0990ad8474d5a462e96744068fa931f2d75012c..911fc310cee25391d9cea95777eea76aff0ebc61 100644 --- a/sources/third_party/shaderc/third_party/glslang/glslang/Public/ShaderLang.h +++ b/sources/third_party/shaderc/third_party/glslang/glslang/Public/ShaderLang.h @@ -67,16 +67,20 @@ extern "C" { #endif +// This should always increase, as some paths to do not consume +// a more major number. +// It should increment by one when new functionality is added. +#define GLSLANG_MINOR_VERSION 6 + // -// Driver must call this first, once, before doing any other -// compiler/linker operations. +// Call before doing any other compiler/linker operations. // // (Call once per process, not once per thread.) // SH_IMPORT_EXPORT int ShInitialize(); // -// Driver should call this at process shutdown. +// Call this at process shutdown to clean up memory. // SH_IMPORT_EXPORT int __fastcall ShFinalize(); @@ -120,9 +124,23 @@ typedef enum { typedef enum { EShTargetNone, - EshTargetSpv, + EShTargetSpv, // preferred spelling + EshTargetSpv = EShTargetSpv, // legacy spelling } EShTargetLanguage; +typedef enum { + EShTargetVulkan_1_0 = (1 << 22), + EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), + EShTargetOpenGL_450 = 450, +} EShTargetClientVersion; + +typedef EShTargetClientVersion EshTargetClientVersion; + +typedef enum { + EShTargetSpv_1_0 = (1 << 16), + EShTargetSpv_1_3 = (1 << 16) | (3 << 8), +} EShTargetLanguageVersion; + struct TInputLanguage { EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone @@ -132,12 +150,13 @@ struct TInputLanguage { struct TClient { EShClient client; - int version; // version of client itself (not the client's input dialect) + EShTargetClientVersion version; // version of client itself (not the client's input dialect) }; struct TTarget { EShTargetLanguage language; - unsigned int version; // the version to target, if SPIR-V, defined by "word 1" of the SPIR-V binary header + EShTargetLanguageVersion version; // version to target, if SPIR-V, defined by "word 1" of the SPIR-V header + bool hlslFunctionality1; // can target hlsl_functionality1 extension(s) }; // All source/client/target versions and settings. @@ -195,6 +214,8 @@ enum EShMessages { EShMsgKeepUncalled = (1 << 8), // for testing, don't eliminate uncalled functions EShMsgHlslOffsets = (1 << 9), // allow block offsets to follow HLSL rules instead of GLSL rules EShMsgDebugInfo = (1 << 10), // save debug information + EShMsgHlslEnable16BitTypes = (1 << 11), // enable use of 16-bit types in SPIR-V for HLSL + EShMsgHlslLegalization = (1 << 12), // enable HLSL Legalization messages }; // @@ -290,7 +311,7 @@ SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* // Deferred-Lowering C++ Interface // ----------------------------------- // -// Below is a new alternate C++ interface that might potentially replace the above +// Below is a new alternate C++ interface, which deprecates the above // opaque handle-based interface. // // The below is further designed to handle multiple compilation units per stage, where @@ -335,11 +356,15 @@ enum TResourceType { EResCount }; -// Make one TShader per shader that you will link into a program. Then provide -// the shader through setStrings() or setStringsWithLengths(), then call parse(), -// then query the info logs. -// Optionally use setPreamble() to set a special shader string that will be -// processed before all others but won't affect the validity of #version. +// Make one TShader per shader that you will link into a program. Then +// - provide the shader through setStrings() or setStringsWithLengths() +// - optionally call setEnv*(), see below for more detail +// - optionally use setPreamble() to set a special shader string that will be +// processed before all others but won't affect the validity of #version +// - call parse(): source language and target environment must be selected +// either by correct setting of EShMessages sent to parse(), or by +// explicitly calling setEnv*() +// - query the info logs // // N.B.: Does not yet support having the same TShader instance being linked into // multiple programs. @@ -368,16 +393,20 @@ public: void setShiftUavBinding(unsigned int base); // DEPRECATED: use setShiftBinding void setShiftCbufferBinding(unsigned int base); // synonym for setShiftUboBinding void setShiftSsboBinding(unsigned int base); // DEPRECATED: use setShiftBinding - void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base); + void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set); void setResourceSetBinding(const std::vector& base); void setAutoMapBindings(bool map); void setAutoMapLocations(bool map); + void setInvertY(bool invert); void setHlslIoMapping(bool hlslIoMap); void setFlattenUniformArrays(bool flatten); void setNoStorageFormat(bool useUnknownFormat); void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode); - // For setting up the environment (initialized in the constructor): + // For setting up the environment (cleared to nothingness in the constructor). + // These must be called so that parsing is done for the right source language and + // target environment, either indirectly through TranslateEnvironment() based on + // EShMessages et. al., or directly by the user. void setEnvInput(EShSource lang, EShLanguage envStage, EShClient client, int version) { environment.input.languageFamily = lang; @@ -385,16 +414,18 @@ public: environment.input.dialect = client; environment.input.dialectVersion = version; } - void setEnvClient(EShClient client, int version) + void setEnvClient(EShClient client, EShTargetClientVersion version) { environment.client.client = client; environment.client.version = version; } - void setEnvTarget(EShTargetLanguage lang, unsigned int version) + void setEnvTarget(EShTargetLanguage lang, EShTargetLanguageVersion version) { environment.target.language = lang; environment.target.version = version; } + void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; } + bool getEnvTargetHlslFunctionality1() const { return environment.target.hlslFunctionality1; } // Interface to #include handlers. // @@ -640,6 +671,7 @@ public: int getUniformBlockSize(int blockIndex) const; // can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE) int getUniformIndex(const char* name) const; // can be used for glGetUniformIndices() int getUniformBinding(int index) const; // returns the binding number + int getUniformBlockBinding(int index) const; // returns the block binding number int getUniformBlockIndex(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX) int getUniformBlockCounterIndex(int index) const; // returns block index of associated counter. int getUniformType(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE) diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.cpp b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.cpp index fccf6c1877594dab48e81011fd7939061abc7655..261cec346f21e0955c41e67955d6ec6711403fe5 100644 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.cpp +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.cpp @@ -34,151 +34,73 @@ // #include "hlslAttributes.h" -#include -#include -#include +#include "hlslParseHelper.h" namespace glslang { // Map the given string to an attribute enum from TAttributeType, // or EatNone if invalid. - TAttributeType TAttributeMap::attributeFromName(const TString& nameSpace, const TString& name) + TAttributeType HlslParseContext::attributeFromName(const TString& nameSpace, const TString& name) const { - // These are case insensitive. - TString lowername(name); - std::transform(lowername.begin(), lowername.end(), lowername.begin(), ::tolower); - TString lowernameSpace(nameSpace); - std::transform(lowernameSpace.begin(), lowernameSpace.end(), lowernameSpace.begin(), ::tolower); - // handle names within a namespace - if (lowernameSpace == "vk") { - if (lowername == "input_attachment_index") + if (nameSpace == "vk") { + if (name == "input_attachment_index") return EatInputAttachment; - else if (lowername == "location") + else if (name == "location") return EatLocation; - else if (lowername == "binding") + else if (name == "binding") return EatBinding; - else if (lowername == "global_cbuffer_binding") + else if (name == "global_cbuffer_binding") return EatGlobalBinding; - } else if (lowernameSpace.size() > 0) + else if (name == "builtin") + return EatBuiltIn; + else if (name == "constant_id") + return EatConstantId; + else if (name == "push_constant") + return EatPushConstant; + } else if (nameSpace.size() > 0) return EatNone; // handle names with no namespace - if (lowername == "allow_uav_condition") + if (name == "allow_uav_condition") return EatAllow_uav_condition; - else if (lowername == "branch") + else if (name == "branch") return EatBranch; - else if (lowername == "call") + else if (name == "call") return EatCall; - else if (lowername == "domain") + else if (name == "domain") return EatDomain; - else if (lowername == "earlydepthstencil") + else if (name == "earlydepthstencil") return EatEarlyDepthStencil; - else if (lowername == "fastopt") + else if (name == "fastopt") return EatFastOpt; - else if (lowername == "flatten") + else if (name == "flatten") return EatFlatten; - else if (lowername == "forcecase") + else if (name == "forcecase") return EatForceCase; - else if (lowername == "instance") + else if (name == "instance") return EatInstance; - else if (lowername == "maxtessfactor") + else if (name == "maxtessfactor") return EatMaxTessFactor; - else if (lowername == "maxvertexcount") + else if (name == "maxvertexcount") return EatMaxVertexCount; - else if (lowername == "numthreads") + else if (name == "numthreads") return EatNumThreads; - else if (lowername == "outputcontrolpoints") + else if (name == "outputcontrolpoints") return EatOutputControlPoints; - else if (lowername == "outputtopology") + else if (name == "outputtopology") return EatOutputTopology; - else if (lowername == "partitioning") + else if (name == "partitioning") return EatPartitioning; - else if (lowername == "patchconstantfunc") + else if (name == "patchconstantfunc") return EatPatchConstantFunc; - else if (lowername == "unroll") + else if (name == "unroll") return EatUnroll; - else if (lowername == "loop") + else if (name == "loop") return EatLoop; else return EatNone; } - // Look up entry, inserting if it's not there, and if name is a valid attribute name - // as known by attributeFromName. - TAttributeType TAttributeMap::setAttribute(const TString& nameSpace, const TString* name, TIntermAggregate* value) - { - if (name == nullptr) - return EatNone; - - const TAttributeType attr = attributeFromName(nameSpace, *name); - - if (attr != EatNone) - attributes[attr] = value; - - return attr; - } - - // Look up entry (const version), and return aggregate node. This cannot change the map. - const TIntermAggregate* TAttributeMap::operator[](TAttributeType attr) const - { - const auto entry = attributes.find(attr); - - return (entry == attributes.end()) ? nullptr : entry->second; - } - - // True if entry exists in map (even if value is nullptr) - bool TAttributeMap::contains(TAttributeType attr) const - { - return attributes.find(attr) != attributes.end(); - } - - // extract integers out of attribute arguments stored in attribute aggregate - bool TAttributeMap::getInt(TAttributeType attr, int& value, int argNum) const - { - const TConstUnion* intConst = getConstUnion(attr, EbtInt, argNum); - - if (intConst == nullptr) - return false; - - value = intConst->getIConst(); - return true; - }; - - // extract strings out of attribute arguments stored in attribute aggregate. - // convert to lower case if converToLower is true (for case-insensitive compare convenience) - bool TAttributeMap::getString(TAttributeType attr, TString& value, int argNum, bool convertToLower) const - { - const TConstUnion* stringConst = getConstUnion(attr, EbtString, argNum); - - if (stringConst == nullptr) - return false; - - value = *stringConst->getSConst(); - - // Convenience. - if (convertToLower) - std::transform(value.begin(), value.end(), value.begin(), ::tolower); - - return true; - }; - - // Helper to get attribute const union. Returns nullptr on failure. - const TConstUnion* TAttributeMap::getConstUnion(TAttributeType attr, TBasicType basicType, int argNum) const - { - const TIntermAggregate* attrAgg = (*this)[attr]; - if (attrAgg == nullptr) - return nullptr; - - if (argNum >= int(attrAgg->getSequence().size())) - return nullptr; - - const TConstUnion* constVal = &attrAgg->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; - if (constVal == nullptr || constVal->getType() != basicType) - return nullptr; - - return constVal; - } - } // end namespace glslang diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.h b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.h index 1fdb4ba04536d1e5ed4941141cf00a112cfa96dd..b1cc0372e5e951356009c97c4d1a0d206b289620 100644 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.h +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslAttributes.h @@ -38,88 +38,22 @@ #include #include -#include "hlslScanContext.h" -#include "../glslang/Include/Common.h" -namespace glslang { - enum TAttributeType { - EatNone, - EatAllow_uav_condition, - EatBranch, - EatCall, - EatDomain, - EatEarlyDepthStencil, - EatFastOpt, - EatFlatten, - EatForceCase, - EatInstance, - EatMaxTessFactor, - EatNumThreads, - EatMaxVertexCount, - EatOutputControlPoints, - EatOutputTopology, - EatPartitioning, - EatPatchConstantFunc, - EatPatchSize, - EatUnroll, - EatLoop, - EatBinding, - EatGlobalBinding, - EatLocation, - EatInputAttachment - }; -} - -namespace std { - // Allow use of TAttributeType enum in hash_map without calling code having to cast. - template <> struct hash { - std::size_t operator()(glslang::TAttributeType attr) const { - return std::hash()(int(attr)); - } - }; -} // end namespace std +#include "../glslang/MachineIndependent/attribute.h" +#include "../glslang/MachineIndependent/SymbolTable.h" +#include "hlslScanContext.h" namespace glslang { - class TIntermAggregate; - - class TAttributeMap { - public: - // Search for and potentially add the attribute into the map. Return the - // attribute type enum for it, if found, else EatNone. - TAttributeType setAttribute(const TString& nameSpace, const TString* name, TIntermAggregate* value); - - // Const lookup: search for (but do not modify) the attribute in the map. - const TIntermAggregate* operator[](TAttributeType) const; - - // True if entry exists in map (even if value is nullptr) - bool contains(TAttributeType) const; - - // Obtain attribute as integer - bool getInt(TAttributeType attr, int& value, int argNum = 0) const; - - // Obtain attribute as string, with optional to-lower transform - bool getString(TAttributeType attr, TString& value, int argNum = 0, bool convertToLower = true) const; - - protected: - // Helper to get attribute const union - const TConstUnion* getConstUnion(TAttributeType attr, TBasicType, int argNum) const; - - // Find an attribute enum given its name. - static TAttributeType attributeFromName(const TString& nameSpace, const TString& name); - - std::unordered_map attributes; - }; class TFunctionDeclarator { public: TFunctionDeclarator() : function(nullptr), body(nullptr) { } TSourceLoc loc; TFunction* function; - TAttributeMap attributes; + TAttributes attributes; TVector* body; }; } // end namespace glslang - #endif // HLSLATTRIBUTES_H_ diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.cpp b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.cpp index 515922e030b3eae5b41b16cc648225b36a5f73ba..cb05877917586b3283867b3e890ebb58915b9431 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.cpp +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.cpp @@ -376,11 +376,9 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) bool forbidDeclarators = (peekTokenClass(EHTokCBuffer) || peekTokenClass(EHTokTBuffer)); // fully_specified_type - if (! acceptFullySpecifiedType(declaredType, nodeList)) + if (! acceptFullySpecifiedType(declaredType, nodeList, declarator.attributes, forbidDeclarators)) return false; - parseContext.transferTypeAttributes(declarator.attributes, declaredType); - // cbuffer and tbuffer end with the closing '}'. // No semicolon is included. if (forbidDeclarators) @@ -398,6 +396,9 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) if (peekTokenClass(EHTokLeftParen)) { // looks like function parameters + // merge in the attributes into the return type + parseContext.transferTypeAttributes(token.loc, declarator.attributes, declaredType, true); + // Potentially rename shader entry point function. No-op most of the time. parseContext.renameShaderFunction(fullName); @@ -425,32 +426,30 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) parseContext.handleFunctionDeclarator(declarator.loc, *declarator.function, true); } } else { - // A variable declaration. Fix the storage qualifier if it's a global. + // A variable declaration. + + // merge in the attributes, the first time around, into the shared type + if (! declarator_list) + parseContext.transferTypeAttributes(token.loc, declarator.attributes, declaredType); + + // Fix the storage qualifier if it's a global. if (declaredType.getQualifier().storage == EvqTemporary && parseContext.symbolTable.atGlobalLevel()) declaredType.getQualifier().storage = EvqUniform; + // recognize array_specifier + TArraySizes* arraySizes = nullptr; + acceptArraySpecifier(arraySizes); + // We can handle multiple variables per type declaration, so // the number of types can expand when arrayness is different. TType variableType; variableType.shallowCopy(declaredType); - // recognize array_specifier - TArraySizes* arraySizes = nullptr; - acceptArraySpecifier(arraySizes); - - // Fix arrayness in the variableType - if (declaredType.isImplicitlySizedArray()) { - // Because "int[] a = int[2](...), b = int[3](...)" makes two arrays a and b - // of different sizes, for this case sharing the shallow copy of arrayness - // with the parseType oversubscribes it, so get a deep copy of the arrayness. - variableType.newArraySizes(declaredType.getArraySizes()); - } - if (arraySizes || variableType.isArray()) { - // In the most general case, arrayness is potentially coming both from the - // declared type and from the variable: "int[] a[];" or just one or the other. - // Merge it all to the variableType, so all arrayness is part of the variableType. - parseContext.arrayDimMerge(variableType, arraySizes); - } + // In the most general case, arrayness is potentially coming both from the + // declared type and from the variable: "int[] a[];" or just one or the other. + // Merge it all to the variableType, so all arrayness is part of the variableType. + variableType.transferArraySizes(arraySizes); + variableType.copyArrayInnerSizes(declaredType.getArraySizes()); // samplers accept immediate sampler state if (variableType.getBasicType() == EbtSampler) { @@ -478,8 +477,9 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) if (typedefDecl) parseContext.declareTypedef(idToken.loc, *fullName, variableType); else if (variableType.getBasicType() == EbtBlock) { - parseContext.declareBlock(idToken.loc, variableType, fullName, - variableType.isArray() ? &variableType.getArraySizes() : nullptr); + if (expressionNode) + parseContext.error(idToken.loc, "buffer aliasing not yet supported", "block initializer", ""); + parseContext.declareBlock(idToken.loc, variableType, fullName); parseContext.declareStructBufferCounter(idToken.loc, variableType, *fullName); } else { if (variableType.getQualifier().storage == EvqUniform && ! variableType.containsOpaque()) { @@ -536,12 +536,16 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) { node = nullptr; + TAttributes attributes; // fully_specified_type TType type; - if (! acceptFullySpecifiedType(type)) + if (! acceptFullySpecifiedType(type, attributes)) return false; + if (attributes.size() > 0) + parseContext.warn(token.loc, "attributes don't apply to control declaration", "", ""); + // filter out type casts if (peekTokenClass(EHTokLeftParen)) { recedeToken(); @@ -577,12 +581,12 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) // : type_specifier // | type_qualifier type_specifier // -bool HlslGrammar::acceptFullySpecifiedType(TType& type) +bool HlslGrammar::acceptFullySpecifiedType(TType& type, const TAttributes& attributes) { TIntermNode* nodeList = nullptr; - return acceptFullySpecifiedType(type, nodeList); + return acceptFullySpecifiedType(type, nodeList, attributes); } -bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) +bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, const TAttributes& attributes, bool forbidDeclarators) { // type_qualifier TQualifier qualifier; @@ -601,11 +605,18 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) return false; } + if (type.getBasicType() == EbtBlock) { // the type was a block, which set some parts of the qualifier parseContext.mergeQualifiers(type.getQualifier(), qualifier); + + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, type); + // further, it can create an anonymous instance of the block - if (peek() != EHTokIdentifier) + // (cbuffer and tbuffer don't consume the next identifier, and + // should set forbidDeclarators) + if (forbidDeclarators || peek() != EHTokIdentifier) parseContext.declareBlock(loc, type); } else { // Some qualifiers are set when parsing the type. Merge those with @@ -624,7 +635,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) if (type.isBuiltIn()) qualifier.builtIn = type.getQualifier().builtIn; - type.getQualifier() = qualifier; + type.getQualifier() = qualifier; } return true; @@ -1016,7 +1027,7 @@ bool HlslGrammar::acceptTessellationPatchTemplateType(TType& type) TArraySizes* arraySizes = new TArraySizes; arraySizes->addInnerSize(size->getAsConstantUnion()->getConstArray()[0].getIConst()); - type.newArraySizes(*arraySizes); + type.transferArraySizes(arraySizes); type.getQualifier().builtIn = patchType; if (! acceptTokenClass(EHTokRightAngle)) { @@ -1357,14 +1368,15 @@ bool HlslGrammar::acceptType(TType& type) } bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) { - // Basic types for min* types, broken out here in case of future - // changes, e.g, to use native halfs. - static const TBasicType min16float_bt = EbtFloat; - static const TBasicType min10float_bt = EbtFloat; - static const TBasicType half_bt = EbtFloat; - static const TBasicType min16int_bt = EbtInt; - static const TBasicType min12int_bt = EbtInt; - static const TBasicType min16uint_bt = EbtUint; + // Basic types for min* types, use native halfs if the option allows them. + bool enable16BitTypes = parseContext.hlslEnable16BitTypes(); + + const TBasicType min16float_bt = enable16BitTypes ? EbtFloat16 : EbtFloat; + const TBasicType min10float_bt = enable16BitTypes ? EbtFloat16 : EbtFloat; + const TBasicType half_bt = enable16BitTypes ? EbtFloat16 : EbtFloat; + const TBasicType min16int_bt = enable16BitTypes ? EbtInt16 : EbtInt; + const TBasicType min12int_bt = enable16BitTypes ? EbtInt16 : EbtInt; + const TBasicType min16uint_bt = enable16BitTypes ? EbtUint16 : EbtUint; // Some types might have turned into identifiers. Take the hit for checking // when this has happened. @@ -1378,6 +1390,23 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) } } + bool isUnorm = false; + bool isSnorm = false; + + // Accept snorm and unorm. Presently, this is ignored, save for an error check below. + switch (peek()) { + case EHTokUnorm: + isUnorm = true; + advanceToken(); // eat the token + break; + case EHTokSNorm: + isSnorm = true; + advanceToken(); // eat the token + break; + default: + break; + } + switch (peek()) { case EHTokVector: return acceptVectorTemplateType(type); @@ -1453,6 +1482,10 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) return acceptStructBufferType(type); break; + case EHTokTextureBuffer: + return acceptTextureBufferType(type); + break; + case EHTokConstantBuffer: return acceptConstantBufferType(type); @@ -1549,6 +1582,10 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) new(&type) TType(EbtUint, EvqTemporary, 4); break; + case EHTokUint64: + new(&type) TType(EbtUint64); + break; + case EHTokBool: new(&type) TType(EbtBool); break; @@ -1968,6 +2005,11 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) advanceToken(); + if ((isUnorm || isSnorm) && !type.isFloatingDomain()) { + parseContext.error(token.loc, "unorm and snorm only valid in floating point domain", "", ""); + return false; + } + return true; } @@ -2003,10 +2045,18 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList) // Now known to be one of CBUFFER, TBUFFER, CLASS, or STRUCT - // IDENTIFIER + + // IDENTIFIER. It might also be a keyword which can double as an identifier. + // For example: 'cbuffer ConstantBuffer' or 'struct ConstantBuffer' is legal. + // 'cbuffer int' is also legal, and 'struct int' appears rejected only because + // it attempts to redefine the 'int' type. + const char* idString = getTypeString(peek()); TString structName = ""; - if (peekTokenClass(EHTokIdentifier)) { - structName = *token.string; + if (peekTokenClass(EHTokIdentifier) || idString != nullptr) { + if (idString != nullptr) + structName = *idString; + else + structName = *token.string; advanceToken(); } @@ -2127,6 +2177,43 @@ bool HlslGrammar::acceptConstantBufferType(TType& type) } } +// texture_buffer +// : TEXTUREBUFFER LEFT_ANGLE type RIGHT_ANGLE +bool HlslGrammar::acceptTextureBufferType(TType& type) +{ + if (! acceptTokenClass(EHTokTextureBuffer)) + return false; + + if (! acceptTokenClass(EHTokLeftAngle)) { + expected("left angle bracket"); + return false; + } + + TType templateType; + if (! acceptType(templateType)) { + expected("type"); + return false; + } + + if (! acceptTokenClass(EHTokRightAngle)) { + expected("right angle bracket"); + return false; + } + + templateType.getQualifier().storage = EvqBuffer; + templateType.getQualifier().readonly = true; + + TType blockType(templateType.getWritableStruct(), "", templateType.getQualifier()); + + blockType.getQualifier().storage = EvqBuffer; + blockType.getQualifier().readonly = true; + + type.shallowCopy(blockType); + + return true; +} + + // struct_buffer // : APPENDSTRUCTUREDBUFFER // | BYTEADDRESSBUFFER @@ -2199,9 +2286,9 @@ bool HlslGrammar::acceptStructBufferType(TType& type) // Create an unsized array out of that type. // TODO: does this work if it's already an array type? - TArraySizes unsizedArray; - unsizedArray.addInnerSize(UnsizedArraySize); - templateType->newArraySizes(unsizedArray); + TArraySizes* unsizedArray = new TArraySizes; + unsizedArray->addInnerSize(UnsizedArraySize); + templateType->transferArraySizes(unsizedArray); templateType->getQualifier().storage = storage; // field name is canonical for all structbuffers @@ -2231,8 +2318,8 @@ bool HlslGrammar::acceptStructBufferType(TType& type) // : struct_declaration SEMI_COLON struct_declaration SEMI_COLON ... // // struct_declaration -// : fully_specified_type struct_declarator COMMA struct_declarator ... -// | fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition +// : attributes fully_specified_type struct_declarator COMMA struct_declarator ... +// | attributes fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition // // struct_declarator // : IDENTIFIER post_decls @@ -2251,15 +2338,22 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode* break; // struct_declaration - + + // attributes + TAttributes attributes; + acceptAttributes(attributes); + bool declarator_list = false; // fully_specified_type TType memberType; - if (! acceptFullySpecifiedType(memberType, nodeList)) { + if (! acceptFullySpecifiedType(memberType, nodeList, attributes)) { expected("member type"); return false; } + + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, memberType); // struct_declarator COMMA struct_declarator ... bool functionDefinitionAccepted = false; @@ -2292,7 +2386,7 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode* TArraySizes* arraySizes = nullptr; acceptArraySpecifier(arraySizes); if (arraySizes) - typeList->back().type->newArraySizes(*arraySizes); + typeList->back().type->transferArraySizes(arraySizes); acceptPostDecls(member.type->getQualifier()); @@ -2456,15 +2550,16 @@ bool HlslGrammar::acceptDefaultParameterDeclaration(const TType& type, TIntermTy bool HlslGrammar::acceptParameterDeclaration(TFunction& function) { // attributes - TAttributeMap attributes; + TAttributes attributes; acceptAttributes(attributes); // fully_specified_type TType* type = new TType; - if (! acceptFullySpecifiedType(*type)) + if (! acceptFullySpecifiedType(*type, attributes)) return false; - parseContext.transferTypeAttributes(attributes, *type); + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, *type); // identifier HlslToken idToken; @@ -2474,12 +2569,12 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function) TArraySizes* arraySizes = nullptr; acceptArraySpecifier(arraySizes); if (arraySizes) { - if (arraySizes->isImplicit()) { - parseContext.error(token.loc, "function parameter array cannot be implicitly sized", "", ""); + if (arraySizes->hasUnsized()) { + parseContext.error(token.loc, "function parameter requires array size", "[]", ""); return false; } - type->newArraySizes(*arraySizes); + type->transferArraySizes(arraySizes); } // post_decls @@ -2555,6 +2650,8 @@ bool HlslGrammar::acceptFunctionBody(TFunctionDeclarator& declarator, TIntermNod // bool HlslGrammar::acceptParenExpression(TIntermTyped*& expression) { + expression = nullptr; + // LEFT_PAREN if (! acceptTokenClass(EHTokLeftParen)) expected("("); @@ -2848,7 +2945,7 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node) TArraySizes* arraySizes = nullptr; acceptArraySpecifier(arraySizes); if (arraySizes != nullptr) - castType.newArraySizes(*arraySizes); + castType.transferArraySizes(arraySizes); TSourceLoc loc = token.loc; if (acceptTokenClass(EHTokRightParen)) { // We've matched "(type)" now, get the expression to cast @@ -2965,6 +3062,8 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) } if (! peekTokenClass(EHTokLeftParen)) { node = parseContext.handleVariable(idToken.loc, fullName); + if (node == nullptr) + return false; } else if (acceptFunctionCall(idToken.loc, *fullName, node, nullptr)) { // function_call (nothing else to do yet) } else { @@ -3175,6 +3274,9 @@ bool HlslGrammar::acceptLiteral(TIntermTyped*& node) case EHTokUintConstant: node = intermediate.addConstantUnion(token.u, token.loc, true); break; + case EHTokFloat16Constant: + node = intermediate.addConstantUnion(token.d, EbtFloat16, token.loc, true); + break; case EHTokFloatConstant: node = intermediate.addConstantUnion(token.d, EbtFloat, token.loc, true); break; @@ -3298,7 +3400,7 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) statement = nullptr; // attributes - TAttributeMap attributes; + TAttributes attributes; acceptAttributes(attributes); // attributed_statement @@ -3370,7 +3472,7 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) // | PATCHCONSTANTFUNC // | NUMTHREADS LEFT_PAREN x_size, y_size,z z_size RIGHT_PAREN // -void HlslGrammar::acceptAttributes(TAttributeMap& attributes) +void HlslGrammar::acceptAttributes(TAttributes& attributes) { // For now, accept the [ XXX(X) ] syntax, but drop all but // numthreads, which is used to set the CS local size. @@ -3441,9 +3543,16 @@ void HlslGrammar::acceptAttributes(TAttributeMap& attributes) return; } - // Add any values we found into the attribute map. This accepts - // (and ignores) values not mapping to a known TAttributeType; - attributes.setAttribute(nameSpace, attributeToken.string, expressions); + // Add any values we found into the attribute map. + if (attributeToken.string != nullptr) { + TAttributeType attributeType = parseContext.attributeFromName(nameSpace, *attributeToken.string); + if (attributeType == EatNone) + parseContext.warn(attributeToken.loc, "unrecognized attribute", attributeToken.string->c_str(), ""); + else { + TAttributeArgs attributeArgs = { attributeType, expressions }; + attributes.push_back(attributeArgs); + } + } } while (true); } @@ -3451,12 +3560,10 @@ void HlslGrammar::acceptAttributes(TAttributeMap& attributes) // : IF LEFT_PAREN expression RIGHT_PAREN statement // : IF LEFT_PAREN expression RIGHT_PAREN statement ELSE statement // -bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement, const TAttributeMap& attributes) +bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement, const TAttributes& attributes) { TSourceLoc loc = token.loc; - const TSelectionControl control = parseContext.handleSelectionControl(attributes); - // IF if (! acceptTokenClass(EHTokIf)) return false; @@ -3494,7 +3601,9 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement, const TAttri } // Put the pieces together - statement = intermediate.addSelection(condition, thenElse, loc, control); + statement = intermediate.addSelection(condition, thenElse, loc); + parseContext.handleSelectionAttributes(loc, statement->getAsSelectionNode(), attributes); + parseContext.popScope(); --parseContext.controlFlowNestingLevel; @@ -3504,13 +3613,11 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement, const TAttri // switch_statement // : SWITCH LEFT_PAREN expression RIGHT_PAREN compound_statement // -bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement, const TAttributeMap& attributes) +bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement, const TAttributes& attributes) { // SWITCH TSourceLoc loc = token.loc; - const TSelectionControl control = parseContext.handleSelectionControl(attributes); - if (! acceptTokenClass(EHTokSwitch)) return false; @@ -3530,7 +3637,8 @@ bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement, const TAttribut --parseContext.controlFlowNestingLevel; if (statementOkay) - statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr, control); + statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr, + attributes); parseContext.popSwitchSequence(); parseContext.popScope(); @@ -3544,7 +3652,7 @@ bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement, const TAttribut // | FOR LEFT_PAREN for_init_statement for_rest_statement RIGHT_PAREN statement // // Non-speculative, only call if it needs to be found; WHILE or DO or FOR already seen. -bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttributeMap& attributes) +bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttributes& attributes) { TSourceLoc loc = token.loc; TIntermTyped* condition = nullptr; @@ -3554,9 +3662,8 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri // WHILE or DO or FOR advanceToken(); - - const TLoopControl control = parseContext.handleLoopControl(attributes); + TIntermLoop* loopNode = nullptr; switch (loop) { case EHTokWhile: // so that something declared in the condition is scoped to the lifetime @@ -3582,9 +3689,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri parseContext.popScope(); --parseContext.controlFlowNestingLevel; - statement = intermediate.addLoop(statement, condition, nullptr, true, loc, control); - - return true; + loopNode = intermediate.addLoop(statement, condition, nullptr, true, loc); + statement = loopNode; + break; case EHTokDo: parseContext.nestLooping(); // this only needs to work right if no errors @@ -3603,7 +3710,6 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri } // LEFT_PAREN condition RIGHT_PAREN - TIntermTyped* condition; if (! acceptParenExpression(condition)) return false; condition = parseContext.convertConditionalExpression(loc, condition); @@ -3616,9 +3722,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri parseContext.unnestLooping(); --parseContext.controlFlowNestingLevel; - statement = intermediate.addLoop(statement, condition, 0, false, loc, control); - - return true; + loopNode = intermediate.addLoop(statement, condition, 0, false, loc); + statement = loopNode; + break; case EHTokFor: { @@ -3660,18 +3766,21 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri return false; } - statement = intermediate.addForLoop(statement, initNode, condition, iterator, true, loc, control); + statement = intermediate.addForLoop(statement, initNode, condition, iterator, true, loc, loopNode); parseContext.popScope(); parseContext.unnestLooping(); --parseContext.controlFlowNestingLevel; - return true; + break; } default: return false; } + + parseContext.handleLoopAttributes(loc, loopNode, attributes); + return true; } // jump_statement @@ -3699,9 +3808,17 @@ bool HlslGrammar::acceptJumpStatement(TIntermNode*& statement) switch (jump) { case EHTokContinue: statement = intermediate.addBranch(EOpContinue, token.loc); + if (parseContext.loopNestingLevel == 0) { + expected("loop"); + return false; + } break; case EHTokBreak: statement = intermediate.addBranch(EOpBreak, token.loc); + if (parseContext.loopNestingLevel == 0 && parseContext.switchSequenceStack.size() == 0) { + expected("loop or switch"); + return false; + } break; case EHTokDiscard: statement = intermediate.addBranch(EOpKill, token.loc); @@ -3993,6 +4110,8 @@ const char* HlslGrammar::getTypeString(EHlslTokenClass tokenClass) const case EHTokMin10float: return "min10float"; case EHTokMin16int: return "min16int"; case EHTokMin12int: return "min12int"; + case EHTokConstantBuffer: return "ConstantBuffer"; + case EHTokLayout: return "layout"; default: return nullptr; } diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.h b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.h index f0adfa0b781ae88e3655b30eaaa72b7fc6a2f187..046f7957e53e21ea516be16dd5878d3f543952ac 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.h +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslGrammar.h @@ -43,7 +43,6 @@ namespace glslang { - class TAttributeMap; class TFunctionDeclarator; // Should just be the grammar aspect of HLSL. @@ -71,8 +70,8 @@ namespace glslang { bool acceptControlDeclaration(TIntermNode*& node); bool acceptSamplerDeclarationDX9(TType&); bool acceptSamplerState(); - bool acceptFullySpecifiedType(TType&); - bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList); + bool acceptFullySpecifiedType(TType&, const TAttributes&); + bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList, const TAttributes&, bool forbidDeclarators = false); bool acceptQualifier(TQualifier&); bool acceptLayoutQualifierList(TQualifier&); bool acceptType(TType&); @@ -89,6 +88,7 @@ namespace glslang { bool acceptTextureType(TType&); bool acceptSubpassInputType(TType&); bool acceptStructBufferType(TType&); + bool acceptTextureBufferType(TType&); bool acceptConstantBufferType(TType&); bool acceptStruct(TType&, TIntermNode*& nodeList); bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, TVector&); @@ -116,10 +116,10 @@ namespace glslang { bool acceptScopedCompoundStatement(TIntermNode*&); bool acceptStatement(TIntermNode*&); bool acceptNestedStatement(TIntermNode*&); - void acceptAttributes(TAttributeMap&); - bool acceptSelectionStatement(TIntermNode*&, const TAttributeMap&); - bool acceptSwitchStatement(TIntermNode*&, const TAttributeMap&); - bool acceptIterationStatement(TIntermNode*&, const TAttributeMap&); + void acceptAttributes(TAttributes&); + bool acceptSelectionStatement(TIntermNode*&, const TAttributes&); + bool acceptSwitchStatement(TIntermNode*&, const TAttributes&); + bool acceptIterationStatement(TIntermNode*&, const TAttributes&); bool acceptJumpStatement(TIntermNode*&); bool acceptCaseLabel(TIntermNode*&); bool acceptDefaultLabel(TIntermNode*&); diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.cpp b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.cpp index 01b9cc3e602ca56d9cfcf2c5d39a70516921bbe9..ef45da10a26a39137aef5781fbedfbb7130a7912 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.cpp +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.cpp @@ -1,6 +1,6 @@ // -// Copyright (C) 2016 Google, Inc. -// Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2017 Google, Inc. +// Copyright (C) 2017 LunarG, Inc. // // All rights reserved. // @@ -65,10 +65,10 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int entryPointFunction(nullptr), entryPointFunctionBody(nullptr), gsStreamOutput(nullptr), - clipDistanceInput(nullptr), - cullDistanceInput(nullptr), clipDistanceOutput(nullptr), - cullDistanceOutput(nullptr) + cullDistanceOutput(nullptr), + clipDistanceInput(nullptr), + cullDistanceInput(nullptr) { globalUniformDefaults.clear(); globalUniformDefaults.layoutMatrix = ElmRowMajor; @@ -550,6 +550,13 @@ void HlslParseContext::handlePragma(const TSourceLoc& loc, const TVectorgetAsSymbolNode() && wasFlattened(base)) { + if (index->getQualifier().isFrontEndConstant()) + checkIndex(loc, base->getType(), indexValue); + + if (base->getType().isScalarOrVec1()) + result = base; + else if (base->getAsSymbolNode() && wasFlattened(base)) { if (index->getQualifier().storage != EvqConst) error(loc, "Invalid variable index to flattened array", base->getAsSymbolNode()->getName().c_str(), ""); @@ -830,14 +842,13 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc, flattened = (result != base); } else { if (index->getQualifier().isFrontEndConstant()) { - if (base->getType().isImplicitlySizedArray()) - updateImplicitArraySize(loc, base, indexValue); + if (base->getType().isUnsizedArray()) + base->getWritableType().updateImplicitArraySize(indexValue + 1); else checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); - } else { + } else result = intermediate.addIndex(EOpIndexIndirect, base, index, loc); - } } } @@ -1096,7 +1107,7 @@ void HlslParseContext::splitBuiltIn(const TString& baseName, const TType& member TVariable* ioVar = makeInternalVariable(baseName + "." + memberType.getFieldName(), memberType); if (arraySizes != nullptr && !memberType.isArray()) - ioVar->getWritableType().newArraySizes(*arraySizes); + ioVar->getWritableType().copyArraySizes(*arraySizes); splitBuiltIns[tInterstageIoData(memberType.getQualifier().builtIn, outerQualifier.storage)] = ioVar; if (!isClipOrCullDistance(ioVar->getType())) @@ -1160,7 +1171,7 @@ bool HlslParseContext::shouldFlatten(const TType& type, TStorageQualifier qualif return (type.isArray() && intermediate.getFlattenUniformArrays() && topLevel) || (type.isStruct() && type.containsOpaque()); default: - return type.isStruct() && type.containsOpaque(); + return false; }; } @@ -1247,7 +1258,7 @@ int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& // inherited locations must be auto bumped, not replicated if (flattenData.nextLocation != TQualifier::layoutLocationEnd) { memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation; - flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType()); + flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType(), language); nextOutLocation = std::max(nextOutLocation, flattenData.nextLocation); } } @@ -1292,7 +1303,7 @@ int HlslParseContext::flattenStruct(const TVariable& variable, const TType& type name + "." + dereferencedType.getFieldName(), linkage, outerQualifier, builtInArraySizes == nullptr && dereferencedType.isArray() - ? &dereferencedType.getArraySizes() + ? dereferencedType.getArraySizes() : builtInArraySizes); flattenData.offsets[pos++] = mpos; } @@ -1309,7 +1320,7 @@ int HlslParseContext::flattenArray(const TVariable& variable, const TType& type, TFlattenData& flattenData, TString name, bool linkage, const TQualifier& outerQualifier) { - assert(type.isArray() && !type.isImplicitlySizedArray()); + assert(type.isSizedArray()); const int size = type.getOuterArraySize(); const TType dereferencedType(type, 0); @@ -1503,9 +1514,9 @@ void HlslParseContext::fixBuiltInIoType(TType& type) // Alter or set array size as needed. if (requiredArraySize > 0) { if (!type.isArray() || type.getOuterArraySize() != requiredArraySize) { - TArraySizes arraySizes; - arraySizes.addInnerSize(requiredArraySize); - type.newArraySizes(arraySizes); + TArraySizes* arraySizes = new TArraySizes; + arraySizes->addInnerSize(requiredArraySize); + type.transferArraySizes(arraySizes); } } } @@ -1527,9 +1538,9 @@ void HlslParseContext::assignToInterface(TVariable& variable) int size; if (type.isArray() && qualifier.isArrayedIo(language)) { TType elementType(type, 0); - size = intermediate.computeTypeLocationSize(elementType); + size = intermediate.computeTypeLocationSize(elementType, language); } else - size = intermediate.computeTypeLocationSize(type); + size = intermediate.computeTypeLocationSize(type, language); if (qualifier.storage == EvqVaryingIn) { variable.getWritableType().getQualifier().layoutLocation = nextInLocation; @@ -1599,7 +1610,7 @@ void HlslParseContext::addStructBufferHiddenCounterParam(const TSourceLoc& loc, if (! hasStructBuffCounter(*param.type)) return; - const TString counterBlockName(getStructBuffCounterName(*param.name)); + const TString counterBlockName(intermediate.addCounterBufferName(*param.name)); TType counterType; counterBufferType(loc, counterType); @@ -1620,7 +1631,7 @@ void HlslParseContext::addStructBufferHiddenCounterParam(const TSourceLoc& loc, // Returns an aggregate of parameter-symbol nodes. // TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function, - const TAttributeMap& attributes, + const TAttributes& attributes, TIntermNode*& entryPointTree) { currentCaller = function.getMangledName(); @@ -1717,169 +1728,218 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l } // Handle all [attrib] attribute for the shader entry point -void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const TAttributeMap& attributes) +void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const TAttributes& attributes) { - // Handle entry-point function attributes - const TIntermAggregate* numThreads = attributes[EatNumThreads]; - if (numThreads != nullptr) { - const TIntermSequence& sequence = numThreads->getSequence(); - - for (int lid = 0; lid < int(sequence.size()); ++lid) - intermediate.setLocalSize(lid, sequence[lid]->getAsConstantUnion()->getConstArray()[0].getIConst()); - } - - // MaxVertexCount - if (attributes.contains(EatMaxVertexCount)) { - int maxVertexCount; - - if (! attributes.getInt(EatMaxVertexCount, maxVertexCount)) { - error(loc, "invalid maxvertexcount", "", ""); - } else { - if (! intermediate.setVertices(maxVertexCount)) - error(loc, "cannot change previously set maxvertexcount attribute", "", ""); - } - } - - // Handle [patchconstantfunction("...")] - if (attributes.contains(EatPatchConstantFunc)) { - TString pcfName; - if (! attributes.getString(EatPatchConstantFunc, pcfName, 0, false)) { - error(loc, "invalid patch constant function", "", ""); - } else { - patchConstantFunctionName = pcfName; + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatNumThreads: + { + const TIntermSequence& sequence = it->args->getSequence(); + for (int lid = 0; lid < int(sequence.size()); ++lid) + intermediate.setLocalSize(lid, sequence[lid]->getAsConstantUnion()->getConstArray()[0].getIConst()); + break; } - } + case EatMaxVertexCount: + { + int maxVertexCount; - // Handle [domain("...")] - if (attributes.contains(EatDomain)) { - TString domainStr; - if (! attributes.getString(EatDomain, domainStr)) { - error(loc, "invalid domain", "", ""); - } else { - TLayoutGeometry domain = ElgNone; - - if (domainStr == "tri") { - domain = ElgTriangles; - } else if (domainStr == "quad") { - domain = ElgQuads; - } else if (domainStr == "isoline") { - domain = ElgIsolines; + if (! it->getInt(maxVertexCount)) { + error(loc, "invalid maxvertexcount", "", ""); } else { - error(loc, "unsupported domain type", domainStr.c_str(), ""); + if (! intermediate.setVertices(maxVertexCount)) + error(loc, "cannot change previously set maxvertexcount attribute", "", ""); } - - if (language == EShLangTessEvaluation) { - if (! intermediate.setInputPrimitive(domain)) - error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); + break; + } + case EatPatchConstantFunc: + { + TString pcfName; + if (! it->getString(pcfName, 0, false)) { + error(loc, "invalid patch constant function", "", ""); } else { - if (! intermediate.setOutputPrimitive(domain)) - error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); + patchConstantFunctionName = pcfName; } + break; } - } - - // Handle [outputtopology("...")] - if (attributes.contains(EatOutputTopology)) { - TString topologyStr; - if (! attributes.getString(EatOutputTopology, topologyStr)) { - error(loc, "invalid outputtopology", "", ""); - } else { - TVertexOrder vertexOrder = EvoNone; - TLayoutGeometry primitive = ElgNone; - - if (topologyStr == "point") { - intermediate.setPointMode(); - } else if (topologyStr == "line") { - primitive = ElgIsolines; - } else if (topologyStr == "triangle_cw") { - vertexOrder = EvoCw; - primitive = ElgTriangles; - } else if (topologyStr == "triangle_ccw") { - vertexOrder = EvoCcw; - primitive = ElgTriangles; + case EatDomain: + { + // Handle [domain("...")] + TString domainStr; + if (! it->getString(domainStr)) { + error(loc, "invalid domain", "", ""); } else { - error(loc, "unsupported outputtopology type", topologyStr.c_str(), ""); - } + TLayoutGeometry domain = ElgNone; + + if (domainStr == "tri") { + domain = ElgTriangles; + } else if (domainStr == "quad") { + domain = ElgQuads; + } else if (domainStr == "isoline") { + domain = ElgIsolines; + } else { + error(loc, "unsupported domain type", domainStr.c_str(), ""); + } - if (vertexOrder != EvoNone) { - if (! intermediate.setVertexOrder(vertexOrder)) { - error(loc, "cannot change previously set outputtopology", - TQualifier::getVertexOrderString(vertexOrder), ""); + if (language == EShLangTessEvaluation) { + if (! intermediate.setInputPrimitive(domain)) + error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); + } else { + if (! intermediate.setOutputPrimitive(domain)) + error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); } } - if (primitive != ElgNone) - intermediate.setOutputPrimitive(primitive); + break; } - } - - // Handle [partitioning("...")] - if (attributes.contains(EatPartitioning)) { - TString partitionStr; - if (! attributes.getString(EatPartitioning, partitionStr)) { - error(loc, "invalid partitioning", "", ""); - } else { - TVertexSpacing partitioning = EvsNone; - - if (partitionStr == "integer") { - partitioning = EvsEqual; - } else if (partitionStr == "fractional_even") { - partitioning = EvsFractionalEven; - } else if (partitionStr == "fractional_odd") { - partitioning = EvsFractionalOdd; - //} else if (partition == "pow2") { // TODO: currently nothing to map this to. + case EatOutputTopology: + { + // Handle [outputtopology("...")] + TString topologyStr; + if (! it->getString(topologyStr)) { + error(loc, "invalid outputtopology", "", ""); } else { - error(loc, "unsupported partitioning type", partitionStr.c_str(), ""); - } + TVertexOrder vertexOrder = EvoNone; + TLayoutGeometry primitive = ElgNone; + + if (topologyStr == "point") { + intermediate.setPointMode(); + } else if (topologyStr == "line") { + primitive = ElgIsolines; + } else if (topologyStr == "triangle_cw") { + vertexOrder = EvoCw; + primitive = ElgTriangles; + } else if (topologyStr == "triangle_ccw") { + vertexOrder = EvoCcw; + primitive = ElgTriangles; + } else { + error(loc, "unsupported outputtopology type", topologyStr.c_str(), ""); + } - if (! intermediate.setVertexSpacing(partitioning)) - error(loc, "cannot change previously set partitioning", - TQualifier::getVertexSpacingString(partitioning), ""); + if (vertexOrder != EvoNone) { + if (! intermediate.setVertexOrder(vertexOrder)) { + error(loc, "cannot change previously set outputtopology", + TQualifier::getVertexOrderString(vertexOrder), ""); + } + } + if (primitive != ElgNone) + intermediate.setOutputPrimitive(primitive); + } + break; } - } + case EatPartitioning: + { + // Handle [partitioning("...")] + TString partitionStr; + if (! it->getString(partitionStr)) { + error(loc, "invalid partitioning", "", ""); + } else { + TVertexSpacing partitioning = EvsNone; + + if (partitionStr == "integer") { + partitioning = EvsEqual; + } else if (partitionStr == "fractional_even") { + partitioning = EvsFractionalEven; + } else if (partitionStr == "fractional_odd") { + partitioning = EvsFractionalOdd; + //} else if (partition == "pow2") { // TODO: currently nothing to map this to. + } else { + error(loc, "unsupported partitioning type", partitionStr.c_str(), ""); + } - // Handle [outputcontrolpoints("...")] - if (attributes.contains(EatOutputControlPoints)) { - int ctrlPoints; - if (! attributes.getInt(EatOutputControlPoints, ctrlPoints)) { - error(loc, "invalid outputcontrolpoints", "", ""); - } else { - if (! intermediate.setVertices(ctrlPoints)) { - error(loc, "cannot change previously set outputcontrolpoints attribute", "", ""); + if (! intermediate.setVertexSpacing(partitioning)) + error(loc, "cannot change previously set partitioning", + TQualifier::getVertexSpacingString(partitioning), ""); + } + break; + } + case EatOutputControlPoints: + { + // Handle [outputcontrolpoints("...")] + int ctrlPoints; + if (! it->getInt(ctrlPoints)) { + error(loc, "invalid outputcontrolpoints", "", ""); + } else { + if (! intermediate.setVertices(ctrlPoints)) { + error(loc, "cannot change previously set outputcontrolpoints attribute", "", ""); + } } + break; + } + case EatBuiltIn: + case EatLocation: + // tolerate these because of dual use of entrypoint and type attributes + break; + default: + warn(loc, "attribute does not apply to entry point", "", ""); + break; } } } // Update the given type with any type-like attribute information in the // attributes. -void HlslParseContext::transferTypeAttributes(const TAttributeMap& attributes, TType& type) +void HlslParseContext::transferTypeAttributes(const TSourceLoc& loc, const TAttributes& attributes, TType& type, + bool allowEntry) { - // location - int value; - if (attributes.getInt(EatLocation, value)) - type.getQualifier().layoutLocation = value; + if (attributes.size() == 0) + return; - // binding - if (attributes.getInt(EatBinding, value)) { - type.getQualifier().layoutBinding = value; - type.getQualifier().layoutSet = 0; + int value; + TString builtInString; + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatLocation: + // location + if (it->getInt(value)) + type.getQualifier().layoutLocation = value; + break; + case EatBinding: + // binding + if (it->getInt(value)) { + type.getQualifier().layoutBinding = value; + type.getQualifier().layoutSet = 0; + } + // set + if (it->getInt(value, 1)) + type.getQualifier().layoutSet = value; + break; + case EatGlobalBinding: + // global cbuffer binding + if (it->getInt(value)) + globalUniformBinding = value; + // global cbuffer binding + if (it->getInt(value, 1)) + globalUniformSet = value; + break; + case EatInputAttachment: + // input attachment + if (it->getInt(value)) + type.getQualifier().layoutAttachment = value; + break; + case EatBuiltIn: + // PointSize built-in + if (it->getString(builtInString, 0, false)) { + if (builtInString == "PointSize") + type.getQualifier().builtIn = EbvPointSize; + } + break; + case EatPushConstant: + // push_constant + type.getQualifier().layoutPushConstant = true; + break; + case EatConstantId: + // specialization constant + if (it->getInt(value)) { + TSourceLoc loc; + loc.init(); + setSpecConstantId(loc, type.getQualifier(), value); + } + break; + default: + if (! allowEntry) + warn(loc, "attribute does not apply to a type", "", ""); + break; + } } - - // set - if (attributes.getInt(EatBinding, value, 1)) - type.getQualifier().layoutSet = value; - - // global cbuffer binding - if (attributes.getInt(EatGlobalBinding, value)) - globalUniformBinding = value; - - // global cbuffer binding - if (attributes.getInt(EatGlobalBinding, value, 1)) - globalUniformSet = value; - - // input attachment - if (attributes.getInt(EatInputAttachment, value)) - type.getQualifier().layoutAttachment = value; } // @@ -1915,7 +1975,7 @@ void HlslParseContext::transferTypeAttributes(const TAttributeMap& attributes, T // a subtree that creates the entry point. // TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunction& userFunction, - const TAttributeMap& attributes) + const TAttributes& attributes) { // Return true if this is a tessellation patch constant function input to a domain shader. const auto isDsPcfInput = [this](const TType& type) { @@ -2215,9 +2275,9 @@ void HlslParseContext::remapEntryPointIO(TFunction& function, TVariable*& return outputType.shallowCopy(function.getType()); // vertices has necessarily already been set when handling entry point attributes. - TArraySizes arraySizes; - arraySizes.addInnerSize(intermediate.getVertices()); - outputType.newArraySizes(arraySizes); + TArraySizes* arraySizes = new TArraySizes; + arraySizes->addInnerSize(intermediate.getVertices()); + outputType.transferArraySizes(arraySizes); clearUniformInputOutput(function.getWritableType().getQualifier()); returnValue = makeIoVariable("@entryPointOutput", outputType, EvqVaryingOut); @@ -2291,6 +2351,63 @@ void HlslParseContext::handleFunctionArgument(TFunction* function, arguments = newArg; } +// Position may require special handling: we can optionally invert Y. +// See: https://github.com/KhronosGroup/glslang/issues/1173 +// https://github.com/KhronosGroup/glslang/issues/494 +TIntermTyped* HlslParseContext::assignPosition(const TSourceLoc& loc, TOperator op, + TIntermTyped* left, TIntermTyped* right) +{ + // If we are not asked for Y inversion, use a plain old assign. + if (!intermediate.getInvertY()) + return intermediate.addAssign(op, left, right, loc); + + // If we get here, we should invert Y. + TIntermAggregate* assignList = nullptr; + + // If this is a complex rvalue, we don't want to dereference it many times. Create a temporary. + TVariable* rhsTempVar = nullptr; + rhsTempVar = makeInternalVariable("@position", right->getType()); + rhsTempVar->getWritableType().getQualifier().makeTemporary(); + + { + TIntermTyped* rhsTempSym = intermediate.addSymbol(*rhsTempVar, loc); + assignList = intermediate.growAggregate(assignList, + intermediate.addAssign(EOpAssign, rhsTempSym, right, loc), loc); + } + + // pos.y = -pos.y + { + const int Y = 1; + + TIntermTyped* tempSymL = intermediate.addSymbol(*rhsTempVar, loc); + TIntermTyped* tempSymR = intermediate.addSymbol(*rhsTempVar, loc); + TIntermTyped* index = intermediate.addConstantUnion(Y, loc); + + TIntermTyped* lhsElement = intermediate.addIndex(EOpIndexDirect, tempSymL, index, loc); + TIntermTyped* rhsElement = intermediate.addIndex(EOpIndexDirect, tempSymR, index, loc); + + const TType derefType(right->getType(), 0); + + lhsElement->setType(derefType); + rhsElement->setType(derefType); + + TIntermTyped* yNeg = intermediate.addUnaryMath(EOpNegative, rhsElement, loc); + + assignList = intermediate.growAggregate(assignList, intermediate.addAssign(EOpAssign, lhsElement, yNeg, loc)); + } + + // Assign the rhs temp (now with Y inversion) to the final output + { + TIntermTyped* rhsTempSym = intermediate.addSymbol(*rhsTempVar, loc); + assignList = intermediate.growAggregate(assignList, intermediate.addAssign(op, left, rhsTempSym, loc)); + } + + assert(assignList != nullptr); + assignList->setOperator(EOpSequence); + + return assignList; +} + // Clip and cull distance require special handling due to a semantic mismatch. In HLSL, // these can be float scalar, float vector, or arrays of float scalar or float vector. // In SPIR-V, they are arrays of scalar floats in all cases. We must copy individual components @@ -2397,11 +2514,11 @@ TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc clipCullType.getQualifier() = clipCullNode->getType().getQualifier(); // Create required array dimension - TArraySizes arraySizes; + TArraySizes* arraySizes = new TArraySizes; if (isImplicitlyArrayed) - arraySizes.addInnerSize(requiredOuterArraySize); - arraySizes.addInnerSize(requiredInnerArraySize); - clipCullType.newArraySizes(arraySizes); + arraySizes->addInnerSize(requiredOuterArraySize); + arraySizes->addInnerSize(requiredInnerArraySize); + clipCullType.transferArraySizes(arraySizes); // Obtain symbol name: we'll use that for the symbol we introduce. TIntermSymbol* sym = clipCullNode->getAsSymbolNode(); @@ -2556,6 +2673,12 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op wasSplit(binaryNode->getLeft()); }; + // Return true if this stage assigns clip position with potentially inverted Y + const auto assignsClipPos = [this](const TIntermTyped* node) -> bool { + return node->getType().getQualifier().builtIn == EbvPosition && + (language == EShLangVertex || language == EShLangGeometry || language == EShLangTessEvaluation); + }; + const bool isSplitLeft = wasSplit(left) || indexesSplit(left); const bool isSplitRight = wasSplit(right) || indexesSplit(right); @@ -2571,6 +2694,9 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op const int semanticId = (isOutput ? left : right)->getType().getQualifier().layoutLocation; return assignClipCullDistance(loc, op, semanticId, left, right); + } else if (assignsClipPos(left)) { + // Position can require special handling: see comment above assignPosition + return assignPosition(loc, op, left, right); } return intermediate.addAssign(op, left, right, loc); @@ -2655,13 +2781,23 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op // copy from interstage IO built-in if needed subTree = intermediate.addSymbol(*builtInVar); - // Arrayness of builtIn symbols isn't handled by the normal recursion: - // it's been extracted and moved to the built-in. - if (subTree->getType().isArray() && !arrayElement.empty()) { - const TType splitDerefType(subTree->getType(), arrayElement.back()); - subTree = intermediate.addIndex(EOpIndexDirect, subTree, - intermediate.addConstantUnion(arrayElement.back(), loc), loc); - subTree->setType(splitDerefType); + if (subTree->getType().isArray()) { + // Arrayness of builtIn symbols isn't handled by the normal recursion: + // it's been extracted and moved to the built-in. + if (!arrayElement.empty()) { + const TType splitDerefType(subTree->getType(), arrayElement.back()); + subTree = intermediate.addIndex(EOpIndexDirect, subTree, + intermediate.addConstantUnion(arrayElement.back(), loc), loc); + subTree->setType(splitDerefType); + } else if (splitNode->getAsOperator() != nullptr && (splitNode->getAsOperator()->getOp() == EOpIndexIndirect)) { + // This might also be a stage with arrayed outputs, in which case there's an index + // operation we should transfer to the output builtin. + + const TType splitDerefType(subTree->getType(), 0); + subTree = intermediate.addIndex(splitNode->getAsOperator()->getOp(), subTree, + splitNode->getAsBinaryNode()->getRight(), loc); + subTree->setType(splitDerefType); + } } } else if (flattened && !shouldFlatten(derefType, isLeft ? leftStorage : rightStorage, false)) { if (isLeft) @@ -2782,7 +2918,10 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op subSplitLeft, subSplitRight); assignList = intermediate.growAggregate(assignList, clipCullAssign, loc); - + } else if (assignsClipPos(subSplitLeft)) { + // Position can require special handling: see comment above assignPosition + TIntermTyped* positionAssign = assignPosition(loc, op, subSplitLeft, subSplitRight); + assignList = intermediate.growAggregate(assignList, positionAssign, loc); } else if (!shouldFlattenSubsetLeft && !shouldFlattenSubsetRight && !typeL.containsBuiltIn() && !typeR.containsBuiltIn()) { // If this is the final flattening (no nested types below to flatten) @@ -3025,8 +3164,8 @@ bool HlslParseContext::hasStructBuffCounter(const TType& type) const void HlslParseContext::counterBufferType(const TSourceLoc& loc, TType& type) { // Counter type - TType* counterType = new TType(EbtInt, EvqBuffer); - counterType->setFieldName("@count"); + TType* counterType = new TType(EbtUint, EvqBuffer); + counterType->setFieldName(intermediate.implicitCounterName); TTypeList* blockStruct = new TTypeList; TTypeLoc member = { counterType, loc }; @@ -3039,12 +3178,6 @@ void HlslParseContext::counterBufferType(const TSourceLoc& loc, TType& type) shareStructBufferType(type); } -// knowledge of how to construct block name, in one place instead of N places. -TString HlslParseContext::getStructBuffCounterName(const TString& blockName) const -{ - return blockName + "@count"; -} - // declare counter for a structured buffer type void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name) { @@ -3058,9 +3191,9 @@ void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const T TType blockType; counterBufferType(loc, blockType); - TString* blockName = new TString(getStructBuffCounterName(name)); + TString* blockName = new TString(intermediate.addCounterBufferName(name)); - // Counter buffer does not have its own counter buffer. TODO: there should be a better way to track this. + // Counter buffer is not yet in use structBufferCounter[*blockName] = false; shareStructBufferType(blockType); @@ -3074,7 +3207,7 @@ TIntermTyped* HlslParseContext::getStructBufferCounter(const TSourceLoc& loc, TI if (buffer == nullptr || ! isStructBufferType(buffer->getType())) return nullptr; - const TString counterBlockName(getStructBuffCounterName(buffer->getAsSymbolNode()->getName())); + const TString counterBlockName(intermediate.addCounterBufferName(buffer->getAsSymbolNode()->getName())); // Mark the counter as being used structBufferCounter[counterBlockName] = true; @@ -3083,11 +3216,10 @@ TIntermTyped* HlslParseContext::getStructBufferCounter(const TSourceLoc& loc, TI TIntermTyped* index = intermediate.addConstantUnion(0, loc); // index to counter inside block struct TIntermTyped* counterMember = intermediate.addIndex(EOpIndexDirectStruct, counterVar, index, loc); - counterMember->setType(TType(EbtInt)); + counterMember->setType(TType(EbtUint)); return counterMember; } - // // Decompose structure buffer methods into AST // @@ -3117,7 +3249,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte // Some methods require a hidden internal counter, obtained via getStructBufferCounter(). // This lambda adds something to it and returns the old value. const auto incDecCounter = [&](int incval) -> TIntermTyped* { - TIntermTyped* incrementValue = intermediate.addConstantUnion(incval, loc, true); + TIntermTyped* incrementValue = intermediate.addConstantUnion(static_cast(incval), loc, true); TIntermTyped* counter = getStructBufferCounter(loc, bufferObj); // obtain the counter member if (counter == nullptr) @@ -3213,7 +3345,13 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte const TOperator idxOp = (offsetIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect : EOpIndexIndirect; - vec = intermediate.growAggregate(vec, intermediate.addIndex(idxOp, argArray, offsetIdx, loc)); + TIntermTyped* indexVal = intermediate.addIndex(idxOp, argArray, offsetIdx, loc); + + TType derefType(argArray->getType(), 0); + derefType.getQualifier().makeTemporary(); + indexVal->setType(derefType); + + vec = intermediate.growAggregate(vec, indexVal); } vec->setType(TType(argArray->getBasicType(), EvqTemporary, size)); @@ -3238,7 +3376,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte // Index into the array to find the item being loaded. // Byte address buffers index in bytes (only multiples of 4 permitted... not so much a byte address - // buffer then, but that's what it calls itself. + // buffer then, but that's what it calls itself). int size = 0; @@ -3274,8 +3412,17 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte : EOpIndexIndirect; TIntermTyped* lValue = intermediate.addIndex(idxOp, argArray, offsetIdx, loc); - TIntermTyped* rValue = (size == 1) ? argValue : - intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc); + const TType derefType(argArray->getType(), 0); + lValue->setType(derefType); + + TIntermTyped* rValue; + if (size == 1) { + rValue = argValue; + } else { + rValue = intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc); + const TType indexType(argValue->getType(), 0); + rValue->setType(indexType); + } TIntermTyped* assign = intermediate.addAssign(EOpAssign, lValue, rValue, loc); @@ -3297,16 +3444,16 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte TIntermAggregate* body = nullptr; // Length output: - if (argArray->getType().isRuntimeSizedArray()) { - TIntermTyped* lengthCall = intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, argArray, - argNumItems->getType()); - TIntermTyped* assign = intermediate.addAssign(EOpAssign, argNumItems, lengthCall, loc); - body = intermediate.growAggregate(body, assign, loc); - } else { + if (argArray->getType().isSizedArray()) { const int length = argArray->getType().getOuterArraySize(); TIntermTyped* assign = intermediate.addAssign(EOpAssign, argNumItems, intermediate.addConstantUnion(length, loc, true), loc); body = intermediate.growAggregate(body, assign, loc); + } else { + TIntermTyped* lengthCall = intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, argArray, + argNumItems->getType()); + TIntermTyped* assign = intermediate.addAssign(EOpAssign, argNumItems, lengthCall, loc); + body = intermediate.growAggregate(body, assign, loc); } // Stride output: @@ -3467,9 +3614,9 @@ TIntermConstantUnion* HlslParseContext::getSamplePosArray(int count) TType retType(EbtFloat, EvqConst, 2); if (numSamples != 1) { - TArraySizes arraySizes; - arraySizes.addInnerSize(numSamples); - retType.newArraySizes(arraySizes); + TArraySizes* arraySizes = new TArraySizes; + arraySizes->addInnerSize(numSamples); + retType.transferArraySizes(arraySizes); } return new TIntermConstantUnion(*values, retType); @@ -4166,9 +4313,9 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType // we construct an array from the separate args. if (hasOffset4) { TType arrayType(EbtInt, EvqTemporary, 2); - TArraySizes arraySizes; - arraySizes.addInnerSize(4); - arrayType.newArraySizes(arraySizes); + TArraySizes* arraySizes = new TArraySizes; + arraySizes->addInnerSize(4); + arrayType.transferArraySizes(arraySizes); TIntermAggregate* initList = new TIntermAggregate(EOpNull); @@ -4407,6 +4554,22 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& return imageAggregate != nullptr && imageAggregate->getOp() == EOpImageLoad; }; + const auto lookupBuiltinVariable = [&](const char* name, TBuiltInVariable builtin, TType& type) -> TIntermTyped* { + TSymbol* symbol = symbolTable.find(name); + if (nullptr == symbol) { + type.getQualifier().builtIn = builtin; + + TVariable* variable = new TVariable(new TString(name), type); + + symbolTable.insert(*variable); + + symbol = symbolTable.find(name); + assert(symbol && "Inserted symbol could not be found!"); + } + + return intermediate.addSymbol(*(symbol->getAsVariable()), loc); + }; + // HLSL intrinsics can be pass through to native AST opcodes, or decomposed here to existing AST // opcodes for compatibility with existing software stacks. static const bool decomposeHlslIntrinsics = true; @@ -4652,6 +4815,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& } else { // Set the matching operator. Since output is absent, this is all we need to do. node->getAsAggregate()->setOperator(atomicOp); + node->setType(atomic->getType()); } } @@ -4963,7 +5127,65 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& break; } - + case EOpWaveGetLaneCount: + { + // Mapped to gl_SubgroupSize builtin (We preprend @ to the symbol + // so that it inhabits the symbol table, but has a user-invalid name + // in-case some source HLSL defined the symbol also). + TType type(EbtUint, EvqVaryingIn); + node = lookupBuiltinVariable("@gl_SubgroupSize", EbvSubgroupSize2, type); + break; + } + case EOpWaveGetLaneIndex: + { + // Mapped to gl_SubgroupInvocationID builtin (We preprend @ to the + // symbol so that it inhabits the symbol table, but has a + // user-invalid name in-case some source HLSL defined the symbol + // also). + TType type(EbtUint, EvqVaryingIn); + node = lookupBuiltinVariable("@gl_SubgroupInvocationID", EbvSubgroupInvocation2, type); + break; + } + case EOpWaveActiveCountBits: + { + // Mapped to subgroupBallotBitCount(subgroupBallot()) builtin + + // uvec4 type. + TType uvec4Type(EbtUint, EvqTemporary, 4); + + // Get the uvec4 return from subgroupBallot(). + TIntermTyped* res = intermediate.addBuiltInFunctionCall(loc, + EOpSubgroupBallot, true, arguments, uvec4Type); + + // uint type. + TType uintType(EbtUint, EvqTemporary); + + node = intermediate.addBuiltInFunctionCall(loc, + EOpSubgroupBallotBitCount, true, res, uintType); + + break; + } + case EOpWavePrefixCountBits: + { + // Mapped to subgroupBallotInclusiveBitCount(subgroupBallot()) + // builtin + + // uvec4 type. + TType uvec4Type(EbtUint, EvqTemporary, 4); + + // Get the uvec4 return from subgroupBallot(). + TIntermTyped* res = intermediate.addBuiltInFunctionCall(loc, + EOpSubgroupBallot, true, arguments, uvec4Type); + + // uint type. + TType uintType(EbtUint, EvqTemporary); + + node = intermediate.addBuiltInFunctionCall(loc, + EOpSubgroupBallotInclusiveBitCount, true, res, uintType); + + break; + } + default: break; // most pass through unchanged } @@ -5008,6 +5230,12 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct bool builtIn = false; int thisDepth = 0; + // For mat mul, the situation is unusual: we have to compare vector sizes to mat row or col sizes, + // and clamp the opposite arg. Since that's complex, we farm it off to a separate method. + // It doesn't naturally fall out of processing an argument at a time in isolation. + if (function->getName() == "mul") + addGenMulArgumentConversion(loc, *function, arguments); + TIntermAggregate* aggregate = arguments ? arguments->getAsAggregate() : nullptr; // TODO: this needs improvement: there's no way at present to look up a signature in @@ -5169,6 +5397,83 @@ void HlslParseContext::pushFrontArguments(TIntermTyped* front, TIntermTyped*& ar arguments = intermediate.growAggregate(front, arguments); } +// +// HLSL allows mismatched dimensions on vec*mat, mat*vec, vec*vec, and mat*mat. This is a +// situation not well suited to resolution in intrinsic selection, but we can do so here, since we +// can look at both arguments insert explicit shape changes if required. +// +void HlslParseContext::addGenMulArgumentConversion(const TSourceLoc& loc, TFunction& call, TIntermTyped*& args) +{ + TIntermAggregate* argAggregate = args ? args->getAsAggregate() : nullptr; + + if (argAggregate == nullptr || argAggregate->getSequence().size() != 2) { + // It really ought to have two arguments. + error(loc, "expected: mul arguments", "", ""); + return; + } + + TIntermTyped* arg0 = argAggregate->getSequence()[0]->getAsTyped(); + TIntermTyped* arg1 = argAggregate->getSequence()[1]->getAsTyped(); + + if (arg0->isVector() && arg1->isVector()) { + // For: + // vec * vec: it's handled during intrinsic selection, so while we could do it here, + // we can also ignore it, which is easier. + } else if (arg0->isVector() && arg1->isMatrix()) { + // vec * mat: we clamp the vec if the mat col is smaller, else clamp the mat col. + if (arg0->getVectorSize() < arg1->getMatrixCols()) { + // vec is smaller, so truncate larger mat dimension + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + 0, arg0->getVectorSize(), arg1->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } else if (arg0->getVectorSize() > arg1->getMatrixCols()) { + // vec is larger, so truncate vec to mat size + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + arg1->getMatrixCols()); + arg0 = addConstructor(loc, arg0, truncType); + } + } else if (arg0->isMatrix() && arg1->isVector()) { + // mat * vec: we clamp the vec if the mat col is smaller, else clamp the mat col. + if (arg1->getVectorSize() < arg0->getMatrixRows()) { + // vec is smaller, so truncate larger mat dimension + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + 0, arg0->getMatrixCols(), arg1->getVectorSize()); + arg0 = addConstructor(loc, arg0, truncType); + } else if (arg1->getVectorSize() > arg0->getMatrixRows()) { + // vec is larger, so truncate vec to mat size + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + arg0->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } + } else if (arg0->isMatrix() && arg1->isMatrix()) { + // mat * mat: we clamp the smaller inner dimension to match the other matrix size. + // Remember, HLSL Mrc = GLSL/SPIRV Mcr. + if (arg0->getMatrixRows() > arg1->getMatrixCols()) { + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + 0, arg0->getMatrixCols(), arg1->getMatrixCols()); + arg0 = addConstructor(loc, arg0, truncType); + } else if (arg0->getMatrixRows() < arg1->getMatrixCols()) { + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + 0, arg0->getMatrixRows(), arg1->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } + } else { + // It's something with scalars: we'll just leave it alone. Function selection will handle it + // downstream. + } + + // Warn if we altered one of the arguments + if (arg0 != argAggregate->getSequence()[0] || arg1 != argAggregate->getSequence()[1]) + warn(loc, "mul() matrix size mismatch", "", ""); + + // Put arguments back. (They might be unchanged, in which case this is harmless). + argAggregate->getSequence()[0] = arg0; + argAggregate->getSequence()[1] = arg1; + + call[0].type = &arg0->getWritableType(); + call[1].type = &arg1->getWritableType(); +} + // // Add any needed implicit conversions for function-call arguments to input parameters. // @@ -5434,12 +5739,11 @@ void HlslParseContext::addStructBuffArguments(const TSourceLoc& loc, TIntermAggr TType counterType; counterBufferType(loc, counterType); - const TString counterBlockName(getStructBuffCounterName(blockSym->getName())); + const TString counterBlockName(intermediate.addCounterBufferName(blockSym->getName())); TVariable* variable = makeInternalVariable(counterBlockName, counterType); - // Mark this buffer as requiring a counter block. TODO: there should be a better - // way to track it. + // Mark this buffer's counter block as being in use structBufferCounter[counterBlockName] = true; TIntermSymbol* sym = intermediate.addSymbol(*variable, loc); @@ -5681,7 +5985,8 @@ void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, TBu break; } - qualifier.builtIn = builtIn; + if (qualifier.builtIn == EbvNone) + qualifier.builtIn = builtIn; qualifier.semanticName = intermediate.addSemanticName(upperCase); } @@ -5760,7 +6065,10 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi case 'c': case 's': case 'u': - qualifier.layoutBinding = regNumber + subComponent; + // if nothing else has set the binding, do so now + // (other mechanisms override this one) + if (!qualifier.hasBinding()) + qualifier.layoutBinding = regNumber + subComponent; // This handles per-register layout sets numbers. For the global mode which sets // every symbol to the same value, see setLinkageLayoutSets(). @@ -5794,7 +6102,9 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi return true; }; - if (spaceDesc) { + // if nothing else has set the set, do so now + // (other mechanisms override this one) + if (spaceDesc && !qualifier.hasSet()) { if (! crackSpace()) { error(loc, "expected spaceN", "register", ""); return; @@ -5988,7 +6298,7 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node bool arrayArg = false; for (int arg = 0; arg < function.getParamCount(); ++arg) { if (function[arg].type->isArray()) { - if (! function[arg].type->isExplicitlySizedArray()) { + if (function[arg].type->isUnsizedArray()) { // Can't construct from an unsized array. error(loc, "array argument must be sized", "constructor", ""); return true; @@ -6023,11 +6333,10 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node return true; } - if (type.isImplicitlySizedArray()) { + if (type.isUnsizedArray()) { // auto adapt the constructor type to the number of arguments type.changeOuterArraySize(function.getParamCount()); - } else if (type.getOuterArraySize() != function.getParamCount() && - type.computeNumComponents() > size) { + } else if (type.getOuterArraySize() != function.getParamCount() && type.computeNumComponents() > size) { error(loc, "array constructor needs one argument per array element", "constructor", ""); return true; } @@ -6036,21 +6345,21 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node // Types have to match, but we're still making the type. // Finish making the type, and the comparison is done later // when checking for conversion. - TArraySizes& arraySizes = type.getArraySizes(); + TArraySizes& arraySizes = *type.getArraySizes(); // At least the dimensionalities have to match. if (! function[0].type->isArray() || - arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) { + arraySizes.getNumDims() != function[0].type->getArraySizes()->getNumDims() + 1) { error(loc, "array constructor argument not correct type to construct array element", "constructor", ""); return true; } - if (arraySizes.isInnerImplicit()) { + if (arraySizes.isInnerUnsized()) { // "Arrays of arrays ..., and the size for any dimension is optional" // That means we need to adopt (from the first argument) the other array sizes into the type. for (int d = 1; d < arraySizes.getNumDims(); ++d) { if (arraySizes.getDimSize(d) == UnsizedArraySize) { - arraySizes.setDimSize(d, function[0].type->getArraySizes().getDimSize(d - 1)); + arraySizes.setDimSize(d, function[0].type->getArraySizes()->getDimSize(d - 1)); } } } @@ -6245,6 +6554,7 @@ void HlslParseContext::mergeQualifiers(TQualifier& dst, const TQualifier& src) MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); MERGE_SINGLETON(specConstant); + MERGE_SINGLETON(nonUniform); } // used to flatten the sampler type space into a single dimension @@ -6300,7 +6610,7 @@ void HlslParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, // void HlslParseContext::arraySizeRequiredCheck(const TSourceLoc& loc, const TArraySizes& arraySizes) { - if (arraySizes.isImplicit()) + if (arraySizes.hasUnsized()) error(loc, "array size required", "", ""); } @@ -6314,20 +6624,6 @@ void HlslParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& } } -// Merge array dimensions listed in 'sizes' onto the type's array dimensions. -// -// From the spec: "vec4[2] a[3]; // size-3 array of size-2 array of vec4" -// -// That means, the 'sizes' go in front of the 'type' as outermost sizes. -// 'type' is the type part of the declaration (to the left) -// 'sizes' is the arrayness tagged on the identifier (to the right) -// -void HlslParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes) -{ - if (sizes) - type.addArrayOuterSizes(*sizes); -} - // // Do all the semantic checking for declaring or redeclaring an array, with and // without a size, and make the right changes to the symbol table. @@ -6374,7 +6670,7 @@ void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identi // redeclareBuiltinVariable() should have already done the copyUp() TType& existingType = symbol->getWritableType(); - if (existingType.isExplicitlySizedArray()) { + if (existingType.isSizedArray()) { // be more lenient for input arrays to geometry shaders and tessellation control outputs, // where the redeclaration is the same size return; @@ -6383,52 +6679,6 @@ void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identi existingType.updateArraySizes(type); } -void HlslParseContext::updateImplicitArraySize(const TSourceLoc& loc, TIntermNode *node, int index) -{ - // maybe there is nothing to do... - TIntermTyped* typedNode = node->getAsTyped(); - if (typedNode->getType().getImplicitArraySize() > index) - return; - - // something to do... - - // Figure out what symbol to lookup, as we will use its type to edit for the size change, - // as that type will be shared through shallow copies for future references. - TSymbol* symbol = nullptr; - int blockIndex = -1; - const TString* lookupName = nullptr; - if (node->getAsSymbolNode()) - lookupName = &node->getAsSymbolNode()->getName(); - else if (node->getAsBinaryNode()) { - const TIntermBinary* deref = node->getAsBinaryNode(); - // This has to be the result of a block dereference, unless it's bad shader code - // If it's a uniform block, then an error will be issued elsewhere, but - // return early now to avoid crashing later in this function. - if (! deref->getLeft()->getAsSymbolNode() || deref->getLeft()->getBasicType() != EbtBlock || - deref->getLeft()->getType().getQualifier().storage == EvqUniform || - deref->getRight()->getAsConstantUnion() == nullptr) - return; - - blockIndex = deref->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); - - lookupName = &deref->getLeft()->getAsSymbolNode()->getName(); - if (IsAnonymous(*lookupName)) - lookupName = &(*deref->getLeft()->getType().getStruct())[blockIndex].type->getFieldName(); - } - - // Lookup the symbol, should only fail if shader code is incorrect - symbol = symbolTable.find(*lookupName); - if (symbol == nullptr) - return; - - if (symbol->getAsFunction()) { - error(loc, "array variable name expected", symbol->getName().c_str(), ""); - return; - } - - symbol->getWritableType().setImplicitArraySize(index + 1); -} - // // Enforce non-initializer type/qualifier rules. // @@ -6492,7 +6742,7 @@ TIntermTyped* HlslParseContext::indexStructBufferContent(const TSourceLoc& loc, // TType* HlslParseContext::getStructBufferContentType(const TType& type) const { - if (type.getBasicType() != EbtBlock) + if (type.getBasicType() != EbtBlock || type.getQualifier().storage != EvqBuffer) return nullptr; const int memberCount = (int)type.getStruct()->size(); @@ -6500,7 +6750,7 @@ TType* HlslParseContext::getStructBufferContentType(const TType& type) const TType* contentType = (*type.getStruct())[memberCount-1].type; - return contentType->isRuntimeSizedArray() ? contentType : nullptr; + return contentType->isUnsizedArray() ? contentType : nullptr; } // @@ -6848,15 +7098,7 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua return; } if (id == "constant_id") { - requireSpv(loc, "constant_id"); - if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { - error(loc, "specialization-constant id is too large", id.c_str(), ""); - } else { - qualifier.layoutSpecConstantId = value; - qualifier.specConstant = true; - if (! intermediate.addUsedConstantId(value)) - error(loc, "specialization-constant id already used", id.c_str(), ""); - } + setSpecConstantId(loc, qualifier, value); return; } @@ -6951,6 +7193,19 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua error(loc, "there is no such layout identifier for this stage taking an assigned value", id.c_str(), ""); } +void HlslParseContext::setSpecConstantId(const TSourceLoc& loc, TQualifier& qualifier, int value) +{ + if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { + error(loc, "specialization-constant id is too large", "constant_id", ""); + } else { + qualifier.layoutSpecConstantId = value; + qualifier.specConstant = true; + if (! intermediate.addUsedConstantId(value)) + error(loc, "specialization-constant id already used", "constant_id", ""); + } + return; +} + // Merge any layout qualifier information from src into dst, leaving everything else in dst alone // // "More than one layout qualifier may appear in a single declaration. @@ -7015,6 +7270,7 @@ void HlslParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQuali } } + // // Look up a function name in the symbol table, and make sure it is a function. // @@ -7199,8 +7455,8 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction } }; - return std::abs(linearize(to2.getBasicType()) - linearize(from.getBasicType())) < - std::abs(linearize(to1.getBasicType()) - linearize(from.getBasicType())); + return abs(linearize(to2.getBasicType()) - linearize(from.getBasicType())) < + abs(linearize(to1.getBasicType()) - linearize(from.getBasicType())); }; // for ambiguity reporting @@ -7623,8 +7879,7 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm } // Fix outer arrayness if variable is unsized, getting size from the initializer - if (initializer->getType().isExplicitlySizedArray() && - variable->getType().isImplicitlySizedArray()) + if (initializer->getType().isSizedArray() && variable->getType().isUnsizedArray()) variable->getWritableType().changeOuterArraySize(initializer->getType().getOuterArraySize()); // Inner arrayness can also get set by an initializer @@ -7633,8 +7888,10 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm variable->getType().getArraySizes()->getNumDims()) { // adopt unsized sizes from the initializer's sizes for (int d = 1; d < variable->getType().getArraySizes()->getNumDims(); ++d) { - if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize) - variable->getWritableType().getArraySizes().setDimSize(d, initializer->getType().getArraySizes()->getDimSize(d)); + if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize) { + variable->getWritableType().getArraySizes()->setDimSize(d, + initializer->getType().getArraySizes()->getDimSize(d)); + } } } @@ -7721,20 +7978,20 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co // Later on, initializer execution code will deal with array size logic. TType arrayType; arrayType.shallowCopy(type); // sharing struct stuff is fine - arrayType.newArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below + arrayType.copyArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below // edit array sizes to fill in unsized dimensions - if (type.isImplicitlySizedArray()) + if (type.isUnsizedArray()) arrayType.changeOuterArraySize((int)initList->getSequence().size()); // set unsized array dimensions that can be derived from the initializer's first element if (arrayType.isArrayOfArrays() && initList->getSequence().size() > 0) { TIntermTyped* firstInit = initList->getSequence()[0]->getAsTyped(); if (firstInit->getType().isArray() && - arrayType.getArraySizes().getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) { - for (int d = 1; d < arrayType.getArraySizes().getNumDims(); ++d) { - if (arrayType.getArraySizes().getDimSize(d) == UnsizedArraySize) - arrayType.getArraySizes().setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1)); + arrayType.getArraySizes()->getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) { + for (int d = 1; d < arrayType.getArraySizes()->getNumDims(); ++d) { + if (arrayType.getArraySizes()->getDimSize(d) == UnsizedArraySize) + arrayType.getArraySizes()->setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1)); } } } @@ -7999,6 +8256,22 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op // First, convert types as needed. // switch (op) { + case EOpConstructF16Vec2: + case EOpConstructF16Vec3: + case EOpConstructF16Vec4: + case EOpConstructF16Mat2x2: + case EOpConstructF16Mat2x3: + case EOpConstructF16Mat2x4: + case EOpConstructF16Mat3x2: + case EOpConstructF16Mat3x3: + case EOpConstructF16Mat3x4: + case EOpConstructF16Mat4x2: + case EOpConstructF16Mat4x3: + case EOpConstructF16Mat4x4: + case EOpConstructFloat16: + basicOp = EOpConstructFloat16; + break; + case EOpConstructVec2: case EOpConstructVec3: case EOpConstructVec4: @@ -8031,6 +8304,13 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op basicOp = EOpConstructDouble; break; + case EOpConstructI16Vec2: + case EOpConstructI16Vec3: + case EOpConstructI16Vec4: + case EOpConstructInt16: + basicOp = EOpConstructInt16; + break; + case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: @@ -8047,6 +8327,13 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op basicOp = EOpConstructInt; break; + case EOpConstructU16Vec2: + case EOpConstructU16Vec3: + case EOpConstructU16Vec4: + case EOpConstructUint16: + basicOp = EOpConstructUint16; + break; + case EOpConstructUVec2: case EOpConstructUVec3: case EOpConstructUVec4: @@ -8196,7 +8483,7 @@ TIntermTyped* HlslParseContext::constructAggregate(TIntermNode* node, const TTyp // // Do everything needed to add an interface block. // -void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TString* instanceName, TArraySizes* arraySizes) +void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TString* instanceName) { assert(type.getWritableStruct() != nullptr); @@ -8324,8 +8611,8 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS const TString& interfaceName = (instanceName && !instanceName->empty()) ? *instanceName : type.getTypeName(); TType blockType(&typeList, interfaceName, type.getQualifier()); - if (arraySizes) - blockType.newArraySizes(*arraySizes); + if (type.isArray()) + blockType.transferArraySizes(type.getArraySizes()); // Add the variable, as anonymous or named instanceName. // Make an anonymous variable if no name was provided. @@ -8343,7 +8630,7 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS return; } - // Save it in the AST for linker use. + // Save it in the AST for linker use. if (symbolTable.atGlobalLevel()) trackLinkage(variable); } @@ -8386,7 +8673,7 @@ void HlslParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qual memberQualifier.layoutComponent = 0; } nextLocation = memberQualifier.layoutLocation + - intermediate.computeTypeLocationSize(*typeList[member].type); + intermediate.computeTypeLocationSize(*typeList[member].type, language); } } } @@ -8559,6 +8846,11 @@ bool HlslParseContext::handleInputGeometry(const TSourceLoc& loc, const TLayoutG // bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayoutGeometry& geometry) { + // If this is not a geometry shader, ignore. It might be a mixed shader including several stages. + // Since that's an OK situation, return true for success. + if (language != EShLangGeometry) + return true; + switch (geometry) { case ElgPoints: case ElgLineStrip: @@ -8577,29 +8869,75 @@ bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayout } // -// Selection hints +// Selection attributes // -TSelectionControl HlslParseContext::handleSelectionControl(const TAttributeMap& attributes) const +void HlslParseContext::handleSelectionAttributes(const TSourceLoc& loc, TIntermSelection* selection, + const TAttributes& attributes) { - if (attributes.contains(EatFlatten)) - return ESelectionControlFlatten; - else if (attributes.contains(EatBranch)) - return ESelectionControlDontFlatten; - else - return ESelectionControlNone; + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(loc, "attribute does not apply to a selection", "", ""); + break; + } + } } // -// Loop hints +// Switch attributes // -TLoopControl HlslParseContext::handleLoopControl(const TAttributeMap& attributes) const +void HlslParseContext::handleSwitchAttributes(const TSourceLoc& loc, TIntermSwitch* selection, + const TAttributes& attributes) { - if (attributes.contains(EatUnroll)) - return ELoopControlUnroll; - else if (attributes.contains(EatLoop)) - return ELoopControlDontUnroll; - else - return ELoopControlNone; + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(loc, "attribute does not apply to a switch", "", ""); + break; + } + } +} + +// +// Loop attributes +// +void HlslParseContext::handleLoopAttributes(const TSourceLoc& loc, TIntermLoop* loop, + const TAttributes& attributes) +{ + if (loop == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatUnroll: + loop->setUnroll(); + break; + case EatLoop: + loop->setDontUnroll(); + break; + default: + warn(loc, "attribute does not apply to a loop", "", ""); + break; + } + } } // @@ -8744,7 +9082,7 @@ void HlslParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIn // into a switch node. // TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, - TIntermAggregate* lastStatements, TSelectionControl control) + TIntermAggregate* lastStatements, const TAttributes& attributes) { wrapupSwitchSubsequence(lastStatements, nullptr); @@ -8771,7 +9109,7 @@ TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* ex TIntermSwitch* switchNode = new TIntermSwitch(expression, body); switchNode->setLoc(loc); - switchNode->setSelectionControl(control); + handleSwitchAttributes(loc, switchNode, attributes); return switchNode; } @@ -8893,7 +9231,7 @@ bool HlslParseContext::isInputBuiltIn(const TQualifier& qualifier) const case EbvVertexIndex: return language == EShLangVertex; case EbvPrimitiveId: - return language == EShLangGeometry || language == EShLangFragment; + return language == EShLangGeometry || language == EShLangFragment || language == EShLangTessControl; case EbvTessLevelInner: case EbvTessLevelOuter: return language == EShLangTessEvaluation; @@ -8939,9 +9277,9 @@ bool HlslParseContext::isOutputBuiltIn(const TQualifier& qualifier) const return language == EShLangFragment; case EbvLayer: case EbvViewportIndex: - return language == EShLangGeometry; + return language == EShLangGeometry || language == EShLangVertex; case EbvPrimitiveId: - return language == EShLangGeometry || language == EShLangTessControl || language == EShLangTessEvaluation; + return language == EShLangGeometry; case EbvTessLevelInner: case EbvTessLevelOuter: return language == EShLangTessControl; @@ -9005,11 +9343,17 @@ void HlslParseContext::correctOutput(TQualifier& qualifier) qualifier.patch = false; switch (qualifier.builtIn) { + case EbvFragDepth: + intermediate.setDepthReplacing(); + intermediate.setDepth(EldAny); + break; case EbvFragDepthGreater: + intermediate.setDepthReplacing(); intermediate.setDepth(EldGreater); qualifier.builtIn = EbvFragDepth; break; case EbvFragDepthLesser: + intermediate.setDepthReplacing(); intermediate.setDepth(EldLess); qualifier.builtIn = EbvFragDepth; break; @@ -9239,7 +9583,7 @@ void HlslParseContext::addPatchConstantInvocation() const TType& type = *patchConstantFunction[param].type; const TBuiltInVariable biType = patchConstantFunction[param].getDeclaredBuiltIn(); - return type.isArray() && !type.isRuntimeSizedArray() && biType == EbvOutputPatch; + return type.isSizedArray() && biType == EbvOutputPatch; }; // We will perform these steps. Each is in a scoped block for separation: they could @@ -9542,7 +9886,8 @@ void HlslParseContext::addPatchConstantInvocation() } // Finalization step: remove unused buffer blocks from linkage (we don't know until the -// shader is entirely compiled) +// shader is entirely compiled). +// Preserve order of remaining symbols. void HlslParseContext::removeUnusedStructBufferCounters() { const auto endIt = std::remove_if(linkageSymbols.begin(), linkageSymbols.end(), @@ -9589,7 +9934,7 @@ void HlslParseContext::finish() // Communicate out (esp. for command line) that we formed AST that will make // illegal AST SPIR-V and it needs transforms to legalize it. - if (intermediate.needsLegalization()) + if (intermediate.needsLegalization() && (messages & EShMsgHlslLegalization)) infoSink.info << "WARNING: AST will form illegal SPIR-V; need to transform to legalize"; TParseContextBase::finish(); diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.h b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.h index c1752f129196bc321d3fb972b89feb25c1583feb..b16a8c2c3ad155eb1e492d9c8c7d77aeeb0d67a5 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.h +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseHelper.h @@ -38,12 +38,12 @@ #include "../glslang/MachineIndependent/parseVersions.h" #include "../glslang/MachineIndependent/ParseHelper.h" +#include "../glslang/MachineIndependent/attribute.h" #include namespace glslang { -class TAttributeMap; // forward declare class TFunctionDeclarator; class HlslParseContext : public TParseContextBase { @@ -80,10 +80,10 @@ public: bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field); void assignToInterface(TVariable& variable); void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); - TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree); - TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributeMap&); - void handleEntryPointAttributes(const TSourceLoc&, const TAttributeMap&); - void transferTypeAttributes(const TAttributeMap&, TType&); + TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributes&, TIntermNode*& entryPointTree); + TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributes&); + void handleEntryPointAttributes(const TSourceLoc&, const TAttributes&); + void transferTypeAttributes(const TSourceLoc&, const TAttributes&, TType&, bool allowEntry = false); void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node); void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector& inputs, TVector& outputs); void remapNonEntryPointIO(TFunction& function); @@ -93,6 +93,7 @@ public: TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*); TIntermAggregate* assignClipCullDistance(const TSourceLoc&, TOperator, int semanticId, TIntermTyped* left, TIntermTyped* right); + TIntermTyped* assignPosition(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); @@ -125,7 +126,6 @@ public: void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); void structArrayCheck(const TSourceLoc&, const TType& structure); - void arrayDimMerge(TType& type, const TArraySizes* sizes); bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); void globalQualifierFix(const TSourceLoc&, TQualifier&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); @@ -137,10 +137,12 @@ public: void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&); void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&, const TIntermTyped*); + void setSpecConstantId(const TSourceLoc&, TQualifier&, int value); void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly); void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&); const TFunction* findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, int& thisDepth, TIntermTyped*& args); + void addGenMulArgumentConversion(const TSourceLoc& loc, TFunction& call, TIntermTyped*& args); void declareTypedef(const TSourceLoc&, const TString& identifier, const TType&); void declareStruct(const TSourceLoc&, TString& structName, TType&); TSymbol* lookupUserType(const TString&, TType&); @@ -151,7 +153,7 @@ public: TIntermTyped* convertArray(TIntermTyped*, const TType&); TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); - void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0, TArraySizes* arraySizes = 0); + void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0); void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixBlockXfbOffsets(TQualifier&, TTypeList&); @@ -160,9 +162,7 @@ public: void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); - TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body, TSelectionControl control); - - void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index); + TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body, const TAttributes&); void nestLooping() { ++loopNestingLevel; } void unnestLooping() { --loopNestingLevel; } @@ -200,10 +200,11 @@ public: bool handleInputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry); // Determine selection control from attributes - TSelectionControl handleSelectionControl(const TAttributeMap& attributes) const; + void handleSelectionAttributes(const TSourceLoc& loc, TIntermSelection*, const TAttributes& attributes); + void handleSwitchAttributes(const TSourceLoc& loc, TIntermSwitch*, const TAttributes& attributes); // Determine loop control from attributes - TLoopControl handleLoopControl(const TAttributeMap& attributes) const; + void handleLoopAttributes(const TSourceLoc& loc, TIntermLoop*, const TAttributes& attributes); // Share struct buffer deep types void shareStructBufferType(TType&); @@ -214,6 +215,8 @@ public: // Obtain the sampler return type of the given sampler in retType. void getTextureReturnType(const TSampler& sampler, TType& retType) const; + TAttributeType attributeFromName(const TString& nameSpace, const TString& name) const; + protected: struct TFlattenData { TFlattenData() : nextBinding(TQualifier::layoutBindingEnd), @@ -399,7 +402,7 @@ protected: // may fit in TSampler::structReturnIndex. TVector textureReturnStruct; - TMap structBufferCounter; + TMap structBufferCounter; // true if counter buffer is in use // The built-in interstage IO map considers e.g, EvqPosition on input and output separately, so that we // can build the linkage correctly if position appears on both sides. Otherwise, multiple positions diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseables.cpp b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseables.cpp index bae9e6e8c6493bbf0d87cf168cdab06a0bffa46d..cc847ae22fd716be58dca003edcd571241d72f2a 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseables.cpp +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslParseables.cpp @@ -259,6 +259,8 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons case 'D': s += "double"; break; case 'I': s += "int"; break; case 'U': s += "uint"; break; + case 'L': s += "int64_t"; break; + case 'M': s += "uint64_t"; break; case 'B': s += "bool"; break; case 'S': s += "sampler"; break; case 's': s += "SamplerComparisonState"; break; @@ -544,7 +546,7 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c // orderKey can be: // S = scalar, V = vector, M = matrix, - = void // typekey can be: - // D = double, F = float, U = uint, I = int, B = bool, S = sampler, s = shadowSampler + // D = double, F = float, U = uint, I = int, B = bool, S = sampler, s = shadowSampler, M = uint64_t, L = int64_t // An empty order or type key repeats the first one. E.g: SVM,, means 3 args each of SVM. // '>' as first letter of order creates an output parameter // '<' as first letter of order creates an input parameter @@ -580,8 +582,8 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "asdouble", "V2", "D", "V2,", "UI,", EShLangAll, false }, { "asfloat", nullptr, "F", "SVM", "BFIU", EShLangAll, false }, { "asin", nullptr, nullptr, "SVM", "F", EShLangAll, false }, - { "asint", nullptr, "I", "SVM", "FU", EShLangAll, false }, - { "asuint", nullptr, "U", "SVM", "FU", EShLangAll, false }, + { "asint", nullptr, "I", "SVM", "FIU", EShLangAll, false }, + { "asuint", nullptr, "U", "SVM", "FIU", EShLangAll, false }, { "atan", nullptr, nullptr, "SVM", "F", EShLangAll, false }, { "atan2", nullptr, nullptr, "SVM,", "F,", EShLangAll, false }, { "ceil", nullptr, nullptr, "SVM", "F", EShLangAll, false }, @@ -902,6 +904,35 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "DecrementCounter", nullptr, nullptr, "-", "-", EShLangAll, true }, { "Consume", nullptr, nullptr, "-", "-", EShLangAll, true }, + // SM 6.0 + + { "WaveIsFirstLane", "S", "B", "-", "-", EShLangPSCS, false}, + { "WaveGetLaneCount", "S", "U", "-", "-", EShLangPSCS, false}, + { "WaveGetLaneIndex", "S", "U", "-", "-", EShLangPSCS, false}, + { "WaveActiveAnyTrue", "S", "B", "S", "B", EShLangPSCS, false}, + { "WaveActiveAllTrue", "S", "B", "S", "B", EShLangPSCS, false}, + { "WaveActiveBallot", "V4", "U", "S", "B", EShLangPSCS, false}, + { "WaveReadLaneAt", nullptr, nullptr, "SV,S", "DFUI,U", EShLangPSCS, false}, + { "WaveReadLaneFirst", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveAllEqual", "S", "B", "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveAllEqualBool", "S", "B", "S", "B", EShLangPSCS, false}, + { "WaveActiveCountBits", "S", "U", "S", "B", EShLangPSCS, false}, + + { "WaveActiveSum", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveProduct", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveBitAnd", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveBitOr", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveBitXor", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveMin", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WaveActiveMax", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WavePrefixSum", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WavePrefixProduct", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "WavePrefixCountBits", "S", "U", "S", "B", EShLangPSCS, false}, + { "QuadReadAcrossX", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "QuadReadAcrossY", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "QuadReadAcrossDiagonal", nullptr, nullptr, "SV", "DFUI", EShLangPSCS, false}, + { "QuadReadLaneAt", nullptr, nullptr, "SV,S", "DFUI,U", EShLangPSCS, false}, + // Methods for subpass input objects { "SubpassLoad", "V4", nullptr, "[", "FIU", EShLangPS, true }, { "SubpassLoad", "V4", nullptr, "],S", "FIU,I", EShLangPS, true }, @@ -1087,8 +1118,8 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator("ddy_fine", EOpDPdyFine); symbolTable.relateToOperator("degrees", EOpDegrees); symbolTable.relateToOperator("determinant", EOpDeterminant); - symbolTable.relateToOperator("DeviceMemoryBarrier", EOpGroupMemoryBarrier); - symbolTable.relateToOperator("DeviceMemoryBarrierWithGroupSync", EOpGroupMemoryBarrierWithGroupSync); // ... + symbolTable.relateToOperator("DeviceMemoryBarrier", EOpDeviceMemoryBarrier); + symbolTable.relateToOperator("DeviceMemoryBarrierWithGroupSync", EOpDeviceMemoryBarrierWithGroupSync); symbolTable.relateToOperator("distance", EOpDistance); symbolTable.relateToOperator("dot", EOpDot); symbolTable.relateToOperator("dst", EOpDst); @@ -1244,6 +1275,33 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator(BUILTIN_PREFIX "Append", EOpMethodAppend); symbolTable.relateToOperator(BUILTIN_PREFIX "RestartStrip", EOpMethodRestartStrip); + // Wave ops + symbolTable.relateToOperator("WaveIsFirstLane", EOpSubgroupElect); + symbolTable.relateToOperator("WaveGetLaneCount", EOpWaveGetLaneCount); + symbolTable.relateToOperator("WaveGetLaneIndex", EOpWaveGetLaneIndex); + symbolTable.relateToOperator("WaveActiveAnyTrue", EOpSubgroupAny); + symbolTable.relateToOperator("WaveActiveAllTrue", EOpSubgroupAll); + symbolTable.relateToOperator("WaveActiveBallot", EOpSubgroupBallot); + symbolTable.relateToOperator("WaveReadLaneFirst", EOpSubgroupBroadcastFirst); + symbolTable.relateToOperator("WaveReadLaneAt", EOpSubgroupShuffle); + symbolTable.relateToOperator("WaveActiveAllEqual", EOpSubgroupAllEqual); + symbolTable.relateToOperator("WaveActiveAllEqualBool", EOpSubgroupAllEqual); + symbolTable.relateToOperator("WaveActiveCountBits", EOpWaveActiveCountBits); + symbolTable.relateToOperator("WaveActiveSum", EOpSubgroupAdd); + symbolTable.relateToOperator("WaveActiveProduct", EOpSubgroupMul); + symbolTable.relateToOperator("WaveActiveBitAnd", EOpSubgroupAnd); + symbolTable.relateToOperator("WaveActiveBitOr", EOpSubgroupOr); + symbolTable.relateToOperator("WaveActiveBitXor", EOpSubgroupXor); + symbolTable.relateToOperator("WaveActiveMin", EOpSubgroupMin); + symbolTable.relateToOperator("WaveActiveMax", EOpSubgroupMax); + symbolTable.relateToOperator("WavePrefixSum", EOpSubgroupInclusiveAdd); + symbolTable.relateToOperator("WavePrefixProduct", EOpSubgroupInclusiveMul); + symbolTable.relateToOperator("WavePrefixCountBits", EOpWavePrefixCountBits); + symbolTable.relateToOperator("QuadReadAcrossX", EOpSubgroupQuadSwapHorizontal); + symbolTable.relateToOperator("QuadReadAcrossY", EOpSubgroupQuadSwapVertical); + symbolTable.relateToOperator("QuadReadAcrossDiagonal", EOpSubgroupQuadSwapDiagonal); + symbolTable.relateToOperator("QuadReadLaneAt", EOpSubgroupQuadBroadcast); + // Subpass input methods symbolTable.relateToOperator(BUILTIN_PREFIX "SubpassLoad", EOpSubpassLoad); symbolTable.relateToOperator(BUILTIN_PREFIX "SubpassLoadMS", EOpSubpassLoadMS); diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslScanContext.cpp b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslScanContext.cpp index c16fdfaff964bf3604d515a0547a8c3423b2d95a..28a66bb47d2a65f711373f1b07d53556d5c70fac 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslScanContext.cpp +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslScanContext.cpp @@ -143,6 +143,7 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["bool"] = EHTokBool; (*KeywordMap)["int"] = EHTokInt; (*KeywordMap)["uint"] = EHTokUint; + (*KeywordMap)["uint64_t"] = EHTokUint64; (*KeywordMap)["dword"] = EHTokDword; (*KeywordMap)["half"] = EHTokHalf; (*KeywordMap)["float"] = EHTokFloat; @@ -345,6 +346,7 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["RWByteAddressBuffer"] = EHTokRWByteAddressBuffer; (*KeywordMap)["RWStructuredBuffer"] = EHTokRWStructuredBuffer; (*KeywordMap)["StructuredBuffer"] = EHTokStructuredBuffer; + (*KeywordMap)["TextureBuffer"] = EHTokTextureBuffer; (*KeywordMap)["class"] = EHTokClass; (*KeywordMap)["struct"] = EHTokStruct; @@ -548,6 +550,7 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) case PpAtomConstInt: parserToken->i = ppToken.ival; return EHTokIntConstant; case PpAtomConstUint: parserToken->i = ppToken.ival; return EHTokUintConstant; + case PpAtomConstFloat16: parserToken->d = ppToken.dval; return EHTokFloat16Constant; case PpAtomConstFloat: parserToken->d = ppToken.dval; return EHTokFloatConstant; case PpAtomConstDouble: parserToken->d = ppToken.dval; return EHTokDoubleConstant; case PpAtomIdentifier: @@ -564,10 +567,15 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) case EndOfInput: return EHTokNone; default: - char buf[2]; - buf[0] = (char)token; - buf[1] = 0; - parseContext.error(loc, "unexpected token", buf, ""); + if (token < PpAtomMaxSingle) { + char buf[2]; + buf[0] = (char)token; + buf[1] = 0; + parseContext.error(loc, "unexpected token", buf, ""); + } else if (tokenText[0] != 0) + parseContext.error(loc, "unexpected token", tokenText, ""); + else + parseContext.error(loc, "unexpected token", "", ""); break; } } while (true); @@ -644,6 +652,7 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokBool: case EHTokInt: case EHTokUint: + case EHTokUint64: case EHTokDword: case EHTokHalf: case EHTokFloat: @@ -829,6 +838,7 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokRWByteAddressBuffer: case EHTokRWStructuredBuffer: case EHTokStructuredBuffer: + case EHTokTextureBuffer: case EHTokSubpassInput: case EHTokSubpassInputMS: return keyword; diff --git a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslTokens.h b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslTokens.h index 1c827bf8c34288b00fd43d1110692d874ad0ff7d..4426bccecb5c66302b946c391bd350a21baef023 100755 --- a/sources/third_party/shaderc/third_party/glslang/hlsl/hlslTokens.h +++ b/sources/third_party/shaderc/third_party/glslang/hlsl/hlslTokens.h @@ -95,6 +95,7 @@ enum EHlslTokenClass { EHTokBool, EHTokInt, EHTokUint, + EHTokUint64, EHTokDword, EHTokHalf, EHTokFloat, @@ -283,6 +284,7 @@ enum EHlslTokenClass { EHTokRWByteAddressBuffer, EHTokRWStructuredBuffer, EHTokStructuredBuffer, + EHTokTextureBuffer, // variable, user type, ... EHTokIdentifier, @@ -296,6 +298,7 @@ enum EHlslTokenClass { EHTokConstantBuffer, // constant + EHTokFloat16Constant, EHTokFloatConstant, EHTokDoubleConstant, EHTokIntConstant, diff --git a/sources/third_party/shaderc/third_party/spirv-tools/Android.mk b/sources/third_party/shaderc/third_party/spirv-tools/Android.mk index ed68c406917e6f6aa2150b480620956a5de23c87..4199afc926b7ca749d554f74d9191ab485b62506 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/Android.mk +++ b/sources/third_party/shaderc/third_party/spirv-tools/Android.mk @@ -27,23 +27,35 @@ SPVTOOLS_SRC_FILES := \ source/util/bit_stream.cpp \ source/util/parse_number.cpp \ source/util/string_utils.cpp \ + source/util/timer.cpp \ source/val/basic_block.cpp \ source/val/construct.cpp \ source/val/function.cpp \ source/val/instruction.cpp \ source/val/validation_state.cpp \ source/validate.cpp \ + source/validate_adjacency.cpp \ source/validate_arithmetics.cpp \ + source/validate_atomics.cpp \ + source/validate_barriers.cpp \ source/validate_bitwise.cpp \ + source/validate_builtins.cpp \ source/validate_capability.cpp \ source/validate_cfg.cpp \ + source/validate_composites.cpp \ source/validate_conversion.cpp \ source/validate_datarules.cpp \ source/validate_decorations.cpp \ + source/validate_derivatives.cpp \ + source/validate_ext_inst.cpp \ source/validate_id.cpp \ + source/validate_image.cpp \ source/validate_instruction.cpp \ source/validate_layout.cpp \ + source/validate_literals.cpp \ source/validate_logicals.cpp \ + source/validate_non_uniform.cpp \ + source/validate_primitives.cpp \ source/validate_type_unique.cpp SPVTOOLS_OPT_SRC_FILES := \ @@ -51,89 +63,177 @@ SPVTOOLS_OPT_SRC_FILES := \ source/opt/basic_block.cpp \ source/opt/block_merge_pass.cpp \ source/opt/build_module.cpp \ + source/opt/cfg.cpp \ source/opt/cfg_cleanup_pass.cpp \ - source/opt/compact_ids_pass.cpp \ + source/opt/ccp_pass.cpp \ source/opt/common_uniform_elim_pass.cpp \ + source/opt/compact_ids_pass.cpp \ + source/opt/composite.cpp \ + source/opt/const_folding_rules.cpp \ + source/opt/constants.cpp \ + source/opt/copy_prop_arrays.cpp \ source/opt/dead_branch_elim_pass.cpp \ + source/opt/dead_insert_elim_pass.cpp \ source/opt/dead_variable_elimination.cpp \ source/opt/decoration_manager.cpp \ source/opt/def_use_manager.cpp \ + source/opt/dominator_analysis.cpp \ + source/opt/dominator_tree.cpp \ source/opt/eliminate_dead_constant_pass.cpp \ source/opt/eliminate_dead_functions_pass.cpp \ + source/opt/feature_manager.cpp \ source/opt/flatten_decoration_pass.cpp \ source/opt/fold.cpp \ + source/opt/folding_rules.cpp \ source/opt/fold_spec_constant_op_and_composite_pass.cpp \ source/opt/freeze_spec_constant_value_pass.cpp \ source/opt/function.cpp \ + source/opt/if_conversion.cpp \ source/opt/inline_pass.cpp \ source/opt/inline_exhaustive_pass.cpp \ source/opt/inline_opaque_pass.cpp \ source/opt/insert_extract_elim.cpp \ source/opt/instruction.cpp \ source/opt/instruction_list.cpp \ + source/opt/ir_context.cpp \ source/opt/ir_loader.cpp \ + source/opt/licm_pass.cpp \ source/opt/local_access_chain_convert_pass.cpp \ + source/opt/local_redundancy_elimination.cpp \ source/opt/local_single_block_elim_pass.cpp \ source/opt/local_single_store_elim_pass.cpp \ source/opt/local_ssa_elim_pass.cpp \ + source/opt/loop_dependence.cpp \ + source/opt/loop_dependence_helpers.cpp \ + source/opt/loop_descriptor.cpp \ + source/opt/loop_peeling.cpp \ + source/opt/loop_unroller.cpp \ + source/opt/loop_unswitch_pass.cpp \ + source/opt/loop_utils.cpp \ source/opt/mem_pass.cpp \ + source/opt/merge_return_pass.cpp \ source/opt/module.cpp \ source/opt/optimizer.cpp \ source/opt/pass.cpp \ source/opt/pass_manager.cpp \ + source/opt/private_to_local_pass.cpp \ + source/opt/propagator.cpp \ + source/opt/redundancy_elimination.cpp \ + source/opt/register_pressure.cpp \ source/opt/remove_duplicates_pass.cpp \ + source/opt/replace_invalid_opc.cpp \ + source/opt/scalar_analysis.cpp \ + source/opt/scalar_analysis_simplification.cpp \ + source/opt/scalar_replacement_pass.cpp \ source/opt/set_spec_constant_default_value_pass.cpp \ + source/opt/simplification_pass.cpp \ + source/opt/ssa_rewrite_pass.cpp \ source/opt/strength_reduction_pass.cpp \ source/opt/strip_debug_info_pass.cpp \ + source/opt/strip_reflect_info_pass.cpp \ source/opt/type_manager.cpp \ source/opt/types.cpp \ - source/opt/unify_const_pass.cpp + source/opt/unify_const_pass.cpp \ + source/opt/value_number_table.cpp \ + source/opt/workaround1209.cpp # Locations of grammar files. +# +# TODO(dneto): Build a single set of tables that embeds versioning differences on +# a per-item basis. That must happen before SPIR-V 1.4, etc. +# https://github.com/KhronosGroup/SPIRV-Tools/issues/1195 SPV_CORE10_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.0/spirv.core.grammar.json SPV_CORE11_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.1/spirv.core.grammar.json SPV_CORE12_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.2/spirv.core.grammar.json -SPV_GLSL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.0/extinst.glsl.std.450.grammar.json -SPV_OPENCL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.0/extinst.opencl.std.100.grammar.json +SPV_COREUNIFIED1_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/spirv.core.grammar.json +SPV_CORELATEST_GRAMMAR=$(SPV_COREUNIFIED1_GRAMMAR) +SPV_GLSL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.2/extinst.glsl.std.450.grammar.json +SPV_OPENCL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/1.2/extinst.opencl.std.100.grammar.json +# TODO(dneto): I expect the DebugInfo grammar file to eventually migrate to SPIRV-Headers +SPV_DEBUGINFO_GRAMMAR=$(LOCAL_PATH)/source/extinst.debuginfo.grammar.json define gen_spvtools_grammar_tables $(call generate-file-dir,$(1)/core.insts-1.0.inc) -$(1)/core.insts-1.0.inc $(1)/operand.kinds-1.0.inc $(1)/glsl.std.450.insts-1.0.inc $(1)/opencl.std.insts-1.0.inc: \ +$(1)/core.insts-1.0.inc $(1)/operand.kinds-1.0.inc $(1)/glsl.std.450.insts.inc $(1)/opencl.std.insts.inc: \ $(LOCAL_PATH)/utils/generate_grammar_tables.py \ $(SPV_CORE10_GRAMMAR) \ $(SPV_GLSL_GRAMMAR) \ - $(SPV_OPENCL_GRAMMAR) + $(SPV_OPENCL_GRAMMAR) \ + $(SPV_DEBUGINFO_GRAMMAR) @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \ --spirv-core-grammar=$(SPV_CORE10_GRAMMAR) \ --extinst-glsl-grammar=$(SPV_GLSL_GRAMMAR) \ --extinst-opencl-grammar=$(SPV_OPENCL_GRAMMAR) \ + --extinst-debuginfo-grammar=$(SPV_DEBUGINFO_GRAMMAR) \ --core-insts-output=$(1)/core.insts-1.0.inc \ - --glsl-insts-output=$(1)/glsl.std.450.insts-1.0.inc \ - --opencl-insts-output=$(1)/opencl.std.insts-1.0.inc \ + --glsl-insts-output=$(1)/glsl.std.450.insts.inc \ + --opencl-insts-output=$(1)/opencl.std.insts.inc \ --operand-kinds-output=$(1)/operand.kinds-1.0.inc @echo "[$(TARGET_ARCH_ABI)] Grammar v1.0 : instructions & operands <= grammar JSON files" $(1)/core.insts-1.1.inc $(1)/operand.kinds-1.1.inc: \ $(LOCAL_PATH)/utils/generate_grammar_tables.py \ - $(SPV_CORE11_GRAMMAR) + $(SPV_CORE11_GRAMMAR) \ + $(SPV_DEBUGINFO_GRAMMAR) @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \ --spirv-core-grammar=$(SPV_CORE11_GRAMMAR) \ + --extinst-debuginfo-grammar=$(SPV_DEBUGINFO_GRAMMAR) \ --core-insts-output=$(1)/core.insts-1.1.inc \ --operand-kinds-output=$(1)/operand.kinds-1.1.inc @echo "[$(TARGET_ARCH_ABI)] Grammar v1.1 : instructions & operands <= grammar JSON files" $(1)/core.insts-1.2.inc $(1)/operand.kinds-1.2.inc: \ $(LOCAL_PATH)/utils/generate_grammar_tables.py \ - $(SPV_CORE12_GRAMMAR) + $(SPV_CORE12_GRAMMAR) \ + $(SPV_DEBUGINFO_GRAMMAR) @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \ --spirv-core-grammar=$(SPV_CORE12_GRAMMAR) \ + --extinst-debuginfo-grammar=$(SPV_DEBUGINFO_GRAMMAR) \ --core-insts-output=$(1)/core.insts-1.2.inc \ --operand-kinds-output=$(1)/operand.kinds-1.2.inc @echo "[$(TARGET_ARCH_ABI)] Grammar v1.2 : instructions & operands <= grammar JSON files" -$(LOCAL_PATH)/source/opcode.cpp: $(1)/core.insts-1.0.inc $(1)/core.insts-1.1.inc $(1)/core.insts-1.2.inc -$(LOCAL_PATH)/source/operand.cpp: $(1)/operand.kinds-1.0.inc $(1)/operand.kinds-1.1.inc $(1)/operand.kinds-1.2.inc -$(LOCAL_PATH)/source/ext_inst.cpp: $(1)/glsl.std.450.insts-1.0.inc $(1)/opencl.std.insts-1.0.inc +$(1)/core.insts-unified1.inc $(1)/operand.kinds-unified1.inc: \ + $(LOCAL_PATH)/utils/generate_grammar_tables.py \ + $(SPV_COREUNIFIED1_GRAMMAR) \ + $(SPV_DEBUGINFO_GRAMMAR) + @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \ + --spirv-core-grammar=$(SPV_COREUNIFIED1_GRAMMAR) \ + --extinst-debuginfo-grammar=$(SPV_DEBUGINFO_GRAMMAR) \ + --core-insts-output=$(1)/core.insts-unified1.inc \ + --operand-kinds-output=$(1)/operand.kinds-unified1.inc + @echo "[$(TARGET_ARCH_ABI)] Grammar v1.3 (from unified1) : instructions & operands <= grammar JSON files" +$(LOCAL_PATH)/source/opcode.cpp: $(1)/core.insts-1.0.inc $(1)/core.insts-1.1.inc $(1)/core.insts-1.2.inc $(1)/core.insts-unified1.inc +$(LOCAL_PATH)/source/operand.cpp: $(1)/operand.kinds-1.0.inc $(1)/operand.kinds-1.1.inc $(1)/operand.kinds-1.2.inc $(1)/operand.kinds-unified1.inc +$(LOCAL_PATH)/source/ext_inst.cpp: \ + $(1)/glsl.std.450.insts.inc \ + $(1)/opencl.std.insts.inc \ + $(1)/debuginfo.insts.inc \ + $(1)/spv-amd-gcn-shader.insts.inc \ + $(1)/spv-amd-shader-ballot.insts.inc \ + $(1)/spv-amd-shader-explicit-vertex-parameter.insts.inc \ + $(1)/spv-amd-shader-trinary-minmax.insts.inc endef $(eval $(call gen_spvtools_grammar_tables,$(SPVTOOLS_OUT_PATH))) + +define gen_spvtools_lang_headers +# Generate language-specific headers. So far we only generate C headers +# $1 is the output directory. +# $2 is the base name of the header file, e.g. "DebugInfo". +# $3 is the grammar file containing token definitions. +$(call generate-file-dir,$(1)/$(2).h) +$(1)/$(2).h : \ + $(LOCAL_PATH)/utils/generate_language_headers.py \ + $(3) + @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_language_headers.py \ + --extinst-name=$(2) \ + --extinst-grammar=$(3) \ + --extinst-output-base=$(1)/$(2) + @echo "[$(TARGET_ARCH_ABI)] Generate language specific header for $(2): headers <= grammar" +$(LOCAL_PATH)/source/ext_inst.cpp: $(1)/$(2).h +endef +# We generate language-specific headers for DebugInfo +$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),DebugInfo,$(SPV_DEBUGINFO_GRAMMAR))) + + define gen_spvtools_vendor_tables $(call generate-file-dir,$(1)/$(2).insts.inc) $(1)/$(2).insts.inc : \ @@ -153,9 +253,10 @@ define gen_spvtools_enum_string_mapping $(call generate-file-dir,$(1)/extension_enum.inc.inc) $(1)/extension_enum.inc $(1)/enum_string_mapping.inc: \ $(LOCAL_PATH)/utils/generate_grammar_tables.py \ - $(SPV_CORE11_GRAMMAR) + $(SPV_CORELATEST_GRAMMAR) @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \ - --spirv-core-grammar=$(SPV_CORE11_GRAMMAR) \ + --spirv-core-grammar=$(SPV_CORELATEST_GRAMMAR) \ + --extinst-debuginfo-grammar=$(SPV_DEBUGINFO_GRAMMAR) \ --extension-enum-output=$(1)/extension_enum.inc \ --enum-string-mapping-output=$(1)/enum_string_mapping.inc @echo "[$(TARGET_ARCH_ABI)] Generate enum<->string mapping <= grammar JSON files" diff --git a/sources/third_party/shaderc/third_party/spirv-tools/CHANGES b/sources/third_party/shaderc/third_party/spirv-tools/CHANGES index a2daabd0fbd70cd7ec62d5a12a2f5aefb9635893..9285dbfb9edb6cbdafd730144fa5274930a09116 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/CHANGES +++ b/sources/third_party/shaderc/third_party/spirv-tools/CHANGES @@ -1,29 +1,309 @@ Revision history for SPIRV-Tools -v2017.1-dev 2017-09-01 +v2018.3-dev 2018-04-06 - General: + - Support SPV_EXT_descriptor_indexing + - Support SPV_GOOGLE_decorate_string + - Support SPV_GOOGLE_hlsl_functionality1 + - Support SPV_NV_shader_subgroup_partitioned + - Use "unified1" grammar from SPIRV-Headers + - Simplify support for new extensions. Assembler, disassembler, and simple validation + support is automatic if new tokens are introduced with appropriate extension + attributes in the "unified1" SPIR-V core grammar. + - Disassembler: Emit more digits on floating point, to reliably reproduce all + significand bits. (Use std::max_digits10 instead of std::digits10) + - Optimizer: + - Add --strip-reflect + - Add --time-report + - Merge-return now works with structured control flow. + - New (faster) SSA rewriter to convert local loads and stores to SSA IDs and phis. + Can replace load/store elimination passes. + - Fix instruction folding case: insertion that feeds and extract, when the extract + remains. + - Copy propagate arrays, in simple cases. + - Better handling of OpImageTexelPointer + - Add loop peeling internal utility. + - Initial utilities for scalar evolution. + - Validator: + - Check Vulkan built-in variables + - Check Vulkan-specific atomic result type rule. + - Relax control barrier check for SPIR-V 1.3. Fixes #1427 + - Check OpPhi. + - Stop checking sizes derived from spec-constants. + - Re-enable checks for OpUConvert. + - Fixes: + #898: Linker properly removes FuncParamAttr from imported symbols. + #924, #1174: Fix handling of decoration groups in optimizer, linker. + #1404: Don't optimize away the compute compute workgroup size constant. + #1407: Remove a bad assertion + #1456: Fix bug in SSA rewriter related to variables updated in loops. + +v2018.2 2018-03-07 + - General: + - Support SPIR-V 1.3 and Vulkan 1.1. + - Default target environment is now SPIR-V 1.3. For command-line tools, + use the --target-env option to override the default. Examples: + # Generate a SPIR-V 1.0 binary instead of SPIR-V 1.3 + spirv-as --target-env spv1.0 a.spvasm -o a.spv + spirv-as --target-env vulkan1.0 a.spvasm -o a.spv + # Validate as Vulkan 1.0 + spirv-val --target-env vulkan1.0 a.spv + - Support SPV_GOOGLE_decorate_string and SPV_GOOGLE_hlsl_functionality1 + - Fixes: + - Fix Android.mk build. Compilation was failing due to missing definitions of + SpvCapabilityFloat16ImageAMD and other enumerated values. + - Optimizer: Avoid generating duplicate names when merging types. + - #1375: Validator: SPV_AMD_gpu_shaer_half_float implicitly allows declaration + of the 16-bit floating point type. + - #1376: Optimizer: Avoid folding half-precision float. + +v2018.1 2018-03-02 + - General: + - Support Visual Studio 2013 again. (Continue support for VS 2015 and VS 2017.) + - Support building SPIRV-Tools as a shared library. + - Improve the HLSL legalization optimization recipe. #1311 + - Optimizer: + - General speedups. + - Remove generic dead code elimination functionality from transforms: + --eliminate-local-single-block + --eliminate-local-single-store + --eliminate-local-multi-store + To recover the previous behaviour, a recipe using those transforms should now + also invoke the --eliminate-dead-code-aggressive transform. + - Improve folding, including coverage for floating point, OpSelect, and arithmetic + with non-trivial constant operands. + - Add loop-invariant code motion pass. + - Add loop-unrolling pass, for honouring unroll hits. + - Add loop-unswitch pass. + - Add instruction simplification pass. + - Aggressive dead code elimination: Understands capability hierarchy when finding + instructions it can eliminate (combinators). (PR #1268) + - CCP can now fold floating point arithmetic. #1311 + - Validator: + - Validate barrier instructions. + - Check Vulkan-specific rules for atomics. + - Check Vulkan prohibition of Location or Component decorations on BuiltIn variables. + - Linker: + - Add --verify-ids option + - Add option to allow a resulting module to be partially linked. + - Handle OpModuleProcessed (instructions in SPIR-V layout section 7c) + - Fixes: + - #1265: Optimizer: Fix use-after free bug in if-conversion. (Fix object lifecycle bug + in type manager.) + - #1282: Fix new warnings found by GCC 8.0.1. + - #1285: Optimizer: Fix random failures during inlining. (Dangling references in DefUseManager) + - #1295: Optimizer: Fix incorrect handling of Phi nodes in CCP. + - #1300: Fix CCP: avoid bad CCP transitions and unsettled values. + - #1304: Avoid static-duration variables of class type (with constructors). + - #1323: Fix folding of an insert composite feeding a composite extract. + - #1339: Fix CCP: Handle OpConstantNull boolean values as conditions. + - #1341: DCEInst: Keep atomic instructions (and some others with side effects). + - #1354: Don't fold integer division. + - #1357: Support OpConstantNull in folding. + - #1361: CCP: Fix handling of non-constant module-scope values + +v2018.0 2018-02-02 + - General + - VisualStudio 2013 is no longer supported. VisualStudio 2015 is supported. + - Use "include/unified1" directory from SPIRV-Headers. Requires recent SPIRV-Headers source. + - Disassembler: spirv-dis adds --color option to force color disassembly. + - Optimizer: + - Add pass to eliminate dead insertions. + - Aggressive dead code elimination now removes OpSwitch constructs. + - Block merging occurs in more cases. + - Add driver workaround transform: replace OpUnreachable with harmless branch to merge. + - Improve instruction folding framework. + - Add loop analysis. + - Add scalar replacement of aggregates to size-optimization recipe. + - Add pass to replace instructions invalid for a shader stage, with a harmless value. + This changes the semantics of the program! Not for general use! + - Rearragne and add passes to performance-optimization recipe, to produce better results. + - Validator: + - Validate OpenCL extended instructions. + - Shaders can't perform atomics on floats. + - Validate memory semantics values in atomics. + - Validate instruction-adjacency constraints, e.g. OpPhi predecessors, merge instructions + immediately precede branches. + - Fixes: + - PR 1198: Optimizer: Fix CCP in presence of matrix constants. + - #1199: Optimizer: Fix CCP: don't propagate spec constants. + - #1203: Optimizer: Fix common uniform elim bug introduced by refactoring. + - #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification. + - #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions. + - #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop. + - #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop. + - #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference. + - #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change. + +v2017.3 2018-01-12 + - General: + - Support DebugInfo extended instruction set, targeted at OpenCL environments. + See the SPIR-V Registry. + - Generate a SPIRV-Tools.pc file for pkg-config. + - Optimizer: + - Progress for legalization of code generated from HLSL (issue #1118): + - Add --legalize-hlsl option to run transforms used to transform intermediate + code generated by HLSL to SPIR-V for Vulkan compilers. Those compilers + normally run these transforms automatically. This option is used for developing + those transforms. + - Add Private-to-Function variable conversion for modules with logical + addressing. + - Add --ccp: SSA Conditional Constant Propagation (CCP) + - Add --print-all to show disassembly for each optimization pass. + - Internal: Add loop descriptors and post-order tree iterator. + - Generalized dead branch elimination + - Aggressive dead code elimination (ADCE) now removes dead functions and + module-scope variables. + - Vector extract/insert elimination now optimizes through some cases of + VectorShuffle, and GLSL.std.450 Mix extended instruction. + - Validator: + - Add validation for GLSL.std.450 extended instruction set. + - Check out of bounds composite accesses, where that's statically computable. + Fixes #1112. + - Check upper bits of literal numbers that aren't a multiple of 32-bits wide. + - More validation of primitive instructions + - Add optional "relaxed" checking logical addressing mode to permit some + cases of pointer-to-pointer. Contributes to HLSL legalization (issue #1118). + - Fixes: + #1100: Validator: Image operand Sample can be used with OpImageSparseFetch, + OpImageSparseRead. + #1108: Remove duplicates transform was incorrectly removing non-duplicate + decorations. + #1111: Optimizer's type manager could reference deleted memory. + #1112: Fix decoration equality check, e.g. it is now symmetric. + #1129: Validator now disallows Dim=SupbassData for OpImageSparseRead. + #1143: Fix CCP: Was generating incorrect code for loops. + #1153: Fix CCP crash. + #1154: Optimizer's internal instruction-to-block mappings were sometimes + inconsistent. + #1159: Fix CCP infinite loop. + #1168: Fix dead branch elimination intermittently generating incorrect code. + Fixes https://github.com/KhronosGroup/glslang/issues/1205 + #1186: Fix validation of PackDouble2x32 and UnpackDouble2x32 + +v2017.2 2017-12-15 + - General: + - Support OpenCL 1.2, 2.0 target environments, including embedded profiles + - Add CONTRIBUTING.md + - Fix exit status code for spirv-link + - Disassember: Enable emitting ANSI colour codes to a string + - Library avoids polluting global namespace. The libraries can export C and C++ + symbols starting with "spv", or in a C++ namespace. Add a test for this. + - Linux release builds include debug information, for easier profiling + - Build bots no longer test VisualStudio 2013 + - Testing dependency RE2 requires VisualStudio 2015 or later + - Build bots check code formatting + - Optimizer: + - Add --skip-validation to spirv-opt + - Add dominance tree analysis + - Add generic value propagation engine + - Add global redundancy elimination within a function + - Add scalar replacement of function-scope variables of composite type + - Aggressive dead code elimination: Remove empty loops + - Killing an instruction notifies the IRContext + - IRContext::KillInst deletes the instruction + - Move CFG analysis to IRContext + - Add constant manager + - Fix: Don't consider derivative instructions as combinators. + - Fix: Don't delete an instruction twice in local dead-code-elimination + - Fix: Don't consider derivative instructions as combinators. + - Validator: + - Finish checking of image instructions (Section 3.32.10) + - Check sparse image instructions + - Check OpTypeImage, OpTypeSampleImage + - Check composite instructions (Section 3.32.12) + - Check atomic instructions (Section 3.32.18) + - Check OpEmitStreamVertex, OpEndStreamPrimitive instructions + - Re-enable validation of OpCopyObject + - OpKill, image ImplicitLod and QueryLod instructions can only be used in Fragment + shaders. + - Fixes for image instruction validation: + - Lod image operand only usable with ExplicitLod and OpImageFetch + - ExplicitLod Lod image operand must be float scalar + - OpImageFectch Lod image operand must be int scalar + - OpImageGather component operand must be 32-bits (integer scalar) + - OpImageQuerySizeLod Lod must be integer scalar + - Fixes: + #622: Remove names and decorations when inlining + #989: Aggressive dead code elim: Don't optimize away live breaks from a loop + #991: Fix validation of SPV_AMD_shader_ballot + #1004: Use after free of an instruction, in remove-duplicates transform + #1007: OpImageRead not required to return 4-component vector + #1009: OpImageRead can return scalar int/float types + #1011: OpImageWrite should allow scalar int/float texel types + #1012: Fix validat Dref type check + #1017: Load-store elimination considers variable initializations + #1034: Fix Windows debug build: operator< should be a weak ordering + #1083: Inlining: Set parent (function) for each inlined basic block. + #1075: Aggressive dead code elimination: Was leaving dangling references to + removed blocks. + +v2017.1 2017-11-23 + - Update README with details on the public_spirv_tools_dev@khronos.org mailing list. + - General: + - Automatically deploy built artifacts to GitHub Releases + - Add a Linker (module combiner). Under development. + - Add Android.mk for Android NDK builds. + - Add the 'effcee' library as an optional dependency for use in tests. + Eventually it will be a required dependency, once downstream projects have + a chance to adjust. Requires 're2' library. - Avoid static-duration variables of class type (with constructors). + - Hack around bugs in gcc-4.8.1 template handling + - Faster opcode lookup - Validator: + - Recognize extensions listed on SPIR-V registry, + through #25 SPV_AMD_shader_fragment_mask + - Validator issues an info message when it sees an unrecognized extension. - Type check basic arithmetic operations + - Type check carry/extended arithmetic operations + - Type check vector arithmetic operations - Type check Relational and Logical instructions - Type check Bit instructions + - Check type uniqueness rules + - Check conversion instructions + - Check image instructions + - Check derivative instructions + - Check OpVectorShuffle + - Check OpBranchConditional - OpModuleProcessed is only allowed after debug names section and before annotations section. - - Recognize extensions listed on SPIR-V registry, - through #25 SPV_AMD_shader_fragment_mask + - Checks the right kind of return is called for each function (void or non-void). + - Add option to relax type check when storing structs (--relax-store-struct) - Optimizer: - - Add eliminater-dead-function transform + - Refactoring internal representation of the module, including: + - IRContext: owns a module and manages analyses + - Instructions are owned by intrusive lists, and have unique IDs + - BasicBlock owns its instruction list. + - DefUseManager: change representation of uses, for faster processing + on large modules. + - Add high level recipes: -O, -Os, and -Oconfig + Recipes for -O and -Os are under development. + - Add eliminate-dead-function transform - Add strength reduction transform: For now, convert multiply by power of 2 to a bit shift. - - Extract-insert elimination: Recognize the case where the first instruction - in the sequence is an OpCompositeConstruct or OpConstantComposite + - Add CFG cleanup transform + - Add removal of dead module-scope variables + - Add merge-return transform for modules without structured control flow + - Add redundancy elimination within a basic block (local value numbering) + - Extract-insert elimination: + - Recognize the case where the first instruction in the sequence is an + OpCompositeConstruct or OpConstantComposite + - Handle some cases of nested structs + - Dead branch elimination now can eliminate entire selection constructs + when all arms are dead. + - Compressing codec: + - Updated algorithm to 1.01, 1.02, 1.03 + - Not built by default. Use -DSPIRV_BUILD_COMPRESSION=ON to build. + - Codec can be parameterized by a customized model. - Fixes: + #728: Fix decoration of inlined functions #798: spirv-as should fail when given unrecognized long option #800: Inliner: Fix inlining function into header of multi-block loop #824: Eliminate-local-multi-store: Fix a crash #826: Elimiante-local-multi-store: Fix a crash #827: Fix crash when compact-ids transform runs before another transform. #834: Add Cmake option to build the compressing codec. Off by default. + #911: Fix classification of Line and NoLine instructions v2017.0 2017-09-01 - Update README to describe that assembler, disassembler, and binary parser support diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json index f05be1cb27f1eeb41ab512083cc47ef429e5f529..f3cfc4c299bffa83e69163d3429cc7ee19e5e14d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json @@ -3012,6 +3012,15 @@ ], "capabilities" : [ "SparseResidency" ] }, + { + "opname" : "OpDecorateId", + "opcode" : 332, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] + }, { "opname" : "OpSubgroupBallotKHR", "opcode" : 4421, @@ -3277,6 +3286,25 @@ { "kind" : "IdRef", "name" : "'Data'" } ], "capabilities" : [ "SubgroupImageBlockIOINTEL" ] + }, + { + "opname" : "OpDecorateStringGOOGLE", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] + }, + { + "opname" : "OpMemberDecorateStringGOOGLE", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] } ], "operand_kinds" : [ @@ -4836,6 +4864,22 @@ "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Offset'" } ] + }, + { + "enumerant" : "HlslCounterBufferGOOGLE", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] + }, + { + "enumerant" : "HlslSemanticGOOGLE", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] } ] }, @@ -5005,7 +5049,7 @@ { "enumerant" : "SubgroupSize", "value" : 36, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "SubgroupMaxSize", @@ -5030,7 +5074,7 @@ { "enumerant" : "SubgroupLocalInvocationId", "value" : 41, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "VertexIndex", diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h index ac38ad7860107debb43b4d2192d18fb4676a9e1d..bd5a9b9593aa4fd5725c07bd0deec6bbc9bdfec2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2017 The Khronos Group Inc. +** Copyright (c) 2014-2018 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -387,6 +387,8 @@ typedef enum SpvDecoration_ { SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationHlslCounterBufferGOOGLE = 5634, + SpvDecorationHlslSemanticGOOGLE = 5635, SpvDecorationMax = 0x7fffffff, } SpvDecoration; @@ -957,6 +959,7 @@ typedef enum SpvOp_ { SpvOpAtomicFlagTestAndSet = 318, SpvOpAtomicFlagClear = 319, SpvOpImageSparseRead = 320, + SpvOpDecorateId = 332, SpvOpSubgroupBallotKHR = 4421, SpvOpSubgroupFirstInvocationKHR = 4422, SpvOpSubgroupAllKHR = 4428, @@ -981,6 +984,8 @@ typedef enum SpvOp_ { SpvOpSubgroupBlockWriteINTEL = 5576, SpvOpSubgroupImageBlockReadINTEL = 5577, SpvOpSubgroupImageBlockWriteINTEL = 5578, + SpvOpDecorateStringGOOGLE = 5632, + SpvOpMemberDecorateStringGOOGLE = 5633, SpvOpMax = 0x7fffffff, } SpvOp; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp index 75c1340545283ca8ec4ffb3107d398e92c938aa0..e98a89cee74b5ce077eac5f8c4836acfa784f045 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -383,6 +383,8 @@ enum Decoration { DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, DecorationMax = 0x7fffffff, }; @@ -953,6 +955,7 @@ enum Op { OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -977,6 +980,8 @@ enum Op { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, OpMax = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 index 792eeb1aa0c1ad6ea64aaa9eb4d164feb4ddf0c6..8896e81b7c40ab422787dac4a8b3cda9032f65e1 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -383,6 +383,8 @@ enum class Decoration : unsigned { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, Max = 0x7fffffff, }; @@ -953,6 +955,7 @@ enum class Op : unsigned { OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -977,6 +980,8 @@ enum class Op : unsigned { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, Max = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json index eb0549f5397c86f49fded95ecd3f6a0a063ccec3..9b0a8f3de2840d0816f4fae09d1ba19bfa07c07b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json @@ -6,7 +6,7 @@ "Comment": [ [ - "Copyright (c) 2014-2017 The Khronos Group Inc.", + "Copyright (c) 2014-2018 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -422,7 +422,9 @@ "OverrideCoverageNV": 5248, "PassthroughNV": 5250, "ViewportRelativeNV": 5252, - "SecondaryViewportRelativeNV": 5256 + "SecondaryViewportRelativeNV": 5256, + "HlslCounterBufferGOOGLE": 5634, + "HlslSemanticGOOGLE": 5635 } }, { @@ -983,6 +985,7 @@ "OpAtomicFlagTestAndSet": 318, "OpAtomicFlagClear": 319, "OpImageSparseRead": 320, + "OpDecorateId": 332, "OpSubgroupBallotKHR": 4421, "OpSubgroupFirstInvocationKHR": 4422, "OpSubgroupAllKHR": 4428, @@ -1006,7 +1009,9 @@ "OpSubgroupBlockReadINTEL": 5575, "OpSubgroupBlockWriteINTEL": 5576, "OpSubgroupImageBlockReadINTEL": 5577, - "OpSubgroupImageBlockWriteINTEL": 5578 + "OpSubgroupImageBlockWriteINTEL": 5578, + "OpDecorateStringGOOGLE": 5632, + "OpMemberDecorateStringGOOGLE": 5633 } } ] diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua index fed183920d72c5721dcad0586f986967a74b833b..2bd33ba082b7f99f4da151ed980ec0a7640e4746 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2017 The Khronos Group Inc. +-- Copyright (c) 2014-2018 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), @@ -356,6 +356,8 @@ spv = { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, }, BuiltIn = { @@ -914,6 +916,7 @@ spv = { OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -938,6 +941,8 @@ spv = { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py index 31f5a7fd2e62c55b1761192adc24dfcd3f1494fd..8a200e7655f8486150be7afbe2848b4046c1524d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2017 The Khronos Group Inc. +# Copyright (c) 2014-2018 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), @@ -356,6 +356,8 @@ spv = { 'PassthroughNV' : 5250, 'ViewportRelativeNV' : 5252, 'SecondaryViewportRelativeNV' : 5256, + 'HlslCounterBufferGOOGLE' : 5634, + 'HlslSemanticGOOGLE' : 5635, }, 'BuiltIn' : { @@ -914,6 +916,7 @@ spv = { 'OpAtomicFlagTestAndSet' : 318, 'OpAtomicFlagClear' : 319, 'OpImageSparseRead' : 320, + 'OpDecorateId' : 332, 'OpSubgroupBallotKHR' : 4421, 'OpSubgroupFirstInvocationKHR' : 4422, 'OpSubgroupAllKHR' : 4428, @@ -938,6 +941,8 @@ spv = { 'OpSubgroupBlockWriteINTEL' : 5576, 'OpSubgroupImageBlockReadINTEL' : 5577, 'OpSubgroupImageBlockWriteINTEL' : 5578, + 'OpDecorateStringGOOGLE' : 5632, + 'OpMemberDecorateStringGOOGLE' : 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json index c5222e74cd245f928a6b1a01739b4d856603e620..c142e60a1750476bab9c4c85a33d5035eb32334e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json @@ -3114,6 +3114,15 @@ { "kind" : "LiteralString", "name" : "'Process'" } ] }, + { + "opname" : "OpDecorateId", + "opcode" : 332, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] + }, { "opname" : "OpSubgroupBallotKHR", "opcode" : 4421, @@ -3379,6 +3388,25 @@ { "kind" : "IdRef", "name" : "'Data'" } ], "capabilities" : [ "SubgroupImageBlockIOINTEL" ] + }, + { + "opname" : "OpDecorateStringGOOGLE", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] + }, + { + "opname" : "OpMemberDecorateStringGOOGLE", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] } ], "operand_kinds" : [ @@ -4984,6 +5012,22 @@ "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Offset'" } ] + }, + { + "enumerant" : "HlslCounterBufferGOOGLE", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] + }, + { + "enumerant" : "HlslSemanticGOOGLE", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] } ] }, @@ -5153,7 +5197,7 @@ { "enumerant" : "SubgroupSize", "value" : 36, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "SubgroupMaxSize", @@ -5178,7 +5222,7 @@ { "enumerant" : "SubgroupLocalInvocationId", "value" : 41, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "VertexIndex", diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h index 2be35146df08532d323a4281a9dcd009b3609f25..971c3be6d25db99494e0f2ff78bf64b87c99ad25 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2017 The Khronos Group Inc. +** Copyright (c) 2014-2018 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -392,6 +392,8 @@ typedef enum SpvDecoration_ { SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationHlslCounterBufferGOOGLE = 5634, + SpvDecorationHlslSemanticGOOGLE = 5635, SpvDecorationMax = 0x7fffffff, } SpvDecoration; @@ -979,6 +981,7 @@ typedef enum SpvOp_ { SpvOpNamedBarrierInitialize = 328, SpvOpMemoryNamedBarrier = 329, SpvOpModuleProcessed = 330, + SpvOpDecorateId = 332, SpvOpSubgroupBallotKHR = 4421, SpvOpSubgroupFirstInvocationKHR = 4422, SpvOpSubgroupAllKHR = 4428, @@ -1003,6 +1006,8 @@ typedef enum SpvOp_ { SpvOpSubgroupBlockWriteINTEL = 5576, SpvOpSubgroupImageBlockReadINTEL = 5577, SpvOpSubgroupImageBlockWriteINTEL = 5578, + SpvOpDecorateStringGOOGLE = 5632, + SpvOpMemberDecorateStringGOOGLE = 5633, SpvOpMax = 0x7fffffff, } SpvOp; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp index 9f2e9e38baa8c33e26073a683b68e81c79b62a7e..c26ac1f26c6d6d9667adde4e0ac4ff7e9a067144 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -388,6 +388,8 @@ enum Decoration { DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, DecorationMax = 0x7fffffff, }; @@ -975,6 +977,7 @@ enum Op { OpNamedBarrierInitialize = 328, OpMemoryNamedBarrier = 329, OpModuleProcessed = 330, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -999,6 +1002,8 @@ enum Op { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, OpMax = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 index 992f4c8dcabf6295d6519c79fb63974f05a77254..992d43b5f5426f265c1b2967a06465457a27a2db 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -388,6 +388,8 @@ enum class Decoration : unsigned { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, Max = 0x7fffffff, }; @@ -975,6 +977,7 @@ enum class Op : unsigned { OpNamedBarrierInitialize = 328, OpMemoryNamedBarrier = 329, OpModuleProcessed = 330, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -999,6 +1002,8 @@ enum class Op : unsigned { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, Max = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json index 7da17638e4120e9349ed88f92bfba6b7b26b298e..4c18e0192a365ef2021f6540e390de8f85350e9a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json @@ -6,7 +6,7 @@ "Comment": [ [ - "Copyright (c) 2014-2017 The Khronos Group Inc.", + "Copyright (c) 2014-2018 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -427,7 +427,9 @@ "OverrideCoverageNV": 5248, "PassthroughNV": 5250, "ViewportRelativeNV": 5252, - "SecondaryViewportRelativeNV": 5256 + "SecondaryViewportRelativeNV": 5256, + "HlslCounterBufferGOOGLE": 5634, + "HlslSemanticGOOGLE": 5635 } }, { @@ -1003,6 +1005,7 @@ "OpNamedBarrierInitialize": 328, "OpMemoryNamedBarrier": 329, "OpModuleProcessed": 330, + "OpDecorateId": 332, "OpSubgroupBallotKHR": 4421, "OpSubgroupFirstInvocationKHR": 4422, "OpSubgroupAllKHR": 4428, @@ -1026,7 +1029,9 @@ "OpSubgroupBlockReadINTEL": 5575, "OpSubgroupBlockWriteINTEL": 5576, "OpSubgroupImageBlockReadINTEL": 5577, - "OpSubgroupImageBlockWriteINTEL": 5578 + "OpSubgroupImageBlockWriteINTEL": 5578, + "OpDecorateStringGOOGLE": 5632, + "OpMemberDecorateStringGOOGLE": 5633 } } ] diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua index 6abf8accdcf5da317b9e8d2927bea289ed7baccc..ad34e0abe9d587b401e613b24280148dae51fae1 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2017 The Khronos Group Inc. +-- Copyright (c) 2014-2018 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), @@ -361,6 +361,8 @@ spv = { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, }, BuiltIn = { @@ -936,6 +938,7 @@ spv = { OpNamedBarrierInitialize = 328, OpMemoryNamedBarrier = 329, OpModuleProcessed = 330, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, @@ -960,6 +963,8 @@ spv = { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py index 2427d2d25c6930b957683c506287278ed680147c..519a59710d192975db1d67aec6cf552168995367 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2017 The Khronos Group Inc. +# Copyright (c) 2014-2018 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), @@ -361,6 +361,8 @@ spv = { 'PassthroughNV' : 5250, 'ViewportRelativeNV' : 5252, 'SecondaryViewportRelativeNV' : 5256, + 'HlslCounterBufferGOOGLE' : 5634, + 'HlslSemanticGOOGLE' : 5635, }, 'BuiltIn' : { @@ -936,6 +938,7 @@ spv = { 'OpNamedBarrierInitialize' : 328, 'OpMemoryNamedBarrier' : 329, 'OpModuleProcessed' : 330, + 'OpDecorateId' : 332, 'OpSubgroupBallotKHR' : 4421, 'OpSubgroupFirstInvocationKHR' : 4422, 'OpSubgroupAllKHR' : 4428, @@ -960,6 +963,8 @@ spv = { 'OpSubgroupBlockWriteINTEL' : 5576, 'OpSubgroupImageBlockReadINTEL' : 5577, 'OpSubgroupImageBlockWriteINTEL' : 5578, + 'OpDecorateStringGOOGLE' : 5632, + 'OpMemberDecorateStringGOOGLE' : 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json index 9a9b903d40679955cfd9f4030dfba499e1da70b2..393ee3c8497d7574098ce499aab0180275324aa4 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json @@ -3395,6 +3395,25 @@ { "kind" : "IdRef", "name" : "'Data'" } ], "capabilities" : [ "SubgroupImageBlockIOINTEL" ] + }, + { + "opname" : "OpDecorateStringGOOGLE", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] + }, + { + "opname" : "OpMemberDecorateStringGOOGLE", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string" ] } ], "operand_kinds" : [ @@ -5041,6 +5060,22 @@ "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Offset'" } ] + }, + { + "enumerant" : "HlslCounterBufferGOOGLE", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] + }, + { + "enumerant" : "HlslSemanticGOOGLE", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ] } ] }, @@ -5210,7 +5245,7 @@ { "enumerant" : "SubgroupSize", "value" : 36, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "SubgroupMaxSize", @@ -5235,7 +5270,7 @@ { "enumerant" : "SubgroupLocalInvocationId", "value" : 41, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel", "SubgroupBallotKHR" ] }, { "enumerant" : "VertexIndex", diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h index ee5edf19a98fcec94b658a5962b65be673703f70..7c6d884d8e491688df2a6238c4dc50a6cb0f3d5f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2017 The Khronos Group Inc. +** Copyright (c) 2014-2018 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -397,6 +397,8 @@ typedef enum SpvDecoration_ { SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationHlslCounterBufferGOOGLE = 5634, + SpvDecorationHlslSemanticGOOGLE = 5635, SpvDecorationMax = 0x7fffffff, } SpvDecoration; @@ -1010,6 +1012,8 @@ typedef enum SpvOp_ { SpvOpSubgroupBlockWriteINTEL = 5576, SpvOpSubgroupImageBlockReadINTEL = 5577, SpvOpSubgroupImageBlockWriteINTEL = 5578, + SpvOpDecorateStringGOOGLE = 5632, + SpvOpMemberDecorateStringGOOGLE = 5633, SpvOpMax = 0x7fffffff, } SpvOp; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp index 315843da71a1bc5166c0ebbc4243f77ab7071cd7..57bd97a0210976528d4fd00173a9fac5ce9b40fb 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -393,6 +393,8 @@ enum Decoration { DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, DecorationMax = 0x7fffffff, }; @@ -1006,6 +1008,8 @@ enum Op { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, OpMax = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 index e032fa5c3df29c8b8d58f1ed831446667dd060e4..7a875fdb1665ac5975b89509a39f76319bf0781e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -393,6 +393,8 @@ enum class Decoration : unsigned { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, Max = 0x7fffffff, }; @@ -1006,6 +1008,8 @@ enum class Op : unsigned { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, Max = 0x7fffffff, }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json index 151dda725af87fac9abce0cce7c479bb3fde17b6..9c0ff0a43e32c8fe0b18db2a073885abb2aff203 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json @@ -6,7 +6,7 @@ "Comment": [ [ - "Copyright (c) 2014-2017 The Khronos Group Inc.", + "Copyright (c) 2014-2018 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -432,7 +432,9 @@ "OverrideCoverageNV": 5248, "PassthroughNV": 5250, "ViewportRelativeNV": 5252, - "SecondaryViewportRelativeNV": 5256 + "SecondaryViewportRelativeNV": 5256, + "HlslCounterBufferGOOGLE": 5634, + "HlslSemanticGOOGLE": 5635 } }, { @@ -1033,7 +1035,9 @@ "OpSubgroupBlockReadINTEL": 5575, "OpSubgroupBlockWriteINTEL": 5576, "OpSubgroupImageBlockReadINTEL": 5577, - "OpSubgroupImageBlockWriteINTEL": 5578 + "OpSubgroupImageBlockWriteINTEL": 5578, + "OpDecorateStringGOOGLE": 5632, + "OpMemberDecorateStringGOOGLE": 5633 } } ] diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua index 13b28f34eaf01c6e1057a35162c4be53235f9872..0de507d5c913840ffdd911a43183ed6408005376 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2017 The Khronos Group Inc. +-- Copyright (c) 2014-2018 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), @@ -366,6 +366,8 @@ spv = { PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, }, BuiltIn = { @@ -967,6 +969,8 @@ spv = { OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py index de87de79c92d92a1dbc3dd08a09ef36cae30c7b5..cefee4d66ac43ae1143f0c7eba943176b65240c5 100755 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2017 The Khronos Group Inc. +# Copyright (c) 2014-2018 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), @@ -366,6 +366,8 @@ spv = { 'PassthroughNV' : 5250, 'ViewportRelativeNV' : 5252, 'SecondaryViewportRelativeNV' : 5256, + 'HlslCounterBufferGOOGLE' : 5634, + 'HlslSemanticGOOGLE' : 5635, }, 'BuiltIn' : { @@ -967,6 +969,8 @@ spv = { 'OpSubgroupBlockWriteINTEL' : 5576, 'OpSubgroupImageBlockReadINTEL' : 5577, 'OpSubgroupImageBlockWriteINTEL' : 5578, + 'OpDecorateStringGOOGLE' : 5632, + 'OpMemberDecorateStringGOOGLE' : 5633, }, } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml index f3d3a659c2310ab11b51ebae4630f264ef5a67c5..017615dfa2bb7c535f134a2bd234ff22d138e48e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml @@ -67,7 +67,8 @@ - + + @@ -102,6 +103,8 @@ + + - + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h new file mode 100644 index 0000000000000000000000000000000000000000..54cc00e9a88822aeee4e2f3ecec28de012955bb8 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h @@ -0,0 +1,131 @@ +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLstd450_H +#define GLSLstd450_H + +static const int GLSLstd450Version = 100; +static const int GLSLstd450Revision = 3; + +enum GLSLstd450 { + GLSLstd450Bad = 0, // Don't use + + GLSLstd450Round = 1, + GLSLstd450RoundEven = 2, + GLSLstd450Trunc = 3, + GLSLstd450FAbs = 4, + GLSLstd450SAbs = 5, + GLSLstd450FSign = 6, + GLSLstd450SSign = 7, + GLSLstd450Floor = 8, + GLSLstd450Ceil = 9, + GLSLstd450Fract = 10, + + GLSLstd450Radians = 11, + GLSLstd450Degrees = 12, + GLSLstd450Sin = 13, + GLSLstd450Cos = 14, + GLSLstd450Tan = 15, + GLSLstd450Asin = 16, + GLSLstd450Acos = 17, + GLSLstd450Atan = 18, + GLSLstd450Sinh = 19, + GLSLstd450Cosh = 20, + GLSLstd450Tanh = 21, + GLSLstd450Asinh = 22, + GLSLstd450Acosh = 23, + GLSLstd450Atanh = 24, + GLSLstd450Atan2 = 25, + + GLSLstd450Pow = 26, + GLSLstd450Exp = 27, + GLSLstd450Log = 28, + GLSLstd450Exp2 = 29, + GLSLstd450Log2 = 30, + GLSLstd450Sqrt = 31, + GLSLstd450InverseSqrt = 32, + + GLSLstd450Determinant = 33, + GLSLstd450MatrixInverse = 34, + + GLSLstd450Modf = 35, // second operand needs an OpVariable to write to + GLSLstd450ModfStruct = 36, // no OpVariable operand + GLSLstd450FMin = 37, + GLSLstd450UMin = 38, + GLSLstd450SMin = 39, + GLSLstd450FMax = 40, + GLSLstd450UMax = 41, + GLSLstd450SMax = 42, + GLSLstd450FClamp = 43, + GLSLstd450UClamp = 44, + GLSLstd450SClamp = 45, + GLSLstd450FMix = 46, + GLSLstd450IMix = 47, // Reserved + GLSLstd450Step = 48, + GLSLstd450SmoothStep = 49, + + GLSLstd450Fma = 50, + GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to + GLSLstd450FrexpStruct = 52, // no OpVariable operand + GLSLstd450Ldexp = 53, + + GLSLstd450PackSnorm4x8 = 54, + GLSLstd450PackUnorm4x8 = 55, + GLSLstd450PackSnorm2x16 = 56, + GLSLstd450PackUnorm2x16 = 57, + GLSLstd450PackHalf2x16 = 58, + GLSLstd450PackDouble2x32 = 59, + GLSLstd450UnpackSnorm2x16 = 60, + GLSLstd450UnpackUnorm2x16 = 61, + GLSLstd450UnpackHalf2x16 = 62, + GLSLstd450UnpackSnorm4x8 = 63, + GLSLstd450UnpackUnorm4x8 = 64, + GLSLstd450UnpackDouble2x32 = 65, + + GLSLstd450Length = 66, + GLSLstd450Distance = 67, + GLSLstd450Cross = 68, + GLSLstd450Normalize = 69, + GLSLstd450FaceForward = 70, + GLSLstd450Reflect = 71, + GLSLstd450Refract = 72, + + GLSLstd450FindILsb = 73, + GLSLstd450FindSMsb = 74, + GLSLstd450FindUMsb = 75, + + GLSLstd450InterpolateAtCentroid = 76, + GLSLstd450InterpolateAtSample = 77, + GLSLstd450InterpolateAtOffset = 78, + + GLSLstd450NMin = 79, + GLSLstd450NMax = 80, + GLSLstd450NClamp = 81, + + GLSLstd450Count +}; + +#endif // #ifndef GLSLstd450_H diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h new file mode 100644 index 0000000000000000000000000000000000000000..19a6688490c76d13c77eb59843120eee7684f46e --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h @@ -0,0 +1,210 @@ +/* +** Copyright (c) 2015-2017 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +namespace OpenCLLIB { + +enum Entrypoints { + + // Section 2.1: Math extended instructions + Acos = 0, + Acosh = 1, + Acospi = 2, + Asin = 3, + Asinh = 4, + Asinpi = 5, + Atan = 6, + Atan2 = 7, + Atanh = 8, + Atanpi = 9, + Atan2pi = 10, + Cbrt = 11, + Ceil = 12, + Copysign = 13, + Cos = 14, + Cosh = 15, + Cospi = 16, + Erfc = 17, + Erf = 18, + Exp = 19, + Exp2 = 20, + Exp10 = 21, + Expm1 = 22, + Fabs = 23, + Fdim = 24, + Floor = 25, + Fma = 26, + Fmax = 27, + Fmin = 28, + Fmod = 29, + Fract = 30, + Frexp = 31, + Hypot = 32, + Ilogb = 33, + Ldexp = 34, + Lgamma = 35, + Lgamma_r = 36, + Log = 37, + Log2 = 38, + Log10 = 39, + Log1p = 40, + Logb = 41, + Mad = 42, + Maxmag = 43, + Minmag = 44, + Modf = 45, + Nan = 46, + Nextafter = 47, + Pow = 48, + Pown = 49, + Powr = 50, + Remainder = 51, + Remquo = 52, + Rint = 53, + Rootn = 54, + Round = 55, + Rsqrt = 56, + Sin = 57, + Sincos = 58, + Sinh = 59, + Sinpi = 60, + Sqrt = 61, + Tan = 62, + Tanh = 63, + Tanpi = 64, + Tgamma = 65, + Trunc = 66, + Half_cos = 67, + Half_divide = 68, + Half_exp = 69, + Half_exp2 = 70, + Half_exp10 = 71, + Half_log = 72, + Half_log2 = 73, + Half_log10 = 74, + Half_powr = 75, + Half_recip = 76, + Half_rsqrt = 77, + Half_sin = 78, + Half_sqrt = 79, + Half_tan = 80, + Native_cos = 81, + Native_divide = 82, + Native_exp = 83, + Native_exp2 = 84, + Native_exp10 = 85, + Native_log = 86, + Native_log2 = 87, + Native_log10 = 88, + Native_powr = 89, + Native_recip = 90, + Native_rsqrt = 91, + Native_sin = 92, + Native_sqrt = 93, + Native_tan = 94, + + // Section 2.2: Integer instructions + SAbs = 141, + SAbs_diff = 142, + SAdd_sat = 143, + UAdd_sat = 144, + SHadd = 145, + UHadd = 146, + SRhadd = 147, + URhadd = 148, + SClamp = 149, + UClamp = 150, + Clz = 151, + Ctz = 152, + SMad_hi = 153, + UMad_sat = 154, + SMad_sat = 155, + SMax = 156, + UMax = 157, + SMin = 158, + UMin = 159, + SMul_hi = 160, + Rotate = 161, + SSub_sat = 162, + USub_sat = 163, + U_Upsample = 164, + S_Upsample = 165, + Popcount = 166, + SMad24 = 167, + UMad24 = 168, + SMul24 = 169, + UMul24 = 170, + UAbs = 201, + UAbs_diff = 202, + UMul_hi = 203, + UMad_hi = 204, + + // Section 2.3: Common instructions + FClamp = 95, + Degrees = 96, + FMax_common = 97, + FMin_common = 98, + Mix = 99, + Radians = 100, + Step = 101, + Smoothstep = 102, + Sign = 103, + + // Section 2.4: Geometric instructions + Cross = 104, + Distance = 105, + Length = 106, + Normalize = 107, + Fast_distance = 108, + Fast_length = 109, + Fast_normalize = 110, + + // Section 2.5: Relational instructions + Bitselect = 186, + Select = 187, + + // Section 2.6: Vector Data Load and Store instructions + Vloadn = 171, + Vstoren = 172, + Vload_half = 173, + Vload_halfn = 174, + Vstore_half = 175, + Vstore_half_r = 176, + Vstore_halfn = 177, + Vstore_halfn_r = 178, + Vloada_halfn = 179, + Vstorea_halfn = 180, + Vstorea_halfn_r = 181, + + // Section 2.7: Miscellaneous Vector instructions + Shuffle = 182, + Shuffle2 = 183, + + // Section 2.8: Misc instructions + Printf = 184, + Prefetch = 185, +}; + +} // end namespace OpenCLLIB diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json new file mode 100644 index 0000000000000000000000000000000000000000..3d9f39e76c9c3d30ac0eb013d79a9e74f8317b80 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json @@ -0,0 +1,642 @@ +{ + "copyright" : [ + "Copyright (c) 2014-2016 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 100, + "revision" : 2, + "instructions" : [ + { + "opname" : "Round", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "RoundEven", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Trunc", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "FAbs", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "SAbs", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "FSign", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "SSign", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Floor", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Ceil", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Fract", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Radians", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'degrees'" } + ] + }, + { + "opname" : "Degrees", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'radians'" } + ] + }, + { + "opname" : "Sin", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Cos", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Tan", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Asin", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Acos", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Atan", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'y_over_x'" } + ] + }, + { + "opname" : "Sinh", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Cosh", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Tanh", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Asinh", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Acosh", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Atanh", + "opcode" : 24, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Atan2", + "opcode" : 25, + "operands" : [ + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Pow", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "Exp", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Log", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Exp2", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Log2", + "opcode" : 30, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Sqrt", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "InverseSqrt", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Determinant", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "MatrixInverse", + "opcode" : 34, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Modf", + "opcode" : 35, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'i'" } + ] + }, + { + "opname" : "ModfStruct", + "opcode" : 36, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "FMin", + "opcode" : 37, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "UMin", + "opcode" : 38, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "SMin", + "opcode" : 39, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "FMax", + "opcode" : 40, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "UMax", + "opcode" : 41, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "SMax", + "opcode" : 42, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "FClamp", + "opcode" : 43, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } + ] + }, + { + "opname" : "UClamp", + "opcode" : 44, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } + ] + }, + { + "opname" : "SClamp", + "opcode" : 45, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } + ] + }, + { + "opname" : "FMix", + "opcode" : 46, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'a'" } + ] + }, + { + "opname" : "IMix", + "opcode" : 47, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'a'" } + ] + }, + { + "opname" : "Step", + "opcode" : 48, + "operands" : [ + { "kind" : "IdRef", "name" : "'edge'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "SmoothStep", + "opcode" : 49, + "operands" : [ + { "kind" : "IdRef", "name" : "'edge0'" }, + { "kind" : "IdRef", "name" : "'edge1'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Fma", + "opcode" : 50, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "Frexp", + "opcode" : 51, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'exp'" } + ] + }, + { + "opname" : "FrexpStruct", + "opcode" : 52, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Ldexp", + "opcode" : 53, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'exp'" } + ] + }, + { + "opname" : "PackSnorm4x8", + "opcode" : 54, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "PackUnorm4x8", + "opcode" : 55, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "PackSnorm2x16", + "opcode" : 56, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "PackUnorm2x16", + "opcode" : 57, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "PackHalf2x16", + "opcode" : 58, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "PackDouble2x32", + "opcode" : 59, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ], + "capabilities" : [ "Float64" ] + }, + { + "opname" : "UnpackSnorm2x16", + "opcode" : 60, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "UnpackUnorm2x16", + "opcode" : 61, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "UnpackHalf2x16", + "opcode" : 62, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ] + }, + { + "opname" : "UnpackSnorm4x8", + "opcode" : 63, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "UnpackUnorm4x8", + "opcode" : 64, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "UnpackDouble2x32", + "opcode" : 65, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" } + ], + "capabilities" : [ "Float64" ] + }, + { + "opname" : "Length", + "opcode" : 66, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "Distance", + "opcode" : 67, + "operands" : [ + { "kind" : "IdRef", "name" : "'p0'" }, + { "kind" : "IdRef", "name" : "'p1'" } + ] + }, + { + "opname" : "Cross", + "opcode" : 68, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "Normalize", + "opcode" : 69, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "FaceForward", + "opcode" : 70, + "operands" : [ + { "kind" : "IdRef", "name" : "'N'" }, + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'Nref'" } + ] + }, + { + "opname" : "Reflect", + "opcode" : 71, + "operands" : [ + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'N'" } + ] + }, + { + "opname" : "Refract", + "opcode" : 72, + "operands" : [ + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'N'" }, + { "kind" : "IdRef", "name" : "'eta'" } + ] + }, + { + "opname" : "FindILsb", + "opcode" : 73, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "FindSMsb", + "opcode" : 74, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "FindUMsb", + "opcode" : 75, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "InterpolateAtCentroid", + "opcode" : 76, + "operands" : [ + { "kind" : "IdRef", "name" : "'interpolant'" } + ], + "capabilities" : [ "InterpolationFunction" ] + }, + { + "opname" : "InterpolateAtSample", + "opcode" : 77, + "operands" : [ + { "kind" : "IdRef", "name" : "'interpolant'" }, + { "kind" : "IdRef", "name" : "'sample'" } + ], + "capabilities" : [ "InterpolationFunction" ] + }, + { + "opname" : "InterpolateAtOffset", + "opcode" : 78, + "operands" : [ + { "kind" : "IdRef", "name" : "'interpolant'" }, + { "kind" : "IdRef", "name" : "'offset'" } + ], + "capabilities" : [ "InterpolationFunction" ] + }, + { + "opname" : "NMin", + "opcode" : 79, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "NMax", + "opcode" : 80, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "NClamp", + "opcode" : 81, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } + ] + } + ] +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json new file mode 100644 index 0000000000000000000000000000000000000000..4fe45060bb98aca6769d21f9006f859d05f707d0 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json @@ -0,0 +1,1279 @@ +{ + "copyright" : [ + "Copyright (c) 2014-2016 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 100, + "revision" : 2, + "instructions" : [ + { + "opname" : "acos", + "opcode" : 0, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "acosh", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "acospi", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "asin", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "asinh", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "asinpi", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "atan", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "atan2", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "atanh", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "atanpi", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "atan2pi", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "cbrt", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "ceil", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "copysign", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "cos", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "cosh", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "cospi", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "erfc", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "erf", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "exp", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "exp2", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "exp10", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "expm1", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "fabs", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "fdim", + "opcode" : 24, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "floor", + "opcode" : 25, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "fma", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "fmax", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "fmin", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "fmod", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "fract", + "opcode" : 30, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'ptr'" } + ] + }, + { + "opname" : "frexp", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'exp'" } + ] + }, + { + "opname" : "hypot", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "ilogb", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "ldexp", + "opcode" : 34, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'k'" } + ] + }, + { + "opname" : "lgamma", + "opcode" : 35, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "lgamma_r", + "opcode" : 36, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'signp'" } + ] + }, + { + "opname" : "log", + "opcode" : 37, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "log2", + "opcode" : 38, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "log10", + "opcode" : 39, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "log1p", + "opcode" : 40, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "logb", + "opcode" : 41, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "mad", + "opcode" : 42, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "maxmag", + "opcode" : 43, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "minmag", + "opcode" : 44, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "modf", + "opcode" : 45, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'iptr'" } + ] + }, + { + "opname" : "nan", + "opcode" : 46, + "operands" : [ + { "kind" : "IdRef", "name" : "'nancode'" } + ] + }, + { + "opname" : "nextafter", + "opcode" : 47, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "pow", + "opcode" : 48, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y" } + ] + }, + { + "opname" : "pown", + "opcode" : 49, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "powr", + "opcode" : 50, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "remainder", + "opcode" : 51, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "remquo", + "opcode" : 52, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'quo'" } + ] + }, + { + "opname" : "rint", + "opcode" : 53, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "rootn", + "opcode" : 54, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "round", + "opcode" : 55, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "rsqrt", + "opcode" : 56, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "sin", + "opcode" : 57, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "sincos", + "opcode" : 58, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'cosval'" } + ] + }, + { + "opname" : "sinh", + "opcode" : 59, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "sinpi", + "opcode" : 60, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "sqrt", + "opcode" : 61, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "tan", + "opcode" : 62, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "tanh", + "opcode" : 63, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "tanpi", + "opcode" : 64, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "tgamma", + "opcode" : 65, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "trunc", + "opcode" : 66, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_cos", + "opcode" : 67, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_divide", + "opcode" : 68, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "half_exp", + "opcode" : 69, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_exp2", + "opcode" : 70, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_exp10", + "opcode" : 71, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_log", + "opcode" : 72, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_log2", + "opcode" : 73, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_log10", + "opcode" : 74, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_powr", + "opcode" : 75, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "half_recip", + "opcode" : 76, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_rsqrt", + "opcode" : 77, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_sin", + "opcode" : 78, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_sqrt", + "opcode" : 79, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "half_tan", + "opcode" : 80, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_cos", + "opcode" : 81, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_divide", + "opcode" : 82, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "native_exp", + "opcode" : 83, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_exp2", + "opcode" : 84, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_exp10", + "opcode" : 85, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_log", + "opcode" : 86, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_log2", + "opcode" : 87, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_log10", + "opcode" : 88, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_powr", + "opcode" : 89, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "native_recip", + "opcode" : 90, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_rsqrt", + "opcode" : 91, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_sin", + "opcode" : 92, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_sqrt", + "opcode" : 93, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "native_tan", + "opcode" : 94, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "s_abs", + "opcode" : 141, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "s_abs_diff", + "opcode" : 142, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_add_sat", + "opcode" : 143, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_add_sat", + "opcode" : 144, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_hadd", + "opcode" : 145, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_hadd", + "opcode" : 146, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_rhadd", + "opcode" : 147, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_rhadd", + "opcode" : 148, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_clamp", + "opcode" : 149, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minval'" }, + { "kind" : "IdRef", "name" : "'maxval'" } + ] + }, + { + "opname" : "u_clamp", + "opcode" : 150, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minval'" }, + { "kind" : "IdRef", "name" : "'maxval'" } + ] + }, + { + "opname" : "clz", + "opcode" : 151, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "ctz", + "opcode" : 152, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "s_mad_hi", + "opcode" : 153, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "u_mad_sat", + "opcode" : 154, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'z'" } + ] + }, + { + "opname" : "s_mad_sat", + "opcode" : 155, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'z'" } + ] + }, + { + "opname" : "s_max", + "opcode" : 156, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_max", + "opcode" : 157, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_min", + "opcode" : 158, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_min", + "opcode" : 159, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "s_mul_hi", + "opcode" : 160, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "rotate", + "opcode" : 161, + "operands" : [ + { "kind" : "IdRef", "name" : "'v'" }, + { "kind" : "IdRef", "name" : "'i'" } + ] + }, + { + "opname" : "s_sub_sat", + "opcode" : 162, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_sub_sat", + "opcode" : 163, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_upsample", + "opcode" : 164, + "operands" : [ + { "kind" : "IdRef", "name" : "'hi'" }, + { "kind" : "IdRef", "name" : "'lo'" } + ] + }, + { + "opname" : "s_upsample", + "opcode" : 165, + "operands" : [ + { "kind" : "IdRef", "name" : "'hi'" }, + { "kind" : "IdRef", "name" : "'lo'" } + ] + }, + { + "opname" : "popcount", + "opcode" : 166, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "s_mad24", + "opcode" : 167, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'z'" } + ] + }, + { + "opname" : "u_mad24", + "opcode" : 168, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'z'" } + ] + }, + { + "opname" : "s_mul24", + "opcode" : 169, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_mul24", + "opcode" : 170, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_abs", + "opcode" : 201, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "u_abs_diff", + "opcode" : 202, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_mul_hi", + "opcode" : 203, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "u_mad_hi", + "opcode" : 204, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "fclamp", + "opcode" : 95, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minval'" }, + { "kind" : "IdRef", "name" : "'maxval'" } + ] + }, + { + "opname" : "degrees", + "opcode" :96, + "operands" : [ + { "kind" : "IdRef", "name" : "'radians'" } + ] + }, + { + "opname" : "fmax_common", + "opcode" : 97, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "fmin_common", + "opcode" : 98, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ] + }, + { + "opname" : "mix", + "opcode" : 99, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'a'" } + ] + }, + { + "opname" : "radians", + "opcode" : 100, + "operands" : [ + { "kind" : "IdRef", "name" : "'degrees'" } + ] + }, + { + "opname" : "step", + "opcode" : 101, + "operands" : [ + { "kind" : "IdRef", "name" : "'edge'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "smoothstep", + "opcode" : 102, + "operands" : [ + { "kind" : "IdRef", "name" : "'edge0'" }, + { "kind" : "IdRef", "name" : "'edge1'" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "sign", + "opcode" : 103, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "cross", + "opcode" : 104, + "operands" : [ + { "kind" : "IdRef", "name" : "'p0'" }, + { "kind" : "IdRef", "name" : "'p1'" } + ] + }, + { + "opname" : "distance", + "opcode" : 105, + "operands" : [ + { "kind" : "IdRef", "name" : "'p0'" }, + { "kind" : "IdRef", "name" : "'p1'" } + ] + }, + { + "opname" : "length", + "opcode" : 106, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "normalize", + "opcode" : 107, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "fast_distance", + "opcode" : 108, + "operands" : [ + { "kind" : "IdRef", "name" : "'p0'" }, + { "kind" : "IdRef", "name" : "'p1'" } + ] + }, + { + "opname" : "fast_length", + "opcode" : 109, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "fast_normalize", + "opcode" : 110, + "operands" : [ + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "bitselect", + "opcode" : 186, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "select", + "opcode" : 187, + "operands" : [ + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } + ] + }, + { + "opname" : "vloadn", + "opcode" : 171, + "operands" : [ + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "LiteralInteger", "name" : "'n'" } + ] + }, + { + "opname" : "vstoren", + "opcode" : 172, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "vload_half", + "opcode" : 173, + "operands" : [ + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "vload_halfn", + "opcode" : 174, + "operands" : [ + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "LiteralInteger", "name" : "'n'" } + ] + }, + { + "opname" : "vstore_half", + "opcode" : 175, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "vstore_half_r", + "opcode" : 176, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "FPRoundingMode", "name" : "'mode'" } + ] + }, + { + "opname" : "vstore_halfn", + "opcode" : 177, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "vstore_halfn_r", + "opcode" : 178, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "FPRoundingMode", "name" : "'mode'" } + ] + }, + { + "opname" : "vloada_halfn", + "opcode" : 179, + "operands" : [ + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "LiteralInteger", "name" : "'n'" } + ] + }, + { + "opname" : "vstorea_halfn", + "opcode" : 180, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" } + ] + }, + { + "opname" : "vstorea_halfn_r", + "opcode" : 181, + "operands" : [ + { "kind" : "IdRef", "name" : "'data'" }, + { "kind" : "IdRef", "name" : "'offset'" }, + { "kind" : "IdRef", "name" : "'p'" }, + { "kind" : "FPRoundingMode", "name" : "'mode'" } + ] + }, + { + "opname" : "shuffle", + "opcode" : 182, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'shuffle mask'" } + ] + }, + { + "opname" : "shuffle2", + "opcode" : 183, + "operands" : [ + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'shuffle mask'" } + ] + }, + { + "opname" : "printf", + "opcode" : 184, + "operands" : [ + { "kind" : "IdRef", "name" : "'format'" }, + { "kind" : "IdRef", "name" : "'additional arguments'", "quantifier" : "*" } + ] + }, + { + "opname" : "prefetch", + "opcode" : 185, + "operands" : [ + { "kind" : "IdRef", "name" : "'ptr'" }, + { "kind" : "IdRef", "name" : "'num elements'" } + ] + } + ] +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json new file mode 100755 index 0000000000000000000000000000000000000000..01f98aef2b274b9f53e03c63a5a5b39a0abe1ec9 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json @@ -0,0 +1,6788 @@ +{ + "copyright" : [ + "Copyright (c) 2014-2016 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "magic_number" : "0x07230203", + "major_version" : 1, + "minor_version" : 3, + "revision" : 1, + "instructions" : [ + { + "opname" : "OpNop", + "opcode" : 0 + }, + { + "opname" : "OpUndef", + "opcode" : 1, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpSourceContinued", + "opcode" : 2, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Continued Source'" } + ] + }, + { + "opname" : "OpSource", + "opcode" : 3, + "operands" : [ + { "kind" : "SourceLanguage" }, + { "kind" : "LiteralInteger", "name" : "'Version'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'File'" }, + { "kind" : "LiteralString", "quantifier" : "?", "name" : "'Source'" } + ] + }, + { + "opname" : "OpSourceExtension", + "opcode" : 4, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Extension'" } + ] + }, + { + "opname" : "OpName", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ] + }, + { + "opname" : "OpMemberName", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ] + }, + { + "opname" : "OpString", + "opcode" : 7, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "'String'" } + ] + }, + { + "opname" : "OpLine", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'File'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "OpExtension", + "opcode" : 10, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Name'" } + ] + }, + { + "opname" : "OpExtInstImport", + "opcode" : 11, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ] + }, + { + "opname" : "OpExtInst", + "opcode" : 12, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Set'" }, + { "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." } + ] + }, + { + "opname" : "OpMemoryModel", + "opcode" : 14, + "operands" : [ + { "kind" : "AddressingModel" }, + { "kind" : "MemoryModel" } + ] + }, + { + "opname" : "OpEntryPoint", + "opcode" : 15, + "operands" : [ + { "kind" : "ExecutionModel" }, + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "LiteralString", "name" : "'Name'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Interface'" } + ] + }, + { + "opname" : "OpExecutionMode", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "ExecutionMode", "name" : "'Mode'" } + ] + }, + { + "opname" : "OpCapability", + "opcode" : 17, + "operands" : [ + { "kind" : "Capability", "name" : "'Capability'" } + ] + }, + { + "opname" : "OpTypeVoid", + "opcode" : 19, + "operands" : [ + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpTypeBool", + "opcode" : 20, + "operands" : [ + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpTypeInt", + "opcode" : 21, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Width'" }, + { "kind" : "LiteralInteger", "name" : "'Signedness'" } + ] + }, + { + "opname" : "OpTypeFloat", + "opcode" : 22, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Width'" } + ] + }, + { + "opname" : "OpTypeVector", + "opcode" : 23, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Component Type'" }, + { "kind" : "LiteralInteger", "name" : "'Component Count'" } + ] + }, + { + "opname" : "OpTypeMatrix", + "opcode" : 24, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Column Type'" }, + { "kind" : "LiteralInteger", "name" : "'Column Count'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpTypeImage", + "opcode" : 25, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Type'" }, + { "kind" : "Dim" }, + { "kind" : "LiteralInteger", "name" : "'Depth'" }, + { "kind" : "LiteralInteger", "name" : "'Arrayed'" }, + { "kind" : "LiteralInteger", "name" : "'MS'" }, + { "kind" : "LiteralInteger", "name" : "'Sampled'" }, + { "kind" : "ImageFormat" }, + { "kind" : "AccessQualifier", "quantifier" : "?" } + ] + }, + { + "opname" : "OpTypeSampler", + "opcode" : 26, + "operands" : [ + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpTypeSampledImage", + "opcode" : 27, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image Type'" } + ] + }, + { + "opname" : "OpTypeArray", + "opcode" : 28, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Element Type'" }, + { "kind" : "IdRef", "name" : "'Length'" } + ] + }, + { + "opname" : "OpTypeRuntimeArray", + "opcode" : 29, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Element Type'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpTypeStruct", + "opcode" : 30, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } + ] + }, + { + "opname" : "OpTypeOpaque", + "opcode" : 31, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "The name of the opaque type." } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpTypePointer", + "opcode" : 32, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "StorageClass" }, + { "kind" : "IdRef", "name" : "'Type'" } + ] + }, + { + "opname" : "OpTypeFunction", + "opcode" : 33, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..." } + ] + }, + { + "opname" : "OpTypeEvent", + "opcode" : 34, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpTypeDeviceEvent", + "opcode" : 35, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpTypeReserveId", + "opcode" : 36, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpTypeQueue", + "opcode" : 37, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpTypePipe", + "opcode" : 38, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "AccessQualifier", "name" : "'Qualifier'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpTypeForwardPointer", + "opcode" : 39, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer Type'" }, + { "kind" : "StorageClass" } + ], + "capabilities" : [ "Addresses" ] + }, + { + "opname" : "OpConstantTrue", + "opcode" : 41, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpConstantFalse", + "opcode" : 42, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpConstant", + "opcode" : 43, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } + ] + }, + { + "opname" : "OpConstantComposite", + "opcode" : 44, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ] + }, + { + "opname" : "OpConstantSampler", + "opcode" : 45, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "SamplerAddressingMode" }, + { "kind" : "LiteralInteger", "name" : "'Param'" }, + { "kind" : "SamplerFilterMode" } + ], + "capabilities" : [ "LiteralSampler" ] + }, + { + "opname" : "OpConstantNull", + "opcode" : 46, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpSpecConstantTrue", + "opcode" : 48, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpSpecConstantFalse", + "opcode" : 49, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpSpecConstant", + "opcode" : 50, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } + ] + }, + { + "opname" : "OpSpecConstantComposite", + "opcode" : 51, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ] + }, + { + "opname" : "OpSpecConstantOp", + "opcode" : 52, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralSpecConstantOpInteger", "name" : "'Opcode'" } + ] + }, + { + "opname" : "OpFunction", + "opcode" : 54, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "FunctionControl" }, + { "kind" : "IdRef", "name" : "'Function Type'" } + ] + }, + { + "opname" : "OpFunctionParameter", + "opcode" : 55, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpFunctionEnd", + "opcode" : 56 + }, + { + "opname" : "OpFunctionCall", + "opcode" : 57, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Argument 0', +\n'Argument 1', +\n..." } + ] + }, + { + "opname" : "OpVariable", + "opcode" : 59, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "StorageClass" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Initializer'" } + ] + }, + { + "opname" : "OpImageTexelPointer", + "opcode" : 60, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Sample'" } + ] + }, + { + "opname" : "OpLoad", + "opcode" : 61, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ] + }, + { + "opname" : "OpStore", + "opcode" : 62, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ] + }, + { + "opname" : "OpCopyMemory", + "opcode" : 63, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ] + }, + { + "opname" : "OpCopyMemorySized", + "opcode" : 64, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "capabilities" : [ "Addresses" ] + }, + { + "opname" : "OpAccessChain", + "opcode" : 65, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ] + }, + { + "opname" : "OpInBoundsAccessChain", + "opcode" : 66, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ] + }, + { + "opname" : "OpPtrAccessChain", + "opcode" : 67, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Element'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "capabilities" : [ + "Addresses", + "VariablePointers", + "VariablePointersStorageBuffer" + ] + }, + { + "opname" : "OpArrayLength", + "opcode" : 68, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Structure'" }, + { "kind" : "LiteralInteger", "name" : "'Array member'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpGenericPtrMemSemantics", + "opcode" : 69, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpInBoundsPtrAccessChain", + "opcode" : 70, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Element'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "capabilities" : [ "Addresses" ] + }, + { + "opname" : "OpDecorate", + "opcode" : 71, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ] + }, + { + "opname" : "OpMemberDecorate", + "opcode" : 72, + "operands" : [ + { "kind" : "IdRef", "name" : "'Structure Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ] + }, + { + "opname" : "OpDecorationGroup", + "opcode" : 73, + "operands" : [ + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpGroupDecorate", + "opcode" : 74, + "operands" : [ + { "kind" : "IdRef", "name" : "'Decoration Group'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Targets'" } + ] + }, + { + "opname" : "OpGroupMemberDecorate", + "opcode" : 75, + "operands" : [ + { "kind" : "IdRef", "name" : "'Decoration Group'" }, + { "kind" : "PairIdRefLiteralInteger", "quantifier" : "*", "name" : "'Targets'" } + ] + }, + { + "opname" : "OpVectorExtractDynamic", + "opcode" : 77, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ] + }, + { + "opname" : "OpVectorInsertDynamic", + "opcode" : 78, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ] + }, + { + "opname" : "OpVectorShuffle", + "opcode" : 79, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Components'" } + ] + }, + { + "opname" : "OpCompositeConstruct", + "opcode" : 80, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ] + }, + { + "opname" : "OpCompositeExtract", + "opcode" : 81, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Composite'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } + ] + }, + { + "opname" : "OpCompositeInsert", + "opcode" : 82, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'Composite'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } + ] + }, + { + "opname" : "OpCopyObject", + "opcode" : 83, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpTranspose", + "opcode" : 84, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpSampledImage", + "opcode" : 86, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Sampler'" } + ] + }, + { + "opname" : "OpImageSampleImplicitLod", + "opcode" : 87, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleExplicitLod", + "opcode" : 88, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ] + }, + { + "opname" : "OpImageSampleDrefImplicitLod", + "opcode" : 89, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleDrefExplicitLod", + "opcode" : 90, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleProjImplicitLod", + "opcode" : 91, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleProjExplicitLod", + "opcode" : 92, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleProjDrefImplicitLod", + "opcode" : 93, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageSampleProjDrefExplicitLod", + "opcode" : 94, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageFetch", + "opcode" : 95, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ] + }, + { + "opname" : "OpImageGather", + "opcode" : 96, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageDrefGather", + "opcode" : 97, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpImageRead", + "opcode" : 98, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ] + }, + { + "opname" : "OpImageWrite", + "opcode" : 99, + "operands" : [ + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Texel'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ] + }, + { + "opname" : "OpImage", + "opcode" : 100, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" } + ] + }, + { + "opname" : "OpImageQueryFormat", + "opcode" : 101, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpImageQueryOrder", + "opcode" : 102, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpImageQuerySizeLod", + "opcode" : 103, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Level of Detail'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ] + }, + { + "opname" : "OpImageQuerySize", + "opcode" : 104, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ] + }, + { + "opname" : "OpImageQueryLod", + "opcode" : 105, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "ImageQuery" ] + }, + { + "opname" : "OpImageQueryLevels", + "opcode" : 106, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ] + }, + { + "opname" : "OpImageQuerySamples", + "opcode" : 107, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ] + }, + { + "opname" : "OpConvertFToU", + "opcode" : 109, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ] + }, + { + "opname" : "OpConvertFToS", + "opcode" : 110, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ] + }, + { + "opname" : "OpConvertSToF", + "opcode" : 111, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ] + }, + { + "opname" : "OpConvertUToF", + "opcode" : 112, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ] + }, + { + "opname" : "OpUConvert", + "opcode" : 113, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ] + }, + { + "opname" : "OpSConvert", + "opcode" : 114, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ] + }, + { + "opname" : "OpFConvert", + "opcode" : 115, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ] + }, + { + "opname" : "OpQuantizeToF16", + "opcode" : 116, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpConvertPtrToU", + "opcode" : 117, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Addresses" ] + }, + { + "opname" : "OpSatConvertSToU", + "opcode" : 118, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpSatConvertUToS", + "opcode" : 119, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpConvertUToPtr", + "opcode" : 120, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Integer Value'" } + ], + "capabilities" : [ "Addresses" ] + }, + { + "opname" : "OpPtrCastToGeneric", + "opcode" : 121, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpGenericCastToPtr", + "opcode" : 122, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpGenericCastToPtrExplicit", + "opcode" : 123, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "StorageClass", "name" : "'Storage'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpBitcast", + "opcode" : 124, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpSNegate", + "opcode" : 126, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpFNegate", + "opcode" : 127, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpIAdd", + "opcode" : 128, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFAdd", + "opcode" : 129, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpISub", + "opcode" : 130, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFSub", + "opcode" : 131, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpIMul", + "opcode" : 132, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFMul", + "opcode" : 133, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpUDiv", + "opcode" : 134, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSDiv", + "opcode" : 135, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFDiv", + "opcode" : 136, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpUMod", + "opcode" : 137, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSRem", + "opcode" : 138, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSMod", + "opcode" : 139, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFRem", + "opcode" : 140, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFMod", + "opcode" : 141, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpVectorTimesScalar", + "opcode" : 142, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Scalar'" } + ] + }, + { + "opname" : "OpMatrixTimesScalar", + "opcode" : 143, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "IdRef", "name" : "'Scalar'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpVectorTimesMatrix", + "opcode" : 144, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpMatrixTimesVector", + "opcode" : 145, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpMatrixTimesMatrix", + "opcode" : 146, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'LeftMatrix'" }, + { "kind" : "IdRef", "name" : "'RightMatrix'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpOuterProduct", + "opcode" : 147, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" } + ], + "capabilities" : [ "Matrix" ] + }, + { + "opname" : "OpDot", + "opcode" : 148, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" } + ] + }, + { + "opname" : "OpIAddCarry", + "opcode" : 149, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpISubBorrow", + "opcode" : 150, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpUMulExtended", + "opcode" : 151, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSMulExtended", + "opcode" : 152, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpAny", + "opcode" : 154, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ] + }, + { + "opname" : "OpAll", + "opcode" : 155, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ] + }, + { + "opname" : "OpIsNan", + "opcode" : 156, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "OpIsInf", + "opcode" : 157, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ] + }, + { + "opname" : "OpIsFinite", + "opcode" : 158, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpIsNormal", + "opcode" : 159, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpSignBitSet", + "opcode" : 160, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpLessOrGreater", + "opcode" : 161, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpOrdered", + "opcode" : 162, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpUnordered", + "opcode" : 163, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpLogicalEqual", + "opcode" : 164, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpLogicalNotEqual", + "opcode" : 165, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpLogicalOr", + "opcode" : 166, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpLogicalAnd", + "opcode" : 167, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpLogicalNot", + "opcode" : 168, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpSelect", + "opcode" : 169, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Condition'" }, + { "kind" : "IdRef", "name" : "'Object 1'" }, + { "kind" : "IdRef", "name" : "'Object 2'" } + ] + }, + { + "opname" : "OpIEqual", + "opcode" : 170, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpINotEqual", + "opcode" : 171, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpUGreaterThan", + "opcode" : 172, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSGreaterThan", + "opcode" : 173, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpUGreaterThanEqual", + "opcode" : 174, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSGreaterThanEqual", + "opcode" : 175, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpULessThan", + "opcode" : 176, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSLessThan", + "opcode" : 177, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpULessThanEqual", + "opcode" : 178, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpSLessThanEqual", + "opcode" : 179, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdEqual", + "opcode" : 180, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordEqual", + "opcode" : 181, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdNotEqual", + "opcode" : 182, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordNotEqual", + "opcode" : 183, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdLessThan", + "opcode" : 184, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordLessThan", + "opcode" : 185, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdGreaterThan", + "opcode" : 186, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordGreaterThan", + "opcode" : 187, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdLessThanEqual", + "opcode" : 188, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordLessThanEqual", + "opcode" : 189, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFOrdGreaterThanEqual", + "opcode" : 190, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpFUnordGreaterThanEqual", + "opcode" : 191, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpShiftRightLogical", + "opcode" : 194, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ] + }, + { + "opname" : "OpShiftRightArithmetic", + "opcode" : 195, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ] + }, + { + "opname" : "OpShiftLeftLogical", + "opcode" : 196, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ] + }, + { + "opname" : "OpBitwiseOr", + "opcode" : 197, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpBitwiseXor", + "opcode" : 198, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpBitwiseAnd", + "opcode" : 199, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ] + }, + { + "opname" : "OpNot", + "opcode" : 200, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ] + }, + { + "opname" : "OpBitFieldInsert", + "opcode" : 201, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Insert'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpBitFieldSExtract", + "opcode" : 202, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpBitFieldUExtract", + "opcode" : 203, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpBitReverse", + "opcode" : 204, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpBitCount", + "opcode" : 205, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" } + ] + }, + { + "opname" : "OpDPdx", + "opcode" : 207, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpDPdy", + "opcode" : 208, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpFwidth", + "opcode" : 209, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpDPdxFine", + "opcode" : 210, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpDPdyFine", + "opcode" : 211, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpFwidthFine", + "opcode" : 212, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpDPdxCoarse", + "opcode" : 213, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpDPdyCoarse", + "opcode" : 214, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpFwidthCoarse", + "opcode" : 215, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ] + }, + { + "opname" : "OpEmitVertex", + "opcode" : 218, + "capabilities" : [ "Geometry" ] + }, + { + "opname" : "OpEndPrimitive", + "opcode" : 219, + "capabilities" : [ "Geometry" ] + }, + { + "opname" : "OpEmitStreamVertex", + "opcode" : 220, + "operands" : [ + { "kind" : "IdRef", "name" : "'Stream'" } + ], + "capabilities" : [ "GeometryStreams" ] + }, + { + "opname" : "OpEndStreamPrimitive", + "opcode" : 221, + "operands" : [ + { "kind" : "IdRef", "name" : "'Stream'" } + ], + "capabilities" : [ "GeometryStreams" ] + }, + { + "opname" : "OpControlBarrier", + "opcode" : 224, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ] + }, + { + "opname" : "OpMemoryBarrier", + "opcode" : 225, + "operands" : [ + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ] + }, + { + "opname" : "OpAtomicLoad", + "opcode" : 227, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ] + }, + { + "opname" : "OpAtomicStore", + "opcode" : 228, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicExchange", + "opcode" : 229, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicCompareExchange", + "opcode" : 230, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Equal'" }, + { "kind" : "IdMemorySemantics", "name" : "'Unequal'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Comparator'" } + ] + }, + { + "opname" : "OpAtomicCompareExchangeWeak", + "opcode" : 231, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Equal'" }, + { "kind" : "IdMemorySemantics", "name" : "'Unequal'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Comparator'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpAtomicIIncrement", + "opcode" : 232, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ] + }, + { + "opname" : "OpAtomicIDecrement", + "opcode" : 233, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ] + }, + { + "opname" : "OpAtomicIAdd", + "opcode" : 234, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicISub", + "opcode" : 235, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicSMin", + "opcode" : 236, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicUMin", + "opcode" : 237, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicSMax", + "opcode" : 238, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicUMax", + "opcode" : 239, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicAnd", + "opcode" : 240, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicOr", + "opcode" : 241, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpAtomicXor", + "opcode" : 242, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpPhi", + "opcode" : 245, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "PairIdRefIdRef", "quantifier" : "*", "name" : "'Variable, Parent, ...'" } + ] + }, + { + "opname" : "OpLoopMerge", + "opcode" : 246, + "operands" : [ + { "kind" : "IdRef", "name" : "'Merge Block'" }, + { "kind" : "IdRef", "name" : "'Continue Target'" }, + { "kind" : "LoopControl" } + ] + }, + { + "opname" : "OpSelectionMerge", + "opcode" : 247, + "operands" : [ + { "kind" : "IdRef", "name" : "'Merge Block'" }, + { "kind" : "SelectionControl" } + ] + }, + { + "opname" : "OpLabel", + "opcode" : 248, + "operands" : [ + { "kind" : "IdResult" } + ] + }, + { + "opname" : "OpBranch", + "opcode" : 249, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target Label'" } + ] + }, + { + "opname" : "OpBranchConditional", + "opcode" : 250, + "operands" : [ + { "kind" : "IdRef", "name" : "'Condition'" }, + { "kind" : "IdRef", "name" : "'True Label'" }, + { "kind" : "IdRef", "name" : "'False Label'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Branch weights'" } + ] + }, + { + "opname" : "OpSwitch", + "opcode" : 251, + "operands" : [ + { "kind" : "IdRef", "name" : "'Selector'" }, + { "kind" : "IdRef", "name" : "'Default'" }, + { "kind" : "PairLiteralIntegerIdRef", "quantifier" : "*", "name" : "'Target'" } + ] + }, + { + "opname" : "OpKill", + "opcode" : 252, + "capabilities" : [ "Shader" ] + }, + { + "opname" : "OpReturn", + "opcode" : 253 + }, + { + "opname" : "OpReturnValue", + "opcode" : 254, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" } + ] + }, + { + "opname" : "OpUnreachable", + "opcode" : 255 + }, + { + "opname" : "OpLifetimeStart", + "opcode" : 256, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "LiteralInteger", "name" : "'Size'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpLifetimeStop", + "opcode" : 257, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "LiteralInteger", "name" : "'Size'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpGroupAsyncCopy", + "opcode" : 259, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Destination'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Num Elements'" }, + { "kind" : "IdRef", "name" : "'Stride'" }, + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpGroupWaitEvents", + "opcode" : 260, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Events List'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpGroupAll", + "opcode" : 261, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupAny", + "opcode" : 262, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupBroadcast", + "opcode" : 263, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'LocalId'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupIAdd", + "opcode" : 264, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupFAdd", + "opcode" : 265, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupFMin", + "opcode" : 266, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupUMin", + "opcode" : 267, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupSMin", + "opcode" : 268, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupFMax", + "opcode" : 269, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupUMax", + "opcode" : 270, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpGroupSMax", + "opcode" : 271, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ] + }, + { + "opname" : "OpReadPipe", + "opcode" : 274, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpWritePipe", + "opcode" : 275, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpReservedReadPipe", + "opcode" : 276, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Index'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpReservedWritePipe", + "opcode" : 277, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Index'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpReserveReadPipePackets", + "opcode" : 278, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpReserveWritePipePackets", + "opcode" : 279, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpCommitReadPipe", + "opcode" : 280, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpCommitWritePipe", + "opcode" : 281, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpIsValidReserveId", + "opcode" : 282, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGetNumPipePackets", + "opcode" : 283, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGetMaxPipePackets", + "opcode" : 284, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGroupReserveReadPipePackets", + "opcode" : 285, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGroupReserveWritePipePackets", + "opcode" : 286, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGroupCommitReadPipe", + "opcode" : 287, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpGroupCommitWritePipe", + "opcode" : 288, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ] + }, + { + "opname" : "OpEnqueueMarker", + "opcode" : 291, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Queue'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Wait Events'" }, + { "kind" : "IdRef", "name" : "'Ret Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpEnqueueKernel", + "opcode" : 292, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Queue'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Wait Events'" }, + { "kind" : "IdRef", "name" : "'Ret Event'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Local Size'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpGetKernelNDrangeSubGroupCount", + "opcode" : 293, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpGetKernelNDrangeMaxSubGroupSize", + "opcode" : 294, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpGetKernelWorkGroupSize", + "opcode" : 295, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpGetKernelPreferredWorkGroupSizeMultiple", + "opcode" : 296, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpRetainEvent", + "opcode" : 297, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpReleaseEvent", + "opcode" : 298, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpCreateUserEvent", + "opcode" : 299, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpIsValidEvent", + "opcode" : 300, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpSetUserEventStatus", + "opcode" : 301, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" }, + { "kind" : "IdRef", "name" : "'Status'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpCaptureEventProfilingInfo", + "opcode" : 302, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" }, + { "kind" : "IdRef", "name" : "'Profiling Info'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpGetDefaultQueue", + "opcode" : 303, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpBuildNDRange", + "opcode" : 304, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'GlobalWorkSize'" }, + { "kind" : "IdRef", "name" : "'LocalWorkSize'" }, + { "kind" : "IdRef", "name" : "'GlobalWorkOffset'" } + ], + "capabilities" : [ "DeviceEnqueue" ] + }, + { + "opname" : "OpImageSparseSampleImplicitLod", + "opcode" : 305, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseSampleExplicitLod", + "opcode" : 306, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseSampleDrefImplicitLod", + "opcode" : 307, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseSampleDrefExplicitLod", + "opcode" : 308, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseSampleProjImplicitLod", + "opcode" : 309, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjExplicitLod", + "opcode" : 310, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjDrefImplicitLod", + "opcode" : 311, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjDrefExplicitLod", + "opcode" : 312, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseFetch", + "opcode" : 313, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseGather", + "opcode" : 314, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseDrefGather", + "opcode" : 315, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpImageSparseTexelsResident", + "opcode" : 316, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Resident Code'" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpNoLine", + "opcode" : 317 + }, + { + "opname" : "OpAtomicFlagTestAndSet", + "opcode" : 318, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpAtomicFlagClear", + "opcode" : 319, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "Kernel" ] + }, + { + "opname" : "OpImageSparseRead", + "opcode" : 320, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ] + }, + { + "opname" : "OpSizeOf", + "opcode" : 321, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Addresses" ], + "version" : "1.1" + }, + { + "opname" : "OpTypePipeStorage", + "opcode" : 322, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpConstantPipeStorage", + "opcode" : 323, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Packet Size'" }, + { "kind" : "LiteralInteger", "name" : "'Packet Alignment'" }, + { "kind" : "LiteralInteger", "name" : "'Capacity'" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpCreatePipeFromPipeStorage", + "opcode" : 324, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe Storage'" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpGetKernelLocalSizeForSubgroupCount", + "opcode" : 325, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Subgroup Count'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "SubgroupDispatch" ], + "version" : "1.1" + }, + { + "opname" : "OpGetKernelMaxNumSubgroups", + "opcode" : 326, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "SubgroupDispatch" ], + "version" : "1.1" + }, + { + "opname" : "OpTypeNamedBarrier", + "opcode" : 327, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpNamedBarrierInitialize", + "opcode" : 328, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Subgroup Count'" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpMemoryNamedBarrier", + "opcode" : 329, + "operands" : [ + { "kind" : "IdRef", "name" : "'Named Barrier'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpModuleProcessed", + "opcode" : 330, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Process'" } + ], + "version" : "1.1" + }, + { + "opname" : "OpExecutionModeId", + "opcode" : 331, + "operands" : [ + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "ExecutionMode", "name" : "'Mode'" } + ], + "version" : "1.2" + }, + { + "opname" : "OpDecorateId", + "opcode" : 332, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.2" + }, + { + "opname" : "OpGroupNonUniformElect", + "opcode" : 333, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" } + ], + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAll", + "opcode" : 334, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAny", + "opcode" : 335, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAllEqual", + "opcode" : 336, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBroadcast", + "opcode" : 337, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Id'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBroadcastFirst", + "opcode" : 338, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallot", + "opcode" : 339, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformInverseBallot", + "opcode" : 340, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotBitExtract", + "opcode" : 341, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotBitCount", + "opcode" : 342, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotFindLSB", + "opcode" : 343, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotFindMSB", + "opcode" : 344, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffle", + "opcode" : 345, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Id'" } + ], + "capabilities" : [ "GroupNonUniformShuffle" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleXor", + "opcode" : 346, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Mask'" } + ], + "capabilities" : [ "GroupNonUniformShuffle" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleUp", + "opcode" : 347, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "GroupNonUniformShuffleRelative" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleDown", + "opcode" : 348, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "GroupNonUniformShuffleRelative" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformIAdd", + "opcode" : 349, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFAdd", + "opcode" : 350, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformIMul", + "opcode" : 351, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMul", + "opcode" : 352, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformSMin", + "opcode" : 353, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformUMin", + "opcode" : 354, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMin", + "opcode" : 355, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformSMax", + "opcode" : 356, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformUMax", + "opcode" : 357, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMax", + "opcode" : 358, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseAnd", + "opcode" : 359, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseOr", + "opcode" : 360, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseXor", + "opcode" : 361, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalAnd", + "opcode" : 362, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalOr", + "opcode" : 363, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalXor", + "opcode" : 364, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformQuadBroadcast", + "opcode" : 365, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "GroupNonUniformQuad" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformQuadSwap", + "opcode" : 366, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "GroupNonUniformQuad" ], + "version" : "1.3" + }, + { + "opname" : "OpSubgroupBallotKHR", + "opcode" : 4421, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupFirstInvocationKHR", + "opcode" : 4422, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAllKHR", + "opcode" : 4428, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAnyKHR", + "opcode" : 4429, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAllEqualKHR", + "opcode" : 4430, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupReadInvocationKHR", + "opcode" : 4432, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupIAddNonUniformAMD", + "opcode" : 5000, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFAddNonUniformAMD", + "opcode" : 5001, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMinNonUniformAMD", + "opcode" : 5002, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupUMinNonUniformAMD", + "opcode" : 5003, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupSMinNonUniformAMD", + "opcode" : 5004, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMaxNonUniformAMD", + "opcode" : 5005, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupUMaxNonUniformAMD", + "opcode" : 5006, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupSMaxNonUniformAMD", + "opcode" : 5007, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpFragmentMaskFetchAMD", + "opcode" : 5011, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpFragmentFetchAMD", + "opcode" : 5012, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Fragment Index'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleINTEL", + "opcode" : 5571, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Data'" }, + { "kind" : "IdRef", "name" : "'InvocationId'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleDownINTEL", + "opcode" : 5572, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Current'" }, + { "kind" : "IdRef", "name" : "'Next'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleUpINTEL", + "opcode" : 5573, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Previous'" }, + { "kind" : "IdRef", "name" : "'Current'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleXorINTEL", + "opcode" : 5574, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Data'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupBlockReadINTEL", + "opcode" : 5575, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Ptr'" } + ], + "capabilities" : [ "SubgroupBufferBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupBlockWriteINTEL", + "opcode" : 5576, + "operands" : [ + { "kind" : "IdRef", "name" : "'Ptr'" }, + { "kind" : "IdRef", "name" : "'Data'" } + ], + "capabilities" : [ "SubgroupBufferBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageBlockReadINTEL", + "opcode" : 5577, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "SubgroupImageBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageBlockWriteINTEL", + "opcode" : 5578, + "operands" : [ + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Data'" } + ], + "capabilities" : [ "SubgroupImageBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpDecorateStringGOOGLE", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + }, + { + "opname" : "OpMemberDecorateStringGOOGLE", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + }, + { + "opname" : "OpGroupNonUniformPartitionNV", + "opcode" : 5296, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformPartitionedNV" ], + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "ImageOperands", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Bias", + "value" : "0x0001", + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Lod", + "value" : "0x0002", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Grad", + "value" : "0x0004", + "parameters" : [ + { "kind" : "IdRef" }, + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "ConstOffset", + "value" : "0x0008", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Offset", + "value" : "0x0010", + "capabilities" : [ "ImageGatherExtended" ], + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "ConstOffsets", + "value" : "0x0020", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Sample", + "value" : "0x0040", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "MinLod", + "value" : "0x0080", + "capabilities" : [ "MinLod" ], + "parameters" : [ + { "kind" : "IdRef" } + ] + } + ] + }, + { + "category" : "BitEnum", + "kind" : "FPFastMathMode", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "NotNaN", + "value" : "0x0001", + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NotInf", + "value" : "0x0002", + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NSZ", + "value" : "0x0004", + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "AllowRecip", + "value" : "0x0008", + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Fast", + "value" : "0x0010", + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "BitEnum", + "kind" : "SelectionControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Flatten", + "value" : "0x0001" + }, + { + "enumerant" : "DontFlatten", + "value" : "0x0002" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "LoopControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Unroll", + "value" : "0x0001" + }, + { + "enumerant" : "DontUnroll", + "value" : "0x0002" + }, + { + "enumerant" : "DependencyInfinite", + "value" : "0x0004", + "version" : "1.1" + }, + { + "enumerant" : "DependencyLength", + "value" : "0x0008", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.1" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "FunctionControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Inline", + "value" : "0x0001" + }, + { + "enumerant" : "DontInline", + "value" : "0x0002" + }, + { + "enumerant" : "Pure", + "value" : "0x0004" + }, + { + "enumerant" : "Const", + "value" : "0x0008" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "MemorySemantics", + "enumerants" : [ + { + "enumerant" : "Relaxed", + "value" : "0x0000" + }, + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Acquire", + "value" : "0x0002" + }, + { + "enumerant" : "Release", + "value" : "0x0004" + }, + { + "enumerant" : "AcquireRelease", + "value" : "0x0008" + }, + { + "enumerant" : "SequentiallyConsistent", + "value" : "0x0010" + }, + { + "enumerant" : "UniformMemory", + "value" : "0x0040", + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SubgroupMemory", + "value" : "0x0080" + }, + { + "enumerant" : "WorkgroupMemory", + "value" : "0x0100" + }, + { + "enumerant" : "CrossWorkgroupMemory", + "value" : "0x0200" + }, + { + "enumerant" : "AtomicCounterMemory", + "value" : "0x0400", + "capabilities" : [ "AtomicStorage" ] + }, + { + "enumerant" : "ImageMemory", + "value" : "0x0800" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "MemoryAccess", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Volatile", + "value" : "0x0001" + }, + { + "enumerant" : "Aligned", + "value" : "0x0002", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "Nontemporal", + "value" : "0x0004" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "KernelProfilingInfo", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "CmdExecTime", + "value" : "0x0001", + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SourceLanguage", + "enumerants" : [ + { + "enumerant" : "Unknown", + "value" : 0 + }, + { + "enumerant" : "ESSL", + "value" : 1 + }, + { + "enumerant" : "GLSL", + "value" : 2 + }, + { + "enumerant" : "OpenCL_C", + "value" : 3 + }, + { + "enumerant" : "OpenCL_CPP", + "value" : 4 + }, + { + "enumerant" : "HLSL", + "value" : 5 + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ExecutionModel", + "enumerants" : [ + { + "enumerant" : "Vertex", + "value" : 0, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "TessellationControl", + "value" : 1, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "TessellationEvaluation", + "value" : 2, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "Geometry", + "value" : 3, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "Fragment", + "value" : 4, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "GLCompute", + "value" : 5, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Kernel", + "value" : 6, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "AddressingModel", + "enumerants" : [ + { + "enumerant" : "Logical", + "value" : 0 + }, + { + "enumerant" : "Physical32", + "value" : 1, + "capabilities" : [ "Addresses" ] + }, + { + "enumerant" : "Physical64", + "value" : 2, + "capabilities" : [ "Addresses" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "MemoryModel", + "enumerants" : [ + { + "enumerant" : "Simple", + "value" : 0, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "GLSL450", + "value" : 1, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "OpenCL", + "value" : 2, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ExecutionMode", + "enumerants" : [ + { + "enumerant" : "Invocations", + "value" : 0, + "capabilities" : [ "Geometry" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Number of <>'" } + ] + }, + { + "enumerant" : "SpacingEqual", + "value" : 1, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "SpacingFractionalEven", + "value" : 2, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "SpacingFractionalOdd", + "value" : 3, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "VertexOrderCw", + "value" : 4, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "VertexOrderCcw", + "value" : 5, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "PixelCenterInteger", + "value" : 6, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "OriginUpperLeft", + "value" : 7, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "OriginLowerLeft", + "value" : 8, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "EarlyFragmentTests", + "value" : 9, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "PointMode", + "value" : 10, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "Xfb", + "value" : 11, + "capabilities" : [ "TransformFeedback" ] + }, + { + "enumerant" : "DepthReplacing", + "value" : 12, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "DepthGreater", + "value" : 14, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "DepthLess", + "value" : 15, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "DepthUnchanged", + "value" : 16, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "LocalSize", + "value" : 17, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'x size'" }, + { "kind" : "LiteralInteger", "name" : "'y size'" }, + { "kind" : "LiteralInteger", "name" : "'z size'" } + ] + }, + { + "enumerant" : "LocalSizeHint", + "value" : 18, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'x size'" }, + { "kind" : "LiteralInteger", "name" : "'y size'" }, + { "kind" : "LiteralInteger", "name" : "'z size'" } + ] + }, + { + "enumerant" : "InputPoints", + "value" : 19, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "InputLines", + "value" : 20, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "InputLinesAdjacency", + "value" : 21, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "Triangles", + "value" : 22, + "capabilities" : [ "Geometry", "Tessellation" ] + }, + { + "enumerant" : "InputTrianglesAdjacency", + "value" : 23, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "Quads", + "value" : 24, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "Isolines", + "value" : 25, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "OutputVertices", + "value" : 26, + "capabilities" : [ "Geometry", "Tessellation" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Vertex count'" } + ] + }, + { + "enumerant" : "OutputPoints", + "value" : 27, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "OutputLineStrip", + "value" : 28, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "OutputTriangleStrip", + "value" : 29, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "VecTypeHint", + "value" : 30, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Vector type'" } + ] + }, + { + "enumerant" : "ContractionOff", + "value" : 31, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Initializer", + "value" : 33, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "Finalizer", + "value" : 34, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupSize", + "value" : 35, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Subgroup Size'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupsPerWorkgroup", + "value" : 36, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Subgroups Per Workgroup'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupsPerWorkgroupId", + "value" : 37, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Subgroups Per Workgroup'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "LocalSizeId", + "value" : 38, + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "LocalSizeHintId", + "value" : 39, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Local Size Hint'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "PostDepthCoverage", + "value" : 4446, + "capabilities" : [ "SampleMaskPostDepthCoverage" ], + "extensions" : [ "SPV_KHR_post_depth_coverage" ], + "version" : "None" + }, + { + "enumerant" : "StencilRefReplacingEXT", + "value" : 5027, + "capabilities" : [ "StencilExportEXT" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "StorageClass", + "enumerants" : [ + { + "enumerant" : "UniformConstant", + "value" : 0 + }, + { + "enumerant" : "Input", + "value" : 1 + }, + { + "enumerant" : "Uniform", + "value" : 2, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Output", + "value" : 3, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Workgroup", + "value" : 4 + }, + { + "enumerant" : "CrossWorkgroup", + "value" : 5 + }, + { + "enumerant" : "Private", + "value" : 6, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Function", + "value" : 7 + }, + { + "enumerant" : "Generic", + "value" : 8, + "capabilities" : [ "GenericPointer" ] + }, + { + "enumerant" : "PushConstant", + "value" : 9, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "AtomicCounter", + "value" : 10, + "capabilities" : [ "AtomicStorage" ] + }, + { + "enumerant" : "Image", + "value" : 11 + }, + { + "enumerant" : "StorageBuffer", + "value" : 12, + "extensions" : [ + "SPV_KHR_storage_buffer_storage_class", + "SPV_KHR_variable_pointers" + ], + "capabilities" : [ "Shader" ], + "version" : "1.3" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Dim", + "enumerants" : [ + { + "enumerant" : "1D", + "value" : 0, + "capabilities" : [ "Sampled1D" ] + }, + { + "enumerant" : "2D", + "value" : 1 + }, + { + "enumerant" : "3D", + "value" : 2 + }, + { + "enumerant" : "Cube", + "value" : 3, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rect", + "value" : 4, + "capabilities" : [ "SampledRect" ] + }, + { + "enumerant" : "Buffer", + "value" : 5, + "capabilities" : [ "SampledBuffer" ] + }, + { + "enumerant" : "SubpassData", + "value" : 6, + "capabilities" : [ "InputAttachment" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SamplerAddressingMode", + "enumerants" : [ + { + "enumerant" : "None", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ClampToEdge", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Clamp", + "value" : 2, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Repeat", + "value" : 3, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RepeatMirrored", + "value" : 4, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SamplerFilterMode", + "enumerants" : [ + { + "enumerant" : "Nearest", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Linear", + "value" : 1, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageFormat", + "enumerants" : [ + { + "enumerant" : "Unknown", + "value" : 0 + }, + { + "enumerant" : "Rgba32f", + "value" : 1, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba16f", + "value" : 2, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "R32f", + "value" : 3, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba8", + "value" : 4, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba8Snorm", + "value" : 5, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rg32f", + "value" : 6, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg16f", + "value" : 7, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R11fG11fB10f", + "value" : 8, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R16f", + "value" : 9, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rgba16", + "value" : 10, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rgb10A2", + "value" : 11, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg16", + "value" : 12, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg8", + "value" : 13, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R16", + "value" : 14, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R8", + "value" : 15, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rgba16Snorm", + "value" : 16, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg16Snorm", + "value" : 17, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg8Snorm", + "value" : 18, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R16Snorm", + "value" : 19, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R8Snorm", + "value" : 20, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rgba32i", + "value" : 21, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba16i", + "value" : 22, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba8i", + "value" : 23, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "R32i", + "value" : 24, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rg32i", + "value" : 25, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg16i", + "value" : 26, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg8i", + "value" : 27, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R16i", + "value" : 28, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R8i", + "value" : 29, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rgba32ui", + "value" : 30, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba16ui", + "value" : 31, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgba8ui", + "value" : 32, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "R32ui", + "value" : 33, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Rgb10a2ui", + "value" : 34, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg32ui", + "value" : 35, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg16ui", + "value" : 36, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "Rg8ui", + "value" : 37, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R16ui", + "value" : 38, + "capabilities" : [ "StorageImageExtendedFormats" ] + }, + { + "enumerant" : "R8ui", + "value" : 39, + "capabilities" : [ "StorageImageExtendedFormats" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageChannelOrder", + "enumerants" : [ + { + "enumerant" : "R", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "A", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RG", + "value" : 2, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RA", + "value" : 3, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RGB", + "value" : 4, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RGBA", + "value" : 5, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "BGRA", + "value" : 6, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ARGB", + "value" : 7, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Intensity", + "value" : 8, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Luminance", + "value" : 9, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Rx", + "value" : 10, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RGx", + "value" : 11, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "RGBx", + "value" : 12, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Depth", + "value" : 13, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "DepthStencil", + "value" : 14, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "sRGB", + "value" : 15, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "sRGBx", + "value" : 16, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "sRGBA", + "value" : 17, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "sBGRA", + "value" : 18, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ABGR", + "value" : 19, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageChannelDataType", + "enumerants" : [ + { + "enumerant" : "SnormInt8", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SnormInt16", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormInt8", + "value" : 2, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormInt16", + "value" : 3, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormShort565", + "value" : 4, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormShort555", + "value" : 5, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormInt101010", + "value" : 6, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SignedInt8", + "value" : 7, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SignedInt16", + "value" : 8, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SignedInt32", + "value" : 9, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnsignedInt8", + "value" : 10, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnsignedInt16", + "value" : 11, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnsignedInt32", + "value" : 12, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "HalfFloat", + "value" : 13, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Float", + "value" : 14, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormInt24", + "value" : 15, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "UnormInt101010_2", + "value" : 16, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FPRoundingMode", + "enumerants" : [ + { + "enumerant" : "RTE", + "value" : 0 + }, + { + "enumerant" : "RTZ", + "value" : 1 + }, + { + "enumerant" : "RTP", + "value" : 2 + }, + { + "enumerant" : "RTN", + "value" : 3 + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "LinkageType", + "enumerants" : [ + { + "enumerant" : "Export", + "value" : 0, + "capabilities" : [ "Linkage" ] + }, + { + "enumerant" : "Import", + "value" : 1, + "capabilities" : [ "Linkage" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "AccessQualifier", + "enumerants" : [ + { + "enumerant" : "ReadOnly", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "WriteOnly", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ReadWrite", + "value" : 2, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FunctionParameterAttribute", + "enumerants" : [ + { + "enumerant" : "Zext", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Sext", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ByVal", + "value" : 2, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Sret", + "value" : 3, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NoAlias", + "value" : 4, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NoCapture", + "value" : 5, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NoWrite", + "value" : 6, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NoReadWrite", + "value" : 7, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Decoration", + "enumerants" : [ + { + "enumerant" : "RelaxedPrecision", + "value" : 0, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SpecId", + "value" : 1, + "capabilities" : [ "Shader", "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Specialization Constant ID'" } + ] + }, + { + "enumerant" : "Block", + "value" : 2, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "BufferBlock", + "value" : 3, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "RowMajor", + "value" : 4, + "capabilities" : [ "Matrix" ] + }, + { + "enumerant" : "ColMajor", + "value" : 5, + "capabilities" : [ "Matrix" ] + }, + { + "enumerant" : "ArrayStride", + "value" : 6, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Array Stride'" } + ] + }, + { + "enumerant" : "MatrixStride", + "value" : 7, + "capabilities" : [ "Matrix" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Matrix Stride'" } + ] + }, + { + "enumerant" : "GLSLShared", + "value" : 8, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "GLSLPacked", + "value" : 9, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "CPacked", + "value" : 10, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "BuiltIn", + "value" : 11, + "parameters" : [ + { "kind" : "BuiltIn" } + ] + }, + { + "enumerant" : "NoPerspective", + "value" : 13, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Flat", + "value" : 14, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Patch", + "value" : 15, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "Centroid", + "value" : 16, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Sample", + "value" : 17, + "capabilities" : [ "SampleRateShading" ] + }, + { + "enumerant" : "Invariant", + "value" : 18, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Restrict", + "value" : 19 + }, + { + "enumerant" : "Aliased", + "value" : 20 + }, + { + "enumerant" : "Volatile", + "value" : 21 + }, + { + "enumerant" : "Constant", + "value" : 22, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Coherent", + "value" : 23 + }, + { + "enumerant" : "NonWritable", + "value" : 24 + }, + { + "enumerant" : "NonReadable", + "value" : 25 + }, + { + "enumerant" : "Uniform", + "value" : 26, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SaturatedConversion", + "value" : 28, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Stream", + "value" : 29, + "capabilities" : [ "GeometryStreams" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Stream Number'" } + ] + }, + { + "enumerant" : "Location", + "value" : 30, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Location'" } + ] + }, + { + "enumerant" : "Component", + "value" : 31, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Component'" } + ] + }, + { + "enumerant" : "Index", + "value" : 32, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Index'" } + ] + }, + { + "enumerant" : "Binding", + "value" : 33, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Binding Point'" } + ] + }, + { + "enumerant" : "DescriptorSet", + "value" : 34, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Descriptor Set'" } + ] + }, + { + "enumerant" : "Offset", + "value" : 35, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Byte Offset'" } + ] + }, + { + "enumerant" : "XfbBuffer", + "value" : 36, + "capabilities" : [ "TransformFeedback" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'XFB Buffer Number'" } + ] + }, + { + "enumerant" : "XfbStride", + "value" : 37, + "capabilities" : [ "TransformFeedback" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'XFB Stride'" } + ] + }, + { + "enumerant" : "FuncParamAttr", + "value" : 38, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "FunctionParameterAttribute", "name" : "'Function Parameter Attribute'" } + ] + }, + { + "enumerant" : "FPRoundingMode", + "value" : 39, + "parameters" : [ + { "kind" : "FPRoundingMode", "name" : "'Floating-Point Rounding Mode'" } + ] + }, + { + "enumerant" : "FPFastMathMode", + "value" : 40, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "FPFastMathMode", "name" : "'Fast-Math Mode'" } + ] + }, + { + "enumerant" : "LinkageAttributes", + "value" : 41, + "capabilities" : [ "Linkage" ], + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Name'" }, + { "kind" : "LinkageType", "name" : "'Linkage Type'" } + ] + }, + { + "enumerant" : "NoContraction", + "value" : 42, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "InputAttachmentIndex", + "value" : 43, + "capabilities" : [ "InputAttachment" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Attachment Index'" } + ] + }, + { + "enumerant" : "Alignment", + "value" : 44, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Alignment'" } + ] + }, + { + "enumerant" : "MaxByteOffset", + "value" : 45, + "capabilities" : [ "Addresses" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Max Byte Offset'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "AlignmentId", + "value" : 46, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Alignment'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "MaxByteOffsetId", + "value" : 47, + "capabilities" : [ "Addresses" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Max Byte Offset'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "ExplicitInterpAMD", + "value" : 4999, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "OverrideCoverageNV", + "value" : 5248, + "capabilities" : [ "SampleMaskOverrideCoverageNV" ], + "version" : "None" + }, + { + "enumerant" : "PassthroughNV", + "value" : 5250, + "capabilities" : [ "GeometryShaderPassthroughNV" ], + "version" : "None" + }, + { + "enumerant" : "ViewportRelativeNV", + "value" : 5252, + "capabilities" : [ "ShaderViewportMaskNV" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryViewportRelativeNV", + "value" : 5256, + "capabilities" : [ "ShaderStereoViewNV" ], + "version" : "None", + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Offset'" } + ] + }, + { + "enumerant" : "NonUniformEXT", + "value" : 5300, + "capabilities" : [ "ShaderNonUniformEXT" ] + }, + { + "enumerant" : "HlslCounterBufferGOOGLE", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + }, + { + "enumerant" : "HlslSemanticGOOGLE", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "BuiltIn", + "enumerants" : [ + { + "enumerant" : "Position", + "value" : 0, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "PointSize", + "value" : 1, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "ClipDistance", + "value" : 3, + "capabilities" : [ "ClipDistance" ] + }, + { + "enumerant" : "CullDistance", + "value" : 4, + "capabilities" : [ "CullDistance" ] + }, + { + "enumerant" : "VertexId", + "value" : 5, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "InstanceId", + "value" : 6, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "PrimitiveId", + "value" : 7, + "capabilities" : [ "Geometry", "Tessellation" ] + }, + { + "enumerant" : "InvocationId", + "value" : 8, + "capabilities" : [ "Geometry", "Tessellation" ] + }, + { + "enumerant" : "Layer", + "value" : 9, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "ViewportIndex", + "value" : 10, + "capabilities" : [ "MultiViewport" ] + }, + { + "enumerant" : "TessLevelOuter", + "value" : 11, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "TessLevelInner", + "value" : 12, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "TessCoord", + "value" : 13, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "PatchVertices", + "value" : 14, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "FragCoord", + "value" : 15, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "PointCoord", + "value" : 16, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "FrontFacing", + "value" : 17, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SampleId", + "value" : 18, + "capabilities" : [ "SampleRateShading" ] + }, + { + "enumerant" : "SamplePosition", + "value" : 19, + "capabilities" : [ "SampleRateShading" ] + }, + { + "enumerant" : "SampleMask", + "value" : 20, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "FragDepth", + "value" : 22, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "HelperInvocation", + "value" : 23, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "NumWorkgroups", + "value" : 24 + }, + { + "enumerant" : "WorkgroupSize", + "value" : 25 + }, + { + "enumerant" : "WorkgroupId", + "value" : 26 + }, + { + "enumerant" : "LocalInvocationId", + "value" : 27 + }, + { + "enumerant" : "GlobalInvocationId", + "value" : 28 + }, + { + "enumerant" : "LocalInvocationIndex", + "value" : 29 + }, + { + "enumerant" : "WorkDim", + "value" : 30, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "GlobalSize", + "value" : 31, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "EnqueuedWorkgroupSize", + "value" : 32, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "GlobalOffset", + "value" : 33, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "GlobalLinearId", + "value" : 34, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SubgroupSize", + "value" : 36, + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ] + }, + { + "enumerant" : "SubgroupMaxSize", + "value" : 37, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "NumSubgroups", + "value" : 38, + "capabilities" : [ "Kernel", "GroupNonUniform" ] + }, + { + "enumerant" : "NumEnqueuedSubgroups", + "value" : 39, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "SubgroupId", + "value" : 40, + "capabilities" : [ "Kernel", "GroupNonUniform" ] + }, + { + "enumerant" : "SubgroupLocalInvocationId", + "value" : 41, + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ] + }, + { + "enumerant" : "VertexIndex", + "value" : 42, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "InstanceIndex", + "value" : 43, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SubgroupEqMask", + "value" : 4416, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGeMask", + "value" : 4417, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGtMask", + "value" : 4418, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLeMask", + "value" : 4419, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLtMask", + "value" : 4420, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupEqMaskKHR", + "value" : 4416, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGeMaskKHR", + "value" : 4417, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGtMaskKHR", + "value" : 4418, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLeMaskKHR", + "value" : 4419, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLtMaskKHR", + "value" : 4420, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "BaseVertex", + "value" : 4424, + "capabilities" : [ "DrawParameters" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "BaseInstance", + "value" : 4425, + "capabilities" : [ "DrawParameters" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "DrawIndex", + "value" : 4426, + "capabilities" : [ "DrawParameters" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "DeviceIndex", + "value" : 4438, + "capabilities" : [ "DeviceGroup" ], + "extensions" : [ "SPV_KHR_device_group" ], + "version" : "1.3" + }, + { + "enumerant" : "ViewIndex", + "value" : 4440, + "capabilities" : [ "MultiView" ], + "extensions" : [ "SPV_KHR_multiview" ], + "version" : "1.3" + }, + { + "enumerant" : "BaryCoordNoPerspAMD", + "value" : 4992, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspCentroidAMD", + "value" : 4993, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspSampleAMD", + "value" : 4994, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothAMD", + "value" : 4995, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothCentroidAMD", + "value" : 4996, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothSampleAMD", + "value" : 4997, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordPullModelAMD", + "value" : 4998, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "FragStencilRefEXT", + "value" : 5014, + "capabilities" : [ "StencilExportEXT" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + }, + { + "enumerant" : "ViewportMaskNV", + "value" : 5253, + "capabilities" : [ "ShaderViewportMaskNV" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryPositionNV", + "value" : 5257, + "capabilities" : [ "ShaderStereoViewNV" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryViewportMaskNV", + "value" : 5258, + "capabilities" : [ "ShaderStereoViewNV" ], + "version" : "None" + }, + { + "enumerant" : "PositionPerViewNV", + "value" : 5261, + "capabilities" : [ "PerViewAttributesNV" ], + "version" : "None" + }, + { + "enumerant" : "ViewportMaskPerViewNV", + "value" : 5262, + "capabilities" : [ "PerViewAttributesNV" ], + "version" : "None" + }, + { + "enumerant" : "FullyCoveredEXT", + "value" : 5264, + "capabilities" : [ "FragmentFullyCoveredEXT" ], + "extensions" : [ "SPV_EXT_fragment_fully_covered" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Scope", + "enumerants" : [ + { + "enumerant" : "CrossDevice", + "value" : 0 + }, + { + "enumerant" : "Device", + "value" : 1 + }, + { + "enumerant" : "Workgroup", + "value" : 2 + }, + { + "enumerant" : "Subgroup", + "value" : 3 + }, + { + "enumerant" : "Invocation", + "value" : 4 + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "GroupOperation", + "enumerants" : [ + { + "enumerant" : "Reduce", + "value" : 0, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + }, + { + "enumerant" : "InclusiveScan", + "value" : 1, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + }, + { + "enumerant" : "ExclusiveScan", + "value" : 2, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + }, + { + "enumerant" : "ClusteredReduce", + "value" : 3, + "capabilities" : [ "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "enumerant" : "PartitionedReduceNV", + "value" : 6, + "capabilities" : [ "GroupNonUniformPartitionedNV" ] + }, + { + "enumerant" : "PartitionedInclusiveScanNV", + "value" : 7, + "capabilities" : [ "GroupNonUniformPartitionedNV" ] + }, + { + "enumerant" : "PartitionedExclusiveScanNV", + "value" : 8, + "capabilities" : [ "GroupNonUniformPartitionedNV" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "KernelEnqueueFlags", + "enumerants" : [ + { + "enumerant" : "NoWait", + "value" : 0, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "WaitKernel", + "value" : 1, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "WaitWorkGroup", + "value" : 2, + "capabilities" : [ "Kernel" ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Capability", + "enumerants" : [ + { + "enumerant" : "Matrix", + "value" : 0 + }, + { + "enumerant" : "Shader", + "value" : 1, + "capabilities" : [ "Matrix" ] + }, + { + "enumerant" : "Geometry", + "value" : 2, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Tessellation", + "value" : 3, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Addresses", + "value" : 4 + }, + { + "enumerant" : "Linkage", + "value" : 5 + }, + { + "enumerant" : "Kernel", + "value" : 6 + }, + { + "enumerant" : "Vector16", + "value" : 7, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Float16Buffer", + "value" : 8, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Float16", + "value" : 9 + }, + { + "enumerant" : "Float64", + "value" : 10 + }, + { + "enumerant" : "Int64", + "value" : 11 + }, + { + "enumerant" : "Int64Atomics", + "value" : 12, + "capabilities" : [ "Int64" ] + }, + { + "enumerant" : "ImageBasic", + "value" : 13, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "ImageReadWrite", + "value" : 14, + "capabilities" : [ "ImageBasic" ] + }, + { + "enumerant" : "ImageMipmap", + "value" : 15, + "capabilities" : [ "ImageBasic" ] + }, + { + "enumerant" : "Pipes", + "value" : 17, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "Groups", + "value" : 18 + }, + { + "enumerant" : "DeviceEnqueue", + "value" : 19, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "LiteralSampler", + "value" : 20, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "AtomicStorage", + "value" : 21, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Int16", + "value" : 22 + }, + { + "enumerant" : "TessellationPointSize", + "value" : 23, + "capabilities" : [ "Tessellation" ] + }, + { + "enumerant" : "GeometryPointSize", + "value" : 24, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "ImageGatherExtended", + "value" : 25, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "StorageImageMultisample", + "value" : 27, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "UniformBufferArrayDynamicIndexing", + "value" : 28, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SampledImageArrayDynamicIndexing", + "value" : 29, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "StorageBufferArrayDynamicIndexing", + "value" : 30, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "StorageImageArrayDynamicIndexing", + "value" : 31, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "ClipDistance", + "value" : 32, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "CullDistance", + "value" : 33, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "ImageCubeArray", + "value" : 34, + "capabilities" : [ "SampledCubeArray" ] + }, + { + "enumerant" : "SampleRateShading", + "value" : 35, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "ImageRect", + "value" : 36, + "capabilities" : [ "SampledRect" ] + }, + { + "enumerant" : "SampledRect", + "value" : 37, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "GenericPointer", + "value" : 38, + "capabilities" : [ "Addresses" ] + }, + { + "enumerant" : "Int8", + "value" : 39, + "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "InputAttachment", + "value" : 40, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SparseResidency", + "value" : 41, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "MinLod", + "value" : 42, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "Sampled1D", + "value" : 43 + }, + { + "enumerant" : "Image1D", + "value" : 44, + "capabilities" : [ "Sampled1D" ] + }, + { + "enumerant" : "SampledCubeArray", + "value" : 45, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "SampledBuffer", + "value" : 46 + }, + { + "enumerant" : "ImageBuffer", + "value" : 47, + "capabilities" : [ "SampledBuffer" ] + }, + { + "enumerant" : "ImageMSArray", + "value" : 48, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "StorageImageExtendedFormats", + "value" : 49, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "ImageQuery", + "value" : 50, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "DerivativeControl", + "value" : 51, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "InterpolationFunction", + "value" : 52, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "TransformFeedback", + "value" : 53, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "GeometryStreams", + "value" : 54, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "StorageImageReadWithoutFormat", + "value" : 55, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "StorageImageWriteWithoutFormat", + "value" : 56, + "capabilities" : [ "Shader" ] + }, + { + "enumerant" : "MultiViewport", + "value" : 57, + "capabilities" : [ "Geometry" ] + }, + { + "enumerant" : "SubgroupDispatch", + "value" : 58, + "capabilities" : [ "DeviceEnqueue" ], + "version" : "1.1" + }, + { + "enumerant" : "NamedBarrier", + "value" : 59, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "PipeStorage", + "value" : 60, + "capabilities" : [ "Pipes" ], + "version" : "1.1" + }, + { + "enumerant" : "GroupNonUniform", + "value" : 61, + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformVote", + "value" : 62, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformArithmetic", + "value" : 63, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformBallot", + "value" : 64, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformShuffle", + "value" : 65, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformShuffleRelative", + "value" : 66, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformClustered", + "value" : 67, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformQuad", + "value" : 68, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupBallotKHR", + "value" : 4423, + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "enumerant" : "DrawParameters", + "value" : 4427, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupVoteKHR", + "value" : 4431, + "extensions" : [ "SPV_KHR_subgroup_vote" ], + "version" : "None" + }, + { + "enumerant" : "StorageBuffer16BitAccess", + "value" : 4433, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageUniformBufferBlock16", + "value" : 4433, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "UniformAndStorageBuffer16BitAccess", + "value" : 4434, + "capabilities" : [ + "StorageBuffer16BitAccess", + "StorageUniformBufferBlock16" + ], + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageUniform16", + "value" : 4434, + "capabilities" : [ + "StorageBuffer16BitAccess", + "StorageUniformBufferBlock16" + ], + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StoragePushConstant16", + "value" : 4435, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageInputOutput16", + "value" : 4436, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "DeviceGroup", + "value" : 4437, + "extensions" : [ "SPV_KHR_device_group" ], + "version" : "1.3" + }, + { + "enumerant" : "MultiView", + "value" : 4439, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_multiview" ], + "version" : "1.3" + }, + { + "enumerant" : "VariablePointersStorageBuffer", + "value" : 4441, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_variable_pointers" ], + "version" : "1.3" + }, + { + "enumerant" : "VariablePointers", + "value" : 4442, + "capabilities" : [ "VariablePointersStorageBuffer" ], + "extensions" : [ "SPV_KHR_variable_pointers" ], + "version" : "1.3" + }, + { + "enumerant" : "AtomicStorageOps", + "value" : 4445, + "extensions" : [ "SPV_KHR_shader_atomic_counter_ops" ], + "version" : "None" + }, + { + "enumerant" : "SampleMaskPostDepthCoverage", + "value" : 4447, + "extensions" : [ "SPV_KHR_post_depth_coverage" ], + "version" : "None" + }, + { + "enumerant" : "Float16ImageAMD", + "value" : 5008, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_gpu_shader_half_float_fetch" ], + "version" : "None" + }, + { + "enumerant" : "ImageGatherBiasLodAMD", + "value" : 5009, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_texture_gather_bias_lod" ], + "version" : "None" + }, + { + "enumerant" : "FragmentMaskAMD", + "value" : 5010, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "enumerant" : "StencilExportEXT", + "value" : 5013, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + }, + { + "enumerant" : "ImageReadWriteLodAMD", + "value" : 5015, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_shader_image_load_store_lod" ], + "version" : "None" + }, + { + "enumerant" : "SampleMaskOverrideCoverageNV", + "value" : 5249, + "capabilities" : [ "SampleRateShading" ], + "extensions" : [ "SPV_NV_sample_mask_override_coverage" ], + "version" : "None" + }, + { + "enumerant" : "GeometryShaderPassthroughNV", + "value" : 5251, + "capabilities" : [ "Geometry" ], + "extensions" : [ "SPV_NV_geometry_shader_passthrough" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportIndexLayerEXT", + "value" : 5254, + "capabilities" : [ "MultiViewport" ], + "extensions" : [ "SPV_EXT_shader_viewport_index_layer" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportIndexLayerNV", + "value" : 5254, + "capabilities" : [ "MultiViewport" ], + "extensions" : [ "SPV_NV_viewport_array2" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportMaskNV", + "value" : 5255, + "capabilities" : [ "ShaderViewportIndexLayerNV" ], + "extensions" : [ "SPV_NV_viewport_array2" ], + "version" : "None" + }, + { + "enumerant" : "ShaderStereoViewNV", + "value" : 5259, + "capabilities" : [ "ShaderViewportMaskNV" ], + "extensions" : [ "SPV_NV_stereo_view_rendering" ], + "version" : "None" + }, + { + "enumerant" : "PerViewAttributesNV", + "value" : 5260, + "capabilities" : [ "MultiView" ], + "extensions" : [ "SPV_NVX_multiview_per_view_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FragmentFullyCoveredEXT", + "value" : 5265, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_fully_covered" ], + "version" : "None" + }, + { + "enumerant" : "ShaderNonUniformEXT", + "value" : 5301, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "RuntimeDescriptorArrayEXT", + "value" : 5302, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "InputAttachmentArrayDynamicIndexingEXT", + "value" : 5303, + "capabilities" : [ "InputAttachment" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "UniformTexelBufferArrayDynamicIndexingEXT", + "value" : 5304, + "capabilities" : [ "SampledBuffer" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "StorageTexelBufferArrayDynamicIndexingEXT", + "value" : 5305, + "capabilities" : [ "ImageBuffer" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "UniformBufferArrayNonUniformIndexingEXT", + "value" : 5306, + "capabilities" : [ "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "SampledImageArrayNonUniformIndexingEXT", + "value" : 5307, + "capabilities" : [ "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "StorageBufferArrayNonUniformIndexingEXT", + "value" : 5308, + "capabilities" : [ "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "StorageImageArrayNonUniformIndexingEXT", + "value" : 5309, + "capabilities" : [ "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "InputAttachmentArrayNonUniformIndexingEXT", + "value" : 5310, + "capabilities" : [ "InputAttachment", "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "UniformTexelBufferArrayNonUniformIndexingEXT", + "value" : 5311, + "capabilities" : [ "SampledBuffer", "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "StorageTexelBufferArrayNonUniformIndexingEXT", + "value" : 5312, + "capabilities" : [ "ImageBuffer", "ShaderNonUniformEXT" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupShuffleINTEL", + "value" : 5568, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupBufferBlockIOINTEL", + "value" : 5569, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupImageBlockIOINTEL", + "value" : 5570, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "GroupNonUniformPartitionedNV", + "value" : 5297, + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + } + ] + }, + { + "category" : "Id", + "kind" : "IdResultType", + "doc" : "Reference to an representing the result's type of the enclosing instruction" + }, + { + "category" : "Id", + "kind" : "IdResult", + "doc" : "Definition of an representing the result of the enclosing instruction" + }, + { + "category" : "Id", + "kind" : "IdMemorySemantics", + "doc" : "Reference to an representing a 32-bit integer that is a mask from the MemorySemantics operand kind" + }, + { + "category" : "Id", + "kind" : "IdScope", + "doc" : "Reference to an representing a 32-bit integer that is a mask from the Scope operand kind" + }, + { + "category" : "Id", + "kind" : "IdRef", + "doc" : "Reference to an " + }, + { + "category" : "Literal", + "kind" : "LiteralInteger", + "doc" : "An integer consuming one or more words" + }, + { + "category" : "Literal", + "kind" : "LiteralString", + "doc" : "A null-terminated stream of characters consuming an integral number of words" + }, + { + "category" : "Literal", + "kind" : "LiteralContextDependentNumber", + "doc" : "A literal number whose size and format are determined by a previous operand in the enclosing instruction" + }, + { + "category" : "Literal", + "kind" : "LiteralExtInstInteger", + "doc" : "A 32-bit unsigned integer indicating which instruction to use and determining the layout of following operands (for OpExtInst)" + }, + { + "category" : "Literal", + "kind" : "LiteralSpecConstantOpInteger", + "doc" : "An opcode indicating the operation to be performed and determining the layout of following operands (for OpSpecConstantOp)" + }, + { + "category" : "Composite", + "kind" : "PairLiteralIntegerIdRef", + "bases" : [ "LiteralInteger", "IdRef" ] + }, + { + "category" : "Composite", + "kind" : "PairIdRefLiteralInteger", + "bases" : [ "IdRef", "LiteralInteger" ] + }, + { + "category" : "Composite", + "kind" : "PairIdRefIdRef", + "bases" : [ "IdRef", "IdRef" ] + } + ] +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h new file mode 100644 index 0000000000000000000000000000000000000000..e0a0330ba63fd75c77ce3a842e171727263bc792 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h @@ -0,0 +1,1090 @@ +/* +** Copyright (c) 2014-2018 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +/* +** This header is automatically generated by the same tool that creates +** the Binary Section of the SPIR-V specification. +*/ + +/* +** Enumeration tokens for SPIR-V, in various styles: +** C, C++, C++11, JSON, Lua, Python +** +** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +** +** Some tokens act like mask values, which can be OR'd together, +** while others are mutually exclusive. The mask-like ones have +** "Mask" in their name, and a parallel enum that has the shift +** amount (1 << x) for each corresponding enumerant. +*/ + +#ifndef spirv_H +#define spirv_H + +typedef unsigned int SpvId; + +#define SPV_VERSION 0x10300 +#define SPV_REVISION 1 + +static const unsigned int SpvMagicNumber = 0x07230203; +static const unsigned int SpvVersion = 0x00010300; +static const unsigned int SpvRevision = 1; +static const unsigned int SpvOpCodeMask = 0xffff; +static const unsigned int SpvWordCountShift = 16; + +typedef enum SpvSourceLanguage_ { + SpvSourceLanguageUnknown = 0, + SpvSourceLanguageESSL = 1, + SpvSourceLanguageGLSL = 2, + SpvSourceLanguageOpenCL_C = 3, + SpvSourceLanguageOpenCL_CPP = 4, + SpvSourceLanguageHLSL = 5, + SpvSourceLanguageMax = 0x7fffffff, +} SpvSourceLanguage; + +typedef enum SpvExecutionModel_ { + SpvExecutionModelVertex = 0, + SpvExecutionModelTessellationControl = 1, + SpvExecutionModelTessellationEvaluation = 2, + SpvExecutionModelGeometry = 3, + SpvExecutionModelFragment = 4, + SpvExecutionModelGLCompute = 5, + SpvExecutionModelKernel = 6, + SpvExecutionModelMax = 0x7fffffff, +} SpvExecutionModel; + +typedef enum SpvAddressingModel_ { + SpvAddressingModelLogical = 0, + SpvAddressingModelPhysical32 = 1, + SpvAddressingModelPhysical64 = 2, + SpvAddressingModelMax = 0x7fffffff, +} SpvAddressingModel; + +typedef enum SpvMemoryModel_ { + SpvMemoryModelSimple = 0, + SpvMemoryModelGLSL450 = 1, + SpvMemoryModelOpenCL = 2, + SpvMemoryModelMax = 0x7fffffff, +} SpvMemoryModel; + +typedef enum SpvExecutionMode_ { + SpvExecutionModeInvocations = 0, + SpvExecutionModeSpacingEqual = 1, + SpvExecutionModeSpacingFractionalEven = 2, + SpvExecutionModeSpacingFractionalOdd = 3, + SpvExecutionModeVertexOrderCw = 4, + SpvExecutionModeVertexOrderCcw = 5, + SpvExecutionModePixelCenterInteger = 6, + SpvExecutionModeOriginUpperLeft = 7, + SpvExecutionModeOriginLowerLeft = 8, + SpvExecutionModeEarlyFragmentTests = 9, + SpvExecutionModePointMode = 10, + SpvExecutionModeXfb = 11, + SpvExecutionModeDepthReplacing = 12, + SpvExecutionModeDepthGreater = 14, + SpvExecutionModeDepthLess = 15, + SpvExecutionModeDepthUnchanged = 16, + SpvExecutionModeLocalSize = 17, + SpvExecutionModeLocalSizeHint = 18, + SpvExecutionModeInputPoints = 19, + SpvExecutionModeInputLines = 20, + SpvExecutionModeInputLinesAdjacency = 21, + SpvExecutionModeTriangles = 22, + SpvExecutionModeInputTrianglesAdjacency = 23, + SpvExecutionModeQuads = 24, + SpvExecutionModeIsolines = 25, + SpvExecutionModeOutputVertices = 26, + SpvExecutionModeOutputPoints = 27, + SpvExecutionModeOutputLineStrip = 28, + SpvExecutionModeOutputTriangleStrip = 29, + SpvExecutionModeVecTypeHint = 30, + SpvExecutionModeContractionOff = 31, + SpvExecutionModeInitializer = 33, + SpvExecutionModeFinalizer = 34, + SpvExecutionModeSubgroupSize = 35, + SpvExecutionModeSubgroupsPerWorkgroup = 36, + SpvExecutionModeSubgroupsPerWorkgroupId = 37, + SpvExecutionModeLocalSizeId = 38, + SpvExecutionModeLocalSizeHintId = 39, + SpvExecutionModePostDepthCoverage = 4446, + SpvExecutionModeStencilRefReplacingEXT = 5027, + SpvExecutionModeMax = 0x7fffffff, +} SpvExecutionMode; + +typedef enum SpvStorageClass_ { + SpvStorageClassUniformConstant = 0, + SpvStorageClassInput = 1, + SpvStorageClassUniform = 2, + SpvStorageClassOutput = 3, + SpvStorageClassWorkgroup = 4, + SpvStorageClassCrossWorkgroup = 5, + SpvStorageClassPrivate = 6, + SpvStorageClassFunction = 7, + SpvStorageClassGeneric = 8, + SpvStorageClassPushConstant = 9, + SpvStorageClassAtomicCounter = 10, + SpvStorageClassImage = 11, + SpvStorageClassStorageBuffer = 12, + SpvStorageClassMax = 0x7fffffff, +} SpvStorageClass; + +typedef enum SpvDim_ { + SpvDim1D = 0, + SpvDim2D = 1, + SpvDim3D = 2, + SpvDimCube = 3, + SpvDimRect = 4, + SpvDimBuffer = 5, + SpvDimSubpassData = 6, + SpvDimMax = 0x7fffffff, +} SpvDim; + +typedef enum SpvSamplerAddressingMode_ { + SpvSamplerAddressingModeNone = 0, + SpvSamplerAddressingModeClampToEdge = 1, + SpvSamplerAddressingModeClamp = 2, + SpvSamplerAddressingModeRepeat = 3, + SpvSamplerAddressingModeRepeatMirrored = 4, + SpvSamplerAddressingModeMax = 0x7fffffff, +} SpvSamplerAddressingMode; + +typedef enum SpvSamplerFilterMode_ { + SpvSamplerFilterModeNearest = 0, + SpvSamplerFilterModeLinear = 1, + SpvSamplerFilterModeMax = 0x7fffffff, +} SpvSamplerFilterMode; + +typedef enum SpvImageFormat_ { + SpvImageFormatUnknown = 0, + SpvImageFormatRgba32f = 1, + SpvImageFormatRgba16f = 2, + SpvImageFormatR32f = 3, + SpvImageFormatRgba8 = 4, + SpvImageFormatRgba8Snorm = 5, + SpvImageFormatRg32f = 6, + SpvImageFormatRg16f = 7, + SpvImageFormatR11fG11fB10f = 8, + SpvImageFormatR16f = 9, + SpvImageFormatRgba16 = 10, + SpvImageFormatRgb10A2 = 11, + SpvImageFormatRg16 = 12, + SpvImageFormatRg8 = 13, + SpvImageFormatR16 = 14, + SpvImageFormatR8 = 15, + SpvImageFormatRgba16Snorm = 16, + SpvImageFormatRg16Snorm = 17, + SpvImageFormatRg8Snorm = 18, + SpvImageFormatR16Snorm = 19, + SpvImageFormatR8Snorm = 20, + SpvImageFormatRgba32i = 21, + SpvImageFormatRgba16i = 22, + SpvImageFormatRgba8i = 23, + SpvImageFormatR32i = 24, + SpvImageFormatRg32i = 25, + SpvImageFormatRg16i = 26, + SpvImageFormatRg8i = 27, + SpvImageFormatR16i = 28, + SpvImageFormatR8i = 29, + SpvImageFormatRgba32ui = 30, + SpvImageFormatRgba16ui = 31, + SpvImageFormatRgba8ui = 32, + SpvImageFormatR32ui = 33, + SpvImageFormatRgb10a2ui = 34, + SpvImageFormatRg32ui = 35, + SpvImageFormatRg16ui = 36, + SpvImageFormatRg8ui = 37, + SpvImageFormatR16ui = 38, + SpvImageFormatR8ui = 39, + SpvImageFormatMax = 0x7fffffff, +} SpvImageFormat; + +typedef enum SpvImageChannelOrder_ { + SpvImageChannelOrderR = 0, + SpvImageChannelOrderA = 1, + SpvImageChannelOrderRG = 2, + SpvImageChannelOrderRA = 3, + SpvImageChannelOrderRGB = 4, + SpvImageChannelOrderRGBA = 5, + SpvImageChannelOrderBGRA = 6, + SpvImageChannelOrderARGB = 7, + SpvImageChannelOrderIntensity = 8, + SpvImageChannelOrderLuminance = 9, + SpvImageChannelOrderRx = 10, + SpvImageChannelOrderRGx = 11, + SpvImageChannelOrderRGBx = 12, + SpvImageChannelOrderDepth = 13, + SpvImageChannelOrderDepthStencil = 14, + SpvImageChannelOrdersRGB = 15, + SpvImageChannelOrdersRGBx = 16, + SpvImageChannelOrdersRGBA = 17, + SpvImageChannelOrdersBGRA = 18, + SpvImageChannelOrderABGR = 19, + SpvImageChannelOrderMax = 0x7fffffff, +} SpvImageChannelOrder; + +typedef enum SpvImageChannelDataType_ { + SpvImageChannelDataTypeSnormInt8 = 0, + SpvImageChannelDataTypeSnormInt16 = 1, + SpvImageChannelDataTypeUnormInt8 = 2, + SpvImageChannelDataTypeUnormInt16 = 3, + SpvImageChannelDataTypeUnormShort565 = 4, + SpvImageChannelDataTypeUnormShort555 = 5, + SpvImageChannelDataTypeUnormInt101010 = 6, + SpvImageChannelDataTypeSignedInt8 = 7, + SpvImageChannelDataTypeSignedInt16 = 8, + SpvImageChannelDataTypeSignedInt32 = 9, + SpvImageChannelDataTypeUnsignedInt8 = 10, + SpvImageChannelDataTypeUnsignedInt16 = 11, + SpvImageChannelDataTypeUnsignedInt32 = 12, + SpvImageChannelDataTypeHalfFloat = 13, + SpvImageChannelDataTypeFloat = 14, + SpvImageChannelDataTypeUnormInt24 = 15, + SpvImageChannelDataTypeUnormInt101010_2 = 16, + SpvImageChannelDataTypeMax = 0x7fffffff, +} SpvImageChannelDataType; + +typedef enum SpvImageOperandsShift_ { + SpvImageOperandsBiasShift = 0, + SpvImageOperandsLodShift = 1, + SpvImageOperandsGradShift = 2, + SpvImageOperandsConstOffsetShift = 3, + SpvImageOperandsOffsetShift = 4, + SpvImageOperandsConstOffsetsShift = 5, + SpvImageOperandsSampleShift = 6, + SpvImageOperandsMinLodShift = 7, + SpvImageOperandsMax = 0x7fffffff, +} SpvImageOperandsShift; + +typedef enum SpvImageOperandsMask_ { + SpvImageOperandsMaskNone = 0, + SpvImageOperandsBiasMask = 0x00000001, + SpvImageOperandsLodMask = 0x00000002, + SpvImageOperandsGradMask = 0x00000004, + SpvImageOperandsConstOffsetMask = 0x00000008, + SpvImageOperandsOffsetMask = 0x00000010, + SpvImageOperandsConstOffsetsMask = 0x00000020, + SpvImageOperandsSampleMask = 0x00000040, + SpvImageOperandsMinLodMask = 0x00000080, +} SpvImageOperandsMask; + +typedef enum SpvFPFastMathModeShift_ { + SpvFPFastMathModeNotNaNShift = 0, + SpvFPFastMathModeNotInfShift = 1, + SpvFPFastMathModeNSZShift = 2, + SpvFPFastMathModeAllowRecipShift = 3, + SpvFPFastMathModeFastShift = 4, + SpvFPFastMathModeMax = 0x7fffffff, +} SpvFPFastMathModeShift; + +typedef enum SpvFPFastMathModeMask_ { + SpvFPFastMathModeMaskNone = 0, + SpvFPFastMathModeNotNaNMask = 0x00000001, + SpvFPFastMathModeNotInfMask = 0x00000002, + SpvFPFastMathModeNSZMask = 0x00000004, + SpvFPFastMathModeAllowRecipMask = 0x00000008, + SpvFPFastMathModeFastMask = 0x00000010, +} SpvFPFastMathModeMask; + +typedef enum SpvFPRoundingMode_ { + SpvFPRoundingModeRTE = 0, + SpvFPRoundingModeRTZ = 1, + SpvFPRoundingModeRTP = 2, + SpvFPRoundingModeRTN = 3, + SpvFPRoundingModeMax = 0x7fffffff, +} SpvFPRoundingMode; + +typedef enum SpvLinkageType_ { + SpvLinkageTypeExport = 0, + SpvLinkageTypeImport = 1, + SpvLinkageTypeMax = 0x7fffffff, +} SpvLinkageType; + +typedef enum SpvAccessQualifier_ { + SpvAccessQualifierReadOnly = 0, + SpvAccessQualifierWriteOnly = 1, + SpvAccessQualifierReadWrite = 2, + SpvAccessQualifierMax = 0x7fffffff, +} SpvAccessQualifier; + +typedef enum SpvFunctionParameterAttribute_ { + SpvFunctionParameterAttributeZext = 0, + SpvFunctionParameterAttributeSext = 1, + SpvFunctionParameterAttributeByVal = 2, + SpvFunctionParameterAttributeSret = 3, + SpvFunctionParameterAttributeNoAlias = 4, + SpvFunctionParameterAttributeNoCapture = 5, + SpvFunctionParameterAttributeNoWrite = 6, + SpvFunctionParameterAttributeNoReadWrite = 7, + SpvFunctionParameterAttributeMax = 0x7fffffff, +} SpvFunctionParameterAttribute; + +typedef enum SpvDecoration_ { + SpvDecorationRelaxedPrecision = 0, + SpvDecorationSpecId = 1, + SpvDecorationBlock = 2, + SpvDecorationBufferBlock = 3, + SpvDecorationRowMajor = 4, + SpvDecorationColMajor = 5, + SpvDecorationArrayStride = 6, + SpvDecorationMatrixStride = 7, + SpvDecorationGLSLShared = 8, + SpvDecorationGLSLPacked = 9, + SpvDecorationCPacked = 10, + SpvDecorationBuiltIn = 11, + SpvDecorationNoPerspective = 13, + SpvDecorationFlat = 14, + SpvDecorationPatch = 15, + SpvDecorationCentroid = 16, + SpvDecorationSample = 17, + SpvDecorationInvariant = 18, + SpvDecorationRestrict = 19, + SpvDecorationAliased = 20, + SpvDecorationVolatile = 21, + SpvDecorationConstant = 22, + SpvDecorationCoherent = 23, + SpvDecorationNonWritable = 24, + SpvDecorationNonReadable = 25, + SpvDecorationUniform = 26, + SpvDecorationSaturatedConversion = 28, + SpvDecorationStream = 29, + SpvDecorationLocation = 30, + SpvDecorationComponent = 31, + SpvDecorationIndex = 32, + SpvDecorationBinding = 33, + SpvDecorationDescriptorSet = 34, + SpvDecorationOffset = 35, + SpvDecorationXfbBuffer = 36, + SpvDecorationXfbStride = 37, + SpvDecorationFuncParamAttr = 38, + SpvDecorationFPRoundingMode = 39, + SpvDecorationFPFastMathMode = 40, + SpvDecorationLinkageAttributes = 41, + SpvDecorationNoContraction = 42, + SpvDecorationInputAttachmentIndex = 43, + SpvDecorationAlignment = 44, + SpvDecorationMaxByteOffset = 45, + SpvDecorationAlignmentId = 46, + SpvDecorationMaxByteOffsetId = 47, + SpvDecorationExplicitInterpAMD = 4999, + SpvDecorationOverrideCoverageNV = 5248, + SpvDecorationPassthroughNV = 5250, + SpvDecorationViewportRelativeNV = 5252, + SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationNonUniformEXT = 5300, + SpvDecorationHlslCounterBufferGOOGLE = 5634, + SpvDecorationHlslSemanticGOOGLE = 5635, + SpvDecorationMax = 0x7fffffff, +} SpvDecoration; + +typedef enum SpvBuiltIn_ { + SpvBuiltInPosition = 0, + SpvBuiltInPointSize = 1, + SpvBuiltInClipDistance = 3, + SpvBuiltInCullDistance = 4, + SpvBuiltInVertexId = 5, + SpvBuiltInInstanceId = 6, + SpvBuiltInPrimitiveId = 7, + SpvBuiltInInvocationId = 8, + SpvBuiltInLayer = 9, + SpvBuiltInViewportIndex = 10, + SpvBuiltInTessLevelOuter = 11, + SpvBuiltInTessLevelInner = 12, + SpvBuiltInTessCoord = 13, + SpvBuiltInPatchVertices = 14, + SpvBuiltInFragCoord = 15, + SpvBuiltInPointCoord = 16, + SpvBuiltInFrontFacing = 17, + SpvBuiltInSampleId = 18, + SpvBuiltInSamplePosition = 19, + SpvBuiltInSampleMask = 20, + SpvBuiltInFragDepth = 22, + SpvBuiltInHelperInvocation = 23, + SpvBuiltInNumWorkgroups = 24, + SpvBuiltInWorkgroupSize = 25, + SpvBuiltInWorkgroupId = 26, + SpvBuiltInLocalInvocationId = 27, + SpvBuiltInGlobalInvocationId = 28, + SpvBuiltInLocalInvocationIndex = 29, + SpvBuiltInWorkDim = 30, + SpvBuiltInGlobalSize = 31, + SpvBuiltInEnqueuedWorkgroupSize = 32, + SpvBuiltInGlobalOffset = 33, + SpvBuiltInGlobalLinearId = 34, + SpvBuiltInSubgroupSize = 36, + SpvBuiltInSubgroupMaxSize = 37, + SpvBuiltInNumSubgroups = 38, + SpvBuiltInNumEnqueuedSubgroups = 39, + SpvBuiltInSubgroupId = 40, + SpvBuiltInSubgroupLocalInvocationId = 41, + SpvBuiltInVertexIndex = 42, + SpvBuiltInInstanceIndex = 43, + SpvBuiltInSubgroupEqMask = 4416, + SpvBuiltInSubgroupEqMaskKHR = 4416, + SpvBuiltInSubgroupGeMask = 4417, + SpvBuiltInSubgroupGeMaskKHR = 4417, + SpvBuiltInSubgroupGtMask = 4418, + SpvBuiltInSubgroupGtMaskKHR = 4418, + SpvBuiltInSubgroupLeMask = 4419, + SpvBuiltInSubgroupLeMaskKHR = 4419, + SpvBuiltInSubgroupLtMask = 4420, + SpvBuiltInSubgroupLtMaskKHR = 4420, + SpvBuiltInBaseVertex = 4424, + SpvBuiltInBaseInstance = 4425, + SpvBuiltInDrawIndex = 4426, + SpvBuiltInDeviceIndex = 4438, + SpvBuiltInViewIndex = 4440, + SpvBuiltInBaryCoordNoPerspAMD = 4992, + SpvBuiltInBaryCoordNoPerspCentroidAMD = 4993, + SpvBuiltInBaryCoordNoPerspSampleAMD = 4994, + SpvBuiltInBaryCoordSmoothAMD = 4995, + SpvBuiltInBaryCoordSmoothCentroidAMD = 4996, + SpvBuiltInBaryCoordSmoothSampleAMD = 4997, + SpvBuiltInBaryCoordPullModelAMD = 4998, + SpvBuiltInFragStencilRefEXT = 5014, + SpvBuiltInViewportMaskNV = 5253, + SpvBuiltInSecondaryPositionNV = 5257, + SpvBuiltInSecondaryViewportMaskNV = 5258, + SpvBuiltInPositionPerViewNV = 5261, + SpvBuiltInViewportMaskPerViewNV = 5262, + SpvBuiltInFullyCoveredEXT = 5264, + SpvBuiltInMax = 0x7fffffff, +} SpvBuiltIn; + +typedef enum SpvSelectionControlShift_ { + SpvSelectionControlFlattenShift = 0, + SpvSelectionControlDontFlattenShift = 1, + SpvSelectionControlMax = 0x7fffffff, +} SpvSelectionControlShift; + +typedef enum SpvSelectionControlMask_ { + SpvSelectionControlMaskNone = 0, + SpvSelectionControlFlattenMask = 0x00000001, + SpvSelectionControlDontFlattenMask = 0x00000002, +} SpvSelectionControlMask; + +typedef enum SpvLoopControlShift_ { + SpvLoopControlUnrollShift = 0, + SpvLoopControlDontUnrollShift = 1, + SpvLoopControlDependencyInfiniteShift = 2, + SpvLoopControlDependencyLengthShift = 3, + SpvLoopControlMax = 0x7fffffff, +} SpvLoopControlShift; + +typedef enum SpvLoopControlMask_ { + SpvLoopControlMaskNone = 0, + SpvLoopControlUnrollMask = 0x00000001, + SpvLoopControlDontUnrollMask = 0x00000002, + SpvLoopControlDependencyInfiniteMask = 0x00000004, + SpvLoopControlDependencyLengthMask = 0x00000008, +} SpvLoopControlMask; + +typedef enum SpvFunctionControlShift_ { + SpvFunctionControlInlineShift = 0, + SpvFunctionControlDontInlineShift = 1, + SpvFunctionControlPureShift = 2, + SpvFunctionControlConstShift = 3, + SpvFunctionControlMax = 0x7fffffff, +} SpvFunctionControlShift; + +typedef enum SpvFunctionControlMask_ { + SpvFunctionControlMaskNone = 0, + SpvFunctionControlInlineMask = 0x00000001, + SpvFunctionControlDontInlineMask = 0x00000002, + SpvFunctionControlPureMask = 0x00000004, + SpvFunctionControlConstMask = 0x00000008, +} SpvFunctionControlMask; + +typedef enum SpvMemorySemanticsShift_ { + SpvMemorySemanticsAcquireShift = 1, + SpvMemorySemanticsReleaseShift = 2, + SpvMemorySemanticsAcquireReleaseShift = 3, + SpvMemorySemanticsSequentiallyConsistentShift = 4, + SpvMemorySemanticsUniformMemoryShift = 6, + SpvMemorySemanticsSubgroupMemoryShift = 7, + SpvMemorySemanticsWorkgroupMemoryShift = 8, + SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, + SpvMemorySemanticsAtomicCounterMemoryShift = 10, + SpvMemorySemanticsImageMemoryShift = 11, + SpvMemorySemanticsMax = 0x7fffffff, +} SpvMemorySemanticsShift; + +typedef enum SpvMemorySemanticsMask_ { + SpvMemorySemanticsMaskNone = 0, + SpvMemorySemanticsAcquireMask = 0x00000002, + SpvMemorySemanticsReleaseMask = 0x00000004, + SpvMemorySemanticsAcquireReleaseMask = 0x00000008, + SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010, + SpvMemorySemanticsUniformMemoryMask = 0x00000040, + SpvMemorySemanticsSubgroupMemoryMask = 0x00000080, + SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100, + SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, + SpvMemorySemanticsImageMemoryMask = 0x00000800, +} SpvMemorySemanticsMask; + +typedef enum SpvMemoryAccessShift_ { + SpvMemoryAccessVolatileShift = 0, + SpvMemoryAccessAlignedShift = 1, + SpvMemoryAccessNontemporalShift = 2, + SpvMemoryAccessMax = 0x7fffffff, +} SpvMemoryAccessShift; + +typedef enum SpvMemoryAccessMask_ { + SpvMemoryAccessMaskNone = 0, + SpvMemoryAccessVolatileMask = 0x00000001, + SpvMemoryAccessAlignedMask = 0x00000002, + SpvMemoryAccessNontemporalMask = 0x00000004, +} SpvMemoryAccessMask; + +typedef enum SpvScope_ { + SpvScopeCrossDevice = 0, + SpvScopeDevice = 1, + SpvScopeWorkgroup = 2, + SpvScopeSubgroup = 3, + SpvScopeInvocation = 4, + SpvScopeMax = 0x7fffffff, +} SpvScope; + +typedef enum SpvGroupOperation_ { + SpvGroupOperationReduce = 0, + SpvGroupOperationInclusiveScan = 1, + SpvGroupOperationExclusiveScan = 2, + SpvGroupOperationClusteredReduce = 3, + SpvGroupOperationPartitionedReduceNV = 6, + SpvGroupOperationPartitionedInclusiveScanNV = 7, + SpvGroupOperationPartitionedExclusiveScanNV = 8, + SpvGroupOperationMax = 0x7fffffff, +} SpvGroupOperation; + +typedef enum SpvKernelEnqueueFlags_ { + SpvKernelEnqueueFlagsNoWait = 0, + SpvKernelEnqueueFlagsWaitKernel = 1, + SpvKernelEnqueueFlagsWaitWorkGroup = 2, + SpvKernelEnqueueFlagsMax = 0x7fffffff, +} SpvKernelEnqueueFlags; + +typedef enum SpvKernelProfilingInfoShift_ { + SpvKernelProfilingInfoCmdExecTimeShift = 0, + SpvKernelProfilingInfoMax = 0x7fffffff, +} SpvKernelProfilingInfoShift; + +typedef enum SpvKernelProfilingInfoMask_ { + SpvKernelProfilingInfoMaskNone = 0, + SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001, +} SpvKernelProfilingInfoMask; + +typedef enum SpvCapability_ { + SpvCapabilityMatrix = 0, + SpvCapabilityShader = 1, + SpvCapabilityGeometry = 2, + SpvCapabilityTessellation = 3, + SpvCapabilityAddresses = 4, + SpvCapabilityLinkage = 5, + SpvCapabilityKernel = 6, + SpvCapabilityVector16 = 7, + SpvCapabilityFloat16Buffer = 8, + SpvCapabilityFloat16 = 9, + SpvCapabilityFloat64 = 10, + SpvCapabilityInt64 = 11, + SpvCapabilityInt64Atomics = 12, + SpvCapabilityImageBasic = 13, + SpvCapabilityImageReadWrite = 14, + SpvCapabilityImageMipmap = 15, + SpvCapabilityPipes = 17, + SpvCapabilityGroups = 18, + SpvCapabilityDeviceEnqueue = 19, + SpvCapabilityLiteralSampler = 20, + SpvCapabilityAtomicStorage = 21, + SpvCapabilityInt16 = 22, + SpvCapabilityTessellationPointSize = 23, + SpvCapabilityGeometryPointSize = 24, + SpvCapabilityImageGatherExtended = 25, + SpvCapabilityStorageImageMultisample = 27, + SpvCapabilityUniformBufferArrayDynamicIndexing = 28, + SpvCapabilitySampledImageArrayDynamicIndexing = 29, + SpvCapabilityStorageBufferArrayDynamicIndexing = 30, + SpvCapabilityStorageImageArrayDynamicIndexing = 31, + SpvCapabilityClipDistance = 32, + SpvCapabilityCullDistance = 33, + SpvCapabilityImageCubeArray = 34, + SpvCapabilitySampleRateShading = 35, + SpvCapabilityImageRect = 36, + SpvCapabilitySampledRect = 37, + SpvCapabilityGenericPointer = 38, + SpvCapabilityInt8 = 39, + SpvCapabilityInputAttachment = 40, + SpvCapabilitySparseResidency = 41, + SpvCapabilityMinLod = 42, + SpvCapabilitySampled1D = 43, + SpvCapabilityImage1D = 44, + SpvCapabilitySampledCubeArray = 45, + SpvCapabilitySampledBuffer = 46, + SpvCapabilityImageBuffer = 47, + SpvCapabilityImageMSArray = 48, + SpvCapabilityStorageImageExtendedFormats = 49, + SpvCapabilityImageQuery = 50, + SpvCapabilityDerivativeControl = 51, + SpvCapabilityInterpolationFunction = 52, + SpvCapabilityTransformFeedback = 53, + SpvCapabilityGeometryStreams = 54, + SpvCapabilityStorageImageReadWithoutFormat = 55, + SpvCapabilityStorageImageWriteWithoutFormat = 56, + SpvCapabilityMultiViewport = 57, + SpvCapabilitySubgroupDispatch = 58, + SpvCapabilityNamedBarrier = 59, + SpvCapabilityPipeStorage = 60, + SpvCapabilityGroupNonUniform = 61, + SpvCapabilityGroupNonUniformVote = 62, + SpvCapabilityGroupNonUniformArithmetic = 63, + SpvCapabilityGroupNonUniformBallot = 64, + SpvCapabilityGroupNonUniformShuffle = 65, + SpvCapabilityGroupNonUniformShuffleRelative = 66, + SpvCapabilityGroupNonUniformClustered = 67, + SpvCapabilityGroupNonUniformQuad = 68, + SpvCapabilitySubgroupBallotKHR = 4423, + SpvCapabilityDrawParameters = 4427, + SpvCapabilitySubgroupVoteKHR = 4431, + SpvCapabilityStorageBuffer16BitAccess = 4433, + SpvCapabilityStorageUniformBufferBlock16 = 4433, + SpvCapabilityStorageUniform16 = 4434, + SpvCapabilityUniformAndStorageBuffer16BitAccess = 4434, + SpvCapabilityStoragePushConstant16 = 4435, + SpvCapabilityStorageInputOutput16 = 4436, + SpvCapabilityDeviceGroup = 4437, + SpvCapabilityMultiView = 4439, + SpvCapabilityVariablePointersStorageBuffer = 4441, + SpvCapabilityVariablePointers = 4442, + SpvCapabilityAtomicStorageOps = 4445, + SpvCapabilitySampleMaskPostDepthCoverage = 4447, + SpvCapabilityFloat16ImageAMD = 5008, + SpvCapabilityImageGatherBiasLodAMD = 5009, + SpvCapabilityFragmentMaskAMD = 5010, + SpvCapabilityStencilExportEXT = 5013, + SpvCapabilityImageReadWriteLodAMD = 5015, + SpvCapabilitySampleMaskOverrideCoverageNV = 5249, + SpvCapabilityGeometryShaderPassthroughNV = 5251, + SpvCapabilityShaderViewportIndexLayerEXT = 5254, + SpvCapabilityShaderViewportIndexLayerNV = 5254, + SpvCapabilityShaderViewportMaskNV = 5255, + SpvCapabilityShaderStereoViewNV = 5259, + SpvCapabilityPerViewAttributesNV = 5260, + SpvCapabilityFragmentFullyCoveredEXT = 5265, + SpvCapabilityGroupNonUniformPartitionedNV = 5297, + SpvCapabilityShaderNonUniformEXT = 5301, + SpvCapabilityRuntimeDescriptorArrayEXT = 5302, + SpvCapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, + SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, + SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, + SpvCapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, + SpvCapabilitySampledImageArrayNonUniformIndexingEXT = 5307, + SpvCapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, + SpvCapabilityStorageImageArrayNonUniformIndexingEXT = 5309, + SpvCapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, + SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, + SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SpvCapabilitySubgroupShuffleINTEL = 5568, + SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, + SpvCapabilitySubgroupImageBlockIOINTEL = 5570, + SpvCapabilityMax = 0x7fffffff, +} SpvCapability; + +typedef enum SpvOp_ { + SpvOpNop = 0, + SpvOpUndef = 1, + SpvOpSourceContinued = 2, + SpvOpSource = 3, + SpvOpSourceExtension = 4, + SpvOpName = 5, + SpvOpMemberName = 6, + SpvOpString = 7, + SpvOpLine = 8, + SpvOpExtension = 10, + SpvOpExtInstImport = 11, + SpvOpExtInst = 12, + SpvOpMemoryModel = 14, + SpvOpEntryPoint = 15, + SpvOpExecutionMode = 16, + SpvOpCapability = 17, + SpvOpTypeVoid = 19, + SpvOpTypeBool = 20, + SpvOpTypeInt = 21, + SpvOpTypeFloat = 22, + SpvOpTypeVector = 23, + SpvOpTypeMatrix = 24, + SpvOpTypeImage = 25, + SpvOpTypeSampler = 26, + SpvOpTypeSampledImage = 27, + SpvOpTypeArray = 28, + SpvOpTypeRuntimeArray = 29, + SpvOpTypeStruct = 30, + SpvOpTypeOpaque = 31, + SpvOpTypePointer = 32, + SpvOpTypeFunction = 33, + SpvOpTypeEvent = 34, + SpvOpTypeDeviceEvent = 35, + SpvOpTypeReserveId = 36, + SpvOpTypeQueue = 37, + SpvOpTypePipe = 38, + SpvOpTypeForwardPointer = 39, + SpvOpConstantTrue = 41, + SpvOpConstantFalse = 42, + SpvOpConstant = 43, + SpvOpConstantComposite = 44, + SpvOpConstantSampler = 45, + SpvOpConstantNull = 46, + SpvOpSpecConstantTrue = 48, + SpvOpSpecConstantFalse = 49, + SpvOpSpecConstant = 50, + SpvOpSpecConstantComposite = 51, + SpvOpSpecConstantOp = 52, + SpvOpFunction = 54, + SpvOpFunctionParameter = 55, + SpvOpFunctionEnd = 56, + SpvOpFunctionCall = 57, + SpvOpVariable = 59, + SpvOpImageTexelPointer = 60, + SpvOpLoad = 61, + SpvOpStore = 62, + SpvOpCopyMemory = 63, + SpvOpCopyMemorySized = 64, + SpvOpAccessChain = 65, + SpvOpInBoundsAccessChain = 66, + SpvOpPtrAccessChain = 67, + SpvOpArrayLength = 68, + SpvOpGenericPtrMemSemantics = 69, + SpvOpInBoundsPtrAccessChain = 70, + SpvOpDecorate = 71, + SpvOpMemberDecorate = 72, + SpvOpDecorationGroup = 73, + SpvOpGroupDecorate = 74, + SpvOpGroupMemberDecorate = 75, + SpvOpVectorExtractDynamic = 77, + SpvOpVectorInsertDynamic = 78, + SpvOpVectorShuffle = 79, + SpvOpCompositeConstruct = 80, + SpvOpCompositeExtract = 81, + SpvOpCompositeInsert = 82, + SpvOpCopyObject = 83, + SpvOpTranspose = 84, + SpvOpSampledImage = 86, + SpvOpImageSampleImplicitLod = 87, + SpvOpImageSampleExplicitLod = 88, + SpvOpImageSampleDrefImplicitLod = 89, + SpvOpImageSampleDrefExplicitLod = 90, + SpvOpImageSampleProjImplicitLod = 91, + SpvOpImageSampleProjExplicitLod = 92, + SpvOpImageSampleProjDrefImplicitLod = 93, + SpvOpImageSampleProjDrefExplicitLod = 94, + SpvOpImageFetch = 95, + SpvOpImageGather = 96, + SpvOpImageDrefGather = 97, + SpvOpImageRead = 98, + SpvOpImageWrite = 99, + SpvOpImage = 100, + SpvOpImageQueryFormat = 101, + SpvOpImageQueryOrder = 102, + SpvOpImageQuerySizeLod = 103, + SpvOpImageQuerySize = 104, + SpvOpImageQueryLod = 105, + SpvOpImageQueryLevels = 106, + SpvOpImageQuerySamples = 107, + SpvOpConvertFToU = 109, + SpvOpConvertFToS = 110, + SpvOpConvertSToF = 111, + SpvOpConvertUToF = 112, + SpvOpUConvert = 113, + SpvOpSConvert = 114, + SpvOpFConvert = 115, + SpvOpQuantizeToF16 = 116, + SpvOpConvertPtrToU = 117, + SpvOpSatConvertSToU = 118, + SpvOpSatConvertUToS = 119, + SpvOpConvertUToPtr = 120, + SpvOpPtrCastToGeneric = 121, + SpvOpGenericCastToPtr = 122, + SpvOpGenericCastToPtrExplicit = 123, + SpvOpBitcast = 124, + SpvOpSNegate = 126, + SpvOpFNegate = 127, + SpvOpIAdd = 128, + SpvOpFAdd = 129, + SpvOpISub = 130, + SpvOpFSub = 131, + SpvOpIMul = 132, + SpvOpFMul = 133, + SpvOpUDiv = 134, + SpvOpSDiv = 135, + SpvOpFDiv = 136, + SpvOpUMod = 137, + SpvOpSRem = 138, + SpvOpSMod = 139, + SpvOpFRem = 140, + SpvOpFMod = 141, + SpvOpVectorTimesScalar = 142, + SpvOpMatrixTimesScalar = 143, + SpvOpVectorTimesMatrix = 144, + SpvOpMatrixTimesVector = 145, + SpvOpMatrixTimesMatrix = 146, + SpvOpOuterProduct = 147, + SpvOpDot = 148, + SpvOpIAddCarry = 149, + SpvOpISubBorrow = 150, + SpvOpUMulExtended = 151, + SpvOpSMulExtended = 152, + SpvOpAny = 154, + SpvOpAll = 155, + SpvOpIsNan = 156, + SpvOpIsInf = 157, + SpvOpIsFinite = 158, + SpvOpIsNormal = 159, + SpvOpSignBitSet = 160, + SpvOpLessOrGreater = 161, + SpvOpOrdered = 162, + SpvOpUnordered = 163, + SpvOpLogicalEqual = 164, + SpvOpLogicalNotEqual = 165, + SpvOpLogicalOr = 166, + SpvOpLogicalAnd = 167, + SpvOpLogicalNot = 168, + SpvOpSelect = 169, + SpvOpIEqual = 170, + SpvOpINotEqual = 171, + SpvOpUGreaterThan = 172, + SpvOpSGreaterThan = 173, + SpvOpUGreaterThanEqual = 174, + SpvOpSGreaterThanEqual = 175, + SpvOpULessThan = 176, + SpvOpSLessThan = 177, + SpvOpULessThanEqual = 178, + SpvOpSLessThanEqual = 179, + SpvOpFOrdEqual = 180, + SpvOpFUnordEqual = 181, + SpvOpFOrdNotEqual = 182, + SpvOpFUnordNotEqual = 183, + SpvOpFOrdLessThan = 184, + SpvOpFUnordLessThan = 185, + SpvOpFOrdGreaterThan = 186, + SpvOpFUnordGreaterThan = 187, + SpvOpFOrdLessThanEqual = 188, + SpvOpFUnordLessThanEqual = 189, + SpvOpFOrdGreaterThanEqual = 190, + SpvOpFUnordGreaterThanEqual = 191, + SpvOpShiftRightLogical = 194, + SpvOpShiftRightArithmetic = 195, + SpvOpShiftLeftLogical = 196, + SpvOpBitwiseOr = 197, + SpvOpBitwiseXor = 198, + SpvOpBitwiseAnd = 199, + SpvOpNot = 200, + SpvOpBitFieldInsert = 201, + SpvOpBitFieldSExtract = 202, + SpvOpBitFieldUExtract = 203, + SpvOpBitReverse = 204, + SpvOpBitCount = 205, + SpvOpDPdx = 207, + SpvOpDPdy = 208, + SpvOpFwidth = 209, + SpvOpDPdxFine = 210, + SpvOpDPdyFine = 211, + SpvOpFwidthFine = 212, + SpvOpDPdxCoarse = 213, + SpvOpDPdyCoarse = 214, + SpvOpFwidthCoarse = 215, + SpvOpEmitVertex = 218, + SpvOpEndPrimitive = 219, + SpvOpEmitStreamVertex = 220, + SpvOpEndStreamPrimitive = 221, + SpvOpControlBarrier = 224, + SpvOpMemoryBarrier = 225, + SpvOpAtomicLoad = 227, + SpvOpAtomicStore = 228, + SpvOpAtomicExchange = 229, + SpvOpAtomicCompareExchange = 230, + SpvOpAtomicCompareExchangeWeak = 231, + SpvOpAtomicIIncrement = 232, + SpvOpAtomicIDecrement = 233, + SpvOpAtomicIAdd = 234, + SpvOpAtomicISub = 235, + SpvOpAtomicSMin = 236, + SpvOpAtomicUMin = 237, + SpvOpAtomicSMax = 238, + SpvOpAtomicUMax = 239, + SpvOpAtomicAnd = 240, + SpvOpAtomicOr = 241, + SpvOpAtomicXor = 242, + SpvOpPhi = 245, + SpvOpLoopMerge = 246, + SpvOpSelectionMerge = 247, + SpvOpLabel = 248, + SpvOpBranch = 249, + SpvOpBranchConditional = 250, + SpvOpSwitch = 251, + SpvOpKill = 252, + SpvOpReturn = 253, + SpvOpReturnValue = 254, + SpvOpUnreachable = 255, + SpvOpLifetimeStart = 256, + SpvOpLifetimeStop = 257, + SpvOpGroupAsyncCopy = 259, + SpvOpGroupWaitEvents = 260, + SpvOpGroupAll = 261, + SpvOpGroupAny = 262, + SpvOpGroupBroadcast = 263, + SpvOpGroupIAdd = 264, + SpvOpGroupFAdd = 265, + SpvOpGroupFMin = 266, + SpvOpGroupUMin = 267, + SpvOpGroupSMin = 268, + SpvOpGroupFMax = 269, + SpvOpGroupUMax = 270, + SpvOpGroupSMax = 271, + SpvOpReadPipe = 274, + SpvOpWritePipe = 275, + SpvOpReservedReadPipe = 276, + SpvOpReservedWritePipe = 277, + SpvOpReserveReadPipePackets = 278, + SpvOpReserveWritePipePackets = 279, + SpvOpCommitReadPipe = 280, + SpvOpCommitWritePipe = 281, + SpvOpIsValidReserveId = 282, + SpvOpGetNumPipePackets = 283, + SpvOpGetMaxPipePackets = 284, + SpvOpGroupReserveReadPipePackets = 285, + SpvOpGroupReserveWritePipePackets = 286, + SpvOpGroupCommitReadPipe = 287, + SpvOpGroupCommitWritePipe = 288, + SpvOpEnqueueMarker = 291, + SpvOpEnqueueKernel = 292, + SpvOpGetKernelNDrangeSubGroupCount = 293, + SpvOpGetKernelNDrangeMaxSubGroupSize = 294, + SpvOpGetKernelWorkGroupSize = 295, + SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296, + SpvOpRetainEvent = 297, + SpvOpReleaseEvent = 298, + SpvOpCreateUserEvent = 299, + SpvOpIsValidEvent = 300, + SpvOpSetUserEventStatus = 301, + SpvOpCaptureEventProfilingInfo = 302, + SpvOpGetDefaultQueue = 303, + SpvOpBuildNDRange = 304, + SpvOpImageSparseSampleImplicitLod = 305, + SpvOpImageSparseSampleExplicitLod = 306, + SpvOpImageSparseSampleDrefImplicitLod = 307, + SpvOpImageSparseSampleDrefExplicitLod = 308, + SpvOpImageSparseSampleProjImplicitLod = 309, + SpvOpImageSparseSampleProjExplicitLod = 310, + SpvOpImageSparseSampleProjDrefImplicitLod = 311, + SpvOpImageSparseSampleProjDrefExplicitLod = 312, + SpvOpImageSparseFetch = 313, + SpvOpImageSparseGather = 314, + SpvOpImageSparseDrefGather = 315, + SpvOpImageSparseTexelsResident = 316, + SpvOpNoLine = 317, + SpvOpAtomicFlagTestAndSet = 318, + SpvOpAtomicFlagClear = 319, + SpvOpImageSparseRead = 320, + SpvOpSizeOf = 321, + SpvOpTypePipeStorage = 322, + SpvOpConstantPipeStorage = 323, + SpvOpCreatePipeFromPipeStorage = 324, + SpvOpGetKernelLocalSizeForSubgroupCount = 325, + SpvOpGetKernelMaxNumSubgroups = 326, + SpvOpTypeNamedBarrier = 327, + SpvOpNamedBarrierInitialize = 328, + SpvOpMemoryNamedBarrier = 329, + SpvOpModuleProcessed = 330, + SpvOpExecutionModeId = 331, + SpvOpDecorateId = 332, + SpvOpGroupNonUniformElect = 333, + SpvOpGroupNonUniformAll = 334, + SpvOpGroupNonUniformAny = 335, + SpvOpGroupNonUniformAllEqual = 336, + SpvOpGroupNonUniformBroadcast = 337, + SpvOpGroupNonUniformBroadcastFirst = 338, + SpvOpGroupNonUniformBallot = 339, + SpvOpGroupNonUniformInverseBallot = 340, + SpvOpGroupNonUniformBallotBitExtract = 341, + SpvOpGroupNonUniformBallotBitCount = 342, + SpvOpGroupNonUniformBallotFindLSB = 343, + SpvOpGroupNonUniformBallotFindMSB = 344, + SpvOpGroupNonUniformShuffle = 345, + SpvOpGroupNonUniformShuffleXor = 346, + SpvOpGroupNonUniformShuffleUp = 347, + SpvOpGroupNonUniformShuffleDown = 348, + SpvOpGroupNonUniformIAdd = 349, + SpvOpGroupNonUniformFAdd = 350, + SpvOpGroupNonUniformIMul = 351, + SpvOpGroupNonUniformFMul = 352, + SpvOpGroupNonUniformSMin = 353, + SpvOpGroupNonUniformUMin = 354, + SpvOpGroupNonUniformFMin = 355, + SpvOpGroupNonUniformSMax = 356, + SpvOpGroupNonUniformUMax = 357, + SpvOpGroupNonUniformFMax = 358, + SpvOpGroupNonUniformBitwiseAnd = 359, + SpvOpGroupNonUniformBitwiseOr = 360, + SpvOpGroupNonUniformBitwiseXor = 361, + SpvOpGroupNonUniformLogicalAnd = 362, + SpvOpGroupNonUniformLogicalOr = 363, + SpvOpGroupNonUniformLogicalXor = 364, + SpvOpGroupNonUniformQuadBroadcast = 365, + SpvOpGroupNonUniformQuadSwap = 366, + SpvOpSubgroupBallotKHR = 4421, + SpvOpSubgroupFirstInvocationKHR = 4422, + SpvOpSubgroupAllKHR = 4428, + SpvOpSubgroupAnyKHR = 4429, + SpvOpSubgroupAllEqualKHR = 4430, + SpvOpSubgroupReadInvocationKHR = 4432, + SpvOpGroupIAddNonUniformAMD = 5000, + SpvOpGroupFAddNonUniformAMD = 5001, + SpvOpGroupFMinNonUniformAMD = 5002, + SpvOpGroupUMinNonUniformAMD = 5003, + SpvOpGroupSMinNonUniformAMD = 5004, + SpvOpGroupFMaxNonUniformAMD = 5005, + SpvOpGroupUMaxNonUniformAMD = 5006, + SpvOpGroupSMaxNonUniformAMD = 5007, + SpvOpFragmentMaskFetchAMD = 5011, + SpvOpFragmentFetchAMD = 5012, + SpvOpGroupNonUniformPartitionNV = 5296, + SpvOpSubgroupShuffleINTEL = 5571, + SpvOpSubgroupShuffleDownINTEL = 5572, + SpvOpSubgroupShuffleUpINTEL = 5573, + SpvOpSubgroupShuffleXorINTEL = 5574, + SpvOpSubgroupBlockReadINTEL = 5575, + SpvOpSubgroupBlockWriteINTEL = 5576, + SpvOpSubgroupImageBlockReadINTEL = 5577, + SpvOpSubgroupImageBlockWriteINTEL = 5578, + SpvOpDecorateStringGOOGLE = 5632, + SpvOpMemberDecorateStringGOOGLE = 5633, + SpvOpMax = 0x7fffffff, +} SpvOp; + +#endif // #ifndef spirv_H + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e21762dbeca3c21cfc1977b21c626af60542b042 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp @@ -0,0 +1,1099 @@ +// Copyright (c) 2014-2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +#ifndef spirv_HPP +#define spirv_HPP + +namespace spv { + +typedef unsigned int Id; + +#define SPV_VERSION 0x10300 +#define SPV_REVISION 1 + +static const unsigned int MagicNumber = 0x07230203; +static const unsigned int Version = 0x00010300; +static const unsigned int Revision = 1; +static const unsigned int OpCodeMask = 0xffff; +static const unsigned int WordCountShift = 16; + +enum SourceLanguage { + SourceLanguageUnknown = 0, + SourceLanguageESSL = 1, + SourceLanguageGLSL = 2, + SourceLanguageOpenCL_C = 3, + SourceLanguageOpenCL_CPP = 4, + SourceLanguageHLSL = 5, + SourceLanguageMax = 0x7fffffff, +}; + +enum ExecutionModel { + ExecutionModelVertex = 0, + ExecutionModelTessellationControl = 1, + ExecutionModelTessellationEvaluation = 2, + ExecutionModelGeometry = 3, + ExecutionModelFragment = 4, + ExecutionModelGLCompute = 5, + ExecutionModelKernel = 6, + ExecutionModelMax = 0x7fffffff, +}; + +enum AddressingModel { + AddressingModelLogical = 0, + AddressingModelPhysical32 = 1, + AddressingModelPhysical64 = 2, + AddressingModelMax = 0x7fffffff, +}; + +enum MemoryModel { + MemoryModelSimple = 0, + MemoryModelGLSL450 = 1, + MemoryModelOpenCL = 2, + MemoryModelMax = 0x7fffffff, +}; + +enum ExecutionMode { + ExecutionModeInvocations = 0, + ExecutionModeSpacingEqual = 1, + ExecutionModeSpacingFractionalEven = 2, + ExecutionModeSpacingFractionalOdd = 3, + ExecutionModeVertexOrderCw = 4, + ExecutionModeVertexOrderCcw = 5, + ExecutionModePixelCenterInteger = 6, + ExecutionModeOriginUpperLeft = 7, + ExecutionModeOriginLowerLeft = 8, + ExecutionModeEarlyFragmentTests = 9, + ExecutionModePointMode = 10, + ExecutionModeXfb = 11, + ExecutionModeDepthReplacing = 12, + ExecutionModeDepthGreater = 14, + ExecutionModeDepthLess = 15, + ExecutionModeDepthUnchanged = 16, + ExecutionModeLocalSize = 17, + ExecutionModeLocalSizeHint = 18, + ExecutionModeInputPoints = 19, + ExecutionModeInputLines = 20, + ExecutionModeInputLinesAdjacency = 21, + ExecutionModeTriangles = 22, + ExecutionModeInputTrianglesAdjacency = 23, + ExecutionModeQuads = 24, + ExecutionModeIsolines = 25, + ExecutionModeOutputVertices = 26, + ExecutionModeOutputPoints = 27, + ExecutionModeOutputLineStrip = 28, + ExecutionModeOutputTriangleStrip = 29, + ExecutionModeVecTypeHint = 30, + ExecutionModeContractionOff = 31, + ExecutionModeInitializer = 33, + ExecutionModeFinalizer = 34, + ExecutionModeSubgroupSize = 35, + ExecutionModeSubgroupsPerWorkgroup = 36, + ExecutionModeSubgroupsPerWorkgroupId = 37, + ExecutionModeLocalSizeId = 38, + ExecutionModeLocalSizeHintId = 39, + ExecutionModePostDepthCoverage = 4446, + ExecutionModeStencilRefReplacingEXT = 5027, + ExecutionModeMax = 0x7fffffff, +}; + +enum StorageClass { + StorageClassUniformConstant = 0, + StorageClassInput = 1, + StorageClassUniform = 2, + StorageClassOutput = 3, + StorageClassWorkgroup = 4, + StorageClassCrossWorkgroup = 5, + StorageClassPrivate = 6, + StorageClassFunction = 7, + StorageClassGeneric = 8, + StorageClassPushConstant = 9, + StorageClassAtomicCounter = 10, + StorageClassImage = 11, + StorageClassStorageBuffer = 12, + StorageClassMax = 0x7fffffff, +}; + +enum Dim { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + DimCube = 3, + DimRect = 4, + DimBuffer = 5, + DimSubpassData = 6, + DimMax = 0x7fffffff, +}; + +enum SamplerAddressingMode { + SamplerAddressingModeNone = 0, + SamplerAddressingModeClampToEdge = 1, + SamplerAddressingModeClamp = 2, + SamplerAddressingModeRepeat = 3, + SamplerAddressingModeRepeatMirrored = 4, + SamplerAddressingModeMax = 0x7fffffff, +}; + +enum SamplerFilterMode { + SamplerFilterModeNearest = 0, + SamplerFilterModeLinear = 1, + SamplerFilterModeMax = 0x7fffffff, +}; + +enum ImageFormat { + ImageFormatUnknown = 0, + ImageFormatRgba32f = 1, + ImageFormatRgba16f = 2, + ImageFormatR32f = 3, + ImageFormatRgba8 = 4, + ImageFormatRgba8Snorm = 5, + ImageFormatRg32f = 6, + ImageFormatRg16f = 7, + ImageFormatR11fG11fB10f = 8, + ImageFormatR16f = 9, + ImageFormatRgba16 = 10, + ImageFormatRgb10A2 = 11, + ImageFormatRg16 = 12, + ImageFormatRg8 = 13, + ImageFormatR16 = 14, + ImageFormatR8 = 15, + ImageFormatRgba16Snorm = 16, + ImageFormatRg16Snorm = 17, + ImageFormatRg8Snorm = 18, + ImageFormatR16Snorm = 19, + ImageFormatR8Snorm = 20, + ImageFormatRgba32i = 21, + ImageFormatRgba16i = 22, + ImageFormatRgba8i = 23, + ImageFormatR32i = 24, + ImageFormatRg32i = 25, + ImageFormatRg16i = 26, + ImageFormatRg8i = 27, + ImageFormatR16i = 28, + ImageFormatR8i = 29, + ImageFormatRgba32ui = 30, + ImageFormatRgba16ui = 31, + ImageFormatRgba8ui = 32, + ImageFormatR32ui = 33, + ImageFormatRgb10a2ui = 34, + ImageFormatRg32ui = 35, + ImageFormatRg16ui = 36, + ImageFormatRg8ui = 37, + ImageFormatR16ui = 38, + ImageFormatR8ui = 39, + ImageFormatMax = 0x7fffffff, +}; + +enum ImageChannelOrder { + ImageChannelOrderR = 0, + ImageChannelOrderA = 1, + ImageChannelOrderRG = 2, + ImageChannelOrderRA = 3, + ImageChannelOrderRGB = 4, + ImageChannelOrderRGBA = 5, + ImageChannelOrderBGRA = 6, + ImageChannelOrderARGB = 7, + ImageChannelOrderIntensity = 8, + ImageChannelOrderLuminance = 9, + ImageChannelOrderRx = 10, + ImageChannelOrderRGx = 11, + ImageChannelOrderRGBx = 12, + ImageChannelOrderDepth = 13, + ImageChannelOrderDepthStencil = 14, + ImageChannelOrdersRGB = 15, + ImageChannelOrdersRGBx = 16, + ImageChannelOrdersRGBA = 17, + ImageChannelOrdersBGRA = 18, + ImageChannelOrderABGR = 19, + ImageChannelOrderMax = 0x7fffffff, +}; + +enum ImageChannelDataType { + ImageChannelDataTypeSnormInt8 = 0, + ImageChannelDataTypeSnormInt16 = 1, + ImageChannelDataTypeUnormInt8 = 2, + ImageChannelDataTypeUnormInt16 = 3, + ImageChannelDataTypeUnormShort565 = 4, + ImageChannelDataTypeUnormShort555 = 5, + ImageChannelDataTypeUnormInt101010 = 6, + ImageChannelDataTypeSignedInt8 = 7, + ImageChannelDataTypeSignedInt16 = 8, + ImageChannelDataTypeSignedInt32 = 9, + ImageChannelDataTypeUnsignedInt8 = 10, + ImageChannelDataTypeUnsignedInt16 = 11, + ImageChannelDataTypeUnsignedInt32 = 12, + ImageChannelDataTypeHalfFloat = 13, + ImageChannelDataTypeFloat = 14, + ImageChannelDataTypeUnormInt24 = 15, + ImageChannelDataTypeUnormInt101010_2 = 16, + ImageChannelDataTypeMax = 0x7fffffff, +}; + +enum ImageOperandsShift { + ImageOperandsBiasShift = 0, + ImageOperandsLodShift = 1, + ImageOperandsGradShift = 2, + ImageOperandsConstOffsetShift = 3, + ImageOperandsOffsetShift = 4, + ImageOperandsConstOffsetsShift = 5, + ImageOperandsSampleShift = 6, + ImageOperandsMinLodShift = 7, + ImageOperandsMax = 0x7fffffff, +}; + +enum ImageOperandsMask { + ImageOperandsMaskNone = 0, + ImageOperandsBiasMask = 0x00000001, + ImageOperandsLodMask = 0x00000002, + ImageOperandsGradMask = 0x00000004, + ImageOperandsConstOffsetMask = 0x00000008, + ImageOperandsOffsetMask = 0x00000010, + ImageOperandsConstOffsetsMask = 0x00000020, + ImageOperandsSampleMask = 0x00000040, + ImageOperandsMinLodMask = 0x00000080, +}; + +enum FPFastMathModeShift { + FPFastMathModeNotNaNShift = 0, + FPFastMathModeNotInfShift = 1, + FPFastMathModeNSZShift = 2, + FPFastMathModeAllowRecipShift = 3, + FPFastMathModeFastShift = 4, + FPFastMathModeMax = 0x7fffffff, +}; + +enum FPFastMathModeMask { + FPFastMathModeMaskNone = 0, + FPFastMathModeNotNaNMask = 0x00000001, + FPFastMathModeNotInfMask = 0x00000002, + FPFastMathModeNSZMask = 0x00000004, + FPFastMathModeAllowRecipMask = 0x00000008, + FPFastMathModeFastMask = 0x00000010, +}; + +enum FPRoundingMode { + FPRoundingModeRTE = 0, + FPRoundingModeRTZ = 1, + FPRoundingModeRTP = 2, + FPRoundingModeRTN = 3, + FPRoundingModeMax = 0x7fffffff, +}; + +enum LinkageType { + LinkageTypeExport = 0, + LinkageTypeImport = 1, + LinkageTypeMax = 0x7fffffff, +}; + +enum AccessQualifier { + AccessQualifierReadOnly = 0, + AccessQualifierWriteOnly = 1, + AccessQualifierReadWrite = 2, + AccessQualifierMax = 0x7fffffff, +}; + +enum FunctionParameterAttribute { + FunctionParameterAttributeZext = 0, + FunctionParameterAttributeSext = 1, + FunctionParameterAttributeByVal = 2, + FunctionParameterAttributeSret = 3, + FunctionParameterAttributeNoAlias = 4, + FunctionParameterAttributeNoCapture = 5, + FunctionParameterAttributeNoWrite = 6, + FunctionParameterAttributeNoReadWrite = 7, + FunctionParameterAttributeMax = 0x7fffffff, +}; + +enum Decoration { + DecorationRelaxedPrecision = 0, + DecorationSpecId = 1, + DecorationBlock = 2, + DecorationBufferBlock = 3, + DecorationRowMajor = 4, + DecorationColMajor = 5, + DecorationArrayStride = 6, + DecorationMatrixStride = 7, + DecorationGLSLShared = 8, + DecorationGLSLPacked = 9, + DecorationCPacked = 10, + DecorationBuiltIn = 11, + DecorationNoPerspective = 13, + DecorationFlat = 14, + DecorationPatch = 15, + DecorationCentroid = 16, + DecorationSample = 17, + DecorationInvariant = 18, + DecorationRestrict = 19, + DecorationAliased = 20, + DecorationVolatile = 21, + DecorationConstant = 22, + DecorationCoherent = 23, + DecorationNonWritable = 24, + DecorationNonReadable = 25, + DecorationUniform = 26, + DecorationSaturatedConversion = 28, + DecorationStream = 29, + DecorationLocation = 30, + DecorationComponent = 31, + DecorationIndex = 32, + DecorationBinding = 33, + DecorationDescriptorSet = 34, + DecorationOffset = 35, + DecorationXfbBuffer = 36, + DecorationXfbStride = 37, + DecorationFuncParamAttr = 38, + DecorationFPRoundingMode = 39, + DecorationFPFastMathMode = 40, + DecorationLinkageAttributes = 41, + DecorationNoContraction = 42, + DecorationInputAttachmentIndex = 43, + DecorationAlignment = 44, + DecorationMaxByteOffset = 45, + DecorationAlignmentId = 46, + DecorationMaxByteOffsetId = 47, + DecorationExplicitInterpAMD = 4999, + DecorationOverrideCoverageNV = 5248, + DecorationPassthroughNV = 5250, + DecorationViewportRelativeNV = 5252, + DecorationSecondaryViewportRelativeNV = 5256, + DecorationNonUniformEXT = 5300, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, + DecorationMax = 0x7fffffff, +}; + +enum BuiltIn { + BuiltInPosition = 0, + BuiltInPointSize = 1, + BuiltInClipDistance = 3, + BuiltInCullDistance = 4, + BuiltInVertexId = 5, + BuiltInInstanceId = 6, + BuiltInPrimitiveId = 7, + BuiltInInvocationId = 8, + BuiltInLayer = 9, + BuiltInViewportIndex = 10, + BuiltInTessLevelOuter = 11, + BuiltInTessLevelInner = 12, + BuiltInTessCoord = 13, + BuiltInPatchVertices = 14, + BuiltInFragCoord = 15, + BuiltInPointCoord = 16, + BuiltInFrontFacing = 17, + BuiltInSampleId = 18, + BuiltInSamplePosition = 19, + BuiltInSampleMask = 20, + BuiltInFragDepth = 22, + BuiltInHelperInvocation = 23, + BuiltInNumWorkgroups = 24, + BuiltInWorkgroupSize = 25, + BuiltInWorkgroupId = 26, + BuiltInLocalInvocationId = 27, + BuiltInGlobalInvocationId = 28, + BuiltInLocalInvocationIndex = 29, + BuiltInWorkDim = 30, + BuiltInGlobalSize = 31, + BuiltInEnqueuedWorkgroupSize = 32, + BuiltInGlobalOffset = 33, + BuiltInGlobalLinearId = 34, + BuiltInSubgroupSize = 36, + BuiltInSubgroupMaxSize = 37, + BuiltInNumSubgroups = 38, + BuiltInNumEnqueuedSubgroups = 39, + BuiltInSubgroupId = 40, + BuiltInSubgroupLocalInvocationId = 41, + BuiltInVertexIndex = 42, + BuiltInInstanceIndex = 43, + BuiltInSubgroupEqMask = 4416, + BuiltInSubgroupEqMaskKHR = 4416, + BuiltInSubgroupGeMask = 4417, + BuiltInSubgroupGeMaskKHR = 4417, + BuiltInSubgroupGtMask = 4418, + BuiltInSubgroupGtMaskKHR = 4418, + BuiltInSubgroupLeMask = 4419, + BuiltInSubgroupLeMaskKHR = 4419, + BuiltInSubgroupLtMask = 4420, + BuiltInSubgroupLtMaskKHR = 4420, + BuiltInBaseVertex = 4424, + BuiltInBaseInstance = 4425, + BuiltInDrawIndex = 4426, + BuiltInDeviceIndex = 4438, + BuiltInViewIndex = 4440, + BuiltInBaryCoordNoPerspAMD = 4992, + BuiltInBaryCoordNoPerspCentroidAMD = 4993, + BuiltInBaryCoordNoPerspSampleAMD = 4994, + BuiltInBaryCoordSmoothAMD = 4995, + BuiltInBaryCoordSmoothCentroidAMD = 4996, + BuiltInBaryCoordSmoothSampleAMD = 4997, + BuiltInBaryCoordPullModelAMD = 4998, + BuiltInFragStencilRefEXT = 5014, + BuiltInViewportMaskNV = 5253, + BuiltInSecondaryPositionNV = 5257, + BuiltInSecondaryViewportMaskNV = 5258, + BuiltInPositionPerViewNV = 5261, + BuiltInViewportMaskPerViewNV = 5262, + BuiltInFullyCoveredEXT = 5264, + BuiltInMax = 0x7fffffff, +}; + +enum SelectionControlShift { + SelectionControlFlattenShift = 0, + SelectionControlDontFlattenShift = 1, + SelectionControlMax = 0x7fffffff, +}; + +enum SelectionControlMask { + SelectionControlMaskNone = 0, + SelectionControlFlattenMask = 0x00000001, + SelectionControlDontFlattenMask = 0x00000002, +}; + +enum LoopControlShift { + LoopControlUnrollShift = 0, + LoopControlDontUnrollShift = 1, + LoopControlDependencyInfiniteShift = 2, + LoopControlDependencyLengthShift = 3, + LoopControlMax = 0x7fffffff, +}; + +enum LoopControlMask { + LoopControlMaskNone = 0, + LoopControlUnrollMask = 0x00000001, + LoopControlDontUnrollMask = 0x00000002, + LoopControlDependencyInfiniteMask = 0x00000004, + LoopControlDependencyLengthMask = 0x00000008, +}; + +enum FunctionControlShift { + FunctionControlInlineShift = 0, + FunctionControlDontInlineShift = 1, + FunctionControlPureShift = 2, + FunctionControlConstShift = 3, + FunctionControlMax = 0x7fffffff, +}; + +enum FunctionControlMask { + FunctionControlMaskNone = 0, + FunctionControlInlineMask = 0x00000001, + FunctionControlDontInlineMask = 0x00000002, + FunctionControlPureMask = 0x00000004, + FunctionControlConstMask = 0x00000008, +}; + +enum MemorySemanticsShift { + MemorySemanticsAcquireShift = 1, + MemorySemanticsReleaseShift = 2, + MemorySemanticsAcquireReleaseShift = 3, + MemorySemanticsSequentiallyConsistentShift = 4, + MemorySemanticsUniformMemoryShift = 6, + MemorySemanticsSubgroupMemoryShift = 7, + MemorySemanticsWorkgroupMemoryShift = 8, + MemorySemanticsCrossWorkgroupMemoryShift = 9, + MemorySemanticsAtomicCounterMemoryShift = 10, + MemorySemanticsImageMemoryShift = 11, + MemorySemanticsMax = 0x7fffffff, +}; + +enum MemorySemanticsMask { + MemorySemanticsMaskNone = 0, + MemorySemanticsAcquireMask = 0x00000002, + MemorySemanticsReleaseMask = 0x00000004, + MemorySemanticsAcquireReleaseMask = 0x00000008, + MemorySemanticsSequentiallyConsistentMask = 0x00000010, + MemorySemanticsUniformMemoryMask = 0x00000040, + MemorySemanticsSubgroupMemoryMask = 0x00000080, + MemorySemanticsWorkgroupMemoryMask = 0x00000100, + MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + MemorySemanticsAtomicCounterMemoryMask = 0x00000400, + MemorySemanticsImageMemoryMask = 0x00000800, +}; + +enum MemoryAccessShift { + MemoryAccessVolatileShift = 0, + MemoryAccessAlignedShift = 1, + MemoryAccessNontemporalShift = 2, + MemoryAccessMax = 0x7fffffff, +}; + +enum MemoryAccessMask { + MemoryAccessMaskNone = 0, + MemoryAccessVolatileMask = 0x00000001, + MemoryAccessAlignedMask = 0x00000002, + MemoryAccessNontemporalMask = 0x00000004, +}; + +enum Scope { + ScopeCrossDevice = 0, + ScopeDevice = 1, + ScopeWorkgroup = 2, + ScopeSubgroup = 3, + ScopeInvocation = 4, + ScopeMax = 0x7fffffff, +}; + +enum GroupOperation { + GroupOperationReduce = 0, + GroupOperationInclusiveScan = 1, + GroupOperationExclusiveScan = 2, + GroupOperationClusteredReduce = 3, + GroupOperationPartitionedReduceNV = 6, + GroupOperationPartitionedInclusiveScanNV = 7, + GroupOperationPartitionedExclusiveScanNV = 8, + GroupOperationMax = 0x7fffffff, +}; + +enum KernelEnqueueFlags { + KernelEnqueueFlagsNoWait = 0, + KernelEnqueueFlagsWaitKernel = 1, + KernelEnqueueFlagsWaitWorkGroup = 2, + KernelEnqueueFlagsMax = 0x7fffffff, +}; + +enum KernelProfilingInfoShift { + KernelProfilingInfoCmdExecTimeShift = 0, + KernelProfilingInfoMax = 0x7fffffff, +}; + +enum KernelProfilingInfoMask { + KernelProfilingInfoMaskNone = 0, + KernelProfilingInfoCmdExecTimeMask = 0x00000001, +}; + +enum Capability { + CapabilityMatrix = 0, + CapabilityShader = 1, + CapabilityGeometry = 2, + CapabilityTessellation = 3, + CapabilityAddresses = 4, + CapabilityLinkage = 5, + CapabilityKernel = 6, + CapabilityVector16 = 7, + CapabilityFloat16Buffer = 8, + CapabilityFloat16 = 9, + CapabilityFloat64 = 10, + CapabilityInt64 = 11, + CapabilityInt64Atomics = 12, + CapabilityImageBasic = 13, + CapabilityImageReadWrite = 14, + CapabilityImageMipmap = 15, + CapabilityPipes = 17, + CapabilityGroups = 18, + CapabilityDeviceEnqueue = 19, + CapabilityLiteralSampler = 20, + CapabilityAtomicStorage = 21, + CapabilityInt16 = 22, + CapabilityTessellationPointSize = 23, + CapabilityGeometryPointSize = 24, + CapabilityImageGatherExtended = 25, + CapabilityStorageImageMultisample = 27, + CapabilityUniformBufferArrayDynamicIndexing = 28, + CapabilitySampledImageArrayDynamicIndexing = 29, + CapabilityStorageBufferArrayDynamicIndexing = 30, + CapabilityStorageImageArrayDynamicIndexing = 31, + CapabilityClipDistance = 32, + CapabilityCullDistance = 33, + CapabilityImageCubeArray = 34, + CapabilitySampleRateShading = 35, + CapabilityImageRect = 36, + CapabilitySampledRect = 37, + CapabilityGenericPointer = 38, + CapabilityInt8 = 39, + CapabilityInputAttachment = 40, + CapabilitySparseResidency = 41, + CapabilityMinLod = 42, + CapabilitySampled1D = 43, + CapabilityImage1D = 44, + CapabilitySampledCubeArray = 45, + CapabilitySampledBuffer = 46, + CapabilityImageBuffer = 47, + CapabilityImageMSArray = 48, + CapabilityStorageImageExtendedFormats = 49, + CapabilityImageQuery = 50, + CapabilityDerivativeControl = 51, + CapabilityInterpolationFunction = 52, + CapabilityTransformFeedback = 53, + CapabilityGeometryStreams = 54, + CapabilityStorageImageReadWithoutFormat = 55, + CapabilityStorageImageWriteWithoutFormat = 56, + CapabilityMultiViewport = 57, + CapabilitySubgroupDispatch = 58, + CapabilityNamedBarrier = 59, + CapabilityPipeStorage = 60, + CapabilityGroupNonUniform = 61, + CapabilityGroupNonUniformVote = 62, + CapabilityGroupNonUniformArithmetic = 63, + CapabilityGroupNonUniformBallot = 64, + CapabilityGroupNonUniformShuffle = 65, + CapabilityGroupNonUniformShuffleRelative = 66, + CapabilityGroupNonUniformClustered = 67, + CapabilityGroupNonUniformQuad = 68, + CapabilitySubgroupBallotKHR = 4423, + CapabilityDrawParameters = 4427, + CapabilitySubgroupVoteKHR = 4431, + CapabilityStorageBuffer16BitAccess = 4433, + CapabilityStorageUniformBufferBlock16 = 4433, + CapabilityStorageUniform16 = 4434, + CapabilityUniformAndStorageBuffer16BitAccess = 4434, + CapabilityStoragePushConstant16 = 4435, + CapabilityStorageInputOutput16 = 4436, + CapabilityDeviceGroup = 4437, + CapabilityMultiView = 4439, + CapabilityVariablePointersStorageBuffer = 4441, + CapabilityVariablePointers = 4442, + CapabilityAtomicStorageOps = 4445, + CapabilitySampleMaskPostDepthCoverage = 4447, + CapabilityFloat16ImageAMD = 5008, + CapabilityImageGatherBiasLodAMD = 5009, + CapabilityFragmentMaskAMD = 5010, + CapabilityStencilExportEXT = 5013, + CapabilityImageReadWriteLodAMD = 5015, + CapabilitySampleMaskOverrideCoverageNV = 5249, + CapabilityGeometryShaderPassthroughNV = 5251, + CapabilityShaderViewportIndexLayerEXT = 5254, + CapabilityShaderViewportIndexLayerNV = 5254, + CapabilityShaderViewportMaskNV = 5255, + CapabilityShaderStereoViewNV = 5259, + CapabilityPerViewAttributesNV = 5260, + CapabilityFragmentFullyCoveredEXT = 5265, + CapabilityGroupNonUniformPartitionedNV = 5297, + CapabilityShaderNonUniformEXT = 5301, + CapabilityRuntimeDescriptorArrayEXT = 5302, + CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, + CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, + CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, + CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, + CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, + CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, + CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, + CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, + CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, + CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilitySubgroupShuffleINTEL = 5568, + CapabilitySubgroupBufferBlockIOINTEL = 5569, + CapabilitySubgroupImageBlockIOINTEL = 5570, + CapabilityMax = 0x7fffffff, +}; + +enum Op { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpGroupNonUniformPartitionNV = 5296, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + OpMax = 0x7fffffff, +}; + +// Overload operator| for mask bit combining + +inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } + +} // end namespace spv + +#endif // #ifndef spirv_HPP + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 new file mode 100644 index 0000000000000000000000000000000000000000..4956a49169b156791c7c4a06b0ae72e59d49689b --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 @@ -0,0 +1,1099 @@ +// Copyright (c) 2014-2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +#ifndef spirv_HPP +#define spirv_HPP + +namespace spv { + +typedef unsigned int Id; + +#define SPV_VERSION 0x10300 +#define SPV_REVISION 1 + +static const unsigned int MagicNumber = 0x07230203; +static const unsigned int Version = 0x00010300; +static const unsigned int Revision = 1; +static const unsigned int OpCodeMask = 0xffff; +static const unsigned int WordCountShift = 16; + +enum class SourceLanguage : unsigned { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + Max = 0x7fffffff, +}; + +enum class ExecutionModel : unsigned { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + Max = 0x7fffffff, +}; + +enum class AddressingModel : unsigned { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + Max = 0x7fffffff, +}; + +enum class MemoryModel : unsigned { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + Max = 0x7fffffff, +}; + +enum class ExecutionMode : unsigned { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + PostDepthCoverage = 4446, + StencilRefReplacingEXT = 5027, + Max = 0x7fffffff, +}; + +enum class StorageClass : unsigned { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + Max = 0x7fffffff, +}; + +enum class Dim : unsigned { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + Max = 0x7fffffff, +}; + +enum class SamplerAddressingMode : unsigned { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, +}; + +enum class SamplerFilterMode : unsigned { + Nearest = 0, + Linear = 1, + Max = 0x7fffffff, +}; + +enum class ImageFormat : unsigned { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + Max = 0x7fffffff, +}; + +enum class ImageChannelOrder : unsigned { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + Max = 0x7fffffff, +}; + +enum class ImageChannelDataType : unsigned { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + Max = 0x7fffffff, +}; + +enum class ImageOperandsShift : unsigned { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + Max = 0x7fffffff, +}; + +enum class ImageOperandsMask : unsigned { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, +}; + +enum class FPFastMathModeShift : unsigned { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + Max = 0x7fffffff, +}; + +enum class FPFastMathModeMask : unsigned { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, +}; + +enum class FPRoundingMode : unsigned { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + Max = 0x7fffffff, +}; + +enum class LinkageType : unsigned { + Export = 0, + Import = 1, + Max = 0x7fffffff, +}; + +enum class AccessQualifier : unsigned { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + Max = 0x7fffffff, +}; + +enum class FunctionParameterAttribute : unsigned { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + Max = 0x7fffffff, +}; + +enum class Decoration : unsigned { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + ExplicitInterpAMD = 4999, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + NonUniformEXT = 5300, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + Max = 0x7fffffff, +}; + +enum class BuiltIn : unsigned { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + SubgroupEqMask = 4416, + SubgroupEqMaskKHR = 4416, + SubgroupGeMask = 4417, + SubgroupGeMaskKHR = 4417, + SubgroupGtMask = 4418, + SubgroupGtMaskKHR = 4418, + SubgroupLeMask = 4419, + SubgroupLeMaskKHR = 4419, + SubgroupLtMask = 4420, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + DeviceIndex = 4438, + ViewIndex = 4440, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + FullyCoveredEXT = 5264, + Max = 0x7fffffff, +}; + +enum class SelectionControlShift : unsigned { + Flatten = 0, + DontFlatten = 1, + Max = 0x7fffffff, +}; + +enum class SelectionControlMask : unsigned { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, +}; + +enum class LoopControlShift : unsigned { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + Max = 0x7fffffff, +}; + +enum class LoopControlMask : unsigned { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, +}; + +enum class FunctionControlShift : unsigned { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + Max = 0x7fffffff, +}; + +enum class FunctionControlMask : unsigned { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, +}; + +enum class MemorySemanticsShift : unsigned { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + Max = 0x7fffffff, +}; + +enum class MemorySemanticsMask : unsigned { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, +}; + +enum class MemoryAccessShift : unsigned { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + Max = 0x7fffffff, +}; + +enum class MemoryAccessMask : unsigned { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, +}; + +enum class Scope : unsigned { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + Max = 0x7fffffff, +}; + +enum class GroupOperation : unsigned { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + ClusteredReduce = 3, + PartitionedReduceNV = 6, + PartitionedInclusiveScanNV = 7, + PartitionedExclusiveScanNV = 8, + Max = 0x7fffffff, +}; + +enum class KernelEnqueueFlags : unsigned { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + Max = 0x7fffffff, +}; + +enum class KernelProfilingInfoShift : unsigned { + CmdExecTime = 0, + Max = 0x7fffffff, +}; + +enum class KernelProfilingInfoMask : unsigned { + MaskNone = 0, + CmdExecTime = 0x00000001, +}; + +enum class Capability : unsigned { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + GroupNonUniform = 61, + GroupNonUniformVote = 62, + GroupNonUniformArithmetic = 63, + GroupNonUniformBallot = 64, + GroupNonUniformShuffle = 65, + GroupNonUniformShuffleRelative = 66, + GroupNonUniformClustered = 67, + GroupNonUniformQuad = 68, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + Float16ImageAMD = 5008, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + FragmentFullyCoveredEXT = 5265, + GroupNonUniformPartitionedNV = 5297, + ShaderNonUniformEXT = 5301, + RuntimeDescriptorArrayEXT = 5302, + InputAttachmentArrayDynamicIndexingEXT = 5303, + UniformTexelBufferArrayDynamicIndexingEXT = 5304, + StorageTexelBufferArrayDynamicIndexingEXT = 5305, + UniformBufferArrayNonUniformIndexingEXT = 5306, + SampledImageArrayNonUniformIndexingEXT = 5307, + StorageBufferArrayNonUniformIndexingEXT = 5308, + StorageImageArrayNonUniformIndexingEXT = 5309, + InputAttachmentArrayNonUniformIndexingEXT = 5310, + UniformTexelBufferArrayNonUniformIndexingEXT = 5311, + StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + Max = 0x7fffffff, +}; + +enum class Op : unsigned { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpGroupNonUniformPartitionNV = 5296, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + Max = 0x7fffffff, +}; + +// Overload operator| for mask bit combining + +inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } + +} // end namespace spv + +#endif // #ifndef spirv_HPP + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json new file mode 100644 index 0000000000000000000000000000000000000000..5c3480e24cc8c31d3806c451bef8d2e27f2bca47 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json @@ -0,0 +1,1115 @@ +{ + "spv": + { + "meta": + { + "Comment": + [ + [ + "Copyright (c) 2014-2018 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + [ + "This header is automatically generated by the same tool that creates", + "the Binary Section of the SPIR-V specification." + ], + [ + "Enumeration tokens for SPIR-V, in various styles:", + " C, C++, C++11, JSON, Lua, Python", + "", + "- C will have tokens with a \"Spv\" prefix, e.g.: SpvSourceLanguageGLSL", + "- C++ will have tokens in the \"spv\" name space, e.g.: spv::SourceLanguageGLSL", + "- C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL", + "- Lua will use tables, e.g.: spv.SourceLanguage.GLSL", + "- Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']", + "", + "Some tokens act like mask values, which can be OR'd together,", + "while others are mutually exclusive. The mask-like ones have", + "\"Mask\" in their name, and a parallel enum that has the shift", + "amount (1 << x) for each corresponding enumerant." + ] + ], + "MagicNumber": 119734787, + "Version": 66304, + "Revision": 1, + "OpCodeMask": 65535, + "WordCountShift": 16 + }, + "enum": + [ + { + "Name": "SourceLanguage", + "Type": "Value", + "Values": + { + "Unknown": 0, + "ESSL": 1, + "GLSL": 2, + "OpenCL_C": 3, + "OpenCL_CPP": 4, + "HLSL": 5 + } + }, + { + "Name": "ExecutionModel", + "Type": "Value", + "Values": + { + "Vertex": 0, + "TessellationControl": 1, + "TessellationEvaluation": 2, + "Geometry": 3, + "Fragment": 4, + "GLCompute": 5, + "Kernel": 6 + } + }, + { + "Name": "AddressingModel", + "Type": "Value", + "Values": + { + "Logical": 0, + "Physical32": 1, + "Physical64": 2 + } + }, + { + "Name": "MemoryModel", + "Type": "Value", + "Values": + { + "Simple": 0, + "GLSL450": 1, + "OpenCL": 2 + } + }, + { + "Name": "ExecutionMode", + "Type": "Value", + "Values": + { + "Invocations": 0, + "SpacingEqual": 1, + "SpacingFractionalEven": 2, + "SpacingFractionalOdd": 3, + "VertexOrderCw": 4, + "VertexOrderCcw": 5, + "PixelCenterInteger": 6, + "OriginUpperLeft": 7, + "OriginLowerLeft": 8, + "EarlyFragmentTests": 9, + "PointMode": 10, + "Xfb": 11, + "DepthReplacing": 12, + "DepthGreater": 14, + "DepthLess": 15, + "DepthUnchanged": 16, + "LocalSize": 17, + "LocalSizeHint": 18, + "InputPoints": 19, + "InputLines": 20, + "InputLinesAdjacency": 21, + "Triangles": 22, + "InputTrianglesAdjacency": 23, + "Quads": 24, + "Isolines": 25, + "OutputVertices": 26, + "OutputPoints": 27, + "OutputLineStrip": 28, + "OutputTriangleStrip": 29, + "VecTypeHint": 30, + "ContractionOff": 31, + "Initializer": 33, + "Finalizer": 34, + "SubgroupSize": 35, + "SubgroupsPerWorkgroup": 36, + "SubgroupsPerWorkgroupId": 37, + "LocalSizeId": 38, + "LocalSizeHintId": 39, + "PostDepthCoverage": 4446, + "StencilRefReplacingEXT": 5027 + } + }, + { + "Name": "StorageClass", + "Type": "Value", + "Values": + { + "UniformConstant": 0, + "Input": 1, + "Uniform": 2, + "Output": 3, + "Workgroup": 4, + "CrossWorkgroup": 5, + "Private": 6, + "Function": 7, + "Generic": 8, + "PushConstant": 9, + "AtomicCounter": 10, + "Image": 11, + "StorageBuffer": 12 + } + }, + { + "Name": "Dim", + "Type": "Value", + "Values": + { + "Dim1D": 0, + "Dim2D": 1, + "Dim3D": 2, + "Cube": 3, + "Rect": 4, + "Buffer": 5, + "SubpassData": 6 + } + }, + { + "Name": "SamplerAddressingMode", + "Type": "Value", + "Values": + { + "None": 0, + "ClampToEdge": 1, + "Clamp": 2, + "Repeat": 3, + "RepeatMirrored": 4 + } + }, + { + "Name": "SamplerFilterMode", + "Type": "Value", + "Values": + { + "Nearest": 0, + "Linear": 1 + } + }, + { + "Name": "ImageFormat", + "Type": "Value", + "Values": + { + "Unknown": 0, + "Rgba32f": 1, + "Rgba16f": 2, + "R32f": 3, + "Rgba8": 4, + "Rgba8Snorm": 5, + "Rg32f": 6, + "Rg16f": 7, + "R11fG11fB10f": 8, + "R16f": 9, + "Rgba16": 10, + "Rgb10A2": 11, + "Rg16": 12, + "Rg8": 13, + "R16": 14, + "R8": 15, + "Rgba16Snorm": 16, + "Rg16Snorm": 17, + "Rg8Snorm": 18, + "R16Snorm": 19, + "R8Snorm": 20, + "Rgba32i": 21, + "Rgba16i": 22, + "Rgba8i": 23, + "R32i": 24, + "Rg32i": 25, + "Rg16i": 26, + "Rg8i": 27, + "R16i": 28, + "R8i": 29, + "Rgba32ui": 30, + "Rgba16ui": 31, + "Rgba8ui": 32, + "R32ui": 33, + "Rgb10a2ui": 34, + "Rg32ui": 35, + "Rg16ui": 36, + "Rg8ui": 37, + "R16ui": 38, + "R8ui": 39 + } + }, + { + "Name": "ImageChannelOrder", + "Type": "Value", + "Values": + { + "R": 0, + "A": 1, + "RG": 2, + "RA": 3, + "RGB": 4, + "RGBA": 5, + "BGRA": 6, + "ARGB": 7, + "Intensity": 8, + "Luminance": 9, + "Rx": 10, + "RGx": 11, + "RGBx": 12, + "Depth": 13, + "DepthStencil": 14, + "sRGB": 15, + "sRGBx": 16, + "sRGBA": 17, + "sBGRA": 18, + "ABGR": 19 + } + }, + { + "Name": "ImageChannelDataType", + "Type": "Value", + "Values": + { + "SnormInt8": 0, + "SnormInt16": 1, + "UnormInt8": 2, + "UnormInt16": 3, + "UnormShort565": 4, + "UnormShort555": 5, + "UnormInt101010": 6, + "SignedInt8": 7, + "SignedInt16": 8, + "SignedInt32": 9, + "UnsignedInt8": 10, + "UnsignedInt16": 11, + "UnsignedInt32": 12, + "HalfFloat": 13, + "Float": 14, + "UnormInt24": 15, + "UnormInt101010_2": 16 + } + }, + { + "Name": "ImageOperands", + "Type": "Bit", + "Values": + { + "Bias": 0, + "Lod": 1, + "Grad": 2, + "ConstOffset": 3, + "Offset": 4, + "ConstOffsets": 5, + "Sample": 6, + "MinLod": 7 + } + }, + { + "Name": "FPFastMathMode", + "Type": "Bit", + "Values": + { + "NotNaN": 0, + "NotInf": 1, + "NSZ": 2, + "AllowRecip": 3, + "Fast": 4 + } + }, + { + "Name": "FPRoundingMode", + "Type": "Value", + "Values": + { + "RTE": 0, + "RTZ": 1, + "RTP": 2, + "RTN": 3 + } + }, + { + "Name": "LinkageType", + "Type": "Value", + "Values": + { + "Export": 0, + "Import": 1 + } + }, + { + "Name": "AccessQualifier", + "Type": "Value", + "Values": + { + "ReadOnly": 0, + "WriteOnly": 1, + "ReadWrite": 2 + } + }, + { + "Name": "FunctionParameterAttribute", + "Type": "Value", + "Values": + { + "Zext": 0, + "Sext": 1, + "ByVal": 2, + "Sret": 3, + "NoAlias": 4, + "NoCapture": 5, + "NoWrite": 6, + "NoReadWrite": 7 + } + }, + { + "Name": "Decoration", + "Type": "Value", + "Values": + { + "RelaxedPrecision": 0, + "SpecId": 1, + "Block": 2, + "BufferBlock": 3, + "RowMajor": 4, + "ColMajor": 5, + "ArrayStride": 6, + "MatrixStride": 7, + "GLSLShared": 8, + "GLSLPacked": 9, + "CPacked": 10, + "BuiltIn": 11, + "NoPerspective": 13, + "Flat": 14, + "Patch": 15, + "Centroid": 16, + "Sample": 17, + "Invariant": 18, + "Restrict": 19, + "Aliased": 20, + "Volatile": 21, + "Constant": 22, + "Coherent": 23, + "NonWritable": 24, + "NonReadable": 25, + "Uniform": 26, + "SaturatedConversion": 28, + "Stream": 29, + "Location": 30, + "Component": 31, + "Index": 32, + "Binding": 33, + "DescriptorSet": 34, + "Offset": 35, + "XfbBuffer": 36, + "XfbStride": 37, + "FuncParamAttr": 38, + "FPRoundingMode": 39, + "FPFastMathMode": 40, + "LinkageAttributes": 41, + "NoContraction": 42, + "InputAttachmentIndex": 43, + "Alignment": 44, + "MaxByteOffset": 45, + "AlignmentId": 46, + "MaxByteOffsetId": 47, + "ExplicitInterpAMD": 4999, + "OverrideCoverageNV": 5248, + "PassthroughNV": 5250, + "ViewportRelativeNV": 5252, + "SecondaryViewportRelativeNV": 5256, + "NonUniformEXT": 5300, + "HlslCounterBufferGOOGLE": 5634, + "HlslSemanticGOOGLE": 5635 + } + }, + { + "Name": "BuiltIn", + "Type": "Value", + "Values": + { + "Position": 0, + "PointSize": 1, + "ClipDistance": 3, + "CullDistance": 4, + "VertexId": 5, + "InstanceId": 6, + "PrimitiveId": 7, + "InvocationId": 8, + "Layer": 9, + "ViewportIndex": 10, + "TessLevelOuter": 11, + "TessLevelInner": 12, + "TessCoord": 13, + "PatchVertices": 14, + "FragCoord": 15, + "PointCoord": 16, + "FrontFacing": 17, + "SampleId": 18, + "SamplePosition": 19, + "SampleMask": 20, + "FragDepth": 22, + "HelperInvocation": 23, + "NumWorkgroups": 24, + "WorkgroupSize": 25, + "WorkgroupId": 26, + "LocalInvocationId": 27, + "GlobalInvocationId": 28, + "LocalInvocationIndex": 29, + "WorkDim": 30, + "GlobalSize": 31, + "EnqueuedWorkgroupSize": 32, + "GlobalOffset": 33, + "GlobalLinearId": 34, + "SubgroupSize": 36, + "SubgroupMaxSize": 37, + "NumSubgroups": 38, + "NumEnqueuedSubgroups": 39, + "SubgroupId": 40, + "SubgroupLocalInvocationId": 41, + "VertexIndex": 42, + "InstanceIndex": 43, + "SubgroupEqMask": 4416, + "SubgroupEqMaskKHR": 4416, + "SubgroupGeMask": 4417, + "SubgroupGeMaskKHR": 4417, + "SubgroupGtMask": 4418, + "SubgroupGtMaskKHR": 4418, + "SubgroupLeMask": 4419, + "SubgroupLeMaskKHR": 4419, + "SubgroupLtMask": 4420, + "SubgroupLtMaskKHR": 4420, + "BaseVertex": 4424, + "BaseInstance": 4425, + "DrawIndex": 4426, + "DeviceIndex": 4438, + "ViewIndex": 4440, + "BaryCoordNoPerspAMD": 4992, + "BaryCoordNoPerspCentroidAMD": 4993, + "BaryCoordNoPerspSampleAMD": 4994, + "BaryCoordSmoothAMD": 4995, + "BaryCoordSmoothCentroidAMD": 4996, + "BaryCoordSmoothSampleAMD": 4997, + "BaryCoordPullModelAMD": 4998, + "FragStencilRefEXT": 5014, + "ViewportMaskNV": 5253, + "SecondaryPositionNV": 5257, + "SecondaryViewportMaskNV": 5258, + "PositionPerViewNV": 5261, + "ViewportMaskPerViewNV": 5262, + "FullyCoveredEXT": 5264 + } + }, + { + "Name": "SelectionControl", + "Type": "Bit", + "Values": + { + "Flatten": 0, + "DontFlatten": 1 + } + }, + { + "Name": "LoopControl", + "Type": "Bit", + "Values": + { + "Unroll": 0, + "DontUnroll": 1, + "DependencyInfinite": 2, + "DependencyLength": 3 + } + }, + { + "Name": "FunctionControl", + "Type": "Bit", + "Values": + { + "Inline": 0, + "DontInline": 1, + "Pure": 2, + "Const": 3 + } + }, + { + "Name": "MemorySemantics", + "Type": "Bit", + "Values": + { + "Acquire": 1, + "Release": 2, + "AcquireRelease": 3, + "SequentiallyConsistent": 4, + "UniformMemory": 6, + "SubgroupMemory": 7, + "WorkgroupMemory": 8, + "CrossWorkgroupMemory": 9, + "AtomicCounterMemory": 10, + "ImageMemory": 11 + } + }, + { + "Name": "MemoryAccess", + "Type": "Bit", + "Values": + { + "Volatile": 0, + "Aligned": 1, + "Nontemporal": 2 + } + }, + { + "Name": "Scope", + "Type": "Value", + "Values": + { + "CrossDevice": 0, + "Device": 1, + "Workgroup": 2, + "Subgroup": 3, + "Invocation": 4 + } + }, + { + "Name": "GroupOperation", + "Type": "Value", + "Values": + { + "Reduce": 0, + "InclusiveScan": 1, + "ExclusiveScan": 2, + "ClusteredReduce": 3, + "PartitionedReduceNV": 6, + "PartitionedInclusiveScanNV": 7, + "PartitionedExclusiveScanNV": 8 + } + }, + { + "Name": "KernelEnqueueFlags", + "Type": "Value", + "Values": + { + "NoWait": 0, + "WaitKernel": 1, + "WaitWorkGroup": 2 + } + }, + { + "Name": "KernelProfilingInfo", + "Type": "Bit", + "Values": + { + "CmdExecTime": 0 + } + }, + { + "Name": "Capability", + "Type": "Value", + "Values": + { + "Matrix": 0, + "Shader": 1, + "Geometry": 2, + "Tessellation": 3, + "Addresses": 4, + "Linkage": 5, + "Kernel": 6, + "Vector16": 7, + "Float16Buffer": 8, + "Float16": 9, + "Float64": 10, + "Int64": 11, + "Int64Atomics": 12, + "ImageBasic": 13, + "ImageReadWrite": 14, + "ImageMipmap": 15, + "Pipes": 17, + "Groups": 18, + "DeviceEnqueue": 19, + "LiteralSampler": 20, + "AtomicStorage": 21, + "Int16": 22, + "TessellationPointSize": 23, + "GeometryPointSize": 24, + "ImageGatherExtended": 25, + "StorageImageMultisample": 27, + "UniformBufferArrayDynamicIndexing": 28, + "SampledImageArrayDynamicIndexing": 29, + "StorageBufferArrayDynamicIndexing": 30, + "StorageImageArrayDynamicIndexing": 31, + "ClipDistance": 32, + "CullDistance": 33, + "ImageCubeArray": 34, + "SampleRateShading": 35, + "ImageRect": 36, + "SampledRect": 37, + "GenericPointer": 38, + "Int8": 39, + "InputAttachment": 40, + "SparseResidency": 41, + "MinLod": 42, + "Sampled1D": 43, + "Image1D": 44, + "SampledCubeArray": 45, + "SampledBuffer": 46, + "ImageBuffer": 47, + "ImageMSArray": 48, + "StorageImageExtendedFormats": 49, + "ImageQuery": 50, + "DerivativeControl": 51, + "InterpolationFunction": 52, + "TransformFeedback": 53, + "GeometryStreams": 54, + "StorageImageReadWithoutFormat": 55, + "StorageImageWriteWithoutFormat": 56, + "MultiViewport": 57, + "SubgroupDispatch": 58, + "NamedBarrier": 59, + "PipeStorage": 60, + "GroupNonUniform": 61, + "GroupNonUniformVote": 62, + "GroupNonUniformArithmetic": 63, + "GroupNonUniformBallot": 64, + "GroupNonUniformShuffle": 65, + "GroupNonUniformShuffleRelative": 66, + "GroupNonUniformClustered": 67, + "GroupNonUniformQuad": 68, + "SubgroupBallotKHR": 4423, + "DrawParameters": 4427, + "SubgroupVoteKHR": 4431, + "StorageBuffer16BitAccess": 4433, + "StorageUniformBufferBlock16": 4433, + "StorageUniform16": 4434, + "UniformAndStorageBuffer16BitAccess": 4434, + "StoragePushConstant16": 4435, + "StorageInputOutput16": 4436, + "DeviceGroup": 4437, + "MultiView": 4439, + "VariablePointersStorageBuffer": 4441, + "VariablePointers": 4442, + "AtomicStorageOps": 4445, + "SampleMaskPostDepthCoverage": 4447, + "Float16ImageAMD": 5008, + "ImageGatherBiasLodAMD": 5009, + "FragmentMaskAMD": 5010, + "StencilExportEXT": 5013, + "ImageReadWriteLodAMD": 5015, + "SampleMaskOverrideCoverageNV": 5249, + "GeometryShaderPassthroughNV": 5251, + "ShaderViewportIndexLayerEXT": 5254, + "ShaderViewportIndexLayerNV": 5254, + "ShaderViewportMaskNV": 5255, + "ShaderStereoViewNV": 5259, + "PerViewAttributesNV": 5260, + "FragmentFullyCoveredEXT": 5265, + "GroupNonUniformPartitionedNV": 5297, + "ShaderNonUniformEXT": 5301, + "RuntimeDescriptorArrayEXT": 5302, + "InputAttachmentArrayDynamicIndexingEXT": 5303, + "UniformTexelBufferArrayDynamicIndexingEXT": 5304, + "StorageTexelBufferArrayDynamicIndexingEXT": 5305, + "UniformBufferArrayNonUniformIndexingEXT": 5306, + "SampledImageArrayNonUniformIndexingEXT": 5307, + "StorageBufferArrayNonUniformIndexingEXT": 5308, + "StorageImageArrayNonUniformIndexingEXT": 5309, + "InputAttachmentArrayNonUniformIndexingEXT": 5310, + "UniformTexelBufferArrayNonUniformIndexingEXT": 5311, + "StorageTexelBufferArrayNonUniformIndexingEXT": 5312, + "SubgroupShuffleINTEL": 5568, + "SubgroupBufferBlockIOINTEL": 5569, + "SubgroupImageBlockIOINTEL": 5570 + } + }, + { + "Name": "Op", + "Type": "Value", + "Values": + { + "OpNop": 0, + "OpUndef": 1, + "OpSourceContinued": 2, + "OpSource": 3, + "OpSourceExtension": 4, + "OpName": 5, + "OpMemberName": 6, + "OpString": 7, + "OpLine": 8, + "OpExtension": 10, + "OpExtInstImport": 11, + "OpExtInst": 12, + "OpMemoryModel": 14, + "OpEntryPoint": 15, + "OpExecutionMode": 16, + "OpCapability": 17, + "OpTypeVoid": 19, + "OpTypeBool": 20, + "OpTypeInt": 21, + "OpTypeFloat": 22, + "OpTypeVector": 23, + "OpTypeMatrix": 24, + "OpTypeImage": 25, + "OpTypeSampler": 26, + "OpTypeSampledImage": 27, + "OpTypeArray": 28, + "OpTypeRuntimeArray": 29, + "OpTypeStruct": 30, + "OpTypeOpaque": 31, + "OpTypePointer": 32, + "OpTypeFunction": 33, + "OpTypeEvent": 34, + "OpTypeDeviceEvent": 35, + "OpTypeReserveId": 36, + "OpTypeQueue": 37, + "OpTypePipe": 38, + "OpTypeForwardPointer": 39, + "OpConstantTrue": 41, + "OpConstantFalse": 42, + "OpConstant": 43, + "OpConstantComposite": 44, + "OpConstantSampler": 45, + "OpConstantNull": 46, + "OpSpecConstantTrue": 48, + "OpSpecConstantFalse": 49, + "OpSpecConstant": 50, + "OpSpecConstantComposite": 51, + "OpSpecConstantOp": 52, + "OpFunction": 54, + "OpFunctionParameter": 55, + "OpFunctionEnd": 56, + "OpFunctionCall": 57, + "OpVariable": 59, + "OpImageTexelPointer": 60, + "OpLoad": 61, + "OpStore": 62, + "OpCopyMemory": 63, + "OpCopyMemorySized": 64, + "OpAccessChain": 65, + "OpInBoundsAccessChain": 66, + "OpPtrAccessChain": 67, + "OpArrayLength": 68, + "OpGenericPtrMemSemantics": 69, + "OpInBoundsPtrAccessChain": 70, + "OpDecorate": 71, + "OpMemberDecorate": 72, + "OpDecorationGroup": 73, + "OpGroupDecorate": 74, + "OpGroupMemberDecorate": 75, + "OpVectorExtractDynamic": 77, + "OpVectorInsertDynamic": 78, + "OpVectorShuffle": 79, + "OpCompositeConstruct": 80, + "OpCompositeExtract": 81, + "OpCompositeInsert": 82, + "OpCopyObject": 83, + "OpTranspose": 84, + "OpSampledImage": 86, + "OpImageSampleImplicitLod": 87, + "OpImageSampleExplicitLod": 88, + "OpImageSampleDrefImplicitLod": 89, + "OpImageSampleDrefExplicitLod": 90, + "OpImageSampleProjImplicitLod": 91, + "OpImageSampleProjExplicitLod": 92, + "OpImageSampleProjDrefImplicitLod": 93, + "OpImageSampleProjDrefExplicitLod": 94, + "OpImageFetch": 95, + "OpImageGather": 96, + "OpImageDrefGather": 97, + "OpImageRead": 98, + "OpImageWrite": 99, + "OpImage": 100, + "OpImageQueryFormat": 101, + "OpImageQueryOrder": 102, + "OpImageQuerySizeLod": 103, + "OpImageQuerySize": 104, + "OpImageQueryLod": 105, + "OpImageQueryLevels": 106, + "OpImageQuerySamples": 107, + "OpConvertFToU": 109, + "OpConvertFToS": 110, + "OpConvertSToF": 111, + "OpConvertUToF": 112, + "OpUConvert": 113, + "OpSConvert": 114, + "OpFConvert": 115, + "OpQuantizeToF16": 116, + "OpConvertPtrToU": 117, + "OpSatConvertSToU": 118, + "OpSatConvertUToS": 119, + "OpConvertUToPtr": 120, + "OpPtrCastToGeneric": 121, + "OpGenericCastToPtr": 122, + "OpGenericCastToPtrExplicit": 123, + "OpBitcast": 124, + "OpSNegate": 126, + "OpFNegate": 127, + "OpIAdd": 128, + "OpFAdd": 129, + "OpISub": 130, + "OpFSub": 131, + "OpIMul": 132, + "OpFMul": 133, + "OpUDiv": 134, + "OpSDiv": 135, + "OpFDiv": 136, + "OpUMod": 137, + "OpSRem": 138, + "OpSMod": 139, + "OpFRem": 140, + "OpFMod": 141, + "OpVectorTimesScalar": 142, + "OpMatrixTimesScalar": 143, + "OpVectorTimesMatrix": 144, + "OpMatrixTimesVector": 145, + "OpMatrixTimesMatrix": 146, + "OpOuterProduct": 147, + "OpDot": 148, + "OpIAddCarry": 149, + "OpISubBorrow": 150, + "OpUMulExtended": 151, + "OpSMulExtended": 152, + "OpAny": 154, + "OpAll": 155, + "OpIsNan": 156, + "OpIsInf": 157, + "OpIsFinite": 158, + "OpIsNormal": 159, + "OpSignBitSet": 160, + "OpLessOrGreater": 161, + "OpOrdered": 162, + "OpUnordered": 163, + "OpLogicalEqual": 164, + "OpLogicalNotEqual": 165, + "OpLogicalOr": 166, + "OpLogicalAnd": 167, + "OpLogicalNot": 168, + "OpSelect": 169, + "OpIEqual": 170, + "OpINotEqual": 171, + "OpUGreaterThan": 172, + "OpSGreaterThan": 173, + "OpUGreaterThanEqual": 174, + "OpSGreaterThanEqual": 175, + "OpULessThan": 176, + "OpSLessThan": 177, + "OpULessThanEqual": 178, + "OpSLessThanEqual": 179, + "OpFOrdEqual": 180, + "OpFUnordEqual": 181, + "OpFOrdNotEqual": 182, + "OpFUnordNotEqual": 183, + "OpFOrdLessThan": 184, + "OpFUnordLessThan": 185, + "OpFOrdGreaterThan": 186, + "OpFUnordGreaterThan": 187, + "OpFOrdLessThanEqual": 188, + "OpFUnordLessThanEqual": 189, + "OpFOrdGreaterThanEqual": 190, + "OpFUnordGreaterThanEqual": 191, + "OpShiftRightLogical": 194, + "OpShiftRightArithmetic": 195, + "OpShiftLeftLogical": 196, + "OpBitwiseOr": 197, + "OpBitwiseXor": 198, + "OpBitwiseAnd": 199, + "OpNot": 200, + "OpBitFieldInsert": 201, + "OpBitFieldSExtract": 202, + "OpBitFieldUExtract": 203, + "OpBitReverse": 204, + "OpBitCount": 205, + "OpDPdx": 207, + "OpDPdy": 208, + "OpFwidth": 209, + "OpDPdxFine": 210, + "OpDPdyFine": 211, + "OpFwidthFine": 212, + "OpDPdxCoarse": 213, + "OpDPdyCoarse": 214, + "OpFwidthCoarse": 215, + "OpEmitVertex": 218, + "OpEndPrimitive": 219, + "OpEmitStreamVertex": 220, + "OpEndStreamPrimitive": 221, + "OpControlBarrier": 224, + "OpMemoryBarrier": 225, + "OpAtomicLoad": 227, + "OpAtomicStore": 228, + "OpAtomicExchange": 229, + "OpAtomicCompareExchange": 230, + "OpAtomicCompareExchangeWeak": 231, + "OpAtomicIIncrement": 232, + "OpAtomicIDecrement": 233, + "OpAtomicIAdd": 234, + "OpAtomicISub": 235, + "OpAtomicSMin": 236, + "OpAtomicUMin": 237, + "OpAtomicSMax": 238, + "OpAtomicUMax": 239, + "OpAtomicAnd": 240, + "OpAtomicOr": 241, + "OpAtomicXor": 242, + "OpPhi": 245, + "OpLoopMerge": 246, + "OpSelectionMerge": 247, + "OpLabel": 248, + "OpBranch": 249, + "OpBranchConditional": 250, + "OpSwitch": 251, + "OpKill": 252, + "OpReturn": 253, + "OpReturnValue": 254, + "OpUnreachable": 255, + "OpLifetimeStart": 256, + "OpLifetimeStop": 257, + "OpGroupAsyncCopy": 259, + "OpGroupWaitEvents": 260, + "OpGroupAll": 261, + "OpGroupAny": 262, + "OpGroupBroadcast": 263, + "OpGroupIAdd": 264, + "OpGroupFAdd": 265, + "OpGroupFMin": 266, + "OpGroupUMin": 267, + "OpGroupSMin": 268, + "OpGroupFMax": 269, + "OpGroupUMax": 270, + "OpGroupSMax": 271, + "OpReadPipe": 274, + "OpWritePipe": 275, + "OpReservedReadPipe": 276, + "OpReservedWritePipe": 277, + "OpReserveReadPipePackets": 278, + "OpReserveWritePipePackets": 279, + "OpCommitReadPipe": 280, + "OpCommitWritePipe": 281, + "OpIsValidReserveId": 282, + "OpGetNumPipePackets": 283, + "OpGetMaxPipePackets": 284, + "OpGroupReserveReadPipePackets": 285, + "OpGroupReserveWritePipePackets": 286, + "OpGroupCommitReadPipe": 287, + "OpGroupCommitWritePipe": 288, + "OpEnqueueMarker": 291, + "OpEnqueueKernel": 292, + "OpGetKernelNDrangeSubGroupCount": 293, + "OpGetKernelNDrangeMaxSubGroupSize": 294, + "OpGetKernelWorkGroupSize": 295, + "OpGetKernelPreferredWorkGroupSizeMultiple": 296, + "OpRetainEvent": 297, + "OpReleaseEvent": 298, + "OpCreateUserEvent": 299, + "OpIsValidEvent": 300, + "OpSetUserEventStatus": 301, + "OpCaptureEventProfilingInfo": 302, + "OpGetDefaultQueue": 303, + "OpBuildNDRange": 304, + "OpImageSparseSampleImplicitLod": 305, + "OpImageSparseSampleExplicitLod": 306, + "OpImageSparseSampleDrefImplicitLod": 307, + "OpImageSparseSampleDrefExplicitLod": 308, + "OpImageSparseSampleProjImplicitLod": 309, + "OpImageSparseSampleProjExplicitLod": 310, + "OpImageSparseSampleProjDrefImplicitLod": 311, + "OpImageSparseSampleProjDrefExplicitLod": 312, + "OpImageSparseFetch": 313, + "OpImageSparseGather": 314, + "OpImageSparseDrefGather": 315, + "OpImageSparseTexelsResident": 316, + "OpNoLine": 317, + "OpAtomicFlagTestAndSet": 318, + "OpAtomicFlagClear": 319, + "OpImageSparseRead": 320, + "OpSizeOf": 321, + "OpTypePipeStorage": 322, + "OpConstantPipeStorage": 323, + "OpCreatePipeFromPipeStorage": 324, + "OpGetKernelLocalSizeForSubgroupCount": 325, + "OpGetKernelMaxNumSubgroups": 326, + "OpTypeNamedBarrier": 327, + "OpNamedBarrierInitialize": 328, + "OpMemoryNamedBarrier": 329, + "OpModuleProcessed": 330, + "OpExecutionModeId": 331, + "OpDecorateId": 332, + "OpGroupNonUniformElect": 333, + "OpGroupNonUniformAll": 334, + "OpGroupNonUniformAny": 335, + "OpGroupNonUniformAllEqual": 336, + "OpGroupNonUniformBroadcast": 337, + "OpGroupNonUniformBroadcastFirst": 338, + "OpGroupNonUniformBallot": 339, + "OpGroupNonUniformInverseBallot": 340, + "OpGroupNonUniformBallotBitExtract": 341, + "OpGroupNonUniformBallotBitCount": 342, + "OpGroupNonUniformBallotFindLSB": 343, + "OpGroupNonUniformBallotFindMSB": 344, + "OpGroupNonUniformShuffle": 345, + "OpGroupNonUniformShuffleXor": 346, + "OpGroupNonUniformShuffleUp": 347, + "OpGroupNonUniformShuffleDown": 348, + "OpGroupNonUniformIAdd": 349, + "OpGroupNonUniformFAdd": 350, + "OpGroupNonUniformIMul": 351, + "OpGroupNonUniformFMul": 352, + "OpGroupNonUniformSMin": 353, + "OpGroupNonUniformUMin": 354, + "OpGroupNonUniformFMin": 355, + "OpGroupNonUniformSMax": 356, + "OpGroupNonUniformUMax": 357, + "OpGroupNonUniformFMax": 358, + "OpGroupNonUniformBitwiseAnd": 359, + "OpGroupNonUniformBitwiseOr": 360, + "OpGroupNonUniformBitwiseXor": 361, + "OpGroupNonUniformLogicalAnd": 362, + "OpGroupNonUniformLogicalOr": 363, + "OpGroupNonUniformLogicalXor": 364, + "OpGroupNonUniformQuadBroadcast": 365, + "OpGroupNonUniformQuadSwap": 366, + "OpSubgroupBallotKHR": 4421, + "OpSubgroupFirstInvocationKHR": 4422, + "OpSubgroupAllKHR": 4428, + "OpSubgroupAnyKHR": 4429, + "OpSubgroupAllEqualKHR": 4430, + "OpSubgroupReadInvocationKHR": 4432, + "OpGroupIAddNonUniformAMD": 5000, + "OpGroupFAddNonUniformAMD": 5001, + "OpGroupFMinNonUniformAMD": 5002, + "OpGroupUMinNonUniformAMD": 5003, + "OpGroupSMinNonUniformAMD": 5004, + "OpGroupFMaxNonUniformAMD": 5005, + "OpGroupUMaxNonUniformAMD": 5006, + "OpGroupSMaxNonUniformAMD": 5007, + "OpFragmentMaskFetchAMD": 5011, + "OpFragmentFetchAMD": 5012, + "OpGroupNonUniformPartitionNV": 5296, + "OpSubgroupShuffleINTEL": 5571, + "OpSubgroupShuffleDownINTEL": 5572, + "OpSubgroupShuffleUpINTEL": 5573, + "OpSubgroupShuffleXorINTEL": 5574, + "OpSubgroupBlockReadINTEL": 5575, + "OpSubgroupBlockWriteINTEL": 5576, + "OpSubgroupImageBlockReadINTEL": 5577, + "OpSubgroupImageBlockWriteINTEL": 5578, + "OpDecorateStringGOOGLE": 5632, + "OpMemberDecorateStringGOOGLE": 5633 + } + } + ] + } +} + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua new file mode 100644 index 0000000000000000000000000000000000000000..8a3b496da96248fbfade3fc545cdbd6db9129e45 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua @@ -0,0 +1,1046 @@ +-- Copyright (c) 2014-2018 The Khronos Group Inc. +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and/or associated documentation files (the "Materials"), +-- to deal in the Materials without restriction, including without limitation +-- the rights to use, copy, modify, merge, publish, distribute, sublicense, +-- and/or sell copies of the Materials, and to permit persons to whom the +-- Materials are furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Materials. +-- +-- MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +-- STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +-- HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +-- +-- THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +-- FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +-- IN THE MATERIALS. + +-- This header is automatically generated by the same tool that creates +-- the Binary Section of the SPIR-V specification. + +-- Enumeration tokens for SPIR-V, in various styles: +-- C, C++, C++11, JSON, Lua, Python +-- +-- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +-- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +-- - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +-- - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +-- - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +-- +-- Some tokens act like mask values, which can be OR'd together, +-- while others are mutually exclusive. The mask-like ones have +-- "Mask" in their name, and a parallel enum that has the shift +-- amount (1 << x) for each corresponding enumerant. + +spv = { + MagicNumber = 0x07230203, + Version = 0x00010300, + Revision = 1, + OpCodeMask = 0xffff, + WordCountShift = 16, + + SourceLanguage = { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + }, + + ExecutionModel = { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + }, + + AddressingModel = { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + }, + + MemoryModel = { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + }, + + ExecutionMode = { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + PostDepthCoverage = 4446, + StencilRefReplacingEXT = 5027, + }, + + StorageClass = { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + }, + + Dim = { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + }, + + SamplerAddressingMode = { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + }, + + SamplerFilterMode = { + Nearest = 0, + Linear = 1, + }, + + ImageFormat = { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + }, + + ImageChannelOrder = { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + }, + + ImageChannelDataType = { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + }, + + ImageOperandsShift = { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + }, + + ImageOperandsMask = { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + }, + + FPFastMathModeShift = { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + }, + + FPFastMathModeMask = { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + }, + + FPRoundingMode = { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + }, + + LinkageType = { + Export = 0, + Import = 1, + }, + + AccessQualifier = { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + }, + + FunctionParameterAttribute = { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + }, + + Decoration = { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + ExplicitInterpAMD = 4999, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + NonUniformEXT = 5300, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + }, + + BuiltIn = { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + SubgroupEqMask = 4416, + SubgroupEqMaskKHR = 4416, + SubgroupGeMask = 4417, + SubgroupGeMaskKHR = 4417, + SubgroupGtMask = 4418, + SubgroupGtMaskKHR = 4418, + SubgroupLeMask = 4419, + SubgroupLeMaskKHR = 4419, + SubgroupLtMask = 4420, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + DeviceIndex = 4438, + ViewIndex = 4440, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + FullyCoveredEXT = 5264, + }, + + SelectionControlShift = { + Flatten = 0, + DontFlatten = 1, + }, + + SelectionControlMask = { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, + }, + + LoopControlShift = { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + }, + + LoopControlMask = { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + }, + + FunctionControlShift = { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + }, + + FunctionControlMask = { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + }, + + MemorySemanticsShift = { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + }, + + MemorySemanticsMask = { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + }, + + MemoryAccessShift = { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + }, + + MemoryAccessMask = { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + }, + + Scope = { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + }, + + GroupOperation = { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + ClusteredReduce = 3, + PartitionedReduceNV = 6, + PartitionedInclusiveScanNV = 7, + PartitionedExclusiveScanNV = 8, + }, + + KernelEnqueueFlags = { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + }, + + KernelProfilingInfoShift = { + CmdExecTime = 0, + }, + + KernelProfilingInfoMask = { + MaskNone = 0, + CmdExecTime = 0x00000001, + }, + + Capability = { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + GroupNonUniform = 61, + GroupNonUniformVote = 62, + GroupNonUniformArithmetic = 63, + GroupNonUniformBallot = 64, + GroupNonUniformShuffle = 65, + GroupNonUniformShuffleRelative = 66, + GroupNonUniformClustered = 67, + GroupNonUniformQuad = 68, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + Float16ImageAMD = 5008, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + FragmentFullyCoveredEXT = 5265, + GroupNonUniformPartitionedNV = 5297, + ShaderNonUniformEXT = 5301, + RuntimeDescriptorArrayEXT = 5302, + InputAttachmentArrayDynamicIndexingEXT = 5303, + UniformTexelBufferArrayDynamicIndexingEXT = 5304, + StorageTexelBufferArrayDynamicIndexingEXT = 5305, + UniformBufferArrayNonUniformIndexingEXT = 5306, + SampledImageArrayNonUniformIndexingEXT = 5307, + StorageBufferArrayNonUniformIndexingEXT = 5308, + StorageImageArrayNonUniformIndexingEXT = 5309, + InputAttachmentArrayNonUniformIndexingEXT = 5310, + UniformTexelBufferArrayNonUniformIndexingEXT = 5311, + StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + }, + + Op = { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpGroupNonUniformPartitionNV = 5296, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + }, + +} + diff --git a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.h b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.h index b7bcc0f506574c0f164e993ebae6bf1b592a1cd4..d6cb60c033bd58e7b1487b8e052d6716143947e7 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.h @@ -24,6 +24,24 @@ extern "C" { #include #include +#if defined(SPIRV_TOOLS_SHAREDLIB) +#if defined(_WIN32) +#if defined(SPIRV_TOOLS_IMPLEMENTATION) +#define SPIRV_TOOLS_EXPORT __declspec(dllexport) +#else +#define SPIRV_TOOLS_EXPORT __declspec(dllimport) +#endif +#else +#if defined(SPIRV_TOOLS_IMPLEMENTATION) +#define SPIRV_TOOLS_EXPORT __attribute__((visibility("default"))) +#else +#define SPIRV_TOOLS_EXPORT +#endif +#endif +#else +#define SPIRV_TOOLS_EXPORT +#endif + // Helpers #define SPV_BIT(shift) (1 << (shift)) @@ -55,6 +73,7 @@ typedef enum spv_result_t { SPV_ERROR_INVALID_CAPABILITY = -13, SPV_ERROR_INVALID_DATA = -14, // Indicates data rules validation failure. SPV_ERROR_MISSING_EXTENSION = -15, + SPV_ERROR_WRONG_VERSION = -16, // Indicates wrong SPIR-V version SPV_FORCE_32_BIT_ENUM(spv_result_t) } spv_result_t; @@ -96,11 +115,8 @@ typedef enum spv_operand_type_t { // A sentinel value. SPV_OPERAND_TYPE_NONE = 0, -#define FIRST_CONCRETE(ENUM) ENUM, SPV_OPERAND_TYPE_FIRST_CONCRETE_TYPE = ENUM -#define LAST_CONCRETE(ENUM) ENUM, SPV_OPERAND_TYPE_LAST_CONCRETE_TYPE = ENUM - // Set 1: Operands that are IDs. - FIRST_CONCRETE(SPV_OPERAND_TYPE_ID), + SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, // SPIR-V Sec 3.25 @@ -150,21 +166,14 @@ typedef enum spv_operand_type_t { SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO, // SPIR-V Sec 3.30 SPV_OPERAND_TYPE_CAPABILITY, // SPIR-V Sec 3.31 -// Set 5: Operands that are a single word bitmask. -// Sometimes a set bit indicates the instruction requires still more operands. -#define FIRST_CONCRETE_MASK(ENUM) \ - ENUM, SPV_OPERAND_TYPE_FIRST_CONCRETE_MASK_TYPE = ENUM - FIRST_CONCRETE_MASK(SPV_OPERAND_TYPE_IMAGE), // SPIR-V Sec 3.14 - SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, // SPIR-V Sec 3.15 - SPV_OPERAND_TYPE_SELECTION_CONTROL, // SPIR-V Sec 3.22 - SPV_OPERAND_TYPE_LOOP_CONTROL, // SPIR-V Sec 3.23 - SPV_OPERAND_TYPE_FUNCTION_CONTROL, // SPIR-V Sec 3.24 - LAST_CONCRETE(SPV_OPERAND_TYPE_MEMORY_ACCESS), // SPIR-V Sec 3.26 - SPV_OPERAND_TYPE_LAST_CONCRETE_MASK_TYPE = - SPV_OPERAND_TYPE_LAST_CONCRETE_TYPE, -#undef FIRST_CONCRETE_MASK -#undef FIRST_CONCRETE -#undef LAST_CONCRETE + // Set 5: Operands that are a single word bitmask. + // Sometimes a set bit indicates the instruction requires still more operands. + SPV_OPERAND_TYPE_IMAGE, // SPIR-V Sec 3.14 + SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, // SPIR-V Sec 3.15 + SPV_OPERAND_TYPE_SELECTION_CONTROL, // SPIR-V Sec 3.22 + SPV_OPERAND_TYPE_LOOP_CONTROL, // SPIR-V Sec 3.23 + SPV_OPERAND_TYPE_FUNCTION_CONTROL, // SPIR-V Sec 3.24 + SPV_OPERAND_TYPE_MEMORY_ACCESS, // SPIR-V Sec 3.26 // The remaining operand types are only used internally by the assembler. // There are two categories: @@ -216,6 +225,13 @@ typedef enum spv_operand_type_t { // A sequence of zero or more pairs of (Id, Literal integer) LAST_VARIABLE(SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL_INTEGER), + // The following are concrete enum types. + SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS, // DebugInfo Sec 3.2. A mask. + SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING, // DebugInfo Sec 3.3 + SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE, // DebugInfo Sec 3.4 + SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER, // DebugInfo Sec 3.5 + SPV_OPERAND_TYPE_DEBUG_OPERATION, // DebugInfo Sec 3.6 + // This is a sentinel value, and does not represent an operand type. // It should come last. SPV_OPERAND_TYPE_NUM_OPERAND_TYPES, @@ -231,6 +247,7 @@ typedef enum spv_ext_inst_type_t { SPV_EXT_INST_TYPE_SPV_AMD_SHADER_TRINARY_MINMAX, SPV_EXT_INST_TYPE_SPV_AMD_GCN_SHADER, SPV_EXT_INST_TYPE_SPV_AMD_SHADER_BALLOT, + SPV_EXT_INST_TYPE_DEBUGINFO, SPV_FORCE_32_BIT_ENUM(spv_ext_inst_type_t) } spv_ext_inst_type_t; @@ -360,12 +377,12 @@ typedef const spv_validator_options_t* spv_const_validator_options; // Returns the SPIRV-Tools software version as a null-terminated string. // The contents of the underlying storage is valid for the remainder of // the process. -const char* spvSoftwareVersionString(); +SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionString(void); // Returns a null-terminated string containing the name of the project, // the software version string, and commit details. // The contents of the underlying storage is valid for the remainder of // the process. -const char* spvSoftwareVersionDetailsString(); +SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionDetailsString(void); // Certain target environments impose additional restrictions on SPIR-V, so it's // often necessary to specify which one applies. SPV_ENV_UNIVERSAL means @@ -374,8 +391,8 @@ typedef enum { SPV_ENV_UNIVERSAL_1_0, // SPIR-V 1.0 latest revision, no other restrictions. SPV_ENV_VULKAN_1_0, // Vulkan 1.0 latest revision. SPV_ENV_UNIVERSAL_1_1, // SPIR-V 1.1 latest revision, no other restrictions. - SPV_ENV_OPENCL_2_1, // OpenCL 2.1 latest revision. - SPV_ENV_OPENCL_2_2, // OpenCL 2.2 latest revision. + SPV_ENV_OPENCL_2_1, // OpenCL Full Profile 2.1 latest revision. + SPV_ENV_OPENCL_2_2, // OpenCL Full Profile 2.2 latest revision. SPV_ENV_OPENGL_4_0, // OpenGL 4.0 plus GL_ARB_gl_spirv, latest revisions. SPV_ENV_OPENGL_4_1, // OpenGL 4.1 plus GL_ARB_gl_spirv, latest revisions. SPV_ENV_OPENGL_4_2, // OpenGL 4.2 plus GL_ARB_gl_spirv, latest revisions. @@ -383,6 +400,18 @@ typedef enum { // There is no variant for OpenGL 4.4. SPV_ENV_OPENGL_4_5, // OpenGL 4.5 plus GL_ARB_gl_spirv, latest revisions. SPV_ENV_UNIVERSAL_1_2, // SPIR-V 1.2, latest revision, no other restrictions. + SPV_ENV_OPENCL_1_2, // OpenCL Full Profile 1.2 plus cl_khr_il_program, + // latest revision. + SPV_ENV_OPENCL_EMBEDDED_1_2, // OpenCL Embedded Profile 1.2 plus + // cl_khr_il_program, latest revision. + SPV_ENV_OPENCL_2_0, // OpenCL Full Profile 2.0 plus cl_khr_il_program, + // latest revision. + SPV_ENV_OPENCL_EMBEDDED_2_0, // OpenCL Embedded Profile 2.0 plus + // cl_khr_il_program, latest revision. + SPV_ENV_OPENCL_EMBEDDED_2_1, // OpenCL Embedded Profile 2.1 latest revision. + SPV_ENV_OPENCL_EMBEDDED_2_2, // OpenCL Embedded Profile 2.2 latest revision. + SPV_ENV_UNIVERSAL_1_3, // SPIR-V 1.3 latest revision, no other restrictions. + SPV_ENV_VULKAN_1_1, // Vulkan 1.1 latest revision. } spv_target_env; // SPIR-V Validator can be parameterized with the following Universal Limits. @@ -398,94 +427,121 @@ typedef enum { } spv_validator_limit; // Returns a string describing the given SPIR-V target environment. -const char* spvTargetEnvDescription(spv_target_env env); +SPIRV_TOOLS_EXPORT const char* spvTargetEnvDescription(spv_target_env env); // Creates a context object. Returns null if env is invalid. -spv_context spvContextCreate(spv_target_env env); +SPIRV_TOOLS_EXPORT spv_context spvContextCreate(spv_target_env env); // Destroys the given context object. -void spvContextDestroy(spv_context context); +SPIRV_TOOLS_EXPORT void spvContextDestroy(spv_context context); // Creates a Validator options object with default options. Returns a valid // options object. The object remains valid until it is passed into // spvValidatorOptionsDestroy. -spv_validator_options spvValidatorOptionsCreate(); +SPIRV_TOOLS_EXPORT spv_validator_options spvValidatorOptionsCreate(void); // Destroys the given Validator options object. -void spvValidatorOptionsDestroy(spv_validator_options options); +SPIRV_TOOLS_EXPORT void spvValidatorOptionsDestroy( + spv_validator_options options); // Records the maximum Universal Limit that is considered valid in the given // Validator options object. argument must be a valid options object. -void spvValidatorOptionsSetUniversalLimit(spv_validator_options options, - spv_validator_limit limit_type, - uint32_t limit); +SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetUniversalLimit( + spv_validator_options options, spv_validator_limit limit_type, + uint32_t limit); + +// Record whether or not the validator should relax the rules on types for +// stores to structs. When relaxed, it will allow a type mismatch as long as +// the types are structs with the same layout. Two structs have the same layout +// if +// +// 1) the members of the structs are either the same type or are structs with +// same layout, and +// +// 2) the decorations that affect the memory layout are identical for both +// types. Other decorations are not relevant. +SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetRelaxStoreStruct( + spv_validator_options options, bool val); + +// Records whether or not the validator should relax the rules on pointer usage +// in logical addressing mode. +// +// When relaxed, it will allow the following usage cases of pointers: +// 1) OpVariable allocating an object whose type is a pointer type +// 2) OpReturnValue returning a pointer value +SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetRelaxLogicalPointer( + spv_validator_options options, bool val); // Encodes the given SPIR-V assembly text to its binary representation. The // length parameter specifies the number of bytes for text. Encoded binary will // be stored into *binary. Any error will be written into *diagnostic if // diagnostic is non-null. The generated binary is independent of the context // and may outlive it. -spv_result_t spvTextToBinary(const spv_const_context context, const char* text, - const size_t length, spv_binary* binary, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t spvTextToBinary(const spv_const_context context, + const char* text, + const size_t length, + spv_binary* binary, + spv_diagnostic* diagnostic); // Encodes the given SPIR-V assembly text to its binary representation. Same as // spvTextToBinary but with options. The options parameter is a bit field of // spv_text_to_binary_options_t. -spv_result_t spvTextToBinaryWithOptions( +SPIRV_TOOLS_EXPORT spv_result_t spvTextToBinaryWithOptions( const spv_const_context context, const char* text, const size_t length, const uint32_t options, spv_binary* binary, spv_diagnostic* diagnostic); // Frees an allocated text stream. This is a no-op if the text parameter // is a null pointer. -void spvTextDestroy(spv_text text); +SPIRV_TOOLS_EXPORT void spvTextDestroy(spv_text text); // Decodes the given SPIR-V binary representation to its assembly text. The // word_count parameter specifies the number of words for binary. The options // parameter is a bit field of spv_binary_to_text_options_t. Decoded text will // be stored into *text. Any error will be written into *diagnostic if // diagnostic is non-null. -spv_result_t spvBinaryToText(const spv_const_context context, - const uint32_t* binary, const size_t word_count, - const uint32_t options, spv_text* text, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t spvBinaryToText(const spv_const_context context, + const uint32_t* binary, + const size_t word_count, + const uint32_t options, + spv_text* text, + spv_diagnostic* diagnostic); // Frees a binary stream from memory. This is a no-op if binary is a null // pointer. -void spvBinaryDestroy(spv_binary binary); +SPIRV_TOOLS_EXPORT void spvBinaryDestroy(spv_binary binary); // Validates a SPIR-V binary for correctness. Any errors will be written into // *diagnostic if diagnostic is non-null. -spv_result_t spvValidate(const spv_const_context context, - const spv_const_binary binary, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t spvValidate(const spv_const_context context, + const spv_const_binary binary, + spv_diagnostic* diagnostic); // Validates a SPIR-V binary for correctness. Uses the provided Validator // options. Any errors will be written into *diagnostic if diagnostic is // non-null. -spv_result_t spvValidateWithOptions(const spv_const_context context, - const spv_const_validator_options options, - const spv_const_binary binary, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t spvValidateWithOptions( + const spv_const_context context, const spv_const_validator_options options, + const spv_const_binary binary, spv_diagnostic* diagnostic); // Validates a raw SPIR-V binary for correctness. Any errors will be written // into *diagnostic if diagnostic is non-null. -spv_result_t spvValidateBinary(const spv_const_context context, - const uint32_t* words, const size_t num_words, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t +spvValidateBinary(const spv_const_context context, const uint32_t* words, + const size_t num_words, spv_diagnostic* diagnostic); // Creates a diagnostic object. The position parameter specifies the location in // the text/binary stream. The message parameter, copied into the diagnostic // object, contains the error message to display. -spv_diagnostic spvDiagnosticCreate(const spv_position position, - const char* message); +SPIRV_TOOLS_EXPORT spv_diagnostic +spvDiagnosticCreate(const spv_position position, const char* message); // Destroys a diagnostic object. This is a no-op if diagnostic is a null // pointer. -void spvDiagnosticDestroy(spv_diagnostic diagnostic); +SPIRV_TOOLS_EXPORT void spvDiagnosticDestroy(spv_diagnostic diagnostic); // Prints the diagnostic to stderr. -spv_result_t spvDiagnosticPrint(const spv_diagnostic diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t +spvDiagnosticPrint(const spv_diagnostic diagnostic); // The binary parser interface. @@ -518,11 +574,10 @@ typedef spv_result_t (*spv_parsed_instruction_fn_t)( // also emits a diagnostic. If a callback returns anything other than // SPV_SUCCESS, then that status code is returned, no further callbacks are // issued, and no additional diagnostics are emitted. -spv_result_t spvBinaryParse(const spv_const_context context, void* user_data, - const uint32_t* words, const size_t num_words, - spv_parsed_header_fn_t parse_header, - spv_parsed_instruction_fn_t parse_instruction, - spv_diagnostic* diagnostic); +SPIRV_TOOLS_EXPORT spv_result_t spvBinaryParse( + const spv_const_context context, void* user_data, const uint32_t* words, + const size_t num_words, spv_parsed_header_fn_t parse_header, + spv_parsed_instruction_fn_t parse_instruction, spv_diagnostic* diagnostic); #ifdef __cplusplus } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.hpp b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.hpp index f82c134846e08b9d5058ba63812a49ef5e36d500..2e4aa628d610642c43e3bc68d74c068248ac62bc 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/libspirv.hpp @@ -31,6 +31,39 @@ using MessageConsumer = std::function; +// C++ RAII wrapper around the C context object spv_context. +class Context { + public: + // Constructs a context targeting the given environment |env|. + // + // The constructed instance will have an empty message consumer, which just + // ignores all messages from the library. Use SetMessageConsumer() to supply + // one if messages are of concern. + explicit Context(spv_target_env env); + + // Enables move constructor/assignment operations. + Context(Context&& other); + Context& operator=(Context&& other); + + // Disables copy constructor/assignment operations. + Context(const Context&) = delete; + Context& operator=(const Context&) = delete; + + // Destructs this instance. + ~Context(); + + // Sets the message consumer to the given |consumer|. The |consumer| will be + // invoked once for each message communicated from the library. + void SetMessageConsumer(MessageConsumer consumer); + + // Returns the underlying spv_context. + spv_context& CContext(); + const spv_context& CContext() const; + + private: + spv_context context_; +}; + // A RAII wrapper around a validator options object. class ValidatorOptions { public: @@ -44,6 +77,20 @@ class ValidatorOptions { spvValidatorOptionsSetUniversalLimit(options_, limit_type, limit); } + void SetRelaxStructStore(bool val) { + spvValidatorOptionsSetRelaxStoreStruct(options_, val); + } + + // Records whether or not the validator should relax the rules on pointer + // usage in logical addressing mode. + // + // When relaxed, it will allow the following usage cases of pointers: + // 1) OpVariable allocating an object whose type is a pointer type + // 2) OpReturnValue returning a pointer value + void SetRelaxLogicalPointer(bool val) { + spvValidatorOptionsSetRelaxLogicalPointer(options_, val); + } + private: spv_validator_options options_; }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/linker.hpp b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/linker.hpp index 43c725dacf491c844aff281c33cced1024641f0f..cce78a44599dd0178a86205ee73513ba7b7b282d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/linker.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/linker.hpp @@ -26,7 +26,10 @@ namespace spvtools { class LinkerOptions { public: - LinkerOptions() : createLibrary_(false) {} + LinkerOptions() + : create_library_(false), + verify_ids_(false), + allow_partial_linkage_(false) {} // Returns whether a library or an executable should be produced by the // linking phase. @@ -35,64 +38,60 @@ class LinkerOptions { // be removed when creating an executable. // The returned value will be true if creating a library, and false if // creating an executable. - bool GetCreateLibrary() const { return createLibrary_; } + bool GetCreateLibrary() const { return create_library_; } + // Sets whether a library or an executable should be produced. void SetCreateLibrary(bool create_library) { - createLibrary_ = create_library; + create_library_ = create_library; } - private: - bool createLibrary_; -}; + // Returns whether to verify the uniqueness of the unique ids in the merged + // context. + bool GetVerifyIds() const { return verify_ids_; } -class Linker { - public: - // Constructs an instance targeting the given environment |env|. - // - // The constructed instance will have an empty message consumer, which just - // ignores all messages from the library. Use SetMessageConsumer() to supply - // one if messages are of concern. - explicit Linker(spv_target_env env); - - // Disables copy/move constructor/assignment operations. - Linker(const Linker&) = delete; - Linker(Linker&&) = delete; - Linker& operator=(const Linker&) = delete; - Linker& operator=(Linker&&) = delete; - - // Destructs this instance. - ~Linker(); - - // Sets the message consumer to the given |consumer|. The |consumer| will be - // invoked once for each message communicated from the library. - void SetMessageConsumer(MessageConsumer consumer); - - // Links one or more SPIR-V modules into a new SPIR-V module. That is, - // combine several SPIR-V modules into one, resolving link dependencies - // between them. - // - // At least one binary has to be provided in |binaries|. Those binaries do - // not have to be valid, but they should be at least parseable. - // The functions can fail due to the following: - // * No input modules were given; - // * One or more of those modules were not parseable; - // * The input modules used different addressing or memory models; - // * The ID or global variable number limit were exceeded; - // * Some entry points were defined multiple times; - // * Some imported symbols did not have an exported counterpart; - // * Possibly other reasons. - spv_result_t Link(const std::vector>& binaries, - std::vector& linked_binary, - const LinkerOptions& options = LinkerOptions()) const; - spv_result_t Link(const uint32_t* const* binaries, const size_t* binary_sizes, - size_t num_binaries, std::vector& linked_binary, - const LinkerOptions& options = LinkerOptions()) const; + // Sets whether to verify the uniqueness of the unique ids in the merged + // context. + void SetVerifyIds(bool verify_ids) { verify_ids_ = verify_ids; } + + // Returns whether to allow for imported symbols to have no corresponding + // exported symbols + bool GetAllowPartialLinkage() const { return allow_partial_linkage_; } + + // Sets whether to allow for imported symbols to have no corresponding + // exported symbols + void SetAllowPartialLinkage(bool allow_partial_linkage) { + allow_partial_linkage_ = allow_partial_linkage; + } private: - struct Impl; // Opaque struct for holding the data fields used by this class. - std::unique_ptr impl_; // Unique pointer to implementation data. + bool create_library_; + bool verify_ids_; + bool allow_partial_linkage_; }; +// Links one or more SPIR-V modules into a new SPIR-V module. That is, combine +// several SPIR-V modules into one, resolving link dependencies between them. +// +// At least one binary has to be provided in |binaries|. Those binaries do not +// have to be valid, but they should be at least parseable. +// The functions can fail due to the following: +// * The given context was not initialised using `spvContextCreate()`; +// * No input modules were given; +// * One or more of those modules were not parseable; +// * The input modules used different addressing or memory models; +// * The ID or global variable number limit were exceeded; +// * Some entry points were defined multiple times; +// * Some imported symbols did not have an exported counterpart; +// * Possibly other reasons. +spv_result_t Link(const Context& context, + const std::vector>& binaries, + std::vector* linked_binary, + const LinkerOptions& options = LinkerOptions()); +spv_result_t Link(const Context& context, const uint32_t* const* binaries, + const size_t* binary_sizes, size_t num_binaries, + std::vector* linked_binary, + const LinkerOptions& options = LinkerOptions()); + } // namespace spvtools #endif // SPIRV_TOOLS_LINKER_HPP_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/optimizer.hpp b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/optimizer.hpp index 8d9f94d5dd6bfdafd57d0aef96c7e59a7aea0de3..ab6ca5106658480dd8f0ffd96a3918067294b795 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/optimizer.hpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/include/spirv-tools/optimizer.hpp @@ -16,6 +16,7 @@ #define SPIRV_TOOLS_OPTIMIZER_HPP_ #include +#include #include #include #include @@ -87,6 +88,16 @@ class Optimizer { // from time to time. Optimizer& RegisterSizePasses(); + // Registers passes that attempt to legalize the generated code. + // + // Note: this recipe is specially for legalizing SPIR-V. It should be used + // by compilers after translating HLSL source code literally. It should + // *not* be used by general workloads for performance or size improvement. + // + // This sequence of passes is subject to constant review and will change + // from time to time. + Optimizer& RegisterLegalizationPasses(); + // Optimizes the given SPIR-V module |original_binary| and writes the // optimized binary into |optimized_binary|. // Returns true on successful optimization, whether or not the module is @@ -103,6 +114,16 @@ class Optimizer { // pass manager is destroyed. std::vector GetPassNames() const; + // Sets the option to print the disassembly before each pass and after the + // last pass. If |out| is null, then no output is generated. Otherwise, + // output is sent to the |out| output stream. + Optimizer& SetPrintAll(std::ostream* out); + + // Sets the option to print the resource utilization of each pass. If |out| + // is null, then no output is generated. Otherwise, output is sent to the + // |out| output stream. + Optimizer& SetTimeReport(std::ostream* out); + private: struct Impl; // Opaque struct for holding internal data. std::unique_ptr impl_; // Unique pointer to internal data. @@ -117,6 +138,13 @@ Optimizer::PassToken CreateNullPass(); // Section 3.32.2 of the SPIR-V spec) of the SPIR-V module to be optimized. Optimizer::PassToken CreateStripDebugInfoPass(); +// Creates a strip-reflect-info pass. +// A strip-reflect-info pass removes all reflections instructions. +// For now, this is limited to removing decorations defined in +// SPV_GOOGLE_hlsl_functionality1. The coverage may expand in +// the future. +Optimizer::PassToken CreateStripReflectInfoPass(); + // Creates an eliminate-dead-functions pass. // An eliminate-dead-functions pass will remove all functions that are not in // the call trees rooted at entry points and exported functions. These @@ -261,7 +289,8 @@ Optimizer::PassToken CreateInlineOpaquePass(); // The presence of access chain references and function calls can inhibit // the above optimization. // -// Only modules with logical addressing are currently processed. +// Only modules with relaxed logical addressing (see opt/instruction.h) are +// currently processed. // // This pass is most effective if preceeded by Inlining and // LocalAccessChainConvert. This pass will reduce the work needed to be done @@ -278,9 +307,8 @@ Optimizer::PassToken CreateLocalSingleBlockLoadStoreElimPass(); // For all phi functions in merge block, replace all uses with the id // corresponding to the living predecessor. // -// This pass only works on shaders (guaranteed to have structured control -// flow). Note that some such branches and blocks may be left to avoid -// creating invalid control flow. Improving this is left to future work. +// Note that some branches and blocks may be left to avoid creating invalid +// control flow. Improving this is left to future work. // // This pass is most effective when preceeded by passes which eliminate // local loads and stores, effectively propagating constant values where @@ -295,9 +323,9 @@ Optimizer::PassToken CreateDeadBranchElimPass(); // The presence of access chain references and function calls can inhibit // the above optimization. // -// Only shader modules with logical addressing are currently processed. -// Currently modules with any extensions enabled are not processed. This -// is left for future work. +// Only shader modules with relaxed logical addressing (see opt/instruction.h) +// are currently processed. Currently modules with any extensions enabled are +// not processed. This is left for future work. // // This pass is most effective if preceeded by Inlining and // LocalAccessChainConvert. LocalSingleStoreElim and LocalSingleBlockElim @@ -334,6 +362,9 @@ Optimizer::PassToken CreateLocalAccessChainConvertPass(); // not supported and will prohibit optimization of a function. Support of // these operations are future work. // +// Only shader modules with relaxed logical addressing (see opt/instruction.h) +// are currently processed. +// // This pass will reduce the work needed to be done by LocalSingleBlockElim // and LocalMultiStoreElim and can improve the effectiveness of other passes // such as DeadBranchElimination which depend on values for their analysis. @@ -351,6 +382,21 @@ Optimizer::PassToken CreateLocalSingleStoreElimPass(); // converted to inserts and extracts and local loads and stores are eliminated. Optimizer::PassToken CreateInsertExtractElimPass(); +// Creates a dead insert elimination pass. +// This pass processes each entry point function in the module, searching for +// unreferenced inserts into composite types. These are most often unused +// stores to vector components. They are unused because they are never +// referenced, or because there is another insert to the same component between +// the insert and the reference. After removing the inserts, dead code +// elimination is attempted on the inserted values. +// +// This pass performs best after access chains are converted to inserts and +// extracts and local loads and stores are eliminated. While executing this +// pass can be advantageous on its own, it is also advantageous to execute +// this pass after CreateInsertExtractPass() as it will remove any unused +// inserts created by that pass. +Optimizer::PassToken CreateDeadInsertElimPass(); + // Creates a pass to consolidate uniform references. // For each entry point function in the module, first change all constant index // access chain loads into equivalent composite extracts. Then consolidate @@ -366,7 +412,7 @@ Optimizer::PassToken CreateInsertExtractElimPass(); Optimizer::PassToken CreateCommonUniformElimPass(); // Create aggressive dead code elimination pass -// This pass eliminates unused code from functions. In addition, +// This pass eliminates unused code from the module. In addition, // it detects and eliminates code which may have spurious uses but which do // not contribute to the output of the function. The most common cause of // such code sequences is summations in loops whose result is no longer used @@ -374,8 +420,9 @@ Optimizer::PassToken CreateCommonUniformElimPass(); // time cost over standard dead code elimination. // // This pass only processes entry point functions. It also only processes -// shaders with logical addressing. It currently will not process functions -// with function calls. +// shaders with relaxed logical addressing (see opt/instruction.h). It +// currently will not process functions with function calls. Unreachable +// functions are deleted. // // This pass will be made more effective by first running passes that remove // dead control flow and inlines function calls. @@ -390,7 +437,12 @@ Optimizer::PassToken CreateAggressiveDCEPass(); // The pass remaps result ids to a compact and gapless range starting from %1. Optimizer::PassToken CreateCompactIdsPass(); -// Creates a remove duplicate capabilities pass. +// Creates a remove duplicate pass. +// This pass removes various duplicates: +// * duplicate capabilities; +// * duplicate extended instruction imports; +// * duplicate types; +// * duplicate decorations. Optimizer::PassToken CreateRemoveDuplicatesPass(); // Creates a CFG cleanup pass. @@ -406,6 +458,108 @@ Optimizer::PassToken CreateCFGCleanupPass(); // that are not referenced. Optimizer::PassToken CreateDeadVariableEliminationPass(); +// create merge return pass. +// changes functions that have multiple return statements so they have a single +// return statement. +// +// for structured control flow it is assumed that the only unreachable blocks in +// the function are trivial merge and continue blocks. +// +// a trivial merge block contains the label and an opunreachable instructions, +// nothing else. a trivial continue block contain a label and an opbranch to +// the header, nothing else. +// +// these conditions are guaranteed to be met after running dead-branch +// elimination. +Optimizer::PassToken CreateMergeReturnPass(); + +// Create value numbering pass. +// This pass will look for instructions in the same basic block that compute the +// same value, and remove the redundant ones. +Optimizer::PassToken CreateLocalRedundancyEliminationPass(); + +// Create LICM pass. +// This pass will look for invariant instructions inside loops and hoist them to +// the loops preheader. +Optimizer::PassToken CreateLoopInvariantCodeMotionPass(); + +// Creates a loop peeling pass. +// This pass will look for conditions inside a loop that are true or false only +// for the N first or last iteration. For loop with such condition, those N +// iterations of the loop will be executed outside of the main loop. +// To limit code size explosion, the loop peeling can only happen if the code +// size growth for each loop is under |code_growth_threshold|. +Optimizer::PassToken CreateLoopPeelingPass(); + +// Creates a loop unswitch pass. +// This pass will look for loop independent branch conditions and move the +// condition out of the loop and version the loop based on the taken branch. +// Works best after LICM and local multi store elimination pass. +Optimizer::PassToken CreateLoopUnswitchPass(); + +// Create global value numbering pass. +// This pass will look for instructions where the same value is computed on all +// paths leading to the instruction. Those instructions are deleted. +Optimizer::PassToken CreateRedundancyEliminationPass(); + +// Create scalar replacement pass. +// This pass replaces composite function scope variables with variables for each +// element if those elements are accessed individually. +Optimizer::PassToken CreateScalarReplacementPass(); + +// Create a private to local pass. +// This pass looks for variables delcared in the private storage class that are +// used in only one function. Those variables are moved to the function storage +// class in the function that they are used. +Optimizer::PassToken CreatePrivateToLocalPass(); + +// Creates a conditional constant propagation (CCP) pass. +// This pass implements the SSA-CCP algorithm in +// +// Constant propagation with conditional branches, +// Wegman and Zadeck, ACM TOPLAS 13(2):181-210. +// +// Constant values in expressions and conditional jumps are folded and +// simplified. This may reduce code size by removing never executed jump targets +// and computations with constant operands. +Optimizer::PassToken CreateCCPPass(); + +// Creates a workaround driver bugs pass. This pass attempts to work around +// a known driver bug (issue #1209) by identifying the bad code sequences and +// rewriting them. +// +// Current workaround: Avoid OpUnreachable instructions in loops. +Optimizer::PassToken CreateWorkaround1209Pass(); + +// Creates a pass that converts if-then-else like assignments into OpSelect. +Optimizer::PassToken CreateIfConversionPass(); + +// Creates a pass that will replace instructions that are not valid for the +// current shader stage by constants. Has no effect on non-shader modules. +Optimizer::PassToken CreateReplaceInvalidOpcodePass(); + +// Creates a pass that simplifies instructions using the instruction folder. +Optimizer::PassToken CreateSimplificationPass(); + +// Create loop unroller pass. +// Creates a pass to unroll loops which have the "Unroll" loop control +// mask set. The loops must meet a specific criteria in order to be unrolled +// safely this criteria is checked before doing the unroll by the +// LoopUtils::CanPerformUnroll method. Any loop that does not meet the criteria +// won't be unrolled. See CanPerformUnroll LoopUtils.h for more information. +Optimizer::PassToken CreateLoopUnrollPass(bool fully_unroll, int factor = 0); + +// Create the SSA rewrite pass. +// This pass converts load/store operations on function local variables into +// operations on SSA IDs. This allows SSA optimizers to act on these variables. +// Only variables that are local to the function and of supported types are +// processed (see IsSSATargetVar for details). +Optimizer::PassToken CreateSSARewritePass(); + +// Create copy propagate arrays pass. +// This pass looks to copy propagate memory references for arrays. It looks +// for specific code patterns to recognize array copies. +Optimizer::PassToken CreateCopyPropagateArraysPass(); } // namespace spvtools #endif // SPIRV_TOOLS_OPTIMIZER_HPP_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.cpp index 997c4c20fecc07b8f6a8b75f4fbdc672b714259a..2fde640539bd8d4af63c68c8d4f35f8461819807 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.cpp @@ -39,7 +39,8 @@ namespace { /// @param[out] pValue where the resulting value is written /// /// @return result code -spv_result_t spvTextParseMaskOperand(const spv_operand_table operandTable, +spv_result_t spvTextParseMaskOperand(spv_target_env env, + const spv_operand_table operandTable, const spv_operand_type_t type, const char* textValue, uint32_t* pValue) { if (textValue == nullptr) return SPV_ERROR_INVALID_TEXT; @@ -60,7 +61,7 @@ spv_result_t spvTextParseMaskOperand(const spv_operand_table operandTable, end = std::find(begin, text_end, separator); spv_operand_desc entry = nullptr; - if (spvOperandTableNameLookup(operandTable, type, begin, end - begin, + if (spvOperandTableNameLookup(env, operandTable, type, begin, end - begin, &entry)) { return SPV_ERROR_INVALID_TEXT; } @@ -171,26 +172,45 @@ bool AssemblyGrammar::isValid() const { return operandTable_ && opcodeTable_ && extInstTable_; } +CapabilitySet AssemblyGrammar::filterCapsAgainstTargetEnv( + const SpvCapability* cap_array, uint32_t count) const { + CapabilitySet cap_set; + for (uint32_t i = 0; i < count; ++i) { + spv_operand_desc cap_desc = {}; + if (SPV_SUCCESS == lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, + static_cast(cap_array[i]), + &cap_desc)) { + // spvOperandTableValueLookup() filters capabilities internally + // according to the current target environment by itself. So we + // should be safe to add this capability if the lookup succeeds. + cap_set.Add(cap_array[i]); + } + } + return cap_set; +} + spv_result_t AssemblyGrammar::lookupOpcode(const char* name, spv_opcode_desc* desc) const { - return spvOpcodeTableNameLookup(opcodeTable_, name, desc); + return spvOpcodeTableNameLookup(target_env_, opcodeTable_, name, desc); } spv_result_t AssemblyGrammar::lookupOpcode(SpvOp opcode, spv_opcode_desc* desc) const { - return spvOpcodeTableValueLookup(opcodeTable_, opcode, desc); + return spvOpcodeTableValueLookup(target_env_, opcodeTable_, opcode, desc); } spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type, const char* name, size_t name_len, spv_operand_desc* desc) const { - return spvOperandTableNameLookup(operandTable_, type, name, name_len, desc); + return spvOperandTableNameLookup(target_env_, operandTable_, type, name, + name_len, desc); } spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type, uint32_t operand, spv_operand_desc* desc) const { - return spvOperandTableValueLookup(operandTable_, type, operand, desc); + return spvOperandTableValueLookup(target_env_, operandTable_, type, operand, + desc); } spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(const char* name, @@ -220,7 +240,8 @@ spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(SpvOp opcode) const { spv_result_t AssemblyGrammar::parseMaskOperand(const spv_operand_type_t type, const char* textValue, uint32_t* pValue) const { - return spvTextParseMaskOperand(operandTable_, type, textValue, pValue); + return spvTextParseMaskOperand(target_env_, operandTable_, type, textValue, + pValue); } spv_result_t AssemblyGrammar::lookupExtInst(spv_ext_inst_type_t type, const char* textValue, @@ -237,6 +258,6 @@ spv_result_t AssemblyGrammar::lookupExtInst(spv_ext_inst_type_t type, void AssemblyGrammar::pushOperandTypesForMask( const spv_operand_type_t type, const uint32_t mask, spv_operand_pattern_t* pattern) const { - spvPushOperandTypesForMask(operandTable_, type, mask, pattern); + spvPushOperandTypesForMask(target_env_, operandTable_, type, mask, pattern); } } // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.h b/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.h index cd89a1b129e1a3a33f633857196637a8f8c854a5..6837a0b6ea851f861e696b3bfd4ec4fe246ceea8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/assembly_grammar.h @@ -15,9 +15,10 @@ #ifndef LIBSPIRV_ASSEMBLY_GRAMMAR_H_ #define LIBSPIRV_ASSEMBLY_GRAMMAR_H_ +#include "enum_set.h" +#include "latest_version_spirv_header.h" #include "operand.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" #include "table.h" namespace libspirv { @@ -38,6 +39,11 @@ class AssemblyGrammar { // Returns the SPIR-V target environment. spv_target_env target_env() const { return target_env_; } + // Removes capabilities not available in the current target environment and + // returns the rest. + CapabilitySet filterCapsAgainstTargetEnv(const SpvCapability* cap_array, + uint32_t count) const; + // Fills in the desc parameter with the information about the opcode // of the given name. Returns SPV_SUCCESS if the opcode was found, and // SPV_ERROR_INVALID_LOOKUP if the opcode does not exist. @@ -60,6 +66,17 @@ class AssemblyGrammar { spv_result_t lookupOperand(spv_operand_type_t type, uint32_t operand, spv_operand_desc* desc) const; + // Finds operand entry in the grammar table and returns its name. + // Returns "Unknown" if not found. + const char* lookupOperandName(spv_operand_type_t type, + uint32_t operand) const { + spv_operand_desc desc = nullptr; + if (lookupOperand(type, operand, &desc) != SPV_SUCCESS || !desc) { + return "Unknown"; + } + return desc->name; + } + // Finds the opcode for the given OpSpecConstantOp opcode name. The name // should not have the "Op" prefix. For example, "IAdd" corresponds to // the integer add opcode for OpSpecConstantOp. On success, returns @@ -115,6 +132,6 @@ class AssemblyGrammar { const spv_opcode_table opcodeTable_; const spv_ext_inst_table extInstTable_; }; -} +} // namespace libspirv #endif // LIBSPIRV_ASSEMBLY_GRAMMAR_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/binary.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/binary.cpp index 2ade2546b1679ffca688f8164077f249aaa8b82d..7ac5765ee08c342930d83b1e3e21f3c1faa029c2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/binary.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/binary.cpp @@ -25,9 +25,9 @@ #include "assembly_grammar.h" #include "diagnostic.h" #include "ext_inst.h" +#include "latest_version_spirv_header.h" #include "opcode.h" #include "operand.h" -#include "spirv/1.2/spirv.h" #include "spirv_constant.h" #include "spirv_endian.h" @@ -179,12 +179,11 @@ class Parser { word_index(0), endian(), requires_endian_conversion(false) { - - // Temporary storage for parser state within a single instruction. - // Most instructions require fewer than 25 words or operands. - operands.reserve(25); - endian_converted_words.reserve(25); - expected_operands.reserve(25); + // Temporary storage for parser state within a single instruction. + // Most instructions require fewer than 25 words or operands. + operands.reserve(25); + endian_converted_words.reserve(25); + expected_operands.reserve(25); } State() : State(0, 0, nullptr) {} const uint32_t* words; // Words in the binary SPIR-V module. @@ -310,7 +309,8 @@ spv_result_t Parser::parseInstruction() { // own operands depending on the selected extended instruction. _.expected_operands.clear(); for (auto i = 0; i < opcode_desc->numTypes; i++) - _.expected_operands.push_back(opcode_desc->operandTypes[opcode_desc->numTypes - i - 1]); + _.expected_operands.push_back( + opcode_desc->operandTypes[opcode_desc->numTypes - i - 1]); while (_.word_index < inst_offset + inst_word_count) { const uint16_t inst_word_index = uint16_t(_.word_index - inst_offset); @@ -323,7 +323,8 @@ spv_result_t Parser::parseInstruction() { << inst_word_count << "."; } - spv_operand_type_t type = spvTakeFirstMatchableOperand(&_.expected_operands); + spv_operand_type_t type = + spvTakeFirstMatchableOperand(&_.expected_operands); if (auto error = parseOperand(inst_offset, &inst, type, &_.endian_converted_words, @@ -355,7 +356,8 @@ spv_result_t Parser::parseInstruction() { // word. assert(!_.requires_endian_conversion || (inst_word_count == _.endian_converted_words.size())); - assert(_.requires_endian_conversion || (_.endian_converted_words.size() == 1)); + assert(_.requires_endian_conversion || + (_.endian_converted_words.size() == 1)); recordNumberType(inst_offset, &inst); @@ -430,8 +432,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, // Save the result ID to type ID mapping. // In the grammar, type ID always appears before result ID. if (_.id_to_type_id.find(inst->result_id) != _.id_to_type_id.end()) - return diagnostic(SPV_ERROR_INVALID_ID) << "Id " << inst->result_id - << " is defined more than once"; + return diagnostic(SPV_ERROR_INVALID_ID) + << "Id " << inst->result_id << " is defined more than once"; // Record it. // A regular value maps to its type. Some instructions (e.g. OpLabel) // have no type Id, and will map to 0. The result Id for a @@ -477,8 +479,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: { assert(SpvOpSpecConstantOp == opcode); if (grammar_.lookupSpecConstantOpcode(SpvOp(word))) { - return diagnostic() << "Invalid " << spvOperandTypeStr(type) << ": " - << word; + return diagnostic() + << "Invalid " << spvOperandTypeStr(type) << ": " << word; } spv_opcode_desc opcode_entry = nullptr; if (grammar_.lookupOpcode(SpvOp(word), &opcode_entry)) { @@ -581,8 +583,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, const spv_ext_inst_type_t ext_inst_type = spvExtInstImportTypeGet(string); if (SPV_EXT_INST_TYPE_NONE == ext_inst_type) { - return diagnostic() << "Invalid extended instruction import '" - << string << "'"; + return diagnostic() + << "Invalid extended instruction import '" << string << "'"; } // We must have parsed a valid result ID. It's a condition // of the grammar, and we only accept non-zero result Ids. @@ -611,7 +613,11 @@ spv_result_t Parser::parseOperand(size_t inst_offset, case SPV_OPERAND_TYPE_BUILT_IN: case SPV_OPERAND_TYPE_GROUP_OPERATION: case SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS: - case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO: { + case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO: + case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING: + case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE: + case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER: + case SPV_OPERAND_TYPE_DEBUG_OPERATION: { // A single word that is a plain enum value. // Map an optional operand type to its corresponding concrete type. @@ -620,9 +626,9 @@ spv_result_t Parser::parseOperand(size_t inst_offset, spv_operand_desc entry; if (grammar_.lookupOperand(type, word, &entry)) { - return diagnostic() << "Invalid " - << spvOperandTypeStr(parsed_operand.type) - << " operand: " << word; + return diagnostic() + << "Invalid " << spvOperandTypeStr(parsed_operand.type) + << " operand: " << word; } // Prepare to accept operands to this operand, if needed. spvPushOperandTypes(entry->operandTypes, expected_operands); @@ -634,7 +640,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS: - case SPV_OPERAND_TYPE_SELECTION_CONTROL: { + case SPV_OPERAND_TYPE_SELECTION_CONTROL: + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: { // This operand is a mask. // Map an optional operand type to its corresponding concrete type. @@ -676,8 +683,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset, return diagnostic() << "Internal error: Unhandled operand type: " << type; } - assert(int(SPV_OPERAND_TYPE_FIRST_CONCRETE_TYPE) <= int(parsed_operand.type)); - assert(int(SPV_OPERAND_TYPE_LAST_CONCRETE_TYPE) >= int(parsed_operand.type)); + assert(spvOperandIsConcrete(parsed_operand.type)); operands->push_back(parsed_operand); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/cfa.h b/sources/third_party/shaderc/third_party/spirv-tools/source/cfa.h index 70c241a077274b4d458b96910b5eedcb6e9912d3..1022e3f2d03c0b1f479cce37f5dde89b4985b4b5 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/cfa.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/cfa.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -35,12 +36,12 @@ using std::vector; namespace spvtools { // Control Flow Analysis of control flow graphs of basic block nodes |BB|. -template class CFA { +template +class CFA { using bb_ptr = BB*; using cbb_ptr = const BB*; using bb_iter = typename std::vector::const_iterator; - using get_blocks_func = - std::function*(const BB*)>; + using get_blocks_func = std::function*(const BB*)>; struct block_info { cbb_ptr block; ///< pointer to the block @@ -49,15 +50,16 @@ template class CFA { /// Returns true if a block with @p id is found in the @p work_list vector /// - /// @param[in] work_list Set of blocks visited in the the depth first traversal + /// @param[in] work_list Set of blocks visited in the the depth first + /// traversal /// of the CFG /// @param[in] id The ID of the block being checked /// /// @return true if the edge work_list.back().block->id() => id is a back-edge - static bool FindInWorkList( - const std::vector& work_list, uint32_t id); + static bool FindInWorkList(const std::vector& work_list, + uint32_t id); -public: + public: /// @brief Depth first traversal starting from the \p entry BasicBlock /// /// This function performs a depth first traversal from the \p entry @@ -74,15 +76,16 @@ public: /// CFG following postorder traversal semantics /// @param[in] backedge A function that will be called when a backedge is /// encountered during a traversal - /// NOTE: The @p successor_func and predecessor_func each return a pointer to a + /// NOTE: The @p successor_func and predecessor_func each return a pointer to + /// a /// collection such that iterators to that collection remain valid for the /// lifetime of the algorithm. - static void DepthFirstTraversal(const BB* entry, - get_blocks_func successor_func, - std::function preorder, - std::function postorder, - std::function backedge); - + static void DepthFirstTraversal( + const BB* entry, get_blocks_func successor_func, + std::function preorder, + std::function postorder, + std::function backedge); + /// @brief Calculates dominator edges for a set of blocks /// /// Computes dominators using the algorithm of Cooper, Harvey, and Kennedy @@ -91,54 +94,58 @@ public: /// The algorithm assumes there is a unique root node (a node without /// predecessors), and it is therefore at the end of the postorder vector. /// - /// This function calculates the dominator edges for a set of blocks in the CFG. + /// This function calculates the dominator edges for a set of blocks in the + /// CFG. /// Uses the dominator algorithm by Cooper et al. /// - /// @param[in] postorder A vector of blocks in post order traversal order + /// @param[in] postorder A vector of blocks in post order traversal + /// order /// in a CFG - /// @param[in] predecessor_func Function used to get the predecessor nodes of a + /// @param[in] predecessor_func Function used to get the predecessor nodes of + /// a /// block /// /// @return the dominator tree of the graph, as a vector of pairs of nodes. /// The first node in the pair is a node in the graph. The second node in the - /// pair is its immediate dominator in the sense of Cooper et.al., where a block - /// without predecessors (such as the root node) is its own immediate dominator. + /// pair is its immediate dominator in the sense of Cooper et.al., where a + /// block + /// without predecessors (such as the root node) is its own immediate + /// dominator. static vector> CalculateDominators( - const vector& postorder, get_blocks_func predecessor_func); + const vector& postorder, get_blocks_func predecessor_func); // Computes a minimal set of root nodes required to traverse, in the forward // direction, the CFG represented by the given vector of blocks, and successor // and predecessor functions. When considering adding two nodes, each having // predecessors, favour using the one that appears earlier on the input blocks // list. - static std::vector TraversalRoots( - const std::vector& blocks, - get_blocks_func succ_func, - get_blocks_func pred_func); + static std::vector TraversalRoots(const std::vector& blocks, + get_blocks_func succ_func, + get_blocks_func pred_func); static void ComputeAugmentedCFG( - std::vector& ordered_blocks, - BB* pseudo_entry_block, - BB* pseudo_exit_block, - std::unordered_map>* augmented_successors_map, - std::unordered_map>* augmented_predecessors_map, - get_blocks_func succ_func, - get_blocks_func pred_func); + std::vector& ordered_blocks, BB* pseudo_entry_block, + BB* pseudo_exit_block, + std::unordered_map>* augmented_successors_map, + std::unordered_map>* + augmented_predecessors_map, + get_blocks_func succ_func, get_blocks_func pred_func); }; -template bool CFA::FindInWorkList(const vector& work_list, - uint32_t id) { +template +bool CFA::FindInWorkList(const vector& work_list, uint32_t id) { for (const auto b : work_list) { if (b.block->id() == id) return true; } return false; } -template void CFA::DepthFirstTraversal(const BB* entry, - get_blocks_func successor_func, - function preorder, - function postorder, - function backedge) { +template +void CFA::DepthFirstTraversal(const BB* entry, + get_blocks_func successor_func, + function preorder, + function postorder, + function backedge) { unordered_set processed; /// NOTE: work_list is the sequence of nodes from the root node to the node @@ -146,7 +153,7 @@ template void CFA::DepthFirstTraversal(const BB* entry, vector work_list; work_list.reserve(10); - work_list.push_back({ entry, begin(*successor_func(entry)) }); + work_list.push_back({entry, begin(*successor_func(entry))}); preorder(entry); processed.insert(entry->id()); @@ -155,8 +162,7 @@ template void CFA::DepthFirstTraversal(const BB* entry, if (top.iter == end(*successor_func(top.block))) { postorder(top.block); work_list.pop_back(); - } - else { + } else { BB* child = *top.iter; top.iter++; if (FindInWorkList(work_list, child->id())) { @@ -165,16 +171,16 @@ template void CFA::DepthFirstTraversal(const BB* entry, if (processed.count(child->id()) == 0) { preorder(child); work_list.emplace_back( - block_info{ child, begin(*successor_func(child)) }); + block_info{child, begin(*successor_func(child))}); processed.insert(child->id()); } } } } -template +template vector> CFA::CalculateDominators( - const vector& postorder, get_blocks_func predecessor_func) { + const vector& postorder, get_blocks_func predecessor_func) { struct block_detail { size_t dominator; ///< The index of blocks's dominator in post order array size_t postorder_index; ///< The index of the block in the post order array @@ -183,7 +189,7 @@ vector> CFA::CalculateDominators( unordered_map idoms; for (size_t i = 0; i < postorder.size(); i++) { - idoms[postorder[i]] = { undefined_dom, i }; + idoms[postorder[i]] = {undefined_dom, i}; } idoms[postorder.back()].dominator = idoms[postorder.back()].postorder_index; @@ -195,10 +201,10 @@ vector> CFA::CalculateDominators( // Find the first processed/reachable predecessor that is reachable // in the forward traversal. auto res = find_if(begin(predecessors), end(predecessors), - [&idoms, undefined_dom](BB* pred) { - return idoms.count(pred) && - idoms[pred].dominator != undefined_dom; - }); + [&idoms, undefined_dom](BB* pred) { + return idoms.count(pred) && + idoms[pred].dominator != undefined_dom; + }); if (res == end(predecessors)) continue; const BB* idom = *res; size_t idom_idx = idoms[idom].postorder_index; @@ -235,17 +241,16 @@ vector> CFA::CalculateDominators( for (auto idom : idoms) { // NOTE: performing a const cast for convenient usage with // UpdateImmediateDominators - out.push_back({ const_cast(get<0>(idom)), - const_cast(postorder[get<1>(idom).dominator]) }); + out.push_back({const_cast(get<0>(idom)), + const_cast(postorder[get<1>(idom).dominator])}); } return out; } -template -std::vector CFA::TraversalRoots( - const std::vector& blocks, - get_blocks_func succ_func, - get_blocks_func pred_func) { +template +std::vector CFA::TraversalRoots(const std::vector& blocks, + get_blocks_func succ_func, + get_blocks_func pred_func) { // The set of nodes which have been visited from any of the roots so far. std::unordered_set visited; @@ -253,11 +258,10 @@ std::vector CFA::TraversalRoots( auto ignore_block = [](const BB*) {}; auto ignore_blocks = [](const BB*, const BB*) {}; - auto traverse_from_root = [&mark_visited, &succ_func, &ignore_block, - &ignore_blocks](const BB* entry) { - DepthFirstTraversal( - entry, succ_func, mark_visited, ignore_block, ignore_blocks); + &ignore_blocks](const BB* entry) { + DepthFirstTraversal(entry, succ_func, mark_visited, ignore_block, + ignore_blocks); }; std::vector result; @@ -282,15 +286,13 @@ std::vector CFA::TraversalRoots( return result; } -template +template void CFA::ComputeAugmentedCFG( - std::vector& ordered_blocks, - BB* pseudo_entry_block, BB* pseudo_exit_block, + std::vector& ordered_blocks, BB* pseudo_entry_block, + BB* pseudo_exit_block, std::unordered_map>* augmented_successors_map, std::unordered_map>* augmented_predecessors_map, - get_blocks_func succ_func, - get_blocks_func pred_func) { - + get_blocks_func succ_func, get_blocks_func pred_func) { // Compute the successors of the pseudo-entry block, and // the predecessors of the pseudo exit block. auto sources = TraversalRoots(ordered_blocks, succ_func, pred_func); @@ -307,7 +309,7 @@ void CFA::ComputeAugmentedCFG( // constraint when A is a loop header that points to itself as its // own continue target, and B is the latch block for the loop. std::vector reversed_blocks(ordered_blocks.rbegin(), - ordered_blocks.rend()); + ordered_blocks.rend()); auto sinks = TraversalRoots(reversed_blocks, pred_func, succ_func); // Wire up the pseudo entry block. @@ -329,8 +331,8 @@ void CFA::ComputeAugmentedCFG( augmented_succ.push_back(pseudo_exit_block); augmented_succ.insert(augmented_succ.end(), succ->begin(), succ->end()); } -}; +} -} // namespace spvtools +} // namespace spvtools #endif // SPVTOOLS_CFA_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv.h b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv.h index b3e27bbd2716a958f971a28740e33811b0f21691..288e680855118afd7c98de1bcaeea10ce69d3bec 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv.h @@ -38,9 +38,9 @@ struct MarkvCodecOptions { // |bits| is a textual representation of the MARK-V bit sequence used to encode // the instruction (char '0' for 0, char '1' for 1). // |comment| contains all logs generated while processing the instruction. -using MarkvDebugConsumer = std::function& words, const std::string& bits, - const std::string& comment)>; +using MarkvDebugConsumer = + std::function& words, + const std::string& bits, const std::string& comment)>; // Logging callback. Called often (if decoder reads a single bit, the log // consumer will receive 1 character string with that bit). @@ -54,26 +54,20 @@ using MarkvLogConsumer = std::function; // Encodes the given SPIR-V binary to MARK-V binary. // |log_consumer| is optional (pass MarkvLogConsumer() to disable). // |debug_consumer| is optional (pass MarkvDebugConsumer() to disable). -spv_result_t SpirvToMarkv(spv_const_context context, - const std::vector& spirv, - const MarkvCodecOptions& options, - const MarkvModel& markv_model, - MessageConsumer message_consumer, - MarkvLogConsumer log_consumer, - MarkvDebugConsumer debug_consumer, - std::vector* markv); +spv_result_t SpirvToMarkv( + spv_const_context context, const std::vector& spirv, + const MarkvCodecOptions& options, const MarkvModel& markv_model, + MessageConsumer message_consumer, MarkvLogConsumer log_consumer, + MarkvDebugConsumer debug_consumer, std::vector* markv); // Decodes a SPIR-V binary from the given MARK-V binary. // |log_consumer| is optional (pass MarkvLogConsumer() to disable). // |debug_consumer| is optional (pass MarkvDebugConsumer() to disable). -spv_result_t MarkvToSpirv(spv_const_context context, - const std::vector& markv, - const MarkvCodecOptions& options, - const MarkvModel& markv_model, - MessageConsumer message_consumer, - MarkvLogConsumer log_consumer, - MarkvDebugConsumer debug_consumer, - std::vector* spirv); +spv_result_t MarkvToSpirv( + spv_const_context context, const std::vector& markv, + const MarkvCodecOptions& options, const MarkvModel& markv_model, + MessageConsumer message_consumer, MarkvLogConsumer log_consumer, + MarkvDebugConsumer debug_consumer, std::vector* spirv); } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_codec.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_codec.cpp index 46fb09b5e53af863be22dffda1f799888f1ad2c6..cbc25ab02b5608c17be1e179ee36215d3404b7ca 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_codec.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_codec.cpp @@ -30,19 +30,19 @@ #include #include #include -#include #include #include +#include -#include "spirv/1.2/GLSL.std.450.h" -#include "spirv/1.2/OpenCL.std.h" -#include "spirv/1.2/spirv.h" +#include "latest_version_glsl_std_450_header.h" +#include "latest_version_opencl_std_header.h" +#include "latest_version_spirv_header.h" #include "binary.h" #include "diagnostic.h" #include "enum_string_mapping.h" -#include "extensions.h" #include "ext_inst.h" +#include "extensions.h" #include "id_descriptor.h" #include "instruction.h" #include "markv.h" @@ -56,14 +56,14 @@ #include "util/huffman_codec.h" #include "util/move_to_front.h" #include "util/parse_number.h" -#include "validate.h" #include "val/instruction.h" #include "val/validation_state.h" +#include "validate.h" +using libspirv::DiagnosticStream; using libspirv::IdDescriptorCollection; using libspirv::Instruction; using libspirv::ValidationState_t; -using libspirv::DiagnosticStream; using spvutils::BitReaderWord64; using spvutils::BitWriterWord64; using spvutils::HuffmanCodec; @@ -103,8 +103,6 @@ enum : uint64_t { kMtfTypeIntScalarOrVector, // All types declared as return types in OpTypeFunction. kMtfTypeReturnedByFunction, - // All object ids which are integer constants. - kMtfConstInteger, // All composite objects. kMtfComposite, // All bool objects or vectors of bools. @@ -133,16 +131,12 @@ enum : uint64_t { kMtfFunctionTypeWithReturnTypeBegin = 0x70000, // All function objects which return specific type. kMtfFunctionWithReturnTypeBegin = 0x80000, - // All float vectors of specific size. - kMtfFloatVectorOfSizeBegin = 0x90000, - // Id descriptor space (32-bit). - kMtfIdDescriptorSpaceBegin = 0x100000000, + // Short id descriptor space (max 16-bit). + kMtfShortIdDescriptorSpaceBegin = 0x90000, + // Long id descriptor space (32-bit). + kMtfLongIdDescriptorSpaceBegin = 0x100000000, }; -// Used by "presumed index" technique which does special treatment of integer -// constants no greater than this value. -const uint32_t kMarkvMaxPresumedAccessIndex = 31; - // Signals that the value is not in the coding scheme and a fallback method // needs to be used. const uint64_t kMarkvNoneOfTheAbove = MarkvModel::GetMarkvNoneOfTheAbove(); @@ -158,6 +152,20 @@ const size_t kCommentNumWhitespaces = 2; const size_t kByteBreakAfterInstIfLessThanUntilNextByte = 8; +const uint32_t kShortDescriptorNumBits = 8; + +// Custom hash function used to produce short descriptors. +uint32_t ShortHashU32Array(const std::vector& words) { + // The hash function is a sum of hashes of each word seeded by word index. + // Knuth's multiplicative hash is used to hash the words. + const uint32_t kKnuthMulHash = 2654435761; + uint32_t val = 0; + for (uint32_t i = 0; i < words.size(); ++i) { + val += (words[i] + i + 123) * kKnuthMulHash; + } + return 1 + val % ((1 << kShortDescriptorNumBits) - 1); +} + // Returns a set of mtf rank codecs based on a plausible hand-coded // distribution. std::map>> @@ -167,31 +175,31 @@ GetMtfHuffmanCodecs() { std::unique_ptr> codec; codec.reset(new HuffmanCodec(std::map({ - { 0, 5 }, - { 1, 40 }, - { 2, 10 }, - { 3, 5 }, - { 4, 5 }, - { 5, 5 }, - { 6, 3 }, - { 7, 3 }, - { 8, 3 }, - { 9, 3 }, - { kMtfRankEncodedByValueSignal, 10 }, + {0, 5}, + {1, 40}, + {2, 10}, + {3, 5}, + {4, 5}, + {5, 5}, + {6, 3}, + {7, 3}, + {8, 3}, + {9, 3}, + {kMtfRankEncodedByValueSignal, 10}, }))); codecs.emplace(kMtfAll, std::move(codec)); codec.reset(new HuffmanCodec(std::map({ - { 1, 50 }, - { 2, 20 }, - { 3, 5 }, - { 4, 5 }, - { 5, 2 }, - { 6, 1 }, - { 7, 1 }, - { 8, 1 }, - { 9, 1 }, - { kMtfRankEncodedByValueSignal, 10 }, + {1, 50}, + {2, 20}, + {3, 5}, + {4, 5}, + {5, 2}, + {6, 1}, + {7, 1}, + {8, 1}, + {9, 1}, + {kMtfRankEncodedByValueSignal, 10}, }))); codecs.emplace(kMtfGenericNonZeroRank, std::move(codec)); @@ -264,14 +272,12 @@ bool OpcodeHasFixedNumberOfOperands(SpvOp opcode) { return false; } -size_t GetNumBitsToNextByte(size_t bit_pos) { - return (8 - (bit_pos % 8)) % 8; -} +size_t GetNumBitsToNextByte(size_t bit_pos) { return (8 - (bit_pos % 8)) % 8; } // Defines and returns current MARK-V version. uint32_t GetMarkvVersion() { const uint32_t kVersionMajor = 1; - const uint32_t kVersionMinor = 2; + const uint32_t kVersionMinor = 4; return kVersionMinor | (kVersionMajor << 16); } @@ -292,10 +298,8 @@ class MarkvLogger { } void AppendBitSequence(const std::string& str) { - if (debug_consumer_) - instruction_bits_ << str; - if (use_delimiter_) - Append("-"); + if (debug_consumer_) instruction_bits_ << str; + if (use_delimiter_) Append("-"); Append(str); use_delimiter_ = true; } @@ -329,10 +333,8 @@ class MarkvLogger { MarkvLogger& operator=(MarkvLogger&&) = delete; void Append(const std::string& str) { - if (log_consumer_) - log_consumer_(str); - if (debug_consumer_) - instruction_comment_ << str; + if (log_consumer_) log_consumer_(str); + if (debug_consumer_) instruction_comment_ << str; } MarkvLogConsumer log_consumer_; @@ -352,9 +354,7 @@ class MarkvLogger { // - SPIR-V grammar and helper functions. class MarkvCodecBase { public: - virtual ~MarkvCodecBase() { - spvValidatorOptionsDestroy(validator_options_); - } + virtual ~MarkvCodecBase() { spvValidatorOptionsDestroy(validator_options_); } MarkvCodecBase() = delete; @@ -383,17 +383,20 @@ class MarkvCodecBase { explicit MarkvCodecBase(spv_const_context context, spv_validator_options validator_options, const MarkvModel* model) - : validator_options_(validator_options), grammar_(context), - model_(model), mtf_huffman_codecs_(GetMtfHuffmanCodecs()), + : validator_options_(validator_options), + grammar_(context), + model_(model), + short_id_descriptors_(ShortHashU32Array), + mtf_huffman_codecs_(GetMtfHuffmanCodecs()), context_(context), - vstate_(validator_options ? - new ValidationState_t(context, validator_options_) : nullptr) {} + vstate_(validator_options + ? new ValidationState_t(context, validator_options_) + : nullptr) {} // Validates a single instruction and updates validation state of the module. // Does nothing and returns SPV_SUCCESS if validator was not created. spv_result_t UpdateValidationState(const spv_parsed_instruction_t& inst) { - if (!vstate_) - return SPV_SUCCESS; + if (!vstate_) return SPV_SUCCESS; return ValidateInstructionAndUpdateValidationState(vstate_.get(), &inst); } @@ -402,8 +405,7 @@ class MarkvCodecBase { // not registered. const Instruction* FindDef(uint32_t id) const { const auto it = id_to_def_instruction_.find(id); - if (it == id_to_def_instruction_.end()) - return nullptr; + if (it == id_to_def_instruction_.end()) return nullptr; return it->second; } @@ -438,11 +440,6 @@ class MarkvCodecBase { return kMtfVectorOfComponentTypeBegin + type_id; } - // Returns mtf handle for float vectors of specific size. - uint64_t GetMtfFloatVectorOfSize(uint32_t size) const { - return kMtfFloatVectorOfSizeBegin + size; - } - // Returns mtf handle for vector type of specific size. uint64_t GetMtfTypeVectorOfSize(uint32_t size) const { return kMtfTypeVectorOfSizeBegin + size; @@ -463,9 +460,14 @@ class MarkvCodecBase { return kMtfFunctionWithReturnTypeBegin + type_id; } - // Returns mtf handle for the given id descriptor. - uint64_t GetMtfIdDescriptor(uint32_t descriptor) const { - return kMtfIdDescriptorSpaceBegin + descriptor; + // Returns mtf handle for the given long id descriptor. + uint64_t GetMtfLongIdDescriptor(uint32_t descriptor) const { + return kMtfLongIdDescriptorSpaceBegin + descriptor; + } + + // Returns mtf handle for the given short id descriptor. + uint64_t GetMtfShortIdDescriptor(uint32_t descriptor) const { + return kMtfShortIdDescriptorSpaceBegin + descriptor; } // Process data from the current instruction. This would update MTFs and @@ -479,47 +481,53 @@ class MarkvCodecBase { // Returns words of the current instruction. Decoder has a different // implementation and the array is valid only until the previously decoded // word. - virtual const uint32_t* GetInstWords() const { - return inst_.words; - } + virtual const uint32_t* GetInstWords() const { return inst_.words; } // Returns the opcode of the previous instruction. SpvOp GetPrevOpcode() const { - if (instructions_.empty()) - return SpvOpNop; + if (instructions_.empty()) return SpvOpNop; return instructions_.back()->opcode(); } // Returns diagnostic stream, position index is set to instruction number. DiagnosticStream Diag(spv_result_t error_code) const { - return DiagnosticStream({0, 0, instructions_.size()}, - context_->consumer, error_code); + return DiagnosticStream({0, 0, instructions_.size()}, context_->consumer, + error_code); } // Returns current id bound. - uint32_t GetIdBound() const { - return id_bound_; - } + uint32_t GetIdBound() const { return id_bound_; } // Sets current id bound, expected to be no lower than the previous one. void SetIdBound(uint32_t id_bound) { assert(id_bound >= id_bound_); id_bound_ = id_bound; - if (vstate_) - vstate_->setIdBound(id_bound); + if (vstate_) vstate_->setIdBound(id_bound); } // Returns Huffman codec for ranks of the mtf with given |handle|. // Different mtfs can use different rank distributions. // May return nullptr if the codec doesn't exist. - const spvutils::HuffmanCodec* GetMtfHuffmanCodec(uint64_t handle) const { + const spvutils::HuffmanCodec* GetMtfHuffmanCodec( + uint64_t handle) const { const auto it = mtf_huffman_codecs_.find(handle); - if (it == mtf_huffman_codecs_.end()) - return nullptr; + if (it == mtf_huffman_codecs_.end()) return nullptr; return it->second.get(); } + // Promotes id in all move-to-front sequences if ids can be shared by multiple + // sequences. + void PromoteIfNeeded(uint32_t id) { + if (!model_->AnyDescriptorHasCodingScheme() && + model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kShortDescriptor) { + // Move-to-front sequences do not share ids. Nothing to do. + return; + } + multi_mtf_.Promote(id); + } + spv_validator_options validator_options_ = nullptr; const libspirv::AssemblyGrammar grammar_; MarkvHeader header_; @@ -556,13 +564,19 @@ class MarkvCodecBase { // List of instructions in the order they are given in the module. std::vector> instructions_; - // Maps used for the 'presumed id' techniques. Maps small constant integer - // value to its id and back. - std::map presumed_index_to_id_; - std::map id_to_presumed_index_; + // Container/computer for long (32-bit) id descriptors. + IdDescriptorCollection long_id_descriptors_; - // Container/computer for id descriptors. - IdDescriptorCollection id_descriptors_; + // Container/computer for short id descriptors. + // Short descriptors are stored in uint32_t, but their actual bit width is + // defined with kShortDescriptorNumBits. + // It doesn't seem logical to have a different computer for short id + // descriptors, since one could actually map/truncate long descriptors. + // But as short descriptors have collisions, the efficiency of + // compression depends on the collision pattern, and short descriptors + // produced by function ShortHashU32Array have been empirically proven to + // produce better results. + IdDescriptorCollection short_id_descriptors_; // Huffman codecs for move-to-front ranks. The map key is mtf handle. Doesn't // need to contain a different codec for every handle as most use one and the @@ -597,19 +611,17 @@ class MarkvEncoder : public MarkvCodecBase { public: // |model| is owned by the caller, must be not null and valid during the // lifetime of MarkvEncoder. - MarkvEncoder(spv_const_context context, - const MarkvCodecOptions& options, + MarkvEncoder(spv_const_context context, const MarkvCodecOptions& options, const MarkvModel* model) : MarkvCodecBase(context, GetValidatorOptions(options), model), options_(options) { - (void) options_; + (void)options_; } // Writes data from SPIR-V header to MARK-V header. - spv_result_t EncodeHeader( - spv_endianness_t /* endian */, uint32_t /* magic */, - uint32_t version, uint32_t generator, uint32_t id_bound, - uint32_t /* schema */) { + spv_result_t EncodeHeader(spv_endianness_t /* endian */, uint32_t /* magic */, + uint32_t version, uint32_t generator, + uint32_t id_bound, uint32_t /* schema */) { SetIdBound(id_bound); header_.spirv_version = version; header_.spirv_generator = generator; @@ -620,9 +632,8 @@ class MarkvEncoder : public MarkvCodecBase { void CreateLogger(MarkvLogConsumer log_consumer, MarkvDebugConsumer debug_consumer) { logger_.reset(new MarkvLogger(log_consumer, debug_consumer)); - writer_.SetCallback([this](const std::string& str){ - logger_->AppendBitSequence(str); - }); + writer_.SetCallback( + [this](const std::string& str) { logger_->AppendBitSequence(str); }); } // Encodes SPIR-V instruction to MARK-V and writes to bit stream. @@ -645,8 +656,8 @@ class MarkvEncoder : public MarkvCodecBase { assert(writer_.GetData()); std::memcpy(markv.data(), &header_, sizeof(header_)); - std::memcpy(markv.data() + sizeof(header_), - writer_.GetData(), writer_.GetDataSizeBytes()); + std::memcpy(markv.data() + sizeof(header_), writer_.GetData(), + writer_.GetDataSizeBytes()); return markv; } @@ -670,8 +681,8 @@ class MarkvEncoder : public MarkvCodecBase { // Creates and returns validator options. Returned value owned by the caller. static spv_validator_options GetValidatorOptions( const MarkvCodecOptions& options) { - return options.validate_spirv_binary ? - spvValidatorOptionsCreate() : nullptr; + return options.validate_spirv_binary ? spvValidatorOptionsCreate() + : nullptr; } // Writes a single word to bit stream. operand_.type determines if the word is @@ -680,7 +691,8 @@ class MarkvEncoder : public MarkvCodecBase { // Writes both opcode and num_operands as a single code. // Returns SPV_UNSUPPORTED iff no suitable codec was found. - spv_result_t EncodeOpcodeAndNumOperands(uint32_t opcode, uint32_t num_operands); + spv_result_t EncodeOpcodeAndNumOperands(uint32_t opcode, + uint32_t num_operands); // Writes mtf rank to bit stream. |mtf| is used to determine the codec // scheme. |fallback_method| is used if no codec defined for |mtf|. @@ -726,13 +738,12 @@ class MarkvDecoder : public MarkvCodecBase { public: // |model| is owned by the caller, must be not null and valid during the // lifetime of MarkvEncoder. - MarkvDecoder(spv_const_context context, - const std::vector& markv, - const MarkvCodecOptions& options, - const MarkvModel* model) + MarkvDecoder(spv_const_context context, const std::vector& markv, + const MarkvCodecOptions& options, const MarkvModel* model) : MarkvCodecBase(context, GetValidatorOptions(options), model), - options_(options), reader_(markv) { - (void) options_; + options_(options), + reader_(markv) { + (void)options_; SetIdBound(1); parsed_operands_.reserve(25); inst_words_.reserve(25); @@ -759,8 +770,8 @@ class MarkvDecoder : public MarkvCodecBase { // Creates and returns validator options. Returned value owned by the caller. static spv_validator_options GetValidatorOptions( const MarkvCodecOptions& options) { - return options.validate_spirv_binary ? - spvValidatorOptionsCreate() : nullptr; + return options.validate_spirv_binary ? spvValidatorOptionsCreate() + : nullptr; } // Reads a single bit from reader_. The read bit is stored in |bit|. @@ -768,8 +779,7 @@ class MarkvDecoder : public MarkvCodecBase { bool ReadBit(bool* bit) { uint64_t bits = 0; const bool result = reader_.ReadBits(&bits, 1); - if (result) - *bit = bits ? true : false; + if (result) *bit = bits ? true : false; return result; }; @@ -814,9 +824,7 @@ class MarkvDecoder : public MarkvCodecBase { bool ReadToByteBreak(size_t byte_break_if_less_than); // Returns instruction words decoded up to this point. - const uint32_t* GetInstWords() const override { - return inst_words_.data(); - } + const uint32_t* GetInstWords() const override { return inst_words_.data(); } // Reads a literal number as it is described in |operand| from the bit stream, // decodes and writes it to spirv_. @@ -877,7 +885,7 @@ void MarkvCodecBase::ProcessCurInstruction() { id_to_def_instruction_.emplace(inst_.result_id, instructions_.back().get()); // Collect ids local to the current function. - if (cur_function_id_){ + if (cur_function_id_) { ids_local_to_cur_function_.push_back(inst_.result_id); } @@ -885,8 +893,11 @@ void MarkvCodecBase::ProcessCurInstruction() { if (opcode == SpvOpFunction) { cur_function_id_ = inst_.result_id; cur_function_return_type_ = inst_.type_id; - multi_mtf_.Insert(GetMtfFunctionWithReturnType(inst_.type_id), - inst_.result_id); + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + multi_mtf_.Insert(GetMtfFunctionWithReturnType(inst_.type_id), + inst_.result_id); + } // Store function parameter types in a queue, so that we know which types // to expect in the following OpFunctionParameter instructions. @@ -902,14 +913,12 @@ void MarkvCodecBase::ProcessCurInstruction() { // Remove local ids from MTFs if function end. if (opcode == SpvOpFunctionEnd) { cur_function_id_ = 0; - for (uint32_t id : ids_local_to_cur_function_) - multi_mtf_.RemoveFromAll(id); + for (uint32_t id : ids_local_to_cur_function_) multi_mtf_.RemoveFromAll(id); ids_local_to_cur_function_.clear(); assert(remaining_function_parameter_types_.empty()); } - if (!inst_.result_id) - return; + if (!inst_.result_id) return; { // Save the result ID to type ID mapping. @@ -918,155 +927,155 @@ void MarkvCodecBase::ProcessCurInstruction() { // have no type Id, and will map to 0. The result Id for a // type-generating instruction (e.g. OpTypeInt) maps to itself. auto insertion_result = id_to_type_id_.emplace( - inst_.result_id, - spvOpcodeGeneratesType(SpvOp(inst_.opcode)) ? - inst_.result_id : inst_.type_id); + inst_.result_id, spvOpcodeGeneratesType(SpvOp(inst_.opcode)) + ? inst_.result_id + : inst_.type_id); (void)insertion_result; assert(insertion_result.second); } // Add result_id to MTFs. + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + switch (opcode) { + case SpvOpTypeFloat: + case SpvOpTypeInt: + case SpvOpTypeBool: + case SpvOpTypeVector: + case SpvOpTypePointer: + case SpvOpExtInstImport: + case SpvOpTypeSampledImage: + case SpvOpTypeImage: + case SpvOpTypeSampler: + multi_mtf_.Insert(GetMtfIdGeneratedByOpcode(opcode), inst_.result_id); + break; + default: + break; + } - switch (opcode) { - case SpvOpTypeFloat: - case SpvOpTypeInt: - case SpvOpTypeBool: - case SpvOpTypeVector: - case SpvOpTypePointer: - case SpvOpExtInstImport: - case SpvOpTypeSampledImage: - case SpvOpTypeImage: - case SpvOpTypeSampler: - multi_mtf_.Insert(GetMtfIdGeneratedByOpcode(opcode), inst_.result_id); - break; - default: - break; - } - - if (spvOpcodeIsComposite(opcode)) { - multi_mtf_.Insert(kMtfTypeComposite, inst_.result_id); - } - - if (opcode == SpvOpLabel) { - multi_mtf_.InsertOrPromote(kMtfLabel, inst_.result_id); - } - - if (opcode == SpvOpTypeInt) { - multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); - multi_mtf_.Insert(kMtfTypeIntScalarOrVector, inst_.result_id); - } + if (spvOpcodeIsComposite(opcode)) { + multi_mtf_.Insert(kMtfTypeComposite, inst_.result_id); + } - if (opcode == SpvOpTypeFloat) { - multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); - multi_mtf_.Insert(kMtfTypeFloatScalarOrVector, inst_.result_id); - } + if (opcode == SpvOpLabel) { + multi_mtf_.InsertOrPromote(kMtfLabel, inst_.result_id); + } - if (opcode == SpvOpTypeBool) { - multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); - multi_mtf_.Insert(kMtfTypeBoolScalarOrVector, inst_.result_id); - } + if (opcode == SpvOpTypeInt) { + multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); + multi_mtf_.Insert(kMtfTypeIntScalarOrVector, inst_.result_id); + } - if (opcode == SpvOpTypeVector) { - const uint32_t component_type_id = inst_.words[2]; - const uint32_t size = inst_.words[3]; - if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeFloat), - component_type_id)) { + if (opcode == SpvOpTypeFloat) { + multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); multi_mtf_.Insert(kMtfTypeFloatScalarOrVector, inst_.result_id); - } else if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeInt), - component_type_id)) { - multi_mtf_.Insert(kMtfTypeIntScalarOrVector, inst_.result_id); - } else if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeBool), - component_type_id)) { - multi_mtf_.Insert(kMtfTypeBoolScalarOrVector, inst_.result_id); } - multi_mtf_.Insert(GetMtfTypeVectorOfSize(size), inst_.result_id); - } - if (inst_.opcode == SpvOpTypeFunction) { - const uint32_t return_type = inst_.words[2]; - multi_mtf_.Insert(kMtfTypeReturnedByFunction, return_type); - multi_mtf_.Insert(GetMtfFunctionTypeWithReturnType(return_type), - inst_.result_id); - } + if (opcode == SpvOpTypeBool) { + multi_mtf_.Insert(kMtfTypeScalar, inst_.result_id); + multi_mtf_.Insert(kMtfTypeBoolScalarOrVector, inst_.result_id); + } - if (inst_.type_id) { - const Instruction* type_inst = FindDef(inst_.type_id); - assert(type_inst); + if (opcode == SpvOpTypeVector) { + const uint32_t component_type_id = inst_.words[2]; + const uint32_t size = inst_.words[3]; + if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeFloat), + component_type_id)) { + multi_mtf_.Insert(kMtfTypeFloatScalarOrVector, inst_.result_id); + } else if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeInt), + component_type_id)) { + multi_mtf_.Insert(kMtfTypeIntScalarOrVector, inst_.result_id); + } else if (multi_mtf_.HasValue(GetMtfIdGeneratedByOpcode(SpvOpTypeBool), + component_type_id)) { + multi_mtf_.Insert(kMtfTypeBoolScalarOrVector, inst_.result_id); + } + multi_mtf_.Insert(GetMtfTypeVectorOfSize(size), inst_.result_id); + } - multi_mtf_.Insert(kMtfObject, inst_.result_id); + if (inst_.opcode == SpvOpTypeFunction) { + const uint32_t return_type = inst_.words[2]; + multi_mtf_.Insert(kMtfTypeReturnedByFunction, return_type); + multi_mtf_.Insert(GetMtfFunctionTypeWithReturnType(return_type), + inst_.result_id); + } - multi_mtf_.Insert(GetMtfIdOfType(inst_.type_id), inst_.result_id); + if (inst_.type_id) { + const Instruction* type_inst = FindDef(inst_.type_id); + assert(type_inst); - if (multi_mtf_.HasValue(kMtfTypeFloatScalarOrVector, inst_.type_id)) { - multi_mtf_.Insert(kMtfFloatScalarOrVector, inst_.result_id); - } + multi_mtf_.Insert(kMtfObject, inst_.result_id); - if (multi_mtf_.HasValue(kMtfTypeIntScalarOrVector, inst_.type_id)) - multi_mtf_.Insert(kMtfIntScalarOrVector, inst_.result_id); + multi_mtf_.Insert(GetMtfIdOfType(inst_.type_id), inst_.result_id); - if (multi_mtf_.HasValue(kMtfTypeBoolScalarOrVector, inst_.type_id)) - multi_mtf_.Insert(kMtfBoolScalarOrVector, inst_.result_id); + if (multi_mtf_.HasValue(kMtfTypeFloatScalarOrVector, inst_.type_id)) { + multi_mtf_.Insert(kMtfFloatScalarOrVector, inst_.result_id); + } - if (multi_mtf_.HasValue(kMtfTypeComposite, inst_.type_id)) - multi_mtf_.Insert(kMtfComposite, inst_.result_id); + if (multi_mtf_.HasValue(kMtfTypeIntScalarOrVector, inst_.type_id)) + multi_mtf_.Insert(kMtfIntScalarOrVector, inst_.result_id); + + if (multi_mtf_.HasValue(kMtfTypeBoolScalarOrVector, inst_.type_id)) + multi_mtf_.Insert(kMtfBoolScalarOrVector, inst_.result_id); + + if (multi_mtf_.HasValue(kMtfTypeComposite, inst_.type_id)) + multi_mtf_.Insert(kMtfComposite, inst_.result_id); + + switch (type_inst->opcode()) { + case SpvOpTypeInt: + case SpvOpTypeBool: + case SpvOpTypePointer: + case SpvOpTypeVector: + case SpvOpTypeImage: + case SpvOpTypeSampledImage: + case SpvOpTypeSampler: + multi_mtf_.Insert( + GetMtfIdWithTypeGeneratedByOpcode(type_inst->opcode()), + inst_.result_id); + break; + default: + break; + } - if (inst_.opcode == SpvOpConstant) { - if (multi_mtf_.HasValue( - GetMtfIdGeneratedByOpcode(SpvOpTypeInt), inst_.type_id)) { - multi_mtf_.Insert(kMtfConstInteger, inst_.result_id); - const uint32_t presumed_index = inst_.words[3]; - if (presumed_index <= kMarkvMaxPresumedAccessIndex) { - const auto result = - presumed_index_to_id_.emplace(presumed_index, inst_.result_id); - if (result.second) { - id_to_presumed_index_.emplace(inst_.result_id, presumed_index); - } - } + if (type_inst->opcode() == SpvOpTypeVector) { + const uint32_t component_type = type_inst->word(2); + multi_mtf_.Insert(GetMtfVectorOfComponentType(component_type), + inst_.result_id); } - } - switch (type_inst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeBool: - case SpvOpTypePointer: - case SpvOpTypeVector: - case SpvOpTypeImage: - case SpvOpTypeSampledImage: - case SpvOpTypeSampler: - multi_mtf_.Insert(GetMtfIdWithTypeGeneratedByOpcode( - type_inst->opcode()), inst_.result_id); - break; - default: - break; - } + if (type_inst->opcode() == SpvOpTypePointer) { + assert(type_inst->operands().size() > 2); + assert(type_inst->words().size() > type_inst->operands()[2].offset); + const uint32_t data_type = + type_inst->word(type_inst->operands()[2].offset); + multi_mtf_.Insert(GetMtfPointerToType(data_type), inst_.result_id); - if (type_inst->opcode() == SpvOpTypeVector) { - const uint32_t component_type = type_inst->word(2); - multi_mtf_.Insert(GetMtfVectorOfComponentType(component_type), - inst_.result_id); + if (multi_mtf_.HasValue(kMtfTypeComposite, data_type)) + multi_mtf_.Insert(kMtfTypePointerToComposite, inst_.result_id); + } } - if (type_inst->opcode() == SpvOpTypePointer) { - assert(type_inst->operands().size() > 2); - assert(type_inst->words().size() > type_inst->operands()[2].offset); - const uint32_t data_type = - type_inst->word(type_inst->operands()[2].offset); - multi_mtf_.Insert(GetMtfPointerToType(data_type), inst_.result_id); - - if (multi_mtf_.HasValue(kMtfTypeComposite, data_type)) - multi_mtf_.Insert(kMtfTypePointerToComposite, inst_.result_id); + if (spvOpcodeGeneratesType(opcode)) { + if (opcode != SpvOpTypeFunction) { + multi_mtf_.Insert(kMtfTypeNonFunction, inst_.result_id); + } } } - if (spvOpcodeGeneratesType(opcode)) { - if (opcode != SpvOpTypeFunction) { - multi_mtf_.Insert(kMtfTypeNonFunction, inst_.result_id); - } + if (model_->AnyDescriptorHasCodingScheme()) { + const uint32_t long_descriptor = + long_id_descriptors_.ProcessInstruction(inst_); + if (model_->DescriptorHasCodingScheme(long_descriptor)) + multi_mtf_.Insert(GetMtfLongIdDescriptor(long_descriptor), + inst_.result_id); } - const uint32_t descriptor = id_descriptors_.ProcessInstruction(inst_); - if (model_->DescriptorHasCodingScheme(descriptor)) - multi_mtf_.Insert(GetMtfIdDescriptor(descriptor), inst_.result_id); + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kShortDescriptor) { + const uint32_t short_descriptor = + short_id_descriptors_.ProcessInstruction(inst_); + multi_mtf_.Insert(GetMtfShortIdDescriptor(short_descriptor), + inst_.result_id); + } } uint64_t MarkvCodecBase::GetRuleBasedMtf() { @@ -1082,7 +1091,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { (inst_.opcode == SpvOpSelectionMerge && operand_index_ == 0) || (inst_.opcode == SpvOpBranch && operand_index_ == 0) || (inst_.opcode == SpvOpBranchConditional && - (operand_index_ == 1 || operand_index_ == 2 )) || + (operand_index_ == 1 || operand_index_ == 2)) || (inst_.opcode == SpvOpPhi && operand_index_ >= 3 && operand_index_ % 2 == 1) || (inst_.opcode == SpvOpSwitch && operand_index_ > 0)) { @@ -1097,9 +1106,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { case SpvOpFRem: case SpvOpFMod: case SpvOpFNegate: { - if (operand_index_ == 0) - return kMtfTypeFloatScalarOrVector; - + if (operand_index_ == 0) return kMtfTypeFloatScalarOrVector; return GetMtfIdOfType(inst_.type_id); } @@ -1112,13 +1119,12 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { case SpvOpUMod: case SpvOpSRem: case SpvOpSNegate: { - if (operand_index_ == 0) - return kMtfTypeIntScalarOrVector; + if (operand_index_ == 0) return kMtfTypeIntScalarOrVector; return kMtfIntScalarOrVector; } - // TODO(atgoo@github.com) Add OpConvertFToU and other opcodes. + // TODO(atgoo@github.com) Add OpConvertFToU and other opcodes. case SpvOpFOrdEqual: case SpvOpFUnordEqual: @@ -1132,14 +1138,11 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { case SpvOpFUnordLessThanEqual: case SpvOpFOrdGreaterThanEqual: case SpvOpFUnordGreaterThanEqual: { - if (operand_index_ == 0) - return kMtfTypeBoolScalarOrVector; - if (operand_index_ == 2) - return kMtfFloatScalarOrVector; + if (operand_index_ == 0) return kMtfTypeBoolScalarOrVector; + if (operand_index_ == 2) return kMtfFloatScalarOrVector; if (operand_index_ == 3) { const uint32_t first_operand_id = GetInstWords()[3]; - const uint32_t first_operand_type = - id_to_type_id_.at(first_operand_id); + const uint32_t first_operand_type = id_to_type_id_.at(first_operand_id); return GetMtfIdOfType(first_operand_type); } break; @@ -1165,16 +1168,14 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { } assert(inst_.type_id); - if (operand_index_ == 2) - return GetMtfIdOfType(inst_.type_id); + if (operand_index_ == 2) return GetMtfIdOfType(inst_.type_id); if (operand_index_ == 3) return GetMtfIdOfType(GetVectorComponentType(inst_.type_id)); break; } case SpvOpDot: { - if (operand_index_ == 0) - return GetMtfIdGeneratedByOpcode(SpvOpTypeFloat); + if (operand_index_ == 0) return GetMtfIdGeneratedByOpcode(SpvOpTypeFloat); assert(inst_.type_id); if (operand_index_ == 2) @@ -1227,8 +1228,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { } case SpvOpLoad: { - if (operand_index_ == 0) - return kMtfTypeNonFunction; + if (operand_index_ == 0) return kMtfTypeNonFunction; if (operand_index_ == 2) { assert(inst_.type_id); @@ -1262,16 +1262,14 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { case SpvOpAccessChain: { if (operand_index_ == 0) return GetMtfIdGeneratedByOpcode(SpvOpTypePointer); - if (operand_index_ == 2) - return kMtfTypePointerToComposite; + if (operand_index_ == 2) return kMtfTypePointerToComposite; if (operand_index_ >= 3) return GetMtfIdWithTypeGeneratedByOpcode(SpvOpTypeInt); break; } case SpvOpCompositeConstruct: { - if (operand_index_ == 0) - return kMtfTypeComposite; + if (operand_index_ == 0) return kMtfTypeComposite; if (operand_index_ >= 2) { const uint32_t composite_type = GetInstWords()[1]; if (multi_mtf_.HasValue(kMtfTypeFloatScalarOrVector, composite_type)) @@ -1285,14 +1283,12 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { } case SpvOpCompositeExtract: { - if (operand_index_ == 2) - return kMtfComposite; + if (operand_index_ == 2) return kMtfComposite; break; } case SpvOpConstantComposite: { - if (operand_index_ == 0) - return kMtfTypeComposite; + if (operand_index_ == 0) return kMtfTypeComposite; if (operand_index_ >= 2) { const Instruction* composite_type_inst = FindDef(inst_.type_id); assert(composite_type_inst); @@ -1409,8 +1405,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { } case SpvOpFunction: { - if (operand_index_ == 0) - return kMtfTypeReturnedByFunction; + if (operand_index_ == 0) return kMtfTypeReturnedByFunction; if (operand_index_ == 3) { const uint32_t return_type = GetInstWords()[1]; @@ -1420,8 +1415,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { } case SpvOpFunctionCall: { - if (operand_index_ == 0) - return kMtfTypeReturnedByFunction; + if (operand_index_ == 0) return kMtfTypeReturnedByFunction; if (operand_index_ == 2) { const uint32_t return_type = GetInstWords()[1]; @@ -1431,8 +1425,7 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { if (operand_index_ >= 3) { const uint32_t function_id = GetInstWords()[3]; const Instruction* function_inst = FindDef(function_id); - if (!function_inst) - return kMtfObject; + if (!function_inst) return kMtfObject; assert(function_inst->opcode() == SpvOpFunction); @@ -1441,16 +1434,14 @@ uint64_t MarkvCodecBase::GetRuleBasedMtf() { assert(function_type_inst); assert(function_type_inst->opcode() == SpvOpTypeFunction); - const uint32_t argument_type = - function_type_inst->word(operand_index_); + const uint32_t argument_type = function_type_inst->word(operand_index_); return GetMtfIdOfType(argument_type); } break; } case SpvOpReturnValue: { - if (operand_index_ == 0) - return GetMtfIdOfType(cur_function_return_type_); + if (operand_index_ == 0) return GetMtfIdOfType(cur_function_return_type_); break; } @@ -1501,10 +1492,9 @@ spv_result_t MarkvEncoder::EncodeNonIdWord(uint32_t word) { // Encoding failed, write kMarkvNoneOfTheAbove flag. if (!codec->Encode(kMarkvNoneOfTheAbove, &bits, &num_bits)) return Diag(SPV_ERROR_INTERNAL) - << "Non-id word Huffman table for " - << spvOpcodeString(SpvOp(inst_.opcode)) - << " operand index " << operand_index_ - << " is missing kMarkvNoneOfTheAbove"; + << "Non-id word Huffman table for " + << spvOpcodeString(SpvOp(inst_.opcode)) << " operand index " + << operand_index_ << " is missing kMarkvNoneOfTheAbove"; writer_.WriteBits(bits, num_bits); } } @@ -1527,7 +1517,7 @@ spv_result_t MarkvDecoder::DecodeNonIdWord(uint32_t* word) { uint64_t decoded_value = 0; if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to decode non-id word with Huffman"; + << "Failed to decode non-id word with Huffman"; if (decoded_value != kMarkvNoneOfTheAbove) { // The word decoded successfully. @@ -1544,24 +1534,25 @@ spv_result_t MarkvDecoder::DecodeNonIdWord(uint32_t* word) { if (chunk_length) { if (!reader_.ReadVariableWidthU32(word, chunk_length)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to decode non-id word with varint"; + << "Failed to decode non-id word with varint"; } else { if (!reader_.ReadUnencoded(word)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read unencoded non-id word"; + << "Failed to read unencoded non-id word"; } return SPV_SUCCESS; } -spv_result_t MarkvEncoder::EncodeOpcodeAndNumOperands( - uint32_t opcode, uint32_t num_operands) { +spv_result_t MarkvEncoder::EncodeOpcodeAndNumOperands(uint32_t opcode, + uint32_t num_operands) { uint64_t bits = 0; size_t num_bits = 0; const uint32_t word = opcode | (num_operands << 16); // First try to use the Markov chain codec. - auto* codec = model_->GetOpcodeAndNumOperandsMarkovHuffmanCodec(GetPrevOpcode()); + auto* codec = + model_->GetOpcodeAndNumOperandsMarkovHuffmanCodec(GetPrevOpcode()); if (codec) { if (codec->Encode(word, &bits, &num_bits)) { // The word was successfully encoded into bits/num_bits. @@ -1572,9 +1563,9 @@ spv_result_t MarkvEncoder::EncodeOpcodeAndNumOperands( // and use fallback encoding. if (!codec->Encode(kMarkvNoneOfTheAbove, &bits, &num_bits)) return Diag(SPV_ERROR_INTERNAL) - << "opcode_and_num_operands Huffman table for " - << spvOpcodeString(GetPrevOpcode()) - << "is missing kMarkvNoneOfTheAbove"; + << "opcode_and_num_operands Huffman table for " + << spvOpcodeString(GetPrevOpcode()) + << "is missing kMarkvNoneOfTheAbove"; writer_.WriteBits(bits, num_bits); } } @@ -1591,8 +1582,8 @@ spv_result_t MarkvEncoder::EncodeOpcodeAndNumOperands( // and return false. if (!codec->Encode(kMarkvNoneOfTheAbove, &bits, &num_bits)) return Diag(SPV_ERROR_INTERNAL) - << "Global opcode_and_num_operands Huffman table is missing " - << "kMarkvNoneOfTheAbove"; + << "Global opcode_and_num_operands Huffman table is missing " + << "kMarkvNoneOfTheAbove"; writer_.WriteBits(bits, num_bits); return SPV_UNSUPPORTED; } @@ -1601,13 +1592,14 @@ spv_result_t MarkvEncoder::EncodeOpcodeAndNumOperands( spv_result_t MarkvDecoder::DecodeOpcodeAndNumberOfOperands( uint32_t* opcode, uint32_t* num_operands) { // First try to use the Markov chain codec. - auto* codec = model_->GetOpcodeAndNumOperandsMarkovHuffmanCodec(GetPrevOpcode()); + auto* codec = + model_->GetOpcodeAndNumOperandsMarkovHuffmanCodec(GetPrevOpcode()); if (codec) { uint64_t decoded_value = 0; if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to decode opcode_and_num_operands, previous opcode is " - << spvOpcodeString(GetPrevOpcode()); + << "Failed to decode opcode_and_num_operands, previous opcode is " + << spvOpcodeString(GetPrevOpcode()); if (decoded_value != kMarkvNoneOfTheAbove) { // The word was successfully decoded. @@ -1625,7 +1617,7 @@ spv_result_t MarkvDecoder::DecodeOpcodeAndNumberOfOperands( uint64_t decoded_value = 0; if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to decode opcode_and_num_operands with global codec"; + << "Failed to decode opcode_and_num_operands with global codec"; if (decoded_value == kMarkvNoneOfTheAbove) { // Received kMarkvNoneOfTheAbove signal, fallback further. @@ -1645,8 +1637,7 @@ spv_result_t MarkvEncoder::EncodeMtfRankHuffman(uint32_t rank, uint64_t mtf, codec = GetMtfHuffmanCodec(fallback_method); } - if (!codec) - return Diag(SPV_ERROR_INTERNAL) << "No codec to encode MTF rank"; + if (!codec) return Diag(SPV_ERROR_INTERNAL) << "No codec to encode MTF rank"; uint64_t bits = 0; size_t num_bits = 0; @@ -1654,14 +1645,14 @@ spv_result_t MarkvEncoder::EncodeMtfRankHuffman(uint32_t rank, uint64_t mtf, // Encode using Huffman coding. if (!codec->Encode(rank, &bits, &num_bits)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to encode MTF rank with Huffman"; + << "Failed to encode MTF rank with Huffman"; writer_.WriteBits(bits, num_bits); } else { // Encode by value. if (!codec->Encode(kMtfRankEncodedByValueSignal, &bits, &num_bits)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to encode kMtfRankEncodedByValueSignal"; + << "Failed to encode kMtfRankEncodedByValueSignal"; writer_.WriteBits(bits, num_bits); writer_.WriteVariableWidthU32(rank - kMtfSmallestRankEncodedByValue, @@ -1670,27 +1661,26 @@ spv_result_t MarkvEncoder::EncodeMtfRankHuffman(uint32_t rank, uint64_t mtf, return SPV_SUCCESS; } -spv_result_t MarkvDecoder::DecodeMtfRankHuffman( - uint64_t mtf, uint32_t fallback_method, uint32_t* rank) { +spv_result_t MarkvDecoder::DecodeMtfRankHuffman(uint64_t mtf, + uint32_t fallback_method, + uint32_t* rank) { const auto* codec = GetMtfHuffmanCodec(mtf); if (!codec) { assert(fallback_method != kMtfNone); codec = GetMtfHuffmanCodec(fallback_method); } - if (!codec) - return Diag(SPV_ERROR_INTERNAL) << "No codec to decode MTF rank"; + if (!codec) return Diag(SPV_ERROR_INTERNAL) << "No codec to decode MTF rank"; uint32_t decoded_value = 0; if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) - return Diag(SPV_ERROR_INTERNAL) - << "Failed to decode MTF rank with Huffman"; + return Diag(SPV_ERROR_INTERNAL) << "Failed to decode MTF rank with Huffman"; if (decoded_value == kMtfRankEncodedByValueSignal) { // Decode by value. if (!reader_.ReadVariableWidthU32(rank, model_->mtf_rank_chunk_length())) return Diag(SPV_ERROR_INTERNAL) - << "Failed to decode MTF rank with varint"; + << "Failed to decode MTF rank with varint"; *rank += kMtfSmallestRankEncodedByValue; } else { // Decode using Huffman coding. @@ -1701,61 +1691,87 @@ spv_result_t MarkvDecoder::DecodeMtfRankHuffman( } spv_result_t MarkvEncoder::EncodeIdWithDescriptor(uint32_t id) { - auto* codec = model_->GetIdDescriptorHuffmanCodec(inst_.opcode, - operand_index_); - if (!codec) - return SPV_UNSUPPORTED; - + // Get the descriptor for id. + const uint32_t long_descriptor = long_id_descriptors_.GetDescriptor(id); + auto* codec = + model_->GetIdDescriptorHuffmanCodec(inst_.opcode, operand_index_); uint64_t bits = 0; size_t num_bits = 0; - - // Get the descriptor for id. - const uint32_t descriptor = id_descriptors_.GetDescriptor(id); - - if (descriptor && codec->Encode(descriptor, &bits, &num_bits)) { + uint64_t mtf = kMtfNone; + if (long_descriptor && codec && + codec->Encode(long_descriptor, &bits, &num_bits)) { // If the descriptor exists and is in the table, write the descriptor and // proceed to encoding the rank. writer_.WriteBits(bits, num_bits); + mtf = GetMtfLongIdDescriptor(long_descriptor); } else { - // The descriptor doesn't exist or we have no coding for it. Write - // kMarkvNoneOfTheAbove and go to fallback method. - if (!codec->Encode(kMarkvNoneOfTheAbove, &bits, &num_bits)) - return Diag(SPV_ERROR_INTERNAL) - << "Descriptor Huffman table for " - << spvOpcodeString(SpvOp(inst_.opcode)) - << " operand index " << operand_index_ - << " is missing kMarkvNoneOfTheAbove"; + if (codec) { + // The descriptor doesn't exist or we have no coding for it. Write + // kMarkvNoneOfTheAbove and go to fallback method. + if (!codec->Encode(kMarkvNoneOfTheAbove, &bits, &num_bits)) + return Diag(SPV_ERROR_INTERNAL) + << "Descriptor Huffman table for " + << spvOpcodeString(SpvOp(inst_.opcode)) << " operand index " + << operand_index_ << " is missing kMarkvNoneOfTheAbove"; - writer_.WriteBits(bits, num_bits); - return SPV_UNSUPPORTED; + writer_.WriteBits(bits, num_bits); + } + + if (model_->id_fallback_strategy() != + MarkvModel::IdFallbackStrategy::kShortDescriptor) { + return SPV_UNSUPPORTED; + } + + const uint32_t short_descriptor = short_id_descriptors_.GetDescriptor(id); + writer_.WriteBits(short_descriptor, kShortDescriptorNumBits); + + if (short_descriptor == 0) { + // Forward declared id. + return SPV_UNSUPPORTED; + } + + mtf = GetMtfShortIdDescriptor(short_descriptor); } // Descriptor has been encoded. Now encode the rank of the id in the // associated mtf sequence. - const uint64_t mtf = GetMtfIdDescriptor(descriptor); return EncodeExistingId(mtf, id); } spv_result_t MarkvDecoder::DecodeIdWithDescriptor(uint32_t* id) { - auto* codec = model_->GetIdDescriptorHuffmanCodec(inst_.opcode, - operand_index_); - if (!codec) - return SPV_UNSUPPORTED; + auto* codec = + model_->GetIdDescriptorHuffmanCodec(inst_.opcode, operand_index_); - uint64_t decoded_value = 0; - if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) - return Diag(SPV_ERROR_INTERNAL) - << "Failed to decode descriptor with Huffman"; + uint64_t mtf = kMtfNone; + if (codec) { + uint64_t decoded_value = 0; + if (!codec->DecodeFromStream(GetReadBitCallback(), &decoded_value)) + return Diag(SPV_ERROR_INTERNAL) + << "Failed to decode descriptor with Huffman"; - if (decoded_value == kMarkvNoneOfTheAbove) - return SPV_UNSUPPORTED; + if (decoded_value != kMarkvNoneOfTheAbove) { + const uint32_t long_descriptor = uint32_t(decoded_value); + mtf = GetMtfLongIdDescriptor(long_descriptor); + } + } - // If descriptor exists then the id was encoded through descriptor mtf. - const uint32_t descriptor = uint32_t(decoded_value); - assert(descriptor == decoded_value); - assert(descriptor); + if (mtf == kMtfNone) { + if (model_->id_fallback_strategy() != + MarkvModel::IdFallbackStrategy::kShortDescriptor) { + return SPV_UNSUPPORTED; + } + + uint64_t decoded_value = 0; + if (!reader_.ReadBits(&decoded_value, kShortDescriptorNumBits)) + return Diag(SPV_ERROR_INTERNAL) << "Failed to read short descriptor"; + const uint32_t short_descriptor = uint32_t(decoded_value); + if (short_descriptor == 0) { + // Forward declared id. + return SPV_UNSUPPORTED; + } + mtf = GetMtfShortIdDescriptor(short_descriptor); + } - const uint64_t mtf = GetMtfIdDescriptor(descriptor); return DecodeExistingId(mtf, id); } @@ -1769,8 +1785,7 @@ spv_result_t MarkvEncoder::EncodeExistingId(uint64_t mtf, uint32_t id) { uint32_t rank = 0; if (!multi_mtf_.RankFromValue(mtf, id, &rank)) - return Diag(SPV_ERROR_INTERNAL) - << "Id is not in the MTF sequence"; + return Diag(SPV_ERROR_INTERNAL) << "Id is not in the MTF sequence"; return EncodeMtfRankHuffman(rank, mtf, kMtfGenericNonZeroRank); } @@ -1786,136 +1801,115 @@ spv_result_t MarkvDecoder::DecodeExistingId(uint64_t mtf, uint32_t* id) { } else { const spv_result_t result = DecodeMtfRankHuffman(mtf, kMtfGenericNonZeroRank, &rank); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; } assert(rank); if (!multi_mtf_.ValueFromRank(mtf, rank, id)) - return Diag(SPV_ERROR_INTERNAL) - << "MTF rank is out of bounds"; + return Diag(SPV_ERROR_INTERNAL) << "MTF rank is out of bounds"; return SPV_SUCCESS; } spv_result_t MarkvEncoder::EncodeRefId(uint32_t id) { - // TODO(atgoo@github.com) This might not be needed as EncodeIdWithDescriptor - // can handle SpvOpAccessChain indices if enough statistics is collected. - if (inst_.opcode == SpvOpAccessChain && operand_index_ >= 3) { - const auto it = id_to_presumed_index_.find(id); - if (it != id_to_presumed_index_.end()) { - writer_.WriteBits(1, 1); - writer_.WriteFixedWidth(it->second, kMarkvMaxPresumedAccessIndex); - return SPV_SUCCESS; - } - - writer_.WriteBits(0, 1); - } - { // Try to encode using id descriptor mtfs. const spv_result_t result = EncodeIdWithDescriptor(id); - if (result != SPV_UNSUPPORTED) - return result; + if (result != SPV_UNSUPPORTED) return result; // If can't be done continue with other methods. } - // Encode using rule-based mtf. - uint64_t mtf = GetRuleBasedMtf(); - const bool can_forward_declare = - spvOperandCanBeForwardDeclaredFunction( - SpvOp(inst_.opcode))(operand_index_); - - if (mtf != kMtfNone && !can_forward_declare) { - assert(multi_mtf_.HasValue(kMtfAll, id)); - return EncodeExistingId(mtf, id); - } - - if (mtf == kMtfNone) - mtf = kMtfAll; - + const bool can_forward_declare = spvOperandCanBeForwardDeclaredFunction( + SpvOp(inst_.opcode))(operand_index_); uint32_t rank = 0; - if (!multi_mtf_.RankFromValue(mtf, id, &rank)) { - // This is the first occurrence of a forward declared id. - multi_mtf_.Insert(kMtfAll, id); - multi_mtf_.Insert(kMtfForwardDeclared, id); - if (mtf != kMtfAll) - multi_mtf_.Insert(mtf, id); - rank = 0; - } - - return EncodeMtfRankHuffman(rank, mtf, kMtfAll); -} + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + // Encode using rule-based mtf. + uint64_t mtf = GetRuleBasedMtf(); -spv_result_t MarkvDecoder::DecodeRefId(uint32_t* id) { - if (inst_.opcode == SpvOpAccessChain && operand_index_ >= 3) { - uint64_t use_presumed_index_technique = 0; - if (!reader_.ReadBits(&use_presumed_index_technique, 1)) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read use_presumed_index_technique flag"; + if (mtf != kMtfNone && !can_forward_declare) { + assert(multi_mtf_.HasValue(kMtfAll, id)); + return EncodeExistingId(mtf, id); + } - if (use_presumed_index_technique) { - uint64_t value = 0; - if (!reader_.ReadFixedWidth(&value, kMarkvMaxPresumedAccessIndex)) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read presumed_index"; + if (mtf == kMtfNone) mtf = kMtfAll; - const uint32_t presumed_index = static_cast(value); + if (!multi_mtf_.RankFromValue(mtf, id, &rank)) { + // This is the first occurrence of a forward declared id. + multi_mtf_.Insert(kMtfAll, id); + multi_mtf_.Insert(kMtfForwardDeclared, id); + if (mtf != kMtfAll) multi_mtf_.Insert(mtf, id); + rank = 0; + } - const auto it = presumed_index_to_id_.find(presumed_index); - if (it == presumed_index_to_id_.end()) { - assert(0); - return Diag(SPV_ERROR_INTERNAL) - << "Presumed index id not found"; - } + return EncodeMtfRankHuffman(rank, mtf, kMtfAll); + } else { + assert(can_forward_declare); - *id = it->second; - return SPV_SUCCESS; + if (!multi_mtf_.RankFromValue(kMtfForwardDeclared, id, &rank)) { + // This is the first occurrence of a forward declared id. + multi_mtf_.Insert(kMtfForwardDeclared, id); + rank = 0; } + + writer_.WriteVariableWidthU32(rank, model_->mtf_rank_chunk_length()); + return SPV_SUCCESS; } +} +spv_result_t MarkvDecoder::DecodeRefId(uint32_t* id) { { const spv_result_t result = DecodeIdWithDescriptor(id); - if (result != SPV_UNSUPPORTED) - return result; + if (result != SPV_UNSUPPORTED) return result; } - uint64_t mtf = GetRuleBasedMtf(); - const bool can_forward_declare = - spvOperandCanBeForwardDeclaredFunction( - SpvOp(inst_.opcode))(operand_index_); + const bool can_forward_declare = spvOperandCanBeForwardDeclaredFunction( + SpvOp(inst_.opcode))(operand_index_); + uint32_t rank = 0; + *id = 0; - if (mtf != kMtfNone && !can_forward_declare) { - return DecodeExistingId(mtf, id); - } + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + uint64_t mtf = GetRuleBasedMtf(); + if (mtf != kMtfNone && !can_forward_declare) { + return DecodeExistingId(mtf, id); + } - if (mtf == kMtfNone) - mtf = kMtfAll; + if (mtf == kMtfNone) mtf = kMtfAll; + { + const spv_result_t result = DecodeMtfRankHuffman(mtf, kMtfAll, &rank); + if (result != SPV_SUCCESS) return result; + } - *id = 0; + if (rank == 0) { + // This is the first occurrence of a forward declared id. + *id = GetIdBound(); + SetIdBound(*id + 1); + multi_mtf_.Insert(kMtfAll, *id); + multi_mtf_.Insert(kMtfForwardDeclared, *id); + if (mtf != kMtfAll) multi_mtf_.Insert(mtf, *id); + } else { + if (!multi_mtf_.ValueFromRank(mtf, rank, id)) + return Diag(SPV_ERROR_INTERNAL) << "MTF rank out of bounds"; + } + } else { + assert(can_forward_declare); - uint32_t rank = 0; + if (!reader_.ReadVariableWidthU32(&rank, model_->mtf_rank_chunk_length())) + return Diag(SPV_ERROR_INTERNAL) + << "Failed to decode MTF rank with varint"; - { - const spv_result_t result = DecodeMtfRankHuffman(mtf, kMtfAll, &rank); - if (result != SPV_SUCCESS) - return result; - } - - if (rank == 0) { - // This is the first occurrence of a forward declared id. - *id = GetIdBound(); - SetIdBound(*id + 1); - multi_mtf_.Insert(kMtfAll, *id); - multi_mtf_.Insert(kMtfForwardDeclared, *id); - if (mtf != kMtfAll) - multi_mtf_.Insert(mtf, *id); - } else { - if (!multi_mtf_.ValueFromRank(mtf, rank, id)) - return Diag(SPV_ERROR_INTERNAL) << "MTF rank out of bounds"; + if (rank == 0) { + // This is the first occurrence of a forward declared id. + *id = GetIdBound(); + SetIdBound(*id + 1); + multi_mtf_.Insert(kMtfForwardDeclared, *id); + } else { + if (!multi_mtf_.ValueFromRank(kMtfForwardDeclared, rank, id)) + return Diag(SPV_ERROR_INTERNAL) << "MTF rank out of bounds"; + } } - assert(*id); return SPV_SUCCESS; } @@ -1931,14 +1925,16 @@ spv_result_t MarkvEncoder::EncodeTypeId() { { // Try to encode using id descriptor mtfs. const spv_result_t result = EncodeIdWithDescriptor(inst_.type_id); - if (result != SPV_UNSUPPORTED) - return result; + if (result != SPV_UNSUPPORTED) return result; // If can't be done continue with other methods. } + assert(model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased); + uint64_t mtf = GetRuleBasedMtf(); - assert(!spvOperandCanBeForwardDeclaredFunction( - SpvOp(inst_.opcode))(operand_index_)); + assert(!spvOperandCanBeForwardDeclaredFunction(SpvOp(inst_.opcode))( + operand_index_)); if (mtf == kMtfNone) { mtf = kMtfTypeNonFunction; @@ -1959,13 +1955,15 @@ spv_result_t MarkvDecoder::DecodeTypeId() { { const spv_result_t result = DecodeIdWithDescriptor(&inst_.type_id); - if (result != SPV_UNSUPPORTED) - return result; + if (result != SPV_UNSUPPORTED) return result; } + assert(model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased); + uint64_t mtf = GetRuleBasedMtf(); - assert(!spvOperandCanBeForwardDeclaredFunction( - SpvOp(inst_.opcode))(operand_index_)); + assert(!spvOperandCanBeForwardDeclaredFunction(SpvOp(inst_.opcode))( + operand_index_)); if (mtf == kMtfNone) { mtf = kMtfTypeNonFunction; @@ -1985,24 +1983,25 @@ spv_result_t MarkvEncoder::EncodeResultId() { if (num_still_forward_declared) { // We write the rank only if kMtfForwardDeclared is not empty. If it is // empty the decoder knows that there are no forward declared ids to expect. - if (multi_mtf_.RankFromValue(kMtfForwardDeclared, - inst_.result_id, &rank)) { + if (multi_mtf_.RankFromValue(kMtfForwardDeclared, inst_.result_id, &rank)) { // This is a definition of a forward declared id. We can remove the id // from kMtfForwardDeclared. if (!multi_mtf_.Remove(kMtfForwardDeclared, inst_.result_id)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to remove id from kMtfForwardDeclared"; + << "Failed to remove id from kMtfForwardDeclared"; writer_.WriteBits(1, 1); - writer_.WriteVariableWidthU32( - rank, model_->mtf_rank_chunk_length()); + writer_.WriteVariableWidthU32(rank, model_->mtf_rank_chunk_length()); } else { rank = 0; writer_.WriteBits(0, 1); } } - if (!rank) { - multi_mtf_.Insert(kMtfAll, inst_.result_id); + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + if (!rank) { + multi_mtf_.Insert(kMtfAll, inst_.result_id); + } } return SPV_SUCCESS; @@ -2019,25 +2018,24 @@ spv_result_t MarkvDecoder::DecodeResultId() { uint64_t id_was_forward_declared; if (!reader_.ReadBits(&id_was_forward_declared, 1)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read id_was_forward_declared flag"; + << "Failed to read id_was_forward_declared flag"; if (id_was_forward_declared) { - if (!reader_.ReadVariableWidthU32( - &rank, model_->mtf_rank_chunk_length())) + if (!reader_.ReadVariableWidthU32(&rank, model_->mtf_rank_chunk_length())) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read MTF rank of forward declared id"; + << "Failed to read MTF rank of forward declared id"; if (rank) { // The id was forward declared, recover it from kMtfForwardDeclared. - if (!multi_mtf_.ValueFromRank(kMtfForwardDeclared, - rank, &inst_.result_id)) + if (!multi_mtf_.ValueFromRank(kMtfForwardDeclared, rank, + &inst_.result_id)) return Diag(SPV_ERROR_INTERNAL) - << "Forward declared MTF rank is out of bounds"; + << "Forward declared MTF rank is out of bounds"; // We can now remove the id from kMtfForwardDeclared. if (!multi_mtf_.Remove(kMtfForwardDeclared, inst_.result_id)) return Diag(SPV_ERROR_INTERNAL) - << "Failed to remove id from kMtfForwardDeclared"; + << "Failed to remove id from kMtfForwardDeclared"; } } } @@ -2048,8 +2046,11 @@ spv_result_t MarkvDecoder::DecodeResultId() { SetIdBound(inst_.result_id + 1); } - if (!rank) { - multi_mtf_.Insert(kMtfAll, inst_.result_id); + if (model_->id_fallback_strategy() == + MarkvModel::IdFallbackStrategy::kRuleBased) { + if (!rank) { + multi_mtf_.Insert(kMtfAll, inst_.result_id); + } } return SPV_SUCCESS; @@ -2062,9 +2063,8 @@ spv_result_t MarkvEncoder::EncodeLiteralNumber( return EncodeNonIdWord(word); } else { assert(operand.number_bit_width <= 64); - const uint64_t word = - uint64_t(inst_.words[operand.offset]) | - (uint64_t(inst_.words[operand.offset + 1]) << 32); + const uint64_t word = uint64_t(inst_.words[operand.offset]) | + (uint64_t(inst_.words[operand.offset + 1]) << 32); if (operand.number_kind == SPV_NUMBER_UNSIGNED_INT) { writer_.WriteVariableWidthU64(word, model_->u64_chunk_length()); } else if (operand.number_kind == SPV_NUMBER_SIGNED_INT) { @@ -2086,27 +2086,23 @@ spv_result_t MarkvDecoder::DecodeLiteralNumber( if (operand.number_bit_width <= 32) { uint32_t word = 0; const spv_result_t result = DecodeNonIdWord(&word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(word); } else { assert(operand.number_bit_width <= 64); uint64_t word = 0; if (operand.number_kind == SPV_NUMBER_UNSIGNED_INT) { if (!reader_.ReadVariableWidthU64(&word, model_->u64_chunk_length())) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read literal U64"; + return Diag(SPV_ERROR_INVALID_BINARY) << "Failed to read literal U64"; } else if (operand.number_kind == SPV_NUMBER_SIGNED_INT) { int64_t val = 0; if (!reader_.ReadVariableWidthS64(&val, model_->s64_chunk_length(), model_->s64_block_exponent())) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read literal S64"; + return Diag(SPV_ERROR_INVALID_BINARY) << "Failed to read literal S64"; std::memcpy(&word, &val, 8); } else if (operand.number_kind == SPV_NUMBER_FLOATING) { if (!reader_.ReadUnencoded(&word)) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read literal F64"; + return Diag(SPV_ERROR_INVALID_BINARY) << "Failed to read literal F64"; } else { return Diag(SPV_ERROR_INTERNAL) << "Unsupported bit length"; } @@ -2138,14 +2134,11 @@ bool MarkvDecoder::ReadToByteBreak(size_t byte_break_if_less_than) { num_bits_to_next_byte > byte_break_if_less_than) return true; - uint64_t bits = 0; - if (!reader_.ReadBits(&bits, num_bits_to_next_byte)) - return false; + if (!reader_.ReadBits(&bits, num_bits_to_next_byte)) return false; assert(bits == 0); - if (bits != 0) - return false; + if (bits != 0) return false; return true; } @@ -2156,15 +2149,13 @@ spv_result_t MarkvEncoder::EncodeInstruction( inst_ = inst; const spv_result_t validation_result = UpdateValidationState(inst); - if (validation_result != SPV_SUCCESS) - return validation_result; + if (validation_result != SPV_SUCCESS) return validation_result; LogDisassemblyInstruction(); const spv_result_t opcode_encodig_result = EncodeOpcodeAndNumOperands(opcode, inst.num_operands); - if (opcode_encodig_result < 0) - return opcode_encodig_result; + if (opcode_encodig_result < 0) return opcode_encodig_result; if (opcode_encodig_result != SPV_SUCCESS) { // Fallback encoding for opcode and num_operands. @@ -2174,8 +2165,7 @@ spv_result_t MarkvEncoder::EncodeInstruction( // If the opcode has a variable number of operands, encode the number of // operands with the instruction. - if (logger_) - logger_->AppendWhitespaces(kCommentNumWhitespaces); + if (logger_) logger_->AppendWhitespaces(kCommentNumWhitespaces); writer_.WriteVariableWidthU16(inst.num_operands, model_->num_operands_chunk_length()); @@ -2204,40 +2194,35 @@ spv_result_t MarkvEncoder::EncodeInstruction( const uint32_t id = inst_.words[operand_.offset]; if (operand_.type == SPV_OPERAND_TYPE_TYPE_ID) { const spv_result_t result = EncodeTypeId(); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; } else if (operand_.type == SPV_OPERAND_TYPE_RESULT_ID) { const spv_result_t result = EncodeResultId(); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; } else { const spv_result_t result = EncodeRefId(id); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; } - multi_mtf_.Promote(id); + PromoteIfNeeded(id); break; } case SPV_OPERAND_TYPE_LITERAL_INTEGER: { const spv_result_t result = EncodeNonIdWord(inst_.words[operand_.offset]); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; break; } case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: { const spv_result_t result = EncodeLiteralNumber(operand_); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; break; } case SPV_OPERAND_TYPE_LITERAL_STRING: { - const char* src = reinterpret_cast( - &inst_.words[operand_.offset]); + const char* src = + reinterpret_cast(&inst_.words[operand_.offset]); auto* codec = model_->GetLiteralStringHuffmanCodec(opcode); if (codec) { @@ -2248,8 +2233,8 @@ spv_result_t MarkvEncoder::EncodeInstruction( writer_.WriteBits(bits, num_bits); break; } else { - bool result = codec->Encode("kMarkvNoneOfTheAbove", - &bits, &num_bits); + bool result = + codec->Encode("kMarkvNoneOfTheAbove", &bits, &num_bits); (void)result; assert(result); writer_.WriteBits(bits, num_bits); @@ -2259,9 +2244,8 @@ spv_result_t MarkvEncoder::EncodeInstruction( const size_t length = spv_strnlen_s(src, operand_.num_words * 4); if (length == operand_.num_words * 4) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to find terminal character of literal string"; - for (size_t i = 0; i < length + 1; ++i) - writer_.WriteUnencoded(src[i]); + << "Failed to find terminal character of literal string"; + for (size_t i = 0; i < length + 1; ++i) writer_.WriteUnencoded(src[i]); break; } @@ -2269,8 +2253,7 @@ spv_result_t MarkvEncoder::EncodeInstruction( for (int i = 0; i < operand_.num_words; ++i) { const uint32_t word = inst_.words[operand_.offset + i]; const spv_result_t result = EncodeNonIdWord(word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; } break; } @@ -2282,8 +2265,7 @@ spv_result_t MarkvEncoder::EncodeInstruction( if (logger_) { logger_->NewLine(); logger_->NewLine(); - if (!logger_->DebugInstruction(inst_)) - return SPV_REQUESTED_TERMINATION; + if (!logger_->DebugInstruction(inst_)) return SPV_REQUESTED_TERMINATION; } ProcessCurInstruction(); @@ -2301,62 +2283,57 @@ spv_result_t MarkvDecoder::DecodeModule(std::vector* spirv_binary) { reader_.ReadUnencoded(&header_.spirv_generator); if (!header_read_success) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Unable to read MARK-V header"; + return Diag(SPV_ERROR_INVALID_BINARY) << "Unable to read MARK-V header"; if (header_.markv_length_in_bits == 0) return Diag(SPV_ERROR_INVALID_BINARY) - << "Header markv_length_in_bits field is zero"; + << "Header markv_length_in_bits field is zero"; if (header_.magic_number != kMarkvMagicNumber) return Diag(SPV_ERROR_INVALID_BINARY) - << "MARK-V binary has incorrect magic number"; + << "MARK-V binary has incorrect magic number"; // TODO(atgoo@github.com): Print version strings. if (header_.markv_version != GetMarkvVersion()) return Diag(SPV_ERROR_INVALID_BINARY) - << "MARK-V binary and the codec have different versions"; + << "MARK-V binary and the codec have different versions"; const uint32_t model_type = header_.markv_model >> 16; const uint32_t model_version = header_.markv_model & 0xFFFF; if (model_type != model_->model_type()) return Diag(SPV_ERROR_INVALID_BINARY) - << "MARK-V binary and the codec use different MARK-V models"; + << "MARK-V binary and the codec use different MARK-V models"; if (model_version != model_->model_version()) return Diag(SPV_ERROR_INVALID_BINARY) - << "MARK-V binary and the codec use different versions if the same " - << "MARK-V model"; + << "MARK-V binary and the codec use different versions if the same " + << "MARK-V model"; - spirv_.reserve(header_.markv_length_in_bits / 2); // Heuristic. + spirv_.reserve(header_.markv_length_in_bits / 2); // Heuristic. spirv_.resize(5, 0); spirv_[0] = kSpirvMagicNumber; spirv_[1] = header_.spirv_version; spirv_[2] = header_.spirv_generator; if (logger_) { - reader_.SetCallback([this](const std::string& str){ - logger_->AppendBitSequence(str); - }); + reader_.SetCallback( + [this](const std::string& str) { logger_->AppendBitSequence(str); }); } while (reader_.GetNumReadBits() < header_.markv_length_in_bits) { inst_ = {}; const spv_result_t decode_result = DecodeInstruction(); - if (decode_result != SPV_SUCCESS) - return decode_result; + if (decode_result != SPV_SUCCESS) return decode_result; const spv_result_t validation_result = UpdateValidationState(inst_); - if (validation_result != SPV_SUCCESS) - return validation_result; + if (validation_result != SPV_SUCCESS) return validation_result; } - if (reader_.GetNumReadBits() != header_.markv_length_in_bits || !reader_.OnlyZeroesLeft()) { return Diag(SPV_ERROR_INVALID_BINARY) - << "MARK-V binary has wrong stated bit length " - << reader_.GetNumReadBits() << " " << header_.markv_length_in_bits; + << "MARK-V binary has wrong stated bit length " + << reader_.GetNumReadBits() << " " << header_.markv_length_in_bits; } // Decoding of the module is finished, validation state should have correct @@ -2373,8 +2350,7 @@ spv_result_t MarkvDecoder::DecodeModule(std::vector* spirv_binary) { // For now it's better to keep the code independent for experimentation // purposes. spv_result_t MarkvDecoder::DecodeOperand( - size_t operand_offset, - const spv_operand_type_t type, + size_t operand_offset, const spv_operand_type_t type, spv_operand_pattern_t* expected_operands) { const SpvOp opcode = static_cast(inst_.opcode); @@ -2393,23 +2369,21 @@ spv_result_t MarkvDecoder::DecodeOperand( switch (type) { case SPV_OPERAND_TYPE_RESULT_ID: { const spv_result_t result = DecodeResultId(); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(inst_.result_id); SetIdBound(std::max(GetIdBound(), inst_.result_id + 1)); - multi_mtf_.Promote(inst_.result_id); + PromoteIfNeeded(inst_.result_id); break; } case SPV_OPERAND_TYPE_TYPE_ID: { const spv_result_t result = DecodeTypeId(); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(inst_.type_id); SetIdBound(std::max(GetIdBound(), inst_.type_id + 1)); - multi_mtf_.Promote(inst_.type_id); + PromoteIfNeeded(inst_.type_id); break; } @@ -2419,15 +2393,11 @@ spv_result_t MarkvDecoder::DecodeOperand( case SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID: { uint32_t id = 0; const spv_result_t result = DecodeRefId(&id); - if (result != SPV_SUCCESS) - return result; - - if (id == 0) - return Diag(SPV_ERROR_INVALID_BINARY) << "Decoded id is 0"; + if (result != SPV_SUCCESS) return result; - if (type == SPV_OPERAND_TYPE_ID || - type == SPV_OPERAND_TYPE_OPTIONAL_ID) { + if (id == 0) return Diag(SPV_ERROR_INVALID_BINARY) << "Decoded id is 0"; + if (type == SPV_OPERAND_TYPE_ID || type == SPV_OPERAND_TYPE_OPTIONAL_ID) { operand_.type = SPV_OPERAND_TYPE_ID; if (opcode == SpvOpExtInst && operand_.offset == 3) { @@ -2437,8 +2407,8 @@ spv_result_t MarkvDecoder::DecodeOperand( auto ext_inst_type_iter = import_id_to_ext_inst_type_.find(id); if (ext_inst_type_iter == import_id_to_ext_inst_type_.end()) { return Diag(SPV_ERROR_INVALID_ID) - << "OpExtInst set id " << id - << " does not reference an OpExtInstImport result Id"; + << "OpExtInst set id " << id + << " does not reference an OpExtInstImport result Id"; } inst_.ext_inst_type = ext_inst_type_iter->second; } @@ -2446,15 +2416,14 @@ spv_result_t MarkvDecoder::DecodeOperand( inst_words_.push_back(id); SetIdBound(std::max(GetIdBound(), id + 1)); - multi_mtf_.Promote(id); + PromoteIfNeeded(id); break; } case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: { uint32_t word = 0; const spv_result_t result = DecodeNonIdWord(&word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(word); @@ -2463,7 +2432,7 @@ spv_result_t MarkvDecoder::DecodeOperand( spv_ext_inst_desc ext_inst; if (grammar_.lookupExtInst(inst_.ext_inst_type, word, &ext_inst)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid extended instruction number: " << word; + << "Invalid extended instruction number: " << word; spvPushOperandTypes(ext_inst->operandTypes, expected_operands); break; } @@ -2479,8 +2448,7 @@ spv_result_t MarkvDecoder::DecodeOperand( uint32_t word = 0; const spv_result_t result = DecodeNonIdWord(&word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(word); break; @@ -2494,11 +2462,10 @@ spv_result_t MarkvDecoder::DecodeOperand( // referenced by the selector Id. const uint32_t selector_id = inst_words_.at(1); const auto type_id_iter = id_to_type_id_.find(selector_id); - if (type_id_iter == id_to_type_id_.end() || - type_id_iter->second == 0) { + if (type_id_iter == id_to_type_id_.end() || type_id_iter->second == 0) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid OpSwitch: selector id " << selector_id - << " has no type"; + << "Invalid OpSwitch: selector id " << selector_id + << " has no type"; } uint32_t type_id = type_id_iter->second; @@ -2506,16 +2473,16 @@ spv_result_t MarkvDecoder::DecodeOperand( // Recall that by convention, a result ID that is a type definition // maps to itself. return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid OpSwitch: selector id " << selector_id - << " is a type, not a value"; + << "Invalid OpSwitch: selector id " << selector_id + << " is a type, not a value"; } if (auto error = SetNumericTypeInfoForType(&operand_, type_id)) return error; if (operand_.number_kind != SPV_NUMBER_UNSIGNED_INT && operand_.number_kind != SPV_NUMBER_SIGNED_INT) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid OpSwitch: selector id " << selector_id - << " is not a scalar integer"; + << "Invalid OpSwitch: selector id " << selector_id + << " is not a scalar integer"; } } else { assert(opcode == SpvOpConstant || opcode == SpvOpSpecConstant); @@ -2526,8 +2493,7 @@ spv_result_t MarkvDecoder::DecodeOperand( return error; } - if (auto error = DecodeLiteralNumber(operand_)) - return error; + if (auto error = DecodeLiteralNumber(operand_)) return error; break; } @@ -2545,7 +2511,7 @@ spv_result_t MarkvDecoder::DecodeOperand( assert(huffman_result); if (!huffman_result) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read literal string"; + << "Failed to read literal string"; if (decoded_string != "kMarkvNoneOfTheAbove") { std::copy(decoded_string.begin(), decoded_string.end(), @@ -2561,17 +2527,15 @@ spv_result_t MarkvDecoder::DecodeOperand( char ch = 0; if (!reader_.ReadUnencoded(&ch)) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read literal string"; + << "Failed to read literal string"; str.push_back(ch); - if (ch == '\0') - break; + if (ch == '\0') break; } } - while (str.size() % 4 != 0) - str.push_back('\0'); + while (str.size() % 4 != 0) str.push_back('\0'); inst_words_.resize(inst_words_.size() + str.size() / 4); std::memcpy(&inst_words_[first_word_index], str.data(), str.size()); @@ -2584,13 +2548,15 @@ spv_result_t MarkvDecoder::DecodeOperand( spvExtInstImportTypeGet(str.data()); if (SPV_EXT_INST_TYPE_NONE == ext_inst_type) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid extended instruction import '" << str.data() << "'"; + << "Invalid extended instruction import '" << str.data() + << "'"; } // We must have parsed a valid result ID. It's a condition // of the grammar, and we only accept non-zero result Ids. assert(inst_.result_id); - const bool inserted = import_id_to_ext_inst_type_.emplace( - inst_.result_id, ext_inst_type).second; + const bool inserted = + import_id_to_ext_inst_type_.emplace(inst_.result_id, ext_inst_type) + .second; (void)inserted; assert(inserted); } @@ -2621,8 +2587,7 @@ spv_result_t MarkvDecoder::DecodeOperand( // A single word that is a plain enum value. uint32_t word = 0; const spv_result_t result = DecodeNonIdWord(&word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(word); @@ -2633,9 +2598,8 @@ spv_result_t MarkvDecoder::DecodeOperand( spv_operand_desc entry; if (grammar_.lookupOperand(type, word, &entry)) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Invalid " - << spvOperandTypeStr(operand_.type) - << " operand: " << word; + << "Invalid " << spvOperandTypeStr(operand_.type) + << " operand: " << word; } // Prepare to accept operands to this operand, if needed. @@ -2653,8 +2617,7 @@ spv_result_t MarkvDecoder::DecodeOperand( // This operand is a mask. uint32_t word = 0; const spv_result_t result = DecodeNonIdWord(&word); - if (result != SPV_SUCCESS) - return result; + if (result != SPV_SUCCESS) return result; inst_words_.push_back(word); @@ -2696,13 +2659,12 @@ spv_result_t MarkvDecoder::DecodeOperand( } default: return Diag(SPV_ERROR_INVALID_BINARY) - << "Internal error: Unhandled operand type: " << type; + << "Internal error: Unhandled operand type: " << type; } operand_.num_words = uint16_t(inst_words_.size() - first_word_index); - assert(int(SPV_OPERAND_TYPE_FIRST_CONCRETE_TYPE) <= int(operand_.type)); - assert(int(SPV_OPERAND_TYPE_LAST_CONCRETE_TYPE) >= int(operand_.type)); + assert(spvOperandIsConcrete(operand_.type)); parsed_operands_.push_back(operand_); @@ -2723,17 +2685,16 @@ spv_result_t MarkvDecoder::DecodeInstruction() { const spv_result_t opcode_decoding_result = DecodeOpcodeAndNumberOfOperands(&opcode, &num_operands); - if (opcode_decoding_result < 0) - return opcode_decoding_result; + if (opcode_decoding_result < 0) return opcode_decoding_result; if (opcode_decoding_result == SPV_SUCCESS) { inst_.num_operands = static_cast(num_operands); num_operands_still_unknown = false; } else { - if (!reader_.ReadVariableWidthU32( - &opcode, model_->opcode_chunk_length())) { + if (!reader_.ReadVariableWidthU32(&opcode, + model_->opcode_chunk_length())) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read opcode of instruction"; + << "Failed to read opcode of instruction"; } } @@ -2759,7 +2720,7 @@ spv_result_t MarkvDecoder::DecodeInstruction() { if (!reader_.ReadVariableWidthU16(&inst_.num_operands, model_->num_operands_chunk_length())) return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read num_operands of instruction"; + << "Failed to read num_operands of instruction"; } else { inst_.num_operands = static_cast(expected_operands.size()); } @@ -2774,14 +2735,12 @@ spv_result_t MarkvDecoder::DecodeInstruction() { const size_t operand_offset = inst_words_.size(); - const spv_result_t decode_result = DecodeOperand( - operand_offset, type, &expected_operands); + const spv_result_t decode_result = + DecodeOperand(operand_offset, type, &expected_operands); - if (decode_result != SPV_SUCCESS) - return decode_result; + if (decode_result != SPV_SUCCESS) return decode_result; } - assert(inst_.num_operands == parsed_operands_.size()); // Only valid while inst_words_ and parsed_operands_ remain unchanged (until @@ -2793,19 +2752,20 @@ spv_result_t MarkvDecoder::DecodeInstruction() { std::copy(inst_words_.begin(), inst_words_.end(), std::back_inserter(spirv_)); - assert(inst_.num_words == std::accumulate( - parsed_operands_.begin(), parsed_operands_.end(), 1, - [](int num_words, const spv_parsed_operand_t& operand) { - return num_words += operand.num_words; - }) && "num_words in instruction doesn't correspond to the sum of num_words" - "in the operands"); + assert(inst_.num_words == + std::accumulate( + parsed_operands_.begin(), parsed_operands_.end(), 1, + [](int num_words, const spv_parsed_operand_t& operand) { + return num_words += operand.num_words; + }) && + "num_words in instruction doesn't correspond to the sum of num_words" + "in the operands"); RecordNumberType(); ProcessCurInstruction(); if (!ReadToByteBreak(kByteBreakAfterInstIfLessThanUntilNextByte)) - return Diag(SPV_ERROR_INVALID_BINARY) - << "Failed to read to byte break"; + return Diag(SPV_ERROR_INVALID_BINARY) << "Failed to read to byte break"; if (logger_) { logger_->NewLine(); @@ -2816,8 +2776,7 @@ spv_result_t MarkvDecoder::DecodeInstruction() { logger_->AppendText(ss.str()); logger_->NewLine(); logger_->NewLine(); - if (!logger_->DebugInstruction(inst_)) - return SPV_REQUESTED_TERMINATION; + if (!logger_->DebugInstruction(inst_)) return SPV_REQUESTED_TERMINATION; } return SPV_SUCCESS; @@ -2829,14 +2788,14 @@ spv_result_t MarkvDecoder::SetNumericTypeInfoForType( auto type_info_iter = type_id_to_number_type_info_.find(type_id); if (type_info_iter == type_id_to_number_type_info_.end()) { return Diag(SPV_ERROR_INVALID_BINARY) - << "Type Id " << type_id << " is not a type"; + << "Type Id " << type_id << " is not a type"; } const NumberType& info = type_info_iter->second; if (info.type == SPV_NUMBER_NONE) { // This is a valid type, but for something other than a scalar number. return Diag(SPV_ERROR_INVALID_BINARY) - << "Type Id " << type_id << " is not a scalar numeric type"; + << "Type Id " << type_id << " is not a scalar numeric type"; } parsed_operand->number_kind = info.type; @@ -2852,8 +2811,9 @@ void MarkvDecoder::RecordNumberType() { NumberType info = {SPV_NUMBER_NONE, 0}; if (SpvOpTypeInt == opcode) { info.bit_width = inst_.words[inst_.operands[1].offset]; - info.type = inst_.words[inst_.operands[2].offset] ? - SPV_NUMBER_SIGNED_INT : SPV_NUMBER_UNSIGNED_INT; + info.type = inst_.words[inst_.operands[2].offset] + ? SPV_NUMBER_SIGNED_INT + : SPV_NUMBER_UNSIGNED_INT; } else if (SpvOpTypeFloat == opcode) { info.bit_width = inst_.words[inst_.operands[1].offset]; info.type = SPV_NUMBER_FLOATING; @@ -2863,33 +2823,29 @@ void MarkvDecoder::RecordNumberType() { } } -spv_result_t EncodeHeader( - void* user_data, spv_endianness_t endian, uint32_t magic, - uint32_t version, uint32_t generator, uint32_t id_bound, - uint32_t schema) { +spv_result_t EncodeHeader(void* user_data, spv_endianness_t endian, + uint32_t magic, uint32_t version, uint32_t generator, + uint32_t id_bound, uint32_t schema) { MarkvEncoder* encoder = reinterpret_cast(user_data); - return encoder->EncodeHeader( - endian, magic, version, generator, id_bound, schema); + return encoder->EncodeHeader(endian, magic, version, generator, id_bound, + schema); } -spv_result_t EncodeInstruction( - void* user_data, const spv_parsed_instruction_t* inst) { +spv_result_t EncodeInstruction(void* user_data, + const spv_parsed_instruction_t* inst) { MarkvEncoder* encoder = reinterpret_cast(user_data); return encoder->EncodeInstruction(*inst); } } // namespace -spv_result_t SpirvToMarkv(spv_const_context context, - const std::vector& spirv, - const MarkvCodecOptions& options, - const MarkvModel& markv_model, - MessageConsumer message_consumer, - MarkvLogConsumer log_consumer, - MarkvDebugConsumer debug_consumer, - std::vector* markv) { +spv_result_t SpirvToMarkv( + spv_const_context context, const std::vector& spirv, + const MarkvCodecOptions& options, const MarkvModel& markv_model, + MessageConsumer message_consumer, MarkvLogConsumer log_consumer, + MarkvDebugConsumer debug_consumer, std::vector* markv) { spv_context_t hijack_context = *context; - SetContextMessageConsumer(&hijack_context, message_consumer); + libspirv::SetContextMessageConsumer(&hijack_context, message_consumer); spv_const_binary_t spirv_binary = {spirv.data(), spirv.size()}; @@ -2897,15 +2853,15 @@ spv_result_t SpirvToMarkv(spv_const_context context, spv_position_t position = {}; if (spvBinaryEndianness(&spirv_binary, &endian)) { return DiagnosticStream(position, hijack_context.consumer, - SPV_ERROR_INVALID_BINARY) - << "Invalid SPIR-V magic number."; + SPV_ERROR_INVALID_BINARY) + << "Invalid SPIR-V magic number."; } spv_header_t header; if (spvBinaryHeaderGet(&spirv_binary, endian, &header)) { return DiagnosticStream(position, hijack_context.consumer, SPV_ERROR_INVALID_BINARY) - << "Invalid SPIR-V header."; + << "Invalid SPIR-V header."; } MarkvEncoder encoder(&hijack_context, options, &markv_model); @@ -2915,40 +2871,36 @@ spv_result_t SpirvToMarkv(spv_const_context context, spv_text text = nullptr; if (spvBinaryToText(&hijack_context, spirv.data(), spirv.size(), - SPV_BINARY_TO_TEXT_OPTION_NO_HEADER, &text, nullptr) - != SPV_SUCCESS) { + SPV_BINARY_TO_TEXT_OPTION_NO_HEADER, &text, + nullptr) != SPV_SUCCESS) { return DiagnosticStream(position, hijack_context.consumer, SPV_ERROR_INVALID_BINARY) - << "Failed to disassemble SPIR-V binary."; + << "Failed to disassemble SPIR-V binary."; } assert(text); encoder.SetDisassembly(std::string(text->str, text->length)); spvTextDestroy(text); } - if (spvBinaryParse( - &hijack_context, &encoder, spirv.data(), spirv.size(), EncodeHeader, - EncodeInstruction, nullptr) != SPV_SUCCESS) { + if (spvBinaryParse(&hijack_context, &encoder, spirv.data(), spirv.size(), + EncodeHeader, EncodeInstruction, nullptr) != SPV_SUCCESS) { return DiagnosticStream(position, hijack_context.consumer, SPV_ERROR_INVALID_BINARY) - << "Unable to encode to MARK-V."; + << "Unable to encode to MARK-V."; } *markv = encoder.GetMarkvBinary(); return SPV_SUCCESS; } -spv_result_t MarkvToSpirv(spv_const_context context, - const std::vector& markv, - const MarkvCodecOptions& options, - const MarkvModel& markv_model, - MessageConsumer message_consumer, - MarkvLogConsumer log_consumer, - MarkvDebugConsumer debug_consumer, - std::vector* spirv) { +spv_result_t MarkvToSpirv( + spv_const_context context, const std::vector& markv, + const MarkvCodecOptions& options, const MarkvModel& markv_model, + MessageConsumer message_consumer, MarkvLogConsumer log_consumer, + MarkvDebugConsumer debug_consumer, std::vector* spirv) { spv_position_t position = {}; spv_context_t hijack_context = *context; - SetContextMessageConsumer(&hijack_context, message_consumer); + libspirv::SetContextMessageConsumer(&hijack_context, message_consumer); MarkvDecoder decoder(&hijack_context, markv, options, &markv_model); @@ -2958,11 +2910,11 @@ spv_result_t MarkvToSpirv(spv_const_context context, if (decoder.DecodeModule(spirv) != SPV_SUCCESS) { return DiagnosticStream(position, hijack_context.consumer, SPV_ERROR_INVALID_BINARY) - << "Unable to decode MARK-V."; + << "Unable to decode MARK-V."; } assert(!spirv->empty()); return SPV_SUCCESS; } -} // namespave spvtools +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_model.h b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_model.h index f656df4589e37e22ef7bfd794897c5d11a394d90..606396e6d3c0d32404d56f971fcda7b90d0af918 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_model.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/comp/markv_model.h @@ -19,7 +19,7 @@ #include #include -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" #include "util/huffman_codec.h" @@ -30,24 +30,75 @@ namespace spvtools { // codecs used by the compression algorithm. class MarkvModel { public: - MarkvModel() : operand_chunk_lengths_( - static_cast(SPV_OPERAND_TYPE_NUM_OPERAND_TYPES), 0) {} + MarkvModel() + : operand_chunk_lengths_( + static_cast(SPV_OPERAND_TYPE_NUM_OPERAND_TYPES), 0) { + // Set default values. + operand_chunk_lengths_[SPV_OPERAND_TYPE_TYPE_ID] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_RESULT_ID] = 8; + operand_chunk_lengths_[SPV_OPERAND_TYPE_ID] = 8; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SCOPE_ID] = 8; + operand_chunk_lengths_[SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID] = 8; + operand_chunk_lengths_[SPV_OPERAND_TYPE_LITERAL_INTEGER] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_OPTIONAL_LITERAL_INTEGER] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_CAPABILITY] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SOURCE_LANGUAGE] = 3; + operand_chunk_lengths_[SPV_OPERAND_TYPE_EXECUTION_MODEL] = 3; + operand_chunk_lengths_[SPV_OPERAND_TYPE_ADDRESSING_MODEL] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_MEMORY_MODEL] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_EXECUTION_MODE] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_STORAGE_CLASS] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_DIMENSIONALITY] = 3; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE] = 3; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_FP_ROUNDING_MODE] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_LINKAGE_TYPE] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_ACCESS_QUALIFIER] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE] = 3; + operand_chunk_lengths_[SPV_OPERAND_TYPE_DECORATION] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_BUILT_IN] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_GROUP_OPERATION] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO] = 2; + operand_chunk_lengths_[SPV_OPERAND_TYPE_FP_FAST_MATH_MODE] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_FUNCTION_CONTROL] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_LOOP_CONTROL] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_IMAGE] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_OPTIONAL_IMAGE] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_SELECTION_CONTROL] = 4; + operand_chunk_lengths_[SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER] = 6; + operand_chunk_lengths_[SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER] = 6; + } uint32_t model_type() const { return model_type_; } uint32_t model_version() const { return model_version_; } uint32_t opcode_chunk_length() const { return opcode_chunk_length_; } - uint32_t num_operands_chunk_length() const { return num_operands_chunk_length_; } + uint32_t num_operands_chunk_length() const { + return num_operands_chunk_length_; + } uint32_t mtf_rank_chunk_length() const { return mtf_rank_chunk_length_; } uint32_t u64_chunk_length() const { return u64_chunk_length_; } uint32_t s64_chunk_length() const { return s64_chunk_length_; } uint32_t s64_block_exponent() const { return s64_block_exponent_; } + enum class IdFallbackStrategy { + kRuleBased = 0, + kShortDescriptor, + }; + + IdFallbackStrategy id_fallback_strategy() const { + return id_fallback_strategy_; + } + // Returns a codec for common opcode_and_num_operands words for the given // previous opcode. May return nullptr if the codec doesn't exist. - const spvutils::HuffmanCodec* GetOpcodeAndNumOperandsMarkovHuffmanCodec( - uint32_t prev_opcode) const { + const spvutils::HuffmanCodec* + GetOpcodeAndNumOperandsMarkovHuffmanCodec(uint32_t prev_opcode) const { if (prev_opcode == SpvOpNop) return opcode_and_num_operands_huffman_codec_.get(); @@ -65,8 +116,7 @@ class MarkvModel { uint32_t opcode, uint32_t operand_index) const { const auto it = non_id_word_huffman_codecs_.find( std::pair(opcode, operand_index)); - if (it == non_id_word_huffman_codecs_.end()) - return nullptr; + if (it == non_id_word_huffman_codecs_.end()) return nullptr; return it->second.get(); } @@ -77,8 +127,7 @@ class MarkvModel { uint32_t opcode, uint32_t operand_index) const { const auto it = id_descriptor_huffman_codecs_.find( std::pair(opcode, operand_index)); - if (it == id_descriptor_huffman_codecs_.end()) - return nullptr; + if (it == id_descriptor_huffman_codecs_.end()) return nullptr; return it->second.get(); } @@ -88,8 +137,7 @@ class MarkvModel { const spvutils::HuffmanCodec* GetLiteralStringHuffmanCodec( uint32_t opcode) const { const auto it = literal_string_huffman_codecs_.find(opcode); - if (it == literal_string_huffman_codecs_.end()) - return nullptr; + if (it == literal_string_huffman_codecs_.end()) return nullptr; return it->second.get(); } @@ -99,6 +147,11 @@ class MarkvModel { return descriptors_with_coding_scheme_.count(descriptor); } + // Checks if any descriptor has a coding scheme. + bool AnyDescriptorHasCodingScheme() const { + return !descriptors_with_coding_scheme_.empty(); + } + // Returns chunk length used for variable length encoding of spirv operand // words. uint32_t GetOperandVariableWidthChunkLength(spv_operand_type_t type) const { @@ -106,9 +159,7 @@ class MarkvModel { } // Sets model type. - void SetModelType(uint32_t in_model_type) { - model_type_ = in_model_type; - } + void SetModelType(uint32_t in_model_type) { model_type_ = in_model_type; } // Sets model version. void SetModelVersion(uint32_t in_model_version) { @@ -137,12 +188,14 @@ class MarkvModel { // Huffman codecs for non-id single-word operand values. // The map key is pair . std::map, - std::unique_ptr>> non_id_word_huffman_codecs_; + std::unique_ptr>> + non_id_word_huffman_codecs_; // Huffman codecs for id descriptors. The map key is pair // . std::map, - std::unique_ptr>> id_descriptor_huffman_codecs_; + std::unique_ptr>> + id_descriptor_huffman_codecs_; // Set of all descriptors which have a coding scheme in any of // id_descriptor_huffman_codecs_. @@ -160,13 +213,16 @@ class MarkvModel { std::vector operand_chunk_lengths_; uint32_t opcode_chunk_length_ = 7; - uint32_t num_operands_chunk_length_ = 3; + uint32_t num_operands_chunk_length_ = 3; uint32_t mtf_rank_chunk_length_ = 5; uint32_t u64_chunk_length_ = 8; uint32_t s64_chunk_length_ = 8; uint32_t s64_block_exponent_ = 10; + IdFallbackStrategy id_fallback_strategy_ = + IdFallbackStrategy::kShortDescriptor; + uint32_t model_type_ = 0; uint32_t model_version_ = 0; }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/diagnostic.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/diagnostic.cpp index 44339f69e5aa8080765cea5434373ebc90b9d9f6..5787120696cadd97936e4444312d27a61f23b247 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/diagnostic.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/diagnostic.cpp @@ -117,7 +117,7 @@ void UseDiagnosticAsMessageConsumer(spv_context context, spvDiagnosticDestroy(*diagnostic); // Avoid memory leak. *diagnostic = spvDiagnosticCreate(&p, message); }; - SetContextMessageConsumer(context, std::move(create_diagnostic)); + libspirv::SetContextMessageConsumer(context, std::move(create_diagnostic)); } std::string spvResultToString(spv_result_t res) { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.cpp index cbec78adc50f46afa518e16cbb687c1b629113bd..909886c0978555fb531f712719cdfccdf2bb9123 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.cpp @@ -25,6 +25,7 @@ #include "assembly_grammar.h" #include "binary.h" #include "diagnostic.h" +#include "disassemble.h" #include "ext_inst.h" #include "name_mapper.h" #include "opcode.h" @@ -45,8 +46,7 @@ class Disassembler { libspirv::NameMapper name_mapper) : grammar_(grammar), print_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_PRINT, options)), - color_(print_ && - spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COLOR, options)), + color_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COLOR, options)), indent_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_INDENT, options) ? kStandardIndent : 0), @@ -87,27 +87,27 @@ class Disassembler { // Resets the output color, if color is turned on. void ResetColor() { - if (color_) out_.get() << libspirv::clr::reset(); + if (color_) out_.get() << libspirv::clr::reset{print_}; } // Sets the output to grey, if color is turned on. void SetGrey() { - if (color_) out_.get() << libspirv::clr::grey(); + if (color_) out_.get() << libspirv::clr::grey{print_}; } // Sets the output to blue, if color is turned on. void SetBlue() { - if (color_) out_.get() << libspirv::clr::blue(); + if (color_) out_.get() << libspirv::clr::blue{print_}; } // Sets the output to yellow, if color is turned on. void SetYellow() { - if (color_) out_.get() << libspirv::clr::yellow(); + if (color_) out_.get() << libspirv::clr::yellow{print_}; } // Sets the output to red, if color is turned on. void SetRed() { - if (color_) out_.get() << libspirv::clr::red(); + if (color_) out_.get() << libspirv::clr::red{print_}; } // Sets the output to green, if color is turned on. void SetGreen() { - if (color_) out_.get() << libspirv::clr::green(); + if (color_) out_.get() << libspirv::clr::green{print_}; } const libspirv::AssemblyGrammar& grammar_; @@ -266,7 +266,11 @@ void Disassembler::EmitOperand(const spv_parsed_instruction_t& inst, case SPV_OPERAND_TYPE_BUILT_IN: case SPV_OPERAND_TYPE_GROUP_OPERATION: case SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS: - case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO: { + case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO: + case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING: + case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE: + case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER: + case SPV_OPERAND_TYPE_DEBUG_OPERATION: { spv_operand_desc entry; if (grammar_.lookupOperand(operand.type, word, &entry)) assert(false && "should have caught this earlier"); @@ -278,6 +282,7 @@ void Disassembler::EmitOperand(const spv_parsed_instruction_t& inst, case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_MEMORY_ACCESS: case SPV_OPERAND_TYPE_SELECTION_CONTROL: + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: EmitMaskOperand(operand.type, word); break; default: @@ -348,6 +353,52 @@ spv_result_t DisassembleInstruction( return disassembler->HandleInstruction(*parsed_instruction); } +// Simple wrapper class to provide extra data necessary for targeted +// instruction disassembly. +class WrappedDisassembler { + public: + WrappedDisassembler(Disassembler* dis, const uint32_t* binary, size_t wc) + : disassembler_(dis), inst_binary_(binary), word_count_(wc) {} + + Disassembler* disassembler() { return disassembler_; } + const uint32_t* inst_binary() const { return inst_binary_; } + size_t word_count() const { return word_count_; } + + private: + Disassembler* disassembler_; + const uint32_t* inst_binary_; + const size_t word_count_; +}; + +spv_result_t DisassembleTargetHeader(void* user_data, spv_endianness_t endian, + uint32_t /* magic */, uint32_t version, + uint32_t generator, uint32_t id_bound, + uint32_t schema) { + assert(user_data); + auto wrapped = static_cast(user_data); + return wrapped->disassembler()->HandleHeader(endian, version, generator, + id_bound, schema); +} + +spv_result_t DisassembleTargetInstruction( + void* user_data, const spv_parsed_instruction_t* parsed_instruction) { + assert(user_data); + auto wrapped = static_cast(user_data); + // Check if this is the instruction we want to disassemble. + if (wrapped->word_count() == parsed_instruction->num_words && + std::equal(wrapped->inst_binary(), + wrapped->inst_binary() + wrapped->word_count(), + parsed_instruction->words)) { + // Found the target instruction. Disassemble it and signal that we should + // stop searching so we don't output the same instruction again. + if (auto error = + wrapped->disassembler()->HandleInstruction(*parsed_instruction)) + return error; + return SPV_REQUESTED_TERMINATION; + } + return SPV_SUCCESS; +} + } // anonymous namespace spv_result_t spvBinaryToText(const spv_const_context context, @@ -382,3 +433,44 @@ spv_result_t spvBinaryToText(const spv_const_context context, return disassembler.SaveTextResult(pText); } + +std::string spvtools::spvInstructionBinaryToText(const spv_target_env env, + const uint32_t* instCode, + const size_t instWordCount, + const uint32_t* code, + const size_t wordCount, + const uint32_t options) { + spv_context context = spvContextCreate(env); + const libspirv::AssemblyGrammar grammar(context); + if (!grammar.isValid()) { + spvContextDestroy(context); + return ""; + } + + // Generate friendly names for Ids if requested. + std::unique_ptr friendly_mapper; + libspirv::NameMapper name_mapper = libspirv::GetTrivialNameMapper(); + if (options & SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) { + friendly_mapper.reset( + new libspirv::FriendlyNameMapper(context, code, wordCount)); + name_mapper = friendly_mapper->GetNameMapper(); + } + + // Now disassemble! + Disassembler disassembler(grammar, options, name_mapper); + WrappedDisassembler wrapped(&disassembler, instCode, instWordCount); + spvBinaryParse(context, &wrapped, code, wordCount, DisassembleTargetHeader, + DisassembleTargetInstruction, nullptr); + + spv_text text = nullptr; + std::string output; + if (disassembler.SaveTextResult(&text) == SPV_SUCCESS) { + output.assign(text->str, text->str + text->length); + // Drop trailing newline characters. + while (!output.empty() && output.back() == '\n') output.pop_back(); + } + spvTextDestroy(text); + spvContextDestroy(context); + + return output; +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.h b/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.h new file mode 100644 index 0000000000000000000000000000000000000000..b833dd07a1aaf97fff1fc27694f00432303dac11 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/disassemble.h @@ -0,0 +1,38 @@ +// Copyright (c) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SPIRV_TOOLS_DISASSEMBLE_H_ +#define SPIRV_TOOLS_DISASSEMBLE_H_ + +#include + +#include "spirv-tools/libspirv.h" + +namespace spvtools { + +// Decodes the given SPIR-V instruction binary representation to its assembly +// text. The context is inferred from the provided module binary. The options +// parameter is a bit field of spv_binary_to_text_options_t. Decoded text will +// be stored into *text. Any error will be written into *diagnostic if +// diagnostic is non-null. +std::string spvInstructionBinaryToText(const spv_target_env env, + const uint32_t* inst_binary, + const size_t inst_word_count, + const uint32_t* binary, + const size_t word_count, + const uint32_t options); + +} // namespace spvtools + +#endif // SPIRV_TOOLS_DISASSEMBLE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_set.h b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_set.h index 6d3ec73b1dbcd49a1c1ef4388c61741f6a1a8149..75a49f06bd03d8e1996d183b18d799331dba185e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_set.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_set.h @@ -21,7 +21,7 @@ #include #include -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" namespace libspirv { @@ -46,6 +46,9 @@ class EnumSet { EnumSet(std::initializer_list cs) { for (auto c : cs) Add(c); } + EnumSet(uint32_t count, const EnumType* ptr) { + for (uint32_t i = 0; i < count; ++i) Add(ptr[i]); + } // Copy constructor. EnumSet(const EnumSet& other) { *this = other; } // Move constructor. The moved-from set is emptied. @@ -95,15 +98,12 @@ class EnumSet { bool HasAnyOf(const EnumSet& in_set) const { if (in_set.IsEmpty()) return true; - if (mask_ & in_set.mask_) - return true; + if (mask_ & in_set.mask_) return true; - if (!overflow_ || !in_set.overflow_) - return false; + if (!overflow_ || !in_set.overflow_) return false; for (uint32_t item : *in_set.overflow_) { - if (overflow_->find(item) != overflow_->end()) - return true; + if (overflow_->find(item) != overflow_->end()) return true; } return false; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.cpp index ff40bd8247822e401b96a891b7b0b3972efa40f5..e993b58427f6e4685a5305df6de0a1c5c27f36ee 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.cpp @@ -14,7 +14,9 @@ #include "enum_string_mapping.h" +#include #include +#include #include #include diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.h b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.h index 773d40c4c923c7b0ffc6dd571bb78e1d428141ea..4b126810a1adcbb6dc158ff413427ef5c5f7b76d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/enum_string_mapping.h @@ -17,20 +17,19 @@ #include -#include "spirv/1.1/spirv.h" +#include "extensions.h" +#include "latest_version_spirv_header.h" namespace libspirv { -enum class Extension; - // Finds Extension enum corresponding to |str|. Returns false if not found. -bool GetExtensionFromString(const std::string& str, Extension* extension); +bool GetExtensionFromString(const char* str, Extension* extension); // Returns text string corresponding to |extension|. -std::string ExtensionToString(Extension extension); +const char* ExtensionToString(Extension extension); // Returns text string corresponding to |capability|. -std::string CapabilityToString(SpvCapability capability); +const char* CapabilityToString(SpvCapability capability); } // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/ext_inst.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/ext_inst.cpp index 71f72fc9aabbdfb904b35e7a13f4bb27c39afc8c..6218eb1153ff6ead9b15508e390fb29f9b6dbd9d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/ext_inst.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/ext_inst.cpp @@ -17,61 +17,48 @@ #include #include -#include "spirv/1.0/GLSL.std.450.h" -#include "spirv/1.0/OpenCL.std.h" -#include "spirv_definition.h" +// DebugInfo extended instruction set. +// See https://www.khronos.org/registry/spir-v/specs/1.0/DebugInfo.html +// TODO(dneto): DebugInfo.h should probably move to SPIRV-Headers. +#include "DebugInfo.h" +#include "latest_version_glsl_std_450_header.h" +#include "latest_version_opencl_std_header.h" #include "macro.h" +#include "spirv_definition.h" -spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable, - spv_target_env env) { - if (!pExtInstTable) return SPV_ERROR_INVALID_POINTER; - - static const spv_ext_inst_desc_t glslStd450Entries_1_0[] = { -#include "glsl.std.450.insts-1.0.inc" - }; - - static const spv_ext_inst_desc_t openclEntries_1_0[] = { -#include "opencl.std.insts-1.0.inc" - }; +#include "debuginfo.insts.inc" // defines opencl_entries +#include "glsl.std.450.insts.inc" // defines glsl_entries +#include "opencl.std.insts.inc" // defines opencl_entries - static const spv_ext_inst_desc_t - spv_amd_shader_explicit_vertex_parameter_entries[] = { +#include "spv-amd-gcn-shader.insts.inc" +#include "spv-amd-shader-ballot.insts.inc" #include "spv-amd-shader-explicit-vertex-parameter.insts.inc" - }; - - static const spv_ext_inst_desc_t spv_amd_shader_trinary_minmax_entries[] = { #include "spv-amd-shader-trinary-minmax.insts.inc" - }; - static const spv_ext_inst_desc_t spv_amd_gcn_shader_entries[] = { -#include "spv-amd-gcn-shader.insts.inc" - }; +static const spv_ext_inst_group_t kGroups_1_0[] = { + {SPV_EXT_INST_TYPE_GLSL_STD_450, ARRAY_SIZE(glsl_entries), glsl_entries}, + {SPV_EXT_INST_TYPE_OPENCL_STD, ARRAY_SIZE(opencl_entries), opencl_entries}, + {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER, + ARRAY_SIZE(spv_amd_shader_explicit_vertex_parameter_entries), + spv_amd_shader_explicit_vertex_parameter_entries}, + {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_TRINARY_MINMAX, + ARRAY_SIZE(spv_amd_shader_trinary_minmax_entries), + spv_amd_shader_trinary_minmax_entries}, + {SPV_EXT_INST_TYPE_SPV_AMD_GCN_SHADER, + ARRAY_SIZE(spv_amd_gcn_shader_entries), spv_amd_gcn_shader_entries}, + {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_BALLOT, + ARRAY_SIZE(spv_amd_shader_ballot_entries), spv_amd_shader_ballot_entries}, + {SPV_EXT_INST_TYPE_DEBUGINFO, ARRAY_SIZE(debuginfo_entries), + debuginfo_entries}, +}; + +static const spv_ext_inst_table_t kTable_1_0 = {ARRAY_SIZE(kGroups_1_0), + kGroups_1_0}; - static const spv_ext_inst_desc_t spv_amd_shader_ballot_entries[] = { -#include "spv-amd-shader-ballot.insts.inc" - }; - - static const spv_ext_inst_group_t groups_1_0[] = { - {SPV_EXT_INST_TYPE_GLSL_STD_450, ARRAY_SIZE(glslStd450Entries_1_0), - glslStd450Entries_1_0}, - {SPV_EXT_INST_TYPE_OPENCL_STD, ARRAY_SIZE(openclEntries_1_0), - openclEntries_1_0}, - {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER, - ARRAY_SIZE(spv_amd_shader_explicit_vertex_parameter_entries), - spv_amd_shader_explicit_vertex_parameter_entries}, - {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_TRINARY_MINMAX, - ARRAY_SIZE(spv_amd_shader_trinary_minmax_entries), - spv_amd_shader_trinary_minmax_entries}, - {SPV_EXT_INST_TYPE_SPV_AMD_GCN_SHADER, - ARRAY_SIZE(spv_amd_gcn_shader_entries), spv_amd_gcn_shader_entries}, - {SPV_EXT_INST_TYPE_SPV_AMD_SHADER_BALLOT, - ARRAY_SIZE(spv_amd_shader_ballot_entries), - spv_amd_shader_ballot_entries}, - }; - - static const spv_ext_inst_table_t table_1_0 = {ARRAY_SIZE(groups_1_0), - groups_1_0}; +spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable, + spv_target_env env) { + if (!pExtInstTable) return SPV_ERROR_INVALID_POINTER; switch (env) { // The extended instruction sets are all version 1.0 so far. @@ -79,14 +66,22 @@ spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable, case SPV_ENV_VULKAN_1_0: case SPV_ENV_UNIVERSAL_1_1: case SPV_ENV_UNIVERSAL_1_2: + case SPV_ENV_OPENCL_1_2: + case SPV_ENV_OPENCL_EMBEDDED_1_2: + case SPV_ENV_OPENCL_2_0: + case SPV_ENV_OPENCL_EMBEDDED_2_0: case SPV_ENV_OPENCL_2_1: + case SPV_ENV_OPENCL_EMBEDDED_2_1: case SPV_ENV_OPENCL_2_2: + case SPV_ENV_OPENCL_EMBEDDED_2_2: case SPV_ENV_OPENGL_4_0: case SPV_ENV_OPENGL_4_1: case SPV_ENV_OPENGL_4_2: case SPV_ENV_OPENGL_4_3: case SPV_ENV_OPENGL_4_5: - *pExtInstTable = &table_1_0; + case SPV_ENV_UNIVERSAL_1_3: + case SPV_ENV_VULKAN_1_1: + *pExtInstTable = &kTable_1_0; return SPV_SUCCESS; default: assert(0 && "Unknown spv_target_env in spvExtInstTableGet()"); @@ -115,6 +110,9 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) { if (!strcmp("SPV_AMD_shader_ballot", name)) { return SPV_EXT_INST_TYPE_SPV_AMD_SHADER_BALLOT; } + if (!strcmp("DebugInfo", name)) { + return SPV_EXT_INST_TYPE_DEBUGINFO; + } return SPV_EXT_INST_TYPE_NONE; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.cpp index 260a15b6813be7b6e7c59d0c3474c54eeda80b7e..065543c11c5373b0a3495c37b0528eac0df7e387 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.cpp @@ -23,8 +23,7 @@ namespace libspirv { std::string GetExtensionString(const spv_parsed_instruction_t* inst) { - if (inst->opcode != SpvOpExtension) - return "ERROR_not_op_extension"; + if (inst->opcode != SpvOpExtension) return "ERROR_not_op_extension"; assert(inst->num_operands == 1); @@ -37,9 +36,8 @@ std::string GetExtensionString(const spv_parsed_instruction_t* inst) { std::string ExtensionSetToString(const ExtensionSet& extensions) { std::stringstream ss; - extensions.ForEach([&ss](Extension ext) { - ss << ExtensionToString(ext) << " "; - }); + extensions.ForEach( + [&ss](Extension ext) { ss << ExtensionToString(ext) << " "; }); return ss.str(); } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.h b/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.h index 2eee7cfa94dd41d640242d04fd7fec0a1efee9c0..9947f1a9b4e2a2acedd06cc320aacf07c139268f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/extensions.h @@ -23,7 +23,7 @@ namespace libspirv { // The known SPIR-V extensions. -enum class Extension { +enum Extension { #include "extension_enum.inc" }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/extinst.debuginfo.grammar.json b/sources/third_party/shaderc/third_party/spirv-tools/source/extinst.debuginfo.grammar.json new file mode 100644 index 0000000000000000000000000000000000000000..9212f6f48c59fcf634451c2329e083f3d6e22d46 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/extinst.debuginfo.grammar.json @@ -0,0 +1,568 @@ +{ + "copyright" : [ + "Copyright (c) 2017 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 100, + "revision" : 1, + "instructions" : [ + { + "opname" : "DebugInfoNone", + "opcode" : 0 + }, + { + "opname" : "DebugCompilationUnit", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Version'" }, + { "kind" : "LiteralInteger", "name" : "'DWARF Version'" } + ] + }, + { + "opname" : "DebugTypeBasic", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" } + ] + }, + { + "opname" : "DebugTypePointer", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "StorageClass", "name" : "'Storage Class'" }, + { "kind" : "DebugInfoFlags", "name" : "'Literal Flags'" } + ] + }, + { + "opname" : "DebugTypeQualifier", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" } + ] + }, + { + "opname" : "DebugTypeArray", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeVector", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "LiteralInteger", "name" : "'Component Count'" } + ] + }, + { + "opname" : "DebugTypedef", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeFunction", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "name" : "'Paramter Types'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeEnum", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Underlying Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeComposite", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "DebugCompositeType", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeMember", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugTypeInheritance", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'Child'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypePtrToMember", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'Member Type'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeTemplate", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeTemplateParameter", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Actual Type'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateTemplateParameter", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Template Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateParameterPack", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugGlobalVariable", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugFunctionDeclaration", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugFunction", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "LiteralInteger", "name" : "'Scope Line'" }, + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlock", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlockDiscriminator", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "LiteralInteger", "name" : "'Discriminator'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugScope", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugNoScope", + "opcode" : 24 + }, + { + "opname" : "DebugInlinedAt", + "opcode" : 25, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLocalVariable", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugInlinedVariable", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Inlined'" } + ] + }, + { + "opname" : "DebugDeclare", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Expression'" } + ] + }, + { + "opname" : "DebugValue", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Expression'" }, + { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugOperation", + "opcode" : 30, + "operands" : [ + { "kind" : "DebugOperation", "name" : "'OpCode'" }, + { "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugExpression", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugMacroDef", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugMacroUndef", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Macro'" } + ] + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "DebugInfoFlags", + "enumerants" : [ + { + "enumerant" : "FlagIsProtected", + "value" : "0x01" + }, + { + "enumerant" : "FlagIsPrivate", + "value" : "0x02" + }, + { + "enumerant" : "FlagIsPublic", + "value" : "0x03" + }, + { + "enumerant" : "FlagIsLocal", + "value" : "0x04" + }, + { + "enumerant" : "FlagIsDefinition", + "value" : "0x08" + }, + { + "enumerant" : "FlagFwdDecl", + "value" : "0x10" + }, + { + "enumerant" : "FlagArtificial", + "value" : "0x20" + }, + { + "enumerant" : "FlagExplicit", + "value" : "0x40" + }, + { + "enumerant" : "FlagPrototyped", + "value" : "0x80" + }, + { + "enumerant" : "FlagObjectPointer", + "value" : "0x100" + }, + { + "enumerant" : "FlagStaticMember", + "value" : "0x200" + }, + { + "enumerant" : "FlagIndirectVariable", + "value" : "0x400" + }, + { + "enumerant" : "FlagLValueReference", + "value" : "0x800" + }, + { + "enumerant" : "FlagRValueReference", + "value" : "0x1000" + }, + { + "enumerant" : "FlagIsOptimized", + "value" : "0x2000" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugBaseTypeAttributeEncoding", + "enumerants" : [ + { + "enumerant" : "Unspecified", + "value" : "0" + }, + { + "enumerant" : "Address", + "value" : "1" + }, + { + "enumerant" : "Boolean", + "value" : "2" + }, + { + "enumerant" : "Float", + "value" : "4" + }, + { + "enumerant" : "Signed", + "value" : "5" + }, + { + "enumerant" : "SignedChar", + "value" : "6" + }, + { + "enumerant" : "Unsigned", + "value" : "7" + }, + { + "enumerant" : "UnsignedChar", + "value" : "8" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugCompositeType", + "enumerants" : [ + { + "enumerant" : "Class", + "value" : "0" + }, + { + "enumerant" : "Structure", + "value" : "1" + }, + { + "enumerant" : "Union", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugTypeQualifier", + "enumerants" : [ + { + "enumerant" : "ConstType", + "value" : "0" + }, + { + "enumerant" : "VolatileType", + "value" : "1" + }, + { + "enumerant" : "RestrictType", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugOperation", + "enumerants" : [ + { + "enumerant" : "Deref", + "value" : "0" + }, + { + "enumerant" : "Plus", + "value" : "1" + }, + { + "enumerant" : "Minus", + "value" : "2" + }, + { + "enumerant" : "PlusUconst", + "value" : "3", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "BitPiece", + "value" : "4", + "parameters" : [ + { "kind" : "LiteralInteger" }, + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "Swap", + "value" : "5" + }, + { + "enumerant" : "Xderef", + "value" : "6" + }, + { + "enumerant" : "StackValue", + "value" : "7" + }, + { + "enumerant" : "Constu", + "value" : "8", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + } + ] + } + ] +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.cpp index d2c6220b2faff8187be395fbbd4316a6ccb4dcaa..7697c29931361b57cee2997ccc3f4fc109bb89e6 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.cpp @@ -40,15 +40,14 @@ uint32_t HashU32Array(const std::vector& words) { uint32_t IdDescriptorCollection::ProcessInstruction( const spv_parsed_instruction_t& inst) { - if (!inst.result_id) - return 0; + if (!inst.result_id) return 0; assert(words_.empty()); words_.push_back(inst.words[0]); for (size_t operand_index = 0; operand_index < inst.num_operands; ++operand_index) { - const auto &operand = inst.operands[operand_index]; + const auto& operand = inst.operands[operand_index]; if (spvIsIdType(operand.type)) { const uint32_t id = inst.words[operand.offset]; const auto it = id_to_descriptor_.find(id); @@ -64,7 +63,9 @@ uint32_t IdDescriptorCollection::ProcessInstruction( } } - const uint32_t descriptor = HashU32Array(words_); + uint32_t descriptor = + custom_hash_func_ ? custom_hash_func_(words_) : HashU32Array(words_); + if (descriptor == 0) descriptor = 1; assert(descriptor); words_.clear(); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.h b/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.h index b4947a78f3b2fc54e8e2430f13e6eb2aee9f14f5..d27123a1e5845190e88dc3419affc582d08e3025 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/id_descriptor.h @@ -22,13 +22,17 @@ namespace libspirv { +using CustomHashFunc = std::function&)>; + // Computes and stores id descriptors. // // Descriptors are computed as hash of all words in the instruction where ids // were substituted with previously computed descriptors. class IdDescriptorCollection { public: - IdDescriptorCollection() { + explicit IdDescriptorCollection( + CustomHashFunc custom_hash_func = CustomHashFunc()) + : custom_hash_func_(custom_hash_func) { words_.reserve(16); } @@ -41,14 +45,15 @@ class IdDescriptorCollection { // Returns a previously computed descriptor id. uint32_t GetDescriptor(uint32_t id) const { const auto it = id_to_descriptor_.find(id); - if (it == id_to_descriptor_.end()) - return 0; + if (it == id_to_descriptor_.end()) return 0; return it->second; } private: std::unordered_map id_to_descriptor_; + std::function&)> custom_hash_func_; + // Scratch buffer used for hashing. Class member to optimize on allocation. std::vector words_; }; @@ -56,4 +61,3 @@ class IdDescriptorCollection { } // namespace libspirv #endif // LIBSPIRV_ID_DESCRIPTOR_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/instruction.h b/sources/third_party/shaderc/third_party/spirv-tools/source/instruction.h index 2afa6d45ddb28a4c8634735fe863a57da8748018..884276d7e4582a0f3294e4d463fb477c2350b562 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/instruction.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/instruction.h @@ -18,8 +18,8 @@ #include #include +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" // Describes an instruction. struct spv_instruction_t { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_glsl_std_450_header.h b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_glsl_std_450_header.h new file mode 100644 index 0000000000000000000000000000000000000000..b9e9ae275c962c99b428471b1fb14ccc38b68b1b --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_glsl_std_450_header.h @@ -0,0 +1,20 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_LATEST_VERSION_GLSL_STD_450_HEADER_H_ +#define LIBSPIRV_LATEST_VERSION_GLSL_STD_450_HEADER_H_ + +#include "spirv/unified1/GLSL.std.450.h" + +#endif // LIBSPIRV_LATEST_VERSION_GLSL_STD_450_HEADER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_opencl_std_header.h b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_opencl_std_header.h new file mode 100644 index 0000000000000000000000000000000000000000..9bb6e5028c9e899585a1c38042d9550cf5747185 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_opencl_std_header.h @@ -0,0 +1,20 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_LATEST_VERSION_OPENCL_STD_HEADER_H_ +#define LIBSPIRV_LATEST_VERSION_OPENCL_STD_HEADER_H_ + +#include "spirv/unified1/OpenCL.std.h" + +#endif // LIBSPIRV_LATEST_VERSION_OPENCL_STD_HEADER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_spirv_header.h b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_spirv_header.h new file mode 100644 index 0000000000000000000000000000000000000000..c328b69764cd101b19eb52634b977ddf81e790e4 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/latest_version_spirv_header.h @@ -0,0 +1,20 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_LATEST_VERSION_SPIRV_HEADER_H_ +#define LIBSPIRV_LATEST_VERSION_SPIRV_HEADER_H_ + +#include "spirv/unified1/spirv.h" + +#endif // LIBSPIRV_LATEST_VERSION_SPIRV_HEADER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/libspirv.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/libspirv.cpp index 77e03e57c465b21e10cb8d9d6f3159b6cc56a095..d0e3fe28c7d08851691dada9c6da16a539416ca9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/libspirv.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/libspirv.cpp @@ -18,6 +18,30 @@ namespace spvtools { +Context::Context(spv_target_env env) : context_(spvContextCreate(env)) {} + +Context::Context(Context&& other) : context_(other.context_) { + other.context_ = nullptr; +} + +Context& Context::operator=(Context&& other) { + spvContextDestroy(context_); + context_ = other.context_; + other.context_ = nullptr; + + return *this; +} + +Context::~Context() { spvContextDestroy(context_); } + +void Context::SetMessageConsumer(MessageConsumer consumer) { + libspirv::SetContextMessageConsumer(context_, std::move(consumer)); +} + +spv_context& Context::CContext() { return context_; } + +const spv_context& Context::CContext() const { return context_; } + // Structs for holding the data members for SpvTools. struct SpirvTools::Impl { explicit Impl(spv_target_env env) : context(spvContextCreate(env)) { @@ -35,7 +59,7 @@ SpirvTools::SpirvTools(spv_target_env env) : impl_(new Impl(env)) {} SpirvTools::~SpirvTools() {} void SpirvTools::SetMessageConsumer(MessageConsumer consumer) { - SetContextMessageConsumer(impl_->context, std::move(consumer)); + libspirv::SetContextMessageConsumer(impl_->context, std::move(consumer)); } bool SpirvTools::Assemble(const std::string& text, diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/link/linker.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/link/linker.cpp index 51e720ad7a6aef93b5f80e0f0270b6c0ea9af285..49cda4bd32ed60990f393790f34378912cecadec 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/link/linker.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/link/linker.cpp @@ -38,6 +38,7 @@ namespace spvtools { using ir::Instruction; +using ir::IRContext; using ir::Module; using ir::Operand; using opt::PassManager; @@ -69,31 +70,33 @@ using LinkageTable = std::vector; // is returned in |max_id_bound|. // // Both |modules| and |max_id_bound| should not be null, and |modules| should -// not be empty either. -static spv_result_t ShiftIdsInModules( - const MessageConsumer& consumer, - std::vector>* modules, uint32_t* max_id_bound); +// not be empty either. Furthermore |modules| should not contain any null +// pointers. +static spv_result_t ShiftIdsInModules(const MessageConsumer& consumer, + std::vector* modules, + uint32_t* max_id_bound); // Generates the header for the linked module and returns it in |header|. // -// |header| should not be null, |modules| should not be empty and -// |max_id_bound| should be strictly greater than 0. +// |header| should not be null, |modules| should not be empty and pointers +// should be non-null. |max_id_bound| should be strictly greater than 0. // // TODO(pierremoreau): What to do when binaries use different versions of // SPIR-V? For now, use the max of all versions found in // the input modules. -static spv_result_t GenerateHeader( - const MessageConsumer& consumer, - const std::vector>& modules, - uint32_t max_id_bound, ir::ModuleHeader* header); +static spv_result_t GenerateHeader(const MessageConsumer& consumer, + const std::vector& modules, + uint32_t max_id_bound, + ir::ModuleHeader* header); -// Merge all the modules from |inModules| into |linked_module|. +// Merge all the modules from |in_modules| into a single module owned by +// |linked_context|. // -// |linked_module| should not be null. -static spv_result_t MergeModules( - const MessageConsumer& consumer, - const std::vector>& inModules, - const libspirv::AssemblyGrammar& grammar, Module* linked_module); +// |linked_context| should not be null. +static spv_result_t MergeModules(const MessageConsumer& consumer, + const std::vector& in_modules, + const libspirv::AssemblyGrammar& grammar, + IRContext* linked_context); // Compute all pairs of import and export and return it in |linkings_to_do|. // @@ -104,11 +107,11 @@ static spv_result_t MergeModules( // applied to a single ID.) // TODO(pierremoreau): What should be the proper behaviour with built-in // symbols? -static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, - const Module& linked_module, - const DefUseManager& def_use_manager, - const DecorationManager& decoration_manager, - LinkageTable* linkings_to_do); +static spv_result_t GetImportExportPairs( + const MessageConsumer& consumer, const ir::IRContext& linked_context, + const DefUseManager& def_use_manager, + const DecorationManager& decoration_manager, bool allow_partial_linkage, + LinkageTable* linkings_to_do); // Checks that for each pair of import and export, the import and export have // the same type as well as the same decorations. @@ -117,14 +120,13 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, // checked. static spv_result_t CheckImportExportCompatibility( const MessageConsumer& consumer, const LinkageTable& linkings_to_do, - const DefUseManager& def_use_manager, - const DecorationManager& decoration_manager); + ir::IRContext* context); // Remove linkage specific instructions, such as prototypes of imported // functions, declarations of imported variables, import (and export if // necessary) linkage attribtes. // -// |linked_module| and |decoration_manager| should not be null, and the +// |linked_context| and |decoration_manager| should not be null, and the // 'RemoveDuplicatePass' should be run first. // // TODO(pierremoreau): Linkage attributes applied by a group decoration are @@ -133,33 +135,19 @@ static spv_result_t CheckImportExportCompatibility( // TODO(pierremoreau): Run a pass for removing dead instructions, for example // OpName for prototypes of imported funcions. static spv_result_t RemoveLinkageSpecificInstructions( - const MessageConsumer& consumer, bool create_executable, + const MessageConsumer& consumer, const LinkerOptions& options, const LinkageTable& linkings_to_do, DecorationManager* decoration_manager, - Module* linked_module); - -// Structs for holding the data members for SpvLinker. -struct Linker::Impl { - explicit Impl(spv_target_env env) : context(spvContextCreate(env)) { - // The default consumer in spv_context_t is a null consumer, which provides - // equivalent functionality (from the user's perspective) as a real consumer - // does nothing. - } - ~Impl() { spvContextDestroy(context); } - - spv_context context; // C interface context object. -}; + ir::IRContext* linked_context); -Linker::Linker(spv_target_env env) : impl_(new Impl(env)) {} +// Verify that the unique ids of each instruction in |linked_context| (i.e. the +// merged module) are truly unique. Does not check the validity of other ids +static spv_result_t VerifyIds(const MessageConsumer& consumer, + ir::IRContext* linked_context); -Linker::~Linker() {} - -void Linker::SetMessageConsumer(MessageConsumer consumer) { - SetContextMessageConsumer(impl_->context, std::move(consumer)); -} - -spv_result_t Linker::Link(const std::vector>& binaries, - std::vector& linked_binary, - const LinkerOptions& options) const { +spv_result_t Link(const Context& context, + const std::vector>& binaries, + std::vector* linked_binary, + const LinkerOptions& options) { std::vector binary_ptrs; binary_ptrs.reserve(binaries.size()); std::vector binary_sizes; @@ -170,24 +158,26 @@ spv_result_t Linker::Link(const std::vector>& binaries, binary_sizes.push_back(binary.size()); } - return Link(binary_ptrs.data(), binary_sizes.data(), binaries.size(), + return Link(context, binary_ptrs.data(), binary_sizes.data(), binaries.size(), linked_binary, options); } -spv_result_t Linker::Link(const uint32_t* const* binaries, - const size_t* binary_sizes, size_t num_binaries, - std::vector& linked_binary, - const LinkerOptions& options) const { +spv_result_t Link(const Context& context, const uint32_t* const* binaries, + const size_t* binary_sizes, size_t num_binaries, + std::vector* linked_binary, + const LinkerOptions& options) { spv_position_t position = {}; - const MessageConsumer& consumer = impl_->context->consumer; + const spv_context& c_context = context.CContext(); + const MessageConsumer& consumer = c_context->consumer; - linked_binary.clear(); + linked_binary->clear(); if (num_binaries == 0u) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) << "No modules were given."; - std::vector> modules; + std::vector> ir_contexts; + std::vector modules; modules.reserve(num_binaries); for (size_t i = 0u; i < num_binaries; ++i) { const uint32_t schema = binaries[i][4u]; @@ -198,13 +188,14 @@ spv_result_t Linker::Link(const uint32_t* const* binaries, << "Schema is non-zero for module " << i << "."; } - std::unique_ptr module = BuildModule( - impl_->context->target_env, consumer, binaries[i], binary_sizes[i]); - if (module == nullptr) + std::unique_ptr ir_context = BuildModule( + c_context->target_env, consumer, binaries[i], binary_sizes[i]); + if (ir_context == nullptr) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) - << "Failed to build a module out of " << modules.size() << "."; - modules.push_back(std::move(module)); + << "Failed to build a module out of " << ir_contexts.size() << "."; + modules.push_back(ir_context->module()); + ir_contexts.push_back(std::move(ir_context)); } // Phase 1: Shift the IDs used in each binary so that they occupy a disjoint @@ -217,63 +208,65 @@ spv_result_t Linker::Link(const uint32_t* const* binaries, ir::ModuleHeader header; res = GenerateHeader(consumer, modules, max_id_bound, &header); if (res != SPV_SUCCESS) return res; - auto linked_module = MakeUnique(); - linked_module->SetHeader(header); + IRContext linked_context(c_context->target_env, consumer); + linked_context.module()->SetHeader(header); // Phase 3: Merge all the binaries into a single one. - libspirv::AssemblyGrammar grammar(impl_->context); - res = MergeModules(consumer, modules, grammar, linked_module.get()); + libspirv::AssemblyGrammar grammar(c_context); + res = MergeModules(consumer, modules, grammar, &linked_context); if (res != SPV_SUCCESS) return res; - DefUseManager def_use_manager(consumer, linked_module.get()); + if (options.GetVerifyIds()) { + res = VerifyIds(consumer, &linked_context); + if (res != SPV_SUCCESS) return res; + } // Phase 4: Find the import/export pairs LinkageTable linkings_to_do; - DecorationManager decoration_manager(linked_module.get()); - res = GetImportExportPairs(consumer, *linked_module, def_use_manager, - decoration_manager, &linkings_to_do); + res = GetImportExportPairs(consumer, linked_context, + *linked_context.get_def_use_mgr(), + *linked_context.get_decoration_mgr(), + options.GetAllowPartialLinkage(), &linkings_to_do); if (res != SPV_SUCCESS) return res; // Phase 5: Ensure the import and export have the same types and decorations. - res = CheckImportExportCompatibility(consumer, linkings_to_do, - def_use_manager, decoration_manager); + res = + CheckImportExportCompatibility(consumer, linkings_to_do, &linked_context); if (res != SPV_SUCCESS) return res; // Phase 6: Remove duplicates PassManager manager; manager.SetMessageConsumer(consumer); manager.AddPass(); - opt::Pass::Status pass_res = manager.Run(linked_module.get()); + opt::Pass::Status pass_res = manager.Run(&linked_context); if (pass_res == opt::Pass::Status::Failure) return SPV_ERROR_INVALID_DATA; - // Phase 7: Remove linkage specific instructions, such as import/export + // Phase 7: Rematch import variables/functions to export variables/functions + for (const auto& linking_entry : linkings_to_do) + linked_context.ReplaceAllUsesWith(linking_entry.imported_symbol.id, + linking_entry.exported_symbol.id); + + // Phase 8: Remove linkage specific instructions, such as import/export // attributes, linkage capability, etc. if applicable - res = RemoveLinkageSpecificInstructions(consumer, !options.GetCreateLibrary(), - linkings_to_do, &decoration_manager, - linked_module.get()); + res = RemoveLinkageSpecificInstructions(consumer, options, linkings_to_do, + linked_context.get_decoration_mgr(), + &linked_context); if (res != SPV_SUCCESS) return res; - // Phase 8: Rematch import variables/functions to export variables/functions - // TODO(pierremoreau): Keep the previous DefUseManager up-to-date - DefUseManager def_use_manager2(consumer, linked_module.get()); - for (const auto& linking_entry : linkings_to_do) - def_use_manager2.ReplaceAllUsesWith(linking_entry.imported_symbol.id, - linking_entry.exported_symbol.id); - // Phase 9: Compact the IDs used in the module manager.AddPass(); - pass_res = manager.Run(linked_module.get()); + pass_res = manager.Run(&linked_context); if (pass_res == opt::Pass::Status::Failure) return SPV_ERROR_INVALID_DATA; // Phase 10: Output the module - linked_module->ToBinary(&linked_binary, true); + linked_context.module()->ToBinary(linked_binary, true); return SPV_SUCCESS; } -static spv_result_t ShiftIdsInModules( - const MessageConsumer& consumer, - std::vector>* modules, uint32_t* max_id_bound) { +static spv_result_t ShiftIdsInModules(const MessageConsumer& consumer, + std::vector* modules, + uint32_t* max_id_bound) { spv_position_t position = {}; if (modules == nullptr) @@ -292,7 +285,7 @@ static spv_result_t ShiftIdsInModules( uint32_t id_bound = modules->front()->IdBound() - 1u; for (auto module_iter = modules->begin() + 1; module_iter != modules->end(); ++module_iter) { - Module* module = module_iter->get(); + Module* module = *module_iter; module->ForEachInst([&id_bound](Instruction* insn) { insn->ForEachId([&id_bound](uint32_t* id) { *id += id_bound; }); }); @@ -302,6 +295,9 @@ static spv_result_t ShiftIdsInModules( SPV_ERROR_INVALID_ID) << "The limit of IDs, 4194303, was exceeded:" << " " << id_bound << " is the current ID bound."; + + // Invalidate the DefUseManager + module->context()->InvalidateAnalyses(ir::IRContext::kAnalysisDefUse); } ++id_bound; if (id_bound > 0x3FFFFF) @@ -314,10 +310,10 @@ static spv_result_t ShiftIdsInModules( return SPV_SUCCESS; } -static spv_result_t GenerateHeader( - const MessageConsumer& consumer, - const std::vector>& modules, - uint32_t max_id_bound, ir::ModuleHeader* header) { +static spv_result_t GenerateHeader(const MessageConsumer& consumer, + const std::vector& modules, + uint32_t max_id_bound, + ir::ModuleHeader* header) { spv_position_t position = {}; if (modules.empty()) @@ -342,30 +338,34 @@ static spv_result_t GenerateHeader( return SPV_SUCCESS; } -static spv_result_t MergeModules( - const MessageConsumer& consumer, - const std::vector>& input_modules, - const libspirv::AssemblyGrammar& grammar, Module* linked_module) { +static spv_result_t MergeModules(const MessageConsumer& consumer, + const std::vector& input_modules, + const libspirv::AssemblyGrammar& grammar, + IRContext* linked_context) { spv_position_t position = {}; - if (linked_module == nullptr) + if (linked_context == nullptr) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_DATA) << "|linked_module| of MergeModules should not be null."; + Module* linked_module = linked_context->module(); if (input_modules.empty()) return SPV_SUCCESS; for (const auto& module : input_modules) for (const auto& inst : module->capabilities()) - linked_module->AddCapability(MakeUnique(inst)); + linked_module->AddCapability( + std::unique_ptr(inst.Clone(linked_context))); for (const auto& module : input_modules) for (const auto& inst : module->extensions()) - linked_module->AddExtension(MakeUnique(inst)); + linked_module->AddExtension( + std::unique_ptr(inst.Clone(linked_context))); for (const auto& module : input_modules) for (const auto& inst : module->ext_inst_imports()) - linked_module->AddExtInstImport(MakeUnique(inst)); + linked_module->AddExtInstImport( + std::unique_ptr(inst.Clone(linked_context))); do { const Instruction* memory_model_inst = input_modules[0]->GetMemoryModel(); @@ -404,8 +404,8 @@ static spv_result_t MergeModules( } if (memory_model_inst != nullptr) - linked_module->SetMemoryModel( - MakeUnique(*memory_model_inst)); + linked_module->SetMemoryModel(std::unique_ptr( + memory_model_inst->Clone(linked_context))); } while (false); std::vector> entry_points; @@ -427,25 +427,48 @@ static spv_result_t MergeModules( << "The entry point \"" << name << "\", with execution model " << desc->name << ", was already defined."; } - linked_module->AddEntryPoint(MakeUnique(inst)); + linked_module->AddEntryPoint( + std::unique_ptr(inst.Clone(linked_context))); entry_points.emplace_back(model, name); } for (const auto& module : input_modules) for (const auto& inst : module->execution_modes()) - linked_module->AddExecutionMode(MakeUnique(inst)); + linked_module->AddExecutionMode( + std::unique_ptr(inst.Clone(linked_context))); for (const auto& module : input_modules) for (const auto& inst : module->debugs1()) - linked_module->AddDebug1Inst(MakeUnique(inst)); + linked_module->AddDebug1Inst( + std::unique_ptr(inst.Clone(linked_context))); for (const auto& module : input_modules) for (const auto& inst : module->debugs2()) - linked_module->AddDebug2Inst(MakeUnique(inst)); + linked_module->AddDebug2Inst( + std::unique_ptr(inst.Clone(linked_context))); + + for (const auto& module : input_modules) + for (const auto& inst : module->debugs3()) + linked_module->AddDebug3Inst( + std::unique_ptr(inst.Clone(linked_context))); + + // If the generated module uses SPIR-V 1.1 or higher, add an + // OpModuleProcessed instruction about the linking step. + if (linked_module->version() >= 0x10100) { + const std::string processed_string("Linked by SPIR-V Tools Linker"); + const size_t words_nb = + processed_string.size() / 4u + (processed_string.size() % 4u != 0u); + std::vector processed_words(words_nb, 0u); + std::memcpy(processed_words.data(), processed_string.data(), words_nb * 4u); + linked_module->AddDebug3Inst(std::unique_ptr( + new Instruction(linked_context, SpvOpModuleProcessed, 0u, 0u, + {{SPV_OPERAND_TYPE_LITERAL_STRING, processed_words}}))); + } for (const auto& module : input_modules) for (const auto& inst : module->annotations()) - linked_module->AddAnnotationInst(MakeUnique(inst)); + linked_module->AddAnnotationInst( + std::unique_ptr(inst.Clone(linked_context))); // TODO(pierremoreau): Since the modules have not been validate, should we // expect SpvStorageClassFunction variables outside @@ -453,7 +476,8 @@ static spv_result_t MergeModules( uint32_t num_global_values = 0u; for (const auto& module : input_modules) { for (const auto& inst : module->types_values()) { - linked_module->AddType(MakeUnique(inst)); + linked_module->AddType( + std::unique_ptr(inst.Clone(linked_context))); num_global_values += inst.opcode() == SpvOpVariable; } } @@ -465,8 +489,7 @@ static spv_result_t MergeModules( // Process functions and their basic blocks for (const auto& module : input_modules) { for (const auto& func : *module) { - std::unique_ptr cloned_func = - MakeUnique(func); + std::unique_ptr cloned_func(func.Clone(linked_context)); cloned_func->SetParent(linked_module); linked_module->AddFunction(std::move(cloned_func)); } @@ -475,11 +498,11 @@ static spv_result_t MergeModules( return SPV_SUCCESS; } -static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, - const Module& linked_module, - const DefUseManager& def_use_manager, - const DecorationManager& decoration_manager, - LinkageTable* linkings_to_do) { +static spv_result_t GetImportExportPairs( + const MessageConsumer& consumer, const ir::IRContext& linked_context, + const DefUseManager& def_use_manager, + const DecorationManager& decoration_manager, bool allow_partial_linkage, + LinkageTable* linkings_to_do) { spv_position_t position = {}; if (linkings_to_do == nullptr) @@ -491,7 +514,7 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, std::unordered_map> exports; // Figure out the imports and exports - for (const auto& decoration : linked_module.annotations()) { + for (const auto& decoration : linked_context.annotations()) { if (decoration.opcode() != SpvOpDecorate || decoration.GetSingleWordInOperand(1u) != SpvDecorationLinkageAttributes) continue; @@ -499,14 +522,16 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, const SpvId id = decoration.GetSingleWordInOperand(0u); // Ignore if the targeted symbol is a built-in bool is_built_in = false; - for (const auto& id_decoration : decoration_manager.GetDecorationsFor(id, false)) { + for (const auto& id_decoration : + decoration_manager.GetDecorationsFor(id, false)) { if (id_decoration->GetSingleWordInOperand(1u) == SpvDecorationBuiltIn) { is_built_in = true; break; } } - if (is_built_in) + if (is_built_in) { continue; + } const uint32_t type = decoration.GetSingleWordInOperand(3u); @@ -532,8 +557,8 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, // range-based for loop calls begin()/end(), but never cbegin()/cend(), // which will not work here. - for (auto func_iter = linked_module.cbegin(); - func_iter != linked_module.cend(); ++func_iter) { + for (auto func_iter = linked_context.module()->cbegin(); + func_iter != linked_context.module()->cend(); ++func_iter) { if (func_iter->result_id() != id) continue; func_iter->ForEachParam([&symbol_info](const Instruction* inst) { symbol_info.parameter_ids.push_back(inst->result_id()); @@ -557,17 +582,18 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, std::vector possible_exports; const auto& exp = exports.find(import.name); if (exp != exports.end()) possible_exports = exp->second; - if (possible_exports.empty()) + if (possible_exports.empty() && !allow_partial_linkage) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) - << "No export linkage was found for \"" << import.name << "\"."; + << "Unresolved external reference to \"" << import.name << "\"."; else if (possible_exports.size() > 1u) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) - << "Too many export linkages, " << possible_exports.size() + << "Too many external references, " << possible_exports.size() << ", were found for \"" << import.name << "\"."; - linkings_to_do->emplace_back(import, possible_exports.front()); + if (!possible_exports.empty()) + linkings_to_do->emplace_back(import, possible_exports.front()); } return SPV_SUCCESS; @@ -575,19 +601,22 @@ static spv_result_t GetImportExportPairs(const MessageConsumer& consumer, static spv_result_t CheckImportExportCompatibility( const MessageConsumer& consumer, const LinkageTable& linkings_to_do, - const DefUseManager& def_use_manager, - const DecorationManager& decoration_manager) { + ir::IRContext* context) { spv_position_t position = {}; // Ensure th import and export types are the same. + const DefUseManager& def_use_manager = *context->get_def_use_mgr(); + const DecorationManager& decoration_manager = *context->get_decoration_mgr(); for (const auto& linking_entry : linkings_to_do) { if (!RemoveDuplicatesPass::AreTypesEqual( *def_use_manager.GetDef(linking_entry.imported_symbol.type_id), *def_use_manager.GetDef(linking_entry.exported_symbol.type_id), - def_use_manager, decoration_manager)) + context)) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) - << "Type mismatch between imported variable/function %" + << "Type mismatch on symbol \"" + << linking_entry.imported_symbol.name + << "\" between imported variable/function %" << linking_entry.imported_symbol.id << " and exported variable/function %" << linking_entry.exported_symbol.id << "."; @@ -599,51 +628,42 @@ static spv_result_t CheckImportExportCompatibility( linking_entry.imported_symbol.id, linking_entry.exported_symbol.id)) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_BINARY) - << "Decorations mismatch between imported variable/function %" + << "Decorations mismatch on symbol \"" + << linking_entry.imported_symbol.name + << "\" between imported variable/function %" << linking_entry.imported_symbol.id << " and exported variable/function %" << linking_entry.exported_symbol.id << "."; // TODO(pierremoreau): Decorations on function parameters should probably // match, except for FuncParamAttr if I understand the - // spec correctly, which makes the code more - // complicated. - // for (uint32_t i = 0u; i < - // linking_entry.imported_symbol.parameter_ids.size(); ++i) - // if - // (!decoration_manager.HaveTheSameDecorations(linking_entry.imported_symbol.parameter_ids[i], - // linking_entry.exported_symbol.parameter_ids[i])) - // return libspirv::DiagnosticStream(position, - // impl_->context->consumer, - // SPV_ERROR_INVALID_BINARY) - // << "Decorations mismatch between imported function %" << - // linking_entry.imported_symbol.id << "'s" - // << " and exported function %" << - // linking_entry.exported_symbol.id << "'s " << (i + 1u) << - // "th parameter."; + // spec correctly. + // TODO(pierremoreau): Decorations on the function return type should + // match, except for FuncParamAttr. } return SPV_SUCCESS; } static spv_result_t RemoveLinkageSpecificInstructions( - const MessageConsumer& consumer, bool create_executable, + const MessageConsumer& consumer, const LinkerOptions& options, const LinkageTable& linkings_to_do, DecorationManager* decoration_manager, - Module* linked_module) { + ir::IRContext* linked_context) { spv_position_t position = {}; if (decoration_manager == nullptr) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_DATA) << "|decoration_manager| of RemoveLinkageSpecificInstructions " - "should " - "not " - "be empty."; - if (linked_module == nullptr) + "should not be empty."; + if (linked_context == nullptr) return libspirv::DiagnosticStream(position, consumer, SPV_ERROR_INVALID_DATA) << "|linked_module| of RemoveLinkageSpecificInstructions should not " "be empty."; + // TODO(pierremoreau): Remove FuncParamAttr decorations of imported + // functions' return type. + // Remove FuncParamAttr decorations of imported functions' parameters. // From the SPIR-V specification, Sec. 2.13: // When resolving imported functions, the Function Control and all Function @@ -652,26 +672,20 @@ static spv_result_t RemoveLinkageSpecificInstructions( for (const auto& linking_entry : linkings_to_do) { for (const auto parameter_id : linking_entry.imported_symbol.parameter_ids) { - for (ir::Instruction* decoration : - decoration_manager->GetDecorationsFor(parameter_id, false)) { - switch (decoration->opcode()) { - case SpvOpDecorate: - case SpvOpMemberDecorate: - if (decoration->GetSingleWordInOperand(1u) == - SpvDecorationFuncParamAttr) - decoration->ToNop(); - break; - default: - break; - } - } + decoration_manager->RemoveDecorationsFrom( + parameter_id, [](const Instruction& inst) { + return (inst.opcode() == SpvOpDecorate || + inst.opcode() == SpvOpMemberDecorate) && + inst.GetSingleWordInOperand(1u) == + SpvDecorationFuncParamAttr; + }); } } // Remove prototypes of imported functions for (const auto& linking_entry : linkings_to_do) { - for (auto func_iter = linked_module->begin(); - func_iter != linked_module->end();) { + for (auto func_iter = linked_context->module()->begin(); + func_iter != linked_context->module()->end();) { if (func_iter->result_id() == linking_entry.imported_symbol.id) func_iter = func_iter.Erase(); else @@ -681,29 +695,68 @@ static spv_result_t RemoveLinkageSpecificInstructions( // Remove declarations of imported variables for (const auto& linking_entry : linkings_to_do) { - for (auto& inst : linked_module->types_values()) - if (inst.result_id() == linking_entry.imported_symbol.id) inst.ToNop(); + auto next = linked_context->types_values_begin(); + for (auto inst = next; inst != linked_context->types_values_end(); + inst = next) { + ++next; + if (inst->result_id() == linking_entry.imported_symbol.id) { + linked_context->KillInst(&*inst); + } + } + } + + // If partial linkage is allowed, we need an efficient way to check whether + // an imported ID had a corresponding export symbol. As uses of the imported + // symbol have already been replaced by the exported symbol, use the exported + // symbol ID. + // TODO(pierremoreau): This will not work if the decoration is applied + // through a group, but the linker does not support that + // either. + std::unordered_set imports; + if (options.GetAllowPartialLinkage()) { + imports.reserve(linkings_to_do.size()); + for (const auto& linking_entry : linkings_to_do) + imports.emplace(linking_entry.exported_symbol.id); } // Remove import linkage attributes - for (auto& inst : linked_module->annotations()) - if (inst.opcode() == SpvOpDecorate && - inst.GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && - inst.GetSingleWordOperand(3u) == SpvLinkageTypeImport) - inst.ToNop(); - - // Remove export linkage attributes and Linkage capability if making an - // executable - if (create_executable) { - for (auto& inst : linked_module->annotations()) - if (inst.opcode() == SpvOpDecorate && - inst.GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && - inst.GetSingleWordOperand(3u) == SpvLinkageTypeExport) - inst.ToNop(); - - for (auto& inst : linked_module->capabilities()) + auto next = linked_context->annotation_begin(); + for (auto inst = next; inst != linked_context->annotation_end(); + inst = next) { + ++next; + // If this is an import annotation: + // * if we do not allow partial linkage, remove all import annotations; + // * otherwise, remove the annotation only if there was a corresponding + // export. + if (inst->opcode() == SpvOpDecorate && + inst->GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && + inst->GetSingleWordOperand(3u) == SpvLinkageTypeImport && + (!options.GetAllowPartialLinkage() || + imports.find(inst->GetSingleWordOperand(0u)) != imports.end())) { + linked_context->KillInst(&*inst); + } + } + + // Remove export linkage attributes if making an executable + if (!options.GetCreateLibrary()) { + next = linked_context->annotation_begin(); + for (auto inst = next; inst != linked_context->annotation_end(); + inst = next) { + ++next; + if (inst->opcode() == SpvOpDecorate && + inst->GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && + inst->GetSingleWordOperand(3u) == SpvLinkageTypeExport) { + linked_context->KillInst(&*inst); + } + } + } + + // Remove Linkage capability if making an executable and partial linkage is + // not allowed + if (!options.GetCreateLibrary() && !options.GetAllowPartialLinkage()) { + for (auto& inst : linked_context->capabilities()) if (inst.GetSingleWordInOperand(0u) == SpvCapabilityLinkage) { - inst.ToNop(); + linked_context->KillInst(&inst); // The RemoveDuplicatesPass did remove duplicated capabilities, so we // now there aren’t more SpvCapabilityLinkage further down. break; @@ -713,4 +766,21 @@ static spv_result_t RemoveLinkageSpecificInstructions( return SPV_SUCCESS; } +spv_result_t VerifyIds(const MessageConsumer& consumer, + ir::IRContext* linked_context) { + std::unordered_set ids; + bool ok = true; + linked_context->module()->ForEachInst( + [&ids, &ok](const ir::Instruction* inst) { + ok &= ids.insert(inst->unique_id()).second; + }); + + if (!ok) { + consumer(SPV_MSG_INTERNAL_ERROR, "", {}, "Non-unique id in merged module"); + return SPV_ERROR_INVALID_ID; + } + + return SPV_SUCCESS; +} + } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.cpp index 1accc9439ec3a8c673d3d57dfc077afb03dc7d92..a8b5a7c90fdea2220b384638a45504914950eea3 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.cpp @@ -14,8 +14,8 @@ #include "name_mapper.h" -#include #include +#include #include #include #include @@ -23,8 +23,8 @@ #include #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" #include "parsed_operand.h" namespace { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.h b/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.h index 12078b66806862a91ade2b42adef78920f759d59..8afac42417e5f77d1b77cc344af5cb0b688fc253 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/name_mapper.h @@ -20,8 +20,8 @@ #include #include -#include "spirv-tools/libspirv.h" #include "assembly_grammar.h" +#include "spirv-tools/libspirv.h" namespace libspirv { @@ -41,7 +41,8 @@ NameMapper GetTrivialNameMapper(); // - If an Id has a debug name (via OpName), then that will be used when // possible. // - Well known scalar types map to friendly names. For example, -// OpTypeVoid should be %void. Scalar types map to their names in OpenCL when +// OpTypeVoid should be %void. Scalar types map to their names in OpenCL +// when // there is a correspondence, and otherwise as follows: // - unsigned integer type of n bits map to "u" followed by n // - signed integer type of n bits map to "i" followed by n diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.cpp index 9bb8cb736c6e08d05b49af49de4242c721812aec..98c4bb9c89eebaf1f3b16b0d1702e161f0e3b7bb 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.cpp @@ -25,6 +25,7 @@ #include "spirv-tools/libspirv.h" #include "spirv_constant.h" #include "spirv_endian.h" +#include "spirv_target_env.h" namespace { struct OpcodeDescPtrLen { @@ -32,13 +33,10 @@ struct OpcodeDescPtrLen { uint32_t len; }; -OpcodeDescPtrLen getOpcodeTableEntries_1_2() { - static const spv_opcode_desc_t opcodeTableEntries_1_2[] = { -#include "core.insts-1.2.inc" - }; +#include "core.insts-unified1.inc" // defines kOpcodeTableEntries_1_3 - return {opcodeTableEntries_1_2, ARRAY_SIZE(opcodeTableEntries_1_2)}; -} +static const spv_opcode_table_t kOpcodeTable = {ARRAY_SIZE(kOpcodeTableEntries), + kOpcodeTableEntries}; // Represents a vendor tool entry in the SPIR-V XML Regsitry. struct VendorTool { @@ -78,51 +76,18 @@ void spvOpcodeSplit(const uint32_t word, uint16_t* pWordCount, } } -spv_result_t spvOpcodeTableGet(spv_opcode_table* pInstTable, - spv_target_env env) { +spv_result_t spvOpcodeTableGet(spv_opcode_table* pInstTable, spv_target_env) { if (!pInstTable) return SPV_ERROR_INVALID_POINTER; // Descriptions of each opcode. Each entry describes the format of the // instruction that follows a particular opcode. - static const spv_opcode_desc_t opcodeTableEntries_1_0[] = { -#include "core.insts-1.0.inc" - }; - static const spv_opcode_desc_t opcodeTableEntries_1_1[] = { -#include "core.insts-1.1.inc" - }; - const auto ptr_len = getOpcodeTableEntries_1_2(); - - static const spv_opcode_table_t table_1_0 = { - ARRAY_SIZE(opcodeTableEntries_1_0), opcodeTableEntries_1_0}; - static const spv_opcode_table_t table_1_1 = { - ARRAY_SIZE(opcodeTableEntries_1_1), opcodeTableEntries_1_1}; - static const spv_opcode_table_t table_1_2 = {ptr_len.len, ptr_len.ptr}; - - switch (env) { - case SPV_ENV_UNIVERSAL_1_0: - case SPV_ENV_VULKAN_1_0: - case SPV_ENV_OPENCL_2_1: - case SPV_ENV_OPENGL_4_0: - case SPV_ENV_OPENGL_4_1: - case SPV_ENV_OPENGL_4_2: - case SPV_ENV_OPENGL_4_3: - case SPV_ENV_OPENGL_4_5: - *pInstTable = &table_1_0; - return SPV_SUCCESS; - case SPV_ENV_UNIVERSAL_1_1: - *pInstTable = &table_1_1; - return SPV_SUCCESS; - case SPV_ENV_UNIVERSAL_1_2: - case SPV_ENV_OPENCL_2_2: - *pInstTable = &table_1_2; - return SPV_SUCCESS; - } - assert(0 && "Unknown spv_target_env in spvOpcodeTableGet()"); - return SPV_ERROR_INVALID_TABLE; + *pInstTable = &kOpcodeTable; + return SPV_SUCCESS; } -spv_result_t spvOpcodeTableNameLookup(const spv_opcode_table table, +spv_result_t spvOpcodeTableNameLookup(spv_target_env env, + const spv_opcode_table table, const char* name, spv_opcode_desc* pEntry) { if (!name || !pEntry) return SPV_ERROR_INVALID_POINTER; @@ -130,14 +95,24 @@ spv_result_t spvOpcodeTableNameLookup(const spv_opcode_table table, // TODO: This lookup of the Opcode table is suboptimal! Binary sort would be // preferable but the table requires sorting on the Opcode name, but it's - // static - // const initialized and matches the order of the spec. + // static const initialized and matches the order of the spec. const size_t nameLength = strlen(name); for (uint64_t opcodeIndex = 0; opcodeIndex < table->count; ++opcodeIndex) { - if (nameLength == strlen(table->entries[opcodeIndex].name) && - !strncmp(name, table->entries[opcodeIndex].name, nameLength)) { + const spv_opcode_desc_t& entry = table->entries[opcodeIndex]; + // We considers the current opcode as available as long as + // 1. The target environment satisfies the minimal requirement of the + // opcode; or + // 2. There is at least one extension enabling this opcode. + // + // Note that the second rule assumes the extension enabling this instruction + // is indeed requested in the SPIR-V code; checking that should be + // validator's work. + if ((spvVersionForTargetEnv(env) >= entry.minVersion || + entry.numExtensions > 0u) && + nameLength == strlen(entry.name) && + !strncmp(name, entry.name, nameLength)) { // NOTE: Found out Opcode! - *pEntry = &table->entries[opcodeIndex]; + *pEntry = &entry; return SPV_SUCCESS; } } @@ -145,17 +120,41 @@ spv_result_t spvOpcodeTableNameLookup(const spv_opcode_table table, return SPV_ERROR_INVALID_LOOKUP; } -spv_result_t spvOpcodeTableValueLookup(const spv_opcode_table table, +spv_result_t spvOpcodeTableValueLookup(spv_target_env env, + const spv_opcode_table table, const SpvOp opcode, spv_opcode_desc* pEntry) { if (!table) return SPV_ERROR_INVALID_TABLE; if (!pEntry) return SPV_ERROR_INVALID_POINTER; - // TODO: As above this lookup is not optimal. - for (uint64_t opcodeIndex = 0; opcodeIndex < table->count; ++opcodeIndex) { - if (opcode == table->entries[opcodeIndex].opcode) { - // NOTE: Found the Opcode! - *pEntry = &table->entries[opcodeIndex]; + const auto beg = table->entries; + const auto end = table->entries + table->count; + + spv_opcode_desc_t needle = {"", opcode, 0, nullptr, 0, {}, + false, false, 0, nullptr, ~0u}; + + auto comp = [](const spv_opcode_desc_t& lhs, const spv_opcode_desc_t& rhs) { + return lhs.opcode < rhs.opcode; + }; + + // We need to loop here because there can exist multiple symbols for the same + // opcode value, and they can be introduced in different target environments, + // which means they can have different minimal version requirements. + // Assumes the underlying table is already sorted ascendingly according to + // opcode value. + for (auto it = std::lower_bound(beg, end, needle, comp); + it != end && it->opcode == opcode; ++it) { + // We considers the current opcode as available as long as + // 1. The target environment satisfies the minimal requirement of the + // opcode; or + // 2. There is at least one extension enabling this opcode. + // + // Note that the second rule assumes the extension enabling this instruction + // is indeed requested in the SPIR-V code; checking that should be + // validator's work. + if (spvVersionForTargetEnv(env) >= it->minVersion || + it->numExtensions > 0u) { + *pEntry = it; return SPV_SUCCESS; } } @@ -181,12 +180,16 @@ void spvInstructionCopy(const uint32_t* words, const SpvOp opcode, } const char* spvOpcodeString(const SpvOp opcode) { - // Use the latest SPIR-V version, which should be backward-compatible with all - // previous ones. - const auto entries = getOpcodeTableEntries_1_2(); - - for (uint32_t i = 0; i < entries.len; ++i) { - if (entries.ptr[i].opcode == opcode) return entries.ptr[i].name; + const auto beg = kOpcodeTableEntries; + const auto end = kOpcodeTableEntries + ARRAY_SIZE(kOpcodeTableEntries); + spv_opcode_desc_t needle = {"", opcode, 0, nullptr, 0, {}, + false, false, 0, nullptr, ~0u}; + auto comp = [](const spv_opcode_desc_t& lhs, const spv_opcode_desc_t& rhs) { + return lhs.opcode < rhs.opcode; + }; + auto it = std::lower_bound(beg, end, needle, comp); + if (it != end && it->opcode == opcode) { + return it->name; } assert(0 && "Unreachable!"); @@ -204,6 +207,19 @@ int32_t spvOpcodeIsScalarType(const SpvOp opcode) { } } +int32_t spvOpcodeIsSpecConstant(const SpvOp opcode) { + switch (opcode) { + case SpvOpSpecConstantTrue: + case SpvOpSpecConstantFalse: + case SpvOpSpecConstant: + case SpvOpSpecConstantComposite: + case SpvOpSpecConstantOp: + return true; + default: + return false; + } +} + int32_t spvOpcodeIsConstant(const SpvOp opcode) { switch (opcode) { case SpvOpConstantTrue: @@ -317,3 +333,166 @@ int32_t spvOpcodeGeneratesType(SpvOp op) { } return 0; } + +bool spvOpcodeIsDecoration(const SpvOp opcode) { + switch (opcode) { + case SpvOpDecorate: + case SpvOpDecorateId: + case SpvOpMemberDecorate: + case SpvOpGroupDecorate: + case SpvOpGroupMemberDecorate: + case SpvOpDecorateStringGOOGLE: + case SpvOpMemberDecorateStringGOOGLE: + return true; + default: + break; + } + return false; +} + +bool spvOpcodeIsLoad(const SpvOp opcode) { + switch (opcode) { + case SpvOpLoad: + case SpvOpImageSampleExplicitLod: + case SpvOpImageSampleImplicitLod: + case SpvOpImageSampleDrefImplicitLod: + case SpvOpImageSampleDrefExplicitLod: + case SpvOpImageSampleProjImplicitLod: + case SpvOpImageSampleProjExplicitLod: + case SpvOpImageSampleProjDrefImplicitLod: + case SpvOpImageSampleProjDrefExplicitLod: + case SpvOpImageFetch: + case SpvOpImageGather: + case SpvOpImageDrefGather: + case SpvOpImageRead: + case SpvOpImageSparseSampleImplicitLod: + case SpvOpImageSparseSampleExplicitLod: + case SpvOpImageSparseSampleDrefExplicitLod: + case SpvOpImageSparseSampleDrefImplicitLod: + case SpvOpImageSparseFetch: + case SpvOpImageSparseGather: + case SpvOpImageSparseDrefGather: + case SpvOpImageSparseRead: + return true; + default: + return false; + } +} + +bool spvOpcodeIsBranch(SpvOp opcode) { + switch (opcode) { + case SpvOpBranch: + case SpvOpBranchConditional: + case SpvOpSwitch: + return true; + default: + return false; + } +} + +bool spvOpcodeIsAtomicOp(const SpvOp opcode) { + switch (opcode) { + case SpvOpAtomicLoad: + case SpvOpAtomicStore: + case SpvOpAtomicExchange: + case SpvOpAtomicCompareExchange: + case SpvOpAtomicCompareExchangeWeak: + case SpvOpAtomicIIncrement: + case SpvOpAtomicIDecrement: + case SpvOpAtomicIAdd: + case SpvOpAtomicISub: + case SpvOpAtomicSMin: + case SpvOpAtomicUMin: + case SpvOpAtomicSMax: + case SpvOpAtomicUMax: + case SpvOpAtomicAnd: + case SpvOpAtomicOr: + case SpvOpAtomicXor: + case SpvOpAtomicFlagTestAndSet: + case SpvOpAtomicFlagClear: + return true; + default: + return false; + } +} + +bool spvOpcodeIsReturn(SpvOp opcode) { + switch (opcode) { + case SpvOpReturn: + case SpvOpReturnValue: + return true; + default: + return false; + } +} + +bool spvOpcodeIsReturnOrAbort(SpvOp opcode) { + return spvOpcodeIsReturn(opcode) || opcode == SpvOpKill || + opcode == SpvOpUnreachable; +} + +bool spvOpcodeIsBlockTerminator(SpvOp opcode) { + return spvOpcodeIsBranch(opcode) || spvOpcodeIsReturnOrAbort(opcode); +} + +bool spvOpcodeIsBaseOpaqueType(SpvOp opcode) { + switch (opcode) { + case SpvOpTypeImage: + case SpvOpTypeSampler: + case SpvOpTypeSampledImage: + case SpvOpTypeOpaque: + case SpvOpTypeEvent: + case SpvOpTypeDeviceEvent: + case SpvOpTypeReserveId: + case SpvOpTypeQueue: + case SpvOpTypePipe: + case SpvOpTypeForwardPointer: + case SpvOpTypePipeStorage: + case SpvOpTypeNamedBarrier: + return true; + default: + return false; + } +} + +bool spvOpcodeIsNonUniformGroupOperation(SpvOp opcode) { + switch (opcode) { + case SpvOpGroupNonUniformElect: + case SpvOpGroupNonUniformAll: + case SpvOpGroupNonUniformAny: + case SpvOpGroupNonUniformAllEqual: + case SpvOpGroupNonUniformBroadcast: + case SpvOpGroupNonUniformBroadcastFirst: + case SpvOpGroupNonUniformBallot: + case SpvOpGroupNonUniformInverseBallot: + case SpvOpGroupNonUniformBallotBitExtract: + case SpvOpGroupNonUniformBallotBitCount: + case SpvOpGroupNonUniformBallotFindLSB: + case SpvOpGroupNonUniformBallotFindMSB: + case SpvOpGroupNonUniformShuffle: + case SpvOpGroupNonUniformShuffleXor: + case SpvOpGroupNonUniformShuffleUp: + case SpvOpGroupNonUniformShuffleDown: + case SpvOpGroupNonUniformIAdd: + case SpvOpGroupNonUniformFAdd: + case SpvOpGroupNonUniformIMul: + case SpvOpGroupNonUniformFMul: + case SpvOpGroupNonUniformSMin: + case SpvOpGroupNonUniformUMin: + case SpvOpGroupNonUniformFMin: + case SpvOpGroupNonUniformSMax: + case SpvOpGroupNonUniformUMax: + case SpvOpGroupNonUniformFMax: + case SpvOpGroupNonUniformBitwiseAnd: + case SpvOpGroupNonUniformBitwiseOr: + case SpvOpGroupNonUniformBitwiseXor: + case SpvOpGroupNonUniformLogicalAnd: + case SpvOpGroupNonUniformLogicalOr: + case SpvOpGroupNonUniformLogicalXor: + case SpvOpGroupNonUniformQuadBroadcast: + case SpvOpGroupNonUniformQuadSwap: + return true; + default: + return false; + } +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.h index 4e06efdf2bafdef343fdfb4dd263877f0094183d..7aadf30cefa3b4f3a6d9513c563278c011be278b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opcode.h @@ -16,8 +16,8 @@ #define LIBSPIRV_OPCODE_H_ #include "instruction.h" +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" #include "table.h" // Returns the name of a registered SPIR-V generator as a null-terminated @@ -37,12 +37,14 @@ void spvOpcodeSplit(const uint32_t word, uint16_t* word_count, // Finds the named opcode in the given opcode table. On success, returns // SPV_SUCCESS and writes a handle of the table entry into *entry. -spv_result_t spvOpcodeTableNameLookup(const spv_opcode_table table, +spv_result_t spvOpcodeTableNameLookup(spv_target_env, + const spv_opcode_table table, const char* name, spv_opcode_desc* entry); // Finds the opcode by enumerant in the given opcode table. On success, returns // SPV_SUCCESS and writes a handle of the table entry into *entry. -spv_result_t spvOpcodeTableValueLookup(const spv_opcode_table table, +spv_result_t spvOpcodeTableValueLookup(spv_target_env, + const spv_opcode_table table, const SpvOp opcode, spv_opcode_desc* entry); @@ -61,6 +63,10 @@ const char* spvOpcodeString(const SpvOp opcode); // non-zero otherwise. int32_t spvOpcodeIsScalarType(const SpvOp opcode); +// Determines if the given opcode is a specialization constant. Returns zero if +// false, non-zero otherwise. +int32_t spvOpcodeIsSpecConstant(const SpvOp opcode); + // Determines if the given opcode is a constant. Returns zero if false, non-zero // otherwise. int32_t spvOpcodeIsConstant(const SpvOp opcode); @@ -87,4 +93,32 @@ bool spvOpcodeReturnsLogicalVariablePointer(const SpvOp opcode); // non-zero otherwise. int32_t spvOpcodeGeneratesType(SpvOp opcode); +// Returns true if the opcode adds a decoration to an id. +bool spvOpcodeIsDecoration(const SpvOp opcode); + +// Returns true if the opcode is a load from memory into a result id. This +// function only considers core instructions. +bool spvOpcodeIsLoad(const SpvOp opcode); + +// Returns true if the opcode is an atomic operation. +bool spvOpcodeIsAtomicOp(const SpvOp opcode); + +// Returns true if the given opcode is a branch instruction. +bool spvOpcodeIsBranch(SpvOp opcode); + +// Returns true if the given opcode is a return instruction. +bool spvOpcodeIsReturn(SpvOp opcode); + +// Returns true if the given opcode is a return instruction or it aborts +// execution. +bool spvOpcodeIsReturnOrAbort(SpvOp opcode); + +// Returns true if the given opcode is a basic block terminator. +bool spvOpcodeIsBlockTerminator(SpvOp opcode); + +// Returns true if the given opcode always defines an opaque type. +bool spvOpcodeIsBaseOpaqueType(SpvOp opcode); + +// Returns true if the given opcode is a non-uniform group operation. +bool spvOpcodeIsNonUniformGroupOperation(SpvOp opcode); #endif // LIBSPIRV_OPCODE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/operand.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/operand.cpp index 3176eb7d0044875b953c873ef1e82d808fcc51be..4a2a2d6c00b3ac6e0d9d3f25ae9335bb4b433d24 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/operand.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/operand.cpp @@ -19,51 +19,30 @@ #include #include "macro.h" +#include "spirv_constant.h" +#include "spirv_target_env.h" + +// For now, assume unified1 contains up to SPIR-V 1.3 and no later +// SPIR-V version. +// TODO(dneto): Make one set of tables, but with version tags on a +// per-item basis. https://github.com/KhronosGroup/SPIRV-Tools/issues/1195 + +#include "operand.kinds-unified1.inc" + +static const spv_operand_table_t kOperandTable = { + ARRAY_SIZE(pygen_variable_OperandInfoTable), + pygen_variable_OperandInfoTable}; spv_result_t spvOperandTableGet(spv_operand_table* pOperandTable, - spv_target_env env) { + spv_target_env) { if (!pOperandTable) return SPV_ERROR_INVALID_POINTER; -#include "operand.kinds-1.0.inc" -#include "operand.kinds-1.1.inc" -#include "operand.kinds-1.2.inc" - - static const spv_operand_table_t table_1_0 = { - ARRAY_SIZE(pygen_variable_OperandInfoTable_1_0), - pygen_variable_OperandInfoTable_1_0}; - static const spv_operand_table_t table_1_1 = { - ARRAY_SIZE(pygen_variable_OperandInfoTable_1_1), - pygen_variable_OperandInfoTable_1_1}; - static const spv_operand_table_t table_1_2 = { - ARRAY_SIZE(pygen_variable_OperandInfoTable_1_2), - pygen_variable_OperandInfoTable_1_2}; - - switch (env) { - case SPV_ENV_UNIVERSAL_1_0: - case SPV_ENV_VULKAN_1_0: - case SPV_ENV_OPENCL_2_1: - case SPV_ENV_OPENGL_4_0: - case SPV_ENV_OPENGL_4_1: - case SPV_ENV_OPENGL_4_2: - case SPV_ENV_OPENGL_4_3: - case SPV_ENV_OPENGL_4_5: - *pOperandTable = &table_1_0; - return SPV_SUCCESS; - case SPV_ENV_UNIVERSAL_1_1: - *pOperandTable = &table_1_1; - return SPV_SUCCESS; - case SPV_ENV_UNIVERSAL_1_2: - case SPV_ENV_OPENCL_2_2: - *pOperandTable = &table_1_2; - return SPV_SUCCESS; - } - assert(0 && "Unknown spv_target_env in spvOperandTableGet()"); - return SPV_ERROR_INVALID_TABLE; + *pOperandTable = &kOperandTable; + return SPV_SUCCESS; } -#undef ARRAY_SIZE - -spv_result_t spvOperandTableNameLookup(const spv_operand_table table, +spv_result_t spvOperandTableNameLookup(spv_target_env env, + const spv_operand_table table, const spv_operand_type_t type, const char* name, const size_t nameLength, @@ -76,7 +55,17 @@ spv_result_t spvOperandTableNameLookup(const spv_operand_table table, if (type != group.type) continue; for (uint64_t index = 0; index < group.count; ++index) { const auto& entry = group.entries[index]; - if (nameLength == strlen(entry.name) && + // We considers the current operand as available as long as + // 1. The target environment satisfies the minimal requirement of the + // operand; or + // 2. There is at least one extension enabling this operand. + // + // Note that the second rule assumes the extension enabling this operand + // is indeed requested in the SPIR-V code; checking that should be + // validator's work. + if ((spvVersionForTargetEnv(env) >= entry.minVersion || + entry.numExtensions > 0u) && + nameLength == strlen(entry.name) && !strncmp(entry.name, name, nameLength)) { *pEntry = &entry; return SPV_SUCCESS; @@ -87,20 +76,50 @@ spv_result_t spvOperandTableNameLookup(const spv_operand_table table, return SPV_ERROR_INVALID_LOOKUP; } -spv_result_t spvOperandTableValueLookup(const spv_operand_table table, +spv_result_t spvOperandTableValueLookup(spv_target_env env, + const spv_operand_table table, const spv_operand_type_t type, const uint32_t value, spv_operand_desc* pEntry) { if (!table) return SPV_ERROR_INVALID_TABLE; if (!pEntry) return SPV_ERROR_INVALID_POINTER; + spv_operand_desc_t needle = {"", value, 0, nullptr, 0, nullptr, {}, ~0u}; + + auto comp = [](const spv_operand_desc_t& lhs, const spv_operand_desc_t& rhs) { + return lhs.value < rhs.value; + }; + for (uint64_t typeIndex = 0; typeIndex < table->count; ++typeIndex) { const auto& group = table->types[typeIndex]; if (type != group.type) continue; - for (uint64_t index = 0; index < group.count; ++index) { - const auto& entry = group.entries[index]; - if (value == entry.value) { - *pEntry = &entry; + + const auto beg = group.entries; + const auto end = group.entries + group.count; + + // We need to loop here because there can exist multiple symbols for the + // same operand value, and they can be introduced in different target + // environments, which means they can have different minimal version + // requirements. For example, SubgroupEqMaskKHR can exist in any SPIR-V + // version as long as the SPV_KHR_shader_ballot extension is there; but + // starting from SPIR-V 1.3, SubgroupEqMask, which has the same numeric + // value as SubgroupEqMaskKHR, is available in core SPIR-V without extension + // requirements. + // Assumes the underlying table is already sorted ascendingly according to + // opcode value. + for (auto it = std::lower_bound(beg, end, needle, comp); + it != end && it->value == value; ++it) { + // We considers the current operand as available as long as + // 1. The target environment satisfies the minimal requirement of the + // operand; or + // 2. There is at least one extension enabling this operand. + // + // Note that the second rule assumes the extension enabling this operand + // is indeed requested in the SPIR-V code; checking that should be + // validator's work. + if (spvVersionForTargetEnv(env) >= it->minVersion || + it->numExtensions > 0u) { + *pEntry = it; return SPV_SUCCESS; } } @@ -194,6 +213,16 @@ const char* spvOperandTypeStr(spv_operand_type_t type) { return "image"; case SPV_OPERAND_TYPE_OPTIONAL_CIV: return "context-insensitive value"; + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: + return "debug info flags"; + case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING: + return "debug base type encoding"; + case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE: + return "debug composite type"; + case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER: + return "debug type qualifier"; + case SPV_OPERAND_TYPE_DEBUG_OPERATION: + return "debug operation"; // The next values are for values returned from an instruction, not actually // an operand. So the specific strings don't matter. But let's add them @@ -222,7 +251,8 @@ void spvPushOperandTypes(const spv_operand_type_t* types, } } -void spvPushOperandTypesForMask(const spv_operand_table operandTable, +void spvPushOperandTypesForMask(spv_target_env env, + const spv_operand_table operandTable, const spv_operand_type_t type, const uint32_t mask, spv_operand_pattern_t* pattern) { @@ -232,7 +262,7 @@ void spvPushOperandTypesForMask(const spv_operand_table operandTable, candidate_bit >>= 1) { if (candidate_bit & mask) { spv_operand_desc entry = nullptr; - if (SPV_SUCCESS == spvOperandTableValueLookup(operandTable, type, + if (SPV_SUCCESS == spvOperandTableValueLookup(env, operandTable, type, candidate_bit, &entry)) { spvPushOperandTypes(entry->operandTypes, pattern); } @@ -240,9 +270,63 @@ void spvPushOperandTypesForMask(const spv_operand_table operandTable, } } +bool spvOperandIsConcrete(spv_operand_type_t type) { + if (spvIsIdType(type) || spvOperandIsConcreteMask(type)) { + return true; + } + switch (type) { + case SPV_OPERAND_TYPE_LITERAL_INTEGER: + case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: + case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: + case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: + case SPV_OPERAND_TYPE_LITERAL_STRING: + case SPV_OPERAND_TYPE_SOURCE_LANGUAGE: + case SPV_OPERAND_TYPE_EXECUTION_MODEL: + case SPV_OPERAND_TYPE_ADDRESSING_MODEL: + case SPV_OPERAND_TYPE_MEMORY_MODEL: + case SPV_OPERAND_TYPE_EXECUTION_MODE: + case SPV_OPERAND_TYPE_STORAGE_CLASS: + case SPV_OPERAND_TYPE_DIMENSIONALITY: + case SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE: + case SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE: + case SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT: + case SPV_OPERAND_TYPE_IMAGE_CHANNEL_ORDER: + case SPV_OPERAND_TYPE_IMAGE_CHANNEL_DATA_TYPE: + case SPV_OPERAND_TYPE_FP_ROUNDING_MODE: + case SPV_OPERAND_TYPE_LINKAGE_TYPE: + case SPV_OPERAND_TYPE_ACCESS_QUALIFIER: + case SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE: + case SPV_OPERAND_TYPE_DECORATION: + case SPV_OPERAND_TYPE_BUILT_IN: + case SPV_OPERAND_TYPE_GROUP_OPERATION: + case SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS: + case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO: + case SPV_OPERAND_TYPE_CAPABILITY: + case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING: + case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE: + case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER: + case SPV_OPERAND_TYPE_DEBUG_OPERATION: + return true; + default: + break; + } + return false; +} + bool spvOperandIsConcreteMask(spv_operand_type_t type) { - return SPV_OPERAND_TYPE_FIRST_CONCRETE_MASK_TYPE <= type && - type <= SPV_OPERAND_TYPE_LAST_CONCRETE_MASK_TYPE; + switch (type) { + case SPV_OPERAND_TYPE_IMAGE: + case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE: + case SPV_OPERAND_TYPE_SELECTION_CONTROL: + case SPV_OPERAND_TYPE_LOOP_CONTROL: + case SPV_OPERAND_TYPE_FUNCTION_CONTROL: + case SPV_OPERAND_TYPE_MEMORY_ACCESS: + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: + return true; + default: + break; + } + return false; } bool spvOperandIsOptional(spv_operand_type_t type) { @@ -335,6 +419,9 @@ std::function spvOperandCanBeForwardDeclaredFunction( case SpvOpSelectionMerge: case SpvOpDecorate: case SpvOpMemberDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + case SpvOpMemberDecorateStringGOOGLE: case SpvOpTypeStruct: case SpvOpBranch: case SpvOpLoopMerge: diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/operand.h b/sources/third_party/shaderc/third_party/spirv-tools/source/operand.h index 42099930bc0a3a3632c31d53531274d58a086f1d..984a62328914e42a14d5373e8e29178df2a36e65 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/operand.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/operand.h @@ -38,7 +38,8 @@ using spv_operand_pattern_t = std::vector; // Finds the named operand in the table. The type parameter specifies the // operand's group. A handle of the operand table entry for this operand will // be written into *entry. -spv_result_t spvOperandTableNameLookup(const spv_operand_table table, +spv_result_t spvOperandTableNameLookup(spv_target_env, + const spv_operand_table table, const spv_operand_type_t type, const char* name, const size_t name_length, @@ -47,7 +48,8 @@ spv_result_t spvOperandTableNameLookup(const spv_operand_table table, // Finds the operand with value in the table. The type parameter specifies the // operand's group. A handle of the operand table entry for this operand will // be written into *entry. -spv_result_t spvOperandTableValueLookup(const spv_operand_table table, +spv_result_t spvOperandTableValueLookup(spv_target_env, + const spv_operand_table table, const spv_operand_type_t type, const uint32_t value, spv_operand_desc* entry); @@ -55,7 +57,10 @@ spv_result_t spvOperandTableValueLookup(const spv_operand_table table, // Gets the name string of the non-variable operand type. const char* spvOperandTypeStr(spv_operand_type_t type); -// Returns true if the given type is a concrete and also a mask. +// Returns true if the given type is concrete. +bool spvOperandIsConcrete(spv_operand_type_t type); + +// Returns true if the given type is concrete and also a mask. bool spvOperandIsConcreteMask(spv_operand_type_t type); // Returns true if an operand of the given type is optional. @@ -82,7 +87,8 @@ void spvPushOperandTypes(const spv_operand_type_t* types, // appear after operands for a more significant bit. // // If a set bit is unknown, then we assume it has no operands. -void spvPushOperandTypesForMask(const spv_operand_table operand_table, +void spvPushOperandTypesForMask(spv_target_env, + const spv_operand_table operand_table, const spv_operand_type_t mask_type, const uint32_t mask, spv_operand_pattern_t* pattern); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp index 355865f56e23b0b91bdb6e5e52c671db5f0e4078..4b304fa6962e778c1a4601a9055a7287fca9bbd9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2017 The Khronos Group Inc. // Copyright (c) 2017 Valve Corporation // Copyright (c) 2017 LunarG Inc. +// Copyright (c) 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +17,12 @@ #include "aggressive_dead_code_elim_pass.h" +#include "cfa.h" #include "iterator.h" -#include "spirv/1.0/GLSL.std.450.h" +#include "latest_version_glsl_std_450_header.h" +#include "reflect.h" + +#include namespace spvtools { namespace opt { @@ -25,147 +30,337 @@ namespace opt { namespace { const uint32_t kTypePointerStorageClassInIdx = 0; -const uint32_t kExtInstSetIdInIndx = 0; -const uint32_t kExtInstInstructionInIndx = 1; const uint32_t kEntryPointFunctionIdInIdx = 1; +const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; +const uint32_t kLoopMergeMergeBlockIdInIdx = 0; +const uint32_t kLoopMergeContinueBlockIdInIdx = 1; -} // namespace anonymous +// Sorting functor to present annotation instructions in an easy-to-process +// order. The functor orders by opcode first and falls back on unique id +// ordering if both instructions have the same opcode. +// +// Desired priority: +// SpvOpGroupDecorate +// SpvOpGroupMemberDecorate +// SpvOpDecorate +// SpvOpMemberDecorate +// SpvOpDecorateId +// SpvOpDecorateStringGOOGLE +// SpvOpDecorationGroup +struct DecorationLess { + bool operator()(const ir::Instruction* lhs, + const ir::Instruction* rhs) const { + assert(lhs && rhs); + SpvOp lhsOp = lhs->opcode(); + SpvOp rhsOp = rhs->opcode(); + if (lhsOp != rhsOp) { +#define PRIORITY_CASE(opcode) \ + if (lhsOp == opcode && rhsOp != opcode) return true; \ + if (rhsOp == opcode && lhsOp != opcode) return false; + // OpGroupDecorate and OpGroupMember decorate are highest priority to + // eliminate dead targets early and simplify subsequent checks. + PRIORITY_CASE(SpvOpGroupDecorate) + PRIORITY_CASE(SpvOpGroupMemberDecorate) + PRIORITY_CASE(SpvOpDecorate) + PRIORITY_CASE(SpvOpMemberDecorate) + PRIORITY_CASE(SpvOpDecorateId) + PRIORITY_CASE(SpvOpDecorateStringGOOGLE) + // OpDecorationGroup is lowest priority to ensure use/def chains remain + // usable for instructions that target this group. + PRIORITY_CASE(SpvOpDecorationGroup) +#undef PRIORITY_CASE + } + + // Fall back to maintain total ordering (compare unique ids). + return *lhs < *rhs; + } +}; -bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, - uint32_t storageClass) { - const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); +} // namespace + +bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { + if (varId == 0) return false; + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(varId); const SpvOp op = varInst->opcode(); - if (op != SpvOpVariable) - return false; + if (op != SpvOpVariable) return false; const uint32_t varTypeId = varInst->type_id(); - const ir::Instruction* varTypeInst = def_use_mgr_->GetDef(varTypeId); - if (varTypeInst->opcode() != SpvOpTypePointer) - return false; + const ir::Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); + if (varTypeInst->opcode() != SpvOpTypePointer) return false; return varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) == - storageClass; + storageClass; } bool AggressiveDCEPass::IsLocalVar(uint32_t varId) { - return IsVarOfStorage(varId, SpvStorageClassFunction) || - (IsVarOfStorage(varId, SpvStorageClassPrivate) && private_like_local_); + return IsVarOfStorage(varId, SpvStorageClassFunction) || + (IsVarOfStorage(varId, SpvStorageClassPrivate) && private_like_local_); } void AggressiveDCEPass::AddStores(uint32_t ptrId) { - const analysis::UseList* uses = def_use_mgr_->GetUses(ptrId); - if (uses == nullptr) - return; - for (const auto u : *uses) { - const SpvOp op = u.inst->opcode(); - switch (op) { + get_def_use_mgr()->ForEachUser(ptrId, [this](ir::Instruction* user) { + switch (user->opcode()) { case SpvOpAccessChain: case SpvOpInBoundsAccessChain: - case SpvOpCopyObject: { - AddStores(u.inst->result_id()); - } break; + case SpvOpCopyObject: + this->AddStores(user->result_id()); + break; case SpvOpLoad: break; - // If default, assume it stores eg frexp, modf, function call + // If default, assume it stores e.g. frexp, modf, function call case SpvOpStore: - default: { - if (live_insts_.find(u.inst) == live_insts_.end()) - worklist_.push(u.inst); - } break; + default: + AddToWorklist(user); + break; } - } -} - -bool AggressiveDCEPass::IsCombinator(uint32_t op) const { - return combinator_ops_shader_.find(op) != combinator_ops_shader_.end(); -} - -bool AggressiveDCEPass::IsCombinatorExt(ir::Instruction* inst) const { - assert(inst->opcode() == SpvOpExtInst); - if (inst->GetSingleWordInOperand(kExtInstSetIdInIndx) == glsl_std_450_id_) { - uint32_t op = inst->GetSingleWordInOperand(kExtInstInstructionInIndx); - return combinator_ops_glsl_std_450_.find(op) != - combinator_ops_glsl_std_450_.end(); - } - else - return false; + }); } bool AggressiveDCEPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } return true; } -bool AggressiveDCEPass::KillInstIfTargetDead(ir::Instruction* inst) { +bool AggressiveDCEPass::IsDead(ir::Instruction* inst) { + if (IsLive(inst)) return false; + if (inst->IsBranch() && !IsStructuredHeader(context()->get_instr_block(inst), + nullptr, nullptr, nullptr)) + return false; + return true; +} + +bool AggressiveDCEPass::IsTargetDead(ir::Instruction* inst) { const uint32_t tId = inst->GetSingleWordInOperand(0); - const ir::Instruction* tInst = def_use_mgr_->GetDef(tId); - if (dead_insts_.find(tInst) != dead_insts_.end()) { - def_use_mgr_->KillInst(inst); - return true; + ir::Instruction* tInst = get_def_use_mgr()->GetDef(tId); + if (ir::IsAnnotationInst(tInst->opcode())) { + // This must be a decoration group. We go through annotations in a specific + // order. So if this is not used by any group or group member decorates, it + // is dead. + assert(tInst->opcode() == SpvOpDecorationGroup); + bool dead = true; + get_def_use_mgr()->ForEachUser(tInst, [&dead](ir::Instruction* user) { + if (user->opcode() == SpvOpGroupDecorate || + user->opcode() == SpvOpGroupMemberDecorate) + dead = false; + }); + return dead; } - return false; + return IsDead(tInst); } void AggressiveDCEPass::ProcessLoad(uint32_t varId) { // Only process locals - if (!IsLocalVar(varId)) - return; + if (!IsLocalVar(varId)) return; // Return if already processed - if (live_local_vars_.find(varId) != live_local_vars_.end()) - return; + if (live_local_vars_.find(varId) != live_local_vars_.end()) return; // Mark all stores to varId as live AddStores(varId); // Cache varId as processed live_local_vars_.insert(varId); } +bool AggressiveDCEPass::IsStructuredHeader(ir::BasicBlock* bp, + ir::Instruction** mergeInst, + ir::Instruction** branchInst, + uint32_t* mergeBlockId) { + if (!bp) return false; + ir::Instruction* mi = bp->GetMergeInst(); + if (mi == nullptr) return false; + ir::Instruction* bri = &*bp->tail(); + if (branchInst != nullptr) *branchInst = bri; + if (mergeInst != nullptr) *mergeInst = mi; + if (mergeBlockId != nullptr) *mergeBlockId = mi->GetSingleWordInOperand(0); + return true; +} + +void AggressiveDCEPass::ComputeBlock2HeaderMaps( + std::list& structuredOrder) { + block2headerBranch_.clear(); + branch2merge_.clear(); + structured_order_index_.clear(); + std::stack currentHeaderBranch; + currentHeaderBranch.push(nullptr); + uint32_t currentMergeBlockId = 0; + uint32_t index = 0; + for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); + ++bi, ++index) { + structured_order_index_[*bi] = index; + // If this block is the merge block of the current control construct, + // we are leaving the current construct so we must update state + if ((*bi)->id() == currentMergeBlockId) { + currentHeaderBranch.pop(); + ir::Instruction* chb = currentHeaderBranch.top(); + if (chb != nullptr) + currentMergeBlockId = branch2merge_[chb]->GetSingleWordInOperand(0); + } + ir::Instruction* mergeInst; + ir::Instruction* branchInst; + uint32_t mergeBlockId; + bool is_header = + IsStructuredHeader(*bi, &mergeInst, &branchInst, &mergeBlockId); + // If this is a loop header, update state first so the block will map to + // the loop. + if (is_header && mergeInst->opcode() == SpvOpLoopMerge) { + currentHeaderBranch.push(branchInst); + branch2merge_[branchInst] = mergeInst; + currentMergeBlockId = mergeBlockId; + } + // Map the block to the current construct. + block2headerBranch_[*bi] = currentHeaderBranch.top(); + // If this is an if header, update state so following blocks map to the if. + if (is_header && mergeInst->opcode() == SpvOpSelectionMerge) { + currentHeaderBranch.push(branchInst); + branch2merge_[branchInst] = mergeInst; + currentMergeBlockId = mergeBlockId; + } + } +} + +void AggressiveDCEPass::AddBranch(uint32_t labelId, ir::BasicBlock* bp) { + std::unique_ptr newBranch(new ir::Instruction( + context(), SpvOpBranch, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}})); + get_def_use_mgr()->AnalyzeInstDefUse(&*newBranch); + bp->AddInstruction(std::move(newBranch)); +} + +void AggressiveDCEPass::AddBreaksAndContinuesToWorklist( + ir::Instruction* loopMerge) { + ir::BasicBlock* header = context()->get_instr_block(loopMerge); + uint32_t headerIndex = structured_order_index_[header]; + const uint32_t mergeId = + loopMerge->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); + ir::BasicBlock* merge = context()->get_instr_block(mergeId); + uint32_t mergeIndex = structured_order_index_[merge]; + get_def_use_mgr()->ForEachUser( + mergeId, [headerIndex, mergeIndex, this](ir::Instruction* user) { + if (!user->IsBranch()) return; + ir::BasicBlock* block = context()->get_instr_block(user); + uint32_t index = structured_order_index_[block]; + if (headerIndex < index && index < mergeIndex) { + // This is a break from the loop. + AddToWorklist(user); + // Add branch's merge if there is one. + ir::Instruction* userMerge = branch2merge_[user]; + if (userMerge != nullptr) AddToWorklist(userMerge); + } + }); + const uint32_t contId = + loopMerge->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); + get_def_use_mgr()->ForEachUser(contId, [&contId, + this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (op == SpvOpBranchConditional || op == SpvOpSwitch) { + // A conditional branch or switch can only be a continue if it does not + // have a merge instruction or its merge block is not the continue block. + ir::Instruction* hdrMerge = branch2merge_[user]; + if (hdrMerge != nullptr && hdrMerge->opcode() == SpvOpSelectionMerge) { + uint32_t hdrMergeId = + hdrMerge->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); + if (hdrMergeId == contId) return; + // Need to mark merge instruction too + AddToWorklist(hdrMerge); + } + } else if (op == SpvOpBranch) { + // An unconditional branch can only be a continue if it is not + // branching to its own merge block. + ir::BasicBlock* blk = context()->get_instr_block(user); + ir::Instruction* hdrBranch = block2headerBranch_[blk]; + if (hdrBranch == nullptr) return; + ir::Instruction* hdrMerge = branch2merge_[hdrBranch]; + if (hdrMerge->opcode() == SpvOpLoopMerge) return; + uint32_t hdrMergeId = + hdrMerge->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); + if (contId == hdrMergeId) return; + } else { + return; + } + AddToWorklist(user); + }); +} + bool AggressiveDCEPass::AggressiveDCE(ir::Function* func) { + // Mark function parameters as live. + AddToWorklist(&func->DefInst()); + func->ForEachParam( + [this](const ir::Instruction* param) { + AddToWorklist(const_cast(param)); + }, + false); + + // Compute map from block to controlling conditional branch + std::list structuredOrder; + cfg()->ComputeStructuredOrder(func, &*func->begin(), &structuredOrder); + ComputeBlock2HeaderMaps(structuredOrder); bool modified = false; - // Add all control flow and instructions with external side effects - // to worklist + // Add instructions with external side effects to worklist. Also add branches + // EXCEPT those immediately contained in an "if" selection construct or a loop + // or continue construct. // TODO(greg-lunarg): Handle Frexp, Modf more optimally call_in_func_ = false; func_is_entry_point_ = false; private_stores_.clear(); - for (auto& blk : *func) { - for (auto& inst : blk) { - uint32_t op = inst.opcode(); + // Stacks to keep track of when we are inside an if- or loop-construct. + // When immediately inside an if- or loop-construct, we do not initially + // mark branches live. All other branches must be marked live. + std::stack assume_branches_live; + std::stack currentMergeBlockId; + // Push sentinel values on stack for when outside of any control flow. + assume_branches_live.push(true); + currentMergeBlockId.push(0); + for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); ++bi) { + // If exiting if or loop, update stacks + if ((*bi)->id() == currentMergeBlockId.top()) { + assume_branches_live.pop(); + currentMergeBlockId.pop(); + } + for (auto ii = (*bi)->begin(); ii != (*bi)->end(); ++ii) { + SpvOp op = ii->opcode(); switch (op) { case SpvOpStore: { uint32_t varId; - (void) GetPtr(&inst, &varId); + (void)GetPtr(&*ii, &varId); // Mark stores as live if their variable is not function scope // and is not private scope. Remember private stores for possible // later inclusion if (IsVarOfStorage(varId, SpvStorageClassPrivate)) - private_stores_.push_back(&inst); + private_stores_.push_back(&*ii); else if (!IsVarOfStorage(varId, SpvStorageClassFunction)) - worklist_.push(&inst); + AddToWorklist(&*ii); } break; - case SpvOpExtInst: { - // eg. GLSL frexp, modf - if (!IsCombinatorExt(&inst)) - worklist_.push(&inst); + case SpvOpLoopMerge: { + assume_branches_live.push(false); + currentMergeBlockId.push( + ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx)); + } break; + case SpvOpSelectionMerge: { + assume_branches_live.push(false); + currentMergeBlockId.push( + ii->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx)); + } break; + case SpvOpSwitch: + case SpvOpBranch: + case SpvOpBranchConditional: { + if (assume_branches_live.top()) AddToWorklist(&*ii); } break; default: { - // eg. control flow, function call, atomics, function param, - // function return + // Function calls, atomics, function params, function returns, etc. // TODO(greg-lunarg): function calls live only if write to non-local - if (!IsCombinator(op)) - worklist_.push(&inst); + if (!context()->IsCombinatorInstruction(&*ii)) { + AddToWorklist(&*ii); + } // Remember function calls - if (op == SpvOpFunctionCall) - call_in_func_ = true; + if (op == SpvOpFunctionCall) call_in_func_ = true; } break; } } } // See if current function is an entry point - for (auto& ei : module_->entry_points()) { + for (auto& ei : get_module()->entry_points()) { if (ei.GetSingleWordInOperand(kEntryPointFunctionIdInIdx) == func->result_id()) { func_is_entry_point_ = true; @@ -177,30 +372,43 @@ bool AggressiveDCEPass::AggressiveDCE(ir::Function* func) { private_like_local_ = func_is_entry_point_ && !call_in_func_; // If privates are not like local, add their stores to worklist if (!private_like_local_) - for (auto& ps : private_stores_) - worklist_.push(ps); - // Add OpGroupDecorates to worklist because they are a pain to remove - // ids from. - // TODO(greg-lunarg): Handle dead ids in OpGroupDecorate - for (auto& ai : module_->annotations()) { - if (ai.opcode() == SpvOpGroupDecorate) - worklist_.push(&ai); - } - // Perform closure on live instruction set. + for (auto& ps : private_stores_) AddToWorklist(ps); + // Perform closure on live instruction set. while (!worklist_.empty()) { ir::Instruction* liveInst = worklist_.front(); - live_insts_.insert(liveInst); // Add all operand instructions if not already live - liveInst->ForEachInId([this](const uint32_t* iid) { - ir::Instruction* inInst = def_use_mgr_->GetDef(*iid); - if (live_insts_.find(inInst) == live_insts_.end()) - worklist_.push(inInst); + liveInst->ForEachInId([&liveInst, this](const uint32_t* iid) { + ir::Instruction* inInst = get_def_use_mgr()->GetDef(*iid); + // Do not add label if an operand of a branch. This is not needed + // as part of live code discovery and can create false live code, + // for example, the branch to a header of a loop. + if (inInst->opcode() == SpvOpLabel && liveInst->IsBranch()) return; + AddToWorklist(inInst); }); + if (liveInst->type_id() != 0) { + AddToWorklist(get_def_use_mgr()->GetDef(liveInst->type_id())); + } + // If in a structured if or loop construct, add the controlling + // conditional branch and its merge. Any containing control construct + // is marked live when the merge and branch are processed out of the + // worklist. + ir::BasicBlock* blk = context()->get_instr_block(liveInst); + ir::Instruction* branchInst = block2headerBranch_[blk]; + if (branchInst != nullptr) { + AddToWorklist(branchInst); + ir::Instruction* mergeInst = branch2merge_[branchInst]; + AddToWorklist(mergeInst); + // If in a loop, mark all its break and continue instructions live + if (mergeInst->opcode() == SpvOpLoopMerge) + AddBreaksAndContinuesToWorklist(mergeInst); + } // If local load, add all variable's stores if variable not already live if (liveInst->opcode() == SpvOpLoad) { uint32_t varId; - (void) GetPtr(liveInst, &varId); - ProcessLoad(varId); + (void)GetPtr(liveInst, &varId); + if (varId != 0) { + ProcessLoad(varId); + } } // If function call, treat as if it loads from all pointer arguments else if (liveInst->opcode() == SpvOpFunctionCall) { @@ -208,7 +416,7 @@ bool AggressiveDCEPass::AggressiveDCE(ir::Function* func) { // Skip non-ptr args if (!IsPtr(*iid)) return; uint32_t varId; - (void) GetPtr(*iid, &varId); + (void)GetPtr(*iid, &varId); ProcessLoad(varId); }); } @@ -216,345 +424,298 @@ bool AggressiveDCEPass::AggressiveDCE(ir::Function* func) { else if (liveInst->opcode() == SpvOpFunctionParameter) { ProcessLoad(liveInst->result_id()); } - worklist_.pop(); - } - // Mark all non-live instructions dead - for (auto& blk : *func) { - for (auto& inst : blk) { - if (live_insts_.find(&inst) != live_insts_.end()) - continue; - dead_insts_.insert(&inst); + // We treat an OpImageTexelPointer as a load of the pointer, and + // that value is manipulated to get the result. + else if (liveInst->opcode() == SpvOpImageTexelPointer) { + uint32_t varId; + (void)GetPtr(liveInst, &varId); + if (varId != 0) { + ProcessLoad(varId); + } } + worklist_.pop(); } - // Remove debug and annotation statements referencing dead instructions. - // This must be done before killing the instructions, otherwise there are - // dead objects in the def/use database. - for (auto& di : module_->debugs2()) { - if (di.opcode() != SpvOpName) - continue; - if (KillInstIfTargetDead(&di)) - modified = true; - } - for (auto& ai : module_->annotations()) { - if (ai.opcode() != SpvOpDecorate && ai.opcode() != SpvOpDecorateId) - continue; - if (KillInstIfTargetDead(&ai)) - modified = true; - } - // Kill dead instructions - for (auto& blk : *func) { - for (auto& inst : blk) { - if (dead_insts_.find(&inst) == dead_insts_.end()) - continue; - def_use_mgr_->KillInst(&inst); + + // Kill dead instructions and remember dead blocks + for (auto bi = structuredOrder.begin(); bi != structuredOrder.end();) { + uint32_t mergeBlockId = 0; + (*bi)->ForEachInst([this, &modified, &mergeBlockId](ir::Instruction* inst) { + if (!IsDead(inst)) return; + if (inst->opcode() == SpvOpLabel) return; + // If dead instruction is selection merge, remember merge block + // for new branch at end of block + if (inst->opcode() == SpvOpSelectionMerge || + inst->opcode() == SpvOpLoopMerge) + mergeBlockId = inst->GetSingleWordInOperand(0); + to_kill_.push_back(inst); modified = true; + }); + // If a structured if or loop was deleted, add a branch to its merge + // block, and traverse to the merge block and continue processing there. + // We know the block still exists because the label is not deleted. + if (mergeBlockId != 0) { + AddBranch(mergeBlockId, *bi); + for (++bi; (*bi)->id() != mergeBlockId; ++bi) { + } + } else { + ++bi; } } + return modified; } -void AggressiveDCEPass::Initialize(ir::Module* module) { - module_ = module; - - // Clear collections - worklist_ = std::queue{}; - live_insts_.clear(); - live_local_vars_.clear(); - dead_insts_.clear(); - combinator_ops_shader_.clear(); - combinator_ops_glsl_std_450_.clear(); - - // TODO(greg-lunarg): Reuse def/use from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); +void AggressiveDCEPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); // Initialize extensions whitelist InitExtensions(); } +void AggressiveDCEPass::InitializeModuleScopeLiveInstructions() { + // Keep all execution modes. + for (auto& exec : get_module()->execution_modes()) { + AddToWorklist(&exec); + } + // Keep all entry points. + for (auto& entry : get_module()->entry_points()) { + AddToWorklist(&entry); + } + // Keep workgroup size. + for (auto& anno : get_module()->annotations()) { + if (anno.opcode() == SpvOpDecorate) { + if (anno.GetSingleWordInOperand(1u) == SpvDecorationBuiltIn && + anno.GetSingleWordInOperand(2u) == SpvBuiltInWorkgroupSize) { + AddToWorklist(&anno); + } + } + } +} + Pass::Status AggressiveDCEPass::ProcessImpl() { - // Current functionality assumes shader capability + // Current functionality assumes shader capability // TODO(greg-lunarg): Handle additional capabilities - if (!module_->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) return Status::SuccessWithoutChange; - // Current functionality assumes logical addressing only + // Current functionality assumes relaxed logical addressing (see + // instruction.h) // TODO(greg-lunarg): Handle non-logical addressing - if (module_->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) return Status::SuccessWithoutChange; // If any extensions in the module are not explicitly supported, - // return unmodified. - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Initialize combinator whitelists - InitCombinatorSets(); - // Process all entry point functions - ProcessFunction pfn = [this](ir::Function* fp) { - return AggressiveDCE(fp); - }; - bool modified = ProcessEntryPointCallTree(pfn, module_); + // return unmodified. + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; + + // Eliminate Dead functions. + bool modified = EliminateDeadFunctions(); + + InitializeModuleScopeLiveInstructions(); + + // Process all entry point functions. + ProcessFunction pfn = [this](ir::Function* fp) { return AggressiveDCE(fp); }; + modified |= ProcessEntryPointCallTree(pfn, get_module()); + + // Process module-level instructions. Now that all live instructions have + // been marked, it is safe to remove dead global values. + modified |= ProcessGlobalValues(); + + // Kill all dead instructions. + for (auto inst : to_kill_) { + context()->KillInst(inst); + } + + // Cleanup all CFG including all unreachable blocks. + ProcessFunction cleanup = [this](ir::Function* f) { return CFGCleanup(f); }; + modified |= ProcessEntryPointCallTree(cleanup, get_module()); + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -AggressiveDCEPass::AggressiveDCEPass() {} +bool AggressiveDCEPass::EliminateDeadFunctions() { + // Identify live functions first. Those that are not live + // are dead. ADCE is disabled for non-shaders so we do not check for exported + // functions here. + std::unordered_set live_function_set; + ProcessFunction mark_live = [&live_function_set](ir::Function* fp) { + live_function_set.insert(fp); + return false; + }; + ProcessEntryPointCallTree(mark_live, get_module()); -Pass::Status AggressiveDCEPass::Process(ir::Module* module) { - Initialize(module); - return ProcessImpl(); + bool modified = false; + for (auto funcIter = get_module()->begin(); + funcIter != get_module()->end();) { + if (live_function_set.count(&*funcIter) == 0) { + modified = true; + EliminateFunction(&*funcIter); + funcIter = funcIter.Erase(); + } else { + ++funcIter; + } + } + + return modified; } -void AggressiveDCEPass::InitCombinatorSets() { - combinator_ops_shader_ = { - SpvOpNop, - SpvOpUndef, - SpvOpVariable, - SpvOpImageTexelPointer, - SpvOpLoad, - SpvOpAccessChain, - SpvOpInBoundsAccessChain, - SpvOpArrayLength, - SpvOpVectorExtractDynamic, - SpvOpVectorInsertDynamic, - SpvOpVectorShuffle, - SpvOpCompositeConstruct, - SpvOpCompositeExtract, - SpvOpCompositeInsert, - SpvOpCopyObject, - SpvOpTranspose, - SpvOpSampledImage, - SpvOpImageSampleImplicitLod, - SpvOpImageSampleExplicitLod, - SpvOpImageSampleDrefImplicitLod, - SpvOpImageSampleDrefExplicitLod, - SpvOpImageSampleProjImplicitLod, - SpvOpImageSampleProjExplicitLod, - SpvOpImageSampleProjDrefImplicitLod, - SpvOpImageSampleProjDrefExplicitLod, - SpvOpImageFetch, - SpvOpImageGather, - SpvOpImageDrefGather, - SpvOpImageRead, - SpvOpImage, - SpvOpConvertFToU, - SpvOpConvertFToS, - SpvOpConvertSToF, - SpvOpConvertUToF, - SpvOpUConvert, - SpvOpSConvert, - SpvOpFConvert, - SpvOpQuantizeToF16, - SpvOpBitcast, - SpvOpSNegate, - SpvOpFNegate, - SpvOpIAdd, - SpvOpFAdd, - SpvOpISub, - SpvOpFSub, - SpvOpIMul, - SpvOpFMul, - SpvOpUDiv, - SpvOpSDiv, - SpvOpFDiv, - SpvOpUMod, - SpvOpSRem, - SpvOpSMod, - SpvOpFRem, - SpvOpFMod, - SpvOpVectorTimesScalar, - SpvOpMatrixTimesScalar, - SpvOpVectorTimesMatrix, - SpvOpMatrixTimesVector, - SpvOpMatrixTimesMatrix, - SpvOpOuterProduct, - SpvOpDot, - SpvOpIAddCarry, - SpvOpISubBorrow, - SpvOpUMulExtended, - SpvOpSMulExtended, - SpvOpAny, - SpvOpAll, - SpvOpIsNan, - SpvOpIsInf, - SpvOpLogicalEqual, - SpvOpLogicalNotEqual, - SpvOpLogicalOr, - SpvOpLogicalAnd, - SpvOpLogicalNot, - SpvOpSelect, - SpvOpIEqual, - SpvOpINotEqual, - SpvOpUGreaterThan, - SpvOpSGreaterThan, - SpvOpUGreaterThanEqual, - SpvOpSGreaterThanEqual, - SpvOpULessThan, - SpvOpSLessThan, - SpvOpULessThanEqual, - SpvOpSLessThanEqual, - SpvOpFOrdEqual, - SpvOpFUnordEqual, - SpvOpFOrdNotEqual, - SpvOpFUnordNotEqual, - SpvOpFOrdLessThan, - SpvOpFUnordLessThan, - SpvOpFOrdGreaterThan, - SpvOpFUnordGreaterThan, - SpvOpFOrdLessThanEqual, - SpvOpFUnordLessThanEqual, - SpvOpFOrdGreaterThanEqual, - SpvOpFUnordGreaterThanEqual, - SpvOpShiftRightLogical, - SpvOpShiftRightArithmetic, - SpvOpShiftLeftLogical, - SpvOpBitwiseOr, - SpvOpBitwiseXor, - SpvOpBitwiseAnd, - SpvOpNot, - SpvOpBitFieldInsert, - SpvOpBitFieldSExtract, - SpvOpBitFieldUExtract, - SpvOpBitReverse, - SpvOpBitCount, - SpvOpDPdx, - SpvOpDPdy, - SpvOpFwidth, - SpvOpDPdxFine, - SpvOpDPdyFine, - SpvOpFwidthFine, - SpvOpDPdxCoarse, - SpvOpDPdyCoarse, - SpvOpFwidthCoarse, - SpvOpPhi, - SpvOpImageSparseSampleImplicitLod, - SpvOpImageSparseSampleExplicitLod, - SpvOpImageSparseSampleDrefImplicitLod, - SpvOpImageSparseSampleDrefExplicitLod, - SpvOpImageSparseSampleProjImplicitLod, - SpvOpImageSparseSampleProjExplicitLod, - SpvOpImageSparseSampleProjDrefImplicitLod, - SpvOpImageSparseSampleProjDrefExplicitLod, - SpvOpImageSparseFetch, - SpvOpImageSparseGather, - SpvOpImageSparseDrefGather, - SpvOpImageSparseTexelsResident, - SpvOpImageSparseRead, - SpvOpSizeOf - // TODO(dneto): Add instructions enabled by ImageQuery - }; +void AggressiveDCEPass::EliminateFunction(ir::Function* func) { + // Remove all of the instruction in the function body + func->ForEachInst( + [this](ir::Instruction* inst) { context()->KillInst(inst); }, true); +} - // Find supported extension instruction set ids - glsl_std_450_id_ = module_->GetExtInstImportId("GLSL.std.450"); - - combinator_ops_glsl_std_450_ = { - GLSLstd450Round, - GLSLstd450RoundEven, - GLSLstd450Trunc, - GLSLstd450FAbs, - GLSLstd450SAbs, - GLSLstd450FSign, - GLSLstd450SSign, - GLSLstd450Floor, - GLSLstd450Ceil, - GLSLstd450Fract, - GLSLstd450Radians, - GLSLstd450Degrees, - GLSLstd450Sin, - GLSLstd450Cos, - GLSLstd450Tan, - GLSLstd450Asin, - GLSLstd450Acos, - GLSLstd450Atan, - GLSLstd450Sinh, - GLSLstd450Cosh, - GLSLstd450Tanh, - GLSLstd450Asinh, - GLSLstd450Acosh, - GLSLstd450Atanh, - GLSLstd450Atan2, - GLSLstd450Pow, - GLSLstd450Exp, - GLSLstd450Log, - GLSLstd450Exp2, - GLSLstd450Log2, - GLSLstd450Sqrt, - GLSLstd450InverseSqrt, - GLSLstd450Determinant, - GLSLstd450MatrixInverse, - GLSLstd450ModfStruct, - GLSLstd450FMin, - GLSLstd450UMin, - GLSLstd450SMin, - GLSLstd450FMax, - GLSLstd450UMax, - GLSLstd450SMax, - GLSLstd450FClamp, - GLSLstd450UClamp, - GLSLstd450SClamp, - GLSLstd450FMix, - GLSLstd450IMix, - GLSLstd450Step, - GLSLstd450SmoothStep, - GLSLstd450Fma, - GLSLstd450FrexpStruct, - GLSLstd450Ldexp, - GLSLstd450PackSnorm4x8, - GLSLstd450PackUnorm4x8, - GLSLstd450PackSnorm2x16, - GLSLstd450PackUnorm2x16, - GLSLstd450PackHalf2x16, - GLSLstd450PackDouble2x32, - GLSLstd450UnpackSnorm2x16, - GLSLstd450UnpackUnorm2x16, - GLSLstd450UnpackHalf2x16, - GLSLstd450UnpackSnorm4x8, - GLSLstd450UnpackUnorm4x8, - GLSLstd450UnpackDouble2x32, - GLSLstd450Length, - GLSLstd450Distance, - GLSLstd450Cross, - GLSLstd450Normalize, - GLSLstd450FaceForward, - GLSLstd450Reflect, - GLSLstd450Refract, - GLSLstd450FindILsb, - GLSLstd450FindSMsb, - GLSLstd450FindUMsb, - GLSLstd450InterpolateAtCentroid, - GLSLstd450InterpolateAtSample, - GLSLstd450InterpolateAtOffset, - GLSLstd450NMin, - GLSLstd450NMax, - GLSLstd450NClamp - }; +bool AggressiveDCEPass::ProcessGlobalValues() { + // Remove debug and annotation statements referencing dead instructions. + // This must be done before killing the instructions, otherwise there are + // dead objects in the def/use database. + bool modified = false; + ir::Instruction* instruction = &*get_module()->debug2_begin(); + while (instruction) { + if (instruction->opcode() != SpvOpName) { + instruction = instruction->NextNode(); + continue; + } + + if (IsTargetDead(instruction)) { + instruction = context()->KillInst(instruction); + modified = true; + } else { + instruction = instruction->NextNode(); + } + } + + // This code removes all unnecessary decorations safely (see #1174). It also + // does so in a more efficient manner than deleting them only as the targets + // are deleted. + std::vector annotations; + for (auto& inst : get_module()->annotations()) annotations.push_back(&inst); + std::sort(annotations.begin(), annotations.end(), DecorationLess()); + for (auto annotation : annotations) { + switch (annotation->opcode()) { + case SpvOpDecorate: + case SpvOpMemberDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + if (IsTargetDead(annotation)) { + context()->KillInst(annotation); + modified = true; + } + break; + case SpvOpGroupDecorate: { + // Go through the targets of this group decorate. Remove each dead + // target. If all targets are dead, remove this decoration. + bool dead = true; + for (uint32_t i = 1; i < annotation->NumOperands();) { + ir::Instruction* opInst = + get_def_use_mgr()->GetDef(annotation->GetSingleWordOperand(i)); + if (IsDead(opInst)) { + // Don't increment |i|. + annotation->RemoveOperand(i); + modified = true; + } else { + i++; + dead = false; + } + } + if (dead) { + context()->KillInst(annotation); + modified = true; + } + break; + } + case SpvOpGroupMemberDecorate: { + // Go through the targets of this group member decorate. Remove each + // dead target (and member index). If all targets are dead, remove this + // decoration. + bool dead = true; + for (uint32_t i = 1; i < annotation->NumOperands();) { + ir::Instruction* opInst = + get_def_use_mgr()->GetDef(annotation->GetSingleWordOperand(i)); + if (IsDead(opInst)) { + // Don't increment |i|. + annotation->RemoveOperand(i + 1); + annotation->RemoveOperand(i); + modified = true; + } else { + i += 2; + dead = false; + } + } + if (dead) { + context()->KillInst(annotation); + modified = true; + } + break; + } + case SpvOpDecorationGroup: + // By the time we hit decoration groups we've checked everything that + // can target them. So if they have no uses they must be dead. + if (get_def_use_mgr()->NumUsers(annotation) == 0) { + context()->KillInst(annotation); + modified = true; + } + break; + default: + assert(false); + break; + } + } + + // Since ADCE is disabled for non-shaders, we don't check for export linkage + // attributes here. + for (auto& val : get_module()->types_values()) { + if (IsDead(&val)) { + to_kill_.push_back(&val); + } + } + + return modified; +} + +AggressiveDCEPass::AggressiveDCEPass() {} + +Pass::Status AggressiveDCEPass::Process(ir::IRContext* c) { + Initialize(c); + return ProcessImpl(); } void AggressiveDCEPass::InitExtensions() { extensions_whitelist_.clear(); extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", }); } } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h index 5495c364102c55943582cd2face9c23fabb423d9..aefdd70731b8ecdef36bd55192858d326f0e0b4d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h @@ -17,6 +17,7 @@ #ifndef LIBSPIRV_OPT_AGGRESSIVE_DCE_PASS_H_ #define LIBSPIRV_OPT_AGGRESSIVE_DCE_PASS_H_ +#include #include #include #include @@ -26,50 +27,60 @@ #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. class AggressiveDCEPass : public MemPass { - using cbb_ptr = const ir::BasicBlock*; public: - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; + using GetBlocksFunction = + std::function*(const ir::BasicBlock*)>; AggressiveDCEPass(); const char* name() const override { return "eliminate-dead-code-aggressive"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } private: - // Return true if |varId| is variable of |storageClass|. + // Return true if |varId| is a variable of |storageClass|. |varId| must either + // be 0 or the result of an instruction. bool IsVarOfStorage(uint32_t varId, uint32_t storageClass); // Return true if |varId| is variable of function storage class or is // private variable and privates can be optimized like locals (see - // privates_like_local_) + // privates_like_local_). bool IsLocalVar(uint32_t varId); - // Add all store instruction which use |ptrId|, directly or indirectly, - // to the live instruction worklist. - void AddStores(uint32_t ptrId); + // Return true if |inst| is marked live. + bool IsLive(const ir::Instruction* inst) const { + return live_insts_.Get(inst->unique_id()); + } - // Initialize combinator data structures - void InitCombinatorSets(); + // Returns true if |inst| is dead. + bool IsDead(ir::Instruction* inst); - // Return true if core operator |op| has no side-effects. Currently returns - // true only for shader capability operations. - // TODO(greg-lunarg): Add kernel and other operators - bool IsCombinator(uint32_t op) const; + // Adds entry points, execution modes and workgroup size decorations to the + // worklist for processing with the first function. + void InitializeModuleScopeLiveInstructions(); - // Return true if OpExtInst |inst| has no side-effects. Currently returns - // true only for std.GLSL.450 extensions - // TODO(greg-lunarg): Add support for other extensions - bool IsCombinatorExt(ir::Instruction* inst) const; + // Add |inst| to worklist_ and live_insts_. + void AddToWorklist(ir::Instruction* inst) { + if (!live_insts_.Set(inst->unique_id())) { + worklist_.push(inst); + } + } + + // Add all store instruction which use |ptrId|, directly or indirectly, + // to the live instruction worklist. + void AddStores(uint32_t ptrId); // Initialize extensions whitelist void InitExtensions(); @@ -77,25 +88,55 @@ class AggressiveDCEPass : public MemPass { // Return true if all extensions in this module are supported by this pass. bool AllExtensionsSupported() const; - // Kill debug or annotation |inst| if target operand is dead. Return true - // if inst killed. - bool KillInstIfTargetDead(ir::Instruction* inst); + // Returns true if the target of |inst| is dead. An instruction is dead if + // its result id is used in decoration or debug instructions only. |inst| is + // assumed to be OpName, OpMemberName or an annotation instruction. + bool IsTargetDead(ir::Instruction* inst); // If |varId| is local, mark all stores of varId as live. void ProcessLoad(uint32_t varId); + // If |bp| is structured header block, returns true and sets |mergeInst| to + // the merge instruction, |branchInst| to the branch and |mergeBlockId| to the + // merge block if they are not nullptr. Any of |mergeInst|, |branchInst| or + // |mergeBlockId| may be a null pointer. Returns false if |bp| is a null + // pointer. + bool IsStructuredHeader(ir::BasicBlock* bp, ir::Instruction** mergeInst, + ir::Instruction** branchInst, uint32_t* mergeBlockId); + + // Initialize block2headerBranch_ and branch2merge_ using |structuredOrder| + // to order blocks. + void ComputeBlock2HeaderMaps(std::list& structuredOrder); + + // Add branch to |labelId| to end of block |bp|. + void AddBranch(uint32_t labelId, ir::BasicBlock* bp); + + // Add all break and continue branches in the loop associated with + // |mergeInst| to worklist if not already live + void AddBreaksAndContinuesToWorklist(ir::Instruction* mergeInst); + + // Eliminates dead debug2 and annotation instructions. Marks dead globals for + // removal (e.g. types, constants and variables). + bool ProcessGlobalValues(); + + // Erases functions that are unreachable from the entry points of the module. + bool EliminateDeadFunctions(); + + // Removes |func| from the module and deletes all its instructions. + void EliminateFunction(ir::Function* func); + // For function |func|, mark all Stores to non-function-scope variables // and block terminating instructions as live. Recursively mark the values - // they use. When complete, delete any non-live instructions. Return true - // if the function has been modified. - // + // they use. When complete, mark any non-live instructions to be deleted. + // Returns true if the function has been modified. + // // Note: This function does not delete useless control structures. All // existing control structures will remain. This can leave not-insignificant // sequences of ultimately useless code. // TODO(): Remove useless control constructs. bool AggressiveDCE(ir::Function* func); - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); // True if current function has a call instruction contained in it @@ -114,39 +155,36 @@ class AggressiveDCEPass : public MemPass { // building up the live instructions set |live_insts_|. std::queue worklist_; + // Map from block to the branch instruction in the header of the most + // immediate controlling structured if or loop. A loop header block points + // to its own branch instruction. An if-selection block points to the branch + // of an enclosing construct's header, if one exists. + std::unordered_map block2headerBranch_; + + // Maps basic block to their index in the structured order traversal. + std::unordered_map structured_order_index_; + + // Map from branch to its associated merge instruction, if any + std::unordered_map branch2merge_; + // Store instructions to variables of private storage std::vector private_stores_; // Live Instructions - std::unordered_set live_insts_; + utils::BitVector live_insts_; // Live Local Variables std::unordered_set live_local_vars_; - // Dead instructions. Use for debug cleanup. - std::unordered_set dead_insts_; - - // Opcodes of shader capability core executable instructions - // without side-effect. This is a whitelist of operators - // that can safely be left unmarked as live at the beginning of - // aggressive DCE. - std::unordered_set combinator_ops_shader_; - - // Opcodes of GLSL_std_450 extension executable instructions - // without side-effect. This is a whitelist of operators - // that can safely be left unmarked as live at the beginning of - // aggressive DCE. - std::unordered_set combinator_ops_glsl_std_450_; + // List of instructions to delete. Deletion is delayed until debug and + // annotation instructions are processed. + std::vector to_kill_; // Extensions supported by this pass. std::unordered_set extensions_whitelist_; - - // Set id for glsl_std_450 extension instructions - uint32_t glsl_std_450_id_; }; } // namespace opt } // namespace spvtools #endif // LIBSPIRV_OPT_AGGRESSIVE_DCE_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.cpp index 5eef51e13b54671ceb2c58b7cb6d0044d29640ea..98b06958549cc798fc741eec4c1bec642a571364 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.cpp @@ -13,18 +13,33 @@ // limitations under the License. #include "basic_block.h" +#include "function.h" +#include "ir_context.h" +#include "module.h" +#include "reflect.h" #include "make_unique.h" +#include + namespace spvtools { namespace ir { -BasicBlock::BasicBlock(const BasicBlock& bb) - : function_(nullptr), - label_(MakeUnique(bb.GetLabelInst())), - insts_() { - for (auto& inst : bb.insts_) - AddInstruction(std::unique_ptr(inst.Clone())); +namespace { + +const uint32_t kLoopMergeContinueBlockIdInIdx = 1; +const uint32_t kLoopMergeMergeBlockIdInIdx = 0; +const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; + +} // namespace + +BasicBlock* BasicBlock::Clone(IRContext* context) const { + BasicBlock* clone = new BasicBlock( + std::unique_ptr(GetLabelInst()->Clone(context))); + for (const auto& inst : insts_) + // Use the incoming context + clone->AddInstruction(std::unique_ptr(inst.Clone(context))); + return clone; } const Instruction* BasicBlock::GetMergeInst() const { @@ -35,7 +50,7 @@ const Instruction* BasicBlock::GetMergeInst() const { if (iter != cbegin()) { --iter; const auto opcode = iter->opcode(); - if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { + if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { result = &*iter; } } @@ -50,7 +65,7 @@ Instruction* BasicBlock::GetMergeInst() { if (iter != begin()) { --iter; const auto opcode = iter->opcode(); - if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { + if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { result = &*iter; } } @@ -75,8 +90,16 @@ Instruction* BasicBlock::GetLoopMergeInst() { return nullptr; } +void BasicBlock::KillAllInsts(bool killLabel) { + ForEachInst([killLabel](ir::Instruction* ip) { + if (killLabel || ip->opcode() != SpvOpLabel) { + ip->context()->KillInst(ip); + } + }); +} + void BasicBlock::ForEachSuccessorLabel( - const std::function& f) { + const std::function& f) const { const auto br = &insts_.back(); switch (br->opcode()) { case SpvOpBranch: { @@ -95,19 +118,111 @@ void BasicBlock::ForEachSuccessorLabel( } } +void BasicBlock::ForEachSuccessorLabel( + const std::function& f) { + auto br = &insts_.back(); + switch (br->opcode()) { + case SpvOpBranch: { + uint32_t tmp_id = br->GetOperand(0).words[0]; + f(&tmp_id); + if (tmp_id != br->GetOperand(0).words[0]) br->SetOperand(0, {tmp_id}); + } break; + case SpvOpBranchConditional: + case SpvOpSwitch: { + bool is_first = true; + br->ForEachInId([&is_first, &f](uint32_t* idp) { + if (!is_first) f(idp); + is_first = false; + }); + } break; + default: + break; + } +} + +bool BasicBlock::IsSuccessor(const ir::BasicBlock* block) const { + uint32_t succId = block->id(); + bool isSuccessor = false; + ForEachSuccessorLabel([&isSuccessor, succId](const uint32_t label) { + if (label == succId) isSuccessor = true; + }); + return isSuccessor; +} + void BasicBlock::ForMergeAndContinueLabel( const std::function& f) { auto ii = insts_.end(); --ii; if (ii == insts_.begin()) return; --ii; - if (ii->opcode() == SpvOpSelectionMerge || - ii->opcode() == SpvOpLoopMerge) - ii->ForEachInId([&f](const uint32_t* idp) { - f(*idp); + if (ii->opcode() == SpvOpSelectionMerge || ii->opcode() == SpvOpLoopMerge) { + ii->ForEachInId([&f](const uint32_t* idp) { f(*idp); }); + } +} + +uint32_t BasicBlock::MergeBlockIdIfAny() const { + auto merge_ii = cend(); + --merge_ii; + uint32_t mbid = 0; + if (merge_ii != cbegin()) { + --merge_ii; + if (merge_ii->opcode() == SpvOpLoopMerge) { + mbid = merge_ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); + } else if (merge_ii->opcode() == SpvOpSelectionMerge) { + mbid = merge_ii->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); + } + } + + return mbid; +} + +uint32_t BasicBlock::ContinueBlockIdIfAny() const { + auto merge_ii = cend(); + --merge_ii; + uint32_t cbid = 0; + if (merge_ii != cbegin()) { + --merge_ii; + if (merge_ii->opcode() == SpvOpLoopMerge) { + cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); + } + } + return cbid; +} + +std::ostream& operator<<(std::ostream& str, const BasicBlock& block) { + str << block.PrettyPrint(); + return str; +} + +std::string BasicBlock::PrettyPrint(uint32_t options) const { + std::ostringstream str; + ForEachInst([&str, options](const ir::Instruction* inst) { + str << inst->PrettyPrint(options); + if (!IsTerminatorInst(inst->opcode())) { + str << std::endl; + } + }); + return str.str(); +} + +BasicBlock* BasicBlock::SplitBasicBlock(IRContext* context, uint32_t label_id, + iterator iter) { + assert(!insts_.empty()); + + BasicBlock* new_block = new BasicBlock(MakeUnique( + context, SpvOpLabel, 0, label_id, std::initializer_list{})); + + new_block->insts_.Splice(new_block->end(), &insts_, iter, end()); + new_block->SetParent(GetParent()); + + if (context->AreAnalysesValid(ir::IRContext::kAnalysisInstrToBlockMapping)) { + new_block->ForEachInst([new_block, context](ir::Instruction* inst) { + context->set_instr_block(inst, new_block); }); + } + + return new_block; } } // namespace ir } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.h index 969d0399ff2b997ffbfa0c3064dac5998c6865e6..d34b047d0180b32d6ba398ee8c27aedeeda128fe 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/basic_block.h @@ -19,7 +19,9 @@ #define LIBSPIRV_OPT_BASIC_BLOCK_H_ #include +#include #include +#include #include #include @@ -31,25 +33,34 @@ namespace spvtools { namespace ir { class Function; +class IRContext; // A SPIR-V basic block. class BasicBlock { public: using iterator = InstructionList::iterator; using const_iterator = InstructionList::const_iterator; + using reverse_iterator = std::reverse_iterator; + using const_reverse_iterator = + std::reverse_iterator; // Creates a basic block with the given starting |label|. inline explicit BasicBlock(std::unique_ptr label); - // Creates a basic block from the given basic block |bb|. + explicit BasicBlock(const BasicBlock& bb) = delete; + + // Creates a clone of the basic block in the given |context| // // The parent function will default to null and needs to be explicitly set by // the user. - explicit BasicBlock(const BasicBlock& bb); + BasicBlock* Clone(IRContext*) const; // Sets the enclosing function for this basic block. void SetParent(Function* function) { function_ = function; } + // Return the enclosing function + inline Function* GetParent() const { return function_; } + // Appends an instruction to this basic block. inline void AddInstruction(std::unique_ptr i); @@ -58,12 +69,13 @@ class BasicBlock { // The label starting this basic block. Instruction* GetLabelInst() { return label_.get(); } - const Instruction& GetLabelInst() const { return *label_; } + const Instruction* GetLabelInst() const { return label_.get(); } // Returns the merge instruction in this basic block, if it exists. // Otherwise return null. May be used whenever tail() can be used. const Instruction* GetMergeInst() const; Instruction* GetMergeInst(); + // Returns the OpLoopMerge instruciton in this basic block, if it exists. // Otherwise return null. May be used whenever tail() can be used. const Instruction* GetLoopMergeInst() const; @@ -74,9 +86,26 @@ class BasicBlock { iterator begin() { return insts_.begin(); } iterator end() { return insts_.end(); } + const_iterator begin() const { return insts_.cbegin(); } + const_iterator end() const { return insts_.cend(); } const_iterator cbegin() const { return insts_.cbegin(); } const_iterator cend() const { return insts_.cend(); } + reverse_iterator rbegin() { return reverse_iterator(end()); } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(cend()); + } + const_reverse_iterator rend() const { + return const_reverse_iterator(cbegin()); + } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(cend()); + } + const_reverse_iterator crend() const { + return const_reverse_iterator(cbegin()); + } + // Returns an iterator pointing to the last instruction. This may only // be used if this block has an instruction other than the OpLabel // that defines it. @@ -84,12 +113,16 @@ class BasicBlock { assert(!insts_.empty()); return --end(); } + // Returns a const iterator, but othewrise similar to tail(). const_iterator ctail() const { assert(!insts_.empty()); return --insts_.cend(); } + // Returns true if the basic block has at least one successor. + inline bool hasSuccessor() const { return ctail()->IsBranch(); } + // Runs the given function |f| on each instruction in this basic block, and // optionally on the debug line instructions that might precede them. inline void ForEachInst(const std::function& f, @@ -97,27 +130,84 @@ class BasicBlock { inline void ForEachInst(const std::function& f, bool run_on_debug_line_insts = false) const; + // Runs the given function |f| on each instruction in this basic block, and + // optionally on the debug line instructions that might precede them. If |f| + // returns false, iteration is terminated and this function returns false. + inline bool WhileEachInst(const std::function& f, + bool run_on_debug_line_insts = false); + inline bool WhileEachInst(const std::function& f, + bool run_on_debug_line_insts = false) const; + // Runs the given function |f| on each Phi instruction in this basic block, // and optionally on the debug line instructions that might precede them. inline void ForEachPhiInst(const std::function& f, bool run_on_debug_line_insts = false); + // Runs the given function |f| on each Phi instruction in this basic block, + // and optionally on the debug line instructions that might precede them. If + // |f| returns false, iteration is terminated and this function return false. + inline bool WhileEachPhiInst(const std::function& f, + bool run_on_debug_line_insts = false); + // Runs the given function |f| on each label id of each successor block - void ForEachSuccessorLabel(const std::function& f); + void ForEachSuccessorLabel( + const std::function& f) const; + + // Runs the given function |f| on each label id of each successor block. + // Modifying the pointed value will change the branch taken by the basic + // block. It is the caller responsibility to update or invalidate the CFG. + void ForEachSuccessorLabel(const std::function& f); + + // Returns true if |block| is a direct successor of |this|. + bool IsSuccessor(const ir::BasicBlock* block) const; // Runs the given function |f| on the merge and continue label, if any void ForMergeAndContinueLabel(const std::function& f); // Returns true if this basic block has any Phi instructions. bool HasPhiInstructions() { - int count = 0; - ForEachPhiInst([&count](ir::Instruction*) { - ++count; - return; - }); - return count > 0; + return !WhileEachPhiInst([](ir::Instruction*) { return false; }); } + // Return true if this block is a loop header block. + bool IsLoopHeader() const { return GetLoopMergeInst() != nullptr; } + + // Returns the ID of the merge block declared by a merge instruction in this + // block, if any. If none, returns zero. + uint32_t MergeBlockIdIfAny() const; + + // Returns the ID of the continue block declared by a merge instruction in + // this block, if any. If none, returns zero. + uint32_t ContinueBlockIdIfAny() const; + + // Returns the terminator instruction. Assumes the terminator exists. + Instruction* terminator() { return &*tail(); } + const Instruction* terminator() const { return &*ctail(); } + + // Returns true if this basic block exits this function and returns to its + // caller. + bool IsReturn() const { return ctail()->IsReturn(); } + + // Returns true if this basic block exits this function or aborts execution. + bool IsReturnOrAbort() const { return ctail()->IsReturnOrAbort(); } + + // Kill all instructions in this block. Whether or not to kill the label is + // indicated by |killLabel|. + void KillAllInsts(bool killLabel); + + // Splits this basic block into two. Returns a new basic block with label + // |labelId| containing the instructions from |iter| onwards. Instructions + // prior to |iter| remain in this basic block. + BasicBlock* SplitBasicBlock(IRContext* context, uint32_t label_id, + iterator iter); + + // Pretty-prints this basic block into a std::string by printing every + // instruction in it. + // + // |options| are the disassembly options. SPV_BINARY_TO_TEXT_OPTION_NO_HEADER + // is always added to |options|. + std::string PrettyPrint(uint32_t options = 0u) const; + private: // The enclosing function. Function* function_; @@ -127,41 +217,100 @@ class BasicBlock { InstructionList insts_; }; +// Pretty-prints |block| to |str|. Returns |str|. +std::ostream& operator<<(std::ostream& str, const BasicBlock& block); + inline BasicBlock::BasicBlock(std::unique_ptr label) : function_(nullptr), label_(std::move(label)) {} inline void BasicBlock::AddInstruction(std::unique_ptr i) { - insts_.push_back(i.release()); + insts_.push_back(std::move(i)); } inline void BasicBlock::AddInstructions(BasicBlock* bp) { auto bEnd = end(); - (void) bEnd.MoveBefore(&bp->insts_); + (void)bEnd.MoveBefore(&bp->insts_); +} + +inline bool BasicBlock::WhileEachInst( + const std::function& f, bool run_on_debug_line_insts) { + if (label_) { + if (!label_->WhileEachInst(f, run_on_debug_line_insts)) return false; + } + if (insts_.empty()) { + return true; + } + + Instruction* inst = &insts_.front(); + while (inst != nullptr) { + Instruction* next_instruction = inst->NextNode(); + if (!inst->WhileEachInst(f, run_on_debug_line_insts)) return false; + inst = next_instruction; + } + return true; +} + +inline bool BasicBlock::WhileEachInst( + const std::function& f, + bool run_on_debug_line_insts) const { + if (label_) { + if (!static_cast(label_.get()) + ->WhileEachInst(f, run_on_debug_line_insts)) + return false; + } + for (const auto& inst : insts_) { + if (!static_cast(&inst)->WhileEachInst( + f, run_on_debug_line_insts)) + return false; + } + return true; } inline void BasicBlock::ForEachInst(const std::function& f, bool run_on_debug_line_insts) { - if (label_) label_->ForEachInst(f, run_on_debug_line_insts); - for (auto& inst : insts_) inst.ForEachInst(f, run_on_debug_line_insts); + WhileEachInst( + [&f](Instruction* inst) { + f(inst); + return true; + }, + run_on_debug_line_insts); } inline void BasicBlock::ForEachInst( const std::function& f, bool run_on_debug_line_insts) const { - if (label_) - static_cast(label_.get()) - ->ForEachInst(f, run_on_debug_line_insts); - for (const auto& inst : insts_) - static_cast(&inst) - ->ForEachInst(f, run_on_debug_line_insts); + WhileEachInst( + [&f](const Instruction* inst) { + f(inst); + return true; + }, + run_on_debug_line_insts); +} + +inline bool BasicBlock::WhileEachPhiInst( + const std::function& f, bool run_on_debug_line_insts) { + if (insts_.empty()) { + return true; + } + + Instruction* inst = &insts_.front(); + while (inst != nullptr) { + Instruction* next_instruction = inst->NextNode(); + if (inst->opcode() != SpvOpPhi) break; + if (!inst->WhileEachInst(f, run_on_debug_line_insts)) return false; + inst = next_instruction; + } + return true; } inline void BasicBlock::ForEachPhiInst( const std::function& f, bool run_on_debug_line_insts) { - for (auto& inst : insts_) { - if (inst.opcode() != SpvOpPhi) break; - inst.ForEachInst(f, run_on_debug_line_insts); - } + WhileEachPhiInst( + [&f](Instruction* inst) { + f(inst); + return true; + }, + run_on_debug_line_insts); } } // namespace ir diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.cpp index 12c205f6655a1623a766bd0a7a0bb3a66a492fab..fb370d69046321bdb0536172d860ede17326a420 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.cpp @@ -16,62 +16,29 @@ #include "block_merge_pass.h" +#include "ir_context.h" #include "iterator.h" namespace spvtools { namespace opt { -bool BlockMergePass::IsLoopHeader(ir::BasicBlock* block_ptr) { - auto iItr = block_ptr->tail(); - if (iItr == block_ptr->begin()) - return false; - --iItr; - return iItr->opcode() == SpvOpLoopMerge; -} - -bool BlockMergePass::HasMultipleRefs(uint32_t labId) { - const analysis::UseList* uses = def_use_mgr_->GetUses(labId); - int rcnt = 0; - for (const auto u : *uses) { - // Don't count OpName - if (u.inst->opcode() == SpvOpName) - continue; - if (rcnt == 1) - return true; - ++rcnt; - } - return false; -} - void BlockMergePass::KillInstAndName(ir::Instruction* inst) { - const uint32_t id = inst->result_id(); - if (id != 0) { - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses != nullptr) - for (auto u : *uses) - if (u.inst->opcode() == SpvOpName) { - def_use_mgr_->KillInst(u.inst); - break; - } + std::vector to_kill; + get_def_use_mgr()->ForEachUser(inst, [&to_kill](ir::Instruction* user) { + if (user->opcode() == SpvOpName) { + to_kill.push_back(user); + } + }); + for (auto i : to_kill) { + context()->KillInst(i); } - def_use_mgr_->KillInst(inst); + context()->KillInst(inst); } bool BlockMergePass::MergeBlocks(ir::Function* func) { bool modified = false; - for (auto bi = func->begin(); bi != func->end(); ) { - // Do not merge loop header blocks, at least for now. - if (IsLoopHeader(&*bi)) { - ++bi; - continue; - } + for (auto bi = func->begin(); bi != func->end();) { // Find block with single successor which has no other predecessors. - // Continue and Merge blocks are currently ruled out as second blocks. - // Happily any such candidate blocks will have >1 uses due to their - // LoopMerge instruction. - // TODO(): Deal with phi instructions that reference the - // second block. Happily, these references currently inhibit - // the merge. auto ii = bi->end(); --ii; ir::Instruction* br = &*ii; @@ -79,99 +46,112 @@ bool BlockMergePass::MergeBlocks(ir::Function* func) { ++bi; continue; } - const uint32_t labId = br->GetSingleWordInOperand(0); - if (HasMultipleRefs(labId)) { + + const uint32_t lab_id = br->GetSingleWordInOperand(0); + if (cfg()->preds(lab_id).size() != 1) { + ++bi; + continue; + } + + bool pred_is_header = IsHeader(&*bi); + bool succ_is_header = IsHeader(lab_id); + if (pred_is_header && succ_is_header) { + // Cannot merge two headers together. + ++bi; + continue; + } + + bool pred_is_merge = IsMerge(&*bi); + bool succ_is_merge = IsMerge(lab_id); + if (pred_is_merge && succ_is_merge) { + // Cannot merge two merges together. ++bi; continue; } - // Merge blocks - def_use_mgr_->KillInst(br); + + ir::Instruction* merge_inst = bi->GetMergeInst(); + if (pred_is_header && lab_id != merge_inst->GetSingleWordInOperand(0u)) { + // If this is a header block and the successor is not its merge, we must + // be careful about which blocks we are willing to merge together. + // OpLoopMerge must be followed by a conditional or unconditional branch. + // The merge must be a loop merge because a selection merge cannot be + // followed by an unconditional branch. + ir::BasicBlock* succ_block = context()->get_instr_block(lab_id); + SpvOp succ_term_op = succ_block->terminator()->opcode(); + assert(merge_inst->opcode() == SpvOpLoopMerge); + if (succ_term_op != SpvOpBranch && + succ_term_op != SpvOpBranchConditional) { + ++bi; + continue; + } + } + + // Merge blocks. + context()->KillInst(br); auto sbi = bi; for (; sbi != func->end(); ++sbi) - if (sbi->id() == labId) - break; + if (sbi->id() == lab_id) break; // If bi is sbi's only predecessor, it dominates sbi and thus // sbi must follow bi in func's ordering. assert(sbi != func->end()); bi->AddInstructions(&*sbi); + if (merge_inst) { + if (pred_is_header && lab_id == merge_inst->GetSingleWordInOperand(0u)) { + // Merging the header and merge blocks, so remove the structured control + // flow declaration. + context()->KillInst(merge_inst); + } else { + // Move the merge instruction to just before the terminator. + merge_inst->InsertBefore(bi->terminator()); + } + } + context()->ReplaceAllUsesWith(lab_id, bi->id()); KillInstAndName(sbi->GetLabelInst()); - (void) sbi.Erase(); - // reprocess block + (void)sbi.Erase(); + // Reprocess block. modified = true; } return modified; } -void BlockMergePass::Initialize(ir::Module* module) { - - module_ = module; - - // TODO(greg-lunarg): Reuse def/use from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); +bool BlockMergePass::IsHeader(ir::BasicBlock* block) { + return block->GetMergeInst() != nullptr; +} - // Initialize extension whitelist - InitExtensions(); -}; +bool BlockMergePass::IsHeader(uint32_t id) { + return IsHeader(context()->get_instr_block(get_def_use_mgr()->GetDef(id))); +} -bool BlockMergePass::AllExtensionsSupported() const { - // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); - if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) +bool BlockMergePass::IsMerge(uint32_t id) { + return !get_def_use_mgr()->WhileEachUse(id, [](ir::Instruction* user, + uint32_t index) { + SpvOp op = user->opcode(); + if ((op == SpvOpLoopMerge || op == SpvOpSelectionMerge) && index == 0u) { return false; - } - return true; + } + return true; + }); } +bool BlockMergePass::IsMerge(ir::BasicBlock* block) { + return IsMerge(block->id()); +} + +void BlockMergePass::Initialize(ir::IRContext* c) { InitializeProcessing(c); } + Pass::Status BlockMergePass::ProcessImpl() { - // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; // Process all entry point functions. - ProcessFunction pfn = [this](ir::Function* fp) { - return MergeBlocks(fp); - }; - bool modified = ProcessEntryPointCallTree(pfn, module_); + ProcessFunction pfn = [this](ir::Function* fp) { return MergeBlocks(fp); }; + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -BlockMergePass::BlockMergePass() - : module_(nullptr), def_use_mgr_(nullptr) {} +BlockMergePass::BlockMergePass() {} -Pass::Status BlockMergePass::Process(ir::Module* module) { - Initialize(module); +Pass::Status BlockMergePass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } -void BlockMergePass::InitExtensions() { - extensions_whitelist_.clear(); - extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - "SPV_KHR_variable_pointers", - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - }); -} - } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.h index 25cfa5927f4776a7d66669c7eb0c385b729faf29..a56f245e1d5d35f5b0473af21ab0456c22e407b7 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/block_merge_pass.h @@ -26,6 +26,7 @@ #include "basic_block.h" #include "def_use_manager.h" +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -37,15 +38,9 @@ class BlockMergePass : public Pass { public: BlockMergePass(); const char* name() const override { return "merge-blocks"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; private: - // Return true if |block_ptr| is loop header block - bool IsLoopHeader(ir::BasicBlock* block_ptr); - - // Return true if |labId| has multiple refs. Do not count OpName. - bool HasMultipleRefs(uint32_t labId); - // Kill any OpName instruction referencing |inst|, then kill |inst|. void KillInstAndName(ir::Instruction* inst); @@ -53,27 +48,20 @@ class BlockMergePass : public Pass { // with no other predecessors. Merge these blocks into a single block. bool MergeBlocks(ir::Function* func); - // Initialize extensions whitelist - void InitExtensions(); + // Returns true if |block| (or |id|) contains a merge instruction. + bool IsHeader(ir::BasicBlock* block); + bool IsHeader(uint32_t id); - // Return true if all extensions in this module are allowed by this pass. - bool AllExtensionsSupported() const; + // Returns true if |block| (or |id|) is the merge target of a merge + // instruction. + bool IsMerge(ir::BasicBlock* block); + bool IsMerge(uint32_t id); - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); - - // Module this pass is processing - ir::Module* module_; - - // Def-Uses for the module we are processing - std::unique_ptr def_use_mgr_; - - // Extensions supported by this pass. - std::unordered_set extensions_whitelist_; }; } // namespace opt } // namespace spvtools #endif // LIBSPIRV_OPT_BLOCK_MERGE_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.cpp index 766dbb525ff81b4aa974893b840805d542cefe1a..c441fcccd660934cebc0d7214bef952ed67802e8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.cpp @@ -14,6 +14,7 @@ #include "build_module.h" +#include "ir_context.h" #include "ir_loader.h" #include "make_unique.h" #include "table.h" @@ -27,10 +28,10 @@ namespace { spv_result_t SetSpvHeader(void* builder, spv_endianness_t, uint32_t magic, uint32_t version, uint32_t generator, uint32_t id_bound, uint32_t reserved) { - reinterpret_cast(builder) - ->SetModuleHeader(magic, version, generator, id_bound, reserved); + reinterpret_cast(builder)->SetModuleHeader( + magic, version, generator, id_bound, reserved); return SPV_SUCCESS; -}; +} // Processes a parsed instruction for IrLoader. Meets the interface requirement // of spvBinaryParse(). @@ -39,19 +40,19 @@ spv_result_t SetSpvInst(void* builder, const spv_parsed_instruction_t* inst) { return SPV_SUCCESS; } return SPV_ERROR_INVALID_BINARY; -}; +} -} // annoymous namespace +} // namespace -std::unique_ptr BuildModule(spv_target_env env, - MessageConsumer consumer, - const uint32_t* binary, - const size_t size) { +std::unique_ptr BuildModule(spv_target_env env, + MessageConsumer consumer, + const uint32_t* binary, + const size_t size) { auto context = spvContextCreate(env); - SetContextMessageConsumer(context, consumer); + libspirv::SetContextMessageConsumer(context, consumer); - auto module = MakeUnique(); - ir::IrLoader loader(context->consumer, module.get()); + auto irContext = MakeUnique(env, consumer); + ir::IrLoader loader(consumer, irContext->module()); spv_result_t status = spvBinaryParse(context, &loader, binary, size, SetSpvHeader, SetSpvInst, nullptr); @@ -59,13 +60,13 @@ std::unique_ptr BuildModule(spv_target_env env, spvContextDestroy(context); - return status == SPV_SUCCESS ? std::move(module) : nullptr; + return status == SPV_SUCCESS ? std::move(irContext) : nullptr; } -std::unique_ptr BuildModule(spv_target_env env, - MessageConsumer consumer, - const std::string& text, - uint32_t assemble_options) { +std::unique_ptr BuildModule(spv_target_env env, + MessageConsumer consumer, + const std::string& text, + uint32_t assemble_options) { SpirvTools t(env); t.SetMessageConsumer(consumer); std::vector binary; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.h index c27b1aeb7225566068e3142cde1b7fdaf03020a6..7e9493634f562008503feb25e5712a5e5b8e6a79 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/build_module.h @@ -18,23 +18,25 @@ #include #include +#include "ir_context.h" #include "module.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { -// Builds and returns an ir::Module from the given SPIR-V |binary|. |size| -// specifies number of words in |binary|. The |binary| will be decoded -// according to the given target |env|. Returns nullptr if erors occur and -// sends the errors to |consumer|. -std::unique_ptr BuildModule( - spv_target_env env, MessageConsumer consumer, const uint32_t* binary, - size_t size); - -// Builds and returns an ir::Module from the given SPIR-V assembly |text|. -// The |text| will be encoded according to the given target |env|. Returns -// nullptr if erors occur and sends the errors to |consumer|. -std::unique_ptr BuildModule( +// Builds an ir::Module returns the owning ir::IRContext from the given SPIR-V +// |binary|. |size| specifies number of words in |binary|. The |binary| will be +// decoded according to the given target |env|. Returns nullptr if errors occur +// and sends the errors to |consumer|. +std::unique_ptr BuildModule(spv_target_env env, + MessageConsumer consumer, + const uint32_t* binary, size_t size); + +// Builds an ir::Module and returns the owning ir::IRContext from the given +// SPIR-V assembly |text|. The |text| will be encoded according to the given +// target |env|. Returns nullptr if errors occur and sends the errors to +// |consumer|. +std::unique_ptr BuildModule( spv_target_env env, MessageConsumer consumer, const std::string& text, uint32_t assemble_options = SpirvTools::kDefaultAssembleOption); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e9044ad41fd44018609decac1539d73c5c320c87 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.cpp @@ -0,0 +1,330 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file implements conditional constant propagation as described in +// +// Constant propagation with conditional branches, +// Wegman and Zadeck, ACM TOPLAS 13(2):181-210. +#include "ccp_pass.h" +#include "fold.h" +#include "function.h" +#include "module.h" +#include "propagator.h" + +#include + +namespace spvtools { +namespace opt { + +namespace { + +// This SSA id is never defined nor referenced in the IR. It is a special ID +// which represents varying values. When an ID is found to have a varying +// value, its entry in the |values_| table maps to kVaryingSSAId. +const uint32_t kVaryingSSAId = std::numeric_limits::max(); + +} // namespace + +bool CCPPass::IsVaryingValue(uint32_t id) const { return id == kVaryingSSAId; } + +SSAPropagator::PropStatus CCPPass::MarkInstructionVarying( + ir::Instruction* instr) { + assert(instr->result_id() != 0 && + "Instructions with no result cannot be marked varying."); + values_[instr->result_id()] = kVaryingSSAId; + return SSAPropagator::kVarying; +} + +SSAPropagator::PropStatus CCPPass::VisitPhi(ir::Instruction* phi) { + uint32_t meet_val_id = 0; + + // Implement the lattice meet operation. The result of this Phi instruction is + // interesting only if the meet operation over arguments coming through + // executable edges yields the same constant value. + for (uint32_t i = 2; i < phi->NumOperands(); i += 2) { + if (!propagator_->IsPhiArgExecutable(phi, i)) { + // Ignore arguments coming through non-executable edges. + continue; + } + uint32_t phi_arg_id = phi->GetSingleWordOperand(i); + auto it = values_.find(phi_arg_id); + if (it != values_.end()) { + // We found an argument with a constant value. Apply the meet operation + // with the previous arguments. + if (it->second == kVaryingSSAId) { + // The "constant" value is actually a placeholder for varying. Return + // varying for this phi. + return MarkInstructionVarying(phi); + } else if (meet_val_id == 0) { + // This is the first argument we find. Initialize the result to its + // constant value id. + meet_val_id = it->second; + } else if (it->second == meet_val_id) { + // The argument is the same constant value already computed. Continue + // looking. + continue; + } else { + // We either found a varying value, or another constant value different + // from the previous computed meet value. This Phi will never be + // constant. + return MarkInstructionVarying(phi); + } + } else { + // The incoming value has no recorded value and is therefore not + // interesting. A not interesting value joined with any other value is the + // other value. + continue; + } + } + + // If there are no incoming executable edges, the meet ID will still be 0. In + // that case, return not interesting to evaluate the Phi node again. + if (meet_val_id == 0) { + return SSAPropagator::kNotInteresting; + } + + // All the operands have the same constant value represented by |meet_val_id|. + // Set the Phi's result to that value and declare it interesting. + values_[phi->result_id()] = meet_val_id; + return SSAPropagator::kInteresting; +} + +SSAPropagator::PropStatus CCPPass::VisitAssignment(ir::Instruction* instr) { + assert(instr->result_id() != 0 && + "Expecting an instruction that produces a result"); + + // If this is a copy operation, and the RHS is a known constant, assign its + // value to the LHS. + if (instr->opcode() == SpvOpCopyObject) { + uint32_t rhs_id = instr->GetSingleWordInOperand(0); + auto it = values_.find(rhs_id); + if (it != values_.end()) { + if (IsVaryingValue(it->second)) { + return MarkInstructionVarying(instr); + } else { + values_[instr->result_id()] = it->second; + return SSAPropagator::kInteresting; + } + } + return SSAPropagator::kNotInteresting; + } + + // Instructions with a RHS that cannot produce a constant are always varying. + if (!instr->IsFoldable()) { + return MarkInstructionVarying(instr); + } + + // See if the RHS of the assignment folds into a constant value. + auto map_func = [this](uint32_t id) { + auto it = values_.find(id); + if (it == values_.end() || IsVaryingValue(it->second)) { + return id; + } + return it->second; + }; + ir::Instruction* folded_inst = + opt::FoldInstructionToConstant(instr, map_func); + if (folded_inst != nullptr) { + // We do not want to change the body of the function by adding new + // instructions. When folding we can only generate new constants. + assert(folded_inst->IsConstant() && "CCP is only interested in constant."); + values_[instr->result_id()] = folded_inst->result_id(); + return SSAPropagator::kInteresting; + } + + // Conservatively mark this instruction as varying if any input id is varying. + if (!instr->WhileEachInId([this](uint32_t* op_id) { + auto iter = values_.find(*op_id); + if (iter != values_.end() && IsVaryingValue(iter->second)) return false; + return true; + })) { + return MarkInstructionVarying(instr); + } + + // If not, see if there is a least one unknown operand to the instruction. If + // so, we might be able to fold it later. + if (!instr->WhileEachInId([this](uint32_t* op_id) { + auto it = values_.find(*op_id); + if (it == values_.end()) return false; + return true; + })) { + return SSAPropagator::kNotInteresting; + } + + // Otherwise, we will never be able to fold this instruction, so mark it + // varying. + return MarkInstructionVarying(instr); +} + +SSAPropagator::PropStatus CCPPass::VisitBranch(ir::Instruction* instr, + ir::BasicBlock** dest_bb) const { + assert(instr->IsBranch() && "Expected a branch instruction."); + + *dest_bb = nullptr; + uint32_t dest_label = 0; + if (instr->opcode() == SpvOpBranch) { + // An unconditional jump always goes to its unique destination. + dest_label = instr->GetSingleWordInOperand(0); + } else if (instr->opcode() == SpvOpBranchConditional) { + // For a conditional branch, determine whether the predicate selector has a + // known value in |values_|. If it does, set the destination block + // according to the selector's boolean value. + uint32_t pred_id = instr->GetSingleWordOperand(0); + auto it = values_.find(pred_id); + if (it == values_.end() || IsVaryingValue(it->second)) { + // The predicate has an unknown value, either branch could be taken. + return SSAPropagator::kVarying; + } + + // Get the constant value for the predicate selector from the value table. + // Use it to decide which branch will be taken. + uint32_t pred_val_id = it->second; + const analysis::Constant* c = const_mgr_->FindDeclaredConstant(pred_val_id); + assert(c && "Expected to find a constant declaration for a known value."); + // Undef values should have returned as varying above. + assert(c->AsBoolConstant() || c->AsNullConstant()); + if (c->AsNullConstant()) { + dest_label = instr->GetSingleWordOperand(2u); + } else { + const analysis::BoolConstant* val = c->AsBoolConstant(); + dest_label = val->value() ? instr->GetSingleWordOperand(1) + : instr->GetSingleWordOperand(2); + } + } else { + // For an OpSwitch, extract the value taken by the switch selector and check + // which of the target literals it matches. The branch associated with that + // literal is the taken branch. + assert(instr->opcode() == SpvOpSwitch); + if (instr->GetOperand(0).words.size() != 1) { + // If the selector is wider than 32-bits, return varying. TODO(dnovillo): + // Add support for wider constants. + return SSAPropagator::kVarying; + } + uint32_t select_id = instr->GetSingleWordOperand(0); + auto it = values_.find(select_id); + if (it == values_.end() || IsVaryingValue(it->second)) { + // The selector has an unknown value, any of the branches could be taken. + return SSAPropagator::kVarying; + } + + // Get the constant value for the selector from the value table. Use it to + // decide which branch will be taken. + uint32_t select_val_id = it->second; + const analysis::Constant* c = + const_mgr_->FindDeclaredConstant(select_val_id); + assert(c && "Expected to find a constant declaration for a known value."); + // TODO: support 64-bit integer switches. + uint32_t constant_cond = 0; + if (const analysis::IntConstant* val = c->AsIntConstant()) { + constant_cond = val->words()[0]; + } else { + // Undef values should have returned varying above. + assert(c->AsNullConstant()); + constant_cond = 0; + } + + // Start assuming that the selector will take the default value; + dest_label = instr->GetSingleWordOperand(1); + for (uint32_t i = 2; i < instr->NumOperands(); i += 2) { + if (constant_cond == instr->GetSingleWordOperand(i)) { + dest_label = instr->GetSingleWordOperand(i + 1); + break; + } + } + } + + assert(dest_label && "Destination label should be set at this point."); + *dest_bb = context()->cfg()->block(dest_label); + return SSAPropagator::kInteresting; +} + +SSAPropagator::PropStatus CCPPass::VisitInstruction(ir::Instruction* instr, + ir::BasicBlock** dest_bb) { + *dest_bb = nullptr; + if (instr->opcode() == SpvOpPhi) { + return VisitPhi(instr); + } else if (instr->IsBranch()) { + return VisitBranch(instr, dest_bb); + } else if (instr->result_id()) { + return VisitAssignment(instr); + } + return SSAPropagator::kVarying; +} + +bool CCPPass::ReplaceValues() { + bool retval = false; + for (const auto& it : values_) { + uint32_t id = it.first; + uint32_t cst_id = it.second; + if (!IsVaryingValue(cst_id) && id != cst_id) { + retval |= context()->ReplaceAllUsesWith(id, cst_id); + } + } + return retval; +} + +bool CCPPass::PropagateConstants(ir::Function* fp) { + // Mark function parameters as varying. + fp->ForEachParam([this](const ir::Instruction* inst) { + values_[inst->result_id()] = kVaryingSSAId; + }); + + const auto visit_fn = [this](ir::Instruction* instr, + ir::BasicBlock** dest_bb) { + return VisitInstruction(instr, dest_bb); + }; + + propagator_ = + std::unique_ptr(new SSAPropagator(context(), visit_fn)); + + if (propagator_->Run(fp)) { + return ReplaceValues(); + } + + return false; +} + +void CCPPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); + + const_mgr_ = context()->get_constant_mgr(); + + // Populate the constant table with values from constant declarations in the + // module. The values of each OpConstant declaration is the identity + // assignment (i.e., each constant is its own value). + for (const auto& inst : get_module()->types_values()) { + // Record compile time constant ids. Treat all other global values as + // varying. + if (inst.IsConstant()) { + values_[inst.result_id()] = inst.result_id(); + } else { + values_[inst.result_id()] = kVaryingSSAId; + } + } +} + +Pass::Status CCPPass::Process(ir::IRContext* c) { + Initialize(c); + + // Process all entry point functions. + ProcessFunction pfn = [this](ir::Function* fp) { + return PropagateConstants(fp); + }; + bool modified = ProcessReachableCallTree(pfn, context()); + return modified ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..e96e731a72efafd4d0ef002330cf658571e53295 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ccp_pass.h @@ -0,0 +1,100 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_CCP_PASS_H_ +#define LIBSPIRV_OPT_CCP_PASS_H_ + +#include "constants.h" +#include "function.h" +#include "ir_context.h" +#include "mem_pass.h" +#include "module.h" +#include "propagator.h" + +namespace spvtools { +namespace opt { + +class CCPPass : public MemPass { + public: + CCPPass() = default; + const char* name() const override { return "ccp"; } + Status Process(ir::IRContext* c) override; + + private: + // Initializes the pass. + void Initialize(ir::IRContext* c); + + // Runs constant propagation on the given function |fp|. Returns true if any + // constants were propagated and the IR modified. + bool PropagateConstants(ir::Function* fp); + + // Visits a single instruction |instr|. If the instruction is a conditional + // branch that always jumps to the same basic block, it sets the destination + // block in |dest_bb|. + SSAPropagator::PropStatus VisitInstruction(ir::Instruction* instr, + ir::BasicBlock** dest_bb); + + // Visits an OpPhi instruction |phi|. This applies the meet operator for the + // CCP lattice. Essentially, if all the operands in |phi| have the same + // constant value C, the result for |phi| gets assigned the value C. + SSAPropagator::PropStatus VisitPhi(ir::Instruction* phi); + + // Visits an SSA assignment instruction |instr|. If the RHS of |instr| folds + // into a constant value C, then the LHS of |instr| is assigned the value C in + // |values_|. + SSAPropagator::PropStatus VisitAssignment(ir::Instruction* instr); + + // Visits a branch instruction |instr|. If the branch is conditional + // (OpBranchConditional or OpSwitch), and the value of its selector is known, + // |dest_bb| will be set to the corresponding destination block. Unconditional + // branches always set |dest_bb| to the single destination block. + SSAPropagator::PropStatus VisitBranch(ir::Instruction* instr, + ir::BasicBlock** dest_bb) const; + + // Replaces all operands used in |fp| with the corresponding constant values + // in |values_|. Returns true if any operands were replaced, and false + // otherwise. + bool ReplaceValues(); + + // Marks |instr| as varying by registering a varying value for its result + // into the |values_| table. Returns SSAPropagator::kVarying. + SSAPropagator::PropStatus MarkInstructionVarying(ir::Instruction* instr); + + // Returns true if |id| is the special SSA id that corresponds to a varying + // value. + bool IsVaryingValue(uint32_t id) const; + + // Constant manager for the parent IR context. Used to record new constants + // generated during propagation. + analysis::ConstantManager* const_mgr_; + + // Constant value table. Each entry in this map + // represents the compile-time constant value for |id| as declared by + // |const_decl_id|. Each |const_decl_id| in this table is an OpConstant + // declaration for the current module. + // + // Additionally, this table keeps track of SSA IDs with varying values. If an + // SSA ID is found to have a varying value, it will have an entry in this + // table that maps to the special SSA id kVaryingSSAId. These values are + // never replaced in the IR, they are used by CCP during propagation. + std::unordered_map values_; + + // Propagator engine used. + std::unique_ptr propagator_; +}; + +} // namespace opt +} // namespace spvtools + +#endif diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d13bdab3bd107d1176e4237c1ec6998431ebe839 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.cpp @@ -0,0 +1,323 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "cfg.h" +#include "cfa.h" +#include "ir_builder.h" +#include "ir_context.h" +#include "module.h" + +namespace spvtools { +namespace ir { + +namespace { + +// Universal Limit of ResultID + 1 +const int kInvalidId = 0x400000; + +} // namespace + +CFG::CFG(ir::Module* module) + : module_(module), + pseudo_entry_block_(std::unique_ptr( + new ir::Instruction(module->context(), SpvOpLabel, 0, 0, {}))), + pseudo_exit_block_(std::unique_ptr(new ir::Instruction( + module->context(), SpvOpLabel, 0, kInvalidId, {}))) { + for (auto& fn : *module) { + for (auto& blk : fn) { + RegisterBlock(&blk); + } + } +} + +void CFG::AddEdges(ir::BasicBlock* blk) { + uint32_t blk_id = blk->id(); + // Force the creation of an entry, not all basic block have predecessors + // (such as the entry blocks and some unreachables). + label2preds_[blk_id]; + const auto* const_blk = blk; + const_blk->ForEachSuccessorLabel( + [blk_id, this](const uint32_t succ_id) { AddEdge(blk_id, succ_id); }); +} + +void CFG::RemoveNonExistingEdges(uint32_t blk_id) { + std::vector updated_pred_list; + for (uint32_t id : preds(blk_id)) { + const ir::BasicBlock* pred_blk = block(id); + bool has_branch = false; + pred_blk->ForEachSuccessorLabel([&has_branch, blk_id](uint32_t succ) { + if (succ == blk_id) { + has_branch = true; + } + }); + if (has_branch) updated_pred_list.push_back(id); + } + + label2preds_.at(blk_id) = std::move(updated_pred_list); +} + +void CFG::ComputeStructuredOrder(ir::Function* func, ir::BasicBlock* root, + std::list* order) { + assert(module_->context()->get_feature_mgr()->HasCapability( + SpvCapabilityShader) && + "This only works on structured control flow"); + + // Compute structured successors and do DFS. + ComputeStructuredSuccessors(func); + auto ignore_block = [](cbb_ptr) {}; + auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; + auto get_structured_successors = [this](const ir::BasicBlock* b) { + return &(block2structured_succs_[b]); + }; + + // TODO(greg-lunarg): Get rid of const_cast by making moving const + // out of the cfa.h prototypes and into the invoking code. + auto post_order = [&](cbb_ptr b) { + order->push_front(const_cast(b)); + }; + spvtools::CFA::DepthFirstTraversal( + root, get_structured_successors, ignore_block, post_order, ignore_edge); +} + +void CFG::ForEachBlockInPostOrder(BasicBlock* bb, + const std::function& f) { + std::vector po; + std::unordered_set seen; + ComputePostOrderTraversal(bb, &po, &seen); + + for (BasicBlock* current_bb : po) { + if (!IsPseudoExitBlock(current_bb) && !IsPseudoEntryBlock(current_bb)) { + f(current_bb); + } + } +} + +void CFG::ForEachBlockInReversePostOrder( + BasicBlock* bb, const std::function& f) { + std::vector po; + std::unordered_set seen; + ComputePostOrderTraversal(bb, &po, &seen); + + for (auto current_bb = po.rbegin(); current_bb != po.rend(); ++current_bb) { + if (!IsPseudoExitBlock(*current_bb) && !IsPseudoEntryBlock(*current_bb)) { + f(*current_bb); + } + } +} + +void CFG::ComputeStructuredSuccessors(ir::Function* func) { + block2structured_succs_.clear(); + for (auto& blk : *func) { + // If no predecessors in function, make successor to pseudo entry. + if (label2preds_[blk.id()].size() == 0) + block2structured_succs_[&pseudo_entry_block_].push_back(&blk); + + // If header, make merge block first successor and continue block second + // successor if there is one. + uint32_t mbid = blk.MergeBlockIdIfAny(); + if (mbid != 0) { + block2structured_succs_[&blk].push_back(block(mbid)); + uint32_t cbid = blk.ContinueBlockIdIfAny(); + if (cbid != 0) { + block2structured_succs_[&blk].push_back(block(cbid)); + } + } + + // Add true successors. + const auto& const_blk = blk; + const_blk.ForEachSuccessorLabel([&blk, this](const uint32_t sbid) { + block2structured_succs_[&blk].push_back(block(sbid)); + }); + } +} + +void CFG::ComputePostOrderTraversal(BasicBlock* bb, vector* order, + unordered_set* seen) { + seen->insert(bb); + static_cast(bb)->ForEachSuccessorLabel( + [&order, &seen, this](const uint32_t sbid) { + BasicBlock* succ_bb = id2block_[sbid]; + if (!seen->count(succ_bb)) { + ComputePostOrderTraversal(succ_bb, order, seen); + } + }); + order->push_back(bb); +} + +BasicBlock* CFG::SplitLoopHeader(ir::BasicBlock* bb) { + assert(bb->GetLoopMergeInst() && "Expecting bb to be the header of a loop."); + + Function* fn = bb->GetParent(); + IRContext* context = fn->context(); + + // Find the insertion point for the new bb. + Function::iterator header_it = std::find_if( + fn->begin(), fn->end(), + [bb](BasicBlock& block_in_func) { return &block_in_func == bb; }); + assert(header_it != fn->end()); + + const std::vector& pred = preds(bb->id()); + // Find the back edge + ir::BasicBlock* latch_block = nullptr; + Function::iterator latch_block_iter = header_it; + while (++latch_block_iter != fn->end()) { + // If blocks are in the proper order, then the only branch that appears + // after the header is the latch. + if (std::find(pred.begin(), pred.end(), latch_block_iter->id()) != + pred.end()) { + break; + } + } + assert(latch_block_iter != fn->end() && "Could not find the latch."); + latch_block = &*latch_block_iter; + + RemoveSuccessorEdges(bb); + + // Create the new header bb basic bb. + // Leave the phi instructions behind. + auto iter = bb->begin(); + while (iter->opcode() == SpvOpPhi) { + ++iter; + } + + std::unique_ptr newBlock( + bb->SplitBasicBlock(context, context->TakeNextId(), iter)); + + // Insert the new bb in the correct position + auto insert_pos = header_it; + ++insert_pos; + ir::BasicBlock* new_header = &*insert_pos.InsertBefore(std::move(newBlock)); + new_header->SetParent(fn); + uint32_t new_header_id = new_header->id(); + context->AnalyzeDefUse(new_header->GetLabelInst()); + + // Update cfg + RegisterBlock(new_header); + + // Update bb mappings. + context->set_instr_block(new_header->GetLabelInst(), new_header); + new_header->ForEachInst([new_header, context](ir::Instruction* inst) { + context->set_instr_block(inst, new_header); + }); + + // Adjust the OpPhi instructions as needed. + bb->ForEachPhiInst([latch_block, bb, new_header, context](Instruction* phi) { + std::vector preheader_phi_ops; + std::vector header_phi_ops; + + // Identify where the original inputs to original OpPhi belong: header or + // preheader. + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + uint32_t def_id = phi->GetSingleWordInOperand(i); + uint32_t branch_id = phi->GetSingleWordInOperand(i + 1); + if (branch_id == latch_block->id()) { + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {def_id}}); + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {branch_id}}); + } else { + preheader_phi_ops.push_back(def_id); + preheader_phi_ops.push_back(branch_id); + } + } + + // Create a phi instruction if and only if the preheader_phi_ops has more + // than one pair. + if (preheader_phi_ops.size() > 2) { + opt::InstructionBuilder builder( + context, &*bb->begin(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + + ir::Instruction* new_phi = + builder.AddPhi(phi->type_id(), preheader_phi_ops); + + // Add the OpPhi to the header bb. + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {new_phi->result_id()}}); + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {bb->id()}}); + } else { + // An OpPhi with a single entry is just a copy. In this case use the same + // instruction in the new header. + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {preheader_phi_ops[0]}}); + header_phi_ops.push_back({SPV_OPERAND_TYPE_ID, {bb->id()}}); + } + + phi->RemoveFromList(); + std::unique_ptr phi_owner(phi); + phi->SetInOperands(std::move(header_phi_ops)); + new_header->begin()->InsertBefore(std::move(phi_owner)); + context->set_instr_block(phi, new_header); + context->AnalyzeUses(phi); + }); + + // Add a branch to the new header. + opt::InstructionBuilder branch_builder( + context, bb, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + bb->AddInstruction(MakeUnique( + context, SpvOpBranch, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {new_header->id()}}})); + context->AnalyzeUses(bb->terminator()); + context->set_instr_block(bb->terminator(), bb); + label2preds_[new_header->id()].push_back(bb->id()); + + // Update the latch to branch to the new header. + latch_block->ForEachSuccessorLabel([bb, new_header_id](uint32_t* id) { + if (*id == bb->id()) { + *id = new_header_id; + } + }); + ir::Instruction* latch_branch = latch_block->terminator(); + context->AnalyzeUses(latch_branch); + label2preds_[new_header->id()].push_back(latch_block->id()); + + auto& block_preds = label2preds_[bb->id()]; + auto latch_pos = + std::find(block_preds.begin(), block_preds.end(), latch_block->id()); + assert(latch_pos != block_preds.end() && "The cfg was invalid."); + block_preds.erase(latch_pos); + + // Update the loop descriptors + if (context->AreAnalysesValid(ir::IRContext::kAnalysisLoopAnalysis)) { + LoopDescriptor* loop_desc = context->GetLoopDescriptor(bb->GetParent()); + Loop* loop = (*loop_desc)[bb->id()]; + + loop->AddBasicBlock(new_header_id); + loop->SetHeaderBlock(new_header); + loop_desc->SetBasicBlockToLoop(new_header_id, loop); + + loop->RemoveBasicBlock(bb->id()); + loop->SetPreHeaderBlock(bb); + + Loop* parent_loop = loop->GetParent(); + if (parent_loop != nullptr) { + parent_loop->AddBasicBlock(bb->id()); + loop_desc->SetBasicBlockToLoop(bb->id(), parent_loop); + } else { + loop_desc->SetBasicBlockToLoop(bb->id(), nullptr); + } + } + return new_header; +} + +unordered_set CFG::FindReachableBlocks(BasicBlock* start) { + std::unordered_set reachable_blocks; + ForEachBlockInReversePostOrder(start, [&reachable_blocks](BasicBlock* bb) { + reachable_blocks.insert(bb); + }); + return reachable_blocks; +} + +} // namespace ir +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.h new file mode 100644 index 0000000000000000000000000000000000000000..98d06a73391f3abf909bd86387fc9ee4a4798430 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg.h @@ -0,0 +1,181 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_CFG_H_ +#define LIBSPIRV_OPT_CFG_H_ + +#include "basic_block.h" + +#include +#include +#include +#include + +namespace spvtools { +namespace ir { + +class CFG { + public: + CFG(ir::Module* module); + + // Return the module described by this CFG. + ir::Module* get_module() const { return module_; } + + // Return the list of predecesors for basic block with label |blkid|. + // TODO(dnovillo): Move this to ir::BasicBlock. + const std::vector& preds(uint32_t blk_id) const { + assert(label2preds_.count(blk_id)); + return label2preds_.at(blk_id); + } + + // Return a pointer to the basic block instance corresponding to the label + // |blk_id|. + ir::BasicBlock* block(uint32_t blk_id) const { return id2block_.at(blk_id); } + + // Return the pseudo entry and exit blocks. + const ir::BasicBlock* pseudo_entry_block() const { + return &pseudo_entry_block_; + } + ir::BasicBlock* pseudo_entry_block() { return &pseudo_entry_block_; } + + const ir::BasicBlock* pseudo_exit_block() const { + return &pseudo_exit_block_; + } + ir::BasicBlock* pseudo_exit_block() { return &pseudo_exit_block_; } + + // Return true if |block_ptr| is the pseudo-entry block. + bool IsPseudoEntryBlock(ir::BasicBlock* block_ptr) const { + return block_ptr == &pseudo_entry_block_; + } + + // Return true if |block_ptr| is the pseudo-exit block. + bool IsPseudoExitBlock(ir::BasicBlock* block_ptr) const { + return block_ptr == &pseudo_exit_block_; + } + + // Compute structured block order into |order| for |func| starting at |root|. + // This order has the property that dominators come before all blocks they + // dominate and merge blocks come after all blocks that are in the control + // constructs of their header. + void ComputeStructuredOrder(ir::Function* func, ir::BasicBlock* root, + std::list* order); + + // Applies |f| to the basic block in post order starting with |bb|. + // Note that basic blocks that cannot be reached from |bb| node will not be + // processed. + void ForEachBlockInPostOrder(BasicBlock* bb, + const std::function& f); + + // Applies |f| to the basic block in reverse post order starting with |bb|. + // Note that basic blocks that cannot be reached from |bb| node will not be + // processed. + void ForEachBlockInReversePostOrder( + BasicBlock* bb, const std::function& f); + + // Registers |blk| as a basic block in the cfg, this also updates the + // predecessor lists of each successor of |blk|. + void RegisterBlock(ir::BasicBlock* blk) { + uint32_t blk_id = blk->id(); + id2block_[blk_id] = blk; + AddEdges(blk); + } + + // Removes from the CFG any mapping for the basic block id |blk_id|. + void ForgetBlock(const ir::BasicBlock* blk) { + id2block_.erase(blk->id()); + label2preds_.erase(blk->id()); + RemoveSuccessorEdges(blk); + } + + void RemoveEdge(uint32_t pred_blk_id, uint32_t succ_blk_id) { + auto pred_it = label2preds_.find(succ_blk_id); + if (pred_it == label2preds_.end()) return; + auto& preds_list = pred_it->second; + auto it = std::find(preds_list.begin(), preds_list.end(), pred_blk_id); + if (it != preds_list.end()) preds_list.erase(it); + } + + // Registers |blk| to all of its successors. + void AddEdges(ir::BasicBlock* blk); + + // Registers the basic block id |pred_blk_id| as being a predecessor of the + // basic block id |succ_blk_id|. + void AddEdge(uint32_t pred_blk_id, uint32_t succ_blk_id) { + label2preds_[succ_blk_id].push_back(pred_blk_id); + } + + // Removes any edges that no longer exist from the predecessor mapping for + // the basic block id |blk_id|. + void RemoveNonExistingEdges(uint32_t blk_id); + + // Remove all edges that leave |bb|. + void RemoveSuccessorEdges(const ir::BasicBlock* bb) { + bb->ForEachSuccessorLabel( + [bb, this](uint32_t succ_id) { RemoveEdge(bb->id(), succ_id); }); + } + + // Divides |block| into two basic blocks. The first block will have the same + // id as |block| and will become a preheader for the loop. The other block + // is a new block that will be the new loop header. + // + // Returns a pointer to the new loop header. + BasicBlock* SplitLoopHeader(ir::BasicBlock* bb); + + std::unordered_set FindReachableBlocks(BasicBlock* start); + + private: + using cbb_ptr = const ir::BasicBlock*; + + // Compute structured successors for function |func|. A block's structured + // successors are the blocks it branches to together with its declared merge + // block and continue block if it has them. When order matters, the merge + // block and continue block always appear first. This assures correct depth + // first search in the presence of early returns and kills. If the successor + // vector contain duplicates of the merge or continue blocks, they are safely + // ignored by DFS. + void ComputeStructuredSuccessors(ir::Function* func); + + // Computes the post-order traversal of the cfg starting at |bb| skipping + // nodes in |seen|. The order of the traversal is appended to |order|, and + // all nodes in the traversal are added to |seen|. + void ComputePostOrderTraversal(BasicBlock* bb, + std::vector* order, + std::unordered_set* seen); + + // Module for this CFG. + ir::Module* module_; + + // Map from block to its structured successor blocks. See + // ComputeStructuredSuccessors() for definition. + std::unordered_map> + block2structured_succs_; + + // Extra block whose successors are all blocks with no predecessors + // in function. + ir::BasicBlock pseudo_entry_block_; + + // Augmented CFG Exit Block. + ir::BasicBlock pseudo_exit_block_; + + // Map from block's label id to its predecessor blocks ids + std::unordered_map> label2preds_; + + // Map from block's label id to block. + std::unordered_map id2block_; +}; + +} // namespace ir +} // namespace spvtools + +#endif // LIBSPIRV_OPT_CFG_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.cpp index d786da81f30bb687ab17c7c4eee84f3f7b126c7e..2565225eb8e9fb4014436b4889e884ad35b61200 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.cpp @@ -27,256 +27,14 @@ namespace spvtools { namespace opt { -uint32_t CFGCleanupPass::TypeToUndef(uint32_t type_id) { - const auto uitr = type2undefs_.find(type_id); - if (uitr != type2undefs_.end()) { - return uitr->second; - } +void CFGCleanupPass::Initialize(ir::IRContext* c) { InitializeProcessing(c); } - const uint32_t undefId = TakeNextId(); - std::unique_ptr undef_inst( - new ir::Instruction(SpvOpUndef, type_id, undefId, {})); - def_use_mgr_->AnalyzeInstDefUse(&*undef_inst); - module_->AddGlobalValue(std::move(undef_inst)); - type2undefs_[type_id] = undefId; - - return undefId; -} - -// Remove all |phi| operands coming from unreachable blocks (i.e., blocks not in -// |reachable_blocks|). There are two types of removal that this function can -// perform: -// -// 1- Any operand that comes directly from an unreachable block is completely -// removed. Since the block is unreachable, the edge between the unreachable -// block and the block holding |phi| has been removed. -// -// 2- Any operand that comes via a live block and was defined at an unreachable -// block gets its value replaced with an OpUndef value. Since the argument -// was generated in an unreachable block, it no longer exists, so it cannot -// be referenced. However, since the value does not reach |phi| directly -// from the unreachable block, the operand cannot be removed from |phi|. -// Therefore, we replace the argument value with OpUndef. -// -// For example, in the switch() below, assume that we want to remove the -// argument with value %11 coming from block %41. -// -// [ ... ] -// %41 = OpLabel <--- Unreachable block -// %11 = OpLoad %int %y -// [ ... ] -// OpSelectionMerge %16 None -// OpSwitch %12 %16 10 %13 13 %14 18 %15 -// %13 = OpLabel -// OpBranch %16 -// %14 = OpLabel -// OpStore %outparm %int_14 -// OpBranch %16 -// %15 = OpLabel -// OpStore %outparm %int_15 -// OpBranch %16 -// %16 = OpLabel -// %30 = OpPhi %int %11 %41 %int_42 %13 %11 %14 %11 %15 -// -// Since %41 is now an unreachable block, the first operand of |phi| needs to -// be removed completely. But the operands (%11 %14) and (%11 %15) cannot be -// removed because %14 and %15 are reachable blocks. Since %11 no longer exist, -// in those arguments, we replace all references to %11 with an OpUndef value. -// This results in |phi| looking like: -// -// %50 = OpUndef %int -// [ ... ] -// %30 = OpPhi %int %int_42 %13 %50 %14 %50 %15 -void CFGCleanupPass::RemovePhiOperands( - ir::Instruction* phi, - std::unordered_set reachable_blocks) { - std::vector keep_operands; - uint32_t type_id = 0; - // The id of an undefined value we've generated. - uint32_t undef_id = 0; - - // Traverse all the operands in |phi|. Build the new operand vector by adding - // all the original operands from |phi| except the unwanted ones. - for (uint32_t i = 0; i < phi->NumOperands();) { - if (i < 2) { - // The first two arguments are always preserved. - keep_operands.push_back(phi->GetOperand(i)); - ++i; - continue; - } - - // The remaining Phi arguments come in pairs. Index 'i' contains the - // variable id, index 'i + 1' is the originating block id. - assert(i % 2 == 0 && i < phi->NumOperands() - 1 && - "malformed Phi arguments"); - - ir::BasicBlock *in_block = label2block_[phi->GetSingleWordOperand(i + 1)]; - if (reachable_blocks.find(in_block) == reachable_blocks.end()) { - // If the incoming block is unreachable, remove both operands as this - // means that the |phi| has lost an incoming edge. - i += 2; - continue; - } - - // In all other cases, the operand must be kept but may need to be changed. - uint32_t arg_id = phi->GetSingleWordOperand(i); - ir::BasicBlock *def_block = def_block_[arg_id]; - if (def_block && - reachable_blocks.find(def_block_[arg_id]) == reachable_blocks.end()) { - // If the current |phi| argument was defined in an unreachable block, it - // means that this |phi| argument is no longer defined. Replace it with - // |undef_id|. - if (!undef_id) { - type_id = def_use_mgr_->GetDef(arg_id)->type_id(); - undef_id = TypeToUndef(type_id); - } - keep_operands.push_back( - ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {undef_id})); - } else { - // Otherwise, the argument comes from a reachable block or from no block - // at all (meaning that it was defined in the global section of the - // program). In both cases, keep the argument intact. - keep_operands.push_back(phi->GetOperand(i)); - } - - keep_operands.push_back(phi->GetOperand(i + 1)); - - i += 2; - } - - phi->ReplaceOperands(keep_operands); -} - -void CFGCleanupPass::RemoveBlock(ir::Function::iterator* bi) { - auto& rm_block = **bi; - - // Remove instructions from the block. - rm_block.ForEachInst([&rm_block, this](ir::Instruction* inst) { - // Note that we do not kill the block label instruction here. The label - // instruction is needed to identify the block, which is needed by the - // removal of phi operands. - if (inst != rm_block.GetLabelInst()) { - KillNamesAndDecorates(inst); - def_use_mgr_->KillInst(inst); - } - }); - - // Remove the label instruction last. - auto label = rm_block.GetLabelInst(); - KillNamesAndDecorates(label); - def_use_mgr_->KillInst(label); - - *bi = bi->Erase(); -} - -bool CFGCleanupPass::RemoveUnreachableBlocks(ir::Function* func) { - bool modified = false; - - // Mark reachable all blocks reachable from the function's entry block. - std::unordered_set reachable_blocks; - std::unordered_set visited_blocks; - std::queue worklist; - reachable_blocks.insert(func->entry().get()); - - // Initially mark the function entry point as reachable. - worklist.push(func->entry().get()); - - auto mark_reachable = [&reachable_blocks, &visited_blocks, &worklist, - this](uint32_t label_id) { - auto successor = label2block_[label_id]; - if (visited_blocks.count(successor) == 0) { - reachable_blocks.insert(successor); - worklist.push(successor); - visited_blocks.insert(successor); - } - }; - - // Transitively mark all blocks reachable from the entry as reachable. - while (!worklist.empty()) { - ir::BasicBlock* block = worklist.front(); - worklist.pop(); - - // All the successors of a live block are also live. - block->ForEachSuccessorLabel(mark_reachable); - - // All the Merge and ContinueTarget blocks of a live block are also live. - block->ForMergeAndContinueLabel(mark_reachable); - } - - // Update operands of Phi nodes that reference unreachable blocks. - for (auto& block : *func) { - // If the block is about to be removed, don't bother updating its - // Phi instructions. - if (reachable_blocks.count(&block) == 0) { - continue; - } - - // If the block is reachable and has Phi instructions, remove all - // operands from its Phi instructions that reference unreachable blocks. - // If the block has no Phi instructions, this is a no-op. - block.ForEachPhiInst( - [&block, &reachable_blocks, this](ir::Instruction* phi) { - RemovePhiOperands(phi, reachable_blocks); - }); - } - - // Erase unreachable blocks. - for (auto ebi = func->begin(); ebi != func->end();) { - if (reachable_blocks.count(&*ebi) == 0) { - RemoveBlock(&ebi); - modified = true; - } else { - ++ebi; - } - } - - return modified; -} - -bool CFGCleanupPass::CFGCleanup(ir::Function* func) { - bool modified = false; - modified |= RemoveUnreachableBlocks(func); - return modified; -} - -void CFGCleanupPass::Initialize(ir::Module* module) { - // Initialize the DefUse manager. TODO(dnovillo): Re-factor all this into the - // module or some other context class for the optimizer. - module_ = module; - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); - FindNamedOrDecoratedIds(); - - // Initialize next unused Id. TODO(dnovillo): Re-factor into the module or - // some other context class for the optimizer. - next_id_ = module_->id_bound(); - - // Initialize block lookup map. - label2block_.clear(); - for (auto& fn : *module) { - for (auto& block : fn) { - label2block_[block.id()] = █ - - // Build a map between SSA names to the block they are defined in. - // TODO(dnovillo): This is expensive and unnecessary if ir::Instruction - // instances could figure out what basic block they belong to. Remove this - // once this is possible. - block.ForEachInst([this, &block](ir::Instruction* inst) { - uint32_t result_id = inst->result_id(); - if (result_id > 0) { - def_block_[result_id] = █ - } - }); - } - } -} - -Pass::Status CFGCleanupPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status CFGCleanupPass::Process(ir::IRContext* c) { + Initialize(c); // Process all entry point functions. ProcessFunction pfn = [this](ir::Function* fp) { return CFGCleanup(fp); }; - bool modified = ProcessReachableCallTree(pfn, module); - FinalizeNextId(module_); + bool modified = ProcessReachableCallTree(pfn, context()); return modified ? Pass::Status::SuccessWithChange : Pass::Status::SuccessWithoutChange; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.h index 810bc35a795bc95904091574122474bc40c3e405..116e11d1b69cd3294fd26b909460782b8818e6e7 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/cfg_cleanup_pass.h @@ -26,60 +26,15 @@ class CFGCleanupPass : public MemPass { public: CFGCleanupPass() = default; const char* name() const override { return "cfg-cleanup"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; - private: - // Call all the cleanup helper functions on |func|. - bool CFGCleanup(ir::Function* func); - - // Remove all the unreachable basic blocks in |func|. - bool RemoveUnreachableBlocks(ir::Function* func); - - // Remove the block pointed by the iterator |*bi|. This also removes - // all the instructions in the pointed-to block. - void RemoveBlock(ir::Function::iterator* bi); - - // Initialize the pass. - void Initialize(ir::Module* module); - - // Remove Phi operands in |phi| that are coming from blocks not in - // |reachable_blocks|. - void RemovePhiOperands(ir::Instruction* phi, - std::unordered_set reachable_blocks); - - // Return the next available Id and increment it. TODO(dnovillo): Refactor - // into a new type pool manager to be used for all passes. - inline uint32_t TakeNextId() { return next_id_++; } - - // Save next available id into |module|. TODO(dnovillo): Refactor - // into a new type pool manager to be used for all passes. - inline void FinalizeNextId(ir::Module* module) { - module->SetIdBound(next_id_); + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; } - // Return undef in function for type. Create and insert an undef after the - // first non-variable in the function if it doesn't already exist. Add - // undef to function undef map. TODO(dnovillo): Refactor into a new - // type pool manager to be used for all passes. - uint32_t TypeToUndef(uint32_t type_id); - - // Map from block's label id to block. TODO(dnovillo): Basic blocks ought to - // have basic blocks in their pred/succ list. - std::unordered_map label2block_; - - // Map from an instruction result ID to the block that holds it. - // TODO(dnovillo): This would be unnecessary if ir::Instruction instances - // knew what basic block they belong to. - std::unordered_map def_block_; - - // Map from type to undef values. TODO(dnovillo): This is replicated from - // class LocalMultiStoreElimPass. It should be refactored into a type - // pool manager. - std::unordered_map type2undefs_; - - // Next unused ID. TODO(dnovillo): Refactor this to some common utility class. - // Seems to be implemented in very many passes. - uint32_t next_id_; + private: + // Initialize the pass. + void Initialize(ir::IRContext* c); }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.cpp index acc8f7704d3072d0422e518bc00aa8a0e73a920e..4d037d3f1d8f863b4d2795925454be8f2c93684b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.cpp @@ -16,6 +16,7 @@ #include "common_uniform_elim_pass.h" #include "cfa.h" +#include "ir_context.h" namespace spvtools { namespace opt { @@ -28,22 +29,19 @@ const uint32_t kTypePointerTypeIdInIdx = 1; const uint32_t kConstantValueInIdx = 0; const uint32_t kExtractCompositeIdInIdx = 0; const uint32_t kExtractIdx0InIdx = 1; -const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeContinueBlockIdInIdx = 1; const uint32_t kStorePtrIdInIdx = 0; const uint32_t kLoadPtrIdInIdx = 0; const uint32_t kCopyObjectOperandInIdx = 0; const uint32_t kTypeIntWidthInIdx = 0; -} // anonymous namespace +} // anonymous namespace bool CommonUniformElimPass::IsNonPtrAccessChain(const SpvOp opcode) const { return opcode == SpvOpAccessChain || opcode == SpvOpInBoundsAccessChain; } bool CommonUniformElimPass::IsSamplerOrImageType( - const ir::Instruction* typeInst) const { + const ir::Instruction* typeInst) const { switch (typeInst->opcode()) { case SpvOpTypeSampler: case SpvOpTypeImage: @@ -52,101 +50,72 @@ bool CommonUniformElimPass::IsSamplerOrImageType( default: break; } - if (typeInst->opcode() != SpvOpTypeStruct) - return false; + if (typeInst->opcode() != SpvOpTypeStruct) return false; // Return true if any member is a sampler or image - int samplerOrImageCnt = 0; - typeInst->ForEachInId([&samplerOrImageCnt, this](const uint32_t* tid) { - const ir::Instruction* compTypeInst = def_use_mgr_->GetDef(*tid); - if (IsSamplerOrImageType(compTypeInst)) ++samplerOrImageCnt; + return !typeInst->WhileEachInId([this](const uint32_t* tid) { + const ir::Instruction* compTypeInst = get_def_use_mgr()->GetDef(*tid); + if (IsSamplerOrImageType(compTypeInst)) { + return false; + } + return true; }); - return samplerOrImageCnt > 0; } -bool CommonUniformElimPass::IsSamplerOrImageVar( - uint32_t varId) const { - const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); +bool CommonUniformElimPass::IsSamplerOrImageVar(uint32_t varId) const { + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(varId); assert(varInst->opcode() == SpvOpVariable); const uint32_t varTypeId = varInst->type_id(); - const ir::Instruction* varTypeInst = def_use_mgr_->GetDef(varTypeId); + const ir::Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); const uint32_t varPteTypeId = - varTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); - ir::Instruction* varPteTypeInst = def_use_mgr_->GetDef(varPteTypeId); + varTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); + ir::Instruction* varPteTypeInst = get_def_use_mgr()->GetDef(varPteTypeId); return IsSamplerOrImageType(varPteTypeInst); } -bool CommonUniformElimPass::IsLoopHeader(ir::BasicBlock* block_ptr) { - auto iItr = block_ptr->tail(); - if (iItr == block_ptr->begin()) - return false; - --iItr; - return iItr->opcode() == SpvOpLoopMerge; -} - -uint32_t CommonUniformElimPass::MergeBlockIdIfAny(const ir::BasicBlock& blk, - uint32_t* cbid) { - auto merge_ii = blk.cend(); - --merge_ii; - *cbid = 0; - uint32_t mbid = 0; - if (merge_ii != blk.cbegin()) { - --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) { - mbid = merge_ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); - *cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); - } - else if (merge_ii->opcode() == SpvOpSelectionMerge) { - mbid = merge_ii->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); - } - } - return mbid; -} - -ir::Instruction* CommonUniformElimPass::GetPtr( - ir::Instruction* ip, uint32_t* objId) { +ir::Instruction* CommonUniformElimPass::GetPtr(ir::Instruction* ip, + uint32_t* objId) { const SpvOp op = ip->opcode(); assert(op == SpvOpStore || op == SpvOpLoad); - *objId = ip->GetSingleWordInOperand( - op == SpvOpStore ? kStorePtrIdInIdx : kLoadPtrIdInIdx); - ir::Instruction* ptrInst = def_use_mgr_->GetDef(*objId); + *objId = ip->GetSingleWordInOperand(op == SpvOpStore ? kStorePtrIdInIdx + : kLoadPtrIdInIdx); + ir::Instruction* ptrInst = get_def_use_mgr()->GetDef(*objId); while (ptrInst->opcode() == SpvOpCopyObject) { *objId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); - ptrInst = def_use_mgr_->GetDef(*objId); + ptrInst = get_def_use_mgr()->GetDef(*objId); } ir::Instruction* objInst = ptrInst; while (objInst->opcode() != SpvOpVariable && - objInst->opcode() != SpvOpFunctionParameter) { + objInst->opcode() != SpvOpFunctionParameter) { if (IsNonPtrAccessChain(objInst->opcode())) { *objId = objInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); - } - else { + } else { assert(objInst->opcode() == SpvOpCopyObject); *objId = objInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); } - objInst = def_use_mgr_->GetDef(*objId); + objInst = get_def_use_mgr()->GetDef(*objId); } return ptrInst; } bool CommonUniformElimPass::IsVolatileStruct(uint32_t type_id) { - assert(def_use_mgr_->GetDef(type_id)->opcode() == SpvOpTypeStruct); - bool has_volatile_deco = false; - dec_mgr_->ForEachDecoration(type_id, SpvDecorationVolatile, - [&has_volatile_deco](const ir::Instruction&){ has_volatile_deco = true;}); - return has_volatile_deco; + assert(get_def_use_mgr()->GetDef(type_id)->opcode() == SpvOpTypeStruct); + return !get_decoration_mgr()->WhileEachDecoration( + type_id, SpvDecorationVolatile, + [](const ir::Instruction&) { return false; }); } -bool CommonUniformElimPass::IsAccessChainToVolatileStructType(const ir::Instruction &AccessChainInst) { +bool CommonUniformElimPass::IsAccessChainToVolatileStructType( + const ir::Instruction& AccessChainInst) { assert(AccessChainInst.opcode() == SpvOpAccessChain); uint32_t ptr_id = AccessChainInst.GetSingleWordInOperand(0); - const ir::Instruction* ptr_inst = def_use_mgr_->GetDef(ptr_id); + const ir::Instruction* ptr_inst = get_def_use_mgr()->GetDef(ptr_id); uint32_t pointee_type_id = GetPointeeTypeId(ptr_inst); const uint32_t num_operands = AccessChainInst.NumOperands(); // walk the type tree: for (uint32_t idx = 3; idx < num_operands; ++idx) { - ir::Instruction* pointee_type = def_use_mgr_->GetDef(pointee_type_id); + ir::Instruction* pointee_type = get_def_use_mgr()->GetDef(pointee_type_id); switch (pointee_type->opcode()) { case SpvOpTypeMatrix: @@ -161,8 +130,10 @@ bool CommonUniformElimPass::IsAccessChainToVolatileStructType(const ir::Instruct if (idx < num_operands - 1) { const uint32_t index_id = AccessChainInst.GetSingleWordOperand(idx); - const ir::Instruction* index_inst = def_use_mgr_->GetDef(index_id); - uint32_t index_value = index_inst->GetSingleWordOperand(2); // TODO: replace with GetUintValueFromConstant() + const ir::Instruction* index_inst = + get_def_use_mgr()->GetDef(index_id); + uint32_t index_value = index_inst->GetSingleWordOperand( + 2); // TODO: replace with GetUintValueFromConstant() pointee_type_id = pointee_type->GetSingleWordInOperand(index_value); } break; @@ -178,13 +149,12 @@ bool CommonUniformElimPass::IsVolatileLoad(const ir::Instruction& loadInst) { // Check if this Load instruction has Volatile Memory Access flag if (loadInst.NumOperands() == 4) { uint32_t memory_access_mask = loadInst.GetSingleWordOperand(3); - if (memory_access_mask & SpvMemoryAccessVolatileMask) - return true; + if (memory_access_mask & SpvMemoryAccessVolatileMask) return true; } // If we load a struct directly (result type is struct), // check if the struct is decorated volatile uint32_t type_id = loadInst.type_id(); - if (def_use_mgr_->GetDef(type_id)->opcode() == SpvOpTypeStruct) + if (get_def_use_mgr()->GetDef(type_id)->opcode() == SpvOpTypeStruct) return IsVolatileStruct(type_id); else return false; @@ -192,114 +162,70 @@ bool CommonUniformElimPass::IsVolatileLoad(const ir::Instruction& loadInst) { bool CommonUniformElimPass::IsUniformVar(uint32_t varId) { const ir::Instruction* varInst = - def_use_mgr_->id_to_defs().find(varId)->second; - if (varInst->opcode() != SpvOpVariable) - return false; + get_def_use_mgr()->id_to_defs().find(varId)->second; + if (varInst->opcode() != SpvOpVariable) return false; const uint32_t varTypeId = varInst->type_id(); const ir::Instruction* varTypeInst = - def_use_mgr_->id_to_defs().find(varTypeId)->second; + get_def_use_mgr()->id_to_defs().find(varTypeId)->second; return varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) == - SpvStorageClassUniform || - varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) == - SpvStorageClassUniformConstant; + SpvStorageClassUniform || + varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) == + SpvStorageClassUniformConstant; } bool CommonUniformElimPass::HasUnsupportedDecorates(uint32_t id) const { - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses == nullptr) - return false; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (IsNonTypeDecorate(op)) - return true; - } - return false; + return !get_def_use_mgr()->WhileEachUser(id, [this](ir::Instruction* user) { + if (IsNonTypeDecorate(user->opcode())) return false; + return true; + }); } bool CommonUniformElimPass::HasOnlyNamesAndDecorates(uint32_t id) const { - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses == nullptr) + return get_def_use_mgr()->WhileEachUser(id, [this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (op != SpvOpName && !IsNonTypeDecorate(op)) return false; return true; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (op != SpvOpName && !IsNonTypeDecorate(op)) - return false; - } - return true; -} - -void CommonUniformElimPass::KillNamesAndDecorates(uint32_t id) { - // TODO(greg-lunarg): Remove id from any OpGroupDecorate and - // kill if no other operands. - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses == nullptr) - return; - std::list killList; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (op != SpvOpName && !IsNonTypeDecorate(op)) - continue; - killList.push_back(u.inst); - } - for (auto kip : killList) - def_use_mgr_->KillInst(kip); -} - -void CommonUniformElimPass::KillNamesAndDecorates(ir::Instruction* inst) { - // TODO(greg-lunarg): Remove inst from any OpGroupDecorate and - // kill if not other operands. - const uint32_t rId = inst->result_id(); - if (rId == 0) - return; - KillNamesAndDecorates(rId); + }); } void CommonUniformElimPass::DeleteIfUseless(ir::Instruction* inst) { const uint32_t resId = inst->result_id(); assert(resId != 0); if (HasOnlyNamesAndDecorates(resId)) { - KillNamesAndDecorates(resId); - def_use_mgr_->KillInst(inst); + context()->KillInst(inst); } } -void CommonUniformElimPass::ReplaceAndDeleteLoad(ir::Instruction* loadInst, - uint32_t replId, - ir::Instruction* ptrInst) { +ir::Instruction* CommonUniformElimPass::ReplaceAndDeleteLoad( + ir::Instruction* loadInst, uint32_t replId, ir::Instruction* ptrInst) { const uint32_t loadId = loadInst->result_id(); - KillNamesAndDecorates(loadId); - (void) def_use_mgr_->ReplaceAllUsesWith(loadId, replId); + context()->KillNamesAndDecorates(loadId); + (void)context()->ReplaceAllUsesWith(loadId, replId); // remove load instruction - def_use_mgr_->KillInst(loadInst); + ir::Instruction* next_instruction = context()->KillInst(loadInst); // if access chain, see if it can be removed as well - if (IsNonPtrAccessChain(ptrInst->opcode())) - DeleteIfUseless(ptrInst); -} - -uint32_t CommonUniformElimPass::GetPointeeTypeId(const ir::Instruction* ptrInst) { - const uint32_t ptrTypeId = ptrInst->type_id(); - const ir::Instruction* ptrTypeInst = def_use_mgr_->GetDef(ptrTypeId); - return ptrTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); + if (IsNonPtrAccessChain(ptrInst->opcode())) DeleteIfUseless(ptrInst); + return next_instruction; } -void CommonUniformElimPass::GenACLoadRepl(const ir::Instruction* ptrInst, - std::vector>* newInsts, - uint32_t* resultId) { - +void CommonUniformElimPass::GenACLoadRepl( + const ir::Instruction* ptrInst, + std::vector>* newInsts, + uint32_t* resultId) { // Build and append Load const uint32_t ldResultId = TakeNextId(); const uint32_t varId = - ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); - const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); + ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(varId); assert(varInst->opcode() == SpvOpVariable); const uint32_t varPteTypeId = GetPointeeTypeId(varInst); std::vector load_in_operands; load_in_operands.push_back( - ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, - std::initializer_list{varId})); - std::unique_ptr newLoad(new ir::Instruction(SpvOpLoad, - varPteTypeId, ldResultId, load_in_operands)); - def_use_mgr_->AnalyzeInstDefUse(&*newLoad); + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, + std::initializer_list{varId})); + std::unique_ptr newLoad(new ir::Instruction( + context(), SpvOpLoad, varPteTypeId, ldResultId, load_in_operands)); + get_def_use_mgr()->AnalyzeInstDefUse(&*newLoad); newInsts->emplace_back(std::move(newLoad)); // Build and append Extract @@ -307,90 +233,83 @@ void CommonUniformElimPass::GenACLoadRepl(const ir::Instruction* ptrInst, const uint32_t ptrPteTypeId = GetPointeeTypeId(ptrInst); std::vector ext_in_opnds; ext_in_opnds.push_back( - ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, - std::initializer_list{ldResultId})); + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, + std::initializer_list{ldResultId})); uint32_t iidIdx = 0; - ptrInst->ForEachInId([&iidIdx, &ext_in_opnds, this](const uint32_t *iid) { + ptrInst->ForEachInId([&iidIdx, &ext_in_opnds, this](const uint32_t* iid) { if (iidIdx > 0) { - const ir::Instruction* cInst = def_use_mgr_->GetDef(*iid); + const ir::Instruction* cInst = get_def_use_mgr()->GetDef(*iid); uint32_t val = cInst->GetSingleWordInOperand(kConstantValueInIdx); ext_in_opnds.push_back( - ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - std::initializer_list{val})); + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + std::initializer_list{val})); } ++iidIdx; }); - std::unique_ptr newExt(new ir::Instruction( - SpvOpCompositeExtract, ptrPteTypeId, extResultId, ext_in_opnds)); - def_use_mgr_->AnalyzeInstDefUse(&*newExt); + std::unique_ptr newExt( + new ir::Instruction(context(), SpvOpCompositeExtract, ptrPteTypeId, + extResultId, ext_in_opnds)); + get_def_use_mgr()->AnalyzeInstDefUse(&*newExt); newInsts->emplace_back(std::move(newExt)); *resultId = extResultId; } bool CommonUniformElimPass::IsConstantIndexAccessChain(ir::Instruction* acp) { uint32_t inIdx = 0; - uint32_t nonConstCnt = 0; - acp->ForEachInId([&inIdx, &nonConstCnt, this](uint32_t* tid) { + return acp->WhileEachInId([&inIdx, this](uint32_t* tid) { if (inIdx > 0) { - ir::Instruction* opInst = def_use_mgr_->GetDef(*tid); - if (opInst->opcode() != SpvOpConstant) ++nonConstCnt; + ir::Instruction* opInst = get_def_use_mgr()->GetDef(*tid); + if (opInst->opcode() != SpvOpConstant) return false; } ++inIdx; + return true; }); - return nonConstCnt == 0; } bool CommonUniformElimPass::UniformAccessChainConvert(ir::Function* func) { bool modified = false; for (auto bi = func->begin(); bi != func->end(); ++bi) { - for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - if (ii->opcode() != SpvOpLoad) - continue; + for (ir::Instruction* inst = &*bi->begin(); inst; inst = inst->NextNode()) { + if (inst->opcode() != SpvOpLoad) continue; uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsNonPtrAccessChain(ptrInst->opcode())) - continue; + ir::Instruction* ptrInst = GetPtr(inst, &varId); + if (!IsNonPtrAccessChain(ptrInst->opcode())) continue; // Do not convert nested access chains if (ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx) != varId) continue; - if (!IsUniformVar(varId)) - continue; - if (!IsConstantIndexAccessChain(ptrInst)) - continue; - if (HasUnsupportedDecorates(ii->result_id())) - continue; - if (HasUnsupportedDecorates(ptrInst->result_id())) - continue; - if (IsVolatileLoad(*ii)) - continue; - if (IsAccessChainToVolatileStructType(*ptrInst)) - continue; + if (!IsUniformVar(varId)) continue; + if (!IsConstantIndexAccessChain(ptrInst)) continue; + if (HasUnsupportedDecorates(inst->result_id())) continue; + if (HasUnsupportedDecorates(ptrInst->result_id())) continue; + if (IsVolatileLoad(*inst)) continue; + if (IsAccessChainToVolatileStructType(*ptrInst)) continue; std::vector> newInsts; uint32_t replId; GenACLoadRepl(ptrInst, &newInsts, &replId); - ReplaceAndDeleteLoad(&*ii, replId, ptrInst); - ++ii; - ii = ii.InsertBefore(std::move(newInsts)); - ++ii; + inst = ReplaceAndDeleteLoad(inst, replId, ptrInst); + inst = inst->InsertBefore(std::move(newInsts)); modified = true; - } + }; } return modified; } void CommonUniformElimPass::ComputeStructuredSuccessors(ir::Function* func) { + block2structured_succs_.clear(); for (auto& blk : *func) { // If header, make merge block first successor. - uint32_t cbid; - const uint32_t mbid = MergeBlockIdIfAny(blk, &cbid); + uint32_t mbid = blk.MergeBlockIdIfAny(); if (mbid != 0) { - block2structured_succs_[&blk].push_back(id2block_[mbid]); - if (cbid != 0) - block2structured_succs_[&blk].push_back(id2block_[cbid]); + block2structured_succs_[&blk].push_back(cfg()->block(mbid)); + uint32_t cbid = blk.ContinueBlockIdIfAny(); + if (cbid != 0) { + block2structured_succs_[&blk].push_back(cfg()->block(mbid)); + } } // add true successors - blk.ForEachSuccessorLabel([&blk, this](uint32_t sbid) { - block2structured_succs_[&blk].push_back(id2block_[sbid]); + const auto& const_blk = blk; + const_blk.ForEachSuccessorLabel([&blk, this](const uint32_t sbid) { + block2structured_succs_[&blk].push_back(cfg()->block(sbid)); }); } } @@ -402,16 +321,18 @@ void CommonUniformElimPass::ComputeStructuredOrder( auto ignore_block = [](cbb_ptr) {}; auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; auto get_structured_successors = [this](const ir::BasicBlock* block) { - return &(block2structured_succs_[block]); }; + return &(block2structured_succs_[block]); + }; // TODO(greg-lunarg): Get rid of const_cast by making moving const // out of the cfa.h prototypes and into the invoking code. auto post_order = [&](cbb_ptr b) { - order->push_front(const_cast(b)); }; - + order->push_front(const_cast(b)); + }; + order->clear(); spvtools::CFA::DepthFirstTraversal( - &*func->begin(), get_structured_successors, ignore_block, - post_order, ignore_edge); + &*func->begin(), get_structured_successors, ignore_block, post_order, + ignore_edge); } bool CommonUniformElimPass::CommonUniformLoadElimination(ir::Function* func) { @@ -426,8 +347,11 @@ bool CommonUniformElimPass::CommonUniformLoadElimination(ir::Function* func) { // Find insertion point in first block to copy non-dominating loads. auto insertItr = func->begin()->begin(); while (insertItr->opcode() == SpvOpVariable || - insertItr->opcode() == SpvOpNop) + insertItr->opcode() == SpvOpNop) ++insertItr; + // Update insertItr until it will not be removed. Without this code, + // ReplaceAndDeleteLoad() can set |insertItr| as a dangling pointer. + while (IsUniformLoadToBeRemoved(&*insertItr)) ++insertItr; uint32_t mergeBlockId = 0; for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); ++bi) { ir::BasicBlock* bp = *bi; @@ -436,52 +360,47 @@ bool CommonUniformElimPass::CommonUniformLoadElimination(ir::Function* func) { if (mergeBlockId == bp->id()) { mergeBlockId = 0; insertItr = bp->begin(); + // Update insertItr until it will not be removed. Without this code, + // ReplaceAndDeleteLoad() can set |insertItr| as a dangling pointer. + while (IsUniformLoadToBeRemoved(&*insertItr)) ++insertItr; } - for (auto ii = bp->begin(); ii != bp->end(); ++ii) { - if (ii->opcode() != SpvOpLoad) - continue; + for (ir::Instruction* inst = &*bp->begin(); inst; inst = inst->NextNode()) { + if (inst->opcode() != SpvOpLoad) continue; uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (ptrInst->opcode() != SpvOpVariable) - continue; - if (!IsUniformVar(varId)) - continue; - if (IsSamplerOrImageVar(varId)) - continue; - if (HasUnsupportedDecorates(ii->result_id())) - continue; - if (IsVolatileLoad(*ii)) - continue; + ir::Instruction* ptrInst = GetPtr(inst, &varId); + if (ptrInst->opcode() != SpvOpVariable) continue; + if (!IsUniformVar(varId)) continue; + if (IsSamplerOrImageVar(varId)) continue; + if (HasUnsupportedDecorates(inst->result_id())) continue; + if (IsVolatileLoad(*inst)) continue; uint32_t replId; const auto uItr = uniform2load_id_.find(varId); if (uItr != uniform2load_id_.end()) { replId = uItr->second; - } - else { + } else { if (mergeBlockId == 0) { // Load is in dominating block; just remember it - uniform2load_id_[varId] = ii->result_id(); + uniform2load_id_[varId] = inst->result_id(); continue; - } - else { + } else { // Copy load into most recent dominating block and remember it replId = TakeNextId(); - std::unique_ptr newLoad(new ir::Instruction(SpvOpLoad, - ii->type_id(), replId, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {varId}}})); - def_use_mgr_->AnalyzeInstDefUse(&*newLoad); + std::unique_ptr newLoad(new ir::Instruction( + context(), SpvOpLoad, inst->type_id(), replId, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {varId}}})); + get_def_use_mgr()->AnalyzeInstDefUse(&*newLoad); insertItr = insertItr.InsertBefore(std::move(newLoad)); ++insertItr; uniform2load_id_[varId] = replId; } } - ReplaceAndDeleteLoad(&*ii, replId, ptrInst); + inst = ReplaceAndDeleteLoad(inst, replId, ptrInst); modified = true; } // If we are outside of any control construct and entering one, remember // the id of the merge block if (mergeBlockId == 0) { - uint32_t dummy; - mergeBlockId = MergeBlockIdIfAny(*bp, &dummy); + mergeBlockId = bp->MergeBlockIdIfAny(); } } return modified; @@ -491,31 +410,24 @@ bool CommonUniformElimPass::CommonUniformLoadElimBlock(ir::Function* func) { bool modified = false; for (auto& blk : *func) { uniform2load_id_.clear(); - for (auto ii = blk.begin(); ii != blk.end(); ++ii) { - if (ii->opcode() != SpvOpLoad) - continue; + for (ir::Instruction* inst = &*blk.begin(); inst; inst = inst->NextNode()) { + if (inst->opcode() != SpvOpLoad) continue; uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (ptrInst->opcode() != SpvOpVariable) - continue; - if (!IsUniformVar(varId)) - continue; - if (!IsSamplerOrImageVar(varId)) - continue; - if (HasUnsupportedDecorates(ii->result_id())) - continue; - if (IsVolatileLoad(*ii)) - continue; + ir::Instruction* ptrInst = GetPtr(inst, &varId); + if (ptrInst->opcode() != SpvOpVariable) continue; + if (!IsUniformVar(varId)) continue; + if (!IsSamplerOrImageVar(varId)) continue; + if (HasUnsupportedDecorates(inst->result_id())) continue; + if (IsVolatileLoad(*inst)) continue; uint32_t replId; const auto uItr = uniform2load_id_.find(varId); if (uItr != uniform2load_id_.end()) { replId = uItr->second; - } - else { - uniform2load_id_[varId] = ii->result_id(); + } else { + uniform2load_id_[varId] = inst->result_id(); continue; } - ReplaceAndDeleteLoad(&*ii, replId, ptrInst); + inst = ReplaceAndDeleteLoad(inst, replId, ptrInst); modified = true; } } @@ -526,13 +438,10 @@ bool CommonUniformElimPass::CommonExtractElimination(ir::Function* func) { // Find all composite ids with duplicate extracts. for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - if (ii->opcode() != SpvOpCompositeExtract) - continue; + if (ii->opcode() != SpvOpCompositeExtract) continue; // TODO(greg-lunarg): Support multiple indices - if (ii->NumInOperands() > 2) - continue; - if (HasUnsupportedDecorates(ii->result_id())) - continue; + if (ii->NumInOperands() > 2) continue; + if (HasUnsupportedDecorates(ii->result_id())) continue; uint32_t compId = ii->GetSingleWordInOperand(kExtractCompositeIdInIdx); uint32_t idx = ii->GetSingleWordInOperand(kExtractIdx0InIdx); comp2idx2inst_[compId][idx].push_back(&*ii); @@ -544,22 +453,21 @@ bool CommonUniformElimPass::CommonExtractElimination(ir::Function* func) { for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { const auto cItr = comp2idx2inst_.find(ii->result_id()); - if (cItr == comp2idx2inst_.end()) - continue; + if (cItr == comp2idx2inst_.end()) continue; for (auto idxItr : cItr->second) { - if (idxItr.second.size() < 2) - continue; + if (idxItr.second.size() < 2) continue; uint32_t replId = TakeNextId(); - std::unique_ptr newExtract(new ir::Instruction(*idxItr.second.front())); + std::unique_ptr newExtract( + idxItr.second.front()->Clone(context())); newExtract->SetResultId(replId); - def_use_mgr_->AnalyzeInstDefUse(&*newExtract); + get_def_use_mgr()->AnalyzeInstDefUse(&*newExtract); ++ii; ii = ii.InsertBefore(std::move(newExtract)); for (auto instItr : idxItr.second) { uint32_t resId = instItr->result_id(); - KillNamesAndDecorates(resId); - (void)def_use_mgr_->ReplaceAllUsesWith(resId, replId); - def_use_mgr_->KillInst(instItr); + context()->KillNamesAndDecorates(resId); + (void)context()->ReplaceAllUsesWith(resId, replId); + context()->KillInst(instItr); } modified = true; } @@ -569,47 +477,30 @@ bool CommonUniformElimPass::CommonExtractElimination(ir::Function* func) { } bool CommonUniformElimPass::EliminateCommonUniform(ir::Function* func) { - bool modified = false; - modified |= UniformAccessChainConvert(func); - modified |= CommonUniformLoadElimination(func); - modified |= CommonExtractElimination(func); + bool modified = false; + modified |= UniformAccessChainConvert(func); + modified |= CommonUniformLoadElimination(func); + modified |= CommonExtractElimination(func); - modified |= CommonUniformLoadElimBlock(func); - return modified; + modified |= CommonUniformLoadElimBlock(func); + return modified; } -void CommonUniformElimPass::Initialize(ir::Module* module) { +void CommonUniformElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); - module_ = module; - - // Initialize function and block maps - id2block_.clear(); - for (auto& fn : *module_) - for (auto& blk : fn) - id2block_[blk.id()] = &blk; - - // Clear collections - block2structured_succs_.clear(); - label2preds_.clear(); + // Clear collections. comp2idx2inst_.clear(); - // TODO(greg-lunarg): Use def/use from previous pass - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - dec_mgr_.reset(new analysis::DecorationManager(module_)); - - // Initialize next unused Id. - next_id_ = module->id_bound(); - // Initialize extension whitelist InitExtensions(); -}; - +} bool CommonUniformElimPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } @@ -619,24 +510,22 @@ bool CommonUniformElimPass::AllExtensionsSupported() const { Pass::Status CommonUniformElimPass::ProcessImpl() { // Assumes all control flow structured. // TODO(greg-lunarg): Do SSA rewrite for non-structured control flow - if (!module_->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) return Status::SuccessWithoutChange; // Assumes logical addressing only // TODO(greg-lunarg): Add support for physical addressing - if (module_->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) return Status::SuccessWithoutChange; // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; + for (auto& ai : get_module()->annotations()) + if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; // If non-32-bit integer type in module, terminate processing // TODO(): Handle non-32-bit integer constants in access chains - for (const ir::Instruction& inst : module_->types_values()) + for (const ir::Instruction& inst : get_module()->types_values()) if (inst.opcode() == SpvOpTypeInt && inst.GetSingleWordInOperand(kTypeIntWidthInIdx) != 32) return Status::SuccessWithoutChange; @@ -644,48 +533,55 @@ Pass::Status CommonUniformElimPass::ProcessImpl() { ProcessFunction pfn = [this](ir::Function* fp) { return EliminateCommonUniform(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(module_); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -CommonUniformElimPass::CommonUniformElimPass() - : module_(nullptr), def_use_mgr_(nullptr), next_id_(0) {} +CommonUniformElimPass::CommonUniformElimPass() {} -Pass::Status CommonUniformElimPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status CommonUniformElimPass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } void CommonUniformElimPass::InitExtensions() { extensions_whitelist_.clear(); extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", }); } } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.h index 47c77676e11b6bafddaf948dc449a1a70c33366e..eb586f2d887d987764da0a6224b7b7fb28477abb 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/common_uniform_elim_pass.h @@ -24,10 +24,11 @@ #include #include -#include "def_use_manager.h" +#include "basic_block.h" #include "decoration_manager.h" +#include "def_use_manager.h" +#include "ir_context.h" #include "module.h" -#include "basic_block.h" #include "pass.h" namespace spvtools { @@ -35,15 +36,15 @@ namespace opt { // See optimizer.hpp for documentation. class CommonUniformElimPass : public Pass { - using cbb_ptr = const ir::BasicBlock*; + using cbb_ptr = const ir::BasicBlock*; public: - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; + using GetBlocksFunction = + std::function*(const ir::BasicBlock*)>; CommonUniformElimPass(); const char* name() const override { return "eliminate-common-uniform"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; private: // Returns true if |opcode| is a non-ptr access chain op @@ -56,9 +57,6 @@ class CommonUniformElimPass : public Pass { // Returns true if |varId| is a variable containing a sampler or image. bool IsSamplerOrImageVar(uint32_t varId) const; - // Return true if |block_ptr| is loop header block - bool IsLoopHeader(ir::BasicBlock* block_ptr); - // Given a load or store pointed at by |ip|, return the top-most // non-CopyObj in its pointer operand. Also return the base pointer // in |objId|. @@ -74,7 +72,8 @@ class CommonUniformElimPass : public Pass { // Given an OpAccessChain instruction, return true // if the accessed variable belongs to a volatile // decorated object or member of a struct type - bool IsAccessChainToVolatileStructType(const ir::Instruction &AccessChainInst); + bool IsAccessChainToVolatileStructType( + const ir::Instruction& AccessChainInst); // Given an OpLoad instruction, return true if // OpLoad has a Volatile Memory Access flag or if @@ -87,29 +86,20 @@ class CommonUniformElimPass : public Pass { // Return true if all uses of |id| are only name or decorate ops. bool HasOnlyNamesAndDecorates(uint32_t id) const; - // Kill all name and decorate ops using |inst| - void KillNamesAndDecorates(ir::Instruction* inst); - - // Kill all name and decorate ops using |id| - void KillNamesAndDecorates(uint32_t id); - // Delete inst if it has no uses. Assumes inst has a resultId. void DeleteIfUseless(ir::Instruction* inst); // Replace all instances of load's id with replId and delete load // and its access chain, if any - void ReplaceAndDeleteLoad(ir::Instruction* loadInst, - uint32_t replId, - ir::Instruction* ptrInst); - - // Return type id for pointer's pointee - uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst); + ir::Instruction* ReplaceAndDeleteLoad(ir::Instruction* loadInst, + uint32_t replId, + ir::Instruction* ptrInst); // For the (constant index) access chain ptrInst, create an // equivalent load and extract void GenACLoadRepl(const ir::Instruction* ptrInst, - std::vector>* newInsts, - uint32_t* resultId); + std::vector>* newInsts, + uint32_t* resultId); // Return true if all indices are constant bool IsConstantIndexAccessChain(ir::Instruction* acp); @@ -117,32 +107,35 @@ class CommonUniformElimPass : public Pass { // Convert all uniform access chain loads into load/extract. bool UniformAccessChainConvert(ir::Function* func); - // Returns the id of the merge block declared by a merge instruction in - // this block, if any. If none, returns zero. - uint32_t MergeBlockIdIfAny(const ir::BasicBlock& blk, uint32_t* cbid); - // Compute structured successors for function |func|. // A block's structured successors are the blocks it branches to // together with its declared merge block if it has one. // When order matters, the merge block always appears first. - // This assures correct depth first search in the presence of early + // This assures correct depth first search in the presence of early // returns and kills. If the successor vector contain duplicates // if the merge block, they are safely ignored by DFS. + // + // TODO(dnovillo): This pass computes structured successors slightly different + // than the implementation in class Pass. Can this be re-factored? void ComputeStructuredSuccessors(ir::Function* func); // Compute structured block order for |func| into |structuredOrder|. This // order has the property that dominators come before all blocks they // dominate and merge blocks come after all blocks that are in the control // constructs of their header. + // + // TODO(dnovillo): This pass computes structured order slightly different + // than the implementation in class Pass. Can this be re-factored? void ComputeStructuredOrder(ir::Function* func, - std::list* order); + std::list* order); // Eliminate loads of uniform variables which have previously been loaded. // If first load is in control flow, move it to first block of function. // Most effective if preceded by UniformAccessChainRemoval(). bool CommonUniformLoadElimination(ir::Function* func); - // Eliminate loads of uniform sampler and image variables which have previously + // Eliminate loads of uniform sampler and image variables which have + // previously // been loaded in the same block for types whose loads cannot cross blocks. bool CommonUniformLoadElimBlock(ir::Function* func); @@ -153,11 +146,11 @@ class CommonUniformElimPass : public Pass { bool CommonExtractElimination(ir::Function* func); // For function |func|, first change all uniform constant index - // access chain loads into equivalent composite extracts. Then consolidate + // access chain loads into equivalent composite extracts. Then consolidate // identical uniform loads into one uniform load. Finally, consolidate // identical uniform extracts into one uniform extract. This may require // moving a load or extract to a point which dominates all uses. - // Return true if func is modified. + // Return true if func is modified. // // This pass requires the function to have structured control flow ie shader // capability. It also requires logical addressing ie Addresses capability @@ -177,54 +170,42 @@ class CommonUniformElimPass : public Pass { return (op == SpvOpDecorate || op == SpvOpDecorateId); } - inline void FinalizeNextId(ir::Module* module) { - module->SetIdBound(next_id_); - } - - inline uint32_t TakeNextId() { - return next_id_++; + // Return true if |inst| is an instruction that loads uniform variable and + // can be replaced with other uniform load instruction. + bool IsUniformLoadToBeRemoved(ir::Instruction* inst) { + if (inst->opcode() == SpvOpLoad) { + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(inst, &varId); + if (ptrInst->opcode() == SpvOpVariable && IsUniformVar(varId) && + !IsSamplerOrImageVar(varId) && + !HasUnsupportedDecorates(inst->result_id()) && !IsVolatileLoad(*inst)) + return true; + } + return false; } - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); - // Module this pass is processing - ir::Module* module_; - - // Def-Uses for the module we are processing - std::unique_ptr def_use_mgr_; - - // Decorations for the module we are processing - std::unique_ptr dec_mgr_; - - // Map from block's label id to block. - std::unordered_map id2block_; - - // Map from block to its structured successor blocks. See - // ComputeStructuredSuccessors() for definition. - std::unordered_map> - block2structured_succs_; - - // Map from block's label id to its predecessor blocks ids - std::unordered_map> label2preds_; - // Map from uniform variable id to its common load id std::unordered_map uniform2load_id_; // Map of extract composite ids to map of indices to insts // TODO(greg-lunarg): Consider std::vector. - std::unordered_map>> comp2idx2inst_; + std::unordered_map>> + comp2idx2inst_; // Extensions supported by this pass. std::unordered_set extensions_whitelist_; - // Next unused ID - uint32_t next_id_; + // Map from block to its structured successor blocks. See + // ComputeStructuredSuccessors() for definition. + std::unordered_map> + block2structured_succs_; }; } // namespace opt } // namespace spvtools #endif // LIBSPIRV_OPT_SSAMEM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.cpp index cf5eacf677b84e9790a26dae0453ebe681b877ad..98a207da73bc221cae4e9d3be21b338fa32fadfa 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include "compact_ids_pass.h" +#include "ir_context.h" #include #include @@ -23,42 +24,48 @@ namespace opt { using ir::Instruction; using ir::Operand; -Pass::Status CompactIdsPass::Process(ir::Module* module) { +Pass::Status CompactIdsPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; std::unordered_map result_id_mapping; - module->ForEachInst([&result_id_mapping, &modified] (Instruction* inst) { - auto operand = inst->begin(); - while (operand != inst->end()) { - const auto type = operand->type; - if (spvIsIdType(type)) { - assert(operand->words.size() == 1); - uint32_t& id = operand->words[0]; - auto it = result_id_mapping.find(id); - if (it == result_id_mapping.end()) { - const uint32_t new_id = - static_cast(result_id_mapping.size()) + 1; - const auto insertion_result = result_id_mapping.emplace(id, new_id); - it = insertion_result.first; - assert(insertion_result.second); - } - if (id != it->second) { - modified = true; - id = it->second; - // Update data cached in the instruction object. - if (type == SPV_OPERAND_TYPE_RESULT_ID) { - inst->SetResultId(id); - } else if (type == SPV_OPERAND_TYPE_TYPE_ID) { - inst->SetResultType(id); + c->module()->ForEachInst( + [&result_id_mapping, &modified](Instruction* inst) { + auto operand = inst->begin(); + while (operand != inst->end()) { + const auto type = operand->type; + if (spvIsIdType(type)) { + assert(operand->words.size() == 1); + uint32_t& id = operand->words[0]; + auto it = result_id_mapping.find(id); + if (it == result_id_mapping.end()) { + const uint32_t new_id = + static_cast(result_id_mapping.size()) + 1; + const auto insertion_result = + result_id_mapping.emplace(id, new_id); + it = insertion_result.first; + assert(insertion_result.second); + } + if (id != it->second) { + modified = true; + id = it->second; + // Update data cached in the instruction object. + if (type == SPV_OPERAND_TYPE_RESULT_ID) { + inst->SetResultId(id); + } else if (type == SPV_OPERAND_TYPE_TYPE_ID) { + inst->SetResultType(id); + } + } } + ++operand; } - } - ++operand; - } - }, true); + }, + true); if (modified) - module->SetIdBound(static_cast(result_id_mapping.size() + 1)); + c->module()->SetIdBound( + static_cast(result_id_mapping.size() + 1)); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.h index 41918dd813991628b43470e9053dd071f6e04dde..cf7c3fb7219373fa11fc0db12530d1e58ccfb391 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/compact_ids_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_COMPACT_IDS_PASS_H_ #define LIBSPIRV_OPT_COMPACT_IDS_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class CompactIdsPass : public Pass { public: const char* name() const override { return "compact-ids"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1fbb71f69d6f54ed18e8c91fce51a3753865b081 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.cpp @@ -0,0 +1,52 @@ +// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018 Valve Corporation +// Copyright (c) 2018 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "composite.h" + +#include "ir_context.h" +#include "iterator.h" +#include "spirv/1.2/GLSL.std.450.h" + +#include + +namespace spvtools { +namespace opt { + +bool ExtInsMatch(const std::vector& extIndices, + const ir::Instruction* insInst, const uint32_t extOffset) { + uint32_t numIndices = static_cast(extIndices.size()) - extOffset; + if (numIndices != insInst->NumInOperands() - 2) return false; + for (uint32_t i = 0; i < numIndices; ++i) + if (extIndices[i + extOffset] != insInst->GetSingleWordInOperand(i + 2)) + return false; + return true; +} + +bool ExtInsConflict(const std::vector& extIndices, + const ir::Instruction* insInst, const uint32_t extOffset) { + if (extIndices.size() - extOffset == insInst->NumInOperands() - 2) + return false; + uint32_t extNumIndices = static_cast(extIndices.size()) - extOffset; + uint32_t insNumIndices = insInst->NumInOperands() - 2; + uint32_t numIndices = std::min(extNumIndices, insNumIndices); + for (uint32_t i = 0; i < numIndices; ++i) + if (extIndices[i + extOffset] != insInst->GetSingleWordInOperand(i + 2)) + return false; + return true; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.h new file mode 100644 index 0000000000000000000000000000000000000000..2153c626ca325abf44cc0aea4f8661ba3852791c --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/composite.h @@ -0,0 +1,50 @@ +// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018 Valve Corporation +// Copyright (c) 2018 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_UTIL_COMPOSITE_PASS_H_ +#define LIBSPIRV_UTIL_COMPOSITE_PASS_H_ + +#include +#include +#include +#include +#include + +#include "basic_block.h" +#include "def_use_manager.h" +#include "ir_context.h" +#include "module.h" + +namespace spvtools { +namespace opt { + +// Return true if the extract indices in |extIndices| starting at |extOffset| +// match indices of insert |insInst|. +bool ExtInsMatch(const std::vector& extIndices, + const ir::Instruction* insInst, const uint32_t extOffset); + +// Return true if indices in |extIndices| starting at |extOffset| and +// indices of insert |insInst| conflict, specifically, if the insert +// changes bits specified by the extract, but changes either more bits +// or less bits than the extract specifies, meaning the exact value being +// inserted cannot be used to replace the extract. +bool ExtInsConflict(const std::vector& extIndices, + const ir::Instruction* insInst, const uint32_t extOffset); + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_UTIL_COMPOSITE_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.cpp new file mode 100644 index 0000000000000000000000000000000000000000..361d715d950aea8501566e9abada2b1ca86741cf --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.cpp @@ -0,0 +1,628 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "const_folding_rules.h" + +namespace spvtools { +namespace opt { + +namespace { +const uint32_t kExtractCompositeIdInIdx = 0; + +// Folds an OpcompositeExtract where input is a composite constant. +ConstantFoldingRule FoldExtractWithConstants() { + return [](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + const analysis::Constant* c = constants[kExtractCompositeIdInIdx]; + if (c == nullptr) { + return nullptr; + } + + for (uint32_t i = 1; i < inst->NumInOperands(); ++i) { + uint32_t element_index = inst->GetSingleWordInOperand(i); + if (c->AsNullConstant()) { + // Return Null for the return type. + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + return const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), {}); + } + + auto cc = c->AsCompositeConstant(); + assert(cc != nullptr); + auto components = cc->GetComponents(); + c = components[element_index]; + } + return c; + }; +} + +ConstantFoldingRule FoldVectorShuffleWithConstants() { + return [](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + assert(inst->opcode() == SpvOpVectorShuffle); + const analysis::Constant* c1 = constants[0]; + const analysis::Constant* c2 = constants[1]; + if (c1 == nullptr || c2 == nullptr) { + return nullptr; + } + + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* element_type = c1->type()->AsVector()->element_type(); + + std::vector c1_components; + if (const analysis::VectorConstant* vec_const = c1->AsVectorConstant()) { + c1_components = vec_const->GetComponents(); + } else { + assert(c1->AsNullConstant()); + const analysis::Constant* element = + const_mgr->GetConstant(element_type, {}); + c1_components.resize(c1->type()->AsVector()->element_count(), element); + } + std::vector c2_components; + if (const analysis::VectorConstant* vec_const = c2->AsVectorConstant()) { + c2_components = vec_const->GetComponents(); + } else { + assert(c2->AsNullConstant()); + const analysis::Constant* element = + const_mgr->GetConstant(element_type, {}); + c2_components.resize(c2->type()->AsVector()->element_count(), element); + } + + std::vector ids; + for (uint32_t i = 2; i < inst->NumInOperands(); ++i) { + uint32_t index = inst->GetSingleWordInOperand(i); + if (index < c1_components.size()) { + ir::Instruction* member_inst = + const_mgr->GetDefiningInstruction(c1_components[index]); + ids.push_back(member_inst->result_id()); + } else { + ir::Instruction* member_inst = const_mgr->GetDefiningInstruction( + c2_components[index - c1_components.size()]); + ids.push_back(member_inst->result_id()); + } + } + + analysis::TypeManager* type_mgr = context->get_type_mgr(); + return const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), ids); + }; +} + +ConstantFoldingRule FoldVectorTimesScalar() { + return [](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + assert(inst->opcode() == SpvOpVectorTimesScalar); + const analysis::Constant* c1 = constants[0]; + const analysis::Constant* c2 = constants[1]; + if (c1 == nullptr || c2 == nullptr) { + return nullptr; + } + + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + + // Check result type. + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + assert(vector_type != nullptr); + const analysis::Type* element_type = vector_type->element_type(); + assert(element_type != nullptr); + const analysis::Float* float_type = element_type->AsFloat(); + assert(float_type != nullptr); + + // Check types of c1 and c2. + assert(c1->type()->AsVector() == vector_type); + assert(c1->type()->AsVector()->element_type() == element_type && + c2->type() == element_type); + + // Get a float vector that is the result of vector-times-scalar. + std::vector c1_components = + c1->GetVectorComponents(const_mgr); + std::vector ids; + if (float_type->width() == 32) { + float scalar = c2->GetFloat(); + for (uint32_t i = 0; i < c1_components.size(); ++i) { + spvutils::FloatProxy result(c1_components[i]->GetFloat() * + scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } else if (float_type->width() == 64) { + double scalar = c2->GetDouble(); + for (uint32_t i = 0; i < c1_components.size(); ++i) { + spvutils::FloatProxy result(c1_components[i]->GetDouble() * + scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } + return nullptr; + }; +} + +ConstantFoldingRule FoldCompositeWithConstants() { + // Folds an OpCompositeConstruct where all of the inputs are constants to a + // constant. A new constant is created if necessary. + return [](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* new_type = type_mgr->GetType(inst->type_id()); + + std::vector ids; + for (const analysis::Constant* element_const : constants) { + if (element_const == nullptr) { + return nullptr; + } + uint32_t element_id = const_mgr->FindDeclaredConstant(element_const); + if (element_id == 0) { + return nullptr; + } + ids.push_back(element_id); + } + return const_mgr->GetConstant(new_type, ids); + }; +} + +// The interface for a function that returns the result of applying a scalar +// floating-point binary operation on |a| and |b|. The type of the return value +// will be |type|. The input constants must also be of type |type|. +using UnaryScalarFoldingRule = std::function; + +// The interface for a function that returns the result of applying a scalar +// floating-point binary operation on |a| and |b|. The type of the return value +// will be |type|. The input constants must also be of type |type|. +using BinaryScalarFoldingRule = std::function; + +// Returns a |ConstantFoldingRule| that folds unary floating point scalar ops +// using |scalar_rule| and unary float point vectors ops by applying +// |scalar_rule| to the elements of the vector. The |ConstantFoldingRule| +// that is returned assumes that |constants| contains 1 entry. If they are +// not |nullptr|, then their type is either |Float| or |Integer| or a |Vector| +// whose element type is |Float| or |Integer|. +ConstantFoldingRule FoldFPUnaryOp(UnaryScalarFoldingRule scalar_rule) { + return [scalar_rule](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return nullptr; + } + + if (constants[0] == nullptr) { + return nullptr; + } + + if (vector_type != nullptr) { + std::vector a_components; + std::vector results_components; + + a_components = constants[0]->GetVectorComponents(const_mgr); + + // Fold each component of the vector. + for (uint32_t i = 0; i < a_components.size(); ++i) { + results_components.push_back(scalar_rule(vector_type->element_type(), + a_components[i], const_mgr)); + if (results_components[i] == nullptr) { + return nullptr; + } + } + + // Build the constant object and return it. + std::vector ids; + for (const analysis::Constant* member : results_components) { + ids.push_back(const_mgr->GetDefiningInstruction(member)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } else { + return scalar_rule(result_type, constants[0], const_mgr); + } + }; +} + +// Returns a |ConstantFoldingRule| that folds floating point scalars using +// |scalar_rule| and vectors of floating point by applying |scalar_rule| to the +// elements of the vector. The |ConstantFoldingRule| that is returned assumes +// that |constants| contains 2 entries. If they are not |nullptr|, then their +// type is either |Float| or a |Vector| whose element type is |Float|. +ConstantFoldingRule FoldFPBinaryOp(BinaryScalarFoldingRule scalar_rule) { + return [scalar_rule](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return nullptr; + } + + if (constants[0] == nullptr || constants[1] == nullptr) { + return nullptr; + } + + if (vector_type != nullptr) { + std::vector a_components; + std::vector b_components; + std::vector results_components; + + a_components = constants[0]->GetVectorComponents(const_mgr); + b_components = constants[1]->GetVectorComponents(const_mgr); + + // Fold each component of the vector. + for (uint32_t i = 0; i < a_components.size(); ++i) { + results_components.push_back(scalar_rule(vector_type->element_type(), + a_components[i], + b_components[i], const_mgr)); + if (results_components[i] == nullptr) { + return nullptr; + } + } + + // Build the constant object and return it. + std::vector ids; + for (const analysis::Constant* member : results_components) { + ids.push_back(const_mgr->GetDefiningInstruction(member)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } else { + return scalar_rule(result_type, constants[0], constants[1], const_mgr); + } + }; +} + +// This macro defines a |UnaryScalarFoldingRule| that performs float to +// integer conversion. +// TODO(greg-lunarg): Support for 64-bit integer types. +UnaryScalarFoldingRule FoldFToIOp() { + return [](const analysis::Type* result_type, const analysis::Constant* a, + analysis::ConstantManager* const_mgr) -> const analysis::Constant* { + assert(result_type != nullptr && a != nullptr); + const analysis::Integer* integer_type = result_type->AsInteger(); + const analysis::Float* float_type = a->type()->AsFloat(); + assert(float_type != nullptr); + assert(integer_type != nullptr); + if (integer_type->width() != 32) return nullptr; + if (float_type->width() == 32) { + float fa = a->GetFloat(); + uint32_t result = integer_type->IsSigned() + ? static_cast(static_cast(fa)) + : static_cast(fa); + std::vector words = {result}; + return const_mgr->GetConstant(result_type, words); + } else if (float_type->width() == 64) { + double fa = a->GetDouble(); + uint32_t result = integer_type->IsSigned() + ? static_cast(static_cast(fa)) + : static_cast(fa); + std::vector words = {result}; + return const_mgr->GetConstant(result_type, words); + } + return nullptr; + }; +} + +// This function defines a |UnaryScalarFoldingRule| that performs integer to +// float conversion. +// TODO(greg-lunarg): Support for 64-bit integer types. +UnaryScalarFoldingRule FoldIToFOp() { + return [](const analysis::Type* result_type, const analysis::Constant* a, + analysis::ConstantManager* const_mgr) -> const analysis::Constant* { + assert(result_type != nullptr && a != nullptr); + const analysis::Integer* integer_type = a->type()->AsInteger(); + const analysis::Float* float_type = result_type->AsFloat(); + assert(float_type != nullptr); + assert(integer_type != nullptr); + if (integer_type->width() != 32) return nullptr; + uint32_t ua = a->GetU32(); + if (float_type->width() == 32) { + float result_val = integer_type->IsSigned() + ? static_cast(static_cast(ua)) + : static_cast(ua); + spvutils::FloatProxy result(result_val); + std::vector words = {result.data()}; + return const_mgr->GetConstant(result_type, words); + } else if (float_type->width() == 64) { + double result_val = integer_type->IsSigned() + ? static_cast(static_cast(ua)) + : static_cast(ua); + spvutils::FloatProxy result(result_val); + std::vector words = result.GetWords(); + return const_mgr->GetConstant(result_type, words); + } + return nullptr; + }; +} + +// This macro defines a |BinaryScalarFoldingRule| that applies |op|. The +// operator |op| must work for both float and double, and use syntax "f1 op f2". +#define FOLD_FPARITH_OP(op) \ + [](const analysis::Type* result_type, const analysis::Constant* a, \ + const analysis::Constant* b, \ + analysis::ConstantManager* const_mgr_in_macro) \ + -> const analysis::Constant* { \ + assert(result_type != nullptr && a != nullptr && b != nullptr); \ + assert(result_type == a->type() && result_type == b->type()); \ + const analysis::Float* float_type_in_macro = result_type->AsFloat(); \ + assert(float_type_in_macro != nullptr); \ + if (float_type_in_macro->width() == 32) { \ + float fa = a->GetFloat(); \ + float fb = b->GetFloat(); \ + spvutils::FloatProxy result_in_macro(fa op fb); \ + std::vector words_in_macro = result_in_macro.GetWords(); \ + return const_mgr_in_macro->GetConstant(result_type, words_in_macro); \ + } else if (float_type_in_macro->width() == 64) { \ + double fa = a->GetDouble(); \ + double fb = b->GetDouble(); \ + spvutils::FloatProxy result_in_macro(fa op fb); \ + std::vector words_in_macro = result_in_macro.GetWords(); \ + return const_mgr_in_macro->GetConstant(result_type, words_in_macro); \ + } \ + return nullptr; \ + } + +// Define the folding rule for conversion between floating point and integer +ConstantFoldingRule FoldFToI() { return FoldFPUnaryOp(FoldFToIOp()); } +ConstantFoldingRule FoldIToF() { return FoldFPUnaryOp(FoldIToFOp()); } + +// Define the folding rules for subtraction, addition, multiplication, and +// division for floating point values. +ConstantFoldingRule FoldFSub() { return FoldFPBinaryOp(FOLD_FPARITH_OP(-)); } +ConstantFoldingRule FoldFAdd() { return FoldFPBinaryOp(FOLD_FPARITH_OP(+)); } +ConstantFoldingRule FoldFMul() { return FoldFPBinaryOp(FOLD_FPARITH_OP(*)); } +ConstantFoldingRule FoldFDiv() { return FoldFPBinaryOp(FOLD_FPARITH_OP(/)); } + +bool CompareFloatingPoint(bool op_result, bool op_unordered, + bool need_ordered) { + if (need_ordered) { + // operands are ordered and Operand 1 is |op| Operand 2 + return !op_unordered && op_result; + } else { + // operands are unordered or Operand 1 is |op| Operand 2 + return op_unordered || op_result; + } +} + +// This macro defines a |BinaryScalarFoldingRule| that applies |op|. The +// operator |op| must work for both float and double, and use syntax "f1 op f2". +#define FOLD_FPCMP_OP(op, ord) \ + [](const analysis::Type* result_type, const analysis::Constant* a, \ + const analysis::Constant* b, \ + analysis::ConstantManager* const_mgr) -> const analysis::Constant* { \ + assert(result_type != nullptr && a != nullptr && b != nullptr); \ + assert(result_type->AsBool()); \ + assert(a->type() == b->type()); \ + const analysis::Float* float_type = a->type()->AsFloat(); \ + assert(float_type != nullptr); \ + if (float_type->width() == 32) { \ + float fa = a->GetFloat(); \ + float fb = b->GetFloat(); \ + bool result = CompareFloatingPoint( \ + fa op fb, std::isnan(fa) || std::isnan(fb), ord); \ + std::vector words = {uint32_t(result)}; \ + return const_mgr->GetConstant(result_type, words); \ + } else if (float_type->width() == 64) { \ + double fa = a->GetDouble(); \ + double fb = b->GetDouble(); \ + bool result = CompareFloatingPoint( \ + fa op fb, std::isnan(fa) || std::isnan(fb), ord); \ + std::vector words = {uint32_t(result)}; \ + return const_mgr->GetConstant(result_type, words); \ + } \ + return nullptr; \ + } + +// Define the folding rules for ordered and unordered comparison for floating +// point values. +ConstantFoldingRule FoldFOrdEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(==, true)); +} +ConstantFoldingRule FoldFUnordEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(==, false)); +} +ConstantFoldingRule FoldFOrdNotEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(!=, true)); +} +ConstantFoldingRule FoldFUnordNotEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(!=, false)); +} +ConstantFoldingRule FoldFOrdLessThan() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(<, true)); +} +ConstantFoldingRule FoldFUnordLessThan() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(<, false)); +} +ConstantFoldingRule FoldFOrdGreaterThan() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(>, true)); +} +ConstantFoldingRule FoldFUnordGreaterThan() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(>, false)); +} +ConstantFoldingRule FoldFOrdLessThanEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(<=, true)); +} +ConstantFoldingRule FoldFUnordLessThanEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(<=, false)); +} +ConstantFoldingRule FoldFOrdGreaterThanEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(>=, true)); +} +ConstantFoldingRule FoldFUnordGreaterThanEqual() { + return FoldFPBinaryOp(FOLD_FPCMP_OP(>=, false)); +} + +// Folds an OpDot where all of the inputs are constants to a +// constant. A new constant is created if necessary. +ConstantFoldingRule FoldOpDotWithConstants() { + return [](ir::Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* new_type = type_mgr->GetType(inst->type_id()); + assert(new_type->AsFloat() && "OpDot should have a float return type."); + const analysis::Float* float_type = new_type->AsFloat(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return nullptr; + } + + // If one of the operands is 0, then the result is 0. + bool has_zero_operand = false; + + for (int i = 0; i < 2; ++i) { + if (constants[i]) { + if (constants[i]->AsNullConstant() || + constants[i]->AsVectorConstant()->IsZero()) { + has_zero_operand = true; + break; + } + } + } + + if (has_zero_operand) { + if (float_type->width() == 32) { + spvutils::FloatProxy result(0.0f); + std::vector words = result.GetWords(); + return const_mgr->GetConstant(float_type, words); + } + if (float_type->width() == 64) { + spvutils::FloatProxy result(0.0); + std::vector words = result.GetWords(); + return const_mgr->GetConstant(float_type, words); + } + return nullptr; + } + + if (constants[0] == nullptr || constants[1] == nullptr) { + return nullptr; + } + + std::vector a_components; + std::vector b_components; + + a_components = constants[0]->GetVectorComponents(const_mgr); + b_components = constants[1]->GetVectorComponents(const_mgr); + + spvutils::FloatProxy result(0.0); + std::vector words = result.GetWords(); + const analysis::Constant* result_const = + const_mgr->GetConstant(float_type, words); + for (uint32_t i = 0; i < a_components.size(); ++i) { + if (a_components[i] == nullptr || b_components[i] == nullptr) { + return nullptr; + } + + const analysis::Constant* component = FOLD_FPARITH_OP(*)( + new_type, a_components[i], b_components[i], const_mgr); + result_const = + FOLD_FPARITH_OP(+)(new_type, result_const, component, const_mgr); + } + return result_const; + }; +} + +// This function defines a |UnaryScalarFoldingRule| that subtracts the constant +// from zero. +UnaryScalarFoldingRule FoldFNegateOp() { + return [](const analysis::Type* result_type, const analysis::Constant* a, + analysis::ConstantManager* const_mgr) -> const analysis::Constant* { + assert(result_type != nullptr && a != nullptr); + assert(result_type == a->type()); + const analysis::Float* float_type = result_type->AsFloat(); + assert(float_type != nullptr); + if (float_type->width() == 32) { + float fa = a->GetFloat(); + spvutils::FloatProxy result(-fa); + std::vector words = result.GetWords(); + return const_mgr->GetConstant(result_type, words); + } else if (float_type->width() == 64) { + double da = a->GetDouble(); + spvutils::FloatProxy result(-da); + std::vector words = result.GetWords(); + return const_mgr->GetConstant(result_type, words); + } + return nullptr; + }; +} + +ConstantFoldingRule FoldFNegate() { return FoldFPUnaryOp(FoldFNegateOp()); } +} // namespace + +spvtools::opt::ConstantFoldingRules::ConstantFoldingRules() { + // Add all folding rules to the list for the opcodes to which they apply. + // Note that the order in which rules are added to the list matters. If a rule + // applies to the instruction, the rest of the rules will not be attempted. + // Take that into consideration. + + rules_[SpvOpCompositeConstruct].push_back(FoldCompositeWithConstants()); + + rules_[SpvOpCompositeExtract].push_back(FoldExtractWithConstants()); + + rules_[SpvOpConvertFToS].push_back(FoldFToI()); + rules_[SpvOpConvertFToU].push_back(FoldFToI()); + rules_[SpvOpConvertSToF].push_back(FoldIToF()); + rules_[SpvOpConvertUToF].push_back(FoldIToF()); + + rules_[SpvOpDot].push_back(FoldOpDotWithConstants()); + rules_[SpvOpFAdd].push_back(FoldFAdd()); + rules_[SpvOpFDiv].push_back(FoldFDiv()); + rules_[SpvOpFMul].push_back(FoldFMul()); + rules_[SpvOpFSub].push_back(FoldFSub()); + + rules_[SpvOpFOrdEqual].push_back(FoldFOrdEqual()); + rules_[SpvOpFUnordEqual].push_back(FoldFUnordEqual()); + rules_[SpvOpFOrdNotEqual].push_back(FoldFOrdNotEqual()); + rules_[SpvOpFUnordNotEqual].push_back(FoldFUnordNotEqual()); + rules_[SpvOpFOrdLessThan].push_back(FoldFOrdLessThan()); + rules_[SpvOpFUnordLessThan].push_back(FoldFUnordLessThan()); + rules_[SpvOpFOrdGreaterThan].push_back(FoldFOrdGreaterThan()); + rules_[SpvOpFUnordGreaterThan].push_back(FoldFUnordGreaterThan()); + rules_[SpvOpFOrdLessThanEqual].push_back(FoldFOrdLessThanEqual()); + rules_[SpvOpFUnordLessThanEqual].push_back(FoldFUnordLessThanEqual()); + rules_[SpvOpFOrdGreaterThanEqual].push_back(FoldFOrdGreaterThanEqual()); + rules_[SpvOpFUnordGreaterThanEqual].push_back(FoldFUnordGreaterThanEqual()); + + rules_[SpvOpVectorShuffle].push_back(FoldVectorShuffleWithConstants()); + rules_[SpvOpVectorTimesScalar].push_back(FoldVectorTimesScalar()); + + rules_[SpvOpFNegate].push_back(FoldFNegate()); +} +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.h new file mode 100644 index 0000000000000000000000000000000000000000..2d9ecbaa308212fdefc88556b45e232ea0b00004 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/const_folding_rules.h @@ -0,0 +1,84 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_CONST_FOLDING_RULES_H_ +#define LIBSPIRV_OPT_CONST_FOLDING_RULES_H_ + +#include + +#include "constants.h" +#include "def_use_manager.h" +#include "folding_rules.h" +#include "ir_builder.h" +#include "ir_context.h" +#include "latest_version_spirv_header.h" + +namespace spvtools { +namespace opt { + +// Constant Folding Rules: +// +// The folding mechanism is built around the concept of a |ConstantFoldingRule|. +// A constant folding rule is a function that implements a method of simplifying +// an instruction to a constant. +// +// The inputs to a folding rule are: +// |inst| - the instruction to be simplified. +// |constants| - if an in-operands is an id of a constant, then the +// corresponding value in |constants| contains that +// constant value. Otherwise, the corresponding entry in +// |constants| is |nullptr|. +// +// A constant folding rule returns a pointer to an Constant if |inst| can be +// simplified using this rule. Otherwise, it returns |nullptr|. +// +// See const_folding_rules.cpp for examples on how to write a constant folding +// rule. +// +// Be sure to add new constant folding rules to the table of constant folding +// rules in the constructor for ConstantFoldingRules. The new rule should be +// added to the list for every opcode that it applies to. Note that earlier +// rules in the list are given priority. That is, if an earlier rule is able to +// fold an instruction, the later rules will not be attempted. + +using ConstantFoldingRule = std::function& constants)>; + +class ConstantFoldingRules { + public: + ConstantFoldingRules(); + + // Returns true if there is at least 1 folding rule for |opcode|. + bool HasFoldingRule(SpvOp opcode) const { return rules_.count(opcode); } + + // Returns an vector of constant folding rules for |opcode|. + const std::vector& GetRulesForOpcode( + SpvOp opcode) const { + auto it = rules_.find(opcode); + if (it != rules_.end()) { + return it->second; + } + return empty_vector_; + } + + private: + std::unordered_map> rules_; + std::vector empty_vector_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_CONST_FOLDING_RULES_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2e24f53b2ffbf623a339162339db9bb7634441da --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.cpp @@ -0,0 +1,342 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "constants.h" +#include "ir_context.h" + +#include +#include + +namespace spvtools { +namespace opt { +namespace analysis { + +float Constant::GetFloat() const { + assert(type()->AsFloat() != nullptr && type()->AsFloat()->width() == 32); + + if (const FloatConstant* fc = AsFloatConstant()) { + return fc->GetFloatValue(); + } else { + assert(AsNullConstant() && "Must be a floating point constant."); + return 0.0f; + } +} + +double Constant::GetDouble() const { + assert(type()->AsFloat() != nullptr && type()->AsFloat()->width() == 64); + + if (const FloatConstant* fc = AsFloatConstant()) { + return fc->GetDoubleValue(); + } else { + assert(AsNullConstant() && "Must be a floating point constant."); + return 0.0; + } +} + +uint32_t Constant::GetU32() const { + assert(type()->AsInteger() != nullptr); + assert(type()->AsInteger()->width() == 32); + + if (const IntConstant* ic = AsIntConstant()) { + return ic->GetU32BitValue(); + } else { + assert(AsNullConstant() && "Must be an integer constant."); + return 0u; + } +} + +uint64_t Constant::GetU64() const { + assert(type()->AsInteger() != nullptr); + assert(type()->AsInteger()->width() == 64); + + if (const IntConstant* ic = AsIntConstant()) { + return ic->GetU64BitValue(); + } else { + assert(AsNullConstant() && "Must be an integer constant."); + return 0u; + } +} + +int32_t Constant::GetS32() const { + assert(type()->AsInteger() != nullptr); + assert(type()->AsInteger()->width() == 32); + + if (const IntConstant* ic = AsIntConstant()) { + return ic->GetS32BitValue(); + } else { + assert(AsNullConstant() && "Must be an integer constant."); + return 0; + } +} + +int64_t Constant::GetS64() const { + assert(type()->AsInteger() != nullptr); + assert(type()->AsInteger()->width() == 64); + + if (const IntConstant* ic = AsIntConstant()) { + return ic->GetS64BitValue(); + } else { + assert(AsNullConstant() && "Must be an integer constant."); + return 0; + } +} + +ConstantManager::ConstantManager(ir::IRContext* ctx) : ctx_(ctx) { + // Populate the constant table with values from constant declarations in the + // module. The values of each OpConstant declaration is the identity + // assignment (i.e., each constant is its own value). + for (const auto& inst : ctx_->module()->GetConstants()) { + MapInst(inst); + } +} + +Type* ConstantManager::GetType(const ir::Instruction* inst) const { + return context()->get_type_mgr()->GetType(inst->type_id()); +} + +std::vector ConstantManager::GetOperandConstants( + ir::Instruction* inst) const { + std::vector constants; + for (uint32_t i = 0; i < inst->NumInOperands(); i++) { + const ir::Operand* operand = &inst->GetInOperand(i); + if (operand->type != SPV_OPERAND_TYPE_ID) { + constants.push_back(nullptr); + } else { + uint32_t id = operand->words[0]; + const analysis::Constant* constant = FindDeclaredConstant(id); + constants.push_back(constant); + } + } + return constants; +} + +std::vector ConstantManager::GetConstantsFromIds( + const std::vector& ids) const { + std::vector constants; + for (uint32_t id : ids) { + if (const Constant* c = FindDeclaredConstant(id)) { + constants.push_back(c); + } else { + return {}; + } + } + return constants; +} + +ir::Instruction* ConstantManager::BuildInstructionAndAddToModule( + const Constant* new_const, ir::Module::inst_iterator* pos, + uint32_t type_id) { + uint32_t new_id = context()->TakeNextId(); + auto new_inst = CreateInstruction(new_id, new_const, type_id); + if (!new_inst) { + return nullptr; + } + auto* new_inst_ptr = new_inst.get(); + *pos = pos->InsertBefore(std::move(new_inst)); + ++(*pos); + context()->get_def_use_mgr()->AnalyzeInstDefUse(new_inst_ptr); + MapConstantToInst(new_const, new_inst_ptr); + return new_inst_ptr; +} + +ir::Instruction* ConstantManager::GetDefiningInstruction( + const Constant* c, ir::Module::inst_iterator* pos) { + uint32_t decl_id = FindDeclaredConstant(c); + if (decl_id == 0) { + auto iter = context()->types_values_end(); + if (pos == nullptr) pos = &iter; + return BuildInstructionAndAddToModule(c, pos); + } else { + auto def = context()->get_def_use_mgr()->GetDef(decl_id); + assert(def != nullptr); + return def; + } +} + +const Constant* ConstantManager::CreateConstant( + const Type* type, const std::vector& literal_words_or_ids) const { + if (literal_words_or_ids.size() == 0) { + // Constant declared with OpConstantNull + return new NullConstant(type); + } else if (auto* bt = type->AsBool()) { + assert(literal_words_or_ids.size() == 1 && + "Bool constant should be declared with one operand"); + return new BoolConstant(bt, literal_words_or_ids.front()); + } else if (auto* it = type->AsInteger()) { + return new IntConstant(it, literal_words_or_ids); + } else if (auto* ft = type->AsFloat()) { + return new FloatConstant(ft, literal_words_or_ids); + } else if (auto* vt = type->AsVector()) { + auto components = GetConstantsFromIds(literal_words_or_ids); + if (components.empty()) return nullptr; + // All components of VectorConstant must be of type Bool, Integer or Float. + if (!std::all_of(components.begin(), components.end(), + [](const Constant* c) { + if (c->type()->AsBool() || c->type()->AsInteger() || + c->type()->AsFloat()) { + return true; + } else { + return false; + } + })) + return nullptr; + // All components of VectorConstant must be in the same type. + const auto* component_type = components.front()->type(); + if (!std::all_of(components.begin(), components.end(), + [&component_type](const Constant* c) { + if (c->type() == component_type) return true; + return false; + })) + return nullptr; + return new VectorConstant(vt, components); + } else if (auto* mt = type->AsMatrix()) { + auto components = GetConstantsFromIds(literal_words_or_ids); + if (components.empty()) return nullptr; + return new MatrixConstant(mt, components); + } else if (auto* st = type->AsStruct()) { + auto components = GetConstantsFromIds(literal_words_or_ids); + if (components.empty()) return nullptr; + return new StructConstant(st, components); + } else if (auto* at = type->AsArray()) { + auto components = GetConstantsFromIds(literal_words_or_ids); + if (components.empty()) return nullptr; + return new ArrayConstant(at, components); + } else { + return nullptr; + } +} + +const Constant* ConstantManager::GetConstantFromInst(ir::Instruction* inst) { + std::vector literal_words_or_ids; + + // Collect the constant defining literals or component ids. + for (uint32_t i = 0; i < inst->NumInOperands(); i++) { + literal_words_or_ids.insert(literal_words_or_ids.end(), + inst->GetInOperand(i).words.begin(), + inst->GetInOperand(i).words.end()); + } + + switch (inst->opcode()) { + // OpConstant{True|False} have the value embedded in the opcode. So they + // are not handled by the for-loop above. Here we add the value explicitly. + case SpvOp::SpvOpConstantTrue: + literal_words_or_ids.push_back(true); + break; + case SpvOp::SpvOpConstantFalse: + literal_words_or_ids.push_back(false); + break; + case SpvOp::SpvOpConstantNull: + case SpvOp::SpvOpConstant: + case SpvOp::SpvOpConstantComposite: + case SpvOp::SpvOpSpecConstantComposite: + break; + default: + return nullptr; + } + + return GetConstant(GetType(inst), literal_words_or_ids); +} + +std::unique_ptr ConstantManager::CreateInstruction( + uint32_t id, const Constant* c, uint32_t type_id) const { + uint32_t type = + (type_id == 0) ? context()->get_type_mgr()->GetId(c->type()) : type_id; + if (c->AsNullConstant()) { + return MakeUnique(context(), SpvOp::SpvOpConstantNull, + type, id, + std::initializer_list{}); + } else if (const BoolConstant* bc = c->AsBoolConstant()) { + return MakeUnique( + context(), + bc->value() ? SpvOp::SpvOpConstantTrue : SpvOp::SpvOpConstantFalse, + type, id, std::initializer_list{}); + } else if (const IntConstant* ic = c->AsIntConstant()) { + return MakeUnique( + context(), SpvOp::SpvOpConstant, type, id, + std::initializer_list{ir::Operand( + spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, + ic->words())}); + } else if (const FloatConstant* fc = c->AsFloatConstant()) { + return MakeUnique( + context(), SpvOp::SpvOpConstant, type, id, + std::initializer_list{ir::Operand( + spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, + fc->words())}); + } else if (const CompositeConstant* cc = c->AsCompositeConstant()) { + return CreateCompositeInstruction(id, cc, type_id); + } else { + return nullptr; + } +} + +std::unique_ptr ConstantManager::CreateCompositeInstruction( + uint32_t result_id, const CompositeConstant* cc, uint32_t type_id) const { + std::vector operands; + for (const Constant* component_const : cc->GetComponents()) { + uint32_t id = FindDeclaredConstant(component_const); + if (id == 0) { + // Cannot get the id of the component constant, while all components + // should have been added to the module prior to the composite constant. + // Cannot create OpConstantComposite instruction in this case. + return nullptr; + } + operands.emplace_back(spv_operand_type_t::SPV_OPERAND_TYPE_ID, + std::initializer_list{id}); + } + uint32_t type = + (type_id == 0) ? context()->get_type_mgr()->GetId(cc->type()) : type_id; + return MakeUnique(context(), SpvOp::SpvOpConstantComposite, + type, result_id, std::move(operands)); +} + +const Constant* ConstantManager::GetConstant( + const Type* type, const std::vector& literal_words_or_ids) { + auto cst = CreateConstant(type, literal_words_or_ids); + return cst ? RegisterConstant(cst) : nullptr; +} + +bool VectorConstant::IsZero() const { + for (const Constant* component : GetComponents()) { + if (!component->AsNullConstant() && + !component->AsScalarConstant()->IsZero()) { + return false; + } + } + return true; +} + +std::vector Constant::GetVectorComponents( + analysis::ConstantManager* const_mgr) const { + std::vector components; + const analysis::VectorConstant* a = this->AsVectorConstant(); + const analysis::Vector* vector_type = this->type()->AsVector(); + assert(vector_type != nullptr); + if (a != nullptr) { + for (uint32_t i = 0; i < vector_type->element_count(); ++i) { + components.push_back(a->GetComponents()[i]); + } + } else { + const analysis::Type* element_type = vector_type->element_type(); + const analysis::Constant* element_null_const = + const_mgr->GetConstant(element_type, {}); + for (uint32_t i = 0; i < vector_type->element_count(); ++i) { + components.push_back(element_null_const); + } + } + return components; +} + +} // namespace analysis +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.h index d6199e8f4afe9f4f0a8cdf003516ed4ab8676f69..f54e96a9ff158770ac86d090ce22a3caf3a59707 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/constants.h @@ -15,12 +15,18 @@ #ifndef LIBSPIRV_OPT_CONSTANTS_H_ #define LIBSPIRV_OPT_CONSTANTS_H_ +#include #include +#include +#include #include #include #include "make_unique.h" +#include "module.h" +#include "type_manager.h" #include "types.h" +#include "util/hex_float.h" namespace spvtools { namespace opt { @@ -38,8 +44,10 @@ class BoolConstant; class CompositeConstant; class StructConstant; class VectorConstant; +class MatrixConstant; class ArrayConstant; class NullConstant; +class ConstantManager; // Abstract class for a SPIR-V constant. It has a bunch of As methods, // which is used as a way to probe the actual @@ -59,6 +67,7 @@ class Constant { virtual CompositeConstant* AsCompositeConstant() { return nullptr; } virtual StructConstant* AsStructConstant() { return nullptr; } virtual VectorConstant* AsVectorConstant() { return nullptr; } + virtual MatrixConstant* AsMatrixConstant() { return nullptr; } virtual ArrayConstant* AsArrayConstant() { return nullptr; } virtual NullConstant* AsNullConstant() { return nullptr; } @@ -71,16 +80,46 @@ class Constant { } virtual const StructConstant* AsStructConstant() const { return nullptr; } virtual const VectorConstant* AsVectorConstant() const { return nullptr; } + virtual const MatrixConstant* AsMatrixConstant() const { return nullptr; } virtual const ArrayConstant* AsArrayConstant() const { return nullptr; } virtual const NullConstant* AsNullConstant() const { return nullptr; } - const analysis::Type* type() const { return type_; } + // Returns the float representation of the constant. Must be a 32 bit + // Float type. + float GetFloat() const; + + // Returns the double representation of the constant. Must be a 64 bit + // Float type. + double GetDouble() const; + + // Returns uint32_t representation of the constant. Must be a 32 bit + // Integer type. + uint32_t GetU32() const; + + // Returns uint64_t representation of the constant. Must be a 64 bit + // Integer type. + uint64_t GetU64() const; + + // Returns int32_t representation of the constant. Must be a 32 bit + // Integer type. + int32_t GetS32() const; + + // Returns int64_t representation of the constant. Must be a 64 bit + // Integer type. + int64_t GetS64() const; + + const Type* type() const { return type_; } + + // Returns an std::vector containing the elements of |constant|. The type of + // |constant| must be |Vector|. + std::vector GetVectorComponents( + ConstantManager* const_mgr) const; protected: - Constant(const analysis::Type* ty) : type_(ty) {} + Constant(const Type* ty) : type_(ty) {} // The type of this constant. - const analysis::Type* type_; + const Type* type_; }; // Abstract class for scalar type constants. @@ -93,10 +132,22 @@ class ScalarConstant : public Constant { // Returns a const reference of the value of this constant in 32-bit words. virtual const std::vector& words() const { return words_; } + // Returns true if the value is zero. + bool IsZero() const { + bool is_zero = true; + for (uint32_t v : words()) { + if (v != 0) { + is_zero = false; + break; + } + } + return is_zero; + } + protected: - ScalarConstant(const analysis::Type* ty, const std::vector& w) + ScalarConstant(const Type* ty, const std::vector& w) : Constant(ty), words_(w) {} - ScalarConstant(const analysis::Type* ty, std::vector&& w) + ScalarConstant(const Type* ty, std::vector&& w) : Constant(ty), words_(std::move(w)) {} std::vector words_; }; @@ -104,14 +155,44 @@ class ScalarConstant : public Constant { // Integer type constant. class IntConstant : public ScalarConstant { public: - IntConstant(const analysis::Integer* ty, const std::vector& w) + IntConstant(const Integer* ty, const std::vector& w) : ScalarConstant(ty, w) {} - IntConstant(const analysis::Integer* ty, std::vector&& w) + IntConstant(const Integer* ty, std::vector&& w) : ScalarConstant(ty, std::move(w)) {} IntConstant* AsIntConstant() override { return this; } const IntConstant* AsIntConstant() const override { return this; } + int32_t GetS32BitValue() const { + // Relies on signed values smaller than 32-bit being sign extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 1); + return words()[0]; + } + + uint32_t GetU32BitValue() const { + // Relies on unsigned values smaller than 32-bit being zero extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 1); + return words()[0]; + } + + int64_t GetS64BitValue() const { + // Relies on unsigned values smaller than 64-bit being sign extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 2); + return static_cast(words()[1]) << 32 | + static_cast(words()[0]); + } + + uint64_t GetU64BitValue() const { + // Relies on unsigned values smaller than 64-bit being zero extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 2); + return static_cast(words()[1]) << 32 | + static_cast(words()[0]); + } + // Make a copy of this IntConstant instance. std::unique_ptr CopyIntConstant() const { return MakeUnique(type_->AsInteger(), words_); @@ -124,9 +205,9 @@ class IntConstant : public ScalarConstant { // Float type constant. class FloatConstant : public ScalarConstant { public: - FloatConstant(const analysis::Float* ty, const std::vector& w) + FloatConstant(const Float* ty, const std::vector& w) : ScalarConstant(ty, w) {} - FloatConstant(const analysis::Float* ty, std::vector&& w) + FloatConstant(const Float* ty, std::vector&& w) : ScalarConstant(ty, std::move(w)) {} FloatConstant* AsFloatConstant() override { return this; } @@ -139,12 +220,33 @@ class FloatConstant : public ScalarConstant { std::unique_ptr Copy() const override { return std::unique_ptr(CopyFloatConstant().release()); } + + // Returns the float value of |this|. The type of |this| must be |Float| with + // width of 32. + float GetFloatValue() const { + assert(type()->AsFloat()->width() == 32 && + "Not a 32-bit floating point value."); + spvutils::FloatProxy a(words()[0]); + return a.getAsFloat(); + } + + // Returns the double value of |this|. The type of |this| must be |Float| + // with width of 64. + double GetDoubleValue() const { + assert(type()->AsFloat()->width() == 64 && + "Not a 32-bit floating point value."); + uint64_t combined_words = words()[1]; + combined_words = combined_words << 32; + combined_words |= words()[0]; + spvutils::FloatProxy a(combined_words); + return a.getAsFloat(); + } }; // Bool type constant. class BoolConstant : public ScalarConstant { public: - BoolConstant(const analysis::Bool* ty, bool v) + BoolConstant(const Bool* ty, bool v) : ScalarConstant(ty, {static_cast(v)}), value_(v) {} BoolConstant* AsBoolConstant() override { return this; } @@ -171,19 +273,18 @@ class CompositeConstant : public Constant { CompositeConstant* AsCompositeConstant() override { return this; } const CompositeConstant* AsCompositeConstant() const override { return this; } - // Returns a const reference of the components holded in this composite + // Returns a const reference of the components held in this composite // constant. virtual const std::vector& GetComponents() const { return components_; } protected: - CompositeConstant(const analysis::Type* ty) : Constant(ty), components_() {} - CompositeConstant(const analysis::Type* ty, + CompositeConstant(const Type* ty) : Constant(ty), components_() {} + CompositeConstant(const Type* ty, const std::vector& components) : Constant(ty), components_(components) {} - CompositeConstant(const analysis::Type* ty, - std::vector&& components) + CompositeConstant(const Type* ty, std::vector&& components) : Constant(ty), components_(std::move(components)) {} std::vector components_; }; @@ -191,12 +292,11 @@ class CompositeConstant : public Constant { // Struct type constant. class StructConstant : public CompositeConstant { public: - StructConstant(const analysis::Struct* ty) : CompositeConstant(ty) {} - StructConstant(const analysis::Struct* ty, + StructConstant(const Struct* ty) : CompositeConstant(ty) {} + StructConstant(const Struct* ty, const std::vector& components) : CompositeConstant(ty, components) {} - StructConstant(const analysis::Struct* ty, - std::vector&& components) + StructConstant(const Struct* ty, std::vector&& components) : CompositeConstant(ty, std::move(components)) {} StructConstant* AsStructConstant() override { return this; } @@ -214,14 +314,13 @@ class StructConstant : public CompositeConstant { // Vector type constant. class VectorConstant : public CompositeConstant { public: - VectorConstant(const analysis::Vector* ty) + VectorConstant(const Vector* ty) : CompositeConstant(ty), component_type_(ty->element_type()) {} - VectorConstant(const analysis::Vector* ty, + VectorConstant(const Vector* ty, const std::vector& components) : CompositeConstant(ty, components), component_type_(ty->element_type()) {} - VectorConstant(const analysis::Vector* ty, - std::vector&& components) + VectorConstant(const Vector* ty, std::vector&& components) : CompositeConstant(ty, std::move(components)), component_type_(ty->element_type()) {} @@ -239,21 +338,55 @@ class VectorConstant : public CompositeConstant { return std::unique_ptr(CopyVectorConstant().release()); } - const analysis::Type* component_type() { return component_type_; } + const Type* component_type() const { return component_type_; } + + // Returns true if the vector is all zeros. + bool IsZero() const; private: - const analysis::Type* component_type_; + const Type* component_type_; +}; + +// Matrix type constant. +class MatrixConstant : public CompositeConstant { + public: + MatrixConstant(const Matrix* ty) + : CompositeConstant(ty), component_type_(ty->element_type()) {} + MatrixConstant(const Matrix* ty, + const std::vector& components) + : CompositeConstant(ty, components), + component_type_(ty->element_type()) {} + MatrixConstant(const Vector* ty, std::vector&& components) + : CompositeConstant(ty, std::move(components)), + component_type_(ty->element_type()) {} + + MatrixConstant* AsMatrixConstant() override { return this; } + const MatrixConstant* AsMatrixConstant() const override { return this; } + + // Make a copy of this MatrixConstant instance. + std::unique_ptr CopyMatrixConstant() const { + auto another = MakeUnique(type_->AsMatrix()); + another->components_.insert(another->components_.end(), components_.begin(), + components_.end()); + return another; + } + std::unique_ptr Copy() const override { + return std::unique_ptr(CopyMatrixConstant().release()); + } + + const Type* component_type() { return component_type_; } + + private: + const Type* component_type_; }; // Array type constant. class ArrayConstant : public CompositeConstant { public: - ArrayConstant(const analysis::Array* ty) : CompositeConstant(ty) {} - ArrayConstant(const analysis::Array* ty, - const std::vector& components) + ArrayConstant(const Array* ty) : CompositeConstant(ty) {} + ArrayConstant(const Array* ty, const std::vector& components) : CompositeConstant(ty, components) {} - ArrayConstant(const analysis::Array* ty, - std::vector&& components) + ArrayConstant(const Array* ty, std::vector&& components) : CompositeConstant(ty, std::move(components)) {} ArrayConstant* AsArrayConstant() override { return this; } @@ -271,7 +404,7 @@ class ArrayConstant : public CompositeConstant { // Null type constant. class NullConstant : public Constant { public: - NullConstant(const analysis::Type* ty) : Constant(ty) {} + NullConstant(const Type* ty) : Constant(ty) {} NullConstant* AsNullConstant() override { return this; } const NullConstant* AsNullConstant() const override { return this; } @@ -284,6 +417,237 @@ class NullConstant : public Constant { } }; +class IRContext; + +// Hash function for Constant instances. Use the structure of the constant as +// the key. +struct ConstantHash { + void add_pointer(std::u32string* h, const void* p) const { + uint64_t ptr_val = reinterpret_cast(p); + h->push_back(static_cast(ptr_val >> 32)); + h->push_back(static_cast(ptr_val)); + } + + size_t operator()(const Constant* const_val) const { + std::u32string h; + add_pointer(&h, const_val->type()); + if (const auto scalar = const_val->AsScalarConstant()) { + for (const auto& w : scalar->words()) { + h.push_back(w); + } + } else if (const auto composite = const_val->AsCompositeConstant()) { + for (const auto& c : composite->GetComponents()) { + add_pointer(&h, c); + } + } else if (const_val->AsNullConstant()) { + h.push_back(0); + } else { + assert( + false && + "Tried to compute the hash value of an invalid Constant instance."); + } + + return std::hash()(h); + } +}; + +// Equality comparison structure for two constants. +struct ConstantEqual { + bool operator()(const Constant* c1, const Constant* c2) const { + if (c1->type() != c2->type()) { + return false; + } + + if (const auto& s1 = c1->AsScalarConstant()) { + const auto& s2 = c2->AsScalarConstant(); + return s2 && s1->words() == s2->words(); + } else if (const auto& composite1 = c1->AsCompositeConstant()) { + const auto& composite2 = c2->AsCompositeConstant(); + return composite2 && + composite1->GetComponents() == composite2->GetComponents(); + } else if (c1->AsNullConstant()) + return c2->AsNullConstant() != nullptr; + else + assert(false && "Tried to compare two invalid Constant instances."); + return false; + } +}; + +// This class represents a pool of constants. +class ConstantManager { + public: + ConstantManager(ir::IRContext* ctx); + + ir::IRContext* context() const { return ctx_; } + + // Gets or creates a unique Constant instance of type |type| and a vector of + // constant defining words |words|. If a Constant instance existed already in + // the constant pool, it returns a pointer to it. Otherwise, it creates one + // using CreateConstant. If a new Constant instance cannot be created, it + // returns nullptr. + const Constant* GetConstant( + const Type* type, const std::vector& literal_words_or_ids); + + // Gets or creates a Constant instance to hold the constant value of the given + // instruction. It returns a pointer to a Constant instance or nullptr if it + // could not create the constant. + const Constant* GetConstantFromInst(ir::Instruction* inst); + + // Gets or creates a constant defining instruction for the given Constant |c|. + // If |c| had already been defined, it returns a pointer to the existing + // declaration. Otherwise, it calls BuildInstructionAndAddToModule. If the + // optional |pos| is given, it will insert any newly created instructions at + // the given instruction iterator position. Otherwise, it inserts the new + // instruction at the end of the current module's types section. + ir::Instruction* GetDefiningInstruction( + const Constant* c, ir::Module::inst_iterator* pos = nullptr); + + // Creates a constant defining instruction for the given Constant instance + // and inserts the instruction at the position specified by the given + // instruction iterator. Returns a pointer to the created instruction if + // succeeded, otherwise returns a null pointer. The instruction iterator + // points to the same instruction before and after the insertion. This is the + // only method that actually manages id creation/assignment and instruction + // creation/insertion for a new Constant instance. + // + // |type_id| is an optional argument for disambiguating equivalent types. If + // |type_id| is specified, it is used as the type of the constant. Otherwise + // the type of the constant is derived by getting an id from the type manager + // for |c|. + ir::Instruction* BuildInstructionAndAddToModule( + const Constant* c, ir::Module::inst_iterator* pos, uint32_t type_id = 0); + + // A helper function to get the result type of the given instruction. Returns + // nullptr if the instruction does not have a type id (type id is 0). + Type* GetType(const ir::Instruction* inst) const; + + // A helper function to get the collected normal constant with the given id. + // Returns the pointer to the Constant instance in case it is found. + // Otherwise, it returns a null pointer. + const Constant* FindDeclaredConstant(uint32_t id) const { + auto iter = id_to_const_val_.find(id); + return (iter != id_to_const_val_.end()) ? iter->second : nullptr; + } + + // A helper function to get the id of a collected constant with the pointer + // to the Constant instance. Returns 0 in case the constant is not found. + uint32_t FindDeclaredConstant(const Constant* c) const { + auto iter = const_val_to_id_.find(c); + return (iter != const_val_to_id_.end()) ? iter->second : 0; + } + + // Returns the canonical constant that has the same structure and value as the + // given Constant |cst|. If none is found, it returns nullptr. + const Constant* FindConstant(const Constant* c) const { + auto it = const_pool_.find(c); + return (it != const_pool_.end()) ? *it : nullptr; + } + + // Registers a new constant |cst| in the constant pool. If the constant + // existed already, it returns a pointer to the previously existing Constant + // in the pool. Otherwise, it returns |cst|. + const Constant* RegisterConstant(const Constant* cst) { + auto ret = const_pool_.insert(cst); + return *ret.first; + } + + // A helper function to get a vector of Constant instances with the specified + // ids. If it can not find the Constant instance for any one of the ids, + // it returns an empty vector. + std::vector GetConstantsFromIds( + const std::vector& ids) const; + + // Returns a vector of constants representing each in operand. If an operand + // is not constant its entry is nullptr. + std::vector GetOperandConstants(ir::Instruction* inst) const; + + // Records a mapping between |inst| and the constant value generated by it. + // It returns true if a new Constant was successfully mapped, false if |inst| + // generates no constant values. + bool MapInst(ir::Instruction* inst) { + if (auto cst = GetConstantFromInst(inst)) { + MapConstantToInst(cst, inst); + return true; + } + return false; + } + + void RemoveId(uint32_t id) { + auto it = id_to_const_val_.find(id); + if (it != id_to_const_val_.end()) { + const_val_to_id_.erase(it->second); + id_to_const_val_.erase(it); + } + } + + // Records a new mapping between |inst| and |const_value|. This updates the + // two mappings |id_to_const_val_| and |const_val_to_id_|. + void MapConstantToInst(const Constant* const_value, ir::Instruction* inst) { + const_val_to_id_[const_value] = inst->result_id(); + id_to_const_val_[inst->result_id()] = const_value; + } + + private: + // Creates a Constant instance with the given type and a vector of constant + // defining words. Returns a unique pointer to the created Constant instance + // if the Constant instance can be created successfully. To create scalar + // type constants, the vector should contain the constant value in 32 bit + // words and the given type must be of type Bool, Integer or Float. To create + // composite type constants, the vector should contain the component ids, and + // those component ids should have been recorded before as Normal Constants. + // And the given type must be of type Struct, Vector or Array. When creating + // VectorType Constant instance, the components must be scalars of the same + // type, either Bool, Integer or Float. If any of the rules above failed, the + // creation will fail and nullptr will be returned. If the vector is empty, + // a NullConstant instance will be created with the given type. + const Constant* CreateConstant( + const Type* type, + const std::vector& literal_words_or_ids) const; + + // Creates an instruction with the given result id to declare a constant + // represented by the given Constant instance. Returns an unique pointer to + // the created instruction if the instruction can be created successfully. + // Otherwise, returns a null pointer. + // + // |type_id| is an optional argument for disambiguating equivalent types. If + // |type_id| is specified, it is used as the type of the constant. Otherwise + // the type of the constant is derived by getting an id from the type manager + // for |c|. + std::unique_ptr CreateInstruction( + uint32_t result_id, const Constant* c, uint32_t type_id = 0) const; + + // Creates an OpConstantComposite instruction with the given result id and + // the CompositeConst instance which represents a composite constant. Returns + // an unique pointer to the created instruction if succeeded. Otherwise + // returns a null pointer. + // + // |type_id| is an optional argument for disambiguating equivalent types. If + // |type_id| is specified, it is used as the type of the constant. Otherwise + // the type of the constant is derived by getting an id from the type manager + // for |c|. + std::unique_ptr CreateCompositeInstruction( + uint32_t result_id, const CompositeConstant* cc, + uint32_t type_id = 0) const; + + // IR context that owns this constant manager. + ir::IRContext* ctx_; + + // A mapping from the result ids of Normal Constants to their + // Constant instances. All Normal Constants in the module, either + // existing ones before optimization or the newly generated ones, should have + // their Constant instance stored and their result id registered in this map. + std::unordered_map id_to_const_val_; + + // A mapping from the Constant instance of Normal Constants to their + // result id in the module. This is a mirror map of |id_to_const_val_|. All + // Normal Constants that defining instructions in the module should have + // their Constant and their result id registered here. + std::unordered_map const_val_to_id_; + + // The constant pool. All created constants are registered here. + std::unordered_set const_pool_; +}; + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d1e80c9f87d17837743cc64b908757e849ce82a --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.cpp @@ -0,0 +1,848 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "copy_prop_arrays.h" +#include "ir_builder.h" + +namespace { +const uint32_t kLoadPointerInOperand = 0; +const uint32_t kStorePointerInOperand = 0; +const uint32_t kStoreObjectInOperand = 1; +const uint32_t kCompositeExtractObjectInOperand = 0; +} // namespace + +namespace spvtools { +namespace opt { + +Pass::Status CopyPropagateArrays::Process(ir::IRContext* ctx) { + InitializeProcessing(ctx); + + bool modified = false; + for (ir::Function& function : *get_module()) { + ir::BasicBlock* entry_bb = &*function.begin(); + + for (auto var_inst = entry_bb->begin(); var_inst->opcode() == SpvOpVariable; + ++var_inst) { + if (!IsPointerToArrayType(var_inst->type_id())) { + continue; + } + + // Find the only store to the entire memory location, if it exists. + ir::Instruction* store_inst = FindStoreInstruction(&*var_inst); + + if (!store_inst) { + continue; + } + + std::unique_ptr source_object = + FindSourceObjectIfPossible(&*var_inst, store_inst); + + if (source_object != nullptr) { + if (CanUpdateUses(&*var_inst, source_object->GetPointerTypeId())) { + modified = true; + PropagateObject(&*var_inst, source_object.get(), store_inst); + } + } + } + } + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +std::unique_ptr +CopyPropagateArrays::FindSourceObjectIfPossible(ir::Instruction* var_inst, + ir::Instruction* store_inst) { + assert(var_inst->opcode() == SpvOpVariable && "Expecting a variable."); + + // Check that the variable is a composite object where |store_inst| + // dominates all of its loads. + if (!store_inst) { + return nullptr; + } + + // Look at the loads to ensure they are dominated by the store. + if (!HasValidReferencesOnly(var_inst, store_inst)) { + return nullptr; + } + + // If so, look at the store to see if it is the copy of an object. + std::unique_ptr source = GetSourceObjectIfAny( + store_inst->GetSingleWordInOperand(kStoreObjectInOperand)); + + if (!source) { + return nullptr; + } + + // Ensure that |source| does not change between the point at which it is + // loaded, and the position in which |var_inst| is loaded. + // + // For now we will go with the easy to implement approach, and check that the + // entire variable (not just the specific component) is never written to. + + if (!HasNoStores(source->GetVariable())) { + return nullptr; + } + return source; +} + +ir::Instruction* CopyPropagateArrays::FindStoreInstruction( + const ir::Instruction* var_inst) const { + ir::Instruction* store_inst = nullptr; + get_def_use_mgr()->WhileEachUser( + var_inst, [&store_inst, var_inst](ir::Instruction* use) { + if (use->opcode() == SpvOpStore && + use->GetSingleWordInOperand(kStorePointerInOperand) == + var_inst->result_id()) { + if (store_inst == nullptr) { + store_inst = use; + } else { + store_inst = nullptr; + return false; + } + } + return true; + }); + return store_inst; +} + +void CopyPropagateArrays::PropagateObject(ir::Instruction* var_inst, + MemoryObject* source, + ir::Instruction* insertion_point) { + assert(var_inst->opcode() == SpvOpVariable && + "This function propagates variables."); + + ir::Instruction* new_access_chain = + BuildNewAccessChain(insertion_point, source); + context()->KillNamesAndDecorates(var_inst); + UpdateUses(var_inst, new_access_chain); +} + +ir::Instruction* CopyPropagateArrays::BuildNewAccessChain( + ir::Instruction* insertion_point, + CopyPropagateArrays::MemoryObject* source) const { + InstructionBuilder builder(context(), insertion_point, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + + if (source->AccessChain().size() == 0) { + return source->GetVariable(); + } + + return builder.AddAccessChain(source->GetPointerTypeId(), + source->GetVariable()->result_id(), + source->AccessChain()); +} + +bool CopyPropagateArrays::HasNoStores(ir::Instruction* ptr_inst) { + return get_def_use_mgr()->WhileEachUser( + ptr_inst, [this](ir::Instruction* use) { + if (use->opcode() == SpvOpLoad) { + return true; + } else if (use->opcode() == SpvOpAccessChain) { + return HasNoStores(use); + } else if (use->IsDecoration() || use->opcode() == SpvOpName) { + return true; + } else if (use->opcode() == SpvOpStore) { + return false; + } else if (use->opcode() == SpvOpImageTexelPointer) { + return true; + } + // Some other instruction. Be conservative. + return false; + }); +} + +bool CopyPropagateArrays::HasValidReferencesOnly(ir::Instruction* ptr_inst, + ir::Instruction* store_inst) { + ir::BasicBlock* store_block = context()->get_instr_block(store_inst); + opt::DominatorAnalysis* dominator_analysis = + context()->GetDominatorAnalysis(store_block->GetParent()); + + return get_def_use_mgr()->WhileEachUser( + ptr_inst, + [this, store_inst, dominator_analysis, ptr_inst](ir::Instruction* use) { + if (use->opcode() == SpvOpLoad || + use->opcode() == SpvOpImageTexelPointer) { + // TODO: If there are many load in the same BB as |store_inst| the + // time to do the multiple traverses can add up. Consider collecting + // those loads and doing a single traversal. + return dominator_analysis->Dominates(store_inst, use); + } else if (use->opcode() == SpvOpAccessChain) { + return HasValidReferencesOnly(use, store_inst); + } else if (use->IsDecoration() || use->opcode() == SpvOpName) { + return true; + } else if (use->opcode() == SpvOpStore) { + // If we are storing to part of the object it is not an candidate. + return ptr_inst->opcode() == SpvOpVariable && + store_inst->GetSingleWordInOperand(kStorePointerInOperand) == + ptr_inst->result_id(); + } + // Some other instruction. Be conservative. + return false; + }); +} + +std::unique_ptr +CopyPropagateArrays::GetSourceObjectIfAny(uint32_t result) { + ir::Instruction* result_inst = context()->get_def_use_mgr()->GetDef(result); + + switch (result_inst->opcode()) { + case SpvOpLoad: + return BuildMemoryObjectFromLoad(result_inst); + case SpvOpCompositeExtract: + return BuildMemoryObjectFromExtract(result_inst); + case SpvOpCompositeConstruct: + return BuildMemoryObjectFromCompositeConstruct(result_inst); + case SpvOpCopyObject: + return GetSourceObjectIfAny(result_inst->GetSingleWordInOperand(0)); + case SpvOpCompositeInsert: + return BuildMemoryObjectFromInsert(result_inst); + default: + return nullptr; + } +} + +std::unique_ptr +CopyPropagateArrays::BuildMemoryObjectFromLoad(ir::Instruction* load_inst) { + std::vector components_in_reverse; + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + + ir::Instruction* current_inst = def_use_mgr->GetDef( + load_inst->GetSingleWordInOperand(kLoadPointerInOperand)); + + // Build the access chain for the memory object by collecting the indices used + // in the OpAccessChain instructions. If we find a variable index, then + // return |nullptr| because we cannot know for sure which memory location is + // used. + // + // It is built in reverse order because the different |OpAccessChain| + // instructions are visited in reverse order from which they are applied. + while (current_inst->opcode() == SpvOpAccessChain) { + for (uint32_t i = current_inst->NumInOperands() - 1; i >= 1; --i) { + uint32_t element_index_id = current_inst->GetSingleWordInOperand(i); + components_in_reverse.push_back(element_index_id); + } + current_inst = def_use_mgr->GetDef(current_inst->GetSingleWordInOperand(0)); + } + + // If the address in the load is not constructed from an |OpVariable| + // instruction followed by a series of |OpAccessChain| instructions, then + // return |nullptr| because we cannot identify the owner or access chain + // exactly. + if (current_inst->opcode() != SpvOpVariable) { + return nullptr; + } + + // Build the memory object. Use |rbegin| and |rend| to put the access chain + // back in the correct order. + return std::unique_ptr( + new MemoryObject(current_inst, components_in_reverse.rbegin(), + components_in_reverse.rend())); +} + +std::unique_ptr +CopyPropagateArrays::BuildMemoryObjectFromExtract( + ir::Instruction* extract_inst) { + assert(extract_inst->opcode() == SpvOpCompositeExtract && + "Expecting an OpCompositeExtract instruction."); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + + std::unique_ptr result = GetSourceObjectIfAny( + extract_inst->GetSingleWordInOperand(kCompositeExtractObjectInOperand)); + + if (result) { + analysis::Integer int_type(32, false); + const analysis::Type* uint32_type = + context()->get_type_mgr()->GetRegisteredType(&int_type); + + std::vector components; + // Convert the indices in the extract instruction to a series of ids that + // can be used by the |OpAccessChain| instruction. + for (uint32_t i = 1; i < extract_inst->NumInOperands(); ++i) { + uint32_t index = extract_inst->GetSingleWordInOperand(1); + const analysis::Constant* index_const = + const_mgr->GetConstant(uint32_type, {index}); + components.push_back( + const_mgr->GetDefiningInstruction(index_const)->result_id()); + } + result->GetMember(components); + return result; + } + return nullptr; +} + +std::unique_ptr +CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct( + ir::Instruction* conststruct_inst) { + assert(conststruct_inst->opcode() == SpvOpCompositeConstruct && + "Expecting an OpCompositeConstruct instruction."); + + // If every operand in the instruction are part of the same memory object, and + // are being combined in the same order, then the result is the same as the + // parent. + + std::unique_ptr memory_object = + GetSourceObjectIfAny(conststruct_inst->GetSingleWordInOperand(0)); + + if (!memory_object) { + return nullptr; + } + + if (!memory_object->IsMember()) { + return nullptr; + } + + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + const analysis::Constant* last_access = + const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); + if (!last_access || + (!last_access->AsIntConstant() && !last_access->AsNullConstant())) { + return nullptr; + } + + if (last_access->GetU32() != 0) { + return nullptr; + } + + memory_object->GetParent(); + + if (memory_object->GetNumberOfMembers() != + conststruct_inst->NumInOperands()) { + return nullptr; + } + + for (uint32_t i = 1; i < conststruct_inst->NumInOperands(); ++i) { + std::unique_ptr member_object = + GetSourceObjectIfAny(conststruct_inst->GetSingleWordInOperand(i)); + + if (!member_object->IsMember()) { + return nullptr; + } + + if (!memory_object->Contains(member_object.get())) { + return nullptr; + } + + last_access = + const_mgr->FindDeclaredConstant(member_object->AccessChain().back()); + if (!last_access || !last_access->AsIntConstant()) { + return nullptr; + } + + if (last_access->GetU32() != i) { + return nullptr; + } + } + return memory_object; +} + +std::unique_ptr +CopyPropagateArrays::BuildMemoryObjectFromInsert(ir::Instruction* insert_inst) { + assert(insert_inst->opcode() == SpvOpCompositeInsert && + "Expecting an OpCompositeInsert instruction."); + + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + const analysis::Type* result_type = type_mgr->GetType(insert_inst->type_id()); + + uint32_t number_of_elements = 0; + if (const analysis::Struct* struct_type = result_type->AsStruct()) { + number_of_elements = + static_cast(struct_type->element_types().size()); + } else if (const analysis::Array* array_type = result_type->AsArray()) { + const analysis::Constant* length_const = + const_mgr->FindDeclaredConstant(array_type->LengthId()); + assert(length_const->AsIntConstant()); + number_of_elements = length_const->AsIntConstant()->GetU32(); + } else if (const analysis::Vector* vector_type = result_type->AsVector()) { + number_of_elements = vector_type->element_count(); + } else if (const analysis::Matrix* matrix_type = result_type->AsMatrix()) { + number_of_elements = matrix_type->element_count(); + } + + if (number_of_elements == 0) { + return nullptr; + } + + if (insert_inst->NumInOperands() != 3) { + return nullptr; + } + + if (insert_inst->GetSingleWordInOperand(2) != number_of_elements - 1) { + return nullptr; + } + + std::unique_ptr memory_object = + GetSourceObjectIfAny(insert_inst->GetSingleWordInOperand(0)); + + if (!memory_object) { + return nullptr; + } + + if (!memory_object->IsMember()) { + return nullptr; + } + + const analysis::Constant* last_access = + const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); + if (!last_access || !last_access->AsIntConstant()) { + return nullptr; + } + + if (last_access->GetU32() != number_of_elements - 1) { + return nullptr; + } + + memory_object->GetParent(); + + ir::Instruction* current_insert = + def_use_mgr->GetDef(insert_inst->GetSingleWordInOperand(1)); + for (uint32_t i = number_of_elements - 1; i > 0; --i) { + if (current_insert->opcode() != SpvOpCompositeInsert) { + return nullptr; + } + + if (current_insert->NumInOperands() != 3) { + return nullptr; + } + + if (current_insert->GetSingleWordInOperand(2) != i - 1) { + return nullptr; + } + + std::unique_ptr current_memory_object = + GetSourceObjectIfAny(current_insert->GetSingleWordInOperand(0)); + + if (!current_memory_object) { + return nullptr; + } + + if (!current_memory_object->IsMember()) { + return nullptr; + } + + if (memory_object->AccessChain().size() + 1 != + current_memory_object->AccessChain().size()) { + return nullptr; + } + + if (!memory_object->Contains(current_memory_object.get())) { + return nullptr; + } + + const analysis::Constant* current_last_access = + const_mgr->FindDeclaredConstant( + current_memory_object->AccessChain().back()); + if (!current_last_access || !current_last_access->AsIntConstant()) { + return nullptr; + } + + if (current_last_access->GetU32() != i - 1) { + return nullptr; + } + current_insert = + def_use_mgr->GetDef(current_insert->GetSingleWordInOperand(1)); + } + + return memory_object; +} + +bool CopyPropagateArrays::IsPointerToArrayType(uint32_t type_id) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::Pointer* pointer_type = type_mgr->GetType(type_id)->AsPointer(); + if (pointer_type) { + return pointer_type->pointee_type()->kind() == analysis::Type::kArray || + pointer_type->pointee_type()->kind() == analysis::Type::kImage; + } + return false; +} + +bool CopyPropagateArrays::CanUpdateUses(ir::Instruction* original_ptr_inst, + uint32_t type_id) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + + analysis::Type* type = type_mgr->GetType(type_id); + if (type->AsRuntimeArray()) { + return false; + } + + if (!type->AsStruct() && !type->AsArray() && !type->AsPointer()) { + // If the type is not an aggregate, then the desired type must be the + // same as the current type. No work to do, and we can do that. + return true; + } + + return def_use_mgr->WhileEachUse( + original_ptr_inst, + [this, type_mgr, const_mgr, type](ir::Instruction* use, uint32_t) { + switch (use->opcode()) { + case SpvOpLoad: { + analysis::Pointer* pointer_type = type->AsPointer(); + uint32_t new_type_id = + type_mgr->GetId(pointer_type->pointee_type()); + + if (new_type_id != use->type_id()) { + return CanUpdateUses(use, new_type_id); + } + return true; + } + case SpvOpAccessChain: { + analysis::Pointer* pointer_type = type->AsPointer(); + const analysis::Type* pointee_type = pointer_type->pointee_type(); + + std::vector access_chain; + for (uint32_t i = 1; i < use->NumInOperands(); ++i) { + const analysis::Constant* index_const = + const_mgr->FindDeclaredConstant( + use->GetSingleWordInOperand(i)); + if (index_const) { + access_chain.push_back(index_const->AsIntConstant()->GetU32()); + } else { + // Variable index means the type is a type where every element + // is the same type. Use element 0 to get the type. + access_chain.push_back(0); + } + } + + const analysis::Type* new_pointee_type = + type_mgr->GetMemberType(pointee_type, access_chain); + opt::analysis::Pointer pointerTy(new_pointee_type, + pointer_type->storage_class()); + uint32_t new_pointer_type_id = + context()->get_type_mgr()->GetTypeInstruction(&pointerTy); + + if (new_pointer_type_id != use->type_id()) { + return CanUpdateUses(use, new_pointer_type_id); + } + return true; + } + case SpvOpCompositeExtract: { + std::vector access_chain; + for (uint32_t i = 1; i < use->NumInOperands(); ++i) { + access_chain.push_back(use->GetSingleWordInOperand(i)); + } + + const analysis::Type* new_type = + type_mgr->GetMemberType(type, access_chain); + uint32_t new_type_id = type_mgr->GetTypeInstruction(new_type); + + if (new_type_id != use->type_id()) { + return CanUpdateUses(use, new_type_id); + } + return true; + } + case SpvOpStore: + // Can't handle changing the type of a store. There are too many + // other things that might need to change as well. Not worth the + // effort. Punting for now. + + // TODO (s-perron): This can be handled by expanding the store into + // a series of extracts, composite constructs, and a store. + return true; + case SpvOpImageTexelPointer: + case SpvOpName: + return true; + default: + return use->IsDecoration(); + } + }); +} +void CopyPropagateArrays::UpdateUses(ir::Instruction* original_ptr_inst, + ir::Instruction* new_ptr_inst) { + // TODO (s-perron): Keep the def-use manager up to date. Not done now because + // it can cause problems for the |ForEachUse| traversals. Can be use by + // keeping a list of instructions that need updating, and then updating them + // in |PropagateObject|. + + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + + std::vector > uses; + def_use_mgr->ForEachUse(original_ptr_inst, + [&uses](ir::Instruction* use, uint32_t index) { + uses.push_back({use, index}); + }); + + for (auto pair : uses) { + ir::Instruction* use = pair.first; + uint32_t index = pair.second; + analysis::Pointer* pointer_type = nullptr; + switch (use->opcode()) { + case SpvOpLoad: { + // Replace the actual use. + context()->ForgetUses(use); + use->SetOperand(index, {new_ptr_inst->result_id()}); + + // Update the type. + pointer_type = type_mgr->GetType(new_ptr_inst->type_id())->AsPointer(); + uint32_t new_type_id = type_mgr->GetId(pointer_type->pointee_type()); + if (new_type_id != use->type_id()) { + use->SetResultType(new_type_id); + context()->AnalyzeUses(use); + UpdateUses(use, use); + } else { + context()->AnalyzeUses(use); + } + } break; + case SpvOpAccessChain: { + // Update the actual use. + context()->ForgetUses(use); + use->SetOperand(index, {new_ptr_inst->result_id()}); + + // Update the result type. + pointer_type = type_mgr->GetType(new_ptr_inst->type_id())->AsPointer(); + const analysis::Type* pointee_type = pointer_type->pointee_type(); + + // Convert the ids on the OpAccessChain to indices that can be used to + // get the specific member. + std::vector access_chain; + for (uint32_t i = 1; i < use->NumInOperands(); ++i) { + const analysis::Constant* index_const = + const_mgr->FindDeclaredConstant(use->GetSingleWordInOperand(i)); + if (index_const) { + access_chain.push_back(index_const->AsIntConstant()->GetU32()); + } else { + // Variable index means the type is an type where every element + // is the same type. Use element 0 to get the type. + access_chain.push_back(0); + } + } + const analysis::Type* new_pointee_type = + type_mgr->GetMemberType(pointee_type, access_chain); + + // Now build a pointer to the type of the member. + opt::analysis::Pointer new_pointer_type(new_pointee_type, + pointer_type->storage_class()); + uint32_t new_pointer_type_id = + context()->get_type_mgr()->GetTypeInstruction(&new_pointer_type); + + if (new_pointer_type_id != use->type_id()) { + use->SetResultType(new_pointer_type_id); + context()->AnalyzeUses(use); + UpdateUses(use, use); + } else { + context()->AnalyzeUses(use); + } + } break; + case SpvOpCompositeExtract: { + // Update the actual use. + context()->ForgetUses(use); + use->SetOperand(index, {new_ptr_inst->result_id()}); + + std::vector access_chain; + for (uint32_t i = 1; i < use->NumInOperands(); ++i) { + access_chain.push_back(use->GetSingleWordInOperand(i)); + } + + const analysis::Type* type = type_mgr->GetType(new_ptr_inst->type_id()); + const analysis::Type* new_type = + type_mgr->GetMemberType(type, access_chain); + uint32_t new_type_id = type_mgr->GetTypeInstruction(new_type); + + if (new_type_id != use->type_id()) { + use->SetResultType(new_type_id); + context()->AnalyzeUses(use); + UpdateUses(use, use); + } else { + context()->AnalyzeUses(use); + } + } break; + case SpvOpStore: + // If the use is the pointer, then it is the single store to that + // variable. We do not want to replace it. Instead, it will become + // dead after all of the loads are removed, and ADCE will get rid of it. + // + // If the use is the object being stored, we will create a copy of the + // object turning it into the correct type. The copy is done by + // decomposing the object into the base type, which must be the same, + // and then rebuilding them. + if (index == 1) { + ir::Instruction* target_pointer = def_use_mgr->GetDef( + use->GetSingleWordInOperand(kStorePointerInOperand)); + pointer_type = + type_mgr->GetType(target_pointer->type_id())->AsPointer(); + uint32_t copy = + GenerateCopy(original_ptr_inst, + type_mgr->GetId(pointer_type->pointee_type()), use); + + context()->ForgetUses(use); + use->SetInOperand(index, {copy}); + context()->AnalyzeUses(use); + } + break; + case SpvOpImageTexelPointer: + // We treat an OpImageTexelPointer as a load. The result type should + // always have the Image storage class, and should not need to be + // updated. + + // Replace the actual use. + context()->ForgetUses(use); + use->SetOperand(index, {new_ptr_inst->result_id()}); + context()->AnalyzeUses(use); + break; + default: + assert(false && "Don't know how to rewrite instruction"); + break; + } + } +} + +uint32_t CopyPropagateArrays::GenerateCopy( + ir::Instruction* object_inst, uint32_t new_type_id, + ir::Instruction* insertion_position) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + + uint32_t original_type_id = object_inst->type_id(); + if (original_type_id == new_type_id) { + return object_inst->result_id(); + } + + opt::InstructionBuilder ir_builder( + context(), insertion_position, + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisDefUse); + + analysis::Type* original_type = type_mgr->GetType(original_type_id); + analysis::Type* new_type = type_mgr->GetType(new_type_id); + + if (const analysis::Array* original_array_type = original_type->AsArray()) { + uint32_t original_element_type_id = + type_mgr->GetId(original_array_type->element_type()); + + analysis::Array* new_array_type = new_type->AsArray(); + assert(new_array_type != nullptr && "Can't copy an array to a non-array."); + uint32_t new_element_type_id = + type_mgr->GetId(new_array_type->element_type()); + + std::vector element_ids; + const analysis::Constant* length_const = + const_mgr->FindDeclaredConstant(original_array_type->LengthId()); + assert(length_const->AsIntConstant()); + uint32_t array_length = length_const->AsIntConstant()->GetU32(); + for (uint32_t i = 0; i < array_length; i++) { + ir::Instruction* extract = ir_builder.AddCompositeExtract( + original_element_type_id, object_inst->result_id(), {i}); + element_ids.push_back( + GenerateCopy(extract, new_element_type_id, insertion_position)); + } + + return ir_builder.AddCompositeConstruct(new_type_id, element_ids) + ->result_id(); + } else if (const analysis::Struct* original_struct_type = + original_type->AsStruct()) { + analysis::Struct* new_struct_type = new_type->AsStruct(); + + const std::vector& original_types = + original_struct_type->element_types(); + const std::vector& new_types = + new_struct_type->element_types(); + std::vector element_ids; + for (uint32_t i = 0; i < original_types.size(); i++) { + ir::Instruction* extract = ir_builder.AddCompositeExtract( + type_mgr->GetId(original_types[i]), object_inst->result_id(), {i}); + element_ids.push_back(GenerateCopy(extract, type_mgr->GetId(new_types[i]), + insertion_position)); + } + return ir_builder.AddCompositeConstruct(new_type_id, element_ids) + ->result_id(); + } else { + // If we do not have an aggregate type, then we have a problem. Either we + // found multiple instances of the same type, or we are copying to an + // incompatible type. Either way the code is illegal. + assert(false && + "Don't know how to copy this type. Code is likely illegal."); + } + return 0; +} + +void CopyPropagateArrays::MemoryObject::GetMember( + const std::vector& access_chain) { + access_chain_.insert(access_chain_.end(), access_chain.begin(), + access_chain.end()); +} + +uint32_t CopyPropagateArrays::MemoryObject::GetNumberOfMembers() { + ir::IRContext* context = variable_inst_->context(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + + const analysis::Type* type = type_mgr->GetType(variable_inst_->type_id()); + type = type->AsPointer()->pointee_type(); + + std::vector access_indices = GetAccessIds(); + type = type_mgr->GetMemberType(type, access_indices); + + if (const analysis::Struct* struct_type = type->AsStruct()) { + return static_cast(struct_type->element_types().size()); + } else if (const analysis::Array* array_type = type->AsArray()) { + const analysis::Constant* length_const = + context->get_constant_mgr()->FindDeclaredConstant( + array_type->LengthId()); + assert(length_const->AsIntConstant()); + return length_const->AsIntConstant()->GetU32(); + } else if (const analysis::Vector* vector_type = type->AsVector()) { + return vector_type->element_count(); + } else if (const analysis::Matrix* matrix_type = type->AsMatrix()) { + return matrix_type->element_count(); + } else { + return 0; + } +} + +template +CopyPropagateArrays::MemoryObject::MemoryObject(ir::Instruction* var_inst, + iterator begin, iterator end) + : variable_inst_(var_inst), access_chain_(begin, end) {} + +std::vector CopyPropagateArrays::MemoryObject::GetAccessIds() const { + analysis::ConstantManager* const_mgr = + variable_inst_->context()->get_constant_mgr(); + + std::vector access_indices; + for (uint32_t id : AccessChain()) { + const analysis::Constant* element_index_const = + const_mgr->FindDeclaredConstant(id); + if (!element_index_const) { + access_indices.push_back(0); + } else { + assert(element_index_const->AsIntConstant()); + access_indices.push_back(element_index_const->AsIntConstant()->GetU32()); + } + } + return access_indices; +} + +bool CopyPropagateArrays::MemoryObject::Contains( + CopyPropagateArrays::MemoryObject* other) { + if (this->GetVariable() != other->GetVariable()) { + return false; + } + + if (AccessChain().size() > other->AccessChain().size()) { + return false; + } + + for (uint32_t i = 0; i < AccessChain().size(); i++) { + if (AccessChain()[i] != other->AccessChain()[i]) { + return false; + } + } + return true; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.h new file mode 100644 index 0000000000000000000000000000000000000000..db6156a2bd1b42e7866df7b946df0931ab826074 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/copy_prop_arrays.h @@ -0,0 +1,231 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_COPY_PROP_H_ +#define LIBSPIRV_OPT_COPY_PROP_H_ + +#include "mem_pass.h" + +namespace spvtools { +namespace opt { + +// This pass implements a simple array copy propagation. It does not do a full +// array data flow. It looks for simple cases that meet the following +// conditions: +// +// 1) The source must never be stored to. +// 2) The target must be stored to exactly once. +// 3) The store to the target must be a store to the entire array, and be a +// copy of the entire source. +// 4) All loads of the target must be dominated by the store. +// +// The hard part is keeping all of the types correct. We do not want to +// have to do too large a search to update everything, which may not be +// possible, do we give up if we see any instruction that might be hard to +// update. + +class CopyPropagateArrays : public MemPass { + public: + const char* name() const override { return "copy-propagate-arrays"; } + Status Process(ir::IRContext*) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisLoopAnalysis | + ir::IRContext::kAnalysisDecorations | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisNameMap; + } + + private: + // The class used to identify a particular memory object. This memory object + // will be owned by a particular variable, meaning that the memory is part of + // that variable. It could be the entire variable or a member of the + // variable. + class MemoryObject { + public: + // Construction a memory object that is owned by |var_inst|. The iterator + // |begin| and |end| traverse a container of integers that identify which + // member of |var_inst| this memory object will represent. These integers + // are interpreted the same way they would be in an |OpAccessChain| + // instruction. + template + MemoryObject(ir::Instruction* var_inst, iterator begin, iterator end); + + // Change |this| to now point to the member identified by |access_chain| + // (starting from the current member). The elements in |access_chain| are + // interpreted the same as the indices in the |OpAccessChain| + // instruction. + void GetMember(const std::vector& access_chain); + + // Change |this| to now represent the first enclosing object to which it + // belongs. (Remove the last element off the access_chain). It is invalid + // to call this function if |this| does not represent a member of its owner. + void GetParent() { + assert(IsMember()); + access_chain_.pop_back(); + } + + // Returns true if |this| represents a member of its owner, and not the + // entire variable. + bool IsMember() const { return !access_chain_.empty(); } + + // Returns the number of members in the object represented by |this|. If + // |this| does not represent a composite type, the return value will be 0. + uint32_t GetNumberOfMembers(); + + // Returns the owning variable that the memory object is contained in. + ir::Instruction* GetVariable() const { return variable_inst_; } + + // Returns a vector of integers that can be used to access the specific + // member that |this| represents starting from the owning variable. These + // values are to be interpreted the same way the indices are in an + // |OpAccessChain| instruction. + const std::vector& AccessChain() const { return access_chain_; } + + // Returns the type id of the pointer type that can be used to point to this + // memory object. + uint32_t GetPointerTypeId() const { + analysis::TypeManager* type_mgr = + GetVariable()->context()->get_type_mgr(); + const analysis::Pointer* pointer_type = + type_mgr->GetType(GetVariable()->type_id())->AsPointer(); + const analysis::Type* var_type = pointer_type->pointee_type(); + const analysis::Type* member_type = + type_mgr->GetMemberType(var_type, GetAccessIds()); + uint32_t member_type_id = type_mgr->GetId(member_type); + assert(member_type != 0); + uint32_t member_pointer_type_id = type_mgr->FindPointerToType( + member_type_id, pointer_type->storage_class()); + return member_pointer_type_id; + } + + // Returns the storage class of the memory object. + SpvStorageClass GetStorageClass() const { + analysis::TypeManager* type_mgr = + GetVariable()->context()->get_type_mgr(); + const analysis::Pointer* pointer_type = + type_mgr->GetType(GetVariable()->type_id())->AsPointer(); + return pointer_type->storage_class(); + } + + // Returns true if |other| represents memory that is contains inside of the + // memory represented by |this|. + bool Contains(MemoryObject* other); + + private: + // The variable that owns this memory object. + ir::Instruction* variable_inst_; + + // The access chain to reach the particular member the memory object + // represents. It should be interpreted the same way the indices in an + // |OpAccessChain| are interpreted. + std::vector access_chain_; + std::vector GetAccessIds() const; + }; + + // Returns the memory object being stored to |var_inst| in the store + // instruction |store_inst|, if one exists, that can be used in place of + // |var_inst| in all of the loads of |var_inst|. This code is conservative + // and only identifies very simple cases. If no such memory object can be + // found, the return value is |nullptr|. + std::unique_ptr FindSourceObjectIfPossible( + ir::Instruction* var_inst, ir::Instruction* store_inst); + + // Replaces all loads of |var_inst| with a load from |source| instead. + // |insertion_pos| is a position where it is possible to construct the + // address of |source| and also dominates all of the loads of |var_inst|. + void PropagateObject(ir::Instruction* var_inst, MemoryObject* source, + ir::Instruction* insertion_pos); + + // Returns true if all of the references to |ptr_inst| can be rewritten and + // are dominated by |store_inst|. + bool HasValidReferencesOnly(ir::Instruction* ptr_inst, + ir::Instruction* store_inst); + + // Returns a memory object that at one time was equivalent to the value in + // |result|. If no such memory object exists, the return value is |nullptr|. + std::unique_ptr GetSourceObjectIfAny(uint32_t result); + + // Returns the memory object that is loaded by |load_inst|. If a memory + // object cannot be identified, the return value is |nullptr|. The opcode of + // |load_inst| must be |OpLoad|. + std::unique_ptr BuildMemoryObjectFromLoad( + ir::Instruction* load_inst); + + // Returns the memory object that at some point was equivalent to the result + // of |extract_inst|. If a memory object cannot be identified, the return + // value is |nullptr|. The opcode of |extract_inst| must be + // |OpCompositeExtract|. + std::unique_ptr BuildMemoryObjectFromExtract( + ir::Instruction* extract_inst); + + // Returns the memory object that at some point was equivalent to the result + // of |construct_inst|. If a memory object cannot be identified, the return + // value is |nullptr|. The opcode of |constuct_inst| must be + // |OpCompositeConstruct|. + std::unique_ptr BuildMemoryObjectFromCompositeConstruct( + ir::Instruction* conststruct_inst); + + // Returns the memory object that at some point was equivalent to the result + // of |insert_inst|. If a memory object cannot be identified, the return + // value is |nullptr\. The opcode of |insert_inst| must be + // |OpCompositeInsert|. This function looks for a series of + // |OpCompositeInsert| instructions that insert the elements one at a time in + // order from beginning to end. + std::unique_ptr BuildMemoryObjectFromInsert( + ir::Instruction* insert_inst); + + // Return true if |type_id| is a pointer type whose pointee type is an array. + bool IsPointerToArrayType(uint32_t type_id); + + // Returns true of there are not stores using |ptr_inst| or something derived + // from it. + bool HasNoStores(ir::Instruction* ptr_inst); + + // Creates an |OpAccessChain| instruction whose result is a pointer the memory + // represented by |source|. The new instruction will be placed before + // |insertion_point|. |insertion_point| must be part of a function. Returns + // the new instruction. + ir::Instruction* BuildNewAccessChain(ir::Instruction* insertion_point, + MemoryObject* source) const; + + // Rewrites all uses of |original_ptr| to use |new_pointer_inst| updating + // types of other instructions as needed. This function should not be called + // if |CanUpdateUses(original_ptr_inst, new_pointer_inst->type_id())| returns + // false. + void UpdateUses(ir::Instruction* original_ptr_inst, + ir::Instruction* new_pointer_inst); + + // Return true if |UpdateUses| is able to change all of the uses of + // |original_ptr_inst| to |type_id| and still have valid code. + bool CanUpdateUses(ir::Instruction* original_ptr_inst, uint32_t type_id); + + // Returns the id whose value is the same as |object_to_copy| except its type + // is |new_type_id|. Any instructions need to generate this value will be + // inserted before |insertion_position|. + uint32_t GenerateCopy(ir::Instruction* object_to_copy, uint32_t new_type_id, + ir::Instruction* insertion_position); + + // Returns a store to |var_inst| that writes to the entire variable, and is + // the only store that does so. Note it does not look through OpAccessChain + // instruction, so partial stores are not considered. + ir::Instruction* FindStoreInstruction(const ir::Instruction* var_inst) const; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_COPY_PROP_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.cpp index 44e4f903f41309234e6e0148fca107469e9f742c..5dfe42e61ab9c8609833b9f8553c0e16031204aa 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2017 The Khronos Group Inc. // Copyright (c) 2017 Valve Corporation // Copyright (c) 2017 LunarG Inc. +// Copyright (c) 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,81 +18,23 @@ #include "dead_branch_elim_pass.h" #include "cfa.h" +#include "ir_context.h" #include "iterator.h" +#include "make_unique.h" namespace spvtools { namespace opt { namespace { -const uint32_t kBranchTargetLabIdInIdx = 0; const uint32_t kBranchCondTrueLabIdInIdx = 1; const uint32_t kBranchCondFalseLabIdInIdx = 2; -const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeContinueBlockIdInIdx = 1; - -} // anonymous namespace - -uint32_t DeadBranchElimPass::MergeBlockIdIfAny( - const ir::BasicBlock& blk, uint32_t* cbid) const { - auto merge_ii = blk.cend(); - --merge_ii; - uint32_t mbid = 0; - *cbid = 0; - if (merge_ii != blk.cbegin()) { - --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) { - mbid = merge_ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); - *cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); - } - else if (merge_ii->opcode() == SpvOpSelectionMerge) { - mbid = merge_ii->GetSingleWordInOperand( - kSelectionMergeMergeBlockIdInIdx); - } - } - return mbid; -} -void DeadBranchElimPass::ComputeStructuredSuccessors(ir::Function* func) { - // If header, make merge block first successor. If a loop header, make - // the second successor the continue target. - for (auto& blk : *func) { - uint32_t cbid; - uint32_t mbid = MergeBlockIdIfAny(blk, &cbid); - if (mbid != 0) { - block2structured_succs_[&blk].push_back(id2block_[mbid]); - if (cbid != 0) - block2structured_succs_[&blk].push_back(id2block_[cbid]); - } - // add true successors - blk.ForEachSuccessorLabel([&blk, this](uint32_t sbid) { - block2structured_succs_[&blk].push_back(id2block_[sbid]); - }); - } -} - -void DeadBranchElimPass::ComputeStructuredOrder( - ir::Function* func, std::list* order) { - // Compute structured successors and do DFS - ComputeStructuredSuccessors(func); - auto ignore_block = [](cbb_ptr) {}; - auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; - auto get_structured_successors = [this](const ir::BasicBlock* block) { - return &(block2structured_succs_[block]); }; - // TODO(greg-lunarg): Get rid of const_cast by making moving const - // out of the cfa.h prototypes and into the invoking code. - auto post_order = [&](cbb_ptr b) { - order->push_front(const_cast(b)); }; - - spvtools::CFA::DepthFirstTraversal( - &*func->begin(), get_structured_successors, ignore_block, post_order, - ignore_edge); -} +} // anonymous namespace bool DeadBranchElimPass::GetConstCondition(uint32_t condId, bool* condVal) { bool condIsConst; - ir::Instruction* cInst = def_use_mgr_->GetDef(condId); + ir::Instruction* cInst = get_def_use_mgr()->GetDef(condId); switch (cInst->opcode()) { case SpvOpConstantFalse: { *condVal = false; @@ -103,31 +46,26 @@ bool DeadBranchElimPass::GetConstCondition(uint32_t condId, bool* condVal) { } break; case SpvOpLogicalNot: { bool negVal; - condIsConst = GetConstCondition(cInst->GetSingleWordInOperand(0), - &negVal); - if (condIsConst) - *condVal = !negVal; - } break; - default: { - condIsConst = false; + condIsConst = + GetConstCondition(cInst->GetSingleWordInOperand(0), &negVal); + if (condIsConst) *condVal = !negVal; } break; + default: { condIsConst = false; } break; } return condIsConst; } bool DeadBranchElimPass::GetConstInteger(uint32_t selId, uint32_t* selVal) { - ir::Instruction* sInst = def_use_mgr_->GetDef(selId); + ir::Instruction* sInst = get_def_use_mgr()->GetDef(selId); uint32_t typeId = sInst->type_id(); - ir::Instruction* typeInst = def_use_mgr_->GetDef(typeId); + ir::Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; // TODO(greg-lunarg): Support non-32 bit ints - if (typeInst->GetSingleWordInOperand(0) != 32) - return false; + if (typeInst->GetSingleWordInOperand(0) != 32) return false; if (sInst->opcode() == SpvOpConstant) { *selVal = sInst->GetSingleWordInOperand(0); return true; - } - else if (sInst->opcode() == SpvOpConstantNull) { + } else if (sInst->opcode() == SpvOpConstantNull) { *selVal = 0; return true; } @@ -135,375 +73,322 @@ bool DeadBranchElimPass::GetConstInteger(uint32_t selId, uint32_t* selVal) { } void DeadBranchElimPass::AddBranch(uint32_t labelId, ir::BasicBlock* bp) { - std::unique_ptr newBranch( - new ir::Instruction(SpvOpBranch, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}})); - def_use_mgr_->AnalyzeInstDefUse(&*newBranch); + assert(get_def_use_mgr()->GetDef(labelId) != nullptr); + std::unique_ptr newBranch(new ir::Instruction( + context(), SpvOpBranch, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}})); + get_def_use_mgr()->AnalyzeInstDefUse(&*newBranch); bp->AddInstruction(std::move(newBranch)); } -void DeadBranchElimPass::AddSelectionMerge(uint32_t labelId, - ir::BasicBlock* bp) { - std::unique_ptr newMerge( - new ir::Instruction(SpvOpSelectionMerge, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {0}}})); - def_use_mgr_->AnalyzeInstDefUse(&*newMerge); - bp->AddInstruction(std::move(newMerge)); +ir::BasicBlock* DeadBranchElimPass::GetParentBlock(uint32_t id) { + return context()->get_instr_block(get_def_use_mgr()->GetDef(id)); } -void DeadBranchElimPass::AddBranchConditional(uint32_t condId, - uint32_t trueLabId, uint32_t falseLabId, ir::BasicBlock* bp) { - std::unique_ptr newBranchCond( - new ir::Instruction(SpvOpBranchConditional, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {condId}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {trueLabId}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {falseLabId}}})); - def_use_mgr_->AnalyzeInstDefUse(&*newBranchCond); - bp->AddInstruction(std::move(newBranchCond)); -} +bool DeadBranchElimPass::MarkLiveBlocks( + ir::Function* func, std::unordered_set* live_blocks) { + std::unordered_set continues; + std::vector stack; + stack.push_back(&*func->begin()); + bool modified = false; + while (!stack.empty()) { + ir::BasicBlock* block = stack.back(); + stack.pop_back(); -void DeadBranchElimPass::KillAllInsts(ir::BasicBlock* bp) { - bp->ForEachInst([this](ir::Instruction* ip) { - KillNamesAndDecorates(ip); - def_use_mgr_->KillInst(ip); - }); -} + // Live blocks doubles as visited set. + if (!live_blocks->insert(block).second) continue; -bool DeadBranchElimPass::GetSelectionBranch(ir::BasicBlock* bp, - ir::Instruction** branchInst, ir::Instruction** mergeInst, - uint32_t *condId) { - auto ii = bp->end(); - --ii; - *branchInst = &*ii; - if (ii == bp->begin()) - return false; - --ii; - *mergeInst = &*ii; - if ((*mergeInst)->opcode() != SpvOpSelectionMerge) - return false; - // SPIR-V says the terminator for an OpSelectionMerge must be - // either a conditional branch or a switch. - assert((*branchInst)->opcode() == SpvOpBranchConditional || - (*branchInst)->opcode() == SpvOpSwitch); - // Both BranchConidtional and Switch have their conditional value at 0. - *condId = (*branchInst)->GetSingleWordInOperand(0); - return true; -} + uint32_t cont_id = block->ContinueBlockIdIfAny(); + if (cont_id != 0) continues.insert(GetParentBlock(cont_id)); + + ir::Instruction* terminator = block->terminator(); + uint32_t live_lab_id = 0; + // Check if the terminator has a single valid successor. + if (terminator->opcode() == SpvOpBranchConditional) { + bool condVal; + if (GetConstCondition(terminator->GetSingleWordInOperand(0u), &condVal)) { + live_lab_id = terminator->GetSingleWordInOperand( + condVal ? kBranchCondTrueLabIdInIdx : kBranchCondFalseLabIdInIdx); + } + } else if (terminator->opcode() == SpvOpSwitch) { + uint32_t sel_val; + if (GetConstInteger(terminator->GetSingleWordInOperand(0u), &sel_val)) { + // Search switch operands for selector value, set live_lab_id to + // corresponding label, use default if not found. + uint32_t icnt = 0; + uint32_t case_val; + terminator->WhileEachInOperand( + [&icnt, &case_val, &sel_val, &live_lab_id](const uint32_t* idp) { + if (icnt == 1) { + // Start with default label. + live_lab_id = *idp; + } else if (icnt > 1) { + if (icnt % 2 == 0) { + case_val = *idp; + } else { + if (case_val == sel_val) { + live_lab_id = *idp; + return false; + } + } + } + ++icnt; + return true; + }); + } + } -bool DeadBranchElimPass::HasNonPhiNonBackedgeRef(uint32_t labelId) { - analysis::UseList* uses = def_use_mgr_->GetUses(labelId); - if (uses == nullptr) - return false; - for (auto u : *uses) { - if (u.inst->opcode() != SpvOpPhi && - backedges_.find(u.inst) == backedges_.end()) - return true; + // Don't simplify branches of continue blocks. A path from the continue to + // the header is required. + // TODO(alan-baker): They can be simplified iff there remains a path to the + // backedge. Structured control flow should guarantee one path hits the + // backedge, but I've removed the requirement for structured control flow + // from this pass. + bool simplify = live_lab_id != 0 && !continues.count(block); + + if (simplify) { + modified = true; + // Replace with unconditional branch. + // Remove the merge instruction if it is a selection merge. + AddBranch(live_lab_id, block); + context()->KillInst(terminator); + ir::Instruction* mergeInst = block->GetMergeInst(); + if (mergeInst && mergeInst->opcode() == SpvOpSelectionMerge) { + context()->KillInst(mergeInst); + } + stack.push_back(GetParentBlock(live_lab_id)); + } else { + // All successors are live. + const auto* const_block = block; + const_block->ForEachSuccessorLabel([&stack, this](const uint32_t label) { + stack.push_back(GetParentBlock(label)); + }); + } } - return false; + + return modified; } -void DeadBranchElimPass::ComputeBackEdges( - std::list& structuredOrder) { - backedges_.clear(); - std::unordered_set visited; - // In structured order, edges to visited blocks are back edges - for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); ++bi) { - visited.insert((*bi)->id()); - auto ii = (*bi)->end(); - --ii; - switch(ii->opcode()) { - case SpvOpBranch: { - const uint32_t labId = ii->GetSingleWordInOperand( - kBranchTargetLabIdInIdx); - if (visited.find(labId) != visited.end()) - backedges_.insert(&*ii); - } break; - case SpvOpBranchConditional: { - const uint32_t tLabId = ii->GetSingleWordInOperand( - kBranchCondTrueLabIdInIdx); - if (visited.find(tLabId) != visited.end()) { - backedges_.insert(&*ii); - break; +void DeadBranchElimPass::MarkUnreachableStructuredTargets( + const std::unordered_set& live_blocks, + std::unordered_set* unreachable_merges, + std::unordered_map* + unreachable_continues) { + for (auto block : live_blocks) { + if (auto merge_id = block->MergeBlockIdIfAny()) { + ir::BasicBlock* merge_block = GetParentBlock(merge_id); + if (!live_blocks.count(merge_block)) { + unreachable_merges->insert(merge_block); + } + if (auto cont_id = block->ContinueBlockIdIfAny()) { + ir::BasicBlock* cont_block = GetParentBlock(cont_id); + if (!live_blocks.count(cont_block)) { + (*unreachable_continues)[cont_block] = block; } - const uint32_t fLabId = ii->GetSingleWordInOperand( - kBranchCondFalseLabIdInIdx); - if (visited.find(fLabId) != visited.end()) - backedges_.insert(&*ii); - } break; - default: - break; + } } } } -bool DeadBranchElimPass::EliminateDeadBranches(ir::Function* func) { - // Traverse blocks in structured order - std::list structuredOrder; - ComputeStructuredOrder(func, &structuredOrder); - ComputeBackEdges(structuredOrder); - std::unordered_set elimBlocks; +bool DeadBranchElimPass::FixPhiNodesInLiveBlocks( + ir::Function* func, const std::unordered_set& live_blocks, + const std::unordered_map& + unreachable_continues) { bool modified = false; - for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); ++bi) { - // Skip blocks that are already in the elimination set - if (elimBlocks.find(*bi) != elimBlocks.end()) - continue; - // Skip blocks that don't have conditional branch preceded - // by OpSelectionMerge - ir::Instruction* br; - ir::Instruction* mergeInst; - uint32_t condId; - if (!GetSelectionBranch(*bi, &br, &mergeInst, &condId)) - continue; - - // If constant condition/selector, replace conditional branch/switch - // with unconditional branch and delete merge - uint32_t liveLabId; - if (br->opcode() == SpvOpBranchConditional) { - bool condVal; - if (!GetConstCondition(condId, &condVal)) - continue; - liveLabId = (condVal == true) ? - br->GetSingleWordInOperand(kBranchCondTrueLabIdInIdx) : - br->GetSingleWordInOperand(kBranchCondFalseLabIdInIdx); - } - else { - assert(br->opcode() == SpvOpSwitch); - // Search switch operands for selector value, set liveLabId to - // corresponding label, use default if not found - uint32_t selVal; - if (!GetConstInteger(condId, &selVal)) - continue; - uint32_t icnt = 0; - uint32_t caseVal; - br->ForEachInOperand( - [&icnt,&caseVal,&selVal,&liveLabId](const uint32_t* idp) { - if (icnt == 1) { - // Start with default label - liveLabId = *idp; + for (auto& block : *func) { + if (live_blocks.count(&block)) { + for (auto iter = block.begin(); iter != block.end();) { + if (iter->opcode() != SpvOpPhi) { + break; } - else if (icnt > 1) { - if (icnt % 2 == 0) { - caseVal = *idp; - } - else { - if (caseVal == selVal) - liveLabId = *idp; + + bool changed = false; + bool backedge_added = false; + ir::Instruction* inst = &*iter; + std::vector operands; + // Build a complete set of operands (not just input operands). Start + // with type and result id operands. + operands.push_back(inst->GetOperand(0u)); + operands.push_back(inst->GetOperand(1u)); + // Iterate through the incoming labels and determine which to keep + // and/or modify. If there in an unreachable continue block, there will + // be an edge from that block to the header. We need to keep it to + // maintain the structured control flow. If the header has more that 2 + // incoming edges, then the OpPhi must have an entry for that edge. + // However, if there is only one other incoming edge, the OpPhi can be + // eliminated. + for (uint32_t i = 1; i < inst->NumInOperands(); i += 2) { + ir::BasicBlock* inc = GetParentBlock(inst->GetSingleWordInOperand(i)); + auto cont_iter = unreachable_continues.find(inc); + if (cont_iter != unreachable_continues.end() && + cont_iter->second == &block && inst->NumInOperands() > 4) { + if (get_def_use_mgr() + ->GetDef(inst->GetSingleWordInOperand(i - 1)) + ->opcode() == SpvOpUndef) { + // Already undef incoming value, no change necessary. + operands.push_back(inst->GetInOperand(i - 1)); + operands.push_back(inst->GetInOperand(i)); + backedge_added = true; + } else { + // Replace incoming value with undef if this phi exists in the + // loop header. Otherwise, this edge is not live since the + // unreachable continue block will be replaced with an + // unconditional branch to the header only. + operands.emplace_back( + SPV_OPERAND_TYPE_ID, + std::initializer_list{Type2Undef(inst->type_id())}); + operands.push_back(inst->GetInOperand(i)); + changed = true; + backedge_added = true; + } + } else if (live_blocks.count(inc) && inc->IsSuccessor(&block)) { + // Keep live incoming edge. + operands.push_back(inst->GetInOperand(i - 1)); + operands.push_back(inst->GetInOperand(i)); + } else { + // Remove incoming edge. + changed = true; } } - ++icnt; - }); - } - - const uint32_t mergeLabId = - mergeInst->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); - AddBranch(liveLabId, *bi); - def_use_mgr_->KillInst(br); - def_use_mgr_->KillInst(mergeInst); - - modified = true; - - // Iterate to merge block adding dead blocks to elimination set - auto dbi = bi; - ++dbi; - uint32_t dLabId = (*dbi)->id(); - while (dLabId != mergeLabId) { - if (!HasNonPhiNonBackedgeRef(dLabId)) { - // Kill use/def for all instructions and mark block for elimination - KillAllInsts(*dbi); - elimBlocks.insert(*dbi); - } - ++dbi; - dLabId = (*dbi)->id(); - } - // If merge block is unreachable, continue eliminating blocks until - // a live block or last block is reached. - while (!HasNonPhiNonBackedgeRef(dLabId)) { - KillAllInsts(*dbi); - elimBlocks.insert(*dbi); - ++dbi; - if (dbi == structuredOrder.end()) - break; - dLabId = (*dbi)->id(); - } + if (changed) { + modified = true; + uint32_t continue_id = block.ContinueBlockIdIfAny(); + if (!backedge_added && continue_id != 0 && + unreachable_continues.count(GetParentBlock(continue_id)) && + operands.size() > 4) { + // Changed the backedge to branch from the continue block instead + // of a successor of the continue block. Add an entry to the phi to + // provide an undef for the continue block. Since the successor of + // the continue must also be unreachable (dominated by the continue + // block), any entry for the original backedge has been removed + // from the phi operands. + operands.emplace_back( + SPV_OPERAND_TYPE_ID, + std::initializer_list{Type2Undef(inst->type_id())}); + operands.emplace_back(SPV_OPERAND_TYPE_ID, + std::initializer_list{continue_id}); + } - // If last block reached, look for next dead branch - if (dbi == structuredOrder.end()) - continue; - - // Create set of dead predecessors in preparation for phi update. - // Add the header block if the live branch is not the merge block. - std::unordered_set deadPreds(elimBlocks); - if (liveLabId != dLabId) - deadPreds.insert(*bi); - - // Update phi instructions in terminating block. - for (auto pii = (*dbi)->begin(); ; ++pii) { - // Skip NoOps, break at end of phis - SpvOp op = pii->opcode(); - if (op == SpvOpNop) - continue; - if (op != SpvOpPhi) - break; - // Count phi's live predecessors with lcnt and remember last one - // with lidx. - uint32_t lcnt = 0; - uint32_t lidx = 0; - uint32_t icnt = 0; - pii->ForEachInId( - [&deadPreds,&icnt,&lcnt,&lidx,this](uint32_t* idp) { - if (icnt % 2 == 1) { - if (deadPreds.find(id2block_[*idp]) == deadPreds.end()) { - ++lcnt; - lidx = icnt - 1; + // Either replace the phi with a single value or rebuild the phi out + // of |operands|. + // + // We always have type and result id operands. So this phi has a + // single source if there are two more operands beyond those. + if (operands.size() == 4) { + // First input data operands is at index 2. + uint32_t replId = operands[2u].words[0]; + context()->ReplaceAllUsesWith(inst->result_id(), replId); + iter = context()->KillInst(&*inst); + } else { + // We've rewritten the operands, so first instruct the def/use + // manager to forget uses in the phi before we replace them. After + // replacing operands update the def/use manager by re-analyzing + // the used ids in this phi. + get_def_use_mgr()->EraseUseRecordsOfOperandIds(inst); + inst->ReplaceOperands(operands); + get_def_use_mgr()->AnalyzeInstUse(inst); + ++iter; } + } else { + ++iter; } - ++icnt; - }); - // If just one live predecessor, replace resultid with live value id. - uint32_t replId; - if (lcnt == 1) { - replId = pii->GetSingleWordInOperand(lidx); - } - else { - // Otherwise create new phi eliminating dead predecessor entries - assert(lcnt > 1); - replId = TakeNextId(); - std::vector phi_in_opnds; - icnt = 0; - uint32_t lastId; - pii->ForEachInId( - [&deadPreds,&icnt,&phi_in_opnds,&lastId,this](uint32_t* idp) { - if (icnt % 2 == 1) { - if (deadPreds.find(id2block_[*idp]) == deadPreds.end()) { - phi_in_opnds.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {lastId}}); - phi_in_opnds.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*idp}}); - } - } - else { - lastId = *idp; - } - ++icnt; - }); - std::unique_ptr newPhi(new ir::Instruction( - SpvOpPhi, pii->type_id(), replId, phi_in_opnds)); - def_use_mgr_->AnalyzeInstDefUse(&*newPhi); - pii = pii.InsertBefore(std::move(newPhi)); - ++pii; } - const uint32_t phiId = pii->result_id(); - KillNamesAndDecorates(phiId); - (void)def_use_mgr_->ReplaceAllUsesWith(phiId, replId); - def_use_mgr_->KillInst(&*pii); } } - // Erase dead blocks - for (auto ebi = func->begin(); ebi != func->end(); ) - if (elimBlocks.find(&*ebi) != elimBlocks.end()) - ebi = ebi.Erase(); - else - ++ebi; return modified; } -void DeadBranchElimPass::Initialize(ir::Module* module) { - - module_ = module; - - // Initialize function and block maps - id2block_.clear(); - block2structured_succs_.clear(); +bool DeadBranchElimPass::EraseDeadBlocks( + ir::Function* func, const std::unordered_set& live_blocks, + const std::unordered_set& unreachable_merges, + const std::unordered_map& + unreachable_continues) { + bool modified = false; + for (auto ebi = func->begin(); ebi != func->end();) { + if (unreachable_merges.count(&*ebi)) { + if (ebi->begin() != ebi->tail() || + ebi->terminator()->opcode() != SpvOpUnreachable) { + // Make unreachable, but leave the label. + KillAllInsts(&*ebi, false); + // Add unreachable terminator. + ebi->AddInstruction( + MakeUnique(context(), SpvOpUnreachable, 0, 0, + std::initializer_list{})); + modified = true; + } + ++ebi; + } else if (unreachable_continues.count(&*ebi)) { + uint32_t cont_id = unreachable_continues.find(&*ebi)->second->id(); + if (ebi->begin() != ebi->tail() || + ebi->terminator()->opcode() != SpvOpBranch || + ebi->terminator()->GetSingleWordInOperand(0u) != cont_id) { + // Make unreachable, but leave the label. + KillAllInsts(&*ebi, false); + // Add unconditional branch to header. + assert(unreachable_continues.count(&*ebi)); + ebi->AddInstruction( + MakeUnique(context(), SpvOpBranch, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {cont_id}}})); + get_def_use_mgr()->AnalyzeInstUse(&*ebi->tail()); + modified = true; + } + ++ebi; + } else if (!live_blocks.count(&*ebi)) { + // Kill this block. + KillAllInsts(&*ebi); + ebi = ebi.Erase(); + modified = true; + } else { + ++ebi; + } + } - // Initialize block map - for (auto& fn : *module_) - for (auto& blk : fn) - id2block_[blk.id()] = &blk; + return modified; +} - // TODO(greg-lunarg): Reuse def/use from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); +bool DeadBranchElimPass::EliminateDeadBranches(ir::Function* func) { + bool modified = false; + std::unordered_set live_blocks; + modified |= MarkLiveBlocks(func, &live_blocks); - // Initialize next unused Id. - InitNextId(); + std::unordered_set unreachable_merges; + std::unordered_map unreachable_continues; + MarkUnreachableStructuredTargets(live_blocks, &unreachable_merges, + &unreachable_continues); + modified |= FixPhiNodesInLiveBlocks(func, live_blocks, unreachable_continues); + modified |= EraseDeadBlocks(func, live_blocks, unreachable_merges, + unreachable_continues); - // Initialize extension whitelist - InitExtensions(); -}; + return modified; +} -bool DeadBranchElimPass::AllExtensionsSupported() const { - // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); - if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) - return false; - } - return true; +void DeadBranchElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); } Pass::Status DeadBranchElimPass::ProcessImpl() { - // Current functionality assumes structured control flow. - // TODO(greg-lunarg): Handle non-structured control-flow. - if (!module_->HasCapability(SpvCapabilityShader)) - return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; - // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Collect all named and decorated ids - FindNamedOrDecoratedIds(); + for (auto& ai : get_module()->annotations()) + if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; // Process all entry point functions ProcessFunction pfn = [this](ir::Function* fp) { return EliminateDeadBranches(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(); + bool modified = ProcessReachableCallTree(pfn, context()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } DeadBranchElimPass::DeadBranchElimPass() {} -Pass::Status DeadBranchElimPass::Process(ir::Module* module) { +Pass::Status DeadBranchElimPass::Process(ir::IRContext* module) { Initialize(module); return ProcessImpl(); } -void DeadBranchElimPass::InitExtensions() { - extensions_whitelist_.clear(); - extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - "SPV_KHR_variable_pointers", - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - }); -} - } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.h index 0b0f25d79a68d002fd74663308f368649ddb9d13..62ec582caf2fb59fdd92c8d6e1c676090a5f61f3 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_branch_elim_pass.h @@ -17,7 +17,6 @@ #ifndef LIBSPIRV_OPT_DEAD_BRANCH_ELIM_PASS_H_ #define LIBSPIRV_OPT_DEAD_BRANCH_ELIM_PASS_H_ - #include #include #include @@ -27,48 +26,26 @@ #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. class DeadBranchElimPass : public MemPass { - using cbb_ptr = const ir::BasicBlock*; public: - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; - DeadBranchElimPass(); const char* name() const override { return "eliminate-dead-branches"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* context) override; - private: - // Returns the id of the merge block declared by a merge instruction in - // this block |blk|, if any. If none, returns zero. If loop merge, returns - // the continue target id in |cbid|. Otherwise sets to zero. - uint32_t MergeBlockIdIfAny(const ir::BasicBlock& blk, uint32_t* cbid) const; - - // Compute structured successors for function |func|. - // A block's structured successors are the blocks it branches to - // together with its declared merge block if it has one. - // When order matters, the merge block always appears first and if - // a loop merge block, the continue target always appears second. - // This assures correct depth first search in the presence of early - // returns and kills. If the successor vector contain duplicates - // of the merge and continue blocks, they are safely ignored by DFS. - void ComputeStructuredSuccessors(ir::Function* func); - - // Compute structured block order |order| for function |func|. This order - // has the property that dominators are before all blocks they dominate and - // merge blocks are after all blocks that are in the control constructs of - // their header. - void ComputeStructuredOrder( - ir::Function* func, std::list* order); + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } + private: // If |condId| is boolean constant, return conditional value in |condVal| and // return true, otherwise return false. bool GetConstCondition(uint32_t condId, bool* condVal); @@ -80,63 +57,82 @@ class DeadBranchElimPass : public MemPass { // Add branch to |labelId| to end of block |bp|. void AddBranch(uint32_t labelId, ir::BasicBlock* bp); - // Add selction merge of |labelId| to end of block |bp|. - void AddSelectionMerge(uint32_t labelId, ir::BasicBlock* bp); - - // Add conditional branch of |condId|, |trueLabId| and |falseLabId| to end - // of block |bp|. - void AddBranchConditional(uint32_t condId, uint32_t trueLabId, - uint32_t falseLabId, ir::BasicBlock* bp); - - // Kill all instructions in block |bp|. - void KillAllInsts(ir::BasicBlock* bp); - - // If block |bp| contains conditional branch or switch preceeded by an - // OpSelctionMerge, return true and return branch and merge instructions - // in |branchInst| and |mergeInst| and the conditional id in |condId|. - bool GetSelectionBranch(ir::BasicBlock* bp, ir::Instruction** branchInst, - ir::Instruction** mergeInst, uint32_t *condId); - - // Return true if |labelId| has any non-phi, non-backedge references - bool HasNonPhiNonBackedgeRef(uint32_t labelId); - - // Compute backedges for blocks in |structuredOrder|. - void ComputeBackEdges(std::list& structuredOrder); - // For function |func|, look for BranchConditionals with constant condition // and convert to a Branch to the indicated label. Delete resulting dead - // blocks. Assumes only structured control flow in shader. Note some such - // branches and blocks may be left to avoid creating invalid control flow. - // TODO(greg-lunarg): Remove remaining constant conditional branches and - // dead blocks. + // blocks. Note some such branches and blocks may be left to avoid creating + // invalid control flow. + // TODO(greg-lunarg): Remove remaining constant conditional branches and dead + // blocks. bool EliminateDeadBranches(ir::Function* func); - // Initialize extensions whitelist - void InitExtensions(); - - // Return true if all extensions in this module are allowed by this pass. - bool AllExtensionsSupported() const; - - void Initialize(ir::Module* module); + // Returns the basic block containing |id|. + // Note: this pass only requires correct instruction block mappings for the + // input. This pass does not preserve the block mapping, so it is not kept + // up-to-date during processing. + ir::BasicBlock* GetParentBlock(uint32_t id); + + // Marks live blocks reachable from the entry of |func|. Simplifies constant + // branches and switches as it proceeds, to limit the number of live blocks. + // It is careful not to eliminate backedges even if they are dead, but the + // header is live. Likewise, unreachable merge blocks named in live merge + // instruction must be retained (though they may be clobbered). + bool MarkLiveBlocks(ir::Function* func, + std::unordered_set* live_blocks); + + // Checks for unreachable merge and continue blocks with live headers; those + // blocks must be retained. Continues are tracked separately so that a live + // phi can be updated to take an undef value from any of its predecessors + // that are unreachable continues. + // + // |unreachable_continues| maps the id of an unreachable continue target to + // the header block that declares it. + void MarkUnreachableStructuredTargets( + const std::unordered_set& live_blocks, + std::unordered_set* unreachable_merges, + std::unordered_map* + unreachable_continues); + + // Fix phis in reachable blocks so that only live (or unremovable) incoming + // edges are present. If the block now only has a single live incoming edge, + // remove the phi and replace its uses with its data input. If the single + // remaining incoming edge is from the phi itself, the the phi is in an + // unreachable single block loop. Either the block is dead and will be + // removed, or it's reachable from an unreachable continue target. In the + // latter case that continue target block will be collapsed into a block that + // only branches back to its header and we'll eliminate the block with the + // phi. + // + // |unreachable_continues| maps continue targets that cannot be reached to + // merge instruction that declares them. + bool FixPhiNodesInLiveBlocks( + ir::Function* func, + const std::unordered_set& live_blocks, + const std::unordered_map& + unreachable_continues); + + // Erases dead blocks. Any block captured in |unreachable_merges| or + // |unreachable_continues| is a dead block that is required to remain due to + // a live merge instruction in the corresponding header. These blocks will + // have their instructions clobbered and will become a label and terminator. + // Unreachable merge blocks are terminated by OpUnreachable, while + // unreachable continue blocks are terminated by an unconditional branch to + // the header. Otherwise, blocks are dead if not explicitly captured in + // |live_blocks| and are totally removed. + // + // |unreachable_continues| maps continue targets that cannot be reached to + // corresponding header block that declares them. + bool EraseDeadBlocks( + ir::Function* func, + const std::unordered_set& live_blocks, + const std::unordered_set& unreachable_merges, + const std::unordered_map& + unreachable_continues); + + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); - - // Map from block's label id to block. - std::unordered_map id2block_; - - // Map from block to its structured successor blocks. See - // ComputeStructuredSuccessors() for definition. - std::unordered_map> - block2structured_succs_; - - // All backedge branches in current function - std::unordered_set backedges_; - - // Extensions supported by this pass. - std::unordered_set extensions_whitelist_; }; } // namespace opt } // namespace spvtools #endif // LIBSPIRV_OPT_DEAD_BRANCH_ELIM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed0c7b8fe829c68324786622be111562f37d21de --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.cpp @@ -0,0 +1,279 @@ +// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018 Valve Corporation +// Copyright (c) 2018 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "dead_insert_elim_pass.h" + +#include "composite.h" +#include "ir_context.h" +#include "iterator.h" +#include "spirv/1.2/GLSL.std.450.h" + +#include + +namespace spvtools { +namespace opt { + +namespace { + +const uint32_t kTypeVectorCountInIdx = 1; +const uint32_t kTypeMatrixCountInIdx = 1; +const uint32_t kTypeArrayLengthIdInIdx = 1; +const uint32_t kTypeIntWidthInIdx = 0; +const uint32_t kConstantValueInIdx = 0; +const uint32_t kInsertObjectIdInIdx = 0; +const uint32_t kInsertCompositeIdInIdx = 1; + +} // anonymous namespace + +uint32_t DeadInsertElimPass::NumComponents(ir::Instruction* typeInst) { + switch (typeInst->opcode()) { + case SpvOpTypeVector: { + return typeInst->GetSingleWordInOperand(kTypeVectorCountInIdx); + } break; + case SpvOpTypeMatrix: { + return typeInst->GetSingleWordInOperand(kTypeMatrixCountInIdx); + } break; + case SpvOpTypeArray: { + uint32_t lenId = + typeInst->GetSingleWordInOperand(kTypeArrayLengthIdInIdx); + ir::Instruction* lenInst = get_def_use_mgr()->GetDef(lenId); + if (lenInst->opcode() != SpvOpConstant) return 0; + uint32_t lenTypeId = lenInst->type_id(); + ir::Instruction* lenTypeInst = get_def_use_mgr()->GetDef(lenTypeId); + // TODO(greg-lunarg): Support non-32-bit array length + if (lenTypeInst->GetSingleWordInOperand(kTypeIntWidthInIdx) != 32) + return 0; + return lenInst->GetSingleWordInOperand(kConstantValueInIdx); + } break; + case SpvOpTypeStruct: { + return typeInst->NumInOperands(); + } break; + default: { return 0; } break; + } +} + +void DeadInsertElimPass::MarkInsertChain( + ir::Instruction* insertChain, std::vector* pExtIndices, + uint32_t extOffset, std::unordered_set* visited_phis) { + // Not currently optimizing array inserts. + ir::Instruction* typeInst = get_def_use_mgr()->GetDef(insertChain->type_id()); + if (typeInst->opcode() == SpvOpTypeArray) return; + // Insert chains are only composed of inserts and phis + if (insertChain->opcode() != SpvOpCompositeInsert && + insertChain->opcode() != SpvOpPhi) + return; + // If extract indices are empty, mark all subcomponents if type + // is constant length. + if (pExtIndices == nullptr) { + uint32_t cnum = NumComponents(typeInst); + if (cnum > 0) { + std::vector extIndices; + for (uint32_t i = 0; i < cnum; i++) { + extIndices.clear(); + extIndices.push_back(i); + std::unordered_set sub_visited_phis; + MarkInsertChain(insertChain, &extIndices, 0, &sub_visited_phis); + } + return; + } + } + ir::Instruction* insInst = insertChain; + while (insInst->opcode() == SpvOpCompositeInsert) { + // If no extract indices, mark insert and inserted object (which might + // also be an insert chain) and continue up the chain though the input + // composite. + // + // Note: We mark inserted objects in this function (rather than in + // EliminateDeadInsertsOnePass) because in some cases, we can do it + // more accurately here. + if (pExtIndices == nullptr) { + liveInserts_.insert(insInst->result_id()); + uint32_t objId = insInst->GetSingleWordInOperand(kInsertObjectIdInIdx); + std::unordered_set obj_visited_phis; + MarkInsertChain(get_def_use_mgr()->GetDef(objId), nullptr, 0, + &obj_visited_phis); + } + // If extract indices match insert, we are done. Mark insert and + // inserted object. + else if (ExtInsMatch(*pExtIndices, insInst, extOffset)) { + liveInserts_.insert(insInst->result_id()); + uint32_t objId = insInst->GetSingleWordInOperand(kInsertObjectIdInIdx); + std::unordered_set obj_visited_phis; + MarkInsertChain(get_def_use_mgr()->GetDef(objId), nullptr, 0, + &obj_visited_phis); + break; + } + // If non-matching intersection, mark insert + else if (ExtInsConflict(*pExtIndices, insInst, extOffset)) { + liveInserts_.insert(insInst->result_id()); + // If more extract indices than insert, we are done. Use remaining + // extract indices to mark inserted object. + uint32_t numInsertIndices = insInst->NumInOperands() - 2; + if (pExtIndices->size() - extOffset > numInsertIndices) { + uint32_t objId = insInst->GetSingleWordInOperand(kInsertObjectIdInIdx); + std::unordered_set obj_visited_phis; + MarkInsertChain(get_def_use_mgr()->GetDef(objId), pExtIndices, + extOffset + numInsertIndices, &obj_visited_phis); + break; + } + // If fewer extract indices than insert, also mark inserted object and + // continue up chain. + else { + uint32_t objId = insInst->GetSingleWordInOperand(kInsertObjectIdInIdx); + std::unordered_set obj_visited_phis; + MarkInsertChain(get_def_use_mgr()->GetDef(objId), nullptr, 0, + &obj_visited_phis); + } + } + // Get next insert in chain + const uint32_t compId = + insInst->GetSingleWordInOperand(kInsertCompositeIdInIdx); + insInst = get_def_use_mgr()->GetDef(compId); + } + // If insert chain ended with phi, do recursive call on each operand + if (insInst->opcode() != SpvOpPhi) return; + // Mark phi visited to prevent potential infinite loop. If phi is already + // visited, return to avoid infinite loop. + if (visited_phis->count(insInst->result_id()) != 0) return; + visited_phis->insert(insInst->result_id()); + + // Phis may have duplicate inputs values for different edges, prune incoming + // ids lists before recursing. + std::vector ids; + for (uint32_t i = 0; i < insInst->NumInOperands(); i += 2) { + ids.push_back(insInst->GetSingleWordInOperand(i)); + } + std::sort(ids.begin(), ids.end()); + auto new_end = std::unique(ids.begin(), ids.end()); + for (auto id_iter = ids.begin(); id_iter != new_end; ++id_iter) { + ir::Instruction* pi = get_def_use_mgr()->GetDef(*id_iter); + MarkInsertChain(pi, pExtIndices, extOffset, visited_phis); + } +} + +bool DeadInsertElimPass::EliminateDeadInserts(ir::Function* func) { + bool modified = false; + bool lastmodified = true; + // Each pass can delete dead instructions, thus potentially revealing + // new dead insertions ie insertions with no uses. + while (lastmodified) { + lastmodified = EliminateDeadInsertsOnePass(func); + modified |= lastmodified; + } + return modified; +} + +bool DeadInsertElimPass::EliminateDeadInsertsOnePass(ir::Function* func) { + bool modified = false; + liveInserts_.clear(); + visitedPhis_.clear(); + // Mark all live inserts + for (auto bi = func->begin(); bi != func->end(); ++bi) { + for (auto ii = bi->begin(); ii != bi->end(); ++ii) { + // Only process Inserts and composite Phis + SpvOp op = ii->opcode(); + ir::Instruction* typeInst = get_def_use_mgr()->GetDef(ii->type_id()); + if (op != SpvOpCompositeInsert && + (op != SpvOpPhi || !spvOpcodeIsComposite(typeInst->opcode()))) + continue; + // The marking algorithm can be expensive for large arrays and the + // efficacy of eliminating dead inserts into arrays is questionable. + // Skip optimizing array inserts for now. Just mark them live. + // TODO(greg-lunarg): Eliminate dead array inserts + if (op == SpvOpCompositeInsert) { + if (typeInst->opcode() == SpvOpTypeArray) { + liveInserts_.insert(ii->result_id()); + continue; + } + } + const uint32_t id = ii->result_id(); + get_def_use_mgr()->ForEachUser(id, [&ii, this](ir::Instruction* user) { + switch (user->opcode()) { + case SpvOpCompositeInsert: + case SpvOpPhi: + // Use by insert or phi does not initiate marking + break; + case SpvOpCompositeExtract: { + // Capture extract indices + std::vector extIndices; + uint32_t icnt = 0; + user->ForEachInOperand([&icnt, &extIndices](const uint32_t* idp) { + if (icnt > 0) extIndices.push_back(*idp); + ++icnt; + }); + // Mark all inserts in chain that intersect with extract + std::unordered_set visited_phis; + MarkInsertChain(&*ii, &extIndices, 0, &visited_phis); + } break; + default: { + // Mark inserts in chain for all components + MarkInsertChain(&*ii, nullptr, 0, nullptr); + } break; + } + }); + } + } + // Find and disconnect dead inserts + std::vector dead_instructions; + for (auto bi = func->begin(); bi != func->end(); ++bi) { + for (auto ii = bi->begin(); ii != bi->end(); ++ii) { + if (ii->opcode() != SpvOpCompositeInsert) continue; + const uint32_t id = ii->result_id(); + if (liveInserts_.find(id) != liveInserts_.end()) continue; + const uint32_t replId = + ii->GetSingleWordInOperand(kInsertCompositeIdInIdx); + (void)context()->ReplaceAllUsesWith(id, replId); + dead_instructions.push_back(&*ii); + modified = true; + } + } + // DCE dead inserts + while (!dead_instructions.empty()) { + ir::Instruction* inst = dead_instructions.back(); + dead_instructions.pop_back(); + DCEInst(inst, [&dead_instructions](ir::Instruction* other_inst) { + auto i = std::find(dead_instructions.begin(), dead_instructions.end(), + other_inst); + if (i != dead_instructions.end()) { + dead_instructions.erase(i); + } + }); + } + return modified; +} + +void DeadInsertElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); +} + +Pass::Status DeadInsertElimPass::ProcessImpl() { + // Process all entry point functions. + ProcessFunction pfn = [this](ir::Function* fp) { + return EliminateDeadInserts(fp); + }; + bool modified = ProcessEntryPointCallTree(pfn, get_module()); + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +DeadInsertElimPass::DeadInsertElimPass() {} + +Pass::Status DeadInsertElimPass::Process(ir::IRContext* c) { + Initialize(c); + return ProcessImpl(); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..f7ee46a83e6ddbbe563b1b84844fe66e26f0c58d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_insert_elim_pass.h @@ -0,0 +1,83 @@ +// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018 Valve Corporation +// Copyright (c) 2018 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_DEAD_INSERT_ELIM_PASS_H_ +#define LIBSPIRV_OPT_DEAD_INSERT_ELIM_PASS_H_ + +#include +#include +#include +#include +#include + +#include "basic_block.h" +#include "def_use_manager.h" +#include "ir_context.h" +#include "mem_pass.h" +#include "module.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class DeadInsertElimPass : public MemPass { + public: + DeadInsertElimPass(); + const char* name() const override { return "eliminate-dead-inserts"; } + Status Process(ir::IRContext*) override; + + private: + // Return the number of subcomponents in the composite type |typeId|. + // Return 0 if not a composite type or number of components is not a + // 32-bit constant. + uint32_t NumComponents(ir::Instruction* typeInst); + + // Mark all inserts in instruction chain ending at |insertChain| with + // indices that intersect with extract indices |extIndices| starting with + // index at |extOffset|. Chains are composed solely of Inserts and Phis. + // Mark all inserts in chain if |extIndices| is nullptr. + void MarkInsertChain(ir::Instruction* insertChain, + std::vector* extIndices, uint32_t extOffset, + std::unordered_set* visited_phis); + + // Perform EliminateDeadInsertsOnePass(|func|) until no modification is + // made. Return true if modified. + bool EliminateDeadInserts(ir::Function* func); + + // DCE all dead struct, matrix and vector inserts in |func|. An insert is + // dead if the value it inserts is never used. Replace any reference to the + // insert with its original composite. Return true if modified. Dead inserts + // in dependence cycles are not currently eliminated. Dead inserts into + // arrays are not currently eliminated. + bool EliminateDeadInsertsOnePass(ir::Function* func); + + // Return true if all extensions in this module are allowed by this pass. + bool AllExtensionsSupported() const; + + void Initialize(ir::IRContext* c); + Pass::Status ProcessImpl(); + + // Live inserts + std::unordered_set liveInserts_; + + // Visited phis as insert chain is traversed; used to avoid infinite loop + std::unordered_map visitedPhis_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_DEAD_INSERT_ELIM_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.cpp index 0e160816d5d8994b35aa34487cbe2a5c4bd681c5..1fec3a4f8ad22bb535fee5eb336dbec12db4bc75 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.cpp @@ -14,6 +14,7 @@ #include "dead_variable_elimination.h" +#include "ir_context.h" #include "reflect.h" namespace spvtools { @@ -21,24 +22,18 @@ namespace opt { // This optimization removes global variables that are not needed because they // are definitely not accessed. -Pass::Status DeadVariableElimination::Process(spvtools::ir::Module* module) { +Pass::Status DeadVariableElimination::Process(ir::IRContext* c) { // The algorithm will compute the reference count for every global variable. // Anything with a reference count of 0 will then be deleted. For variables - // that might have references that are not explicit in this module, we use the + // that might have references that are not explicit in this context, we use + // the // value kMustKeep as the reference count. - - bool modified = false; - module_ = module; - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); - FindNamedOrDecoratedIds(); - - // Decoration manager to help organize decorations. - analysis::DecorationManager decoration_manager(module); + InitializeProcessing(c); std::vector ids_to_remove; // Get the reference count for all of the global OpVariable instructions. - for (auto& inst : module->types_values()) { + for (auto& inst : context()->types_values()) { if (inst.opcode() != SpvOp::SpvOpVariable) { continue; } @@ -48,7 +43,7 @@ Pass::Status DeadVariableElimination::Process(spvtools::ir::Module* module) { // Check the linkage. If it is exported, it could be reference somewhere // else, so we must keep the variable around. - decoration_manager.ForEachDecoration( + get_decoration_mgr()->ForEachDecoration( result_id, SpvDecorationLinkageAttributes, [&count](const ir::Instruction& linkage_instruction) { uint32_t last_operand = linkage_instruction.NumOperands() - 1; @@ -61,13 +56,14 @@ Pass::Status DeadVariableElimination::Process(spvtools::ir::Module* module) { if (count != kMustKeep) { // If we don't have to keep the instruction for other reasons, then look // at the uses and count the number of real references. - if (analysis::UseList* uses = def_use_mgr_->GetUses(result_id)) { - count = std::count_if( - uses->begin(), uses->end(), [](const analysis::Use& u) { - return (!ir::IsAnnotationInst(u.inst->opcode()) && - u.inst->opcode() != SpvOpName); - }); - } + count = 0; + get_def_use_mgr()->ForEachUser( + result_id, [&count](ir::Instruction* user) { + if (!ir::IsAnnotationInst(user->opcode()) && + user->opcode() != SpvOpName) { + ++count; + } + }); } reference_count_[result_id] = count; if (count == 0) { @@ -76,6 +72,7 @@ Pass::Status DeadVariableElimination::Process(spvtools::ir::Module* module) { } // Remove all of the variables that have a reference count of 0. + bool modified = false; if (!ids_to_remove.empty()) { modified = true; for (auto result_id : ids_to_remove) { @@ -86,15 +83,15 @@ Pass::Status DeadVariableElimination::Process(spvtools::ir::Module* module) { } void DeadVariableElimination::DeleteVariable(uint32_t result_id) { - ir::Instruction* inst = def_use_mgr_->GetDef(result_id); + ir::Instruction* inst = get_def_use_mgr()->GetDef(result_id); assert(inst->opcode() == SpvOpVariable && - "Should not be trying to delete anything other than an OpVariable."); + "Should not be trying to delete anything other than an OpVariable."); // Look for an initializer that references another variable. We need to know // if that variable can be deleted after the reference is removed. if (inst->NumOperands() == 4) { ir::Instruction* initializer = - def_use_mgr_->GetDef(inst->GetSingleWordOperand(3)); + get_def_use_mgr()->GetDef(inst->GetSingleWordOperand(3)); // TODO: Handle OpSpecConstantOP which might be defined in terms of other // variables. Will probably require a unified dead code pass that does all @@ -111,8 +108,7 @@ void DeadVariableElimination::DeleteVariable(uint32_t result_id) { } } } - this->KillNamesAndDecorates(result_id); - def_use_mgr_->KillDef(result_id); + context()->KillDef(result_id); } } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.h index a0992cca1bcac47ef9987e0e049f3130743ca869..f016e78b2d42668aaea67aec3aa2e1948271d9c2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dead_variable_elimination.h @@ -15,8 +15,8 @@ #ifndef SPIRV_TOOLS_DEAD_VARIABLE_ELIMINATION_H #define SPIRV_TOOLS_DEAD_VARIABLE_ELIMINATION_H -#include #include +#include #include "decoration_manager.h" #include "mem_pass.h" @@ -27,7 +27,11 @@ namespace opt { class DeadVariableElimination : public MemPass { public: const char* name() const override { return "dead-variable-elimination"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } private: // Deletes the OpVariable instruction who result id is |result_id|. diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.cpp index b12670bf02e87f915eb3d7ad0226835385f9350b..f382d7846eb06871972a18fe2738d0871761e9c0 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.cpp @@ -14,46 +14,129 @@ #include "decoration_manager.h" +#include +#include #include +#include "ir_context.h" + namespace spvtools { namespace opt { namespace analysis { -void DecorationManager::RemoveDecorationsFrom(uint32_t id, bool keep_linkage) { - auto const ids_iter = id_to_decoration_insts_.find(id); +void DecorationManager::RemoveDecorationsFrom( + uint32_t id, std::function pred) { + const auto ids_iter = id_to_decoration_insts_.find(id); if (ids_iter == id_to_decoration_insts_.end()) return; - for (ir::Instruction* inst : ids_iter->second) { - switch (inst->opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpMemberDecorate: - if (!(keep_linkage && inst->GetSingleWordInOperand(1u) == - SpvDecorationLinkageAttributes)) - inst->ToNop(); - break; - case SpvOpGroupDecorate: - for (uint32_t i = 1u; i < inst->NumInOperands(); ++i) { - if (inst->GetSingleWordInOperand(i) == inst->result_id()) { - // TODO(pierremoreau): This could be optimised by copying the last - // operand over this one, or using a compacting - // filtering algorithm over all other IDs - inst->RemoveInOperand(i); - } - } - break; - case SpvOpGroupMemberDecorate: - for (uint32_t i = 1u; i < inst->NumInOperands(); i += 2u) { - if (inst->GetSingleWordInOperand(i) == inst->result_id()) { - // TODO(pierremoreau): Same optimisation opportunity as above. - inst->RemoveInOperand(i); - } - } - break; - default: - break; + TargetData& decorations_info = ids_iter->second; + auto context = module_->context(); + std::vector insts_to_kill; + const bool is_group = !decorations_info.decorate_insts.empty(); + + // Schedule all direct decorations for removal if instructed as such by + // |pred|. + for (ir::Instruction* inst : decorations_info.direct_decorations) + if (pred(*inst)) insts_to_kill.push_back(inst); + + // For all groups being directly applied to |id|, remove |id| (and the + // literal if |inst| is an OpGroupMemberDecorate) from the instruction + // applying the group. + std::unordered_set indirect_decorations_to_remove; + for (ir::Instruction* inst : decorations_info.indirect_decorations) { + assert(inst->opcode() == SpvOpGroupDecorate || + inst->opcode() == SpvOpGroupMemberDecorate); + + std::vector group_decorations_to_keep; + const uint32_t group_id = inst->GetSingleWordInOperand(0u); + const auto group_iter = id_to_decoration_insts_.find(group_id); + assert(group_iter != id_to_decoration_insts_.end() && + "Unknown decoration group"); + const auto& group_decorations = group_iter->second.direct_decorations; + for (ir::Instruction* decoration : group_decorations) { + if (!pred(*decoration)) group_decorations_to_keep.push_back(decoration); + } + + // If all decorations should be kept, move to the next group + if (group_decorations_to_keep.size() == group_decorations.size()) continue; + + // Otherwise, remove |id| from the targets of |group_id| + const uint32_t stride = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + bool was_modified = false; + for (uint32_t i = 1u; i < inst->NumInOperands();) { + if (inst->GetSingleWordInOperand(i) != id) { + i += stride; + continue; + } + + const uint32_t last_operand_index = inst->NumInOperands() - stride; + if (i < last_operand_index) + inst->GetInOperand(i) = inst->GetInOperand(last_operand_index); + // Remove the associated literal, if it exists. + if (stride == 2u) { + if (i < last_operand_index) + inst->GetInOperand(i + 1u) = + inst->GetInOperand(last_operand_index + 1u); + inst->RemoveInOperand(last_operand_index + 1u); + } + inst->RemoveInOperand(last_operand_index); + was_modified = true; + } + + // If the instruction has no targets left, remove the instruction + // altogether. + if (inst->NumInOperands() == 1u) { + indirect_decorations_to_remove.emplace(inst); + insts_to_kill.push_back(inst); + } else if (was_modified) { + context->ForgetUses(inst); + indirect_decorations_to_remove.emplace(inst); + context->AnalyzeUses(inst); } + + // If only some of the decorations should be kept, clone them and apply + // them directly to |id|. + if (!group_decorations_to_keep.empty()) { + for (ir::Instruction* decoration : group_decorations_to_keep) { + // simply clone decoration and change |group_id| to |id| + std::unique_ptr new_inst( + decoration->Clone(module_->context())); + new_inst->SetInOperand(0, {id}); + module_->AddAnnotationInst(std::move(new_inst)); + auto decoration_iter = --module_->annotation_end(); + context->AnalyzeUses(&*decoration_iter); + } + } + } + + auto& indirect_decorations = decorations_info.indirect_decorations; + indirect_decorations.erase( + std::remove_if( + indirect_decorations.begin(), indirect_decorations.end(), + [&indirect_decorations_to_remove](const ir::Instruction* inst) { + return indirect_decorations_to_remove.count(inst); + }), + indirect_decorations.end()); + + for (ir::Instruction* inst : insts_to_kill) context->KillInst(inst); + insts_to_kill.clear(); + + // Schedule all instructions applying the group for removal if this group no + // longer applies decorations, either directly or indirectly. + if (is_group && decorations_info.direct_decorations.empty() && + decorations_info.indirect_decorations.empty()) { + for (ir::Instruction* inst : decorations_info.decorate_insts) + insts_to_kill.push_back(inst); + } + for (ir::Instruction* inst : insts_to_kill) context->KillInst(inst); + + if (decorations_info.direct_decorations.empty() && + decorations_info.indirect_decorations.empty() && + decorations_info.decorate_insts.empty()) { + id_to_decoration_insts_.erase(ids_iter); + + // Remove the OpDecorationGroup defining this group. + if (is_group) context->KillInst(context->get_def_use_mgr()->GetDef(id)); } } @@ -68,115 +151,134 @@ std::vector DecorationManager::GetDecorationsFor( ->InternalGetDecorationsFor(id, include_linkage); } -// TODO(pierremoreau): The code will return true for { deco1, deco1 }, { deco1, -// deco2 } when it should return false. bool DecorationManager::HaveTheSameDecorations(uint32_t id1, uint32_t id2) const { - const auto decorationsFor1 = GetDecorationsFor(id1, false); - const auto decorationsFor2 = GetDecorationsFor(id2, false); - if (decorationsFor1.size() != decorationsFor2.size()) return false; - - for (const ir::Instruction* inst1 : decorationsFor1) { - bool didFindAMatch = false; - for (const ir::Instruction* inst2 : decorationsFor2) { - if (AreDecorationsTheSame(inst1, inst2)) { - didFindAMatch = true; - break; - } - } - if (!didFindAMatch) return false; - } - return true; + using InstructionList = std::vector; + using DecorationSet = std::set; + + const InstructionList decorations_for1 = GetDecorationsFor(id1, false); + const InstructionList decorations_for2 = GetDecorationsFor(id2, false); + + // This function splits the decoration instructions into different sets, + // based on their opcode; only OpDecorate, OpDecorateId, + // OpDecorateStringGOOGLE, and OpMemberDecorate are considered, the other + // opcodes are ignored. + const auto fillDecorationSets = + [](const InstructionList& decoration_list, DecorationSet* decorate_set, + DecorationSet* decorate_id_set, DecorationSet* decorate_string_set, + DecorationSet* member_decorate_set) { + for (const ir::Instruction* inst : decoration_list) { + std::u32string decoration_payload; + // Ignore the opcode and the target as we do not want them to be + // compared. + for (uint32_t i = 1u; i < inst->NumInOperands(); ++i) { + for (uint32_t word : inst->GetInOperand(i).words) { + decoration_payload.push_back(word); + } + } + + switch (inst->opcode()) { + case SpvOpDecorate: + decorate_set->emplace(std::move(decoration_payload)); + break; + case SpvOpMemberDecorate: + member_decorate_set->emplace(std::move(decoration_payload)); + break; + case SpvOpDecorateId: + decorate_id_set->emplace(std::move(decoration_payload)); + break; + case SpvOpDecorateStringGOOGLE: + decorate_string_set->emplace(std::move(decoration_payload)); + break; + default: + break; + } + } + }; + + DecorationSet decorate_set_for1; + DecorationSet decorate_id_set_for1; + DecorationSet decorate_string_set_for1; + DecorationSet member_decorate_set_for1; + fillDecorationSets(decorations_for1, &decorate_set_for1, + &decorate_id_set_for1, &decorate_string_set_for1, + &member_decorate_set_for1); + + DecorationSet decorate_set_for2; + DecorationSet decorate_id_set_for2; + DecorationSet decorate_string_set_for2; + DecorationSet member_decorate_set_for2; + fillDecorationSets(decorations_for2, &decorate_set_for2, + &decorate_id_set_for2, &decorate_string_set_for2, + &member_decorate_set_for2); + + const bool result = decorate_set_for1 == decorate_set_for2 && + decorate_id_set_for1 == decorate_id_set_for2 && + member_decorate_set_for1 == member_decorate_set_for2 && + // Compare string sets last in case the strings are long. + decorate_string_set_for1 == decorate_string_set_for2; + return result; } -// TODO(pierremoreau): Handle SpvOpDecorateId by converting them to a regular -// SpvOpDecorate. -bool DecorationManager::AreDecorationsTheSame( - const ir::Instruction* inst1, const ir::Instruction* inst2) const { - // const auto decorateIdToDecorate = [&constants](const Instruction& inst) { - // std::vector operands; - // operands.reserve(inst.NumInOperands()); - // for (uint32_t i = 2u; i < inst.NumInOperands(); ++i) { - // const auto& j = constants.find(inst.GetSingleWordInOperand(i)); - // if (j == constants.end()) - // return Instruction(); - // const auto operand = j->second->GetOperand(0u); - // operands.emplace_back(operand.type, operand.words); - // } - // return Instruction(SpvOpDecorate, 0u, 0u, operands); - // }; - // Instruction tmpA = (deco1.opcode() == SpvOpDecorateId) ? - // decorateIdToDecorate(deco1) : deco1; - // Instruction tmpB = (deco2.opcode() == SpvOpDecorateId) ? - // decorateIdToDecorate(deco2) : deco2; - // - if (inst1->opcode() == SpvOpDecorateId || inst2->opcode() == SpvOpDecorateId) - return false; +// TODO(pierremoreau): If OpDecorateId is referencing an OpConstant, one could +// check that the constants are the same rather than just +// looking at the constant ID. +bool DecorationManager::AreDecorationsTheSame(const ir::Instruction* inst1, + const ir::Instruction* inst2, + bool ignore_target) const { + switch (inst1->opcode()) { + case SpvOpDecorate: + case SpvOpMemberDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + break; + default: + return false; + } - ir::Instruction tmpA = *inst1, tmpB = *inst2; - if (tmpA.opcode() != tmpB.opcode() || - tmpA.NumInOperands() != tmpB.NumInOperands() || - tmpA.opcode() == SpvOpNop || tmpB.opcode() == SpvOpNop) + if (inst1->opcode() != inst2->opcode() || + inst1->NumInOperands() != inst2->NumInOperands()) return false; - for (uint32_t i = (tmpA.opcode() == SpvOpDecorate) ? 1u : 2u; - i < tmpA.NumInOperands(); ++i) - if (tmpA.GetInOperand(i) != tmpB.GetInOperand(i)) return false; + for (uint32_t i = ignore_target ? 1u : 0u; i < inst1->NumInOperands(); ++i) + if (inst1->GetInOperand(i) != inst2->GetInOperand(i)) return false; return true; } -void DecorationManager::AnalyzeDecorations(ir::Module* module) { - if (!module) return; - - // Collect all group ids. - for (const ir::Instruction& inst : module->annotations()) { - switch (inst.opcode()) { - case SpvOpDecorationGroup: - group_to_decoration_insts_.insert({inst.result_id(), {}}); - break; - default: - break; - } - } +void DecorationManager::AnalyzeDecorations() { + if (!module_) return; // For each group and instruction, collect all their decoration instructions. - for (ir::Instruction& inst : module->annotations()) { - switch (inst.opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpMemberDecorate: { - auto const target_id = inst.GetSingleWordInOperand(0u); - auto const group_iter = group_to_decoration_insts_.find(target_id); - if (group_iter != group_to_decoration_insts_.end()) - group_iter->second.push_back(&inst); - else - id_to_decoration_insts_[target_id].push_back(&inst); - break; + for (ir::Instruction& inst : module_->annotations()) { + AddDecoration(&inst); + } +} +void DecorationManager::AddDecoration(ir::Instruction* inst) { + switch (inst->opcode()) { + case SpvOpDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + case SpvOpMemberDecorate: { + const auto target_id = inst->GetSingleWordInOperand(0u); + id_to_decoration_insts_[target_id].direct_decorations.push_back(inst); + break; + } + case SpvOpGroupDecorate: + case SpvOpGroupMemberDecorate: { + const uint32_t start = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + const uint32_t stride = start; + for (uint32_t i = start; i < inst->NumInOperands(); i += stride) { + const auto target_id = inst->GetSingleWordInOperand(i); + TargetData& target_data = id_to_decoration_insts_[target_id]; + target_data.indirect_decorations.push_back(inst); } - case SpvOpGroupDecorate: - for (uint32_t i = 1u; i < inst.NumInOperands(); ++i) { - auto const target_id = inst.GetSingleWordInOperand(i); - auto const group_iter = group_to_decoration_insts_.find(target_id); - if (group_iter != group_to_decoration_insts_.end()) - group_iter->second.push_back(&inst); - else - id_to_decoration_insts_[target_id].push_back(&inst); - } - break; - case SpvOpGroupMemberDecorate: - for (uint32_t i = 1u; i < inst.NumInOperands(); i += 2u) { - auto const target_id = inst.GetSingleWordInOperand(i); - auto const group_iter = group_to_decoration_insts_.find(target_id); - if (group_iter != group_to_decoration_insts_.end()) - group_iter->second.push_back(&inst); - else - id_to_decoration_insts_[target_id].push_back(&inst); - } - break; - default: - break; + const auto target_id = inst->GetSingleWordInOperand(0u); + id_to_decoration_insts_[target_id].decorate_insts.push_back(inst); + break; } + default: + break; } } @@ -184,80 +286,152 @@ template std::vector DecorationManager::InternalGetDecorationsFor( uint32_t id, bool include_linkage) { std::vector decorations; - std::stack ids_to_process; - - const auto process = [&ids_to_process, &decorations](T inst) { - if (inst->opcode() == SpvOpGroupDecorate || - inst->opcode() == SpvOpGroupMemberDecorate) - ids_to_process.push(inst->GetSingleWordInOperand(0u)); - else - decorations.push_back(inst); - }; const auto ids_iter = id_to_decoration_insts_.find(id); // |id| has no decorations if (ids_iter == id_to_decoration_insts_.end()) return decorations; - // Process |id|'s decorations. Some of them might be groups, in which case - // add them to the stack. - for (ir::Instruction* inst : ids_iter->second) { - const bool is_linkage = - inst->opcode() == SpvOpDecorate && - inst->GetSingleWordInOperand(1u) == SpvDecorationLinkageAttributes; - if (include_linkage || !is_linkage) process(inst); + const TargetData& target_data = ids_iter->second; + + const auto process_direct_decorations = + [include_linkage, + &decorations](const std::vector& direct_decorations) { + for (ir::Instruction* inst : direct_decorations) { + const bool is_linkage = inst->opcode() == SpvOpDecorate && + inst->GetSingleWordInOperand(1u) == + SpvDecorationLinkageAttributes; + if (include_linkage || !is_linkage) decorations.push_back(inst); + } + }; + + // Process |id|'s decorations. + process_direct_decorations(ids_iter->second.direct_decorations); + + // Process the decorations of all groups applied to |id|. + for (const ir::Instruction* inst : target_data.indirect_decorations) { + const uint32_t group_id = inst->GetSingleWordInOperand(0u); + const auto group_iter = id_to_decoration_insts_.find(group_id); + assert(group_iter != id_to_decoration_insts_.end() && "Unknown group ID"); + process_direct_decorations(group_iter->second.direct_decorations); } - // If the stack is not empty, then it contains groups ID: retrieve their - // decorations and process them. If any of those decorations is applying a - // group, push that group ID onto the stack. - while (!ids_to_process.empty()) { - const uint32_t id_to_process = ids_to_process.top(); - ids_to_process.pop(); - - // Retrieve the decorations of that group - const auto group_iter = group_to_decoration_insts_.find(id_to_process); - if (group_iter != group_to_decoration_insts_.end()) { - // Process all the decorations applied by the group. - for (T inst : group_iter->second) process(inst); - } else { - // Something went wrong. - assert(false); - return std::vector(); + return decorations; +} + +bool DecorationManager::WhileEachDecoration( + uint32_t id, uint32_t decoration, + std::function f) { + for (const ir::Instruction* inst : GetDecorationsFor(id, true)) { + switch (inst->opcode()) { + case SpvOpMemberDecorate: + if (inst->GetSingleWordInOperand(2) == decoration) { + if (!f(*inst)) return false; + } + break; + case SpvOpDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + if (inst->GetSingleWordInOperand(1) == decoration) { + if (!f(*inst)) return false; + } + break; + default: + assert(false && "Unexpected decoration instruction"); } } + return true; +} - return decorations; +void DecorationManager::ForEachDecoration( + uint32_t id, uint32_t decoration, + std::function f) { + WhileEachDecoration(id, decoration, [&f](const ir::Instruction& inst) { + f(inst); + return true; + }); } -void DecorationManager::ForEachDecoration(uint32_t id, - uint32_t decoration, - std::function f) const { - auto decoration_list = id_to_decoration_insts_.find(id); - if (decoration_list != id_to_decoration_insts_.end()) { - for (const ir::Instruction* inst : decoration_list->second) { - switch (inst->opcode()) { - case SpvOpDecorate: - if (inst->GetSingleWordInOperand(1) == decoration) { - f(*inst); - } - break; - case SpvOpMemberDecorate: - if (inst->GetSingleWordInOperand(2) == decoration) { - f(*inst); - } - break; - case SpvOpDecorateId: - if (inst->GetSingleWordInOperand(1) == decoration) { - f(*inst); +void DecorationManager::CloneDecorations(uint32_t from, uint32_t to) { + const auto decoration_list = id_to_decoration_insts_.find(from); + if (decoration_list == id_to_decoration_insts_.end()) return; + auto context = module_->context(); + for (ir::Instruction* inst : decoration_list->second.direct_decorations) { + // simply clone decoration and change |target-id| to |to| + std::unique_ptr new_inst(inst->Clone(module_->context())); + new_inst->SetInOperand(0, {to}); + module_->AddAnnotationInst(std::move(new_inst)); + auto decoration_iter = --module_->annotation_end(); + context->AnalyzeUses(&*decoration_iter); + } + // We need to copy the list of instructions as ForgetUses and AnalyzeUses are + // going to modify it. + std::vector indirect_decorations = + decoration_list->second.indirect_decorations; + for (ir::Instruction* inst : indirect_decorations) { + switch (inst->opcode()) { + case SpvOpGroupDecorate: + context->ForgetUses(inst); + // add |to| to list of decorated id's + inst->AddOperand( + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {to})); + context->AnalyzeUses(inst); + break; + case SpvOpGroupMemberDecorate: { + context->ForgetUses(inst); + // for each (id == from), add (to, literal) as operands + const uint32_t num_operands = inst->NumOperands(); + for (uint32_t i = 1; i < num_operands; i += 2) { + ir::Operand op = inst->GetOperand(i); + if (op.words[0] == from) { // add new pair of operands: (to, literal) + inst->AddOperand( + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {to})); + op = inst->GetOperand(i + 1); + inst->AddOperand(std::move(op)); } - break; - default: - assert(false && "Unexpected decoration instruction"); + } + context->AnalyzeUses(inst); + break; } + default: + assert(false && "Unexpected decoration instruction"); } } } +void DecorationManager::RemoveDecoration(ir::Instruction* inst) { + const auto remove_from_container = [inst](std::vector& v) { + v.erase(std::remove(v.begin(), v.end(), inst), v.end()); + }; + + switch (inst->opcode()) { + case SpvOpDecorate: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + case SpvOpMemberDecorate: { + const auto target_id = inst->GetSingleWordInOperand(0u); + auto const iter = id_to_decoration_insts_.find(target_id); + if (iter == id_to_decoration_insts_.end()) return; + remove_from_container(iter->second.direct_decorations); + } break; + case SpvOpGroupDecorate: + case SpvOpGroupMemberDecorate: { + const uint32_t stride = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + for (uint32_t i = 1u; i < inst->NumInOperands(); i += stride) { + const auto target_id = inst->GetSingleWordInOperand(i); + auto const iter = id_to_decoration_insts_.find(target_id); + if (iter == id_to_decoration_insts_.end()) continue; + remove_from_container(iter->second.indirect_decorations); + } + const auto group_id = inst->GetSingleWordInOperand(0u); + auto const iter = id_to_decoration_insts_.find(group_id); + if (iter == id_to_decoration_insts_.end()) return; + remove_from_container(iter->second.decorate_insts); + } break; + default: + break; + } +} + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.h index 308941200a2db56236a181b6bf94be81391cb434..40ba13eca663d75464a87808df80014eebb071e3 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/decoration_manager.h @@ -17,6 +17,7 @@ #include #include +#include #include #include "instruction.h" @@ -30,10 +31,26 @@ namespace analysis { class DecorationManager { public: // Constructs a decoration manager from the given |module| - DecorationManager(ir::Module* module) { AnalyzeDecorations(module); } - // Removes all decorations from |id|, which should not be a group ID, except - // for linkage decorations if |keep_linkage| is set. - void RemoveDecorationsFrom(uint32_t id, bool keep_linkage); + explicit DecorationManager(ir::Module* module) : module_(module) { + AnalyzeDecorations(); + } + DecorationManager() = delete; + + // Removes all decorations from |id| (either directly or indirectly) for + // which |pred| returns true. + // If |id| is a group ID, OpGroupDecorate and OpGroupMemberDecorate will be + // removed if they have no targets left, and OpDecorationGroup will be + // removed if the group is not applied to anyone and contains no decorations. + void RemoveDecorationsFrom(uint32_t id, + std::function pred = + [](const ir::Instruction&) { return true; }); + + // Removes all decorations from the result id of |inst|. + // + // NOTE: This is only meant to be called from ir_context, as only metadata + // will be removed, and no actual instruction. + void RemoveDecoration(ir::Instruction* inst); + // Returns a vector of all decorations affecting |id|. If a group is applied // to |id|, the decorations of that group are returned rather than the group // decoration instruction. If |include_linkage| is not set, linkage @@ -46,34 +63,71 @@ class DecorationManager { // instructions that apply the same decorations but to different IDs, still // count as being the same. bool HaveTheSameDecorations(uint32_t id1, uint32_t id2) const; - // Returns whether two decorations are the same. SpvOpDecorateId is currently - // not handled and will return false no matter what. + // Returns whether the two decorations instructions are the same and are + // applying the same decorations; unless |ignore_target| is false, the targets + // to which they are applied to does not matter, except for the member part. + // + // This is only valid for OpDecorate, OpMemberDecorate and OpDecorateId; it + // will return false for other opcodes. bool AreDecorationsTheSame(const ir::Instruction* inst1, - const ir::Instruction* inst2) const; + const ir::Instruction* inst2, + bool ignore_target) const; // |f| is run on each decoration instruction for |id| with decoration - // |decoration|. + // |decoration|. Processed are all decorations which target |id| either + // directly or indirectly by Decoration Groups. void ForEachDecoration(uint32_t id, uint32_t decoration, - std::function) const; + std::function f); + + // |f| is run on each decoration instruction for |id| with decoration + // |decoration|. Processes all decoration which target |id| either directly or + // indirectly through decoration groups. If |f| returns false, iteration is + // terminated and this function returns false. + bool WhileEachDecoration(uint32_t id, uint32_t decoration, + std::function f); + + // Clone all decorations from one id |from|. + // The cloned decorations are assigned to the given id |to| and are + // added to the module. The purpose is to decorate cloned instructions. + // This function does not check if the id |to| is already decorated. + void CloneDecorations(uint32_t from, uint32_t to); + + // Informs the decoration manager of a new decoration that it needs to track. + void AddDecoration(ir::Instruction* inst); private: - using IdToDecorationInstsMap = - std::unordered_map>; // Analyzes the defs and uses in the given |module| and populates data // structures in this class. Does nothing if |module| is nullptr. - void AnalyzeDecorations(ir::Module* module); + void AnalyzeDecorations(); template std::vector InternalGetDecorationsFor(uint32_t id, bool include_linkage); - // Mapping from ids to the instructions applying a decoration to them. In - // other words, for each id you get all decoration instructions referencing - // that id, be it directly (SpvOpDecorate, SpvOpMemberDecorate and - // SpvOpDecorateId), or indirectly (SpvOpGroupDecorate, + // Tracks decoration information of an ID. + struct TargetData { + std::vector direct_decorations; // All decorate + // instructions applied + // to the tracked ID. + std::vector indirect_decorations; // All instructions + // applying a group to + // the tracked ID. + std::vector decorate_insts; // All decorate instructions + // applying the decorations + // of the tracked ID to + // targets. + // It is empty if the + // tracked ID is not a + // group. + }; + + // Mapping from ids to the instructions applying a decoration to those ids. + // In other words, for each id you get all decoration instructions + // referencing that id, be it directly (SpvOpDecorate, SpvOpMemberDecorate + // and SpvOpDecorateId), or indirectly (SpvOpGroupDecorate, // SpvOpMemberGroupDecorate). - IdToDecorationInstsMap id_to_decoration_insts_; - // Mapping from group ids to all the decoration instructions they apply. - IdToDecorationInstsMap group_to_decoration_insts_; + std::unordered_map id_to_decoration_insts_; + // The enclosing module. + ir::Module* module_; }; } // namespace analysis diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.cpp index da4283a02fd9274372d70cf4f7a363a4d878fe16..6e83b4197dccb720d7a8debb598263c502566119 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.cpp @@ -14,6 +14,8 @@ #include "def_use_manager.h" +#include + #include "log.h" #include "reflect.h" @@ -31,8 +33,7 @@ void DefUseManager::AnalyzeInstDef(ir::Instruction* inst) { ClearInst(iter->second); } id_to_def_[def_id] = inst; - } - else { + } else { ClearInst(inst); } } @@ -41,22 +42,28 @@ void DefUseManager::AnalyzeInstUse(ir::Instruction* inst) { // Create entry for the given instruction. Note that the instruction may // not have any in-operands. In such cases, we still need a entry for those // instructions so this manager knows it has seen the instruction later. - inst_to_used_ids_[inst] = {}; + auto* used_ids = &inst_to_used_ids_[inst]; + if (used_ids->size()) { + EraseUseRecordsOfOperandIds(inst); + used_ids = &inst_to_used_ids_[inst]; + } + used_ids->clear(); // It might have existed before. for (uint32_t i = 0; i < inst->NumOperands(); ++i) { switch (inst->GetOperand(i).type) { // For any id type but result id type - case SPV_OPERAND_TYPE_ID: - case SPV_OPERAND_TYPE_TYPE_ID: - case SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID: - case SPV_OPERAND_TYPE_SCOPE_ID: { - uint32_t use_id = inst->GetSingleWordOperand(i); - // use_id is used by the instruction generating def_id. - id_to_uses_[use_id].push_back({ inst, i }); - inst_to_used_ids_[inst].push_back(use_id); - } break; - default: - break; + case SPV_OPERAND_TYPE_ID: + case SPV_OPERAND_TYPE_TYPE_ID: + case SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID: + case SPV_OPERAND_TYPE_SCOPE_ID: { + uint32_t use_id = inst->GetSingleWordOperand(i); + ir::Instruction* def = GetDef(use_id); + assert(def && "Definition is not registered."); + id_to_users_.insert(UserEntry(def, inst)); + used_ids->push_back(use_id); + } break; + default: + break; } } } @@ -66,6 +73,17 @@ void DefUseManager::AnalyzeInstDefUse(ir::Instruction* inst) { AnalyzeInstUse(inst); } +void DefUseManager::UpdateDefUse(ir::Instruction* inst) { + const uint32_t def_id = inst->result_id(); + if (def_id != 0) { + auto iter = id_to_def_.find(def_id); + if (iter == id_to_def_.end()) { + AnalyzeInstDef(inst); + } + } + AnalyzeInstUse(inst); +} + ir::Instruction* DefUseManager::GetDef(uint32_t id) { auto iter = id_to_def_.find(id); if (iter == id_to_def_.end()) return nullptr; @@ -78,89 +96,141 @@ const ir::Instruction* DefUseManager::GetDef(uint32_t id) const { return iter->second; } -UseList* DefUseManager::GetUses(uint32_t id) { - auto iter = id_to_uses_.find(id); - if (iter == id_to_uses_.end()) return nullptr; - return &iter->second; +DefUseManager::IdToUsersMap::const_iterator DefUseManager::UsersBegin( + const ir::Instruction* def) const { + return id_to_users_.lower_bound( + UserEntry(const_cast(def), nullptr)); } -const UseList* DefUseManager::GetUses(uint32_t id) const { - const auto iter = id_to_uses_.find(id); - if (iter == id_to_uses_.end()) return nullptr; - return &iter->second; +bool DefUseManager::UsersNotEnd(const IdToUsersMap::const_iterator& iter, + const IdToUsersMap::const_iterator& cached_end, + const ir::Instruction* inst) const { + return (iter != cached_end && iter->first == inst); } -std::vector DefUseManager::GetAnnotations(uint32_t id) const { - std::vector annos; - const auto* uses = GetUses(id); - if (!uses) return annos; - for (const auto& c : *uses) { - if (ir::IsAnnotationInst(c.inst->opcode())) { - annos.push_back(c.inst); - } - } - return annos; +bool DefUseManager::UsersNotEnd(const IdToUsersMap::const_iterator& iter, + const ir::Instruction* inst) const { + return UsersNotEnd(iter, id_to_users_.end(), inst); } -bool DefUseManager::KillDef(uint32_t id) { - auto iter = id_to_def_.find(id); - if (iter == id_to_def_.end()) return false; - KillInst(iter->second); +bool DefUseManager::WhileEachUser( + const ir::Instruction* def, + const std::function& f) const { + // Ensure that |def| has been registered. + assert(def && (!def->HasResultId() || def == GetDef(def->result_id())) && + "Definition is not registered."); + if (!def->HasResultId()) return true; + + auto end = id_to_users_.end(); + for (auto iter = UsersBegin(def); UsersNotEnd(iter, end, def); ++iter) { + if (!f(iter->second)) return false; + } return true; } -void DefUseManager::KillInst(ir::Instruction* inst) { - if (!inst) return; - ClearInst(inst); - inst->ToNop(); -} - -bool DefUseManager::ReplaceAllUsesWith(uint32_t before, uint32_t after) { - if (before == after) return false; - if (id_to_uses_.count(before) == 0) return false; - - for (auto it = id_to_uses_[before].cbegin(); it != id_to_uses_[before].cend(); - ++it) { - const uint32_t type_result_id_count = - (it->inst->result_id() != 0) + (it->inst->type_id() != 0); - - if (it->operand_index < type_result_id_count) { - // Update the type_id. Note that result id is immutable so it should - // never be updated. - if (it->inst->type_id() != 0 && it->operand_index == 0) { - it->inst->SetResultType(after); - } else if (it->inst->type_id() == 0) { - SPIRV_ASSERT(consumer_, false, - "Result type id considered as use while the instruction " - "doesn't have a result type id."); - (void)consumer_; // Makes the compiler happy for release build. - } else { - SPIRV_ASSERT(consumer_, false, - "Trying setting the immutable result id."); +bool DefUseManager::WhileEachUser( + uint32_t id, const std::function& f) const { + return WhileEachUser(GetDef(id), f); +} + +void DefUseManager::ForEachUser( + const ir::Instruction* def, + const std::function& f) const { + WhileEachUser(def, [&f](ir::Instruction* user) { + f(user); + return true; + }); +} + +void DefUseManager::ForEachUser( + uint32_t id, const std::function& f) const { + ForEachUser(GetDef(id), f); +} + +bool DefUseManager::WhileEachUse( + const ir::Instruction* def, + const std::function& f) const { + // Ensure that |def| has been registered. + assert(def && (!def->HasResultId() || def == GetDef(def->result_id())) && + "Definition is not registered."); + if (!def->HasResultId()) return true; + + auto end = id_to_users_.end(); + for (auto iter = UsersBegin(def); UsersNotEnd(iter, end, def); ++iter) { + ir::Instruction* user = iter->second; + for (uint32_t idx = 0; idx != user->NumOperands(); ++idx) { + const ir::Operand& op = user->GetOperand(idx); + if (op.type != SPV_OPERAND_TYPE_RESULT_ID && spvIsIdType(op.type)) { + if (def->result_id() == op.words[0]) { + if (!f(user, idx)) return false; + } } - } else { - // Update an in-operand. - uint32_t in_operand_pos = it->operand_index - type_result_id_count; - // Make the modification in the instruction. - it->inst->SetInOperand(in_operand_pos, {after}); } - // Update inst to used ids map - auto iter = inst_to_used_ids_.find(it->inst); - if (iter != inst_to_used_ids_.end()) - for (auto uit = iter->second.begin(); uit != iter->second.end(); uit++) - if (*uit == before) *uit = after; - // Register the use of |after| id into id_to_uses_. - // TODO(antiagainst): de-duplication. - id_to_uses_[after].push_back({it->inst, it->operand_index}); } - id_to_uses_.erase(before); return true; } +bool DefUseManager::WhileEachUse( + uint32_t id, + const std::function& f) const { + return WhileEachUse(GetDef(id), f); +} + +void DefUseManager::ForEachUse( + const ir::Instruction* def, + const std::function& f) const { + WhileEachUse(def, [&f](ir::Instruction* user, uint32_t index) { + f(user, index); + return true; + }); +} + +void DefUseManager::ForEachUse( + uint32_t id, + const std::function& f) const { + ForEachUse(GetDef(id), f); +} + +uint32_t DefUseManager::NumUsers(const ir::Instruction* def) const { + uint32_t count = 0; + ForEachUser(def, [&count](ir::Instruction*) { ++count; }); + return count; +} + +uint32_t DefUseManager::NumUsers(uint32_t id) const { + return NumUsers(GetDef(id)); +} + +uint32_t DefUseManager::NumUses(const ir::Instruction* def) const { + uint32_t count = 0; + ForEachUse(def, [&count](ir::Instruction*, uint32_t) { ++count; }); + return count; +} + +uint32_t DefUseManager::NumUses(uint32_t id) const { + return NumUses(GetDef(id)); +} + +std::vector DefUseManager::GetAnnotations(uint32_t id) const { + std::vector annos; + const ir::Instruction* def = GetDef(id); + if (!def) return annos; + + ForEachUser(def, [&annos](ir::Instruction* user) { + if (ir::IsAnnotationInst(user->opcode())) { + annos.push_back(user); + } + }); + return annos; +} + void DefUseManager::AnalyzeDefUse(ir::Module* module) { if (!module) return; - module->ForEachInst(std::bind(&DefUseManager::AnalyzeInstDefUse, this, - std::placeholders::_1)); + // Analyze all the defs before any uses to catch forward references. + module->ForEachInst( + std::bind(&DefUseManager::AnalyzeInstDef, this, std::placeholders::_1)); + module->ForEachInst( + std::bind(&DefUseManager::AnalyzeInstUse, this, std::placeholders::_1)); } void DefUseManager::ClearInst(ir::Instruction* inst) { @@ -168,7 +238,13 @@ void DefUseManager::ClearInst(ir::Instruction* inst) { if (iter != inst_to_used_ids_.end()) { EraseUseRecordsOfOperandIds(inst); if (inst->result_id() != 0) { - id_to_uses_.erase(inst->result_id()); // Remove all uses of this id. + // Remove all uses of this inst. + auto users_begin = UsersBegin(inst); + auto end = id_to_users_.end(); + auto new_end = users_begin; + for (; UsersNotEnd(new_end, end, inst); ++new_end) { + } + id_to_users_.erase(users_begin, new_end); id_to_def_.erase(inst->result_id()); } } @@ -177,37 +253,41 @@ void DefUseManager::ClearInst(ir::Instruction* inst) { void DefUseManager::EraseUseRecordsOfOperandIds(const ir::Instruction* inst) { // Go through all ids used by this instruction, remove this instruction's // uses of them. - // - // We cache end iterators to avoid the cost of repeatedly constructing - // and destructing their value. This cuts runtime on some examples by - // a factor of about 3 (e.g. on Windows debug builds, with many thousands - // of instructions). auto iter = inst_to_used_ids_.find(inst); if (iter != inst_to_used_ids_.end()) { - // Cache the end iterator on the map. The end iterator on - // an unordered map does not get invalidated when erasing an - // element. - const auto& id_to_uses_end = id_to_uses_.end(); - for (const auto use_id : iter->second) { - auto uses_iter = id_to_uses_.find(use_id); - if (uses_iter == id_to_uses_end) continue; - auto& uses = uses_iter->second; - // Similarly, cache this end iterator. It is not invalidated - // by erasure of an element from the list. - const auto& uses_end = uses.end(); - for (auto it = uses.begin(); it != uses_end;) { - if (it->inst == inst) { - it = uses.erase(it); - } else { - ++it; - } - } - if (uses.empty()) id_to_uses_.erase(use_id); + for (auto use_id : iter->second) { + id_to_users_.erase( + UserEntry(GetDef(use_id), const_cast(inst))); } inst_to_used_ids_.erase(inst); } } +bool operator==(const DefUseManager& lhs, const DefUseManager& rhs) { + if (lhs.id_to_def_ != rhs.id_to_def_) { + return false; + } + + if (lhs.id_to_users_ != rhs.id_to_users_) { + for (auto p : lhs.id_to_users_) { + if (rhs.id_to_users_.count(p) == 0) { + return false; + } + } + for (auto p : rhs.id_to_users_) { + if (lhs.id_to_users_.count(p) == 0) { + return false; + } + } + return false; + } + + if (lhs.inst_to_used_ids_ != lhs.inst_to_used_ids_) { + return false; + } + return true; +} + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.h index e4d8a3e1fd2cc32a4871ca49c2b0b8990e02dfad..2061703982cb6e9e2aeb17961e7d282c2003d81d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/def_use_manager.h @@ -16,6 +16,7 @@ #define LIBSPIRV_OPT_DEF_USE_MANAGER_H_ #include +#include #include #include @@ -37,22 +38,71 @@ struct Use { // the index of result type id. }; -using UseList = std::list; +inline bool operator==(const Use& lhs, const Use& rhs) { + return lhs.inst == rhs.inst && lhs.operand_index == rhs.operand_index; +} + +inline bool operator!=(const Use& lhs, const Use& rhs) { return !(lhs == rhs); } + +inline bool operator<(const Use& lhs, const Use& rhs) { + if (lhs.inst < rhs.inst) return true; + if (lhs.inst > rhs.inst) return false; + return lhs.operand_index < rhs.operand_index; +} + +// Definition and user pair. +// +// The first element of the pair is the definition. +// The second element of the pair is the user. +// +// Definition should never be null. User can be null, however, such an entry +// should be used only for searching (e.g. all users of a particular definition) +// and never stored in a container. +using UserEntry = std::pair; + +// Orders UserEntry for use in associative containers (i.e. less than ordering). +// +// The definition of an UserEntry is treated as the major key and the users as +// the minor key so that all the users of a particular definition are +// consecutive in a container. +// +// A null user always compares less than a real user. This is done to provide +// easy values to search for the beginning of the users of a particular +// definition (i.e. using {def, nullptr}). +struct UserEntryLess { + bool operator()(const UserEntry& lhs, const UserEntry& rhs) const { + // If lhs.first and rhs.first are both null, fall through to checking the + // second entries. + if (!lhs.first && rhs.first) return true; + if (lhs.first && !rhs.first) return false; + + // If neither definition is null, then compare unique ids. + if (lhs.first && rhs.first) { + if (lhs.first->unique_id() < rhs.first->unique_id()) return true; + if (rhs.first->unique_id() < lhs.first->unique_id()) return false; + } + + // Return false on equality. + if (!lhs.second && !rhs.second) return false; + if (!lhs.second) return true; + if (!rhs.second) return false; + + // If neither user is null then compare unique ids. + return lhs.second->unique_id() < rhs.second->unique_id(); + } +}; // A class for analyzing and managing defs and uses in an ir::Module. class DefUseManager { public: using IdToDefMap = std::unordered_map; - using IdToUsesMap = std::unordered_map; + using IdToUsersMap = std::set; // Constructs a def-use manager from the given |module|. All internal messages // will be communicated to the outside via the given message |consumer|. This // instance only keeps a reference to the |consumer|, so the |consumer| should // outlive this instance. - DefUseManager(const MessageConsumer& consumer, ir::Module* module) - : consumer_(consumer) { - AnalyzeDefUse(module); - } + DefUseManager(ir::Module* module) { AnalyzeDefUse(module); } DefUseManager(const DefUseManager&) = delete; DefUseManager(DefUseManager&&) = delete; @@ -63,6 +113,8 @@ class DefUseManager { void AnalyzeInstDef(ir::Instruction* inst); // Analyzes the uses in the given |inst|. + // + // All operands of |inst| must be analyzed as defs. void AnalyzeInstUse(ir::Instruction* inst); // Analyzes the defs and uses in the given |inst|. @@ -72,10 +124,69 @@ class DefUseManager { // defining |id|, returns nullptr. ir::Instruction* GetDef(uint32_t id); const ir::Instruction* GetDef(uint32_t id) const; - // Returns the use instructions for the given |id|. If there is no uses of - // |id|, returns nullptr. - UseList* GetUses(uint32_t id); - const UseList* GetUses(uint32_t id) const; + + // Runs the given function |f| on each unique user instruction of |def| (or + // |id|). + // + // If one instruction uses |def| in multiple operands, that instruction will + // only be visited once. + // + // |def| (or |id|) must be registered as a definition. + void ForEachUser(const ir::Instruction* def, + const std::function& f) const; + void ForEachUser(uint32_t id, + const std::function& f) const; + + // Runs the given function |f| on each unique user instruction of |def| (or + // |id|). If |f| returns false, iteration is terminated and this function + // returns false. + // + // If one instruction uses |def| in multiple operands, that instruction will + // be only be visited once. + // + // |def| (or |id|) must be registered as a definition. + bool WhileEachUser(const ir::Instruction* def, + const std::function& f) const; + bool WhileEachUser(uint32_t id, + const std::function& f) const; + + // Runs the given function |f| on each unique use of |def| (or + // |id|). + // + // If one instruction uses |def| in multiple operands, each operand will be + // visited separately. + // + // |def| (or |id|) must be registered as a definition. + void ForEachUse(const ir::Instruction* def, + const std::function& f) const; + void ForEachUse(uint32_t id, + const std::function& f) const; + + // Runs the given function |f| on each unique use of |def| (or + // |id|). If |f| returns false, iteration is terminated and this function + // returns false. + // + // If one instruction uses |def| in multiple operands, each operand will be + // visited separately. + // + // |def| (or |id|) must be registered as a definition. + bool WhileEachUse(const ir::Instruction* def, + const std::function& f) const; + bool WhileEachUse(uint32_t id, + const std::function& f) const; + + // Returns the number of users of |def| (or |id|). + uint32_t NumUsers(const ir::Instruction* def) const; + uint32_t NumUsers(uint32_t id) const; + + // Returns the number of uses of |def| (or |id|). + uint32_t NumUses(const ir::Instruction* def) const; + uint32_t NumUses(uint32_t id) const; + // Returns the annotation instrunctions which are a direct use of the given // |id|. This means when the decorations are applied through decoration // group(s), this function will just return the OpGroupDecorate @@ -85,31 +196,8 @@ class DefUseManager { // Returns the map from ids to their def instructions. const IdToDefMap& id_to_defs() const { return id_to_def_; } - // Returns the map from ids to their uses in instructions. - const IdToUsesMap& id_to_uses() const { return id_to_uses_; } - - // Turns the instruction defining the given |id| into a Nop. Returns true on - // success, false if the given |id| is not defined at all. This method also - // erases both the uses of |id| and the information of this |id|-generating - // instruction's uses of its operands. - bool KillDef(uint32_t id); - // Turns the given instruction |inst| to a Nop. This method erases the - // information of the given instruction's uses of its operands. If |inst| - // defines an result id, the uses of the result id will also be erased. - void KillInst(ir::Instruction* inst); - // Replaces all uses of |before| id with |after| id. Returns true if any - // replacement happens. This method does not kill the definition of the - // |before| id. If |after| is the same as |before|, does nothing and returns - // false. - bool ReplaceAllUsesWith(uint32_t before, uint32_t after); - - private: - using InstToUsedIdsMap = - std::unordered_map>; - - // Analyzes the defs and uses in the given |module| and populates data - // structures in this class. Does nothing if |module| is nullptr. - void AnalyzeDefUse(ir::Module* module); + // Returns the map from instructions to their users. + const IdToUsersMap& id_to_users() const { return id_to_users_; } // Clear the internal def-use record of the given instruction |inst|. This // method will update the use information of the operand ids of |inst|. The @@ -121,11 +209,42 @@ class DefUseManager { // Erases the records that a given instruction uses its operand ids. void EraseUseRecordsOfOperandIds(const ir::Instruction* inst); - const MessageConsumer& consumer_; // Message consumer. - IdToDefMap id_to_def_; // Mapping from ids to their definitions - IdToUsesMap id_to_uses_; // Mapping from ids to their uses - // Mapping from instructions to the ids used in the instructions generating - // the result ids. + friend bool operator==(const DefUseManager&, const DefUseManager&); + friend bool operator!=(const DefUseManager& lhs, const DefUseManager& rhs) { + return !(lhs == rhs); + } + + // If |inst| has not already been analysed, then analyses its defintion and + // uses. + void UpdateDefUse(ir::Instruction* inst); + + private: + using InstToUsedIdsMap = + std::unordered_map>; + + // Returns the first location that {|def|, nullptr} could be inserted into the + // users map without violating ordering. + IdToUsersMap::const_iterator UsersBegin(const ir::Instruction* def) const; + + // Returns true if |iter| has not reached the end of |def|'s users. + // + // In the first version |iter| is compared against the end of the map for + // validity before other checks. In the second version, |iter| is compared + // against |cached_end| for validity before other checks. This allows caching + // the map's end which is a performance improvement on some platforms. + bool UsersNotEnd(const IdToUsersMap::const_iterator& iter, + const ir::Instruction* def) const; + bool UsersNotEnd(const IdToUsersMap::const_iterator& iter, + const IdToUsersMap::const_iterator& cached_end, + const ir::Instruction* def) const; + + // Analyzes the defs and uses in the given |module| and populates data + // structures in this class. Does nothing if |module| is nullptr. + void AnalyzeDefUse(ir::Module* module); + + IdToDefMap id_to_def_; // Mapping from ids to their definitions + IdToUsersMap id_to_users_; // Mapping from ids to their users + // Mapping from instructions to the ids used in the instruction. InstToUsedIdsMap inst_to_used_ids_; }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ed4f7f72df2f36a3cdc6571bf19048969577533 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.cpp @@ -0,0 +1,69 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "dominator_analysis.h" + +#include + +#include "ir_context.h" + +namespace spvtools { +namespace opt { + +ir::BasicBlock* DominatorAnalysisBase::CommonDominator( + ir::BasicBlock* b1, ir::BasicBlock* b2) const { + if (!b1 || !b2) return nullptr; + + std::unordered_set seen; + ir::BasicBlock* block = b1; + while (block && seen.insert(block).second) { + block = ImmediateDominator(block); + } + + block = b2; + while (block && !seen.count(block)) { + block = ImmediateDominator(block); + } + + return block; +} + +bool DominatorAnalysisBase::Dominates(ir::Instruction* a, + ir::Instruction* b) const { + if (!a || !b) { + return false; + } + + if (a == b) { + return true; + } + + ir::BasicBlock* bb_a = a->context()->get_instr_block(a); + ir::BasicBlock* bb_b = b->context()->get_instr_block(b); + + if (bb_a != bb_b) { + return tree_.Dominates(bb_a, bb_b); + } + + ir::Instruction* current_inst = a; + while ((current_inst = current_inst->NextNode())) { + if (current_inst == b) { + return true; + } + } + return false; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.h new file mode 100644 index 0000000000000000000000000000000000000000..c40a344d3ba597b92312fb4d282a9469e7fb7a01 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_analysis.h @@ -0,0 +1,138 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_DOMINATOR_ANALYSIS_PASS_H_ +#define LIBSPIRV_OPT_DOMINATOR_ANALYSIS_PASS_H_ + +#include +#include + +#include "dominator_tree.h" +#include "module.h" + +namespace spvtools { +namespace opt { + +// Interface to perform dominator or postdominator analysis on a given function. +class DominatorAnalysisBase { + public: + explicit DominatorAnalysisBase(bool is_post_dom) : tree_(is_post_dom) {} + + // Calculates the dominator (or postdominator) tree for given function |f|. + inline void InitializeTree(const ir::Function* f) { tree_.InitializeTree(f); } + + // Returns true if BasicBlock |a| dominates BasicBlock |b|. + inline bool Dominates(const ir::BasicBlock* a, + const ir::BasicBlock* b) const { + if (!a || !b) return false; + return Dominates(a->id(), b->id()); + } + + // Returns true if BasicBlock |a| dominates BasicBlock |b|. Same as above only + // using the BasicBlock IDs. + inline bool Dominates(uint32_t a, uint32_t b) const { + return tree_.Dominates(a, b); + } + + // Returns true if instruction |a| dominates instruction |b|. + bool Dominates(ir::Instruction* a, ir::Instruction* b) const; + + // Returns true if BasicBlock |a| strictly dominates BasicBlock |b|. + inline bool StrictlyDominates(const ir::BasicBlock* a, + const ir::BasicBlock* b) const { + if (!a || !b) return false; + return StrictlyDominates(a->id(), b->id()); + } + + // Returns true if BasicBlock |a| strictly dominates BasicBlock |b|. Same as + // above only using the BasicBlock IDs. + inline bool StrictlyDominates(uint32_t a, uint32_t b) const { + return tree_.StrictlyDominates(a, b); + } + + // Returns the immediate dominator of |node| or returns nullptr if it is has + // no dominator. + inline ir::BasicBlock* ImmediateDominator(const ir::BasicBlock* node) const { + if (!node) return nullptr; + return tree_.ImmediateDominator(node); + } + + // Returns the immediate dominator of |node_id| or returns nullptr if it is + // has no dominator. Same as above but operates on IDs. + inline ir::BasicBlock* ImmediateDominator(uint32_t node_id) const { + return tree_.ImmediateDominator(node_id); + } + + // Returns true if |node| is reachable from the entry. + inline bool IsReachable(const ir::BasicBlock* node) const { + if (!node) return false; + return tree_.ReachableFromRoots(node->id()); + } + + // Returns true if |node_id| is reachable from the entry. + inline bool IsReachable(uint32_t node_id) const { + return tree_.ReachableFromRoots(node_id); + } + + // Dump the tree structure into the given |out| stream in the dot format. + inline void DumpAsDot(std::ostream& out) const { tree_.DumpTreeAsDot(out); } + + // Returns true if this is a postdomiator tree. + inline bool IsPostDominator() const { return tree_.IsPostDominator(); } + + // Returns the tree itself for manual operations, such as traversing the + // roots. + // For normal dominance relationships the methods above should be used. + inline DominatorTree& GetDomTree() { return tree_; } + inline const DominatorTree& GetDomTree() const { return tree_; } + + // Force the dominator tree to be removed + inline void ClearTree() { tree_.ClearTree(); } + + // Applies the std::function |func| to dominator tree nodes in dominator + // order. + void Visit(std::function func) { + tree_.Visit(func); + } + + // Applies the std::function |func| to dominator tree nodes in dominator + // order. + void Visit(std::function func) const { + tree_.Visit(func); + } + + // Returns the most immediate basic block that dominates both |b1| and |b2|. + // If there is no such basic block, nullptr is returned. + ir::BasicBlock* CommonDominator(ir::BasicBlock* b1, ir::BasicBlock* b2) const; + + protected: + DominatorTree tree_; +}; + +// Derived class for normal dominator analysis. +class DominatorAnalysis : public DominatorAnalysisBase { + public: + DominatorAnalysis() : DominatorAnalysisBase(false) {} +}; + +// Derived class for postdominator analysis. +class PostDominatorAnalysis : public DominatorAnalysisBase { + public: + PostDominatorAnalysis() : DominatorAnalysisBase(true) {} +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_DOMINATOR_ANALYSIS_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01bf82006c824e3d081ac37b1a620c3f8759c652 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.cpp @@ -0,0 +1,401 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +#include "cfa.h" +#include "dominator_tree.h" +#include "ir_context.h" + +using namespace spvtools; +using namespace spvtools::opt; + +// Calculates the dominator or postdominator tree for a given function. +// 1 - Compute the successors and predecessors for each BasicBlock. We add a +// dummy node for the start node or for postdominators the exit. This node will +// point to all entry or all exit nodes. +// 2 - Using the CFA::DepthFirstTraversal get a depth first postordered list of +// all BasicBlocks. Using the successors (or for postdominator, predecessors) +// calculated in step 1 to traverse the tree. +// 3 - Pass the list calculated in step 2 to the CFA::CalculateDominators using +// the predecessors list (or for postdominator, successors). This will give us a +// vector of BB pairs. Each BB and its immediate dominator. +// 4 - Using the list from 3 use those edges to build a tree of +// DominatorTreeNodes. Each node containing a link to the parent dominator and +// children which are dominated. +// 5 - Using the tree from 4, perform a depth first traversal to calculate the +// preorder and postorder index of each node. We use these indexes to compare +// nodes against each other for domination checks. + +namespace { + +// Wrapper around CFA::DepthFirstTraversal to provide an interface to perform +// depth first search on generic BasicBlock types. Will call post and pre order +// user defined functions during traversal +// +// BBType - BasicBlock type. Will either be ir::BasicBlock or DominatorTreeNode +// SuccessorLambda - Lamdba matching the signature of 'const +// std::vector*(const BBType *A)'. Will return a vector of the nodes +// succeding BasicBlock A. +// PostLambda - Lamdba matching the signature of 'void (const BBType*)' will be +// called on each node traversed AFTER their children. +// PreLambda - Lamdba matching the signature of 'void (const BBType*)' will be +// called on each node traversed BEFORE their children. +template +static void DepthFirstSearch(const BBType* bb, SuccessorLambda successors, + PreLambda pre, PostLambda post) { + // Ignore backedge operation. + auto nop_backedge = [](const BBType*, const BBType*) {}; + CFA::DepthFirstTraversal(bb, successors, pre, post, nop_backedge); +} + +// Wrapper around CFA::DepthFirstTraversal to provide an interface to perform +// depth first search on generic BasicBlock types. This overload is for only +// performing user defined post order. +// +// BBType - BasicBlock type. Will either be ir::BasicBlock or DominatorTreeNode +// SuccessorLambda - Lamdba matching the signature of 'const +// std::vector*(const BBType *A)'. Will return a vector of the nodes +// succeding BasicBlock A. +// PostLambda - Lamdba matching the signature of 'void (const BBType*)' will be +// called on each node traversed after their children. +template +static void DepthFirstSearchPostOrder(const BBType* bb, + SuccessorLambda successors, + PostLambda post) { + // Ignore preorder operation. + auto nop_preorder = [](const BBType*) {}; + DepthFirstSearch(bb, successors, nop_preorder, post); +} + +// Small type trait to get the function class type. +template +struct GetFunctionClass { + using FunctionType = ir::Function; +}; + +// Helper class to compute predecessors and successors for each Basic Block in a +// function. Through GetPredFunctor and GetSuccessorFunctor it provides an +// interface to get the successor and predecessor lists for each basic +// block. This is required by the DepthFirstTraversal and ComputeDominator +// functions which take as parameter an std::function returning the successors +// and predecessors respectively. +// +// When computing the post-dominator tree, all edges are inverted. So successors +// returned by this class will be predecessors in the original CFG. +template +class BasicBlockSuccessorHelper { + // This should eventually become const ir::BasicBlock. + using BasicBlock = BBType; + using Function = typename GetFunctionClass::FunctionType; + + using BasicBlockListTy = std::vector; + using BasicBlockMapTy = std::map; + + public: + // For compliance with the dominance tree computation, entry nodes are + // connected to a single dummy node. + BasicBlockSuccessorHelper(Function& func, const BasicBlock* dummy_start_node, + bool post); + + // CFA::CalculateDominators requires std::vector. + using GetBlocksFunction = + std::function*(const BasicBlock*)>; + + // Returns the list of predecessor functions. + GetBlocksFunction GetPredFunctor() { + return [this](const BasicBlock* bb) { + BasicBlockListTy* v = &this->predecessors_[bb]; + return v; + }; + } + + // Returns a vector of the list of successor nodes from a given node. + GetBlocksFunction GetSuccessorFunctor() { + return [this](const BasicBlock* bb) { + BasicBlockListTy* v = &this->successors_[bb]; + return v; + }; + } + + private: + bool invert_graph_; + BasicBlockMapTy successors_; + BasicBlockMapTy predecessors_; + + // Build the successors and predecessors map for each basic blocks |f|. + // If |invert_graph_| is true, all edges are reversed (successors becomes + // predecessors and vice versa). + // For convenience, the start of the graph is |dummy_start_node|. + // The dominator tree construction requires a unique entry node, which cannot + // be guaranteed for the postdominator graph. The |dummy_start_node| BB is + // here to gather all entry nodes. + void CreateSuccessorMap(Function& f, const BasicBlock* dummy_start_node); +}; + +template +BasicBlockSuccessorHelper::BasicBlockSuccessorHelper( + Function& func, const BasicBlock* dummy_start_node, bool invert) + : invert_graph_(invert) { + CreateSuccessorMap(func, dummy_start_node); +} + +template +void BasicBlockSuccessorHelper::CreateSuccessorMap( + Function& f, const BasicBlock* dummy_start_node) { + std::map id_to_BB_map; + auto GetSuccessorBasicBlock = [&f, &id_to_BB_map](uint32_t successor_id) { + BasicBlock*& Succ = id_to_BB_map[successor_id]; + if (!Succ) { + for (BasicBlock& BBIt : f) { + if (successor_id == BBIt.id()) { + Succ = &BBIt; + break; + } + } + } + return Succ; + }; + + if (invert_graph_) { + // For the post dominator tree, we see the inverted graph. + // successors_ in the inverted graph are the predecessors in the CFG. + // The tree construction requires 1 entry point, so we add a dummy node + // that is connected to all function exiting basic blocks. + // An exiting basic block is a block with an OpKill, OpUnreachable, + // OpReturn or OpReturnValue as terminator instruction. + for (BasicBlock& bb : f) { + if (bb.hasSuccessor()) { + BasicBlockListTy& pred_list = predecessors_[&bb]; + const auto& const_bb = bb; + const_bb.ForEachSuccessorLabel( + [this, &pred_list, &bb, + &GetSuccessorBasicBlock](const uint32_t successor_id) { + BasicBlock* succ = GetSuccessorBasicBlock(successor_id); + // Inverted graph: our successors in the CFG + // are our predecessors in the inverted graph. + this->successors_[succ].push_back(&bb); + pred_list.push_back(succ); + }); + } else { + successors_[dummy_start_node].push_back(&bb); + predecessors_[&bb].push_back(const_cast(dummy_start_node)); + } + } + } else { + successors_[dummy_start_node].push_back(f.entry().get()); + predecessors_[f.entry().get()].push_back( + const_cast(dummy_start_node)); + for (BasicBlock& bb : f) { + BasicBlockListTy& succ_list = successors_[&bb]; + + const auto& const_bb = bb; + const_bb.ForEachSuccessorLabel([&](const uint32_t successor_id) { + BasicBlock* succ = GetSuccessorBasicBlock(successor_id); + succ_list.push_back(succ); + predecessors_[succ].push_back(&bb); + }); + } + } +} + +} // namespace + +namespace spvtools { +namespace opt { + +bool DominatorTree::StrictlyDominates(uint32_t a, uint32_t b) const { + if (a == b) return false; + return Dominates(a, b); +} + +bool DominatorTree::StrictlyDominates(const ir::BasicBlock* a, + const ir::BasicBlock* b) const { + return DominatorTree::StrictlyDominates(a->id(), b->id()); +} + +bool DominatorTree::StrictlyDominates(const DominatorTreeNode* a, + const DominatorTreeNode* b) const { + if (a == b) return false; + return Dominates(a, b); +} + +bool DominatorTree::Dominates(uint32_t a, uint32_t b) const { + // Check that both of the inputs are actual nodes. + const DominatorTreeNode* a_node = GetTreeNode(a); + const DominatorTreeNode* b_node = GetTreeNode(b); + if (!a_node || !b_node) return false; + + return Dominates(a_node, b_node); +} + +bool DominatorTree::Dominates(const DominatorTreeNode* a, + const DominatorTreeNode* b) const { + // Node A dominates node B if they are the same. + if (a == b) return true; + + return a->dfs_num_pre_ < b->dfs_num_pre_ && + a->dfs_num_post_ > b->dfs_num_post_; +} + +bool DominatorTree::Dominates(const ir::BasicBlock* A, + const ir::BasicBlock* B) const { + return Dominates(A->id(), B->id()); +} + +ir::BasicBlock* DominatorTree::ImmediateDominator( + const ir::BasicBlock* A) const { + return ImmediateDominator(A->id()); +} + +ir::BasicBlock* DominatorTree::ImmediateDominator(uint32_t a) const { + // Check that A is a valid node in the tree. + auto a_itr = nodes_.find(a); + if (a_itr == nodes_.end()) return nullptr; + + const DominatorTreeNode* node = &a_itr->second; + + if (node->parent_ == nullptr) { + return nullptr; + } + + return node->parent_->bb_; +} + +DominatorTreeNode* DominatorTree::GetOrInsertNode(ir::BasicBlock* bb) { + DominatorTreeNode* dtn = nullptr; + + std::map::iterator node_iter = + nodes_.find(bb->id()); + if (node_iter == nodes_.end()) { + dtn = &nodes_.emplace(std::make_pair(bb->id(), DominatorTreeNode{bb})) + .first->second; + } else + dtn = &node_iter->second; + + return dtn; +} + +void DominatorTree::GetDominatorEdges( + const ir::Function* f, const ir::BasicBlock* dummy_start_node, + std::vector>* edges) { + // Each time the depth first traversal calls the postorder callback + // std::function we push that node into the postorder vector to create our + // postorder list. + std::vector postorder; + auto postorder_function = [&](const ir::BasicBlock* b) { + postorder.push_back(b); + }; + + // CFA::CalculateDominators requires std::vector + // BB are derived from F, so we need to const cast it at some point + // no modification is made on F. + BasicBlockSuccessorHelper helper{ + *const_cast(f), dummy_start_node, postdominator_}; + + // The successor function tells DepthFirstTraversal how to move to successive + // nodes by providing an interface to get a list of successor nodes from any + // given node. + auto successor_functor = helper.GetSuccessorFunctor(); + + // The predecessor functor does the same as the successor functor + // but for all nodes preceding a given node. + auto predecessor_functor = helper.GetPredFunctor(); + + // If we're building a post dominator tree we traverse the tree in reverse + // using the predecessor function in place of the successor function and vice + // versa. + DepthFirstSearchPostOrder(dummy_start_node, successor_functor, + postorder_function); + *edges = + CFA::CalculateDominators(postorder, predecessor_functor); +} + +void DominatorTree::InitializeTree(const ir::Function* f) { + ClearTree(); + + // Skip over empty functions. + if (f->cbegin() == f->cend()) { + return; + } + const ir::CFG& cfg = *f->context()->cfg(); + + const ir::BasicBlock* dummy_start_node = + postdominator_ ? cfg.pseudo_exit_block() : cfg.pseudo_entry_block(); + + // Get the immediate dominator for each node. + std::vector> edges; + GetDominatorEdges(f, dummy_start_node, &edges); + + // Transform the vector into the tree structure which we can use to + // efficiently query dominance. + for (auto edge : edges) { + DominatorTreeNode* first = GetOrInsertNode(edge.first); + + if (edge.first == edge.second) { + if (std::find(roots_.begin(), roots_.end(), first) == roots_.end()) + roots_.push_back(first); + continue; + } + + DominatorTreeNode* second = GetOrInsertNode(edge.second); + + first->parent_ = second; + second->children_.push_back(first); + } + ResetDFNumbering(); +} + +void DominatorTree::ResetDFNumbering() { + int index = 0; + auto preFunc = [&index](const DominatorTreeNode* node) { + const_cast(node)->dfs_num_pre_ = ++index; + }; + + auto postFunc = [&index](const DominatorTreeNode* node) { + const_cast(node)->dfs_num_post_ = ++index; + }; + + auto getSucc = [](const DominatorTreeNode* node) { return &node->children_; }; + + for (auto root : roots_) DepthFirstSearch(root, getSucc, preFunc, postFunc); +} + +void DominatorTree::DumpTreeAsDot(std::ostream& out_stream) const { + out_stream << "digraph {\n"; + Visit([&out_stream](const DominatorTreeNode* node) { + // Print the node. + if (node->bb_) { + out_stream << node->bb_->id() << "[label=\"" << node->bb_->id() + << "\"];\n"; + } + + // Print the arrow from the parent to this node. Entry nodes will not have + // parents so draw them as children from the dummy node. + if (node->parent_) { + out_stream << node->parent_->bb_->id() << " -> " << node->bb_->id() + << ";\n"; + } + + // Return true to continue the traversal. + return true; + }); + out_stream << "}\n"; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.h new file mode 100644 index 0000000000000000000000000000000000000000..ee2026b1b06ded0a4002645c93afcff15ccb28ed --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/dominator_tree.h @@ -0,0 +1,306 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_DOMINATOR_ANALYSIS_TREE_H_ +#define LIBSPIRV_OPT_DOMINATOR_ANALYSIS_TREE_H_ + +#include +#include +#include +#include +#include + +#include "cfg.h" +#include "module.h" +#include "tree_iterator.h" + +namespace spvtools { +namespace opt { +// This helper struct forms the nodes in the tree, with each node containing its +// children. It also contains two values, for the pre and post indexes in the +// tree which are used to compare two nodes. +struct DominatorTreeNode { + explicit DominatorTreeNode(ir::BasicBlock* bb) + : bb_(bb), + parent_(nullptr), + children_({}), + dfs_num_pre_(-1), + dfs_num_post_(-1) {} + + using iterator = std::vector::iterator; + using const_iterator = std::vector::const_iterator; + + // depth first preorder iterator. + using df_iterator = TreeDFIterator; + using const_df_iterator = TreeDFIterator; + // depth first postorder iterator. + using post_iterator = PostOrderTreeDFIterator; + using const_post_iterator = PostOrderTreeDFIterator; + + iterator begin() { return children_.begin(); } + iterator end() { return children_.end(); } + const_iterator begin() const { return cbegin(); } + const_iterator end() const { return cend(); } + const_iterator cbegin() const { return children_.begin(); } + const_iterator cend() const { return children_.end(); } + + // Depth first preorder iterator using this node as root. + df_iterator df_begin() { return df_iterator(this); } + df_iterator df_end() { return df_iterator(); } + const_df_iterator df_begin() const { return df_cbegin(); } + const_df_iterator df_end() const { return df_cend(); } + const_df_iterator df_cbegin() const { return const_df_iterator(this); } + const_df_iterator df_cend() const { return const_df_iterator(); } + + // Depth first postorder iterator using this node as root. + post_iterator post_begin() { return post_iterator::begin(this); } + post_iterator post_end() { return post_iterator::end(nullptr); } + const_post_iterator post_begin() const { return post_cbegin(); } + const_post_iterator post_end() const { return post_cend(); } + const_post_iterator post_cbegin() const { + return const_post_iterator::begin(this); + } + const_post_iterator post_cend() const { + return const_post_iterator::end(nullptr); + } + + inline uint32_t id() const { return bb_->id(); } + + ir::BasicBlock* bb_; + DominatorTreeNode* parent_; + std::vector children_; + + // These indexes are used to compare two given nodes. A node is a child or + // grandchild of another node if its preorder index is greater than the + // first nodes preorder index AND if its postorder index is less than the + // first nodes postorder index. + int dfs_num_pre_; + int dfs_num_post_; +}; + +// A class representing a tree of BasicBlocks in a given function, where each +// node is dominated by its parent. +class DominatorTree { + public: + // Map OpLabel ids to dominator tree nodes + using DominatorTreeNodeMap = std::map; + using iterator = TreeDFIterator; + using const_iterator = TreeDFIterator; + using post_iterator = PostOrderTreeDFIterator; + using const_post_iterator = PostOrderTreeDFIterator; + + // List of DominatorTreeNode to define the list of roots + using DominatorTreeNodeList = std::vector; + using roots_iterator = DominatorTreeNodeList::iterator; + using roots_const_iterator = DominatorTreeNodeList::const_iterator; + + DominatorTree() : postdominator_(false) {} + explicit DominatorTree(bool post) : postdominator_(post) {} + + // Depth first iterators. + // Traverse the dominator tree in a depth first pre-order. + // The pseudo-block is ignored. + iterator begin() { return ++iterator(GetRoot()); } + iterator end() { return iterator(); } + const_iterator begin() const { return cbegin(); } + const_iterator end() const { return cend(); } + const_iterator cbegin() const { return ++const_iterator(GetRoot()); } + const_iterator cend() const { return const_iterator(); } + + // Traverse the dominator tree in a depth first post-order. + // The pseudo-block is ignored. + post_iterator post_begin() { return post_iterator::begin(GetRoot()); } + post_iterator post_end() { return post_iterator::end(GetRoot()); } + const_post_iterator post_begin() const { return post_cbegin(); } + const_post_iterator post_end() const { return post_cend(); } + const_post_iterator post_cbegin() const { + return const_post_iterator::begin(GetRoot()); + } + const_post_iterator post_cend() const { + return const_post_iterator::end(GetRoot()); + } + + roots_iterator roots_begin() { return roots_.begin(); } + roots_iterator roots_end() { return roots_.end(); } + roots_const_iterator roots_begin() const { return roots_cbegin(); } + roots_const_iterator roots_end() const { return roots_cend(); } + roots_const_iterator roots_cbegin() const { return roots_.begin(); } + roots_const_iterator roots_cend() const { return roots_.end(); } + + // Get the unique root of the tree. + // It is guaranteed to work on a dominator tree. + // post-dominator might have a list. + DominatorTreeNode* GetRoot() { + assert(roots_.size() == 1); + return *roots_.begin(); + } + + const DominatorTreeNode* GetRoot() const { + assert(roots_.size() == 1); + return *roots_.begin(); + } + + const DominatorTreeNodeList& Roots() const { return roots_; } + + // Dumps the tree in the graphvis dot format into the |out_stream|. + void DumpTreeAsDot(std::ostream& out_stream) const; + + // Build the (post-)dominator tree for the function |f| + // Any existing data will be overwritten + void InitializeTree(const ir::Function* f); + + // Check if the basic block |a| dominates the basic block |b|. + bool Dominates(const ir::BasicBlock* a, const ir::BasicBlock* b) const; + + // Check if the basic block id |a| dominates the basic block id |b|. + bool Dominates(uint32_t a, uint32_t b) const; + + // Check if the dominator tree node |a| dominates the dominator tree node |b|. + bool Dominates(const DominatorTreeNode* a, const DominatorTreeNode* b) const; + + // Check if the basic block |a| strictly dominates the basic block |b|. + bool StrictlyDominates(const ir::BasicBlock* a, + const ir::BasicBlock* b) const; + + // Check if the basic block id |a| strictly dominates the basic block id |b|. + bool StrictlyDominates(uint32_t a, uint32_t b) const; + + // Check if the dominator tree node |a| strictly dominates the dominator tree + // node |b|. + bool StrictlyDominates(const DominatorTreeNode* a, + const DominatorTreeNode* b) const; + + // Returns the immediate dominator of basic block |a|. + ir::BasicBlock* ImmediateDominator(const ir::BasicBlock* A) const; + + // Returns the immediate dominator of basic block id |a|. + ir::BasicBlock* ImmediateDominator(uint32_t a) const; + + // Returns true if the basic block |a| is reachable by this tree. A node would + // be unreachable if it cannot be reached by traversal from the start node or + // for a postdominator tree, cannot be reached from the exit nodes. + inline bool ReachableFromRoots(const ir::BasicBlock* a) const { + if (!a) return false; + return ReachableFromRoots(a->id()); + } + + // Returns true if the basic block id |a| is reachable by this tree. + bool ReachableFromRoots(uint32_t a) const { + return GetTreeNode(a) != nullptr; + } + + // Returns true if this tree is a post dominator tree. + bool IsPostDominator() const { return postdominator_; } + + // Clean up the tree. + void ClearTree() { + nodes_.clear(); + roots_.clear(); + } + + // Applies the std::function |func| to all nodes in the dominator tree. + // Tree nodes are visited in a depth first pre-order. + bool Visit(std::function func) { + for (auto n : *this) { + if (!func(&n)) return false; + } + return true; + } + + // Applies the std::function |func| to all nodes in the dominator tree. + // Tree nodes are visited in a depth first pre-order. + bool Visit(std::function func) const { + for (auto n : *this) { + if (!func(&n)) return false; + } + return true; + } + + // Applies the std::function |func| to all nodes in the dominator tree from + // |node| downwards. The boolean return from |func| is used to determine + // whether or not the children should also be traversed. Tree nodes are + // visited in a depth first pre-order. + void VisitChildrenIf(std::function func, + iterator node) { + if (func(&*node)) { + for (auto n : *node) { + VisitChildrenIf(func, n->df_begin()); + } + } + } + + // Returns the DominatorTreeNode associated with the basic block |bb|. + // If the |bb| is unknown to the dominator tree, it returns null. + inline DominatorTreeNode* GetTreeNode(ir::BasicBlock* bb) { + return GetTreeNode(bb->id()); + } + // Returns the DominatorTreeNode associated with the basic block |bb|. + // If the |bb| is unknown to the dominator tree, it returns null. + inline const DominatorTreeNode* GetTreeNode(ir::BasicBlock* bb) const { + return GetTreeNode(bb->id()); + } + + // Returns the DominatorTreeNode associated with the basic block id |id|. + // If the id |id| is unknown to the dominator tree, it returns null. + inline DominatorTreeNode* GetTreeNode(uint32_t id) { + DominatorTreeNodeMap::iterator node_iter = nodes_.find(id); + if (node_iter == nodes_.end()) { + return nullptr; + } + return &node_iter->second; + } + // Returns the DominatorTreeNode associated with the basic block id |id|. + // If the id |id| is unknown to the dominator tree, it returns null. + inline const DominatorTreeNode* GetTreeNode(uint32_t id) const { + DominatorTreeNodeMap::const_iterator node_iter = nodes_.find(id); + if (node_iter == nodes_.end()) { + return nullptr; + } + return &node_iter->second; + } + + // Adds the basic block |bb| to the tree structure if it doesn't already + // exist. + DominatorTreeNode* GetOrInsertNode(ir::BasicBlock* bb); + + // Recomputes the DF numbering of the tree. + void ResetDFNumbering(); + + private: + // Wrapper function which gets the list of pairs of each BasicBlocks to its + // immediately dominating BasicBlock and stores the result in the the edges + // parameter. + // + // The |edges| vector will contain the dominator tree as pairs of nodes. + // The first node in the pair is a node in the graph. The second node in the + // pair is its immediate dominator. + // The root of the tree has themself as immediate dominator. + void GetDominatorEdges( + const ir::Function* f, const ir::BasicBlock* dummy_start_node, + std::vector>* edges); + + // The roots of the tree. + std::vector roots_; + + // Pairs each basic block id to the tree node containing that basic block. + DominatorTreeNodeMap nodes_; + + // True if this is a post dominator tree. + bool postdominator_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_DOMINATOR_ANALYSIS_TREE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp index a36c29a834c37ad318c361a34b7baa1e1b976d7b..5e299c6d29807cb98cf770168e9d9253f761702a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp @@ -19,32 +19,32 @@ #include #include "def_use_manager.h" +#include "ir_context.h" #include "log.h" #include "reflect.h" namespace spvtools { namespace opt { -Pass::Status EliminateDeadConstantPass::Process(ir::Module* module) { - analysis::DefUseManager def_use(consumer(), module); +Pass::Status EliminateDeadConstantPass::Process(ir::IRContext* irContext) { std::unordered_set working_list; // Traverse all the instructions to get the initial set of dead constants as // working list and count number of real uses for constants. Uses in // annotation instructions do not count. std::unordered_map use_counts; - std::vector constants = module->GetConstants(); + std::vector constants = irContext->GetConstants(); for (auto* c : constants) { uint32_t const_id = c->result_id(); size_t count = 0; - if (analysis::UseList* uses = def_use.GetUses(const_id)) { - count = - std::count_if(uses->begin(), uses->end(), [](const analysis::Use& u) { - return !(ir::IsAnnotationInst(u.inst->opcode()) || - ir::IsDebug1Inst(u.inst->opcode()) || - ir::IsDebug2Inst(u.inst->opcode()) || - ir::IsDebug3Inst(u.inst->opcode())); - }); - } + irContext->get_def_use_mgr()->ForEachUse( + const_id, [&count](ir::Instruction* user, uint32_t index) { + (void)index; + SpvOp op = user->opcode(); + if (!(ir::IsAnnotationInst(op) || ir::IsDebug1Inst(op) || + ir::IsDebug2Inst(op) || ir::IsDebug3Inst(op))) { + ++count; + } + }); use_counts[c] = count; if (!count) { working_list.insert(c); @@ -68,7 +68,8 @@ Pass::Status EliminateDeadConstantPass::Process(ir::Module* module) { continue; } uint32_t operand_id = inst->GetSingleWordInOperand(i); - ir::Instruction* def_inst = def_use.GetDef(operand_id); + ir::Instruction* def_inst = + irContext->get_def_use_mgr()->GetDef(operand_id); // If the use_count does not have any count for the def_inst, // def_inst must not be a constant, and should be ignored here. if (!use_counts.count(def_inst)) { @@ -90,28 +91,9 @@ Pass::Status EliminateDeadConstantPass::Process(ir::Module* module) { working_list.erase(inst); } - // Find all annotation and debug instructions that are referencing dead - // constants. - std::unordered_set dead_others; - for (auto* dc : dead_consts) { - if (analysis::UseList* uses = def_use.GetUses(dc->result_id())) { - for (const auto& u : *uses) { - if (ir::IsAnnotationInst(u.inst->opcode()) || - ir::IsDebug1Inst(u.inst->opcode()) || - ir::IsDebug2Inst(u.inst->opcode()) || - ir::IsDebug3Inst(u.inst->opcode())) { - dead_others.insert(u.inst); - } - } - } - } - // Turn all dead instructions and uses of them to nop for (auto* dc : dead_consts) { - def_use.KillDef(dc->result_id()); - } - for (auto* da : dead_others) { - da->ToNop(); + irContext->KillDef(dc->result_id()); } return dead_consts.empty() ? Status::SuccessWithoutChange : Status::SuccessWithChange; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.h index 6107cadfa3618b3d07671fa21ca3e27cb74d3be1..3ff69f5c7fdbf19a898b00fd068a8390d6fbc250 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_ #define LIBSPIRV_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class EliminateDeadConstantPass : public Pass { public: const char* name() const override { return "eliminate-dead-const"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.cpp index 037dbd06f2834a56011dd20736f98e2b0045bd6d..8f9748a6723fed19d7b3aa4c29146e77e509f745 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.cpp @@ -13,15 +13,15 @@ // limitations under the License. #include "eliminate_dead_functions_pass.h" +#include "ir_context.h" #include namespace spvtools { namespace opt { -Pass::Status EliminateDeadFunctionsPass::Process(ir::Module* module) { - bool modified = false; - module_ = module; +Pass::Status EliminateDeadFunctionsPass::Process(ir::IRContext* c) { + InitializeProcessing(c); // Identify live functions first. Those that are not live // are dead. @@ -30,11 +30,11 @@ Pass::Status EliminateDeadFunctionsPass::Process(ir::Module* module) { live_function_set.insert(fp); return false; }; - ProcessReachableCallTree(mark_live, module); + ProcessReachableCallTree(mark_live, context()); - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); - FindNamedOrDecoratedIds(); - for (auto funcIter = module->begin(); funcIter != module->end();) { + bool modified = false; + for (auto funcIter = get_module()->begin(); + funcIter != get_module()->end();) { if (live_function_set.count(&*funcIter) == 0) { modified = true; EliminateFunction(&*funcIter); @@ -51,11 +51,7 @@ Pass::Status EliminateDeadFunctionsPass::Process(ir::Module* module) { void EliminateDeadFunctionsPass::EliminateFunction(ir::Function* func) { // Remove all of the instruction in the function body func->ForEachInst( - [this](ir::Instruction* inst) { - KillNamesAndDecorates(inst); - def_use_mgr_->KillInst(inst); - }, - true); + [this](ir::Instruction* inst) { context()->KillInst(inst); }, true); } } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.h index a7d074264eccedc34e936e557a485bb99b4c8650..adb41bb392bf53b98b33b3abb3bc851d72227dad 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.h @@ -27,7 +27,11 @@ namespace opt { class EliminateDeadFunctionsPass : public MemPass { public: const char* name() const override { return "eliminate-dead-functions"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } private: void EliminateFunction(ir::Function* func); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9b91bdbee935eeffa36e9fd679944ec4bc33e1e --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.cpp @@ -0,0 +1,65 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "feature_manager.h" +#include +#include + +#include "enum_string_mapping.h" + +namespace spvtools { +namespace opt { + +void FeatureManager::Analyze(ir::Module* module) { + AddExtensions(module); + AddCapabilities(module); + AddExtInstImportIds(module); +} + +void FeatureManager::AddExtensions(ir::Module* module) { + for (auto ext : module->extensions()) { + const std::string name = + reinterpret_cast(ext.GetInOperand(0u).words.data()); + libspirv::Extension extension; + if (libspirv::GetExtensionFromString(name.c_str(), &extension)) { + extensions_.Add(extension); + } + } +} + +void FeatureManager::AddCapability(SpvCapability cap) { + if (capabilities_.Contains(cap)) return; + + capabilities_.Add(cap); + + spv_operand_desc desc = {}; + if (SPV_SUCCESS == + grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { + libspirv::CapabilitySet(desc->numCapabilities, desc->capabilities) + .ForEach([this](SpvCapability c) { AddCapability(c); }); + } +} + +void FeatureManager::AddCapabilities(ir::Module* module) { + for (ir::Instruction& inst : module->capabilities()) { + AddCapability(static_cast(inst.GetSingleWordInOperand(0))); + } +} + +void FeatureManager::AddExtInstImportIds(ir::Module* module) { + extinst_importid_GLSLstd450_ = module->GetExtInstImportId("GLSL.std.450"); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.h new file mode 100644 index 0000000000000000000000000000000000000000..b99a776fcc941922acd1552fb38371a0f1972804 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/feature_manager.h @@ -0,0 +1,83 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_FEATURE_MANAGER_H_ +#define LIBSPIRV_OPT_FEATURE_MANAGER_H_ + +#include "assembly_grammar.h" +#include "extensions.h" +#include "module.h" + +namespace spvtools { +namespace opt { + +// Tracks features enabled by a module. The IRContext has a FeatureManager. +class FeatureManager { + public: + explicit FeatureManager(const libspirv::AssemblyGrammar& grammar) + : grammar_(grammar) {} + + // Returns true if |ext| is an enabled extension in the module. + bool HasExtension(libspirv::Extension ext) const { + return extensions_.Contains(ext); + } + + // Returns true if |cap| is an enabled capability in the module. + bool HasCapability(SpvCapability cap) const { + return capabilities_.Contains(cap); + } + + // Analyzes |module| and records enabled extensions and capabilities. + void Analyze(ir::Module* module); + + libspirv::CapabilitySet* GetCapabilities() { return &capabilities_; } + const libspirv::CapabilitySet* GetCapabilities() const { + return &capabilities_; + } + + uint32_t GetExtInstImportId_GLSLstd450() const { + return extinst_importid_GLSLstd450_; + } + + private: + // Analyzes |module| and records enabled extensions. + void AddExtensions(ir::Module* module); + + // Adds the given |capability| and all implied capabilities into the current + // FeatureManager. + void AddCapability(SpvCapability capability); + + // Analyzes |module| and records enabled capabilities. + void AddCapabilities(ir::Module* module); + + // Analyzes |module| and records imported external instruction sets. + void AddExtInstImportIds(ir::Module* module); + + // Auxiliary object for querying SPIR-V grammar facts. + const libspirv::AssemblyGrammar& grammar_; + + // The enabled extensions. + libspirv::ExtensionSet extensions_; + + // The enabled capabilities. + libspirv::CapabilitySet capabilities_; + + // Common external instruction import ids, cached for performance. + uint32_t extinst_importid_GLSLstd450_ = 0; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_FEATURE_MANAGER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.cpp index 20437e3fcb95e49e5f2f9b868491b0e4f7fd896d..eac829733a9a6b21a85a645f327c93d6b101526c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.cpp @@ -13,11 +13,12 @@ // limitations under the License. #include "flatten_decoration_pass.h" +#include "ir_context.h" #include -#include #include #include +#include namespace spvtools { namespace opt { @@ -28,7 +29,9 @@ using ir::Operand; using Words = std::vector; using OrderedUsesMap = std::unordered_map; -Pass::Status FlattenDecorationPass::Process(ir::Module* module) { +Pass::Status FlattenDecorationPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; // The target Id of OpDecorationGroup instructions. @@ -42,7 +45,7 @@ Pass::Status FlattenDecorationPass::Process(ir::Module* module) { // their indices, in of appearance. OrderedUsesMap member_uses; - auto annotations = module->annotations(); + auto annotations = context()->annotations(); // On the first pass, record each OpDecorationGroup with its ordered uses. // Rely on unordered_map::operator[] to create its entries on first access. @@ -72,7 +75,7 @@ Pass::Status FlattenDecorationPass::Process(ir::Module* module) { // equivalent normal and struct member uses. auto inst_iter = annotations.begin(); // We have to re-evaluate the end pointer - while (inst_iter != module->annotations().end()) { + while (inst_iter != context()->annotations().end()) { // Should we replace this instruction? bool replace = false; switch (inst_iter->opcode()) { @@ -88,7 +91,7 @@ Pass::Status FlattenDecorationPass::Process(ir::Module* module) { const auto normal_uses_iter = normal_uses.find(group); if (normal_uses_iter != normal_uses.end()) { for (auto target : normal_uses[group]) { - std::unique_ptr new_inst(new Instruction(*inst_iter)); + std::unique_ptr new_inst(inst_iter->Clone(context())); new_inst->SetInOperand(0, Words{target}); inst_iter = inst_iter.InsertBefore(std::move(new_inst)); ++inst_iter; @@ -113,8 +116,8 @@ Pass::Status FlattenDecorationPass::Process(ir::Module* module) { decoration_operands_iter++; // Skip the group target. operands.insert(operands.end(), decoration_operands_iter, inst_iter->end()); - std::unique_ptr new_inst( - new Instruction(SpvOp::SpvOpMemberDecorate, 0, 0, operands)); + std::unique_ptr new_inst(new Instruction( + context(), SpvOp::SpvOpMemberDecorate, 0, 0, operands)); inst_iter = inst_iter.InsertBefore(std::move(new_inst)); ++inst_iter; replace = true; @@ -143,8 +146,8 @@ Pass::Status FlattenDecorationPass::Process(ir::Module* module) { // An OpDecorationGroup instruction might not have been used by an // OpGroupDecorate or OpGroupMemberDecorate instruction. if (!group_ids.empty()) { - for (auto debug_inst_iter = module->debug2_begin(); - debug_inst_iter != module->debug2_end();) { + for (auto debug_inst_iter = context()->debug2_begin(); + debug_inst_iter != context()->debug2_end();) { if (debug_inst_iter->opcode() == SpvOp::SpvOpName) { const uint32_t target = debug_inst_iter->GetSingleWordOperand(0); if (group_ids.count(target)) { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.h index bcdfdc07eba8236dbf231ae984f0502042879343..7db6f864063cd58fae26ebd586b87a982efe1257 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/flatten_decoration_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_FLATTEN_DECORATION_PASS_H_ #define LIBSPIRV_OPT_FLATTEN_DECORATION_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class FlattenDecorationPass : public Pass { public: const char* name() const override { return "flatten-decoration"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.cpp index 005cb76ed1a2dd5e079d1d82d8bac45b4a93642f..678c4566e5190ae6b0e65362a5a4cc8d0f80a988 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.cpp @@ -13,16 +13,34 @@ // limitations under the License. #include "fold.h" -#include "def_use_manager.h" #include +#include #include +#include "const_folding_rules.h" +#include "def_use_manager.h" +#include "folding_rules.h" +#include "ir_builder.h" +#include "ir_context.h" + namespace spvtools { namespace opt { namespace { +#ifndef INT32_MIN +#define INT32_MIN (-2147483648) +#endif + +#ifndef INT32_MAX +#define INT32_MAX 2147483647 +#endif + +#ifndef UINT32_MAX +#define UINT32_MAX 0xffffffff /* 4294967295U */ +#endif + // Returns the single-word result from performing the given unary operation on // the operand value which is passed in as a 32-bit word. uint32_t UnaryOperate(SpvOp opcode, uint32_t operand) { @@ -165,17 +183,49 @@ uint32_t OperateWords(SpvOp opcode, } } +bool FoldInstructionInternal(ir::Instruction* inst) { + ir::IRContext* context = inst->context(); + auto identity_map = [](uint32_t id) { return id; }; + ir::Instruction* folded_inst = FoldInstructionToConstant(inst, identity_map); + if (folded_inst != nullptr) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {folded_inst->result_id()}}}); + return true; + } + + SpvOp opcode = inst->opcode(); + analysis::ConstantManager* const_manager = context->get_constant_mgr(); + + std::vector constants = + const_manager->GetOperandConstants(inst); + + static FoldingRules* rules = new FoldingRules(); + for (FoldingRule rule : rules->GetRulesForOpcode(opcode)) { + if (rule(inst, constants)) { + return true; + } + } + return false; +} + } // namespace +const ConstantFoldingRules& GetConstantFoldingRules() { + static ConstantFoldingRules* rules = new ConstantFoldingRules(); + return *rules; +} + // Returns the result of performing an operation on scalar constant operands. // This function extracts the operand values as 32 bit words and returns the // result in 32 bit word. Scalar constants with longer than 32-bit width are // not accepted in this function. uint32_t FoldScalars(SpvOp opcode, - const std::vector& operands) { + const std::vector& operands) { + assert(IsFoldableOpcode(opcode) && + "Unhandled instruction opcode in FoldScalars"); std::vector operand_values_in_raw_words; - for (analysis::Constant* operand : operands) { - if (analysis::ScalarConstant* scalar = operand->AsScalarConstant()) { + for (const auto& operand : operands) { + if (const analysis::ScalarConstant* scalar = operand->AsScalarConstant()) { const auto& scalar_words = scalar->words(); assert(scalar_words.size() == 1 && "Scalar constants with longer than 32-bit width are not allowed " @@ -192,19 +242,276 @@ uint32_t FoldScalars(SpvOp opcode, return OperateWords(opcode, operand_values_in_raw_words); } -// Returns the result of performing an operation over constant vectors. This -// function iterates through the given vector type constant operands and -// calculates the result for each element of the result vector to return. -// Vectors with longer than 32-bit scalar components are not accepted in this -// function. +// Returns true if |inst| is a binary operation that takes two integers as +// parameters and folds to a constant that can be represented as an unsigned +// 32-bit value when the ids have been replaced by |id_map|. If |inst| can be +// folded, the resulting value is returned in |*result|. Valid result types for +// the instruction are any integer (signed or unsigned) with 32-bits or less, or +// a boolean value. +bool FoldBinaryIntegerOpToConstant(ir::Instruction* inst, + std::function id_map, + uint32_t* result) { + SpvOp opcode = inst->opcode(); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_manger = context->get_constant_mgr(); + + uint32_t ids[2]; + const analysis::IntConstant* constants[2]; + for (uint32_t i = 0; i < 2; i++) { + const ir::Operand* operand = &inst->GetInOperand(i); + if (operand->type != SPV_OPERAND_TYPE_ID) { + return false; + } + ids[i] = id_map(operand->words[0]); + const analysis::Constant* constant = + const_manger->FindDeclaredConstant(ids[i]); + constants[i] = (constant != nullptr ? constant->AsIntConstant() : nullptr); + } + + switch (opcode) { + // Arthimetics + case SpvOp::SpvOpIMul: + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr && constants[i]->IsZero()) { + *result = 0; + return true; + } + } + break; + case SpvOp::SpvOpUDiv: + case SpvOp::SpvOpSDiv: + case SpvOp::SpvOpSRem: + case SpvOp::SpvOpSMod: + case SpvOp::SpvOpUMod: + // This changes undefined behaviour (ie divide by 0) into a 0. + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr && constants[i]->IsZero()) { + *result = 0; + return true; + } + } + break; + + // Shifting + case SpvOp::SpvOpShiftRightLogical: + case SpvOp::SpvOpShiftLeftLogical: + if (constants[1] != nullptr) { + // When shifting by a value larger than the size of the result, the + // result is undefined. We are setting the undefined behaviour to a + // result of 0. + uint32_t shift_amount = constants[1]->GetU32BitValue(); + if (shift_amount >= 32) { + *result = 0; + return true; + } + } + break; + + // Bitwise operations + case SpvOp::SpvOpBitwiseOr: + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr) { + // TODO: Change the mask against a value based on the bit width of the + // instruction result type. This way we can handle say 16-bit values + // as well. + uint32_t mask = constants[i]->GetU32BitValue(); + if (mask == 0xFFFFFFFF) { + *result = 0xFFFFFFFF; + return true; + } + } + } + break; + case SpvOp::SpvOpBitwiseAnd: + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr) { + if (constants[i]->IsZero()) { + *result = 0; + return true; + } + } + } + break; + + // Comparison + case SpvOp::SpvOpULessThan: + if (constants[0] != nullptr && + constants[0]->GetU32BitValue() == UINT32_MAX) { + *result = false; + return true; + } + if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { + *result = false; + return true; + } + break; + case SpvOp::SpvOpSLessThan: + if (constants[0] != nullptr && + constants[0]->GetS32BitValue() == INT32_MAX) { + *result = false; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetS32BitValue() == INT32_MIN) { + *result = false; + return true; + } + break; + case SpvOp::SpvOpUGreaterThan: + if (constants[0] != nullptr && constants[0]->IsZero()) { + *result = false; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetU32BitValue() == UINT32_MAX) { + *result = false; + return true; + } + break; + case SpvOp::SpvOpSGreaterThan: + if (constants[0] != nullptr && + constants[0]->GetS32BitValue() == INT32_MIN) { + *result = false; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetS32BitValue() == INT32_MAX) { + *result = false; + return true; + } + break; + case SpvOp::SpvOpULessThanEqual: + if (constants[0] != nullptr && constants[0]->IsZero()) { + *result = true; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetU32BitValue() == UINT32_MAX) { + *result = true; + return true; + } + break; + case SpvOp::SpvOpSLessThanEqual: + if (constants[0] != nullptr && + constants[0]->GetS32BitValue() == INT32_MIN) { + *result = true; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetS32BitValue() == INT32_MAX) { + *result = true; + return true; + } + break; + case SpvOp::SpvOpUGreaterThanEqual: + if (constants[0] != nullptr && + constants[0]->GetU32BitValue() == UINT32_MAX) { + *result = true; + return true; + } + if (constants[1] != nullptr && constants[1]->GetU32BitValue() == 0) { + *result = true; + return true; + } + break; + case SpvOp::SpvOpSGreaterThanEqual: + if (constants[0] != nullptr && + constants[0]->GetS32BitValue() == INT32_MAX) { + *result = true; + return true; + } + if (constants[1] != nullptr && + constants[1]->GetS32BitValue() == INT32_MIN) { + *result = true; + return true; + } + break; + default: + break; + } + return false; +} + +// Returns true if |inst| is a binary operation on two boolean values, and folds +// to a constant boolean value when the ids have been replaced using |id_map|. +// If |inst| can be folded, the result value is returned in |*result|. +bool FoldBinaryBooleanOpToConstant(ir::Instruction* inst, + std::function id_map, + uint32_t* result) { + SpvOp opcode = inst->opcode(); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_manger = context->get_constant_mgr(); + + uint32_t ids[2]; + const analysis::BoolConstant* constants[2]; + for (uint32_t i = 0; i < 2; i++) { + const ir::Operand* operand = &inst->GetInOperand(i); + if (operand->type != SPV_OPERAND_TYPE_ID) { + return false; + } + ids[i] = id_map(operand->words[0]); + const analysis::Constant* constant = + const_manger->FindDeclaredConstant(ids[i]); + constants[i] = (constant != nullptr ? constant->AsBoolConstant() : nullptr); + } + + switch (opcode) { + // Logical + case SpvOp::SpvOpLogicalOr: + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr) { + if (constants[i]->value()) { + *result = true; + return true; + } + } + } + break; + case SpvOp::SpvOpLogicalAnd: + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] != nullptr) { + if (!constants[i]->value()) { + *result = false; + return true; + } + } + } + break; + + default: + break; + } + return false; +} + +// Returns true if |inst| can be folded to an constant when the ids have been +// substituted using id_map. If it can, the value is returned in |result|. If +// not, |result| is unchanged. It is assumed that not all operands are +// constant. Those cases are handled by |FoldScalar|. +bool FoldIntegerOpToConstant(ir::Instruction* inst, + std::function id_map, + uint32_t* result) { + assert(IsFoldableOpcode(inst->opcode()) && + "Unhandled instruction opcode in FoldScalars"); + switch (inst->NumInOperands()) { + case 2: + return FoldBinaryIntegerOpToConstant(inst, id_map, result) || + FoldBinaryBooleanOpToConstant(inst, id_map, result); + default: + return false; + } +} + std::vector FoldVectors( SpvOp opcode, uint32_t num_dims, - const std::vector& operands) { + const std::vector& operands) { + assert(IsFoldableOpcode(opcode) && + "Unhandled instruction opcode in FoldVectors"); std::vector result; for (uint32_t d = 0; d < num_dims; d++) { std::vector operand_values_for_one_dimension; - for (analysis::Constant* operand : operands) { - if (analysis::VectorConstant* vector_operand = + for (const auto& operand : operands) { + if (const analysis::VectorConstant* vector_operand = operand->AsVectorConstant()) { // Extract the raw value of the scalar component constants // in 32-bit words here. The reason of not using FoldScalars() here @@ -240,5 +547,137 @@ std::vector FoldVectors( return result; } +bool IsFoldableOpcode(SpvOp opcode) { + // NOTE: Extend to more opcodes as new cases are handled in the folder + // functions. + switch (opcode) { + case SpvOp::SpvOpBitwiseAnd: + case SpvOp::SpvOpBitwiseOr: + case SpvOp::SpvOpBitwiseXor: + case SpvOp::SpvOpIAdd: + case SpvOp::SpvOpIEqual: + case SpvOp::SpvOpIMul: + case SpvOp::SpvOpINotEqual: + case SpvOp::SpvOpISub: + case SpvOp::SpvOpLogicalAnd: + case SpvOp::SpvOpLogicalEqual: + case SpvOp::SpvOpLogicalNot: + case SpvOp::SpvOpLogicalNotEqual: + case SpvOp::SpvOpLogicalOr: + case SpvOp::SpvOpNot: + case SpvOp::SpvOpSDiv: + case SpvOp::SpvOpSelect: + case SpvOp::SpvOpSGreaterThan: + case SpvOp::SpvOpSGreaterThanEqual: + case SpvOp::SpvOpShiftLeftLogical: + case SpvOp::SpvOpShiftRightArithmetic: + case SpvOp::SpvOpShiftRightLogical: + case SpvOp::SpvOpSLessThan: + case SpvOp::SpvOpSLessThanEqual: + case SpvOp::SpvOpSMod: + case SpvOp::SpvOpSNegate: + case SpvOp::SpvOpSRem: + case SpvOp::SpvOpUDiv: + case SpvOp::SpvOpUGreaterThan: + case SpvOp::SpvOpUGreaterThanEqual: + case SpvOp::SpvOpULessThan: + case SpvOp::SpvOpULessThanEqual: + case SpvOp::SpvOpUMod: + return true; + default: + return false; + } +} + +bool IsFoldableConstant(const analysis::Constant* cst) { + // Currently supported constants are 32-bit values or null constants. + if (const analysis::ScalarConstant* scalar = cst->AsScalarConstant()) + return scalar->words().size() == 1; + else + return cst->AsNullConstant() != nullptr; +} + +ir::Instruction* FoldInstructionToConstant( + ir::Instruction* inst, std::function id_map) { + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + + if (!inst->IsFoldableByFoldScalar() && + !GetConstantFoldingRules().HasFoldingRule(inst->opcode())) { + return nullptr; + } + // Collect the values of the constant parameters. + std::vector constants; + bool missing_constants = false; + inst->ForEachInId([&constants, &missing_constants, const_mgr, + &id_map](uint32_t* op_id) { + uint32_t id = id_map(*op_id); + const analysis::Constant* const_op = const_mgr->FindDeclaredConstant(id); + if (!const_op) { + constants.push_back(nullptr); + missing_constants = true; + } else { + constants.push_back(const_op); + } + }); + + if (GetConstantFoldingRules().HasFoldingRule(inst->opcode())) { + const analysis::Constant* folded_const = nullptr; + for (auto rule : + GetConstantFoldingRules().GetRulesForOpcode(inst->opcode())) { + folded_const = rule(inst, constants); + if (folded_const != nullptr) { + ir::Instruction* const_inst = + const_mgr->GetDefiningInstruction(folded_const); + // May be a new instruction that needs to be analysed. + context->UpdateDefUse(const_inst); + return const_inst; + } + } + } + + uint32_t result_val = 0; + bool successful = false; + // If all parameters are constant, fold the instruction to a constant. + if (!missing_constants && inst->IsFoldableByFoldScalar()) { + result_val = FoldScalars(inst->opcode(), constants); + successful = true; + } + + if (!successful && inst->IsFoldableByFoldScalar()) { + successful = FoldIntegerOpToConstant(inst, id_map, &result_val); + } + + if (successful) { + const analysis::Constant* result_const = + const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); + return const_mgr->GetDefiningInstruction(result_const); + } + return nullptr; +} + +bool IsFoldableType(ir::Instruction* type_inst) { + // Support 32-bit integers. + if (type_inst->opcode() == SpvOpTypeInt) { + return type_inst->GetSingleWordInOperand(0) == 32; + } + // Support booleans. + if (type_inst->opcode() == SpvOpTypeBool) { + return true; + } + // Nothing else yet. + return false; +} + +bool FoldInstruction(ir::Instruction* inst) { + bool modified = false; + ir::Instruction* folded_inst(inst); + while (folded_inst->opcode() != SpvOpCopyObject && + FoldInstructionInternal(&*folded_inst)) { + modified = true; + } + return modified; +} + } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.h index c6e61d68af013f520559b31dea7f6dce42b97ff7..9c6028dfbf19a2f17ec6030da1469a4d0833d75c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold.h @@ -15,21 +15,82 @@ #ifndef LIBSPIRV_UTIL_FOLD_H_ #define LIBSPIRV_UTIL_FOLD_H_ -#include "def_use_manager.h" -#include "constants.h" - #include #include +#include "const_folding_rules.h" +#include "constants.h" +#include "def_use_manager.h" + namespace spvtools { namespace opt { +// Returns a reference to the ConstnatFoldingRules instance. +const ConstantFoldingRules& GetConstantFoldingRules(); + +// Returns the result of folding a scalar instruction with the given |opcode| +// and |operands|. Each entry in |operands| is a pointer to an +// analysis::Constant instance, which should've been created with the constant +// manager (See IRContext::get_constant_mgr). +// +// It is an error to call this function with an opcode that does not pass the +// IsFoldableOpcode test. If any error occurs during folding, the folder will +// faill with a call to assert. uint32_t FoldScalars(SpvOp opcode, - const std::vector& operands); + const std::vector& operands); +// Returns the result of performing an operation with the given |opcode| over +// constant vectors with |num_dims| dimensions. Each entry in |operands| is a +// pointer to an analysis::Constant instance, which should've been created with +// the constant manager (See IRContext::get_constant_mgr). +// +// This function iterates through the given vector type constant operands and +// calculates the result for each element of the result vector to return. +// Vectors with longer than 32-bit scalar components are not accepted in this +// function. +// +// It is an error to call this function with an opcode that does not pass the +// IsFoldableOpcode test. If any error occurs during folding, the folder will +// faill with a call to assert. std::vector FoldVectors( SpvOp opcode, uint32_t num_dims, - const std::vector& operands); + const std::vector& operands); + +// Returns true if |opcode| represents an operation handled by FoldScalars or +// FoldVectors. +bool IsFoldableOpcode(SpvOp opcode); + +// Returns true if |cst| is supported by FoldScalars and FoldVectors. +bool IsFoldableConstant(const analysis::Constant* cst); + +// Returns true if |FoldInstructionToConstant| could fold an instruction whose +// result type is |type_inst|. +bool IsFoldableType(ir::Instruction* type_inst); + +// Tries to fold |inst| to a single constant, when the input ids to |inst| have +// been substituted using |id_map|. Returns a pointer to the OpConstant* +// instruction if successful. If necessary, a new constant instruction is +// created and placed in the global values section. +// +// |id_map| is a function that takes one result id and returns another. It can +// be used for things like CCP where it is known that some ids contain a +// constant, but the instruction itself has not been updated yet. This can map +// those ids to the appropriate constants. +ir::Instruction* FoldInstructionToConstant( + ir::Instruction* inst, std::function id_map); + +// Returns true if |inst| can be folded into a simpler instruction. +// If |inst| can be simplified, |inst| is overwritten with the simplified +// instruction reusing the same result id. +// +// If |inst| is simplified, it is possible that the resulting code in invalid +// because the instruction is in a bad location. Callers of this function have +// to handle the following cases: +// +// 1) An OpPhi becomes and OpCopyObject - If there are OpPhi instruction after +// |inst| in a basic block then this is invalid. The caller must fix this +// up. +bool FoldInstruction(ir::Instruction* inst); } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp index 84248146a54777af0e9c8e80086bee620ab25a37..79eaeade27fadabc51e0d6c52914b15747f91d8c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp @@ -19,251 +19,25 @@ #include #include "constants.h" +#include "fold.h" +#include "ir_context.h" #include "make_unique.h" namespace spvtools { namespace opt { -namespace { -// Returns the single-word result from performing the given unary operation on -// the operand value which is passed in as a 32-bit word. -uint32_t UnaryOperate(SpvOp opcode, uint32_t operand) { - switch (opcode) { - // Arthimetics - case SpvOp::SpvOpSNegate: - return -static_cast(operand); - case SpvOp::SpvOpNot: - return ~operand; - case SpvOp::SpvOpLogicalNot: - return !static_cast(operand); - default: - assert(false && - "Unsupported unary operation for OpSpecConstantOp instruction"); - return 0u; - } -} - -// Returns the single-word result from performing the given binary operation on -// the operand values which are passed in as two 32-bit word. -uint32_t BinaryOperate(SpvOp opcode, uint32_t a, uint32_t b) { - switch (opcode) { - // Arthimetics - case SpvOp::SpvOpIAdd: - return a + b; - case SpvOp::SpvOpISub: - return a - b; - case SpvOp::SpvOpIMul: - return a * b; - case SpvOp::SpvOpUDiv: - assert(b != 0); - return a / b; - case SpvOp::SpvOpSDiv: - assert(b != 0u); - return (static_cast(a)) / (static_cast(b)); - case SpvOp::SpvOpSRem: { - // The sign of non-zero result comes from the first operand: a. This is - // guaranteed by C++11 rules for integer division operator. The division - // result is rounded toward zero, so the result of '%' has the sign of - // the first operand. - assert(b != 0u); - return static_cast(a) % static_cast(b); - } - case SpvOp::SpvOpSMod: { - // The sign of non-zero result comes from the second operand: b - assert(b != 0u); - int32_t rem = BinaryOperate(SpvOp::SpvOpSRem, a, b); - int32_t b_prim = static_cast(b); - return (rem + b_prim) % b_prim; - } - case SpvOp::SpvOpUMod: - assert(b != 0u); - return (a % b); - - // Shifting - case SpvOp::SpvOpShiftRightLogical: { - return a >> b; - } - case SpvOp::SpvOpShiftRightArithmetic: - return (static_cast(a)) >> b; - case SpvOp::SpvOpShiftLeftLogical: - return a << b; - - // Bitwise operations - case SpvOp::SpvOpBitwiseOr: - return a | b; - case SpvOp::SpvOpBitwiseAnd: - return a & b; - case SpvOp::SpvOpBitwiseXor: - return a ^ b; - - // Logical - case SpvOp::SpvOpLogicalEqual: - return (static_cast(a)) == (static_cast(b)); - case SpvOp::SpvOpLogicalNotEqual: - return (static_cast(a)) != (static_cast(b)); - case SpvOp::SpvOpLogicalOr: - return (static_cast(a)) || (static_cast(b)); - case SpvOp::SpvOpLogicalAnd: - return (static_cast(a)) && (static_cast(b)); - - // Comparison - case SpvOp::SpvOpIEqual: - return a == b; - case SpvOp::SpvOpINotEqual: - return a != b; - case SpvOp::SpvOpULessThan: - return a < b; - case SpvOp::SpvOpSLessThan: - return (static_cast(a)) < (static_cast(b)); - case SpvOp::SpvOpUGreaterThan: - return a > b; - case SpvOp::SpvOpSGreaterThan: - return (static_cast(a)) > (static_cast(b)); - case SpvOp::SpvOpULessThanEqual: - return a <= b; - case SpvOp::SpvOpSLessThanEqual: - return (static_cast(a)) <= (static_cast(b)); - case SpvOp::SpvOpUGreaterThanEqual: - return a >= b; - case SpvOp::SpvOpSGreaterThanEqual: - return (static_cast(a)) >= (static_cast(b)); - default: - assert(false && - "Unsupported binary operation for OpSpecConstantOp instruction"); - return 0u; - } -} - -// Returns the single-word result from performing the given ternary operation -// on the operand values which are passed in as three 32-bit word. -uint32_t TernaryOperate(SpvOp opcode, uint32_t a, uint32_t b, uint32_t c) { - switch (opcode) { - case SpvOp::SpvOpSelect: - return (static_cast(a)) ? b : c; - default: - assert(false && - "Unsupported ternary operation for OpSpecConstantOp instruction"); - return 0u; - } +Pass::Status FoldSpecConstantOpAndCompositePass::Process( + ir::IRContext* irContext) { + Initialize(irContext); + return ProcessImpl(irContext); } -// Returns the single-word result from performing the given operation on the -// operand words. This only works with 32-bit operations and uses boolean -// convention that 0u is false, and anything else is boolean true. -// TODO(qining): Support operands other than 32-bit wide. -uint32_t OperateWords(SpvOp opcode, - const std::vector& operand_words) { - switch (operand_words.size()) { - case 1: - return UnaryOperate(opcode, operand_words.front()); - case 2: - return BinaryOperate(opcode, operand_words.front(), operand_words.back()); - case 3: - return TernaryOperate(opcode, operand_words[0], operand_words[1], - operand_words[2]); - default: - assert(false && "Invalid number of operands"); - return 0; - } +void FoldSpecConstantOpAndCompositePass::Initialize(ir::IRContext* irContext) { + InitializeProcessing(irContext); } -// Returns the result of performing an operation on scalar constant operands. -// This function extracts the operand values as 32 bit words and returns the -// result in 32 bit word. Scalar constants with longer than 32-bit width are -// not accepted in this function. -uint32_t OperateScalars(SpvOp opcode, - const std::vector& operands) { - std::vector operand_values_in_raw_words; - for (analysis::Constant* operand : operands) { - if (analysis::ScalarConstant* scalar = operand->AsScalarConstant()) { - const auto& scalar_words = scalar->words(); - assert(scalar_words.size() == 1 && - "Scalar constants with longer than 32-bit width are not allowed " - "in OperateScalars()"); - operand_values_in_raw_words.push_back(scalar_words.front()); - } else if (operand->AsNullConstant()) { - operand_values_in_raw_words.push_back(0u); - } else { - assert(false && - "OperateScalars() only accepts ScalarConst or NullConst type of " - "constant"); - } - } - return OperateWords(opcode, operand_values_in_raw_words); -} - -// Returns the result of performing an operation over constant vectors. This -// function iterates through the given vector type constant operands and -// calculates the result for each element of the result vector to return. -// Vectors with longer than 32-bit scalar components are not accepted in this -// function. -std::vector OperateVectors( - SpvOp opcode, uint32_t num_dims, - const std::vector& operands) { - std::vector result; - for (uint32_t d = 0; d < num_dims; d++) { - std::vector operand_values_for_one_dimension; - for (analysis::Constant* operand : operands) { - if (analysis::VectorConstant* vector_operand = - operand->AsVectorConstant()) { - // Extract the raw value of the scalar component constants - // in 32-bit words here. The reason of not using OperateScalars() here - // is that we do not create temporary null constants as components - // when the vector operand is a NullConstant because Constant creation - // may need extra checks for the validity and that is not manageed in - // here. - if (const analysis::ScalarConstant* scalar_component = - vector_operand->GetComponents().at(d)->AsScalarConstant()) { - const auto& scalar_words = scalar_component->words(); - assert( - scalar_words.size() == 1 && - "Vector components with longer than 32-bit width are not allowed " - "in OperateVectors()"); - operand_values_for_one_dimension.push_back(scalar_words.front()); - } else if (operand->AsNullConstant()) { - operand_values_for_one_dimension.push_back(0u); - } else { - assert(false && - "VectorConst should only has ScalarConst or NullConst as " - "components"); - } - } else if (operand->AsNullConstant()) { - operand_values_for_one_dimension.push_back(0u); - } else { - assert(false && - "OperateVectors() only accepts VectorConst or NullConst type of " - "constant"); - } - } - result.push_back(OperateWords(opcode, operand_values_for_one_dimension)); - } - return result; -} -} // anonymous namespace - -FoldSpecConstantOpAndCompositePass::FoldSpecConstantOpAndCompositePass() - : max_id_(0), - module_(nullptr), - def_use_mgr_(nullptr), - type_mgr_(nullptr), - id_to_const_val_() {} - -Pass::Status FoldSpecConstantOpAndCompositePass::Process(ir::Module* module) { - Initialize(module); - return ProcessImpl(module); -} - -void FoldSpecConstantOpAndCompositePass::Initialize(ir::Module* module) { - type_mgr_.reset(new analysis::TypeManager(consumer(), *module)); - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); - for (const auto& id_def : def_use_mgr_->id_to_defs()) { - max_id_ = std::max(max_id_, id_def.first); - } - module_ = module; -}; - Pass::Status FoldSpecConstantOpAndCompositePass::ProcessImpl( - ir::Module* module) { + ir::IRContext* irContext) { bool modified = false; // Traverse through all the constant defining instructions. For Normal // Constants whose values are determined and do not depend on OpUndef @@ -285,10 +59,12 @@ Pass::Status FoldSpecConstantOpAndCompositePass::ProcessImpl( // the dependee Spec Constants, all its dependent constants must have been // processed and all its dependent Spec Constants should have been folded if // possible. - for (ir::Module::inst_iterator inst_iter = module->types_values_begin(); + ir::Module::inst_iterator next_inst = irContext->types_values_begin(); + for (ir::Module::inst_iterator inst_iter = next_inst; // Need to re-evaluate the end iterator since we may modify the list of // instructions in this section of the module as the process goes. - inst_iter != module->types_values_end(); ++inst_iter) { + inst_iter != irContext->types_values_end(); inst_iter = next_inst) { + ++next_inst; ir::Instruction* inst = &*inst_iter; // Collect constant values of normal constants and process the // OpSpecConstantOp and OpSpecConstantComposite instructions if possible. @@ -297,7 +73,9 @@ Pass::Status FoldSpecConstantOpAndCompositePass::ProcessImpl( // used in OpSpecConstant{Composite|Op} instructions. // TODO(qining): If the constant or its type has decoration, we may need // to skip it. - if (GetType(inst) && !GetType(inst)->decoration_empty()) continue; + if (context()->get_constant_mgr()->GetType(inst) && + !context()->get_constant_mgr()->GetType(inst)->decoration_empty()) + continue; switch (SpvOp opcode = inst->opcode()) { // Records the values of Normal Constants. case SpvOp::SpvOpConstantTrue: @@ -313,15 +91,15 @@ Pass::Status FoldSpecConstantOpAndCompositePass::ProcessImpl( // Constant will be turned in to a Normal Constant. In that case, a // Constant instance should also be created successfully and recorded // in the id_to_const_val_ and const_val_to_id_ mapps. - if (auto const_value = CreateConstFromInst(inst)) { + if (auto const_value = + context()->get_constant_mgr()->GetConstantFromInst(inst)) { // Need to replace the OpSpecConstantComposite instruction with a // corresponding OpConstantComposite instruction. if (opcode == SpvOp::SpvOpSpecConstantComposite) { inst->SetOpcode(SpvOp::SpvOpConstantComposite); modified = true; } - const_val_to_id_[const_value.get()] = inst->result_id(); - id_to_const_val_[inst->result_id()] = std::move(const_value); + context()->get_constant_mgr()->MapConstantToInst(const_value, inst); } break; } @@ -376,11 +154,20 @@ bool FoldSpecConstantOpAndCompositePass::ProcessOpSpecConstantOp( // original constant. uint32_t new_id = folded_inst->result_id(); uint32_t old_id = inst->result_id(); - def_use_mgr_->ReplaceAllUsesWith(old_id, new_id); - def_use_mgr_->KillDef(old_id); + context()->ReplaceAllUsesWith(old_id, new_id); + context()->KillDef(old_id); return true; } +uint32_t FoldSpecConstantOpAndCompositePass::GetTypeComponent( + uint32_t typeId, uint32_t element) const { + ir::Instruction* type = context()->get_def_use_mgr()->GetDef(typeId); + uint32_t subtype = type->GetTypeComponent(element); + assert(subtype != 0); + + return subtype; +} + ir::Instruction* FoldSpecConstantOpAndCompositePass::DoCompositeExtract( ir::Module::inst_iterator* pos) { ir::Instruction* inst = &**pos; @@ -388,18 +175,24 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoCompositeExtract( "OpSpecConstantOp CompositeExtract requires at least two non-type " "non-opcode operands."); assert(inst->GetInOperand(1).type == SPV_OPERAND_TYPE_ID && - "The vector operand must have a SPV_OPERAND_TYPE_ID type"); + "The composite operand must have a SPV_OPERAND_TYPE_ID type"); assert( inst->GetInOperand(2).type == SPV_OPERAND_TYPE_LITERAL_INTEGER && "The literal operand must have a SPV_OPERAND_TYPE_LITERAL_INTEGER type"); // Note that for OpSpecConstantOp, the second in-operand is the first id // operand. The first in-operand is the spec opcode. - analysis::Constant* first_operand_const = - FindRecordedConst(inst->GetSingleWordInOperand(1)); + uint32_t source = inst->GetSingleWordInOperand(1); + uint32_t type = context()->get_def_use_mgr()->GetDef(source)->type_id(); + const analysis::Constant* first_operand_const = + context()->get_constant_mgr()->FindDeclaredConstant(source); if (!first_operand_const) return nullptr; const analysis::Constant* current_const = first_operand_const; + for (uint32_t i = 2; i < inst->NumInOperands(); i++) { + uint32_t literal = inst->GetSingleWordInOperand(i); + type = GetTypeComponent(type, literal); + } for (uint32_t i = 2; i < inst->NumInOperands(); i++) { uint32_t literal = inst->GetSingleWordInOperand(i); if (const analysis::CompositeConstant* composite_const = @@ -412,30 +205,34 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoCompositeExtract( // Case 2: current constant is a constant created with OpConstantNull. // Because components of a NullConstant are always NullConstants, we can // return early with a NullConstant in the result type. - return BuildInstructionAndAddToModule(CreateConst(GetType(inst), {}), - pos); + return context()->get_constant_mgr()->BuildInstructionAndAddToModule( + context()->get_constant_mgr()->GetConstant( + context()->get_constant_mgr()->GetType(inst), {}), + pos, type); } else { // Dereferencing a non-composite constant. Invalid case. return nullptr; } } - return BuildInstructionAndAddToModule(current_const->Copy(), pos); + return context()->get_constant_mgr()->BuildInstructionAndAddToModule( + current_const, pos); } ir::Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( ir::Module::inst_iterator* pos) { ir::Instruction* inst = &**pos; - analysis::Vector* result_vec_type = GetType(inst)->AsVector(); + analysis::Vector* result_vec_type = + context()->get_constant_mgr()->GetType(inst)->AsVector(); assert(inst->NumInOperands() - 1 > 2 && "OpSpecConstantOp DoVectorShuffle instruction requires more than 2 " "operands (2 vector ids and at least one literal operand"); assert(result_vec_type && "The result of VectorShuffle must be of type vector"); - // A temporary null constants that can be used as the components fo the - // result vector. This is needed when any one of the vector operands are null + // A temporary null constants that can be used as the components of the result + // vector. This is needed when any one of the vector operands are null // constant. - std::unique_ptr null_component_constants; + const analysis::Constant* null_component_constants = nullptr; // Get a concatenated vector of scalar constants. The vector should be built // with the components from the first and the second operand of VectorShuffle. @@ -446,13 +243,13 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( assert(inst->GetInOperand(i).type == SPV_OPERAND_TYPE_ID && "The vector operand must have a SPV_OPERAND_TYPE_ID type"); uint32_t operand_id = inst->GetSingleWordInOperand(i); - analysis::Constant* operand_const = FindRecordedConst(operand_id); + auto operand_const = + context()->get_constant_mgr()->FindDeclaredConstant(operand_id); if (!operand_const) return nullptr; const analysis::Type* operand_type = operand_const->type(); assert(operand_type->AsVector() && "The first two operand of VectorShuffle must be of vector type"); - if (analysis::VectorConstant* vec_const = - operand_const->AsVectorConstant()) { + if (auto vec_const = operand_const->AsVectorConstant()) { // case 1: current operand is a non-null vector constant. concatenated_components.insert(concatenated_components.end(), vec_const->GetComponents().begin(), @@ -463,13 +260,14 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( if (!null_component_constants) { const analysis::Type* component_type = operand_type->AsVector()->element_type(); - null_component_constants = CreateConst(component_type, {}); + null_component_constants = + context()->get_constant_mgr()->GetConstant(component_type, {}); } // Append the null scalar consts to the concatenated components // vector. concatenated_components.insert(concatenated_components.end(), operand_type->AsVector()->element_count(), - null_component_constants.get()); + null_component_constants); } else { // no other valid cases return nullptr; @@ -479,7 +277,8 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( // must be added to the module before the dependee composite constants to // satisfy SSA def-use dominance. if (null_component_constants) { - BuildInstructionAndAddToModule(std::move(null_component_constants), pos); + context()->get_constant_mgr()->BuildInstructionAndAddToModule( + null_component_constants, pos); } // Create the new vector constant with the selected components. std::vector selected_components; @@ -491,9 +290,13 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( "Literal index out of bound of the concatenated vector"); selected_components.push_back(concatenated_components[literal]); } - auto new_vec_const = MakeUnique( - result_vec_type, selected_components); - return BuildInstructionAndAddToModule(std::move(new_vec_const), pos); + auto new_vec_const = + new analysis::VectorConstant(result_vec_type, selected_components); + auto reg_vec_const = + context()->get_constant_mgr()->RegisterConstant(new_vec_const); + if (reg_vec_const != new_vec_const) delete new_vec_const; + return context()->get_constant_mgr()->BuildInstructionAndAddToModule( + reg_vec_const, pos); } namespace { @@ -518,49 +321,55 @@ bool IsValidTypeForComponentWiseOperation(const analysis::Type* type) { } return false; } -} +} // namespace ir::Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( ir::Module::inst_iterator* pos) { const ir::Instruction* inst = &**pos; - const analysis::Type* result_type = GetType(inst); + const analysis::Type* result_type = + context()->get_constant_mgr()->GetType(inst); SpvOp spec_opcode = static_cast(inst->GetSingleWordInOperand(0)); // Check and collect operands. - std::vector operands; - - if (!std::all_of(inst->cbegin(), inst->cend(), - [&operands, this](const ir::Operand& o) { - // skip the operands that is not an id. - if (o.type != spv_operand_type_t::SPV_OPERAND_TYPE_ID) - return true; - uint32_t id = o.words.front(); - if (analysis::Constant* c = FindRecordedConst(id)) { - if (IsValidTypeForComponentWiseOperation(c->type())) { - operands.push_back(c); - return true; - } - } - return false; - })) + std::vector operands; + + if (!std::all_of( + inst->cbegin(), inst->cend(), + [&operands, this](const ir::Operand& o) { + // skip the operands that is not an id. + if (o.type != spv_operand_type_t::SPV_OPERAND_TYPE_ID) return true; + uint32_t id = o.words.front(); + if (auto c = + context()->get_constant_mgr()->FindDeclaredConstant(id)) { + if (IsValidTypeForComponentWiseOperation(c->type())) { + operands.push_back(c); + return true; + } + } + return false; + })) return nullptr; if (result_type->AsInteger() || result_type->AsBool()) { // Scalar operation - uint32_t result_val = OperateScalars(spec_opcode, operands); - auto result_const = CreateConst(result_type, {result_val}); - return BuildInstructionAndAddToModule(std::move(result_const), pos); + uint32_t result_val = FoldScalars(spec_opcode, operands); + auto result_const = + context()->get_constant_mgr()->GetConstant(result_type, {result_val}); + return context()->get_constant_mgr()->BuildInstructionAndAddToModule( + result_const, pos); } else if (result_type->AsVector()) { // Vector operation const analysis::Type* element_type = result_type->AsVector()->element_type(); uint32_t num_dims = result_type->AsVector()->element_count(); std::vector result_vec = - OperateVectors(spec_opcode, num_dims, operands); + FoldVectors(spec_opcode, num_dims, operands); std::vector result_vector_components; for (uint32_t r : result_vec) { - if (auto rc = CreateConst(element_type, {r})) { - result_vector_components.push_back(rc.get()); - if (!BuildInstructionAndAddToModule(std::move(rc), pos)) { + if (auto rc = + context()->get_constant_mgr()->GetConstant(element_type, {r})) { + result_vector_components.push_back(rc); + if (!context()->get_constant_mgr()->BuildInstructionAndAddToModule( + rc, pos)) { assert(false && "Failed to build and insert constant declaring instruction " "for the given vector component constant"); @@ -569,9 +378,13 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( assert(false && "Failed to create constants with 32-bit word"); } } - auto new_vec_const = MakeUnique( - result_type->AsVector(), result_vector_components); - return BuildInstructionAndAddToModule(std::move(new_vec_const), pos); + auto new_vec_const = new analysis::VectorConstant(result_type->AsVector(), + result_vector_components); + auto reg_vec_const = + context()->get_constant_mgr()->RegisterConstant(new_vec_const); + if (reg_vec_const != new_vec_const) delete new_vec_const; + return context()->get_constant_mgr()->BuildInstructionAndAddToModule( + reg_vec_const, pos); } else { // Cannot process invalid component wise operation. The result of component // wise operation must be of integer or bool scalar or vector of @@ -580,198 +393,5 @@ ir::Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( } } -ir::Instruction* -FoldSpecConstantOpAndCompositePass::BuildInstructionAndAddToModule( - std::unique_ptr c, ir::Module::inst_iterator* pos) { - analysis::Constant* new_const = c.get(); - uint32_t new_id = ++max_id_; - module_->SetIdBound(new_id + 1); - const_val_to_id_[new_const] = new_id; - id_to_const_val_[new_id] = std::move(c); - auto new_inst = CreateInstruction(new_id, new_const); - if (!new_inst) return nullptr; - auto* new_inst_ptr = new_inst.get(); - *pos = pos->InsertBefore(std::move(new_inst)); - (*pos)++; - def_use_mgr_->AnalyzeInstDefUse(new_inst_ptr); - return new_inst_ptr; -} - -std::unique_ptr -FoldSpecConstantOpAndCompositePass::CreateConstFromInst(ir::Instruction* inst) { - std::vector literal_words_or_ids; - std::unique_ptr new_const; - // Collect the constant defining literals or component ids. - for (uint32_t i = 0; i < inst->NumInOperands(); i++) { - literal_words_or_ids.insert(literal_words_or_ids.end(), - inst->GetInOperand(i).words.begin(), - inst->GetInOperand(i).words.end()); - } - switch (inst->opcode()) { - // OpConstant{True|Flase} have the value embedded in the opcode. So they - // are not handled by the for-loop above. Here we add the value explicitly. - case SpvOp::SpvOpConstantTrue: - literal_words_or_ids.push_back(true); - break; - case SpvOp::SpvOpConstantFalse: - literal_words_or_ids.push_back(false); - break; - case SpvOp::SpvOpConstantNull: - case SpvOp::SpvOpConstant: - case SpvOp::SpvOpConstantComposite: - case SpvOp::SpvOpSpecConstantComposite: - break; - default: - return nullptr; - } - return CreateConst(GetType(inst), literal_words_or_ids); -} - -analysis::Constant* FoldSpecConstantOpAndCompositePass::FindRecordedConst( - uint32_t id) { - auto iter = id_to_const_val_.find(id); - if (iter == id_to_const_val_.end()) { - return nullptr; - } else { - return iter->second.get(); - } -} - -uint32_t FoldSpecConstantOpAndCompositePass::FindRecordedConst( - const analysis::Constant* c) { - auto iter = const_val_to_id_.find(c); - if (iter == const_val_to_id_.end()) { - return 0; - } else { - return iter->second; - } -} - -std::vector -FoldSpecConstantOpAndCompositePass::GetConstsFromIds( - const std::vector& ids) { - std::vector constants; - for (uint32_t id : ids) { - if (analysis::Constant* c = FindRecordedConst(id)) { - constants.push_back(c); - } else { - return {}; - } - } - return constants; -} - -std::unique_ptr -FoldSpecConstantOpAndCompositePass::CreateConst( - const analysis::Type* type, - const std::vector& literal_words_or_ids) { - std::unique_ptr new_const; - if (literal_words_or_ids.size() == 0) { - // Constant declared with OpConstantNull - return MakeUnique(type); - } else if (auto* bt = type->AsBool()) { - assert(literal_words_or_ids.size() == 1 && - "Bool constant should be declared with one operand"); - return MakeUnique(bt, literal_words_or_ids.front()); - } else if (auto* it = type->AsInteger()) { - return MakeUnique(it, literal_words_or_ids); - } else if (auto* ft = type->AsFloat()) { - return MakeUnique(ft, literal_words_or_ids); - } else if (auto* vt = type->AsVector()) { - auto components = GetConstsFromIds(literal_words_or_ids); - if (components.empty()) return nullptr; - // All components of VectorConstant must be of type Bool, Integer or Float. - if (!std::all_of(components.begin(), components.end(), - [](const analysis::Constant* c) { - if (c->type()->AsBool() || c->type()->AsInteger() || - c->type()->AsFloat()) { - return true; - } else { - return false; - } - })) - return nullptr; - // All components of VectorConstant must be in the same type. - const auto* component_type = components.front()->type(); - if (!std::all_of(components.begin(), components.end(), - [&component_type](const analysis::Constant* c) { - if (c->type() == component_type) return true; - return false; - })) - return nullptr; - return MakeUnique(vt, components); - } else if (auto* st = type->AsStruct()) { - auto components = GetConstsFromIds(literal_words_or_ids); - if (components.empty()) return nullptr; - return MakeUnique(st, components); - } else if (auto* at = type->AsArray()) { - auto components = GetConstsFromIds(literal_words_or_ids); - if (components.empty()) return nullptr; - return MakeUnique(at, components); - } else { - return nullptr; - } -} - -std::vector BuildOperandsFromIds( - const std::vector& ids) { - std::vector operands; - for (uint32_t id : ids) { - operands.emplace_back(spv_operand_type_t::SPV_OPERAND_TYPE_ID, - std::initializer_list{id}); - } - return operands; -} - -std::unique_ptr -FoldSpecConstantOpAndCompositePass::CreateInstruction(uint32_t id, - analysis::Constant* c) { - if (c->AsNullConstant()) { - return MakeUnique(SpvOp::SpvOpConstantNull, - type_mgr_->GetId(c->type()), id, - std::initializer_list{}); - } else if (analysis::BoolConstant* bc = c->AsBoolConstant()) { - return MakeUnique( - bc->value() ? SpvOp::SpvOpConstantTrue : SpvOp::SpvOpConstantFalse, - type_mgr_->GetId(c->type()), id, std::initializer_list{}); - } else if (analysis::IntConstant* ic = c->AsIntConstant()) { - return MakeUnique( - SpvOp::SpvOpConstant, type_mgr_->GetId(c->type()), id, - std::initializer_list{ir::Operand( - spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, - ic->words())}); - } else if (analysis::FloatConstant* fc = c->AsFloatConstant()) { - return MakeUnique( - SpvOp::SpvOpConstant, type_mgr_->GetId(c->type()), id, - std::initializer_list{ir::Operand( - spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, - fc->words())}); - } else if (analysis::CompositeConstant* cc = c->AsCompositeConstant()) { - return CreateCompositeInstruction(id, cc); - } else { - return nullptr; - } -} - -std::unique_ptr -FoldSpecConstantOpAndCompositePass::CreateCompositeInstruction( - uint32_t result_id, analysis::CompositeConstant* cc) { - std::vector operands; - for (const analysis::Constant* component_const : cc->GetComponents()) { - uint32_t id = FindRecordedConst(component_const); - if (id == 0) { - // Cannot get the id of the component constant, while all components - // should have been added to the module prior to the composite constant. - // Cannot create OpConstantComposite instruction in this case. - return nullptr; - } - operands.emplace_back(spv_operand_type_t::SPV_OPERAND_TYPE_ID, - std::initializer_list{id}); - } - return MakeUnique(SpvOp::SpvOpConstantComposite, - type_mgr_->GetId(cc->type()), result_id, - std::move(operands)); -} - } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h index 6e2eea1097e792b110c12ee30a35a81ad21c879f..5f901eeb1b00d0b5315053c787e113e333b6ea00 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h @@ -21,6 +21,7 @@ #include "constants.h" #include "def_use_manager.h" +#include "ir_context.h" #include "module.h" #include "pass.h" #include "type_manager.h" @@ -31,23 +32,23 @@ namespace opt { // See optimizer.hpp for documentation. class FoldSpecConstantOpAndCompositePass : public Pass { public: - FoldSpecConstantOpAndCompositePass(); + FoldSpecConstantOpAndCompositePass() = default; const char* name() const override { return "fold-spec-const-op-composite"; } - Status Process(ir::Module* module) override; + Status Process(ir::IRContext* irContext) override; private: // Initializes the type manager, def-use manager and get the maximal id used // in the module. - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* irContext); // The real entry of processing. Iterates through the types-constants-globals // section of the given module, finds the Spec Constants defined with // OpSpecConstantOp and OpSpecConstantComposite instructions. If the result // value of those spec constants can be folded, fold them to their // corresponding normal constants. - Status ProcessImpl(ir::Module*); + Status ProcessImpl(ir::IRContext* irContext); // Processes the OpSpecConstantOp instruction pointed by the given // instruction iterator, folds it to normal constants if possible. Returns @@ -79,94 +80,10 @@ class FoldSpecConstantOpAndCompositePass : public Pass { ir::Instruction* DoComponentWiseOperation( ir::Module::inst_iterator* inst_iter_ptr); - // Creates a constant defining instruction for the given Constant instance - // and inserts the instruction at the position specified by the given - // instruction iterator. Returns a pointer to the created instruction if - // succeeded, otherwise returns a null pointer. The instruction iterator - // points to the same instruction before and after the insertion. This is the - // only method that actually manages id creation/assignment and instruction - // creation/insertion for a new Constant instance. - ir::Instruction* BuildInstructionAndAddToModule( - std::unique_ptr c, ir::Module::inst_iterator* pos); - - // Creates a Constant instance to hold the constant value of the given - // instruction. If the given instruction defines a normal constants whose - // value is already known in the module, returns the unique pointer to the - // created Constant instance. Otherwise does not create anything and returns a - // nullptr. - std::unique_ptr CreateConstFromInst( - ir::Instruction* inst); - - // Creates a Constant instance with the given type and a vector of constant - // defining words. Returns an unique pointer to the created Constant instance - // if the Constant instance can be created successfully. To create scalar - // type constants, the vector should contain the constant value in 32 bit - // words and the given type must be of type Bool, Integer or Float. To create - // composite type constants, the vector should contain the component ids, and - // those component ids should have been recorded before as Normal Constants. - // And the given type must be of type Struct, Vector or Array. When creating - // VectorType Constant instance, the components must be scalars of the same - // type, either Bool, Integer or Float. If any of the rules above failed, the - // creation will fail and nullptr will be returned. If the vector is empty, - // a NullConstant instance will be created with the given type. - std::unique_ptr CreateConst( - const analysis::Type* type, - const std::vector& literal_words_or_ids); - - // Creates an instruction with the given result id to declare a constant - // represented by the given Constant instance. Returns an unique pointer to - // the created instruction if the instruction can be created successfully. - // Otherwise, returns a null pointer. - std::unique_ptr CreateInstruction(uint32_t result_id, - analysis::Constant* c); - - // Creates an OpConstantComposite instruction with the given result id and - // the CompositeConst instance which represents a composite constant. Returns - // an unique pointer to the created instruction if succeeded. Otherwise - // returns a null pointer. - std::unique_ptr CreateCompositeInstruction( - uint32_t result_id, analysis::CompositeConstant* cc); - - // A helper function to get the collected normal constant with the given id. - // Returns the pointer to the Constant instance in case it is found. - // Otherwise, returns null pointer. - analysis::Constant* FindRecordedConst(uint32_t id); - // A helper function to get the id of a collected constant with the pointer - // to the Constant instance. Returns 0 in case the constant is not found. - uint32_t FindRecordedConst(const analysis::Constant* c); - - // A helper function to get a vector of Constant instances with the specified - // ids. If can not find the Constant instance for any one of the ids, returns - // an empty vector. - std::vector GetConstsFromIds( - const std::vector& ids); - - // A helper function to get the result type of the given instrution. Returns - // nullptr if the instruction does not have a type id (type id is 0). - analysis::Type* GetType(const ir::Instruction* inst) { - return type_mgr_->GetType(inst->type_id()); - } - - // The maximum used ID. - uint32_t max_id_; - // A pointer to the module under process. - ir::Module* module_; - // DefUse manager - std::unique_ptr def_use_mgr_; - // Type manager - std::unique_ptr type_mgr_; - - // A mapping from the result ids of Normal Constants to their - // analysis::Constant instances. All Normal Constants in the module, either - // existing ones before optimization or the newly generated ones, should have - // their Constant instance stored and their result id registered in this map. - std::unordered_map> - id_to_const_val_; - // A mapping from the analsis::Constant instance of Normal Contants to their - // result id in the module. This is a mirror map of id_to_const_val_. All - // Normal Constants that defining instructions in the module should have - // their analysis::Constant and their result id registered here. - std::unordered_map const_val_to_id_; + // Returns the |element|'th subtype of |type|. + // + // |type| must be a composite type. + uint32_t GetTypeComponent(uint32_t type, uint32_t element) const; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3e3c80832b2f5621cb47b9018d99e51e85c46eb6 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.cpp @@ -0,0 +1,1960 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "folding_rules.h" + +#include + +#include "latest_version_glsl_std_450_header.h" + +namespace spvtools { +namespace opt { + +namespace { +const uint32_t kExtractCompositeIdInIdx = 0; +const uint32_t kInsertObjectIdInIdx = 0; +const uint32_t kInsertCompositeIdInIdx = 1; +const uint32_t kExtInstSetIdInIdx = 0; +const uint32_t kExtInstInstructionInIdx = 1; +const uint32_t kFMixXIdInIdx = 2; +const uint32_t kFMixYIdInIdx = 3; + +// Returns the element width of |type|. +uint32_t ElementWidth(const analysis::Type* type) { + if (const analysis::Vector* vec_type = type->AsVector()) { + return ElementWidth(vec_type->element_type()); + } else if (const analysis::Float* float_type = type->AsFloat()) { + return float_type->width(); + } else { + assert(type->AsInteger()); + return type->AsInteger()->width(); + } +} + +// Returns true if |type| is Float or a vector of Float. +bool HasFloatingPoint(const analysis::Type* type) { + if (type->AsFloat()) { + return true; + } else if (const analysis::Vector* vec_type = type->AsVector()) { + return vec_type->element_type()->AsFloat() != nullptr; + } + + return false; +} + +// Returns false if |val| is NaN, infinite or subnormal. +template +bool IsValidResult(T val) { + int classified = std::fpclassify(val); + switch (classified) { + case FP_NAN: + case FP_INFINITE: + case FP_SUBNORMAL: + return false; + default: + return true; + } +} + +const analysis::Constant* ConstInput( + const std::vector& constants) { + return constants[0] ? constants[0] : constants[1]; +} + +ir::Instruction* NonConstInput(ir::IRContext* context, + const analysis::Constant* c, + ir::Instruction* inst) { + uint32_t in_op = c ? 1u : 0u; + return context->get_def_use_mgr()->GetDef( + inst->GetSingleWordInOperand(in_op)); +} + +// Returns the negation of |c|. |c| must be a 32 or 64 bit floating point +// constant. +uint32_t NegateFloatingPointConstant(analysis::ConstantManager* const_mgr, + const analysis::Constant* c) { + assert(c); + assert(c->type()->AsFloat()); + uint32_t width = c->type()->AsFloat()->width(); + assert(width == 32 || width == 64); + std::vector words; + if (width == 64) { + spvutils::FloatProxy result(c->GetDouble() * -1.0); + words = result.GetWords(); + } else { + spvutils::FloatProxy result(c->GetFloat() * -1.0f); + words = result.GetWords(); + } + + const analysis::Constant* negated_const = + const_mgr->GetConstant(c->type(), std::move(words)); + return const_mgr->GetDefiningInstruction(negated_const)->result_id(); +} + +std::vector ExtractInts(uint64_t val) { + std::vector words; + words.push_back(static_cast(val)); + words.push_back(static_cast(val >> 32)); + return words; +} + +// Negates the integer constant |c|. Returns the id of the defining instruction. +uint32_t NegateIntegerConstant(analysis::ConstantManager* const_mgr, + const analysis::Constant* c) { + assert(c); + assert(c->type()->AsInteger()); + uint32_t width = c->type()->AsInteger()->width(); + assert(width == 32 || width == 64); + std::vector words; + if (width == 64) { + uint64_t uval = static_cast(0 - c->GetU64()); + words = ExtractInts(uval); + } else { + words.push_back(static_cast(0 - c->GetU32())); + } + + const analysis::Constant* negated_const = + const_mgr->GetConstant(c->type(), std::move(words)); + return const_mgr->GetDefiningInstruction(negated_const)->result_id(); +} + +// Negates the vector constant |c|. Returns the id of the defining instruction. +uint32_t NegateVectorConstant(analysis::ConstantManager* const_mgr, + const analysis::Constant* c) { + assert(const_mgr && c); + assert(c->type()->AsVector()); + if (c->AsNullConstant()) { + // 0.0 vs -0.0 shouldn't matter. + return const_mgr->GetDefiningInstruction(c)->result_id(); + } else { + const analysis::Type* component_type = + c->AsVectorConstant()->component_type(); + std::vector words; + for (auto& comp : c->AsVectorConstant()->GetComponents()) { + if (component_type->AsFloat()) { + words.push_back(NegateFloatingPointConstant(const_mgr, comp)); + } else { + assert(component_type->AsInteger()); + words.push_back(NegateIntegerConstant(const_mgr, comp)); + } + } + + const analysis::Constant* negated_const = + const_mgr->GetConstant(c->type(), std::move(words)); + return const_mgr->GetDefiningInstruction(negated_const)->result_id(); + } +} + +// Negates |c|. Returns the id of the defining instruction. +uint32_t NegateConstant(analysis::ConstantManager* const_mgr, + const analysis::Constant* c) { + if (c->type()->AsVector()) { + return NegateVectorConstant(const_mgr, c); + } else if (c->type()->AsFloat()) { + return NegateFloatingPointConstant(const_mgr, c); + } else { + assert(c->type()->AsInteger()); + return NegateIntegerConstant(const_mgr, c); + } +} + +// Takes the reciprocal of |c|. |c|'s type must be Float or a vector of Float. +// Returns 0 if the reciprocal is NaN, infinite or subnormal. +uint32_t Reciprocal(analysis::ConstantManager* const_mgr, + const analysis::Constant* c) { + assert(const_mgr && c); + assert(c->type()->AsFloat()); + + uint32_t width = c->type()->AsFloat()->width(); + assert(width == 32 || width == 64); + std::vector words; + if (width == 64) { + spvutils::FloatProxy result(1.0 / c->GetDouble()); + if (!IsValidResult(result.getAsFloat())) return 0; + words = result.GetWords(); + } else { + spvutils::FloatProxy result(1.0f / c->GetFloat()); + if (!IsValidResult(result.getAsFloat())) return 0; + words = result.GetWords(); + } + + const analysis::Constant* negated_const = + const_mgr->GetConstant(c->type(), std::move(words)); + return const_mgr->GetDefiningInstruction(negated_const)->result_id(); +} + +// Replaces fdiv where second operand is constant with fmul. +FoldingRule ReciprocalFDiv() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFDiv); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (!inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + if (constants[1] != nullptr) { + uint32_t id = 0; + if (const analysis::VectorConstant* vector_const = + constants[1]->AsVectorConstant()) { + std::vector neg_ids; + for (auto& comp : vector_const->GetComponents()) { + id = Reciprocal(const_mgr, comp); + if (id == 0) return false; + neg_ids.push_back(id); + } + const analysis::Constant* negated_const = + const_mgr->GetConstant(constants[1]->type(), std::move(neg_ids)); + id = const_mgr->GetDefiningInstruction(negated_const)->result_id(); + } else if (constants[1]->AsFloatConstant()) { + id = Reciprocal(const_mgr, constants[1]); + if (id == 0) return false; + } else { + // Don't fold a null constant. + return false; + } + inst->SetOpcode(SpvOpFMul); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0u)}}, + {SPV_OPERAND_TYPE_ID, {id}}}); + return true; + } + + return false; + }; +} + +// Elides consecutive negate instructions. +FoldingRule MergeNegateArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + (void)constants; + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (HasFloatingPoint(type) && !inst->IsFloatingPointFoldingAllowed()) + return false; + + ir::Instruction* op_inst = + context->get_def_use_mgr()->GetDef(inst->GetSingleWordInOperand(0u)); + if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (op_inst->opcode() == inst->opcode()) { + // Elide negates. + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0u)}}}); + return true; + } + + return false; + }; +} + +// Merges negate into a mul or div operation if that operation contains a +// constant operand. +// Cases: +// -(x * 2) = x * -2 +// -(2 * x) = x * -2 +// -(x / 2) = x / -2 +// -(2 / x) = -2 / x +FoldingRule MergeNegateMulDivArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + (void)constants; + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (HasFloatingPoint(type) && !inst->IsFloatingPointFoldingAllowed()) + return false; + + ir::Instruction* op_inst = + context->get_def_use_mgr()->GetDef(inst->GetSingleWordInOperand(0u)); + if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) + return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + SpvOp opcode = op_inst->opcode(); + if (opcode == SpvOpFMul || opcode == SpvOpFDiv || opcode == SpvOpIMul || + opcode == SpvOpSDiv || opcode == SpvOpUDiv) { + std::vector op_constants = + const_mgr->GetOperandConstants(op_inst); + // Merge negate into mul or div if one operand is constant. + if (op_constants[0] || op_constants[1]) { + bool zero_is_variable = op_constants[0] == nullptr; + const analysis::Constant* c = ConstInput(op_constants); + uint32_t neg_id = NegateConstant(const_mgr, c); + uint32_t non_const_id = zero_is_variable + ? op_inst->GetSingleWordInOperand(0u) + : op_inst->GetSingleWordInOperand(1u); + // Change this instruction to a mul/div. + inst->SetOpcode(op_inst->opcode()); + if (opcode == SpvOpFDiv || opcode == SpvOpUDiv || opcode == SpvOpSDiv) { + uint32_t op0 = zero_is_variable ? non_const_id : neg_id; + uint32_t op1 = zero_is_variable ? neg_id : non_const_id; + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op0}}, {SPV_OPERAND_TYPE_ID, {op1}}}); + } else { + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {non_const_id}}, + {SPV_OPERAND_TYPE_ID, {neg_id}}}); + } + return true; + } + } + + return false; + }; +} + +// Merges negate into a add or sub operation if that operation contains a +// constant operand. +// Cases: +// -(x + 2) = -2 - x +// -(2 + x) = -2 - x +// -(x - 2) = 2 - x +// -(2 - x) = x - 2 +FoldingRule MergeNegateAddSubArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + (void)constants; + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (HasFloatingPoint(type) && !inst->IsFloatingPointFoldingAllowed()) + return false; + + ir::Instruction* op_inst = + context->get_def_use_mgr()->GetDef(inst->GetSingleWordInOperand(0u)); + if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) + return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + if (op_inst->opcode() == SpvOpFAdd || op_inst->opcode() == SpvOpFSub || + op_inst->opcode() == SpvOpIAdd || op_inst->opcode() == SpvOpISub) { + std::vector op_constants = + const_mgr->GetOperandConstants(op_inst); + if (op_constants[0] || op_constants[1]) { + bool zero_is_variable = op_constants[0] == nullptr; + bool is_add = (op_inst->opcode() == SpvOpFAdd) || + (op_inst->opcode() == SpvOpIAdd); + bool swap_operands = !is_add || zero_is_variable; + bool negate_const = is_add; + const analysis::Constant* c = ConstInput(op_constants); + uint32_t const_id = 0; + if (negate_const) { + const_id = NegateConstant(const_mgr, c); + } else { + const_id = zero_is_variable ? op_inst->GetSingleWordInOperand(1u) + : op_inst->GetSingleWordInOperand(0u); + } + + // Swap operands if necessary and make the instruction a subtraction. + uint32_t op0 = + zero_is_variable ? op_inst->GetSingleWordInOperand(0u) : const_id; + uint32_t op1 = + zero_is_variable ? const_id : op_inst->GetSingleWordInOperand(1u); + if (swap_operands) std::swap(op0, op1); + inst->SetOpcode(HasFloatingPoint(type) ? SpvOpFSub : SpvOpISub); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op0}}, {SPV_OPERAND_TYPE_ID, {op1}}}); + return true; + } + } + + return false; + }; +} + +// Returns true if |c| has a zero element. +bool HasZero(const analysis::Constant* c) { + if (c->AsNullConstant()) { + return true; + } + if (const analysis::VectorConstant* vec_const = c->AsVectorConstant()) { + for (auto& comp : vec_const->GetComponents()) + if (HasZero(comp)) return true; + } else { + assert(c->AsScalarConstant()); + return c->AsScalarConstant()->IsZero(); + } + + return false; +} + +// Performs |input1| |opcode| |input2| and returns the merged constant result +// id. Returns 0 if the result is not a valid value. The input types must be +// Float. +uint32_t PerformFloatingPointOperation(analysis::ConstantManager* const_mgr, + SpvOp opcode, + const analysis::Constant* input1, + const analysis::Constant* input2) { + const analysis::Type* type = input1->type(); + assert(type->AsFloat()); + uint32_t width = type->AsFloat()->width(); + assert(width == 32 || width == 64); + std::vector words; +#define FOLD_OP(op) \ + if (width == 64) { \ + spvutils::FloatProxy val = \ + input1->GetDouble() op input2->GetDouble(); \ + double dval = val.getAsFloat(); \ + if (!IsValidResult(dval)) return 0; \ + words = val.GetWords(); \ + } else { \ + spvutils::FloatProxy val = \ + input1->GetFloat() op input2->GetFloat(); \ + float fval = val.getAsFloat(); \ + if (!IsValidResult(fval)) return 0; \ + words = val.GetWords(); \ + } + switch (opcode) { + case SpvOpFMul: + FOLD_OP(*); + break; + case SpvOpFDiv: + if (HasZero(input2)) return 0; + FOLD_OP(/); + break; + case SpvOpFAdd: + FOLD_OP(+); + break; + case SpvOpFSub: + FOLD_OP(-); + break; + default: + assert(false && "Unexpected operation"); + break; + } +#undef FOLD_OP + const analysis::Constant* merged_const = const_mgr->GetConstant(type, words); + return const_mgr->GetDefiningInstruction(merged_const)->result_id(); +} + +// Performs |input1| |opcode| |input2| and returns the merged constant result +// id. Returns 0 if the result is not a valid value. The input types must be +// Integers. +uint32_t PerformIntegerOperation(analysis::ConstantManager* const_mgr, + SpvOp opcode, const analysis::Constant* input1, + const analysis::Constant* input2) { + assert(input1->type()->AsInteger()); + const analysis::Integer* type = input1->type()->AsInteger(); + uint32_t width = type->AsInteger()->width(); + assert(width == 32 || width == 64); + std::vector words; +#define FOLD_OP(op) \ + if (width == 64) { \ + if (type->IsSigned()) { \ + int64_t val = input1->GetS64() op input2->GetS64(); \ + words = ExtractInts(static_cast(val)); \ + } else { \ + uint64_t val = input1->GetU64() op input2->GetU64(); \ + words = ExtractInts(val); \ + } \ + } else { \ + if (type->IsSigned()) { \ + int32_t val = input1->GetS32() op input2->GetS32(); \ + words.push_back(static_cast(val)); \ + } else { \ + uint32_t val = input1->GetU32() op input2->GetU32(); \ + words.push_back(val); \ + } \ + } + switch (opcode) { + case SpvOpIMul: + FOLD_OP(*); + break; + case SpvOpSDiv: + case SpvOpUDiv: + assert(false && "Should not merge integer division"); + break; + case SpvOpIAdd: + FOLD_OP(+); + break; + case SpvOpISub: + FOLD_OP(-); + break; + default: + assert(false && "Unexpected operation"); + break; + } +#undef FOLD_OP + const analysis::Constant* merged_const = const_mgr->GetConstant(type, words); + return const_mgr->GetDefiningInstruction(merged_const)->result_id(); +} + +// Performs |input1| |opcode| |input2| and returns the merged constant result +// id. Returns 0 if the result is not a valid value. The input types must be +// Integers, Floats or Vectors of such. +uint32_t PerformOperation(analysis::ConstantManager* const_mgr, SpvOp opcode, + const analysis::Constant* input1, + const analysis::Constant* input2) { + assert(input1 && input2); + assert(input1->type() == input2->type()); + const analysis::Type* type = input1->type(); + std::vector words; + if (const analysis::Vector* vector_type = type->AsVector()) { + const analysis::Type* ele_type = vector_type->element_type(); + for (uint32_t i = 0; i != vector_type->element_count(); ++i) { + uint32_t id = 0; + + const analysis::Constant* input1_comp = nullptr; + if (const analysis::VectorConstant* input1_vector = + input1->AsVectorConstant()) { + input1_comp = input1_vector->GetComponents()[i]; + } else { + assert(input1->AsNullConstant()); + input1_comp = const_mgr->GetConstant(ele_type, {}); + } + + const analysis::Constant* input2_comp = nullptr; + if (const analysis::VectorConstant* input2_vector = + input2->AsVectorConstant()) { + input2_comp = input2_vector->GetComponents()[i]; + } else { + assert(input2->AsNullConstant()); + input2_comp = const_mgr->GetConstant(ele_type, {}); + } + + if (ele_type->AsFloat()) { + id = PerformFloatingPointOperation(const_mgr, opcode, input1_comp, + input2_comp); + } else { + assert(ele_type->AsInteger()); + id = PerformIntegerOperation(const_mgr, opcode, input1_comp, + input2_comp); + } + if (id == 0) return 0; + words.push_back(id); + } + const analysis::Constant* merged_const = + const_mgr->GetConstant(type, words); + return const_mgr->GetDefiningInstruction(merged_const)->result_id(); + } else if (type->AsFloat()) { + return PerformFloatingPointOperation(const_mgr, opcode, input1, input2); + } else { + assert(type->AsInteger()); + return PerformIntegerOperation(const_mgr, opcode, input1, input2); + } +} + +// Merges consecutive multiplies where each contains one constant operand. +// Cases: +// 2 * (x * 2) = x * 4 +// 2 * (2 * x) = x * 4 +// (x * 2) * 2 = x * 4 +// (2 * x) * 2 = x * 4 +FoldingRule MergeMulMulArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFMul || inst->opcode() == SpvOpIMul); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (HasFloatingPoint(type) && !inst->IsFloatingPointFoldingAllowed()) + return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + // Determine the constant input and the variable input in |inst|. + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (HasFloatingPoint(type) && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == inst->opcode()) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + bool other_first_is_variable = other_constants[0] == nullptr; + uint32_t merged_id = PerformOperation(const_mgr, inst->opcode(), + const_input1, const_input2); + if (merged_id == 0) return false; + + uint32_t non_const_id = other_first_is_variable + ? other_inst->GetSingleWordInOperand(0u) + : other_inst->GetSingleWordInOperand(1u); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {non_const_id}}, + {SPV_OPERAND_TYPE_ID, {merged_id}}}); + return true; + } + + return false; + }; +} + +// Merges divides into subsequent multiplies if each instruction contains one +// constant operand. Does not support integer operations. +// Cases: +// 2 * (x / 2) = x * 1 +// 2 * (2 / x) = 4 / x +// (x / 2) * 2 = x * 1 +// (2 / x) * 2 = 4 / x +FoldingRule MergeMulDivArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFMul); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (!inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (!other_inst->IsFloatingPointFoldingAllowed()) return false; + + if (other_inst->opcode() == SpvOpFDiv) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2 || HasZero(const_input2)) return false; + + bool other_first_is_variable = other_constants[0] == nullptr; + // If the variable value is the second operand of the divide, multiply + // the constants together. Otherwise divide the constants. + uint32_t merged_id = PerformOperation( + const_mgr, + other_first_is_variable ? other_inst->opcode() : inst->opcode(), + const_input1, const_input2); + if (merged_id == 0) return false; + + uint32_t non_const_id = other_first_is_variable + ? other_inst->GetSingleWordInOperand(0u) + : other_inst->GetSingleWordInOperand(1u); + + // If the variable value is on the second operand of the div, then this + // operation is a div. Otherwise it should be a multiply. + inst->SetOpcode(other_first_is_variable ? inst->opcode() + : other_inst->opcode()); + if (other_first_is_variable) { + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {non_const_id}}, + {SPV_OPERAND_TYPE_ID, {merged_id}}}); + } else { + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {merged_id}}, + {SPV_OPERAND_TYPE_ID, {non_const_id}}}); + } + return true; + } + + return false; + }; +} + +// Merges multiply of constant and negation. +// Cases: +// (-x) * 2 = x * -2 +// 2 * (-x) = x * -2 +FoldingRule MergeMulNegateArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFMul || inst->opcode() == SpvOpIMul); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpFNegate || + other_inst->opcode() == SpvOpSNegate) { + uint32_t neg_id = NegateConstant(const_mgr, const_input1); + + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {other_inst->GetSingleWordInOperand(0u)}}, + {SPV_OPERAND_TYPE_ID, {neg_id}}}); + return true; + } + + return false; + }; +} + +// Merges consecutive divides if each instruction contains one constant operand. +// Does not support integer division. +// Cases: +// 2 / (x / 2) = 4 / x +// 4 / (2 / x) = 2 * x +// (4 / x) / 2 = 2 / x +// (x / 2) / 2 = x / 4 +FoldingRule MergeDivDivArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFDiv); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (!inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1 || HasZero(const_input1)) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (!other_inst->IsFloatingPointFoldingAllowed()) return false; + + bool first_is_variable = constants[0] == nullptr; + if (other_inst->opcode() == inst->opcode()) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2 || HasZero(const_input2)) return false; + + bool other_first_is_variable = other_constants[0] == nullptr; + + SpvOp merge_op = inst->opcode(); + if (other_first_is_variable) { + // Constants magnify. + merge_op = SpvOpFMul; + } + + // This is an x / (*) case. Swap the inputs. Doesn't harm multiply + // because it is commutative. + if (first_is_variable) std::swap(const_input1, const_input2); + uint32_t merged_id = + PerformOperation(const_mgr, merge_op, const_input1, const_input2); + if (merged_id == 0) return false; + + uint32_t non_const_id = other_first_is_variable + ? other_inst->GetSingleWordInOperand(0u) + : other_inst->GetSingleWordInOperand(1u); + + SpvOp op = inst->opcode(); + if (!first_is_variable && !other_first_is_variable) { + // Effectively div of 1/x, so change to multiply. + op = SpvOpFMul; + } + + uint32_t op1 = merged_id; + uint32_t op2 = non_const_id; + if (first_is_variable && other_first_is_variable) std::swap(op1, op2); + inst->SetOpcode(op); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + + return false; + }; +} + +// Fold multiplies succeeded by divides where each instruction contains a +// constant operand. Does not support integer divide. +// Cases: +// 4 / (x * 2) = 2 / x +// 4 / (2 * x) = 2 / x +// (x * 4) / 2 = x * 2 +// (4 * x) / 2 = x * 2 +FoldingRule MergeDivMulArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFDiv); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + if (!inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1 || HasZero(const_input1)) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (!other_inst->IsFloatingPointFoldingAllowed()) return false; + + bool first_is_variable = constants[0] == nullptr; + if (other_inst->opcode() == SpvOpFMul) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + bool other_first_is_variable = other_constants[0] == nullptr; + + // This is an x / (*) case. Swap the inputs. + if (first_is_variable) std::swap(const_input1, const_input2); + uint32_t merged_id = PerformOperation(const_mgr, inst->opcode(), + const_input1, const_input2); + if (merged_id == 0) return false; + + uint32_t non_const_id = other_first_is_variable + ? other_inst->GetSingleWordInOperand(0u) + : other_inst->GetSingleWordInOperand(1u); + + uint32_t op1 = merged_id; + uint32_t op2 = non_const_id; + if (first_is_variable) std::swap(op1, op2); + + // Convert to multiply + if (first_is_variable) inst->SetOpcode(other_inst->opcode()); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + + return false; + }; +} + +// Fold divides of a constant and a negation. +// Cases: +// (-x) / 2 = x / -2 +// 2 / (-x) = 2 / -x +FoldingRule MergeDivNegateArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFDiv || inst->opcode() == SpvOpSDiv || + inst->opcode() == SpvOpUDiv); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + bool first_is_variable = constants[0] == nullptr; + if (other_inst->opcode() == SpvOpFNegate || + other_inst->opcode() == SpvOpSNegate) { + uint32_t neg_id = NegateConstant(const_mgr, const_input1); + + if (first_is_variable) { + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {other_inst->GetSingleWordInOperand(0u)}}, + {SPV_OPERAND_TYPE_ID, {neg_id}}}); + } else { + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {neg_id}}, + {SPV_OPERAND_TYPE_ID, {other_inst->GetSingleWordInOperand(0u)}}}); + } + return true; + } + + return false; + }; +} + +// Folds addition of a constant and a negation. +// Cases: +// (-x) + 2 = 2 - x +// 2 + (-x) = 2 - x +FoldingRule MergeAddNegateArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpSNegate || + other_inst->opcode() == SpvOpFNegate) { + inst->SetOpcode(HasFloatingPoint(type) ? SpvOpFSub : SpvOpISub); + uint32_t const_id = constants[0] ? inst->GetSingleWordInOperand(0u) + : inst->GetSingleWordInOperand(1u); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {const_id}}, + {SPV_OPERAND_TYPE_ID, {other_inst->GetSingleWordInOperand(0u)}}}); + return true; + } + return false; + }; +} + +// Folds subtraction of a constant and a negation. +// Cases: +// (-x) - 2 = -2 - x +// 2 - (-x) = x + 2 +FoldingRule MergeSubNegateArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpSNegate || + other_inst->opcode() == SpvOpFNegate) { + uint32_t op1 = 0; + uint32_t op2 = 0; + SpvOp opcode = inst->opcode(); + if (constants[0] != nullptr) { + op1 = other_inst->GetSingleWordInOperand(0u); + op2 = inst->GetSingleWordInOperand(0u); + opcode = HasFloatingPoint(type) ? SpvOpFAdd : SpvOpIAdd; + } else { + op1 = NegateConstant(const_mgr, const_input1); + op2 = other_inst->GetSingleWordInOperand(0u); + } + + inst->SetOpcode(opcode); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + return false; + }; +} + +// Folds addition of an addition where each operation has a constant operand. +// Cases: +// (x + 2) + 2 = x + 4 +// (2 + x) + 2 = x + 4 +// 2 + (x + 2) = x + 4 +// 2 + (2 + x) = x + 4 +FoldingRule MergeAddAddArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpFAdd || + other_inst->opcode() == SpvOpIAdd) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + ir::Instruction* non_const_input = + NonConstInput(context, other_constants[0], other_inst); + uint32_t merged_id = PerformOperation(const_mgr, inst->opcode(), + const_input1, const_input2); + if (merged_id == 0) return false; + + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {non_const_input->result_id()}}, + {SPV_OPERAND_TYPE_ID, {merged_id}}}); + return true; + } + return false; + }; +} + +// Folds addition of a subtraction where each operation has a constant operand. +// Cases: +// (x - 2) + 2 = x + 0 +// (2 - x) + 2 = 4 - x +// 2 + (x - 2) = x + 0 +// 2 + (2 - x) = 4 - x +FoldingRule MergeAddSubArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpFSub || + other_inst->opcode() == SpvOpISub) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + bool first_is_variable = other_constants[0] == nullptr; + SpvOp op = inst->opcode(); + uint32_t op1 = 0; + uint32_t op2 = 0; + if (first_is_variable) { + // Subtract constants. Non-constant operand is first. + op1 = other_inst->GetSingleWordInOperand(0u); + op2 = PerformOperation(const_mgr, other_inst->opcode(), const_input1, + const_input2); + } else { + // Add constants. Constant operand is first. Change the opcode. + op1 = PerformOperation(const_mgr, inst->opcode(), const_input1, + const_input2); + op2 = other_inst->GetSingleWordInOperand(1u); + op = other_inst->opcode(); + } + if (op1 == 0 || op2 == 0) return false; + + inst->SetOpcode(op); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + return false; + }; +} + +// Folds subtraction of an addition where each operand has a constant operand. +// Cases: +// (x + 2) - 2 = x + 0 +// (2 + x) - 2 = x + 0 +// 2 - (x + 2) = 0 - x +// 2 - (2 + x) = 0 - x +FoldingRule MergeSubAddArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpFAdd || + other_inst->opcode() == SpvOpIAdd) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + ir::Instruction* non_const_input = + NonConstInput(context, other_constants[0], other_inst); + + // If the first operand of the sub is not a constant, swap the constants + // so the subtraction has the correct operands. + if (constants[0] == nullptr) std::swap(const_input1, const_input2); + // Subtract the constants. + uint32_t merged_id = PerformOperation(const_mgr, inst->opcode(), + const_input1, const_input2); + SpvOp op = inst->opcode(); + uint32_t op1 = 0; + uint32_t op2 = 0; + if (constants[0] == nullptr) { + // Non-constant operand is first. Change the opcode. + op1 = non_const_input->result_id(); + op2 = merged_id; + op = other_inst->opcode(); + } else { + // Constant operand is first. + op1 = merged_id; + op2 = non_const_input->result_id(); + } + if (op1 == 0 || op2 == 0) return false; + + inst->SetOpcode(op); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + return false; + }; +} + +// Folds subtraction of a subtraction where each operand has a constant operand. +// Cases: +// (x - 2) - 2 = x - 4 +// (2 - x) - 2 = 0 - x +// 2 - (x - 2) = 4 - x +// 2 - (2 - x) = x + 0 +FoldingRule MergeSubSubArithmetic() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + ir::IRContext* context = inst->context(); + const analysis::Type* type = + context->get_type_mgr()->GetType(inst->type_id()); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + bool uses_float = HasFloatingPoint(type); + if (uses_float && !inst->IsFloatingPointFoldingAllowed()) return false; + + uint32_t width = ElementWidth(type); + if (width != 32 && width != 64) return false; + + const analysis::Constant* const_input1 = ConstInput(constants); + if (!const_input1) return false; + ir::Instruction* other_inst = NonConstInput(context, constants[0], inst); + if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) + return false; + + if (other_inst->opcode() == SpvOpFSub || + other_inst->opcode() == SpvOpISub) { + std::vector other_constants = + const_mgr->GetOperandConstants(other_inst); + const analysis::Constant* const_input2 = ConstInput(other_constants); + if (!const_input2) return false; + + ir::Instruction* non_const_input = + NonConstInput(context, other_constants[0], other_inst); + + // Merge the constants. + uint32_t merged_id = 0; + SpvOp merge_op = inst->opcode(); + if (other_constants[0] == nullptr) { + merge_op = uses_float ? SpvOpFAdd : SpvOpIAdd; + } else if (constants[0] == nullptr) { + std::swap(const_input1, const_input2); + } + merged_id = + PerformOperation(const_mgr, merge_op, const_input1, const_input2); + if (merged_id == 0) return false; + + SpvOp op = inst->opcode(); + if (constants[0] != nullptr && other_constants[0] != nullptr) { + // Change the operation. + op = uses_float ? SpvOpFAdd : SpvOpIAdd; + } + + uint32_t op1 = 0; + uint32_t op2 = 0; + if ((constants[0] == nullptr) ^ (other_constants[0] == nullptr)) { + op1 = merged_id; + op2 = non_const_input->result_id(); + } else { + op1 = non_const_input->result_id(); + op2 = merged_id; + } + + inst->SetOpcode(op); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}}); + return true; + } + return false; + }; +} + +FoldingRule IntMultipleBy1() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpIMul && "Wrong opcode. Should be OpIMul."); + for (uint32_t i = 0; i < 2; i++) { + if (constants[i] == nullptr) { + continue; + } + const analysis::IntConstant* int_constant = constants[i]->AsIntConstant(); + if (int_constant) { + uint32_t width = ElementWidth(int_constant->type()); + if (width != 32 && width != 64) return false; + bool is_one = (width == 32) ? int_constant->GetU32BitValue() == 1u + : int_constant->GetU64BitValue() == 1ull; + if (is_one) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(1 - i)}}}); + return true; + } + } + } + return false; + }; +} + +FoldingRule CompositeConstructFeedingExtract() { + return [](ir::Instruction* inst, + const std::vector&) { + // If the input to an OpCompositeExtract is an OpCompositeConstruct, + // then we can simply use the appropriate element in the construction. + assert(inst->opcode() == SpvOpCompositeExtract && + "Wrong opcode. Should be OpCompositeExtract."); + analysis::DefUseManager* def_use_mgr = inst->context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = inst->context()->get_type_mgr(); + uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); + ir::Instruction* cinst = def_use_mgr->GetDef(cid); + + if (cinst->opcode() != SpvOpCompositeConstruct) { + return false; + } + + std::vector operands; + analysis::Type* composite_type = type_mgr->GetType(cinst->type_id()); + if (composite_type->AsVector() == nullptr) { + // Get the element being extracted from the OpCompositeConstruct + // Since it is not a vector, it is simple to extract the single element. + uint32_t element_index = inst->GetSingleWordInOperand(1); + uint32_t element_id = cinst->GetSingleWordInOperand(element_index); + operands.push_back({SPV_OPERAND_TYPE_ID, {element_id}}); + + // Add the remaining indices for extraction. + for (uint32_t i = 2; i < inst->NumInOperands(); ++i) { + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, + {inst->GetSingleWordInOperand(i)}}); + } + + } else { + // With vectors we have to handle the case where it is concatenating + // vectors. + assert(inst->NumInOperands() == 2 && + "Expecting a vector of scalar values."); + + uint32_t element_index = inst->GetSingleWordInOperand(1); + for (uint32_t construct_index = 0; + construct_index < cinst->NumInOperands(); ++construct_index) { + uint32_t element_id = cinst->GetSingleWordInOperand(construct_index); + ir::Instruction* element_def = def_use_mgr->GetDef(element_id); + analysis::Vector* element_type = + type_mgr->GetType(element_def->type_id())->AsVector(); + if (element_type) { + uint32_t vector_size = element_type->element_count(); + if (vector_size < element_index) { + // The element we want comes after this vector. + element_index -= vector_size; + } else { + // We want an element of this vector. + operands.push_back({SPV_OPERAND_TYPE_ID, {element_id}}); + operands.push_back( + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {element_index}}); + break; + } + } else { + if (element_index == 0) { + // This is a scalar, and we this is the element we are extracting. + operands.push_back({SPV_OPERAND_TYPE_ID, {element_id}}); + break; + } else { + // Skip over this scalar value. + --element_index; + } + } + } + } + + // If there were no extra indices, then we have the final object. No need + // to extract even more. + if (operands.size() == 1) { + inst->SetOpcode(SpvOpCopyObject); + } + + inst->SetInOperands(std::move(operands)); + return true; + }; +} + +FoldingRule CompositeExtractFeedingConstruct() { + // If the OpCompositeConstruct is simply putting back together elements that + // where extracted from the same souce, we can simlpy reuse the source. + // + // This is a common code pattern because of the way that scalar replacement + // works. + return [](ir::Instruction* inst, + const std::vector&) { + assert(inst->opcode() == SpvOpCompositeConstruct && + "Wrong opcode. Should be OpCompositeConstruct."); + analysis::DefUseManager* def_use_mgr = inst->context()->get_def_use_mgr(); + uint32_t original_id = 0; + + // Check each element to make sure they are: + // - extractions + // - extracting the same position they are inserting + // - all extract from the same id. + for (uint32_t i = 0; i < inst->NumInOperands(); ++i) { + uint32_t element_id = inst->GetSingleWordInOperand(i); + ir::Instruction* element_inst = def_use_mgr->GetDef(element_id); + + if (element_inst->opcode() != SpvOpCompositeExtract) { + return false; + } + + if (element_inst->NumInOperands() != 2) { + return false; + } + + if (element_inst->GetSingleWordInOperand(1) != i) { + return false; + } + + if (i == 0) { + original_id = + element_inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); + } else if (original_id != element_inst->GetSingleWordInOperand( + kExtractCompositeIdInIdx)) { + return false; + } + } + + // The last check it to see that the object being extracted from is the + // correct type. + ir::Instruction* original_inst = def_use_mgr->GetDef(original_id); + if (original_inst->type_id() != inst->type_id()) { + return false; + } + + // Simplify by using the original object. + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {original_id}}}); + return true; + }; +} + +FoldingRule InsertFeedingExtract() { + return [](ir::Instruction* inst, + const std::vector&) { + assert(inst->opcode() == SpvOpCompositeExtract && + "Wrong opcode. Should be OpCompositeExtract."); + analysis::DefUseManager* def_use_mgr = inst->context()->get_def_use_mgr(); + uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); + ir::Instruction* cinst = def_use_mgr->GetDef(cid); + + if (cinst->opcode() != SpvOpCompositeInsert) { + return false; + } + + // Find the first position where the list of insert and extract indicies + // differ, if at all. + uint32_t i; + for (i = 1; i < inst->NumInOperands(); ++i) { + if (i + 1 >= cinst->NumInOperands()) { + break; + } + + if (inst->GetSingleWordInOperand(i) != + cinst->GetSingleWordInOperand(i + 1)) { + break; + } + } + + // We are extracting the element that was inserted. + if (i == inst->NumInOperands() && i + 1 == cinst->NumInOperands()) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, + {cinst->GetSingleWordInOperand(kInsertObjectIdInIdx)}}}); + return true; + } + + // Extracting the value that was inserted along with values for the base + // composite. Cannot do anything. + if (i == inst->NumInOperands()) { + return false; + } + + // Extracting an element of the value that was inserted. Extract from + // that value directly. + if (i + 1 == cinst->NumInOperands()) { + std::vector operands; + operands.push_back( + {SPV_OPERAND_TYPE_ID, + {cinst->GetSingleWordInOperand(kInsertObjectIdInIdx)}}); + for (; i < inst->NumInOperands(); ++i) { + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, + {inst->GetSingleWordInOperand(i)}}); + } + inst->SetInOperands(std::move(operands)); + return true; + } + + // Extracting a value that is disjoint from the element being inserted. + // Rewrite the extract to use the composite input to the insert. + std::vector operands; + operands.push_back( + {SPV_OPERAND_TYPE_ID, + {cinst->GetSingleWordInOperand(kInsertCompositeIdInIdx)}}); + for (i = 1; i < inst->NumInOperands(); ++i) { + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, + {inst->GetSingleWordInOperand(i)}}); + } + inst->SetInOperands(std::move(operands)); + return true; + }; +} + +// When a VectorShuffle is feeding an Extract, we can extract from one of the +// operands of the VectorShuffle. We just need to adjust the index in the +// extract instruction. +FoldingRule VectorShuffleFeedingExtract() { + return [](ir::Instruction* inst, + const std::vector&) { + assert(inst->opcode() == SpvOpCompositeExtract && + "Wrong opcode. Should be OpCompositeExtract."); + analysis::DefUseManager* def_use_mgr = inst->context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = inst->context()->get_type_mgr(); + uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); + ir::Instruction* cinst = def_use_mgr->GetDef(cid); + + if (cinst->opcode() != SpvOpVectorShuffle) { + return false; + } + + // Find the size of the first vector operand of the VectorShuffle + ir::Instruction* first_input = + def_use_mgr->GetDef(cinst->GetSingleWordInOperand(0)); + analysis::Type* first_input_type = + type_mgr->GetType(first_input->type_id()); + assert(first_input_type->AsVector() && + "Input to vector shuffle should be vectors."); + uint32_t first_input_size = first_input_type->AsVector()->element_count(); + + // Get index of the element the vector shuffle is placing in the position + // being extracted. + uint32_t new_index = + cinst->GetSingleWordInOperand(2 + inst->GetSingleWordInOperand(1)); + + // Get the id of the of the vector the elemtent comes from, and update the + // index if needed. + uint32_t new_vector = 0; + if (new_index < first_input_size) { + new_vector = cinst->GetSingleWordInOperand(0); + } else { + new_vector = cinst->GetSingleWordInOperand(1); + new_index -= first_input_size; + } + + // Update the extract instruction. + inst->SetInOperand(kExtractCompositeIdInIdx, {new_vector}); + inst->SetInOperand(1, {new_index}); + return true; + }; +} + +FoldingRule RedundantPhi() { + // An OpPhi instruction where all values are the same or the result of the phi + // itself, can be replaced by the value itself. + return + [](ir::Instruction* inst, const std::vector&) { + assert(inst->opcode() == SpvOpPhi && "Wrong opcode. Should be OpPhi."); + + ir::IRContext* context = inst->context(); + analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); + + uint32_t incoming_value = 0; + + for (uint32_t i = 0; i < inst->NumInOperands(); i += 2) { + uint32_t op_id = inst->GetSingleWordInOperand(i); + if (op_id == inst->result_id()) { + continue; + } + + ir::Instruction* op_inst = def_use_mgr->GetDef(op_id); + if (op_inst->opcode() == SpvOpUndef) { + // TODO: We should be able to still use op_id if we know that + // the definition of op_id dominates |inst|. + return false; + } + + if (incoming_value == 0) { + incoming_value = op_id; + } else if (op_id != incoming_value) { + // Found two possible value. Can't simplify. + return false; + } + } + + if (incoming_value == 0) { + // Code looks invalid. Don't do anything. + return false; + } + + // We have a single incoming value. Simplify using that value. + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {incoming_value}}}); + return true; + }; +} + +FoldingRule RedundantSelect() { + // An OpSelect instruction where both values are the same or the condition is + // constant can be replaced by one of the values + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpSelect && + "Wrong opcode. Should be OpSelect."); + assert(inst->NumInOperands() == 3); + assert(constants.size() == 3); + + uint32_t true_id = inst->GetSingleWordInOperand(1); + uint32_t false_id = inst->GetSingleWordInOperand(2); + + if (true_id == false_id) { + // Both results are the same, condition doesn't matter + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {true_id}}}); + return true; + } else if (constants[0]) { + const analysis::Type* type = constants[0]->type(); + if (type->AsBool()) { + // Scalar constant value, select the corresponding value. + inst->SetOpcode(SpvOpCopyObject); + if (constants[0]->AsNullConstant() || + !constants[0]->AsBoolConstant()->value()) { + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {false_id}}}); + } else { + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {true_id}}}); + } + return true; + } else { + assert(type->AsVector()); + if (constants[0]->AsNullConstant()) { + // All values come from false id. + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {false_id}}}); + return true; + } else { + // Convert to a vector shuffle. + std::vector ops; + ops.push_back({SPV_OPERAND_TYPE_ID, {true_id}}); + ops.push_back({SPV_OPERAND_TYPE_ID, {false_id}}); + const analysis::VectorConstant* vector_const = + constants[0]->AsVectorConstant(); + uint32_t size = + static_cast(vector_const->GetComponents().size()); + for (uint32_t i = 0; i != size; ++i) { + const analysis::Constant* component = + vector_const->GetComponents()[i]; + if (component->AsNullConstant() || + !component->AsBoolConstant()->value()) { + // Selecting from the false vector which is the second input + // vector to the shuffle. Offset the index by |size|. + ops.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, {i + size}}); + } else { + // Selecting from true vector which is the first input vector to + // the shuffle. + ops.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, {i}}); + } + } + + inst->SetOpcode(SpvOpVectorShuffle); + inst->SetInOperands(std::move(ops)); + return true; + } + } + } + + return false; + }; +} + +enum class FloatConstantKind { Unknown, Zero, One }; + +FloatConstantKind getFloatConstantKind(const analysis::Constant* constant) { + if (constant == nullptr) { + return FloatConstantKind::Unknown; + } + + assert(HasFloatingPoint(constant->type()) && "Unexpected constant type"); + + if (constant->AsNullConstant()) { + return FloatConstantKind::Zero; + } else if (const analysis::VectorConstant* vc = + constant->AsVectorConstant()) { + const std::vector& components = + vc->GetComponents(); + assert(!components.empty()); + + FloatConstantKind kind = getFloatConstantKind(components[0]); + + for (size_t i = 1; i < components.size(); ++i) { + if (getFloatConstantKind(components[i]) != kind) { + return FloatConstantKind::Unknown; + } + } + + return kind; + } else if (const analysis::FloatConstant* fc = constant->AsFloatConstant()) { + if (fc->IsZero()) return FloatConstantKind::Zero; + + uint32_t width = fc->type()->AsFloat()->width(); + if (width != 32 && width != 64) return FloatConstantKind::Unknown; + + double value = (width == 64) ? fc->GetDoubleValue() : fc->GetFloatValue(); + + if (value == 0.0) { + return FloatConstantKind::Zero; + } else if (value == 1.0) { + return FloatConstantKind::One; + } else { + return FloatConstantKind::Unknown; + } + } else { + return FloatConstantKind::Unknown; + } +} + +FoldingRule RedundantFAdd() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFAdd && "Wrong opcode. Should be OpFAdd."); + assert(constants.size() == 2); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + FloatConstantKind kind0 = getFloatConstantKind(constants[0]); + FloatConstantKind kind1 = getFloatConstantKind(constants[1]); + + if (kind0 == FloatConstantKind::Zero || kind1 == FloatConstantKind::Zero) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, + {inst->GetSingleWordInOperand( + kind0 == FloatConstantKind::Zero ? 1 : 0)}}}); + return true; + } + + return false; + }; +} + +FoldingRule RedundantFSub() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFSub && "Wrong opcode. Should be OpFSub."); + assert(constants.size() == 2); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + FloatConstantKind kind0 = getFloatConstantKind(constants[0]); + FloatConstantKind kind1 = getFloatConstantKind(constants[1]); + + if (kind0 == FloatConstantKind::Zero) { + inst->SetOpcode(SpvOpFNegate); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(1)}}}); + return true; + } + + if (kind1 == FloatConstantKind::Zero) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); + return true; + } + + return false; + }; +} + +FoldingRule RedundantFMul() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFMul && "Wrong opcode. Should be OpFMul."); + assert(constants.size() == 2); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + FloatConstantKind kind0 = getFloatConstantKind(constants[0]); + FloatConstantKind kind1 = getFloatConstantKind(constants[1]); + + if (kind0 == FloatConstantKind::Zero || kind1 == FloatConstantKind::Zero) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, + {inst->GetSingleWordInOperand( + kind0 == FloatConstantKind::Zero ? 0 : 1)}}}); + return true; + } + + if (kind0 == FloatConstantKind::One || kind1 == FloatConstantKind::One) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, + {inst->GetSingleWordInOperand( + kind0 == FloatConstantKind::One ? 1 : 0)}}}); + return true; + } + + return false; + }; +} + +FoldingRule RedundantFDiv() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpFDiv && "Wrong opcode. Should be OpFDiv."); + assert(constants.size() == 2); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + FloatConstantKind kind0 = getFloatConstantKind(constants[0]); + FloatConstantKind kind1 = getFloatConstantKind(constants[1]); + + if (kind0 == FloatConstantKind::Zero) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); + return true; + } + + if (kind1 == FloatConstantKind::One) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); + return true; + } + + return false; + }; +} + +FoldingRule RedundantFMix() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpExtInst && + "Wrong opcode. Should be OpExtInst."); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + uint32_t instSetId = + inst->context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); + + if (inst->GetSingleWordInOperand(kExtInstSetIdInIdx) == instSetId && + inst->GetSingleWordInOperand(kExtInstInstructionInIdx) == + GLSLstd450FMix) { + assert(constants.size() == 5); + + FloatConstantKind kind4 = getFloatConstantKind(constants[4]); + + if (kind4 == FloatConstantKind::Zero || kind4 == FloatConstantKind::One) { + inst->SetOpcode(SpvOpCopyObject); + inst->SetInOperands( + {{SPV_OPERAND_TYPE_ID, + {inst->GetSingleWordInOperand(kind4 == FloatConstantKind::Zero + ? kFMixXIdInIdx + : kFMixYIdInIdx)}}}); + return true; + } + } + + return false; + }; +} + +// This rule look for a dot with a constant vector containing a single 1 and +// the rest 0s. This is the same as doing an extract. +FoldingRule DotProductDoingExtract() { + return [](ir::Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == SpvOpDot && "Wrong opcode. Should be OpDot."); + + ir::IRContext* context = inst->context(); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + for (int i = 0; i < 2; ++i) { + if (!constants[i]) { + continue; + } + + const analysis::Vector* vector_type = constants[i]->type()->AsVector(); + assert(vector_type && "Inputs to OpDot must be vectors."); + const analysis::Float* element_type = + vector_type->element_type()->AsFloat(); + assert(element_type && "Inputs to OpDot must be vectors of floats."); + uint32_t element_width = element_type->width(); + if (element_width != 32 && element_width != 64) { + return false; + } + + std::vector components; + components = constants[i]->GetVectorComponents(const_mgr); + + const uint32_t kNotFound = std::numeric_limits::max(); + + uint32_t component_with_one = kNotFound; + bool all_others_zero = true; + for (uint32_t j = 0; j < components.size(); ++j) { + const analysis::Constant* element = components[j]; + double value = + (element_width == 32 ? element->GetFloat() : element->GetDouble()); + if (value == 0.0) { + continue; + } else if (value == 1.0) { + if (component_with_one == kNotFound) { + component_with_one = j; + } else { + component_with_one = kNotFound; + break; + } + } else { + all_others_zero = false; + break; + } + } + + if (!all_others_zero || component_with_one == kNotFound) { + continue; + } + + std::vector operands; + operands.push_back( + {SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(1u - i)}}); + operands.push_back( + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {component_with_one}}); + + inst->SetOpcode(SpvOpCompositeExtract); + inst->SetInOperands(std::move(operands)); + return true; + } + return false; + }; +} + +} // namespace + +spvtools::opt::FoldingRules::FoldingRules() { + // Add all folding rules to the list for the opcodes to which they apply. + // Note that the order in which rules are added to the list matters. If a rule + // applies to the instruction, the rest of the rules will not be attempted. + // Take that into consideration. + + rules_[SpvOpCompositeConstruct].push_back(CompositeExtractFeedingConstruct()); + + rules_[SpvOpCompositeExtract].push_back(InsertFeedingExtract()); + rules_[SpvOpCompositeExtract].push_back(CompositeConstructFeedingExtract()); + rules_[SpvOpCompositeExtract].push_back(VectorShuffleFeedingExtract()); + + rules_[SpvOpDot].push_back(DotProductDoingExtract()); + + rules_[SpvOpExtInst].push_back(RedundantFMix()); + + rules_[SpvOpFAdd].push_back(RedundantFAdd()); + rules_[SpvOpFAdd].push_back(MergeAddNegateArithmetic()); + rules_[SpvOpFAdd].push_back(MergeAddAddArithmetic()); + rules_[SpvOpFAdd].push_back(MergeAddSubArithmetic()); + + rules_[SpvOpFDiv].push_back(RedundantFDiv()); + rules_[SpvOpFDiv].push_back(ReciprocalFDiv()); + rules_[SpvOpFDiv].push_back(MergeDivDivArithmetic()); + rules_[SpvOpFDiv].push_back(MergeDivMulArithmetic()); + rules_[SpvOpFDiv].push_back(MergeDivNegateArithmetic()); + + rules_[SpvOpFMul].push_back(RedundantFMul()); + rules_[SpvOpFMul].push_back(MergeMulMulArithmetic()); + rules_[SpvOpFMul].push_back(MergeMulDivArithmetic()); + rules_[SpvOpFMul].push_back(MergeMulNegateArithmetic()); + + rules_[SpvOpFNegate].push_back(MergeNegateArithmetic()); + rules_[SpvOpFNegate].push_back(MergeNegateAddSubArithmetic()); + rules_[SpvOpFNegate].push_back(MergeNegateMulDivArithmetic()); + + rules_[SpvOpFSub].push_back(RedundantFSub()); + rules_[SpvOpFSub].push_back(MergeSubNegateArithmetic()); + rules_[SpvOpFSub].push_back(MergeSubAddArithmetic()); + rules_[SpvOpFSub].push_back(MergeSubSubArithmetic()); + + rules_[SpvOpIAdd].push_back(MergeAddNegateArithmetic()); + rules_[SpvOpIAdd].push_back(MergeAddAddArithmetic()); + rules_[SpvOpIAdd].push_back(MergeAddSubArithmetic()); + + rules_[SpvOpIMul].push_back(IntMultipleBy1()); + rules_[SpvOpIMul].push_back(MergeMulMulArithmetic()); + rules_[SpvOpIMul].push_back(MergeMulNegateArithmetic()); + + rules_[SpvOpISub].push_back(MergeSubNegateArithmetic()); + rules_[SpvOpISub].push_back(MergeSubAddArithmetic()); + rules_[SpvOpISub].push_back(MergeSubSubArithmetic()); + + rules_[SpvOpPhi].push_back(RedundantPhi()); + + rules_[SpvOpSDiv].push_back(MergeDivNegateArithmetic()); + + rules_[SpvOpSNegate].push_back(MergeNegateArithmetic()); + rules_[SpvOpSNegate].push_back(MergeNegateMulDivArithmetic()); + rules_[SpvOpSNegate].push_back(MergeNegateAddSubArithmetic()); + + rules_[SpvOpSelect].push_back(RedundantSelect()); + + rules_[SpvOpUDiv].push_back(MergeDivNegateArithmetic()); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.h new file mode 100644 index 0000000000000000000000000000000000000000..78277e82ceace37aea219aaa85da5e97b1e2f532 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/folding_rules.h @@ -0,0 +1,81 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_UTIL_FOLDING_RULES_H_ +#define LIBSPIRV_UTIL_FOLDING_RULES_H_ + +#include +#include + +#include "constants.h" +#include "def_use_manager.h" +#include "ir_builder.h" +#include "ir_context.h" + +namespace spvtools { +namespace opt { + +// Folding Rules: +// +// The folding mechanism is built around the concept of a |FoldingRule|. A +// folding rule is a function that implements a method of simplifying an +// instruction. +// +// The inputs to a folding rule are: +// |inst| - the instruction to be simplified. +// |constants| - if an in-operands is an id of a constant, then the +// corresponding value in |constants| contains that +// constant value. Otherwise, the corresponding entry in +// |constants| is |nullptr|. +// +// A folding rule returns true if |inst| can be simplified using this rule. If +// the instruction can be simplified, then |inst| is changed to the simplified +// instruction. Otherwise, |inst| remains the same. +// +// See folding_rules.cpp for examples on how to write a folding rule. It is +// important to note that if |inst| can be folded to the result of an +// instruction that feed it, then |inst| should be changed to an OpCopyObject +// that copies that id. +// +// Be sure to add new folding rules to the table of folding rules in the +// constructor for FoldingRules. The new rule should be added to the list for +// every opcode that it applies to. Note that earlier rules in the list are +// given priority. That is, if an earlier rule is able to fold an instruction, +// the later rules will not be attempted. + +using FoldingRule = std::function& constants)>; + +class FoldingRules { + public: + FoldingRules(); + + const std::vector& GetRulesForOpcode(SpvOp opcode) { + auto it = rules_.find(opcode); + if (it != rules_.end()) { + return it->second; + } + return empty_vector_; + } + + private: + std::unordered_map> rules_; + std::vector empty_vector_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_UTIL_FOLDING_RULES_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp index 8855c416e0c6d14d3093fdbb71f78f25c12ae603..ef589b03f6ba05b7798e6825601569b5d7bb7898 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp @@ -13,37 +13,39 @@ // limitations under the License. #include "freeze_spec_constant_value_pass.h" +#include "ir_context.h" namespace spvtools { namespace opt { -Pass::Status FreezeSpecConstantValuePass::Process(ir::Module* module) { +Pass::Status FreezeSpecConstantValuePass::Process(ir::IRContext* irContext) { bool modified = false; - module->ForEachInst([&modified](ir::Instruction* inst) { - switch (inst->opcode()) { - case SpvOp::SpvOpSpecConstant: - inst->SetOpcode(SpvOp::SpvOpConstant); - modified = true; - break; - case SpvOp::SpvOpSpecConstantTrue: - inst->SetOpcode(SpvOp::SpvOpConstantTrue); - modified = true; - break; - case SpvOp::SpvOpSpecConstantFalse: - inst->SetOpcode(SpvOp::SpvOpConstantFalse); - modified = true; - break; - case SpvOp::SpvOpDecorate: - if (inst->GetSingleWordInOperand(1) == - SpvDecoration::SpvDecorationSpecId) { - inst->ToNop(); - modified = true; + irContext->module()->ForEachInst( + [&modified, irContext](ir::Instruction* inst) { + switch (inst->opcode()) { + case SpvOp::SpvOpSpecConstant: + inst->SetOpcode(SpvOp::SpvOpConstant); + modified = true; + break; + case SpvOp::SpvOpSpecConstantTrue: + inst->SetOpcode(SpvOp::SpvOpConstantTrue); + modified = true; + break; + case SpvOp::SpvOpSpecConstantFalse: + inst->SetOpcode(SpvOp::SpvOpConstantFalse); + modified = true; + break; + case SpvOp::SpvOpDecorate: + if (inst->GetSingleWordInOperand(1) == + SpvDecoration::SpvDecorationSpecId) { + irContext->KillInst(inst); + modified = true; + } + break; + default: + break; } - break; - default: - break; - } - }); + }); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.h index a04ff03eac39dc95d5aef71959be710d20998892..fc7f44e70f99bde0298112fc42c72dca0ac7870a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_ #define LIBSPIRV_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class FreezeSpecConstantValuePass : public Pass { public: const char* name() const override { return "freeze-spec-const"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.cpp index 4ad2dce94961e5e24d39a945b35b0ac0760ea285..5a648eb11a4842db2dd3007b6b2e6670c40be2e8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.cpp @@ -14,32 +14,31 @@ #include "function.h" -#include "make_unique.h" +#include +#include namespace spvtools { namespace ir { -Function::Function(const Function& f) - : module_(nullptr), - def_inst_(MakeUnique(f.DefInst())), - params_(), - blocks_(), - end_inst_() { - params_.reserve(f.params_.size()); - f.ForEachParam( - [this](const Instruction* insn) { - AddParameter(MakeUnique(*insn)); +Function* Function::Clone(IRContext* ctx) const { + Function* clone = + new Function(std::unique_ptr(DefInst().Clone(ctx))); + clone->params_.reserve(params_.size()); + ForEachParam( + [clone, ctx](const Instruction* inst) { + clone->AddParameter(std::unique_ptr(inst->Clone(ctx))); }, true); - blocks_.reserve(f.blocks_.size()); - for (const auto& b : f.blocks_) { - std::unique_ptr bb = MakeUnique(*b); - bb->SetParent(this); - AddBasicBlock(std::move(bb)); + clone->blocks_.reserve(blocks_.size()); + for (const auto& b : blocks_) { + std::unique_ptr bb(b->Clone(ctx)); + bb->SetParent(clone); + clone->AddBasicBlock(std::move(bb)); } - SetFunctionEnd(MakeUnique(f.function_end())); + clone->SetFunctionEnd(std::unique_ptr(EndInst()->Clone(ctx))); + return clone; } void Function::ForEachInst(const std::function& f, @@ -76,5 +75,35 @@ void Function::ForEachParam(const std::function& f, ->ForEachInst(f, run_on_debug_line_insts); } +BasicBlock* Function::InsertBasicBlockAfter( + std::unique_ptr&& new_block, BasicBlock* position) { + for (auto bb_iter = begin(); bb_iter != end(); ++bb_iter) { + if (&*bb_iter == position) { + new_block->SetParent(this); + ++bb_iter; + bb_iter = bb_iter.InsertBefore(std::move(new_block)); + return &*bb_iter; + } + } + assert(false && "Could not find insertion point."); + return nullptr; +} + +std::ostream& operator<<(std::ostream& str, const Function& func) { + str << func.PrettyPrint(); + return str; +} + +std::string Function::PrettyPrint(uint32_t options) const { + std::ostringstream str; + ForEachInst([&str, options](const ir::Instruction* inst) { + str << inst->PrettyPrint(options); + if (inst->opcode() != SpvOpFunctionEnd) { + str << std::endl; + } + }); + return str.str(); +} + } // namespace ir } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.h index a67c329916ec37222472775e8ad1292f4c7cc352..c4d4c613af7df9e35782192839db4b7a9d059798 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/function.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_CONSTRUCTS_H_ #define LIBSPIRV_OPT_CONSTRUCTS_H_ +#include #include #include #include @@ -27,6 +28,8 @@ namespace spvtools { namespace ir { +class CFG; +class IRContext; class Module; // A SPIR-V function. @@ -38,35 +41,41 @@ class Function { // Creates a function instance declared by the given OpFunction instruction // |def_inst|. inline explicit Function(std::unique_ptr def_inst); - // Creates a function instance based on the given function |f|. + + explicit Function(const Function& f) = delete; + + // Creates a clone of the instruction in the given |context| // // The parent module will default to null and needs to be explicitly set by // the user. - explicit Function(const Function& f); + Function* Clone(IRContext*) const; // The OpFunction instruction that begins the definition of this function. Instruction& DefInst() { return *def_inst_; } const Instruction& DefInst() const { return *def_inst_; } // Sets the enclosing module for this function. void SetParent(Module* module) { module_ = module; } + // Gets the enclosing module for this function + Module* GetParent() const { return module_; } // Appends a parameter to this function. inline void AddParameter(std::unique_ptr p); // Appends a basic block to this function. inline void AddBasicBlock(std::unique_ptr b); + // Appends a basic block to this function at the position |ip|. + inline void AddBasicBlock(std::unique_ptr b, iterator ip); + template + inline void AddBasicBlocks(T begin, T end, iterator ip); // Saves the given function end instruction. inline void SetFunctionEnd(std::unique_ptr end_inst); // Returns the given function end instruction. - inline Instruction* function_end() { return end_inst_.get(); } - inline const Instruction& function_end() const { return *end_inst_; } + inline Instruction* EndInst() { return end_inst_.get(); } + inline const Instruction* EndInst() const { return end_inst_.get(); } // Returns function's id inline uint32_t result_id() const { return def_inst_->result_id(); } -// // Returns function's type id -// inline uint32_t type_id() const { return def_inst_->GetSingleWordInOperand(1u); } - // Returns function's return type id inline uint32_t type_id() const { return def_inst_->type_id(); } @@ -75,6 +84,8 @@ class Function { iterator begin() { return iterator(&blocks_, blocks_.begin()); } iterator end() { return iterator(&blocks_, blocks_.end()); } + const_iterator begin() const { return cbegin(); } + const_iterator end() const { return cend(); } const_iterator cbegin() const { return const_iterator(&blocks_, blocks_.cbegin()); } @@ -82,6 +93,13 @@ class Function { return const_iterator(&blocks_, blocks_.cend()); } + // Returns an iterator to the basic block |id|. + iterator FindBlock(uint32_t bb_id) { + return std::find_if(begin(), end(), [bb_id](const ir::BasicBlock& it_bb) { + return bb_id == it_bb.id(); + }); + } + // Runs the given function |f| on each instruction in this function, and // optionally on debug line instructions that might precede them. void ForEachInst(const std::function& f, @@ -94,6 +112,18 @@ class Function { void ForEachParam(const std::function& f, bool run_on_debug_line_insts = false) const; + // Returns the context of the current function. + IRContext* context() const { return def_inst_->context(); } + + BasicBlock* InsertBasicBlockAfter(std::unique_ptr&& new_block, + BasicBlock* position); + + // Pretty-prints all the basic blocks in this function into a std::string. + // + // |options| are the disassembly options. SPV_BINARY_TO_TEXT_OPTION_NO_HEADER + // is always added to |options|. + std::string PrettyPrint(uint32_t options = 0u) const; + private: // The enclosing module. Module* module_; @@ -107,6 +137,9 @@ class Function { std::unique_ptr end_inst_; }; +// Pretty-prints |func| to |str|. Returns |str|. +std::ostream& operator<<(std::ostream& str, const Function& func); + inline Function::Function(std::unique_ptr def_inst) : module_(nullptr), def_inst_(std::move(def_inst)), end_inst_() {} @@ -115,7 +148,18 @@ inline void Function::AddParameter(std::unique_ptr p) { } inline void Function::AddBasicBlock(std::unique_ptr b) { - blocks_.emplace_back(std::move(b)); + AddBasicBlock(std::move(b), end()); +} + +inline void Function::AddBasicBlock(std::unique_ptr b, + iterator ip) { + ip.InsertBefore(std::move(b)); +} + +template +inline void Function::AddBasicBlocks(T src_begin, T src_end, iterator ip) { + blocks_.insert(ip.Get(), std::make_move_iterator(src_begin), + std::make_move_iterator(src_end)); } inline void Function::SetFunctionEnd(std::unique_ptr end_inst) { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3404132994729dbc8b88cadbe0833941670fd790 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.cpp @@ -0,0 +1,187 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "if_conversion.h" + +namespace spvtools { +namespace opt { + +Pass::Status IfConversion::Process(ir::IRContext* c) { + InitializeProcessing(c); + + bool modified = false; + std::vector to_kill; + for (auto& func : *get_module()) { + DominatorAnalysis* dominators = context()->GetDominatorAnalysis(&func); + for (auto& block : func) { + // Check if it is possible for |block| to have phis that can be + // transformed. + ir::BasicBlock* common = nullptr; + if (!CheckBlock(&block, dominators, &common)) continue; + + // Get an insertion point. + auto iter = block.begin(); + while (iter != block.end() && iter->opcode() == SpvOpPhi) { + ++iter; + } + + InstructionBuilder builder( + context(), &*iter, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + block.ForEachPhiInst([this, &builder, &modified, &common, &to_kill, + dominators, &block](ir::Instruction* phi) { + // This phi is not compatible, but subsequent phis might be. + if (!CheckType(phi->type_id())) return; + + // We cannot transform cases where the phi is used by another phi in the + // same block due to instruction ordering restrictions. + // TODO(alan-baker): If all inappropriate uses could also be + // transformed, we could still remove this phi. + if (!CheckPhiUsers(phi, &block)) return; + + // Identify the incoming values associated with the true and false + // branches. If |then_block| dominates |inc0| or if the true edge + // branches straight to this block and |common| is |inc0|, then |inc0| + // is on the true branch. Otherwise the |inc1| is on the true branch. + ir::BasicBlock* inc0 = GetIncomingBlock(phi, 0u); + ir::Instruction* branch = common->terminator(); + uint32_t condition = branch->GetSingleWordInOperand(0u); + ir::BasicBlock* then_block = + GetBlock(branch->GetSingleWordInOperand(1u)); + ir::Instruction* true_value = nullptr; + ir::Instruction* false_value = nullptr; + if ((then_block == &block && inc0 == common) || + dominators->Dominates(then_block, inc0)) { + true_value = GetIncomingValue(phi, 0u); + false_value = GetIncomingValue(phi, 1u); + } else { + true_value = GetIncomingValue(phi, 1u); + false_value = GetIncomingValue(phi, 0u); + } + + // If either incoming value is defined in a block that does not dominate + // this phi, then we cannot eliminate the phi with a select. + // TODO(alan-baker): Perform code motion where it makes sense to enable + // the transform in this case. + ir::BasicBlock* true_def_block = context()->get_instr_block(true_value); + if (true_def_block && !dominators->Dominates(true_def_block, &block)) + return; + + ir::BasicBlock* false_def_block = + context()->get_instr_block(false_value); + if (false_def_block && !dominators->Dominates(false_def_block, &block)) + return; + + analysis::Type* data_ty = + context()->get_type_mgr()->GetType(true_value->type_id()); + if (analysis::Vector* vec_data_ty = data_ty->AsVector()) { + condition = SplatCondition(vec_data_ty, condition, &builder); + } + + ir::Instruction* select = builder.AddSelect(phi->type_id(), condition, + true_value->result_id(), + false_value->result_id()); + context()->ReplaceAllUsesWith(phi->result_id(), select->result_id()); + to_kill.push_back(phi); + modified = true; + + return; + }); + } + } + + for (auto inst : to_kill) { + context()->KillInst(inst); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +bool IfConversion::CheckBlock(ir::BasicBlock* block, + DominatorAnalysis* dominators, + ir::BasicBlock** common) { + const std::vector& preds = cfg()->preds(block->id()); + + // TODO(alan-baker): Extend to more than two predecessors + if (preds.size() != 2) return false; + + ir::BasicBlock* inc0 = context()->get_instr_block(preds[0]); + if (dominators->Dominates(block, inc0)) return false; + + ir::BasicBlock* inc1 = context()->get_instr_block(preds[1]); + if (dominators->Dominates(block, inc1)) return false; + + // All phis will have the same common dominator, so cache the result + // for this block. If there is no common dominator, then we cannot transform + // any phi in this basic block. + *common = dominators->CommonDominator(inc0, inc1); + if (!*common || cfg()->IsPseudoEntryBlock(*common)) return false; + ir::Instruction* branch = (*common)->terminator(); + if (branch->opcode() != SpvOpBranchConditional) return false; + + return true; +} + +bool IfConversion::CheckPhiUsers(ir::Instruction* phi, ir::BasicBlock* block) { + return get_def_use_mgr()->WhileEachUser(phi, [block, + this](ir::Instruction* user) { + if (user->opcode() == SpvOpPhi && context()->get_instr_block(user) == block) + return false; + return true; + }); +} + +uint32_t IfConversion::SplatCondition(analysis::Vector* vec_data_ty, + uint32_t cond, + InstructionBuilder* builder) { + // If the data inputs to OpSelect are vectors, the condition for + // OpSelect must be a boolean vector with the same number of + // components. So splat the condition for the branch into a vector + // type. + analysis::Bool bool_ty; + analysis::Vector bool_vec_ty(&bool_ty, vec_data_ty->element_count()); + uint32_t bool_vec_id = + context()->get_type_mgr()->GetTypeInstruction(&bool_vec_ty); + std::vector ids(vec_data_ty->element_count(), cond); + return builder->AddCompositeConstruct(bool_vec_id, ids)->result_id(); +} + +bool IfConversion::CheckType(uint32_t id) { + ir::Instruction* type = get_def_use_mgr()->GetDef(id); + SpvOp op = type->opcode(); + if (spvOpcodeIsScalarType(op) || op == SpvOpTypePointer || + op == SpvOpTypeVector) + return true; + return false; +} + +ir::BasicBlock* IfConversion::GetBlock(uint32_t id) { + return context()->get_instr_block(get_def_use_mgr()->GetDef(id)); +} + +ir::BasicBlock* IfConversion::GetIncomingBlock(ir::Instruction* phi, + uint32_t predecessor) { + uint32_t in_index = 2 * predecessor + 1; + return GetBlock(phi->GetSingleWordInOperand(in_index)); +} + +ir::Instruction* IfConversion::GetIncomingValue(ir::Instruction* phi, + uint32_t predecessor) { + uint32_t in_index = 2 * predecessor; + return get_def_use_mgr()->GetDef(phi->GetSingleWordInOperand(in_index)); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.h new file mode 100644 index 0000000000000000000000000000000000000000..eb97406d48fda42329c3bfbb997b02f6f87d5409 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/if_conversion.h @@ -0,0 +1,76 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_IF_CONVERSION_H_ +#define LIBSPIRV_OPT_IF_CONVERSION_H_ + +#include "basic_block.h" +#include "ir_builder.h" +#include "pass.h" +#include "types.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class IfConversion : public Pass { + public: + const char* name() const override { return "if-conversion"; } + Status Process(ir::IRContext* context) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisCFG | ir::IRContext::kAnalysisNameMap; + } + + private: + // Returns true if |id| is a valid type for use with OpSelect. OpSelect only + // allows scalars, vectors and pointers as valid inputs. + bool CheckType(uint32_t id); + + // Returns the basic block containing |id|. + ir::BasicBlock* GetBlock(uint32_t id); + + // Returns the basic block for the |predecessor|'th index predecessor of + // |phi|. + ir::BasicBlock* GetIncomingBlock(ir::Instruction* phi, uint32_t predecessor); + + // Returns the instruction defining the |predecessor|'th index of |phi|. + ir::Instruction* GetIncomingValue(ir::Instruction* phi, uint32_t predecessor); + + // Returns the id of a OpCompositeConstruct boolean vector. The composite has + // the same number of elements as |vec_data_ty| and each member is |cond|. + // |where| indicates the location in |block| to insert the composite + // construct. If necessary, this function will also construct the necessary + // type instructions for the boolean vector. + uint32_t SplatCondition(analysis::Vector* vec_data_ty, uint32_t cond, + InstructionBuilder* builder); + + // Returns true if none of |phi|'s users are in |block|. + bool CheckPhiUsers(ir::Instruction* phi, ir::BasicBlock* block); + + // Returns |false| if |block| is not appropriate to transform. Only + // transforms blocks with two predecessors. Neither incoming block can be + // dominated by |block|. Both predecessors must share a common dominator that + // is terminated by a conditional branch. + bool CheckBlock(ir::BasicBlock* block, DominatorAnalysis* dominators, + ir::BasicBlock** common); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_IF_CONVERSION_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.cpp index 7ef5c82e52cf6a54dab6713e9d559b150ca28fde..a5bc9f3582bb7801d4d0b025fea960532a41a54a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.cpp @@ -31,13 +31,23 @@ bool InlineExhaustivePass::InlineExhaustive(ir::Function* func) { GenInlineCode(&newBlocks, &newVars, ii, bi); // If call block is replaced with more than one block, point // succeeding phis at new last block. - if (newBlocks.size() > 1) - UpdateSucceedingPhis(newBlocks); + if (newBlocks.size() > 1) UpdateSucceedingPhis(newBlocks); // Replace old calling block with new block(s). + + // We need to kill the name and decorations for the call, which + // will be deleted. Other instructions in the block will be moved to + // newBlocks. We don't need to do anything with those. + context()->KillNamesAndDecorates(&*ii); + bi = bi.Erase(); + + for (auto& bb : newBlocks) { + bb->SetParent(func); + } bi = bi.InsertBefore(&newBlocks); // Insert new function variables. - if (newVars.size() > 0) func->begin()->begin().InsertBefore(std::move(newVars)); + if (newVars.size() > 0) + func->begin()->begin().InsertBefore(std::move(newVars)); // Restart inlining at beginning of calling block. ii = bi->begin(); modified = true; @@ -49,24 +59,21 @@ bool InlineExhaustivePass::InlineExhaustive(ir::Function* func) { return modified; } -void InlineExhaustivePass::Initialize(ir::Module* module) { - InitializeInline(module); -}; +void InlineExhaustivePass::Initialize(ir::IRContext* c) { InitializeInline(c); } Pass::Status InlineExhaustivePass::ProcessImpl() { // Attempt exhaustive inlining on each entry point function in module ProcessFunction pfn = [this](ir::Function* fp) { return InlineExhaustive(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(module_); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } InlineExhaustivePass::InlineExhaustivePass() {} -Pass::Status InlineExhaustivePass::Process(ir::Module* module) { - Initialize(module); +Pass::Status InlineExhaustivePass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.h index e4773d81c8d56e658945dfb6642d4515ac7b2fd8..08b4387b5fba2ef352091a94f0cca629cada8217 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_exhaustive_pass.h @@ -20,22 +20,21 @@ #include #include #include -#include #include +#include #include "def_use_manager.h" -#include "module.h" #include "inline_pass.h" +#include "module.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. class InlineExhaustivePass : public InlinePass { - public: InlineExhaustivePass(); - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; const char* name() const override { return "inline-entry-points-exhaustive"; } @@ -44,7 +43,7 @@ class InlineExhaustivePass : public InlinePass { // all code that is inlined into func. Return true if func is modified. bool InlineExhaustive(ir::Function* func); - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.cpp index 8ab5645fa60fc00aaf35bfd29b6478dd7c80e671..13880502e6f7fa6558629f32a3c8cc9b8e1988a5 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.cpp @@ -21,50 +21,45 @@ namespace opt { namespace { - const uint32_t kTypePointerTypeIdInIdx = 1; +const uint32_t kTypePointerTypeIdInIdx = 1; -} // anonymous namespace +} // anonymous namespace bool InlineOpaquePass::IsOpaqueType(uint32_t typeId) { - const ir::Instruction* typeInst = def_use_mgr_->GetDef(typeId); + const ir::Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); switch (typeInst->opcode()) { case SpvOpTypeSampler: case SpvOpTypeImage: case SpvOpTypeSampledImage: return true; case SpvOpTypePointer: - return IsOpaqueType(typeInst->GetSingleWordInOperand( - kTypePointerTypeIdInIdx)); + return IsOpaqueType( + typeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx)); default: break; } // TODO(greg-lunarg): Handle arrays containing opaque type - if (typeInst->opcode() != SpvOpTypeStruct) - return false; + if (typeInst->opcode() != SpvOpTypeStruct) return false; // Return true if any member is opaque - int ocnt = 0; - typeInst->ForEachInId([&ocnt,this](const uint32_t* tid) { - if (ocnt == 0 && IsOpaqueType(*tid)) ++ocnt; + return !typeInst->WhileEachInId([this](const uint32_t* tid) { + if (IsOpaqueType(*tid)) return false; + return true; }); - return ocnt > 0; } bool InlineOpaquePass::HasOpaqueArgsOrReturn(const ir::Instruction* callInst) { // Check return type - if (IsOpaqueType(callInst->type_id())) - return true; + if (IsOpaqueType(callInst->type_id())) return true; // Check args int icnt = 0; - int ocnt = 0; - callInst->ForEachInId([&icnt,&ocnt,this](const uint32_t *iid) { + return !callInst->WhileEachInId([&icnt, this](const uint32_t* iid) { if (icnt > 0) { - const ir::Instruction* argInst = def_use_mgr_->GetDef(*iid); - if (IsOpaqueType(argInst->type_id())) - ++ocnt; + const ir::Instruction* argInst = get_def_use_mgr()->GetDef(*iid); + if (IsOpaqueType(argInst->type_id())) return false; } ++icnt; + return true; }); - return ocnt > 0; } bool InlineOpaquePass::InlineOpaque(ir::Function* func) { @@ -79,13 +74,13 @@ bool InlineOpaquePass::InlineOpaque(ir::Function* func) { GenInlineCode(&newBlocks, &newVars, ii, bi); // If call block is replaced with more than one block, point // succeeding phis at new last block. - if (newBlocks.size() > 1) - UpdateSucceedingPhis(newBlocks); + if (newBlocks.size() > 1) UpdateSucceedingPhis(newBlocks); // Replace old calling block with new block(s). bi = bi.Erase(); bi = bi.InsertBefore(&newBlocks); // Insert new function variables. - if (newVars.size() > 0) func->begin()->begin().InsertBefore(std::move(newVars)); + if (newVars.size() > 0) + func->begin()->begin().InsertBefore(std::move(newVars)); // Restart inlining at beginning of calling block. ii = bi->begin(); modified = true; @@ -97,24 +92,19 @@ bool InlineOpaquePass::InlineOpaque(ir::Function* func) { return modified; } -void InlineOpaquePass::Initialize(ir::Module* module) { - InitializeInline(module); -}; +void InlineOpaquePass::Initialize(ir::IRContext* c) { InitializeInline(c); } Pass::Status InlineOpaquePass::ProcessImpl() { // Do opaque inlining on each function in entry point call tree - ProcessFunction pfn = [this](ir::Function* fp) { - return InlineOpaque(fp); - }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(module_); + ProcessFunction pfn = [this](ir::Function* fp) { return InlineOpaque(fp); }; + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } InlineOpaquePass::InlineOpaquePass() {} -Pass::Status InlineOpaquePass::Process(ir::Module* module) { - Initialize(module); +Pass::Status InlineOpaquePass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.h index e166617aa80b594a27674f53a144547938696f33..0a6cf0ecb7acbc31fe3b683b0b9ca22df088ba2b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_opaque_pass.h @@ -20,22 +20,21 @@ #include #include #include -#include #include +#include #include "def_use_manager.h" -#include "module.h" #include "inline_pass.h" +#include "module.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. class InlineOpaquePass : public InlinePass { - public: InlineOpaquePass(); - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; const char* name() const override { return "inline-entry-points-opaque"; } @@ -51,7 +50,7 @@ class InlineOpaquePass : public InlinePass { // if func is modified. bool InlineOpaque(ir::Function* func); - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.cpp index 926c980deeeb6f1b33158de57b81e5fdc8ea0580..61c734329e61df7258f591da474b08364ab76427 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.cpp @@ -23,63 +23,53 @@ static const int kSpvFunctionCallFunctionId = 2; static const int kSpvFunctionCallArgumentId = 3; static const int kSpvReturnValueId = 0; -static const int kSpvTypePointerStorageClass = 1; -static const int kSpvTypePointerTypeId = 2; static const int kSpvLoopMergeMergeBlockId = 0; static const int kSpvLoopMergeContinueTargetIdInIdx = 1; -static const int kSpvSelectionMergeMergeBlockId = 0; namespace spvtools { namespace opt { -uint32_t InlinePass::FindPointerToType(uint32_t type_id, - SpvStorageClass storage_class) { - ir::Module::inst_iterator type_itr = module_->types_values_begin(); - for (; type_itr != module_->types_values_end(); ++type_itr) { - const ir::Instruction* type_inst = &*type_itr; - if (type_inst->opcode() == SpvOpTypePointer && - type_inst->GetSingleWordOperand(kSpvTypePointerTypeId) == type_id && - type_inst->GetSingleWordOperand(kSpvTypePointerStorageClass) == - storage_class) - return type_inst->result_id(); - } - return 0; -} - uint32_t InlinePass::AddPointerToType(uint32_t type_id, SpvStorageClass storage_class) { uint32_t resultId = TakeNextId(); std::unique_ptr type_inst(new ir::Instruction( - SpvOpTypePointer, 0, resultId, + context(), SpvOpTypePointer, 0, resultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, {uint32_t(storage_class)}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {type_id}}})); - module_->AddType(std::move(type_inst)); + context()->AddType(std::move(type_inst)); + analysis::Type* pointeeTy; + std::unique_ptr pointerTy; + std::tie(pointeeTy, pointerTy) = + context()->get_type_mgr()->GetTypeAndPointerType(type_id, + SpvStorageClassFunction); + context()->get_type_mgr()->RegisterType(resultId, *pointerTy); return resultId; } void InlinePass::AddBranch(uint32_t label_id, - std::unique_ptr* block_ptr) { + std::unique_ptr* block_ptr) { std::unique_ptr newBranch(new ir::Instruction( - SpvOpBranch, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {label_id}}})); + context(), SpvOpBranch, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {label_id}}})); (*block_ptr)->AddInstruction(std::move(newBranch)); } void InlinePass::AddBranchCond(uint32_t cond_id, uint32_t true_id, - uint32_t false_id, std::unique_ptr* block_ptr) { + uint32_t false_id, + std::unique_ptr* block_ptr) { std::unique_ptr newBranch(new ir::Instruction( - SpvOpBranchConditional, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cond_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {true_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {false_id}}})); + context(), SpvOpBranchConditional, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cond_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {true_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {false_id}}})); (*block_ptr)->AddInstruction(std::move(newBranch)); } void InlinePass::AddLoopMerge(uint32_t merge_id, uint32_t continue_id, - std::unique_ptr* block_ptr) { + std::unique_ptr* block_ptr) { std::unique_ptr newLoopMerge(new ir::Instruction( - SpvOpLoopMerge, 0, 0, + context(), SpvOpLoopMerge, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {merge_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {continue_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LOOP_CONTROL, {0}}})); @@ -89,44 +79,42 @@ void InlinePass::AddLoopMerge(uint32_t merge_id, uint32_t continue_id, void InlinePass::AddStore(uint32_t ptr_id, uint32_t val_id, std::unique_ptr* block_ptr) { std::unique_ptr newStore(new ir::Instruction( - SpvOpStore, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {val_id}}})); + context(), SpvOpStore, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {val_id}}})); (*block_ptr)->AddInstruction(std::move(newStore)); } void InlinePass::AddLoad(uint32_t type_id, uint32_t resultId, uint32_t ptr_id, std::unique_ptr* block_ptr) { std::unique_ptr newLoad(new ir::Instruction( - SpvOpLoad, type_id, resultId, + context(), SpvOpLoad, type_id, resultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}})); (*block_ptr)->AddInstruction(std::move(newLoad)); } std::unique_ptr InlinePass::NewLabel(uint32_t label_id) { std::unique_ptr newLabel( - new ir::Instruction(SpvOpLabel, 0, label_id, {})); + new ir::Instruction(context(), SpvOpLabel, 0, label_id, {})); return newLabel; } uint32_t InlinePass::GetFalseId() { - if (false_id_ != 0) - return false_id_; - false_id_ = module_->GetGlobalValue(SpvOpConstantFalse); - if (false_id_ != 0) - return false_id_; - uint32_t boolId = module_->GetGlobalValue(SpvOpTypeBool); + if (false_id_ != 0) return false_id_; + false_id_ = get_module()->GetGlobalValue(SpvOpConstantFalse); + if (false_id_ != 0) return false_id_; + uint32_t boolId = get_module()->GetGlobalValue(SpvOpTypeBool); if (boolId == 0) { boolId = TakeNextId(); - module_->AddGlobalValue(SpvOpTypeBool, boolId, 0); + get_module()->AddGlobalValue(SpvOpTypeBool, boolId, 0); } false_id_ = TakeNextId(); - module_->AddGlobalValue(SpvOpConstantFalse, false_id_, boolId); + get_module()->AddGlobalValue(SpvOpConstantFalse, false_id_, boolId); return false_id_; } void InlinePass::MapParams( - ir::Function* calleeFn, - ir::BasicBlock::iterator call_inst_itr, + ir::Function* calleeFn, ir::BasicBlock::iterator call_inst_itr, std::unordered_map* callee2caller) { int param_idx = 0; calleeFn->ForEachParam( @@ -145,8 +133,10 @@ void InlinePass::CloneAndMapLocals( auto callee_block_itr = calleeFn->begin(); auto callee_var_itr = callee_block_itr->begin(); while (callee_var_itr->opcode() == SpvOp::SpvOpVariable) { - std::unique_ptr var_inst(callee_var_itr->Clone()); + std::unique_ptr var_inst( + callee_var_itr->Clone(callee_var_itr->context())); uint32_t newId = TakeNextId(); + get_decoration_mgr()->CloneDecorations(callee_var_itr->result_id(), newId); var_inst->SetResultId(newId); (*callee2caller)[callee_var_itr->result_id()] = newId; new_vars->push_back(std::move(var_inst)); @@ -159,22 +149,22 @@ uint32_t InlinePass::CreateReturnVar( std::vector>* new_vars) { uint32_t returnVarId = 0; const uint32_t calleeTypeId = calleeFn->type_id(); - const ir::Instruction* calleeType = - def_use_mgr_->id_to_defs().find(calleeTypeId)->second; - if (calleeType->opcode() != SpvOpTypeVoid) { + analysis::Type* calleeType = context()->get_type_mgr()->GetType(calleeTypeId); + if (calleeType->AsVoid() == nullptr) { // Find or create ptr to callee return type. - uint32_t returnVarTypeId = - FindPointerToType(calleeTypeId, SpvStorageClassFunction); + uint32_t returnVarTypeId = context()->get_type_mgr()->FindPointerToType( + calleeTypeId, SpvStorageClassFunction); if (returnVarTypeId == 0) returnVarTypeId = AddPointerToType(calleeTypeId, SpvStorageClassFunction); // Add return var to new function scope variables. returnVarId = TakeNextId(); std::unique_ptr var_inst(new ir::Instruction( - SpvOpVariable, returnVarTypeId, returnVarId, + context(), SpvOpVariable, returnVarTypeId, returnVarId, {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); new_vars->push_back(std::move(var_inst)); } + get_decoration_mgr()->CloneDecorations(calleeFn->result_id(), returnVarId); return returnVarId; } @@ -187,18 +177,20 @@ void InlinePass::CloneSameBlockOps( std::unordered_map* postCallSB, std::unordered_map* preCallSB, std::unique_ptr* block_ptr) { - (*inst) - ->ForEachInId([&postCallSB, &preCallSB, &block_ptr, this](uint32_t* iid) { + (*inst)->ForEachInId( + [&postCallSB, &preCallSB, &block_ptr, this](uint32_t* iid) { const auto mapItr = (*postCallSB).find(*iid); if (mapItr == (*postCallSB).end()) { const auto mapItr2 = (*preCallSB).find(*iid); if (mapItr2 != (*preCallSB).end()) { // Clone pre-call same-block ops, map result id. const ir::Instruction* inInst = mapItr2->second; - std::unique_ptr sb_inst(inInst->Clone()); + std::unique_ptr sb_inst( + inInst->Clone(inInst->context())); CloneSameBlockOps(&sb_inst, postCallSB, preCallSB, block_ptr); const uint32_t rid = sb_inst->result_id(); const uint32_t nid = this->TakeNextId(); + get_decoration_mgr()->CloneDecorations(rid, nid); sb_inst->SetResultId(nid); (*postCallSB)[rid] = nid; *iid = nid; @@ -224,6 +216,11 @@ void InlinePass::GenInlineCode( // Post-call same-block op ids std::unordered_map postCallSB; + // Invalidate the def-use chains. They are not kept up to date while + // inlining. However, certain calls try to keep them up-to-date if they are + // valid. These operations can fail. + context()->InvalidateAnalyses(ir::IRContext::kAnalysisDefUse); + ir::Function* calleeFn = id2function_[call_inst_itr->GetSingleWordOperand( kSpvFunctionCallFunctionId)]; @@ -243,11 +240,9 @@ void InlinePass::GenInlineCode( // Create set of callee result ids. Used to detect forward references std::unordered_set callee_result_ids; - calleeFn->ForEachInst([&callee_result_ids]( - const ir::Instruction* cpi) { + calleeFn->ForEachInst([&callee_result_ids](const ir::Instruction* cpi) { const uint32_t rid = cpi->result_id(); - if (rid != 0) - callee_result_ids.insert(rid); + if (rid != 0) callee_result_ids.insert(rid); }); // If the caller is in a single-block loop, and the callee has multiple @@ -325,8 +320,10 @@ void InlinePass::GenInlineCode( if (firstBlock) { // Copy contents of original caller block up to call instruction. for (auto cii = call_block_itr->begin(); cii != call_inst_itr; - ++cii) { - std::unique_ptr cp_inst(cii->Clone()); + cii = call_block_itr->begin()) { + ir::Instruction* inst = &*cii; + inst->RemoveFromList(); + std::unique_ptr cp_inst(inst); // Remember same-block ops for possible regeneration. if (IsSameBlockOp(&*cp_inst)) { auto* sb_inst_ptr = cp_inst.get(); @@ -334,8 +331,7 @@ void InlinePass::GenInlineCode( } new_blk_ptr->AddInstruction(std::move(cp_inst)); } - if (caller_is_loop_header && - callee_begins_with_structured_header) { + if (caller_is_loop_header && callee_begins_with_structured_header) { // We can't place both the caller's merge instruction and another // merge instruction in the same block. So split the calling block. // Insert an unconditional branch to a new guard block. Later, @@ -367,8 +363,8 @@ void InlinePass::GenInlineCode( singleTripLoopHeaderId = this->TakeNextId(); AddBranch(singleTripLoopHeaderId, &new_blk_ptr); new_blocks->push_back(std::move(new_blk_ptr)); - new_blk_ptr.reset(new ir::BasicBlock(NewLabel( - singleTripLoopHeaderId))); + new_blk_ptr.reset( + new ir::BasicBlock(NewLabel(singleTripLoopHeaderId))); returnLabelId = this->TakeNextId(); singleTripLoopContinueId = this->TakeNextId(); AddLoopMerge(returnLabelId, singleTripLoopContinueId, &new_blk_ptr); @@ -434,9 +430,10 @@ void InlinePass::GenInlineCode( AddLoad(calleeTypeId, resId, returnVarId, &new_blk_ptr); } // Copy remaining instructions from caller block. - auto cii = call_inst_itr; - for (++cii; cii != call_block_itr->end(); ++cii) { - std::unique_ptr cp_inst(cii->Clone()); + for (ir::Instruction* inst = call_inst_itr->NextNode(); inst; + inst = call_inst_itr->NextNode()) { + inst->RemoveFromList(); + std::unique_ptr cp_inst(inst); // If multiple blocks generated, regenerate any same-block // instruction that has not been seen in this last block. if (multiBlocks) { @@ -454,7 +451,7 @@ void InlinePass::GenInlineCode( } break; default: { // Copy callee instruction and remap all input Ids. - std::unique_ptr cp_inst(cpi->Clone()); + std::unique_ptr cp_inst(cpi->Clone(context())); cp_inst->ForEachInId([&callee2caller, &callee_result_ids, this](uint32_t* iid) { const auto mapItr = callee2caller.find(*iid); @@ -476,12 +473,12 @@ void InlinePass::GenInlineCode( uint32_t nid; if (mapItr != callee2caller.end()) { nid = mapItr->second; - } - else { + } else { nid = this->TakeNextId(); callee2caller[rid] = nid; } cp_inst->SetResultId(nid); + get_decoration_mgr()->CloneDecorations(rid, nid); } new_blk_ptr->AddInstruction(std::move(cp_inst)); } break; @@ -499,7 +496,7 @@ void InlinePass::GenInlineCode( auto loop_merge_itr = last->tail(); --loop_merge_itr; assert(loop_merge_itr->opcode() == SpvOpLoopMerge); - std::unique_ptr cp_inst(loop_merge_itr->Clone()); + std::unique_ptr cp_inst(loop_merge_itr->Clone(context())); if (caller_is_single_block_loop) { // Also, update its continue target to point to the last block. cp_inst->SetInOperand(kSpvLoopMergeContinueTargetIdInIdx, {last->id()}); @@ -531,8 +528,9 @@ void InlinePass::UpdateSucceedingPhis( const auto lastBlk = new_blocks.end() - 1; const uint32_t firstId = (*firstBlk)->id(); const uint32_t lastId = (*lastBlk)->id(); - (*lastBlk)->ForEachSuccessorLabel( - [&firstId, &lastId, this](uint32_t succ) { + const ir::BasicBlock& const_last_block = *lastBlk->get(); + const_last_block.ForEachSuccessorLabel( + [&firstId, &lastId, this](const uint32_t succ) { ir::BasicBlock* sbp = this->id2block_[succ]; sbp->ForEachPhiInst([&firstId, &lastId](ir::Instruction* phi) { phi->ForEachInId([&firstId, &lastId](uint32_t* id) { @@ -548,7 +546,7 @@ bool InlinePass::HasMultipleReturns(ir::Function* func) { for (auto& blk : *func) { auto terminal_ii = blk.cend(); --terminal_ii; - if (terminal_ii->opcode() == SpvOpReturn || + if (terminal_ii->opcode() == SpvOpReturn || terminal_ii->opcode() == SpvOpReturnValue) { if (seenReturn) { multipleReturns = true; @@ -560,28 +558,17 @@ bool InlinePass::HasMultipleReturns(ir::Function* func) { return multipleReturns; } -uint32_t InlinePass::MergeBlockIdIfAny(const ir::BasicBlock& blk) { - auto merge_ii = blk.cend(); - --merge_ii; - uint32_t mbid = 0; - if (merge_ii != blk.cbegin()) { - --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) - mbid = merge_ii->GetSingleWordOperand(kSpvLoopMergeMergeBlockId); - else if (merge_ii->opcode() == SpvOpSelectionMerge) - mbid = merge_ii->GetSingleWordOperand(kSpvSelectionMergeMergeBlockId); - } - return mbid; -} - void InlinePass::ComputeStructuredSuccessors(ir::Function* func) { // If header, make merge block first successor. for (auto& blk : *func) { - uint32_t mbid = MergeBlockIdIfAny(blk); - if (mbid != 0) + uint32_t mbid = blk.MergeBlockIdIfAny(); + if (mbid != 0) { block2structured_succs_[&blk].push_back(id2block_[mbid]); - // add true successors - blk.ForEachSuccessorLabel([&blk, this](uint32_t sbid) { + } + + // Add true successors. + const auto& const_blk = blk; + const_blk.ForEachSuccessorLabel([&blk, this](const uint32_t sbid) { block2structured_succs_[&blk].push_back(id2block_[sbid]); }); } @@ -596,7 +583,7 @@ InlinePass::GetBlocksFunction InlinePass::StructuredSuccessorsFunction() { bool InlinePass::HasNoReturnInLoop(ir::Function* func) { // If control not structured, do not do loop/return analysis // TODO: Analyze returns in non-structured control flow - if (!module_->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) return false; // Compute structured block order. This order has the property // that dominators are before all blocks they dominate and merge blocks @@ -606,32 +593,30 @@ bool InlinePass::HasNoReturnInLoop(ir::Function* func) { auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; std::list structuredOrder; spvtools::CFA::DepthFirstTraversal( - &*func->begin(), StructuredSuccessorsFunction(), ignore_block, - [&](cbb_ptr b) { structuredOrder.push_front(b); }, ignore_edge); + &*func->begin(), StructuredSuccessorsFunction(), ignore_block, + [&](cbb_ptr b) { structuredOrder.push_front(b); }, ignore_edge); // Search for returns in loops. Only need to track outermost loop bool return_in_loop = false; uint32_t outerLoopMergeId = 0; for (auto& blk : structuredOrder) { // Exiting current outer loop - if (blk->id() == outerLoopMergeId) - outerLoopMergeId = 0; + if (blk->id() == outerLoopMergeId) outerLoopMergeId = 0; // Return block auto terminal_ii = blk->cend(); --terminal_ii; - if (terminal_ii->opcode() == SpvOpReturn || + if (terminal_ii->opcode() == SpvOpReturn || terminal_ii->opcode() == SpvOpReturnValue) { if (outerLoopMergeId != 0) { return_in_loop = true; break; } - } - else if (terminal_ii != blk->cbegin()) { + } else if (terminal_ii != blk->cbegin()) { auto merge_ii = terminal_ii; --merge_ii; // Entering outermost loop if (merge_ii->opcode() == SpvOpLoopMerge && outerLoopMergeId == 0) - outerLoopMergeId = merge_ii->GetSingleWordOperand( - kSpvLoopMergeMergeBlockId); + outerLoopMergeId = + merge_ii->GetSingleWordOperand(kSpvLoopMergeMergeBlockId); } } return !return_in_loop; @@ -645,14 +630,12 @@ void InlinePass::AnalyzeReturns(ir::Function* func) { } multi_return_funcs_.insert(func->result_id()); // If multiple returns, see if any are in a loop - if (HasNoReturnInLoop(func)) - no_return_in_loop_.insert(func->result_id()); + if (HasNoReturnInLoop(func)) no_return_in_loop_.insert(func->result_id()); } bool InlinePass::IsInlinableFunction(ir::Function* func) { // We can only inline a function if it has blocks. - if (func->cbegin() == func->cend()) - return false; + if (func->cbegin() == func->cend()) return false; // Do not inline functions with returns in loops. Currently early return // functions are inlined by wrapping them in a one trip loop and implementing // the returns as a branch to the loop's merge block. However, this can only @@ -663,14 +646,8 @@ bool InlinePass::IsInlinableFunction(ir::Function* func) { no_return_in_loop_.cend(); } -void InlinePass::InitializeInline(ir::Module* module) { - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); - - // Initialize next unused Id. - next_id_ = module->id_bound(); - - // Save module. - module_ = module; +void InlinePass::InitializeInline(ir::IRContext* c) { + InitializeProcessing(c); false_id_ = 0; @@ -682,21 +659,18 @@ void InlinePass::InitializeInline(ir::Module* module) { no_return_in_loop_.clear(); multi_return_funcs_.clear(); - for (auto& fn : *module_) { + for (auto& fn : *get_module()) { // Initialize function and block maps. id2function_[fn.result_id()] = &fn; for (auto& blk : fn) { id2block_[blk.id()] = &blk; } // Compute inlinability - if (IsInlinableFunction(&fn)) - inlinable_.insert(fn.result_id()); + if (IsInlinableFunction(&fn)) inlinable_.insert(fn.result_id()); } -}; - +} -InlinePass::InlinePass() - : module_(nullptr), def_use_mgr_(nullptr), next_id_(0) {} +InlinePass::InlinePass() {} } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.h index 1e3869d5c716a1836639de5bb17deb51b813fcc5..dd2d0c7d0ef2cb958c84a6429343165c430963e9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/inline_pass.h @@ -18,12 +18,12 @@ #define LIBSPIRV_OPT_INLINE_PASS_H_ #include +#include #include #include #include -#include -#include "def_use_manager.h" +#include "decoration_manager.h" #include "module.h" #include "pass.h" @@ -32,28 +32,16 @@ namespace opt { // See optimizer.hpp for documentation. class InlinePass : public Pass { - using cbb_ptr = const ir::BasicBlock*; public: - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; + using GetBlocksFunction = + std::function*(const ir::BasicBlock*)>; InlinePass(); virtual ~InlinePass() = default; protected: - // Return the next available Id and increment it. - inline uint32_t TakeNextId() { return next_id_++; } - - // Write the next available Id back to the module. - inline void FinalizeNextId(ir::Module* module) { - module->SetIdBound(next_id_); - } - - // Find pointer to type and storage in module, return its resultId, - // 0 if not found. TODO(greg-lunarg): Move this into type manager. - uint32_t FindPointerToType(uint32_t type_id, SpvStorageClass storage_class); // Add pointer to type to module and return resultId. uint32_t AddPointerToType(uint32_t type_id, SpvStorageClass storage_class); @@ -62,8 +50,8 @@ class InlinePass : public Pass { void AddBranch(uint32_t labelId, std::unique_ptr* block_ptr); // Add conditional branch to end of block |block_ptr|. - void AddBranchCond(uint32_t cond_id, uint32_t true_id, - uint32_t false_id, std::unique_ptr* block_ptr); + void AddBranchCond(uint32_t cond_id, uint32_t true_id, uint32_t false_id, + std::unique_ptr* block_ptr); // Add unconditional branch to labelId to end of block block_ptr. void AddLoopMerge(uint32_t merge_id, uint32_t continue_id, @@ -85,8 +73,7 @@ class InlinePass : public Pass { uint32_t GetFalseId(); // Map callee params to caller args - void MapParams(ir::Function* calleeFn, - ir::BasicBlock::iterator call_inst_itr, + void MapParams(ir::Function* calleeFn, ir::BasicBlock::iterator call_inst_itr, std::unordered_map* callee2caller); // Clone and map callee locals @@ -137,19 +124,15 @@ class InlinePass : public Pass { // Return true if |inst| is a function call that can be inlined. bool IsInlinableFunctionCall(const ir::Instruction* inst); - // Returns the id of the merge block declared by a merge instruction in - // this block, if any. If none, returns zero. - uint32_t MergeBlockIdIfAny(const ir::BasicBlock& blk); - // Compute structured successors for function |func|. // A block's structured successors are the blocks it branches to // together with its declared merge block if it has one. // When order matters, the merge block always appears first. - // This assures correct depth first search in the presence of early + // This assures correct depth first search in the presence of early // returns and kills. If the successor vector contain duplicates // if the merge block, they are safely ignored by DFS. void ComputeStructuredSuccessors(ir::Function* func); - + // Return function to return ordered structure successors for a given block // Assumes ComputeStructuredSuccessors() has been called. GetBlocksFunction StructuredSuccessorsFunction(); @@ -173,18 +156,13 @@ class InlinePass : public Pass { std::vector>& new_blocks); // Initialize state for optimization of |module| - void InitializeInline(ir::Module* module); - - // Module being processed by this pass - ir::Module* module_; - - // Def/Use database - std::unique_ptr def_use_mgr_; + void InitializeInline(ir::IRContext* c); // Map from function's result id to function. std::unordered_map id2function_; - // Map from block's label id to block. + // Map from block's label id to block. TODO(dnovillo): This is superfluous wrt + // opt::CFG. It has functionality not present in opt::CFG. Consolidate. std::unordered_map id2block_; // Set of ids of functions with multiple returns. @@ -196,16 +174,15 @@ class InlinePass : public Pass { // Set of ids of inlinable functions std::set inlinable_; - // Map from block to its structured successor blocks. See - // ComputeStructuredSuccessors() for definition. - std::unordered_map> - block2structured_succs_; - // result id for OpConstantFalse uint32_t false_id_; - // Next unused ID - uint32_t next_id_; + // Map from block to its structured successor blocks. See + // ComputeStructuredSuccessors() for definition. TODO(dnovillo): This is + // superfluous wrt opt::CFG, but it seems to be computed in a slightly + // different way in the inliner. Can these be consolidated? + std::unordered_map> + block2structured_succs_; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.cpp index 4ccaac7fc50739e6e799329556295a228a2a9cbe..2d0d8a24b1bbdffe1ba0f6193820994f20c2b719 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.cpp @@ -16,104 +16,180 @@ #include "insert_extract_elim.h" +#include "composite.h" +#include "ir_context.h" #include "iterator.h" +#include "latest_version_glsl_std_450_header.h" + +#include namespace spvtools { namespace opt { namespace { +const uint32_t kConstantValueInIdx = 0; const uint32_t kExtractCompositeIdInIdx = 0; const uint32_t kInsertObjectIdInIdx = 0; const uint32_t kInsertCompositeIdInIdx = 1; - -} // anonymous namespace - -bool InsertExtractElimPass::ExtInsMatch(const ir::Instruction* extInst, - const ir::Instruction* insInst) const { - if (extInst->NumInOperands() != insInst->NumInOperands() - 1) - return false; - uint32_t numIdx = extInst->NumInOperands() - 1; - for (uint32_t i = 0; i < numIdx; ++i) - if (extInst->GetSingleWordInOperand(i + 1) != - insInst->GetSingleWordInOperand(i + 2)) - return false; - return true; -} - -bool InsertExtractElimPass::ExtInsConflict(const ir::Instruction* extInst, - const ir::Instruction* insInst) const { - if (extInst->NumInOperands() == insInst->NumInOperands() - 1) - return false; - uint32_t extNumIdx = extInst->NumInOperands() - 1; - uint32_t insNumIdx = insInst->NumInOperands() - 2; - uint32_t numIdx = std::min(extNumIdx, insNumIdx); - for (uint32_t i = 0; i < numIdx; ++i) - if (extInst->GetSingleWordInOperand(i + 1) != - insInst->GetSingleWordInOperand(i + 2)) - return false; - return true; -} - -bool InsertExtractElimPass::IsVectorType(uint32_t typeId) { - ir::Instruction* typeInst = def_use_mgr_->GetDef(typeId); - return typeInst->opcode() == SpvOpTypeVector; +const uint32_t kVectorShuffleVec1IdInIdx = 0; +const uint32_t kVectorShuffleVec2IdInIdx = 1; +const uint32_t kVectorShuffleCompsInIdx = 2; +const uint32_t kTypeVectorCompTypeIdInIdx = 0; +const uint32_t kTypeVectorLengthInIdx = 1; +const uint32_t kTypeFloatWidthInIdx = 0; +const uint32_t kExtInstSetIdInIdx = 0; +const uint32_t kExtInstInstructionInIdx = 1; +const uint32_t kFMixXIdInIdx = 2; +const uint32_t kFMixYIdInIdx = 3; +const uint32_t kFMixAIdInIdx = 4; + +} // anonymous namespace + +uint32_t InsertExtractElimPass::DoExtract(ir::Instruction* compInst, + std::vector* pExtIndices, + uint32_t extOffset) { + ir::Instruction* cinst = compInst; + uint32_t cid = 0; + uint32_t replId = 0; + while (true) { + if (cinst->opcode() == SpvOpCompositeInsert) { + if (ExtInsMatch(*pExtIndices, cinst, extOffset)) { + // Match! Use inserted value as replacement + replId = cinst->GetSingleWordInOperand(kInsertObjectIdInIdx); + break; + } else if (ExtInsConflict(*pExtIndices, cinst, extOffset)) { + // If extract has fewer indices than the insert, stop searching. + // Otherwise increment offset of extract indices considered and + // continue searching through the inserted value + if (pExtIndices->size() - extOffset < cinst->NumInOperands() - 2) { + break; + } else { + extOffset += cinst->NumInOperands() - 2; + cid = cinst->GetSingleWordInOperand(kInsertObjectIdInIdx); + } + } else { + // Consider next composite in insert chain + cid = cinst->GetSingleWordInOperand(kInsertCompositeIdInIdx); + } + } else if (cinst->opcode() == SpvOpVectorShuffle) { + // Get length of vector1 + uint32_t v1_id = cinst->GetSingleWordInOperand(kVectorShuffleVec1IdInIdx); + ir::Instruction* v1_inst = get_def_use_mgr()->GetDef(v1_id); + uint32_t v1_type_id = v1_inst->type_id(); + ir::Instruction* v1_type_inst = get_def_use_mgr()->GetDef(v1_type_id); + uint32_t v1_len = + v1_type_inst->GetSingleWordInOperand(kTypeVectorLengthInIdx); + // Get shuffle idx + uint32_t comp_idx = (*pExtIndices)[extOffset]; + uint32_t shuffle_idx = + cinst->GetSingleWordInOperand(kVectorShuffleCompsInIdx + comp_idx); + // If undefined, give up + // TODO(greg-lunarg): Return OpUndef + if (shuffle_idx == 0xFFFFFFFF) break; + if (shuffle_idx < v1_len) { + cid = v1_id; + (*pExtIndices)[extOffset] = shuffle_idx; + } else { + cid = cinst->GetSingleWordInOperand(kVectorShuffleVec2IdInIdx); + (*pExtIndices)[extOffset] = shuffle_idx - v1_len; + } + } else if (cinst->opcode() == SpvOpExtInst && + cinst->GetSingleWordInOperand(kExtInstSetIdInIdx) == + get_feature_mgr()->GetExtInstImportId_GLSLstd450() && + cinst->GetSingleWordInOperand(kExtInstInstructionInIdx) == + GLSLstd450FMix) { + // If mixing value component is 0 or 1 we just match with x or y. + // Otherwise give up. + uint32_t comp_idx = (*pExtIndices)[extOffset]; + std::vector aIndices = {comp_idx}; + uint32_t a_id = cinst->GetSingleWordInOperand(kFMixAIdInIdx); + ir::Instruction* a_inst = get_def_use_mgr()->GetDef(a_id); + uint32_t a_comp_id = DoExtract(a_inst, &aIndices, 0); + if (a_comp_id == 0) break; + ir::Instruction* a_comp_inst = get_def_use_mgr()->GetDef(a_comp_id); + if (a_comp_inst->opcode() != SpvOpConstant) break; + // If a value is not 32-bit, give up + uint32_t a_comp_type_id = a_comp_inst->type_id(); + ir::Instruction* a_comp_type = get_def_use_mgr()->GetDef(a_comp_type_id); + if (a_comp_type->GetSingleWordInOperand(kTypeFloatWidthInIdx) != 32) + break; + uint32_t u = a_comp_inst->GetSingleWordInOperand(kConstantValueInIdx); + float* fp = reinterpret_cast(&u); + if (*fp == 0.0) + cid = cinst->GetSingleWordInOperand(kFMixXIdInIdx); + else if (*fp == 1.0) + cid = cinst->GetSingleWordInOperand(kFMixYIdInIdx); + else + break; + } else { + break; + } + cinst = get_def_use_mgr()->GetDef(cid); + } + // If search ended with CompositeConstruct or ConstantComposite + // and the extract has one index, return the appropriate component. + // TODO(greg-lunarg): Handle multiple-indices, ConstantNull, special + // vector composition, and additional CompositeInsert. + if (replId == 0 && + (cinst->opcode() == SpvOpCompositeConstruct || + cinst->opcode() == SpvOpConstantComposite) && + (*pExtIndices).size() - extOffset == 1) { + uint32_t compIdx = (*pExtIndices)[extOffset]; + // If a vector CompositeConstruct we make sure all preceding + // components are of component type (not vector composition). + uint32_t ctype_id = cinst->type_id(); + ir::Instruction* ctype_inst = get_def_use_mgr()->GetDef(ctype_id); + if (ctype_inst->opcode() == SpvOpTypeVector && + cinst->opcode() == SpvOpConstantComposite) { + uint32_t vec_comp_type_id = + ctype_inst->GetSingleWordInOperand(kTypeVectorCompTypeIdInIdx); + if (compIdx < cinst->NumInOperands()) { + uint32_t i = 0; + for (; i <= compIdx; i++) { + uint32_t compId = cinst->GetSingleWordInOperand(i); + ir::Instruction* componentInst = get_def_use_mgr()->GetDef(compId); + if (componentInst->type_id() != vec_comp_type_id) break; + } + if (i > compIdx) replId = cinst->GetSingleWordInOperand(compIdx); + } + } else { + replId = cinst->GetSingleWordInOperand(compIdx); + } + } + return replId; } bool InsertExtractElimPass::EliminateInsertExtract(ir::Function* func) { bool modified = false; for (auto bi = func->begin(); bi != func->end(); ++bi) { - for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - switch (ii->opcode()) { + ir::Instruction* inst = &*bi->begin(); + while (inst) { + switch (inst->opcode()) { case SpvOpCompositeExtract: { - uint32_t cid = ii->GetSingleWordInOperand(kExtractCompositeIdInIdx); - ir::Instruction* cinst = def_use_mgr_->GetDef(cid); - uint32_t replId = 0; - while (cinst->opcode() == SpvOpCompositeInsert) { - if (ExtInsConflict(&*ii, cinst)) - break; - if (ExtInsMatch(&*ii, cinst)) { - replId = cinst->GetSingleWordInOperand(kInsertObjectIdInIdx); - break; - } - cid = cinst->GetSingleWordInOperand(kInsertCompositeIdInIdx); - cinst = def_use_mgr_->GetDef(cid); - } - // If search ended with CompositeConstruct or ConstantComposite - // and the extract has one index, return the appropriate component. - // If a vector CompositeConstruct we make sure all preceding - // components are of component type (not vector composition). - // TODO(greg-lunarg): Handle multiple-indices, ConstantNull, special - // vector composition, and additional CompositeInsert. - if ((cinst->opcode() == SpvOpCompositeConstruct || - cinst->opcode() == SpvOpConstantComposite) && - (*ii).NumInOperands() == 2) { - uint32_t compIdx = (*ii).GetSingleWordInOperand(1); - if (IsVectorType(cinst->type_id())) { - if (compIdx < cinst->NumInOperands()) { - uint32_t i = 0; - for (; i <= compIdx; i++) { - uint32_t compId = cinst->GetSingleWordInOperand(i); - ir::Instruction* compInst = def_use_mgr_->GetDef(compId); - if (compInst->type_id() != (*ii).type_id()) - break; - } - if (i > compIdx) - replId = cinst->GetSingleWordInOperand(compIdx); - } - } - else { - replId = cinst->GetSingleWordInOperand(compIdx); - } - } + uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); + ir::Instruction* cinst = get_def_use_mgr()->GetDef(cid); + // Capture extract indices + std::vector extIndices; + uint32_t icnt = 0; + inst->ForEachInOperand([&icnt, &extIndices](const uint32_t* idp) { + if (icnt > 0) extIndices.push_back(*idp); + ++icnt; + }); + // Offset of extract indices being compared to insert indices. + // Offset increases as indices are matched. + uint32_t replId = DoExtract(cinst, &extIndices, 0); if (replId != 0) { - const uint32_t extId = ii->result_id(); - (void)def_use_mgr_->ReplaceAllUsesWith(extId, replId); - def_use_mgr_->KillInst(&*ii); + const uint32_t extId = inst->result_id(); + (void)context()->ReplaceAllUsesWith(extId, replId); + inst = context()->KillInst(inst); modified = true; + } else { + inst = inst->NextNode(); } } break; default: + inst = inst->NextNode(); break; } } @@ -121,76 +197,25 @@ bool InsertExtractElimPass::EliminateInsertExtract(ir::Function* func) { return modified; } -void InsertExtractElimPass::Initialize(ir::Module* module) { - - module_ = module; - - // Do def/use on whole module - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - - // Initialize extension whitelist - InitExtensions(); -}; - -bool InsertExtractElimPass::AllExtensionsSupported() const { - // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); - if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) - return false; - } - return true; +void InsertExtractElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); } Pass::Status InsertExtractElimPass::ProcessImpl() { - // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; // Process all entry point functions. ProcessFunction pfn = [this](ir::Function* fp) { return EliminateInsertExtract(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -InsertExtractElimPass::InsertExtractElimPass() - : module_(nullptr), def_use_mgr_(nullptr) {} +InsertExtractElimPass::InsertExtractElimPass() {} -Pass::Status InsertExtractElimPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status InsertExtractElimPass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } -void InsertExtractElimPass::InitExtensions() { - extensions_whitelist_.clear(); - extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - "SPV_KHR_variable_pointers", - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - }); -} - } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.h index 4f7509cbf9da30b1815ab2f4979d4b4430f63ef2..3f1ba00bb61c97f22e12850a0f1220badff80801 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/insert_extract_elim.h @@ -17,7 +17,6 @@ #ifndef LIBSPIRV_OPT_INSERT_EXTRACT_ELIM_PASS_H_ #define LIBSPIRV_OPT_INSERT_EXTRACT_ELIM_PASS_H_ - #include #include #include @@ -26,62 +25,37 @@ #include "basic_block.h" #include "def_use_manager.h" +#include "ir_context.h" +#include "mem_pass.h" #include "module.h" -#include "pass.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. -class InsertExtractElimPass : public Pass { +class InsertExtractElimPass : public MemPass { public: InsertExtractElimPass(); const char* name() const override { return "eliminate-insert-extract"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; private: - // Return true if indices of extract |extInst| and insert |insInst| match - bool ExtInsMatch( - const ir::Instruction* extInst, const ir::Instruction* insInst) const; - - // Return true if indices of extract |extInst| and insert |insInst| conflict, - // specifically, if the insert changes bits specified by the extract, but - // changes either more bits or less bits than the extract specifies, - // meaning the exact value being inserted cannot be used to replace - // the extract. - bool ExtInsConflict( - const ir::Instruction* extInst, const ir::Instruction* insInst) const; - - // Return true if |typeId| is a vector type - bool IsVectorType(uint32_t typeId); - - // Look for OpExtract on sequence of OpInserts in |func|. If there is an - // insert with identical indices, replace the extract with the value - // that is inserted if possible. Specifically, replace if there is no - // intervening insert which conflicts. + // Return id of component of |cinst| specified by |extIndices| starting with + // index at |extOffset|. Return 0 if indices cannot be matched exactly. + uint32_t DoExtract(ir::Instruction* cinst, std::vector* extIndices, + uint32_t extOffset); + + // Look for OpExtract on sequence of OpInserts in |func|. If there is a + // reaching insert which corresponds to the indices of the extract, replace + // the extract with the value that is inserted. Also resolve extracts from + // CompositeConstruct or ConstantComposite. bool EliminateInsertExtract(ir::Function* func); - // Initialize extensions whitelist - void InitExtensions(); - - // Return true if all extensions in this module are allowed by this pass. - bool AllExtensionsSupported() const; - - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); - - // Module this pass is processing - ir::Module* module_; - - // Def-Uses for the module we are processing - std::unique_ptr def_use_mgr_; - - // Extensions supported by this pass. - std::unordered_set extensions_whitelist_; }; } // namespace opt } // namespace spvtools #endif // LIBSPIRV_OPT_INSERT_EXTRACT_ELIM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.cpp index 78906c725fdbd66e3fdb1be7fecafafc76b5cbe3..ba8413e35a9c5a58a2b787f7c32f8a8d371ed3cf 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.cpp @@ -16,16 +16,45 @@ #include +#include "disassemble.h" +#include "fold.h" +#include "ir_context.h" #include "reflect.h" namespace spvtools { namespace ir { -Instruction::Instruction(const spv_parsed_instruction_t& inst, +namespace { +// Indices used to get particular operands out of instructions using InOperand. +const uint32_t kTypeImageDimIndex = 1; +const uint32_t kLoadBaseIndex = 0; +const uint32_t kVariableStorageClassIndex = 0; +const uint32_t kTypeImageSampledIndex = 5; +} // namespace + +Instruction::Instruction(IRContext* c) + : utils::IntrusiveNodeBase(), + context_(c), + opcode_(SpvOpNop), + type_id_(0), + result_id_(0), + unique_id_(c->TakeNextUniqueId()) {} + +Instruction::Instruction(IRContext* c, SpvOp op) + : utils::IntrusiveNodeBase(), + context_(c), + opcode_(op), + type_id_(0), + result_id_(0), + unique_id_(c->TakeNextUniqueId()) {} + +Instruction::Instruction(IRContext* c, const spv_parsed_instruction_t& inst, std::vector&& dbg_line) - : opcode_(static_cast(inst.opcode)), + : context_(c), + opcode_(static_cast(inst.opcode)), type_id_(inst.type_id), result_id_(inst.result_id), + unique_id_(c->TakeNextUniqueId()), dbg_line_insts_(std::move(dbg_line)) { assert((!IsDebugLineInst(opcode_) || dbg_line.empty()) && "Op(No)Line attaching to Op(No)Line found"); @@ -38,12 +67,15 @@ Instruction::Instruction(const spv_parsed_instruction_t& inst, } } -Instruction::Instruction(SpvOp op, uint32_t ty_id, uint32_t res_id, +Instruction::Instruction(IRContext* c, SpvOp op, uint32_t ty_id, + uint32_t res_id, const std::vector& in_operands) : utils::IntrusiveNodeBase(), + context_(c), opcode_(op), type_id_(ty_id), result_id_(res_id), + unique_id_(c->TakeNextUniqueId()), operands_() { if (type_id_ != 0) { operands_.emplace_back(spv_operand_type_t::SPV_OPERAND_TYPE_TYPE_ID, @@ -61,6 +93,7 @@ Instruction::Instruction(Instruction&& that) opcode_(that.opcode_), type_id_(that.type_id_), result_id_(that.result_id_), + unique_id_(that.unique_id_), operands_(std::move(that.operands_)), dbg_line_insts_(std::move(that.dbg_line_insts_)) {} @@ -68,16 +101,18 @@ Instruction& Instruction::operator=(Instruction&& that) { opcode_ = that.opcode_; type_id_ = that.type_id_; result_id_ = that.result_id_; + unique_id_ = that.unique_id_; operands_ = std::move(that.operands_); dbg_line_insts_ = std::move(that.dbg_line_insts_); return *this; } -Instruction* Instruction::Clone() const { - Instruction* clone = new Instruction(); +Instruction* Instruction::Clone(IRContext* c) const { + Instruction* clone = new Instruction(c); clone->opcode_ = opcode_; clone->type_id_ = type_id_; clone->result_id_ = result_id_; + clone->unique_id_ = c->TakeNextUniqueId(); clone->operands_ = operands_; clone->dbg_line_insts_ = dbg_line_insts_; return clone; @@ -110,5 +145,456 @@ void Instruction::ReplaceOperands(const std::vector& new_operands) { operands_.shrink_to_fit(); } +bool Instruction::IsReadOnlyLoad() const { + if (IsLoad()) { + ir::Instruction* address_def = GetBaseAddress(); + if (!address_def || address_def->opcode() != SpvOpVariable) { + return false; + } + return address_def->IsReadOnlyVariable(); + } + return false; +} + +Instruction* Instruction::GetBaseAddress() const { + assert((IsLoad() || opcode() == SpvOpStore || opcode() == SpvOpAccessChain || + opcode() == SpvOpInBoundsAccessChain || opcode() == SpvOpCopyObject || + opcode() == SpvOpImageTexelPointer) && + "GetBaseAddress should only be called on instructions that take a " + "pointer or image."); + uint32_t base = GetSingleWordInOperand(kLoadBaseIndex); + ir::Instruction* base_inst = context()->get_def_use_mgr()->GetDef(base); + bool done = false; + while (!done) { + switch (base_inst->opcode()) { + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + case SpvOpPtrAccessChain: + case SpvOpInBoundsPtrAccessChain: + case SpvOpImageTexelPointer: + case SpvOpCopyObject: + // All of these instructions have the base pointer use a base pointer + // in in-operand 0. + base = base_inst->GetSingleWordInOperand(0); + base_inst = context()->get_def_use_mgr()->GetDef(base); + break; + default: + done = true; + break; + } + } + + switch (opcode()) { + case SpvOpLoad: + case SpvOpStore: + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + case SpvOpCopyObject: + // A load or store through a pointer. + assert(base_inst->IsValidBasePointer() && + "We cannot have a base pointer come from this load"); + break; + default: + // A load or store of an image. + assert(base_inst->IsValidBaseImage() && "We are expecting an image."); + break; + } + return base_inst; +} + +bool Instruction::IsReadOnlyVariable() const { + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) + return IsReadOnlyVariableShaders(); + else + return IsReadOnlyVariableKernel(); +} + +bool Instruction::IsVulkanStorageImage() const { + if (opcode() != SpvOpTypePointer) { + return false; + } + + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + if (storage_class != SpvStorageClassUniformConstant) { + return false; + } + + ir::Instruction* base_type = + context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); + if (base_type->opcode() != SpvOpTypeImage) { + return false; + } + + if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) == SpvDimBuffer) { + return false; + } + + // Check if the image is sampled. If we do not know for sure that it is, + // then assume it is a storage image. + auto s = base_type->GetSingleWordInOperand(kTypeImageSampledIndex); + return s != 1; +} + +bool Instruction::IsVulkanSampledImage() const { + if (opcode() != SpvOpTypePointer) { + return false; + } + + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + if (storage_class != SpvStorageClassUniformConstant) { + return false; + } + + ir::Instruction* base_type = + context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); + if (base_type->opcode() != SpvOpTypeImage) { + return false; + } + + if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) == SpvDimBuffer) { + return false; + } + + // Check if the image is sampled. If we know for sure that it is, + // then return true. + auto s = base_type->GetSingleWordInOperand(kTypeImageSampledIndex); + return s == 1; +} + +bool Instruction::IsVulkanStorageTexelBuffer() const { + if (opcode() != SpvOpTypePointer) { + return false; + } + + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + if (storage_class != SpvStorageClassUniformConstant) { + return false; + } + + ir::Instruction* base_type = + context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); + if (base_type->opcode() != SpvOpTypeImage) { + return false; + } + + if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) != SpvDimBuffer) { + return false; + } + + // Check if the image is sampled. If we do not know for sure that it is, + // then assume it is a storage texel buffer. + return base_type->GetSingleWordInOperand(kTypeImageSampledIndex) != 1; +} + +bool Instruction::IsVulkanStorageBuffer() const { + // Is there a difference between a "Storage buffer" and a "dynamic storage + // buffer" in SPIR-V and do we care about the difference? + if (opcode() != SpvOpTypePointer) { + return false; + } + + ir::Instruction* base_type = + context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); + + if (base_type->opcode() != SpvOpTypeStruct) { + return false; + } + + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + if (storage_class == SpvStorageClassUniform) { + bool is_buffer_block = false; + context()->get_decoration_mgr()->ForEachDecoration( + base_type->result_id(), SpvDecorationBufferBlock, + [&is_buffer_block](const ir::Instruction&) { is_buffer_block = true; }); + return is_buffer_block; + } else if (storage_class == SpvStorageClassStorageBuffer) { + bool is_block = false; + context()->get_decoration_mgr()->ForEachDecoration( + base_type->result_id(), SpvDecorationBlock, + [&is_block](const ir::Instruction&) { is_block = true; }); + return is_block; + } + return false; +} + +bool Instruction::IsVulkanUniformBuffer() const { + if (opcode() != SpvOpTypePointer) { + return false; + } + + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + if (storage_class != SpvStorageClassUniform) { + return false; + } + + ir::Instruction* base_type = + context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); + if (base_type->opcode() != SpvOpTypeStruct) { + return false; + } + + bool is_block = false; + context()->get_decoration_mgr()->ForEachDecoration( + base_type->result_id(), SpvDecorationBlock, + [&is_block](const ir::Instruction&) { is_block = true; }); + return is_block; +} + +bool Instruction::IsReadOnlyVariableShaders() const { + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + Instruction* type_def = context()->get_def_use_mgr()->GetDef(type_id()); + + switch (storage_class) { + case SpvStorageClassUniformConstant: + if (!type_def->IsVulkanStorageImage() && + !type_def->IsVulkanStorageTexelBuffer()) { + return true; + } + break; + case SpvStorageClassUniform: + if (!type_def->IsVulkanStorageBuffer()) { + return true; + } + break; + case SpvStorageClassPushConstant: + case SpvStorageClassInput: + return true; + default: + break; + } + + bool is_nonwritable = false; + context()->get_decoration_mgr()->ForEachDecoration( + result_id(), SpvDecorationNonWritable, + [&is_nonwritable](const Instruction&) { is_nonwritable = true; }); + return is_nonwritable; +} + +bool Instruction::IsReadOnlyVariableKernel() const { + uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); + return storage_class == SpvStorageClassUniformConstant; +} + +uint32_t Instruction::GetTypeComponent(uint32_t element) const { + uint32_t subtype = 0; + switch (opcode()) { + case SpvOpTypeStruct: + subtype = GetSingleWordInOperand(element); + break; + case SpvOpTypeArray: + case SpvOpTypeRuntimeArray: + case SpvOpTypeVector: + case SpvOpTypeMatrix: + // These types all have uniform subtypes. + subtype = GetSingleWordInOperand(0u); + break; + default: + break; + } + + return subtype; +} + +Instruction* Instruction::InsertBefore( + std::vector>&& list) { + Instruction* first_node = list.front().get(); + for (auto& i : list) { + i.release()->InsertBefore(this); + } + list.clear(); + return first_node; +} + +Instruction* Instruction::InsertBefore(std::unique_ptr&& i) { + i.get()->InsertBefore(this); + return i.release(); +} + +bool Instruction::IsValidBasePointer() const { + uint32_t tid = type_id(); + if (tid == 0) { + return false; + } + + ir::Instruction* type = context()->get_def_use_mgr()->GetDef(tid); + if (type->opcode() != SpvOpTypePointer) { + return false; + } + + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) { + // TODO: The rules here could be more restrictive. + return true; + } + + if (opcode() == SpvOpVariable || opcode() == SpvOpFunctionParameter) { + return true; + } + + uint32_t pointee_type_id = type->GetSingleWordInOperand(1); + ir::Instruction* pointee_type_inst = + context()->get_def_use_mgr()->GetDef(pointee_type_id); + + if (pointee_type_inst->IsOpaqueType()) { + return true; + } + return false; +} + +bool Instruction::IsValidBaseImage() const { + uint32_t tid = type_id(); + if (tid == 0) { + return false; + } + + ir::Instruction* type = context()->get_def_use_mgr()->GetDef(tid); + return (type->opcode() == SpvOpTypeImage || + type->opcode() == SpvOpTypeSampledImage); +} + +bool Instruction::IsOpaqueType() const { + if (opcode() == SpvOpTypeStruct) { + bool is_opaque = false; + ForEachInOperand([&is_opaque, this](const uint32_t* op_id) { + ir::Instruction* type_inst = context()->get_def_use_mgr()->GetDef(*op_id); + is_opaque |= type_inst->IsOpaqueType(); + }); + return is_opaque; + } else if (opcode() == SpvOpTypeArray) { + uint32_t sub_type_id = GetSingleWordInOperand(0); + ir::Instruction* sub_type_inst = + context()->get_def_use_mgr()->GetDef(sub_type_id); + return sub_type_inst->IsOpaqueType(); + } else { + return opcode() == SpvOpTypeRuntimeArray || + spvOpcodeIsBaseOpaqueType(opcode()); + } +} + +bool Instruction::IsFoldable() const { + return IsFoldableByFoldScalar() || + opt::GetConstantFoldingRules().HasFoldingRule(opcode()); +} + +bool Instruction::IsFoldableByFoldScalar() const { + if (!opt::IsFoldableOpcode(opcode())) { + return false; + } + Instruction* type = context()->get_def_use_mgr()->GetDef(type_id()); + return opt::IsFoldableType(type); +} + +bool Instruction::IsFloatingPointFoldingAllowed() const { + // TODO: Add the rules for kernels. For now it will be pessimistic. + if (!context_->get_feature_mgr()->HasCapability(SpvCapabilityShader)) { + return false; + } + + bool is_nocontract = false; + context_->get_decoration_mgr()->WhileEachDecoration( + opcode_, SpvDecorationNoContraction, + [&is_nocontract](const ir::Instruction&) { + is_nocontract = true; + return false; + }); + return !is_nocontract; +} + +std::string Instruction::PrettyPrint(uint32_t options) const { + // Convert the module to binary. + std::vector module_binary; + context()->module()->ToBinary(&module_binary, /* skip_nop = */ false); + + // Convert the instruction to binary. This is used to identify the correct + // stream of words to output from the module. + std::vector inst_binary; + ToBinaryWithoutAttachedDebugInsts(&inst_binary); + + // Do not generate a header. + return spvInstructionBinaryToText( + context()->grammar().target_env(), inst_binary.data(), inst_binary.size(), + module_binary.data(), module_binary.size(), + options | SPV_BINARY_TO_TEXT_OPTION_NO_HEADER); +} + +std::ostream& operator<<(std::ostream& str, const ir::Instruction& inst) { + str << inst.PrettyPrint(); + return str; +} + +bool Instruction::IsOpcodeCodeMotionSafe() const { + switch (opcode_) { + case SpvOpVectorExtractDynamic: + case SpvOpVectorInsertDynamic: + case SpvOpVectorShuffle: + case SpvOpConvertFToU: + case SpvOpConvertFToS: + case SpvOpConvertSToF: + case SpvOpConvertUToF: + case SpvOpUConvert: + case SpvOpSConvert: + case SpvOpFConvert: + case SpvOpQuantizeToF16: + case SpvOpBitcast: + case SpvOpSNegate: + case SpvOpFNegate: + case SpvOpIAdd: + case SpvOpFAdd: + case SpvOpISub: + case SpvOpFSub: + case SpvOpIMul: + case SpvOpFMul: + case SpvOpUDiv: + case SpvOpSDiv: + case SpvOpFDiv: + case SpvOpUMod: + case SpvOpSRem: + case SpvOpSMod: + case SpvOpFRem: + case SpvOpFMod: + case SpvOpVectorTimesScalar: + case SpvOpMatrixTimesScalar: + case SpvOpVectorTimesMatrix: + case SpvOpMatrixTimesVector: + case SpvOpMatrixTimesMatrix: + case SpvOpLogicalEqual: + case SpvOpLogicalNotEqual: + case SpvOpLogicalOr: + case SpvOpLogicalAnd: + case SpvOpLogicalNot: + case SpvOpIEqual: + case SpvOpINotEqual: + case SpvOpUGreaterThan: + case SpvOpSGreaterThan: + case SpvOpUGreaterThanEqual: + case SpvOpSGreaterThanEqual: + case SpvOpULessThan: + case SpvOpSLessThan: + case SpvOpULessThanEqual: + case SpvOpSLessThanEqual: + case SpvOpFOrdEqual: + case SpvOpFUnordEqual: + case SpvOpFOrdNotEqual: + case SpvOpFUnordNotEqual: + case SpvOpFOrdLessThan: + case SpvOpFUnordLessThan: + case SpvOpFOrdGreaterThan: + case SpvOpFUnordGreaterThan: + case SpvOpFOrdLessThanEqual: + case SpvOpFUnordLessThanEqual: + case SpvOpFOrdGreaterThanEqual: + case SpvOpFUnordGreaterThanEqual: + case SpvOpShiftRightLogical: + case SpvOpShiftRightArithmetic: + case SpvOpShiftLeftLogical: + case SpvOpBitwiseOr: + case SpvOpBitwiseXor: + case SpvOpBitwiseAnd: + case SpvOpNot: + return true; + default: + return false; + } +} + } // namespace ir } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.h index 95ac0d5bd4d630e621f9b15c0ff4ef7a5220f930..e746310573417e81cce5fd09856079d0a059c409 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction.h @@ -20,19 +20,35 @@ #include #include +#include "opcode.h" #include "operand.h" #include "util/ilist_node.h" +#include "latest_version_spirv_header.h" +#include "reflect.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" namespace spvtools { namespace ir { class Function; +class IRContext; class Module; class InstructionList; +// Relaxed logcial addressing: +// +// In the logical addressing model, pointers cannot be stored or loaded. This +// is a useful assumption because it simplifies the aliasing significantly. +// However, for the purpose of legalizing code generated from HLSL, we will have +// to allow storing and loading of pointers to opaque objects and runtime +// arrays. This relaxation of the rule still implies that function and private +// scope variables do not have any aliasing, so we can treat them as before. +// This will be call the relaxed logical addressing model. +// +// This relaxation of the rule will be allowed by |GetBaseAddress|, but it will +// enforce that no other pointers are stored or loaded. + // About operand: // // In the SPIR-V specification, the term "operand" is used to mean any single @@ -83,28 +99,30 @@ class Instruction : public utils::IntrusiveNodeBase { using const_iterator = std::vector::const_iterator; // Creates a default OpNop instruction. + // This exists solely for containers that can't do without. Should be removed. Instruction() : utils::IntrusiveNodeBase(), + context_(nullptr), opcode_(SpvOpNop), type_id_(0), - result_id_(0) {} + result_id_(0), + unique_id_(0) {} + + // Creates a default OpNop instruction. + Instruction(IRContext*); // Creates an instruction with the given opcode |op| and no additional logical // operands. - Instruction(SpvOp op) - : utils::IntrusiveNodeBase(), - opcode_(op), - type_id_(0), - result_id_(0) {} + Instruction(IRContext*, SpvOp); // Creates an instruction using the given spv_parsed_instruction_t |inst|. All // the data inside |inst| will be copied and owned in this instance. And keep // record of line-related debug instructions |dbg_line| ahead of this // instruction, if any. - Instruction(const spv_parsed_instruction_t& inst, + Instruction(IRContext* c, const spv_parsed_instruction_t& inst, std::vector&& dbg_line = {}); // Creates an instruction with the given opcode |op|, type id: |ty_id|, // result id: |res_id| and input operands: |in_operands|. - Instruction(SpvOp op, uint32_t ty_id, uint32_t res_id, + Instruction(IRContext* c, SpvOp op, uint32_t ty_id, uint32_t res_id, const std::vector& in_operands); // TODO: I will want to remove these, but will first have to remove the use of @@ -122,7 +140,9 @@ class Instruction : public utils::IntrusiveNodeBase { // It is the responsibility of the caller to make sure that the storage is // removed. It is the caller's responsibility to make sure that there is only // one instruction for each result id. - Instruction* Clone() const; + Instruction* Clone(IRContext* c) const; + + IRContext* context() const { return context_; } SpvOp opcode() const { return opcode_; } // Sets the opcode of this instruction to a specific opcode. Note this may @@ -132,6 +152,10 @@ class Instruction : public utils::IntrusiveNodeBase { void SetOpcode(SpvOp op) { opcode_ = op; } uint32_t type_id() const { return type_id_; } uint32_t result_id() const { return result_id_; } + uint32_t unique_id() const { + assert(unique_id_ != 0); + return unique_id_; + } // Returns the vector of line-related debug instructions attached to this // instruction and the caller can directly modify them. std::vector& dbg_line_insts() { return dbg_line_insts_; } @@ -162,17 +186,29 @@ class Instruction : public utils::IntrusiveNodeBase { return NumInOperandWords() + TypeResultIdCount(); } // Gets the |index|-th logical operand. + inline Operand& GetOperand(uint32_t index); inline const Operand& GetOperand(uint32_t index) const; + // Adds |operand| to the list of operands of this instruction. + // It is the responsibility of the caller to make sure + // that the instruction remains valid. + inline void AddOperand(Operand&& operand); // Gets the |index|-th logical operand as a single SPIR-V word. This method is // not expected to be used with logical operands consisting of multiple SPIR-V // words. uint32_t GetSingleWordOperand(uint32_t index) const; // Sets the |index|-th in-operand's data to the given |data|. inline void SetInOperand(uint32_t index, std::vector&& data); + // Sets the |index|-th operand's data to the given |data|. + // This is for in-operands modification only, but with |index| expressed in + // terms of operand index rather than in-operand index. + inline void SetOperand(uint32_t index, std::vector&& data); + // Replace all of the in operands with those in |new_operands|. + inline void SetInOperands(std::vector&& new_operands); // Sets the result type id. inline void SetResultType(uint32_t ty_id); // Sets the result id inline void SetResultId(uint32_t res_id); + inline bool HasResultId() const { return result_id_ != 0; } // Remove the |index|-th operand void RemoveOperand(uint32_t index) { operands_.erase(operands_.begin() + index); @@ -183,6 +219,9 @@ class Instruction : public utils::IntrusiveNodeBase { return static_cast(operands_.size() - TypeResultIdCount()); } uint32_t NumInOperandWords() const; + Operand& GetInOperand(uint32_t index) { + return GetOperand(index + TypeResultIdCount()); + } const Operand& GetInOperand(uint32_t index) const { return GetOperand(index + TypeResultIdCount()); } @@ -207,20 +246,41 @@ class Instruction : public utils::IntrusiveNodeBase { inline void ForEachInst(const std::function& f, bool run_on_debug_line_insts = false) const; + // Runs the given function |f| on this instruction and optionally on the + // preceding debug line instructions. The function will always be run + // if this is itself a debug line instruction. If |f| returns false, + // iteration is terminated and this function returns false. + inline bool WhileEachInst(const std::function& f, + bool run_on_debug_line_insts = false); + inline bool WhileEachInst(const std::function& f, + bool run_on_debug_line_insts = false) const; + // Runs the given function |f| on all operand ids. // // |f| should not transform an ID into 0, as 0 is an invalid ID. inline void ForEachId(const std::function& f); inline void ForEachId(const std::function& f) const; - // Runs the given function |f| on all "in" operand ids + // Runs the given function |f| on all "in" operand ids. inline void ForEachInId(const std::function& f); inline void ForEachInId(const std::function& f) const; - // Runs the given function |f| on all "in" operands + // Runs the given function |f| on all "in" operand ids. If |f| returns false, + // iteration is terminated and this function returns false. + inline bool WhileEachInId(const std::function& f); + inline bool WhileEachInId( + const std::function& f) const; + + // Runs the given function |f| on all "in" operands. inline void ForEachInOperand(const std::function& f); - inline void ForEachInOperand(const std::function& f) - const; + inline void ForEachInOperand( + const std::function& f) const; + + // Runs the given function |f| on all "in" operands. If |f| returns false, + // iteration is terminated and this function return false. + inline bool WhileEachInOperand(const std::function& f); + inline bool WhileEachInOperand( + const std::function& f) const; // Returns true if any operands can be labels inline bool HasLabels() const; @@ -233,15 +293,145 @@ class Instruction : public utils::IntrusiveNodeBase { // this instruction. void ReplaceOperands(const std::vector& new_operands); + // Returns true if the instruction annotates an id with a decoration. + inline bool IsDecoration() const; + + // Returns true if the instruction is known to be a load from read-only + // memory. + bool IsReadOnlyLoad() const; + + // Returns the instruction that gives the base address of an address + // calculation. The instruction must be a load, as defined by |IsLoad|, + // store, copy, or access chain instruction. In logical addressing mode, will + // return an OpVariable or OpFunctionParameter instruction. For relaxed + // logical addressing, it would also return a load of a pointer to an opaque + // object. For physical addressing mode, could return other types of + // instructions. + Instruction* GetBaseAddress() const; + + // Returns true if the instruction loads from memory or samples an image, and + // stores the result into an id. It considers only core instructions. + // Memory-to-memory instructions are not considered loads. + inline bool IsLoad() const; + + // Returns true if the instruction declares a variable that is read-only. + bool IsReadOnlyVariable() const; + + // The following functions check for the various descriptor types defined in + // the Vulkan specification section 13.1. + + // Returns true if the instruction defines a pointer type that points to a + // storage image. + bool IsVulkanStorageImage() const; + + // Returns true if the instruction defines a pointer type that points to a + // sampled image. + bool IsVulkanSampledImage() const; + + // Returns true if the instruction defines a pointer type that points to a + // storage texel buffer. + bool IsVulkanStorageTexelBuffer() const; + + // Returns true if the instruction defines a pointer type that points to a + // storage buffer. + bool IsVulkanStorageBuffer() const; + + // Returns true if the instruction defines a pointer type that points to a + // uniform buffer. + bool IsVulkanUniformBuffer() const; + + // Returns true if the instruction is an atom operation. + inline bool IsAtomicOp() const; + + // Returns true if this instruction is a branch or switch instruction (either + // conditional or not). + bool IsBranch() const { return spvOpcodeIsBranch(opcode()); } + + // Returns true if this instruction causes the function to finish execution + // and return to its caller + bool IsReturn() const { return spvOpcodeIsReturn(opcode()); } + + // Returns true if this instruction exits this function or aborts execution. + bool IsReturnOrAbort() const { return spvOpcodeIsReturnOrAbort(opcode()); } + + // Returns the id for the |element|'th subtype. If the |this| is not a + // composite type, this function returns 0. + uint32_t GetTypeComponent(uint32_t element) const; + + // Returns true if this instruction is a basic block terminator. + bool IsBlockTerminator() const { + return spvOpcodeIsBlockTerminator(opcode()); + } + + // Returns true if |this| is an instruction that define an opaque type. Since + // runtime array have similar characteristics they are included as opaque + // types. + bool IsOpaqueType() const; + + // Returns true if |this| is an instruction which could be folded into a + // constant value. + bool IsFoldable() const; + + // Returns true if |this| is an instruction which could be folded into a + // constant value by |FoldScalar|. + bool IsFoldableByFoldScalar() const; + + // Returns true if we are allowed to fold or otherwise manipulate the + // instruction that defines |id| in the given context. This includes not + // handling NaN values. + bool IsFloatingPointFoldingAllowed() const; + + inline bool operator==(const Instruction&) const; + inline bool operator!=(const Instruction&) const; + inline bool operator<(const Instruction&) const; + + Instruction* InsertBefore(std::vector>&& list); + Instruction* InsertBefore(std::unique_ptr&& i); + using utils::IntrusiveNodeBase::InsertBefore; + + // Returns true if |this| is an instruction defining a constant, but not a + // Spec constant. + inline bool IsConstant() const; + + // Returns true if |this| is an instruction with an opcode safe to move + bool IsOpcodeCodeMotionSafe() const; + + // Pretty-prints |inst|. + // + // Provides the disassembly of a specific instruction. Utilizes |inst|'s + // context to provide the correct interpretation of types, constants, etc. + // + // |options| are the disassembly options. SPV_BINARY_TO_TEXT_OPTION_NO_HEADER + // is always added to |options|. + std::string PrettyPrint(uint32_t options = 0u) const; + private: // Returns the total count of result type id and result id. uint32_t TypeResultIdCount() const { return (type_id_ != 0) + (result_id_ != 0); } + // Returns true if the instruction declares a variable that is read-only. The + // first version assumes the module is a shader module. The second assumes a + // kernel. + bool IsReadOnlyVariableShaders() const; + bool IsReadOnlyVariableKernel() const; + + // Returns true if it is valid to use the result of |inst| as the base + // pointer for a load or store. In this case, valid is defined by the relaxed + // logical addressing rules when using logical addressing. Normal validation + // rules for physical addressing. + bool IsValidBasePointer() const; + + // Returns true if the result of |inst| can be used as the base image for an + // instruction that samples a image, reads an image, or writes to an image. + bool IsValidBaseImage() const; + + IRContext* context_; // IR Context SpvOp opcode_; // Opcode uint32_t type_id_; // Result type id. A value of 0 means no result type id. uint32_t result_id_; // Result id. A value of 0 means no result id. + uint32_t unique_id_; // Unique instruction id // All logical operands, including result type id and result id. std::vector operands_; // Opline and OpNoLine instructions preceding this instruction. Note that for @@ -252,16 +442,57 @@ class Instruction : public utils::IntrusiveNodeBase { friend InstructionList; }; +// Pretty-prints |inst| to |str| and returns |str|. +// +// Provides the disassembly of a specific instruction. Utilizes |inst|'s context +// to provide the correct interpretation of types, constants, etc. +// +// Disassembly uses raw ids (not pretty printed names). +std::ostream& operator<<(std::ostream& str, const ir::Instruction& inst); + +inline bool Instruction::operator==(const Instruction& other) const { + return unique_id() == other.unique_id(); +} + +inline bool Instruction::operator!=(const Instruction& other) const { + return !(*this == other); +} + +inline bool Instruction::operator<(const Instruction& other) const { + return unique_id() < other.unique_id(); +} + +inline Operand& Instruction::GetOperand(uint32_t index) { + assert(index < operands_.size() && "operand index out of bound"); + return operands_[index]; +} + inline const Operand& Instruction::GetOperand(uint32_t index) const { assert(index < operands_.size() && "operand index out of bound"); return operands_[index]; -}; +} + +inline void Instruction::AddOperand(Operand&& operand) { + operands_.push_back(std::move(operand)); +} inline void Instruction::SetInOperand(uint32_t index, std::vector&& data) { - assert(index + TypeResultIdCount() < operands_.size() && - "operand index out of bound"); - operands_[index + TypeResultIdCount()].words = std::move(data); + SetOperand(index + TypeResultIdCount(), std::move(data)); +} + +inline void Instruction::SetOperand(uint32_t index, + std::vector&& data) { + assert(index < operands_.size() && "operand index out of bound"); + assert(index >= TypeResultIdCount() && "operand is not a in-operand"); + operands_[index].words = std::move(data); +} + +inline void Instruction::SetInOperands(std::vector&& new_operands) { + // Remove the old in operands. + operands_.erase(operands_.begin() + TypeResultIdCount(), operands_.end()); + // Add the new in operands. + operands_.insert(operands_.end(), new_operands.begin(), new_operands.end()); } inline void Instruction::SetResultId(uint32_t res_id) { @@ -290,27 +521,54 @@ inline void Instruction::ToNop() { operands_.clear(); } +inline bool Instruction::WhileEachInst( + const std::function& f, bool run_on_debug_line_insts) { + if (run_on_debug_line_insts) { + for (auto& dbg_line : dbg_line_insts_) { + if (!f(&dbg_line)) return false; + } + } + return f(this); +} + +inline bool Instruction::WhileEachInst( + const std::function& f, + bool run_on_debug_line_insts) const { + if (run_on_debug_line_insts) { + for (auto& dbg_line : dbg_line_insts_) { + if (!f(&dbg_line)) return false; + } + } + return f(this); +} + inline void Instruction::ForEachInst(const std::function& f, bool run_on_debug_line_insts) { - if (run_on_debug_line_insts) - for (auto& dbg_line : dbg_line_insts_) f(&dbg_line); - f(this); + WhileEachInst( + [&f](Instruction* inst) { + f(inst); + return true; + }, + run_on_debug_line_insts); } inline void Instruction::ForEachInst( const std::function& f, bool run_on_debug_line_insts) const { - if (run_on_debug_line_insts) - for (auto& dbg_line : dbg_line_insts_) f(&dbg_line); - f(this); + WhileEachInst( + [&f](const Instruction* inst) { + f(inst); + return true; + }, + run_on_debug_line_insts); } inline void Instruction::ForEachId(const std::function& f) { for (auto& opnd : operands_) if (spvIsIdType(opnd.type)) f(&opnd.words[0]); - if (type_id_ != 0u) - type_id_ = GetSingleWordOperand(0u); - if (result_id_ != 0u) result_id_ = GetSingleWordOperand(type_id_ == 0u ? 0u : 1u); + if (type_id_ != 0u) type_id_ = GetSingleWordOperand(0u); + if (result_id_ != 0u) + result_id_ = GetSingleWordOperand(type_id_ == 0u ? 0u : 1u); } inline void Instruction::ForEachId( @@ -319,59 +577,99 @@ inline void Instruction::ForEachId( if (spvIsIdType(opnd.type)) f(&opnd.words[0]); } -inline void Instruction::ForEachInId(const std::function& f) { +inline bool Instruction::WhileEachInId( + const std::function& f) { for (auto& opnd : operands_) { switch (opnd.type) { case SPV_OPERAND_TYPE_RESULT_ID: case SPV_OPERAND_TYPE_TYPE_ID: break; default: - if (spvIsIdType(opnd.type)) f(&opnd.words[0]); + if (spvIsIdType(opnd.type)) { + if (!f(&opnd.words[0])) return false; + } break; } } + return true; } -inline void Instruction::ForEachInId( - const std::function& f) const { +inline bool Instruction::WhileEachInId( + const std::function& f) const { for (const auto& opnd : operands_) { switch (opnd.type) { case SPV_OPERAND_TYPE_RESULT_ID: case SPV_OPERAND_TYPE_TYPE_ID: break; default: - if (spvIsIdType(opnd.type)) f(&opnd.words[0]); + if (spvIsIdType(opnd.type)) { + if (!f(&opnd.words[0])) return false; + } break; } } + return true; } -inline void Instruction::ForEachInOperand( - const std::function& f) { +inline void Instruction::ForEachInId(const std::function& f) { + WhileEachInId([&f](uint32_t* id) { + f(id); + return true; + }); +} + +inline void Instruction::ForEachInId( + const std::function& f) const { + WhileEachInId([&f](const uint32_t* id) { + f(id); + return true; + }); +} + +inline bool Instruction::WhileEachInOperand( + const std::function& f) { for (auto& opnd : operands_) { switch (opnd.type) { case SPV_OPERAND_TYPE_RESULT_ID: case SPV_OPERAND_TYPE_TYPE_ID: break; default: - f(&opnd.words[0]); + if (!f(&opnd.words[0])) return false; break; } } + return true; } -inline void Instruction::ForEachInOperand( - const std::function& f) const { +inline bool Instruction::WhileEachInOperand( + const std::function& f) const { for (const auto& opnd : operands_) { switch (opnd.type) { case SPV_OPERAND_TYPE_RESULT_ID: case SPV_OPERAND_TYPE_TYPE_ID: break; default: - f(&opnd.words[0]); + if (!f(&opnd.words[0])) return false; break; } } + return true; +} + +inline void Instruction::ForEachInOperand( + const std::function& f) { + WhileEachInOperand([&f](uint32_t* op) { + f(op); + return true; + }); +} + +inline void Instruction::ForEachInOperand( + const std::function& f) const { + WhileEachInOperand([&f](const uint32_t* op) { + f(op); + return true; + }); } inline bool Instruction::HasLabels() const { @@ -390,6 +688,17 @@ inline bool Instruction::HasLabels() const { return false; } +bool Instruction::IsDecoration() const { + return spvOpcodeIsDecoration(opcode()); +} + +bool Instruction::IsLoad() const { return spvOpcodeIsLoad(opcode()); } + +bool Instruction::IsAtomicOp() const { return spvOpcodeIsAtomicOp(opcode()); } + +bool Instruction::IsConstant() const { + return IsCompileTimeConstantInst(opcode()); +} } // namespace ir } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.cpp index 2885c45c5c257dd9ed72f94a91a3fecf01d342f7..d8ddb84e5666080b5cae54ca6dee131c4a2b3de9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.cpp @@ -17,14 +17,6 @@ namespace spvtools { namespace ir { -InstructionList::~InstructionList() { - while (!empty()) { - Instruction* inst = &front(); - inst->RemoveFromList(); - delete inst; - } -} - InstructionList::iterator InstructionList::iterator::InsertBefore( std::vector>&& list) { Instruction* first_node = list.front().get(); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.h index c25f0d842b8352d83902b42746c72b4cb2df2728..182317fb4cc616f40c1c9c4b572b9bfcb2334830 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/instruction_list.h @@ -25,8 +25,8 @@ #include "operand.h" #include "util/ilist.h" +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" namespace spvtools { namespace ir { @@ -53,12 +53,12 @@ class InstructionList : public utils::IntrusiveList { } // Destroy this list and any instructions in the list. - virtual ~InstructionList(); + inline virtual ~InstructionList(); class iterator : public utils::IntrusiveList::iterator { public: iterator(const utils::IntrusiveList::iterator& i) - : utils::IntrusiveList::iterator(&*i) {} + : utils::IntrusiveList::iterator(i) {} iterator(Instruction* i) : utils::IntrusiveList::iterator(i) {} // DEPRECATED: Please use MoveBefore with an InstructionList instead. @@ -74,6 +74,16 @@ class InstructionList : public utils::IntrusiveList { // will be an iterator pointing to the newly inserted node. The owner of // |*i| becomes |*this| iterator InsertBefore(std::unique_ptr&& i); + + // Removes the node from the list, and deletes the storage. Returns a valid + // iterator to the next node. + iterator Erase() { + iterator_template next_node = *this; + ++next_node; + node_->RemoveFromList(); + delete node_; + return next_node; + } }; iterator begin() { return utils::IntrusiveList::begin(); } @@ -84,8 +94,36 @@ class InstructionList : public utils::IntrusiveList { const_iterator end() const { return utils::IntrusiveList::end(); } + + void push_back(std::unique_ptr&& inst) { + utils::IntrusiveList::push_back(inst.release()); + } + + // Same as in the base class, except it will delete the data as well. + inline void clear(); + + // Runs the given function |f| on the instructions in the list and optionally + // on the preceding debug line instructions. + inline void ForEachInst(const std::function& f, + bool run_on_debug_line_insts) { + auto next = begin(); + for (auto i = next; i != end(); i = next) { + ++next; + i->ForEachInst(f, run_on_debug_line_insts); + } + } }; +InstructionList::~InstructionList() { clear(); } + +void InstructionList::clear() { + while (!empty()) { + Instruction* inst = &front(); + inst->RemoveFromList(); + delete inst; + } +} + } // namespace ir } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_builder.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_builder.h new file mode 100644 index 0000000000000000000000000000000000000000..aba6ef360a39de6a6a1c00b9cf42c90f66869df0 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_builder.h @@ -0,0 +1,411 @@ +// Copyright (c) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_IR_BUILDER_H_ +#define LIBSPIRV_OPT_IR_BUILDER_H_ + +#include "opt/basic_block.h" +#include "opt/constants.h" +#include "opt/instruction.h" +#include "opt/ir_context.h" +namespace spvtools { +namespace opt { + +// In SPIR-V, ids are encoded as uint16_t, this id is guaranteed to be always +// invalid. +const uint32_t kInvalidId = std::numeric_limits::max(); + +// Helper class to abstract instruction construction and insertion. +// The instruction builder can preserve the following analyses (specified via +// the constructors): +// - Def-use analysis +// - Instruction to block analysis +class InstructionBuilder { + public: + using InsertionPointTy = spvtools::ir::BasicBlock::iterator; + + // Creates an InstructionBuilder, all new instructions will be inserted before + // the instruction |insert_before|. + InstructionBuilder( + ir::IRContext* context, ir::Instruction* insert_before, + ir::IRContext::Analysis preserved_analyses = ir::IRContext::kAnalysisNone) + : InstructionBuilder(context, context->get_instr_block(insert_before), + InsertionPointTy(insert_before), + preserved_analyses) {} + + // Creates an InstructionBuilder, all new instructions will be inserted at the + // end of the basic block |parent_block|. + InstructionBuilder( + ir::IRContext* context, ir::BasicBlock* parent_block, + ir::IRContext::Analysis preserved_analyses = ir::IRContext::kAnalysisNone) + : InstructionBuilder(context, parent_block, parent_block->end(), + preserved_analyses) {} + + // Creates a new selection merge instruction. + // The id |merge_id| is the merge basic block id. + ir::Instruction* AddSelectionMerge( + uint32_t merge_id, + uint32_t selection_control = SpvSelectionControlMaskNone) { + std::unique_ptr new_branch_merge(new ir::Instruction( + GetContext(), SpvOpSelectionMerge, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {merge_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_SELECTION_CONTROL, + {selection_control}}})); + return AddInstruction(std::move(new_branch_merge)); + } + + // Creates a new branch instruction to |label_id|. + // Note that the user must make sure the final basic block is + // well formed. + ir::Instruction* AddBranch(uint32_t label_id) { + std::unique_ptr new_branch(new ir::Instruction( + GetContext(), SpvOpBranch, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {label_id}}})); + return AddInstruction(std::move(new_branch)); + } + + // Creates a new conditional instruction and the associated selection merge + // instruction if requested. + // The id |cond_id| is the id of the condition instruction, must be of + // type bool. + // The id |true_id| is the id of the basic block to branch to if the condition + // is true. + // The id |false_id| is the id of the basic block to branch to if the + // condition is false. + // The id |merge_id| is the id of the merge basic block for the selection + // merge instruction. If |merge_id| equals kInvalidId then no selection merge + // instruction will be created. + // The value |selection_control| is the selection control flag for the + // selection merge instruction. + // Note that the user must make sure the final basic block is + // well formed. + ir::Instruction* AddConditionalBranch( + uint32_t cond_id, uint32_t true_id, uint32_t false_id, + uint32_t merge_id = kInvalidId, + uint32_t selection_control = SpvSelectionControlMaskNone) { + if (merge_id != kInvalidId) { + AddSelectionMerge(merge_id, selection_control); + } + std::unique_ptr new_branch(new ir::Instruction( + GetContext(), SpvOpBranchConditional, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cond_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {true_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {false_id}}})); + return AddInstruction(std::move(new_branch)); + } + + // Creates a new switch instruction and the associated selection merge + // instruction if requested. + // The id |selector_id| is the id of the selector instruction, must be of + // type int. + // The id |default_id| is the id of the default basic block to branch to. + // The vector |targets| is the pair of literal/branch id. + // The id |merge_id| is the id of the merge basic block for the selection + // merge instruction. If |merge_id| equals kInvalidId then no selection merge + // instruction will be created. + // The value |selection_control| is the selection control flag for the + // selection merge instruction. + // Note that the user must make sure the final basic block is + // well formed. + ir::Instruction* AddSwitch( + uint32_t selector_id, uint32_t default_id, + const std::vector, uint32_t>>& targets, + uint32_t merge_id = kInvalidId, + uint32_t selection_control = SpvSelectionControlMaskNone) { + if (merge_id != kInvalidId) { + AddSelectionMerge(merge_id, selection_control); + } + std::vector operands; + operands.emplace_back( + ir::Operand{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {selector_id}}); + operands.emplace_back( + ir::Operand{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {default_id}}); + for (auto& target : targets) { + operands.emplace_back( + ir::Operand{spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, + target.first}); + operands.emplace_back(ir::Operand{spv_operand_type_t::SPV_OPERAND_TYPE_ID, + {target.second}}); + } + std::unique_ptr new_switch( + new ir::Instruction(GetContext(), SpvOpSwitch, 0, 0, operands)); + return AddInstruction(std::move(new_switch)); + } + + // Creates a phi instruction. + // The id |type| must be the id of the phi instruction's type. + // The vector |incomings| must be a sequence of pairs of . + ir::Instruction* AddPhi(uint32_t type, + const std::vector& incomings) { + assert(incomings.size() % 2 == 0 && "A sequence of pairs is expected"); + std::vector phi_ops; + for (size_t i = 0; i < incomings.size(); i++) { + phi_ops.push_back({SPV_OPERAND_TYPE_ID, {incomings[i]}}); + } + std::unique_ptr phi_inst(new ir::Instruction( + GetContext(), SpvOpPhi, type, GetContext()->TakeNextId(), phi_ops)); + return AddInstruction(std::move(phi_inst)); + } + + // Creates an addition instruction. + // The id |type| must be the id of the instruction's type, must be the same as + // |op1| and |op2| types. + // The id |op1| is the left hand side of the operation. + // The id |op2| is the right hand side of the operation. + ir::Instruction* AddIAdd(uint32_t type, uint32_t op1, uint32_t op2) { + std::unique_ptr inst(new ir::Instruction( + GetContext(), SpvOpIAdd, type, GetContext()->TakeNextId(), + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); + return AddInstruction(std::move(inst)); + } + + // Creates a less than instruction for unsigned integer. + // The id |op1| is the left hand side of the operation. + // The id |op2| is the right hand side of the operation. + // It is assumed that |op1| and |op2| have the same underlying type. + ir::Instruction* AddULessThan(uint32_t op1, uint32_t op2) { + analysis::Bool bool_type; + uint32_t type = GetContext()->get_type_mgr()->GetId(&bool_type); + std::unique_ptr inst(new ir::Instruction( + GetContext(), SpvOpULessThan, type, GetContext()->TakeNextId(), + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); + return AddInstruction(std::move(inst)); + } + + // Creates a less than instruction for signed integer. + // The id |op1| is the left hand side of the operation. + // The id |op2| is the right hand side of the operation. + // It is assumed that |op1| and |op2| have the same underlying type. + ir::Instruction* AddSLessThan(uint32_t op1, uint32_t op2) { + analysis::Bool bool_type; + uint32_t type = GetContext()->get_type_mgr()->GetId(&bool_type); + std::unique_ptr inst(new ir::Instruction( + GetContext(), SpvOpSLessThan, type, GetContext()->TakeNextId(), + {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); + return AddInstruction(std::move(inst)); + } + + // Creates an OpILessThan or OpULessThen instruction depending on the sign of + // |op1|. The id |op1| is the left hand side of the operation. The id |op2| is + // the right hand side of the operation. It is assumed that |op1| and |op2| + // have the same underlying type. + ir::Instruction* AddLessThan(uint32_t op1, uint32_t op2) { + ir::Instruction* op1_insn = context_->get_def_use_mgr()->GetDef(op1); + analysis::Type* type = + GetContext()->get_type_mgr()->GetType(op1_insn->type_id()); + analysis::Integer* int_type = type->AsInteger(); + assert(int_type && "Operand is not of int type"); + + if (int_type->IsSigned()) + return AddSLessThan(op1, op2); + else + return AddULessThan(op1, op2); + } + + // Creates a select instruction. + // |type| must match the types of |true_value| and |false_value|. It is up to + // the caller to ensure that |cond| is a correct type (bool or vector of + // bool) for |type|. + ir::Instruction* AddSelect(uint32_t type, uint32_t cond, uint32_t true_value, + uint32_t false_value) { + std::unique_ptr select(new ir::Instruction( + GetContext(), SpvOpSelect, type, GetContext()->TakeNextId(), + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {cond}}, + {SPV_OPERAND_TYPE_ID, {true_value}}, + {SPV_OPERAND_TYPE_ID, {false_value}}})); + return AddInstruction(std::move(select)); + } + + // Adds a signed int32 constant to the binary. + // The |value| parameter is the constant value to be added. + ir::Instruction* Add32BitSignedIntegerConstant(int32_t value) { + return Add32BitConstantInteger(value, true); + } + + // Create a composite construct. + // |type| should be a composite type and the number of elements it has should + // match the size od |ids|. + ir::Instruction* AddCompositeConstruct(uint32_t type, + const std::vector& ids) { + std::vector ops; + for (auto id : ids) { + ops.emplace_back(SPV_OPERAND_TYPE_ID, + std::initializer_list{id}); + } + std::unique_ptr construct( + new ir::Instruction(GetContext(), SpvOpCompositeConstruct, type, + GetContext()->TakeNextId(), ops)); + return AddInstruction(std::move(construct)); + } + // Adds an unsigned int32 constant to the binary. + // The |value| parameter is the constant value to be added. + ir::Instruction* Add32BitUnsignedIntegerConstant(uint32_t value) { + return Add32BitConstantInteger(value, false); + } + + // Adds either a signed or unsigned 32 bit integer constant to the binary + // depedning on the |sign|. If |sign| is true then the value is added as a + // signed constant otherwise as an unsigned constant. If |sign| is false the + // value must not be a negative number. + template + ir::Instruction* Add32BitConstantInteger(T value, bool sign) { + // Assert that we are not trying to store a negative number in an unsigned + // type. + if (!sign) + assert(value >= 0 && + "Trying to add a signed integer with an unsigned type!"); + + analysis::Integer int_type{32, sign}; + + // Get or create the integer type. This rebuilds the type and manages the + // memory for the rebuilt type. + uint32_t type_id = + GetContext()->get_type_mgr()->GetTypeInstruction(&int_type); + + // Get the memory managed type so that it is safe to be stored by + // GetConstant. + analysis::Type* rebuilt_type = + GetContext()->get_type_mgr()->GetType(type_id); + + // Even if the value is negative we need to pass the bit pattern as a + // uint32_t to GetConstant. + uint32_t word = value; + + // Create the constant value. + const opt::analysis::Constant* constant = + GetContext()->get_constant_mgr()->GetConstant(rebuilt_type, {word}); + + // Create the OpConstant instruction using the type and the value. + return GetContext()->get_constant_mgr()->GetDefiningInstruction(constant); + } + + ir::Instruction* AddCompositeExtract( + uint32_t type, uint32_t id_of_composite, + const std::vector& index_list) { + std::vector operands; + operands.push_back({SPV_OPERAND_TYPE_ID, {id_of_composite}}); + + for (uint32_t index : index_list) { + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, {index}}); + } + + std::unique_ptr new_inst( + new ir::Instruction(GetContext(), SpvOpCompositeExtract, type, + GetContext()->TakeNextId(), operands)); + return AddInstruction(std::move(new_inst)); + } + + // Creates an unreachable instruction. + ir::Instruction* AddUnreachable() { + std::unique_ptr select( + new ir::Instruction(GetContext(), SpvOpUnreachable, 0, 0, + std::initializer_list{})); + return AddInstruction(std::move(select)); + } + + ir::Instruction* AddAccessChain(uint32_t type_id, uint32_t base_ptr_id, + std::vector ids) { + std::vector operands; + operands.push_back({SPV_OPERAND_TYPE_ID, {base_ptr_id}}); + + for (uint32_t index_id : ids) { + operands.push_back({SPV_OPERAND_TYPE_ID, {index_id}}); + } + + std::unique_ptr new_inst( + new ir::Instruction(GetContext(), SpvOpAccessChain, type_id, + GetContext()->TakeNextId(), operands)); + return AddInstruction(std::move(new_inst)); + } + + // Inserts the new instruction before the insertion point. + ir::Instruction* AddInstruction(std::unique_ptr&& insn) { + ir::Instruction* insn_ptr = &*insert_before_.InsertBefore(std::move(insn)); + UpdateInstrToBlockMapping(insn_ptr); + UpdateDefUseMgr(insn_ptr); + return insn_ptr; + } + + // Returns the insertion point iterator. + InsertionPointTy GetInsertPoint() { return insert_before_; } + + // Change the insertion point to insert before the instruction + // |insert_before|. + void SetInsertPoint(ir::Instruction* insert_before) { + parent_ = context_->get_instr_block(insert_before); + insert_before_ = InsertionPointTy(insert_before); + } + + // Change the insertion point to insert at the end of the basic block + // |parent_block|. + void SetInsertPoint(ir::BasicBlock* parent_block) { + parent_ = parent_block; + insert_before_ = parent_block->end(); + } + + // Returns the context which instructions are constructed for. + ir::IRContext* GetContext() const { return context_; } + + // Returns the set of preserved analyses. + inline ir::IRContext::Analysis GetPreservedAnalysis() const { + return preserved_analyses_; + } + + private: + InstructionBuilder(ir::IRContext* context, ir::BasicBlock* parent, + InsertionPointTy insert_before, + ir::IRContext::Analysis preserved_analyses) + : context_(context), + parent_(parent), + insert_before_(insert_before), + preserved_analyses_(preserved_analyses) { + assert(!(preserved_analyses_ & + ~(ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping))); + } + + // Returns true if the users requested to update |analysis|. + inline bool IsAnalysisUpdateRequested( + ir::IRContext::Analysis analysis) const { + return preserved_analyses_ & analysis; + } + + // Updates the def/use manager if the user requested it. If he did not request + // an update, this function does nothing. + inline void UpdateDefUseMgr(ir::Instruction* insn) { + if (IsAnalysisUpdateRequested(ir::IRContext::kAnalysisDefUse)) + GetContext()->get_def_use_mgr()->AnalyzeInstDefUse(insn); + } + + // Updates the instruction to block analysis if the user requested it. If he + // did not request an update, this function does nothing. + inline void UpdateInstrToBlockMapping(ir::Instruction* insn) { + if (IsAnalysisUpdateRequested( + ir::IRContext::kAnalysisInstrToBlockMapping) && + parent_) + GetContext()->set_instr_block(insn, parent_); + } + + ir::IRContext* context_; + ir::BasicBlock* parent_; + InsertionPointTy insert_before_; + const ir::IRContext::Analysis preserved_analyses_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_IR_BUILDER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79fab672e03d360bf6c6f8207adc9f2f3055c554 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.cpp @@ -0,0 +1,645 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "ir_context.h" +#include "latest_version_glsl_std_450_header.h" +#include "log.h" +#include "mem_pass.h" +#include "reflect.h" + +#include + +namespace spvtools { +namespace ir { + +void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) { + if (set & kAnalysisDefUse) { + BuildDefUseManager(); + } + if (set & kAnalysisInstrToBlockMapping) { + BuildInstrToBlockMapping(); + } + if (set & kAnalysisDecorations) { + BuildDecorationManager(); + } + if (set & kAnalysisCFG) { + BuildCFG(); + } + if (set & kAnalysisDominatorAnalysis) { + ResetDominatorAnalysis(); + } + if (set & kAnalysisLoopAnalysis) { + ResetLoopAnalysis(); + } + if (set & kAnalysisNameMap) { + BuildIdToNameMap(); + } + if (set & kAnalysisScalarEvolution) { + BuildScalarEvolutionAnalysis(); + } + if (set & kAnalysisRegisterPressure) { + BuildRegPressureAnalysis(); + } +} + +void IRContext::InvalidateAnalysesExceptFor( + IRContext::Analysis preserved_analyses) { + uint32_t analyses_to_invalidate = valid_analyses_ & (~preserved_analyses); + InvalidateAnalyses(static_cast(analyses_to_invalidate)); +} + +void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) { + if (analyses_to_invalidate & kAnalysisDefUse) { + def_use_mgr_.reset(nullptr); + } + if (analyses_to_invalidate & kAnalysisInstrToBlockMapping) { + instr_to_block_.clear(); + } + if (analyses_to_invalidate & kAnalysisDecorations) { + decoration_mgr_.reset(nullptr); + } + if (analyses_to_invalidate & kAnalysisCombinators) { + combinator_ops_.clear(); + } + if (analyses_to_invalidate & kAnalysisCFG) { + cfg_.reset(nullptr); + } + if (analyses_to_invalidate & kAnalysisDominatorAnalysis) { + dominator_trees_.clear(); + post_dominator_trees_.clear(); + } + if (analyses_to_invalidate & kAnalysisNameMap) { + id_to_name_.reset(nullptr); + } + + valid_analyses_ = Analysis(valid_analyses_ & ~analyses_to_invalidate); +} + +Instruction* IRContext::KillInst(ir::Instruction* inst) { + if (!inst) { + return nullptr; + } + + KillNamesAndDecorates(inst); + + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->ClearInst(inst); + } + if (AreAnalysesValid(kAnalysisInstrToBlockMapping)) { + instr_to_block_.erase(inst); + } + if (AreAnalysesValid(kAnalysisDecorations)) { + if (inst->result_id() != 0) { + decoration_mgr_->RemoveDecorationsFrom(inst->result_id()); + } + if (inst->IsDecoration()) { + decoration_mgr_->RemoveDecoration(inst); + } + } + + if (type_mgr_ && ir::IsTypeInst(inst->opcode())) { + type_mgr_->RemoveId(inst->result_id()); + } + + if (constant_mgr_ && ir::IsConstantInst(inst->opcode())) { + constant_mgr_->RemoveId(inst->result_id()); + } + + RemoveFromIdToName(inst); + + Instruction* next_instruction = nullptr; + if (inst->IsInAList()) { + next_instruction = inst->NextNode(); + inst->RemoveFromList(); + delete inst; + } else { + // Needed for instructions that are not part of a list like OpLabels, + // OpFunction, OpFunctionEnd, etc.. + inst->ToNop(); + } + return next_instruction; +} + +bool IRContext::KillDef(uint32_t id) { + ir::Instruction* def = get_def_use_mgr()->GetDef(id); + if (def != nullptr) { + KillInst(def); + return true; + } + return false; +} + +bool IRContext::ReplaceAllUsesWith(uint32_t before, uint32_t after) { + if (before == after) return false; + + // Ensure that |after| has been registered as def. + assert(get_def_use_mgr()->GetDef(after) && + "'after' is not a registered def."); + + std::vector> uses_to_update; + get_def_use_mgr()->ForEachUse( + before, [&uses_to_update](ir::Instruction* user, uint32_t index) { + uses_to_update.emplace_back(user, index); + }); + + ir::Instruction* prev = nullptr; + for (auto p : uses_to_update) { + ir::Instruction* user = p.first; + uint32_t index = p.second; + if (prev == nullptr || prev != user) { + ForgetUses(user); + prev = user; + } + const uint32_t type_result_id_count = + (user->result_id() != 0) + (user->type_id() != 0); + + if (index < type_result_id_count) { + // Update the type_id. Note that result id is immutable so it should + // never be updated. + if (user->type_id() != 0 && index == 0) { + user->SetResultType(after); + } else if (user->type_id() == 0) { + SPIRV_ASSERT(consumer_, false, + "Result type id considered as use while the instruction " + "doesn't have a result type id."); + (void)consumer_; // Makes the compiler happy for release build. + } else { + SPIRV_ASSERT(consumer_, false, + "Trying setting the immutable result id."); + } + } else { + // Update an in-operand. + uint32_t in_operand_pos = index - type_result_id_count; + // Make the modification in the instruction. + user->SetInOperand(in_operand_pos, {after}); + } + AnalyzeUses(user); + }; + + return true; +} + +bool IRContext::IsConsistent() { +#ifndef SPIRV_CHECK_CONTEXT + return true; +#endif + + if (AreAnalysesValid(kAnalysisDefUse)) { + opt::analysis::DefUseManager new_def_use(module()); + if (*get_def_use_mgr() != new_def_use) { + return false; + } + } + + if (AreAnalysesValid(kAnalysisInstrToBlockMapping)) { + for (auto& func : *module()) { + for (auto& block : func) { + if (!block.WhileEachInst([this, &block](ir::Instruction* inst) { + if (get_instr_block(inst) != &block) { + return false; + } + return true; + })) + return false; + } + } + } + + if (!CheckCFG()) { + return false; + } + + return true; +} + +void spvtools::ir::IRContext::ForgetUses(Instruction* inst) { + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->EraseUseRecordsOfOperandIds(inst); + } + if (AreAnalysesValid(kAnalysisDecorations)) { + if (inst->IsDecoration()) { + get_decoration_mgr()->RemoveDecoration(inst); + } + } + RemoveFromIdToName(inst); +} + +void IRContext::AnalyzeUses(Instruction* inst) { + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->AnalyzeInstUse(inst); + } + if (AreAnalysesValid(kAnalysisDecorations)) { + if (inst->IsDecoration()) { + get_decoration_mgr()->AddDecoration(inst); + } + } + if (id_to_name_ && + (inst->opcode() == SpvOpName || inst->opcode() == SpvOpMemberName)) { + id_to_name_->insert({inst->GetSingleWordInOperand(0), inst}); + } +} + +void IRContext::KillNamesAndDecorates(uint32_t id) { + std::vector decorations = + get_decoration_mgr()->GetDecorationsFor(id, true); + + for (Instruction* inst : decorations) { + KillInst(inst); + } + + std::vector name_to_kill; + for (auto name : GetNames(id)) { + name_to_kill.push_back(name.second); + } + for (ir::Instruction* name_inst : name_to_kill) { + KillInst(name_inst); + } +} + +void IRContext::KillNamesAndDecorates(Instruction* inst) { + const uint32_t rId = inst->result_id(); + if (rId == 0) return; + KillNamesAndDecorates(rId); +} + +void IRContext::AddCombinatorsForCapability(uint32_t capability) { + if (capability == SpvCapabilityShader) { + combinator_ops_[0].insert({ + SpvOpNop, + SpvOpUndef, + SpvOpConstant, + SpvOpConstantTrue, + SpvOpConstantFalse, + SpvOpConstantComposite, + SpvOpConstantSampler, + SpvOpConstantNull, + SpvOpTypeVoid, + SpvOpTypeBool, + SpvOpTypeInt, + SpvOpTypeFloat, + SpvOpTypeVector, + SpvOpTypeMatrix, + SpvOpTypeImage, + SpvOpTypeSampler, + SpvOpTypeSampledImage, + SpvOpTypeArray, + SpvOpTypeRuntimeArray, + SpvOpTypeStruct, + SpvOpTypeOpaque, + SpvOpTypePointer, + SpvOpTypeFunction, + SpvOpTypeEvent, + SpvOpTypeDeviceEvent, + SpvOpTypeReserveId, + SpvOpTypeQueue, + SpvOpTypePipe, + SpvOpTypeForwardPointer, + SpvOpVariable, + SpvOpImageTexelPointer, + SpvOpLoad, + SpvOpAccessChain, + SpvOpInBoundsAccessChain, + SpvOpArrayLength, + SpvOpVectorExtractDynamic, + SpvOpVectorInsertDynamic, + SpvOpVectorShuffle, + SpvOpCompositeConstruct, + SpvOpCompositeExtract, + SpvOpCompositeInsert, + SpvOpCopyObject, + SpvOpTranspose, + SpvOpSampledImage, + SpvOpImageSampleImplicitLod, + SpvOpImageSampleExplicitLod, + SpvOpImageSampleDrefImplicitLod, + SpvOpImageSampleDrefExplicitLod, + SpvOpImageSampleProjImplicitLod, + SpvOpImageSampleProjExplicitLod, + SpvOpImageSampleProjDrefImplicitLod, + SpvOpImageSampleProjDrefExplicitLod, + SpvOpImageFetch, + SpvOpImageGather, + SpvOpImageDrefGather, + SpvOpImageRead, + SpvOpImage, + SpvOpConvertFToU, + SpvOpConvertFToS, + SpvOpConvertSToF, + SpvOpConvertUToF, + SpvOpUConvert, + SpvOpSConvert, + SpvOpFConvert, + SpvOpQuantizeToF16, + SpvOpBitcast, + SpvOpSNegate, + SpvOpFNegate, + SpvOpIAdd, + SpvOpFAdd, + SpvOpISub, + SpvOpFSub, + SpvOpIMul, + SpvOpFMul, + SpvOpUDiv, + SpvOpSDiv, + SpvOpFDiv, + SpvOpUMod, + SpvOpSRem, + SpvOpSMod, + SpvOpFRem, + SpvOpFMod, + SpvOpVectorTimesScalar, + SpvOpMatrixTimesScalar, + SpvOpVectorTimesMatrix, + SpvOpMatrixTimesVector, + SpvOpMatrixTimesMatrix, + SpvOpOuterProduct, + SpvOpDot, + SpvOpIAddCarry, + SpvOpISubBorrow, + SpvOpUMulExtended, + SpvOpSMulExtended, + SpvOpAny, + SpvOpAll, + SpvOpIsNan, + SpvOpIsInf, + SpvOpLogicalEqual, + SpvOpLogicalNotEqual, + SpvOpLogicalOr, + SpvOpLogicalAnd, + SpvOpLogicalNot, + SpvOpSelect, + SpvOpIEqual, + SpvOpINotEqual, + SpvOpUGreaterThan, + SpvOpSGreaterThan, + SpvOpUGreaterThanEqual, + SpvOpSGreaterThanEqual, + SpvOpULessThan, + SpvOpSLessThan, + SpvOpULessThanEqual, + SpvOpSLessThanEqual, + SpvOpFOrdEqual, + SpvOpFUnordEqual, + SpvOpFOrdNotEqual, + SpvOpFUnordNotEqual, + SpvOpFOrdLessThan, + SpvOpFUnordLessThan, + SpvOpFOrdGreaterThan, + SpvOpFUnordGreaterThan, + SpvOpFOrdLessThanEqual, + SpvOpFUnordLessThanEqual, + SpvOpFOrdGreaterThanEqual, + SpvOpFUnordGreaterThanEqual, + SpvOpShiftRightLogical, + SpvOpShiftRightArithmetic, + SpvOpShiftLeftLogical, + SpvOpBitwiseOr, + SpvOpBitwiseXor, + SpvOpBitwiseAnd, + SpvOpNot, + SpvOpBitFieldInsert, + SpvOpBitFieldSExtract, + SpvOpBitFieldUExtract, + SpvOpBitReverse, + SpvOpBitCount, + SpvOpPhi, + SpvOpImageSparseSampleImplicitLod, + SpvOpImageSparseSampleExplicitLod, + SpvOpImageSparseSampleDrefImplicitLod, + SpvOpImageSparseSampleDrefExplicitLod, + SpvOpImageSparseSampleProjImplicitLod, + SpvOpImageSparseSampleProjExplicitLod, + SpvOpImageSparseSampleProjDrefImplicitLod, + SpvOpImageSparseSampleProjDrefExplicitLod, + SpvOpImageSparseFetch, + SpvOpImageSparseGather, + SpvOpImageSparseDrefGather, + SpvOpImageSparseTexelsResident, + SpvOpImageSparseRead, + SpvOpSizeOf + // TODO(dneto): Add instructions enabled by ImageQuery + }); + } +} + +void IRContext::AddCombinatorsForExtension(ir::Instruction* extension) { + assert(extension->opcode() == SpvOpExtInstImport && + "Expecting an import of an extension's instruction set."); + const char* extension_name = + reinterpret_cast(&extension->GetInOperand(0).words[0]); + if (!strcmp(extension_name, "GLSL.std.450")) { + combinator_ops_[extension->result_id()] = {GLSLstd450Round, + GLSLstd450RoundEven, + GLSLstd450Trunc, + GLSLstd450FAbs, + GLSLstd450SAbs, + GLSLstd450FSign, + GLSLstd450SSign, + GLSLstd450Floor, + GLSLstd450Ceil, + GLSLstd450Fract, + GLSLstd450Radians, + GLSLstd450Degrees, + GLSLstd450Sin, + GLSLstd450Cos, + GLSLstd450Tan, + GLSLstd450Asin, + GLSLstd450Acos, + GLSLstd450Atan, + GLSLstd450Sinh, + GLSLstd450Cosh, + GLSLstd450Tanh, + GLSLstd450Asinh, + GLSLstd450Acosh, + GLSLstd450Atanh, + GLSLstd450Atan2, + GLSLstd450Pow, + GLSLstd450Exp, + GLSLstd450Log, + GLSLstd450Exp2, + GLSLstd450Log2, + GLSLstd450Sqrt, + GLSLstd450InverseSqrt, + GLSLstd450Determinant, + GLSLstd450MatrixInverse, + GLSLstd450ModfStruct, + GLSLstd450FMin, + GLSLstd450UMin, + GLSLstd450SMin, + GLSLstd450FMax, + GLSLstd450UMax, + GLSLstd450SMax, + GLSLstd450FClamp, + GLSLstd450UClamp, + GLSLstd450SClamp, + GLSLstd450FMix, + GLSLstd450IMix, + GLSLstd450Step, + GLSLstd450SmoothStep, + GLSLstd450Fma, + GLSLstd450FrexpStruct, + GLSLstd450Ldexp, + GLSLstd450PackSnorm4x8, + GLSLstd450PackUnorm4x8, + GLSLstd450PackSnorm2x16, + GLSLstd450PackUnorm2x16, + GLSLstd450PackHalf2x16, + GLSLstd450PackDouble2x32, + GLSLstd450UnpackSnorm2x16, + GLSLstd450UnpackUnorm2x16, + GLSLstd450UnpackHalf2x16, + GLSLstd450UnpackSnorm4x8, + GLSLstd450UnpackUnorm4x8, + GLSLstd450UnpackDouble2x32, + GLSLstd450Length, + GLSLstd450Distance, + GLSLstd450Cross, + GLSLstd450Normalize, + GLSLstd450FaceForward, + GLSLstd450Reflect, + GLSLstd450Refract, + GLSLstd450FindILsb, + GLSLstd450FindSMsb, + GLSLstd450FindUMsb, + GLSLstd450InterpolateAtCentroid, + GLSLstd450InterpolateAtSample, + GLSLstd450InterpolateAtOffset, + GLSLstd450NMin, + GLSLstd450NMax, + GLSLstd450NClamp}; + } else { + // Map the result id to the empty set. + combinator_ops_[extension->result_id()]; + } +} + +void IRContext::InitializeCombinators() { + get_feature_mgr()->GetCapabilities()->ForEach( + [this](SpvCapability cap) { AddCombinatorsForCapability(cap); }); + + for (auto& extension : module()->ext_inst_imports()) { + AddCombinatorsForExtension(&extension); + } + + valid_analyses_ |= kAnalysisCombinators; +} + +void IRContext::RemoveFromIdToName(const Instruction* inst) { + if (id_to_name_ && + (inst->opcode() == SpvOpName || inst->opcode() == SpvOpMemberName)) { + auto range = id_to_name_->equal_range(inst->GetSingleWordInOperand(0)); + for (auto it = range.first; it != range.second; ++it) { + if (it->second == inst) { + id_to_name_->erase(it); + break; + } + } + } +} + +ir::LoopDescriptor* IRContext::GetLoopDescriptor(const ir::Function* f) { + if (!AreAnalysesValid(kAnalysisLoopAnalysis)) { + ResetLoopAnalysis(); + } + + std::unordered_map::iterator it = + loop_descriptors_.find(f); + if (it == loop_descriptors_.end()) { + return &loop_descriptors_.emplace(std::make_pair(f, ir::LoopDescriptor(f))) + .first->second; + } + + return &it->second; +} + +// Gets the dominator analysis for function |f|. +opt::DominatorAnalysis* IRContext::GetDominatorAnalysis(const ir::Function* f) { + if (!AreAnalysesValid(kAnalysisDominatorAnalysis)) { + ResetDominatorAnalysis(); + } + + if (dominator_trees_.find(f) == dominator_trees_.end()) { + dominator_trees_[f].InitializeTree(f); + } + + return &dominator_trees_[f]; +} + +// Gets the postdominator analysis for function |f|. +opt::PostDominatorAnalysis* IRContext::GetPostDominatorAnalysis( + const ir::Function* f) { + if (!AreAnalysesValid(kAnalysisDominatorAnalysis)) { + ResetDominatorAnalysis(); + } + + if (post_dominator_trees_.find(f) == post_dominator_trees_.end()) { + post_dominator_trees_[f].InitializeTree(f); + } + + return &post_dominator_trees_[f]; +} + +bool ir::IRContext::CheckCFG() { + std::unordered_map> real_preds; + if (!AreAnalysesValid(kAnalysisCFG)) { + return true; + } + + for (ir::Function& function : *module()) { + for (const auto& bb : function) { + bb.ForEachSuccessorLabel([&bb, &real_preds](const uint32_t lab_id) { + real_preds[lab_id].push_back(bb.id()); + }); + } + + for (auto& bb : function) { + std::vector preds = cfg()->preds(bb.id()); + std::vector real = real_preds[bb.id()]; + std::sort(preds.begin(), preds.end()); + std::sort(real.begin(), real.end()); + + bool same = true; + if (preds.size() != real.size()) { + same = false; + } + + for (size_t i = 0; i < real.size() && same; i++) { + if (preds[i] != real[i]) { + same = false; + } + } + + if (!same) { + std::cerr << "Predecessors for " << bb.id() << " are different:\n"; + + std::cerr << "Real:"; + for (uint32_t i : real) { + std::cerr << ' ' << i; + } + std::cerr << std::endl; + + std::cerr << "Recorded:"; + for (uint32_t i : preds) { + std::cerr << ' ' << i; + } + std::cerr << std::endl; + } + if (!same) return false; + } + } + + return true; +} +} // namespace ir +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.h new file mode 100644 index 0000000000000000000000000000000000000000..e294febdb38ba86fe0679c00d6dd5d443233095f --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_context.h @@ -0,0 +1,827 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SPIRV_TOOLS_IR_CONTEXT_H +#define SPIRV_TOOLS_IR_CONTEXT_H + +#include "assembly_grammar.h" +#include "cfg.h" +#include "constants.h" +#include "decoration_manager.h" +#include "def_use_manager.h" +#include "dominator_analysis.h" +#include "feature_manager.h" +#include "loop_descriptor.h" +#include "module.h" +#include "register_pressure.h" +#include "scalar_analysis.h" +#include "type_manager.h" + +#include +#include +#include +#include + +namespace spvtools { +namespace ir { + +class IRContext { + public: + // Available analyses. + // + // When adding a new analysis: + // + // 1. Enum values should be powers of 2. These are cast into uint32_t + // bitmasks, so we can have at most 31 analyses represented. + // + // 2. Make sure it gets invalidated or preserved by IRContext methods that add + // or remove IR elements (e.g., KillDef, KillInst, ReplaceAllUsesWith). + // + // 3. Add handling code in BuildInvalidAnalyses and InvalidateAnalyses + enum Analysis { + kAnalysisNone = 0 << 0, + kAnalysisBegin = 1 << 0, + kAnalysisDefUse = kAnalysisBegin, + kAnalysisInstrToBlockMapping = 1 << 1, + kAnalysisDecorations = 1 << 2, + kAnalysisCombinators = 1 << 3, + kAnalysisCFG = 1 << 4, + kAnalysisDominatorAnalysis = 1 << 5, + kAnalysisLoopAnalysis = 1 << 6, + kAnalysisNameMap = 1 << 7, + kAnalysisScalarEvolution = 1 << 8, + kAnalysisRegisterPressure = 1 << 9, + kAnalysisEnd = 1 << 10 + }; + + friend inline Analysis operator|(Analysis lhs, Analysis rhs); + friend inline Analysis& operator|=(Analysis& lhs, Analysis rhs); + friend inline Analysis operator<<(Analysis a, int shift); + friend inline Analysis& operator<<=(Analysis& a, int shift); + + // Creates an |IRContext| that contains an owned |Module| + IRContext(spv_target_env env, spvtools::MessageConsumer c) + : syntax_context_(spvContextCreate(env)), + grammar_(syntax_context_), + unique_id_(0), + module_(new Module()), + consumer_(std::move(c)), + def_use_mgr_(nullptr), + valid_analyses_(kAnalysisNone), + constant_mgr_(nullptr), + type_mgr_(nullptr), + id_to_name_(nullptr) { + libspirv::SetContextMessageConsumer(syntax_context_, consumer_); + module_->SetContext(this); + } + + IRContext(spv_target_env env, std::unique_ptr&& m, + spvtools::MessageConsumer c) + : syntax_context_(spvContextCreate(env)), + grammar_(syntax_context_), + unique_id_(0), + module_(std::move(m)), + consumer_(std::move(c)), + def_use_mgr_(nullptr), + valid_analyses_(kAnalysisNone), + type_mgr_(nullptr), + id_to_name_(nullptr) { + libspirv::SetContextMessageConsumer(syntax_context_, consumer_); + module_->SetContext(this); + InitializeCombinators(); + } + + ~IRContext() { spvContextDestroy(syntax_context_); } + + Module* module() const { return module_.get(); } + + // Returns a vector of pointers to constant-creation instructions in this + // context. + inline std::vector GetConstants(); + inline std::vector GetConstants() const; + + // Iterators for annotation instructions contained in this context. + inline Module::inst_iterator annotation_begin(); + inline Module::inst_iterator annotation_end(); + inline IteratorRange annotations(); + inline IteratorRange annotations() const; + + // Iterators for capabilities instructions contained in this module. + inline Module::inst_iterator capability_begin(); + inline Module::inst_iterator capability_end(); + inline IteratorRange capabilities(); + inline IteratorRange capabilities() const; + + // Iterators for types, constants and global variables instructions. + inline ir::Module::inst_iterator types_values_begin(); + inline ir::Module::inst_iterator types_values_end(); + inline IteratorRange types_values(); + inline IteratorRange types_values() const; + + // Iterators for extension instructions contained in this module. + inline Module::inst_iterator ext_inst_import_begin(); + inline Module::inst_iterator ext_inst_import_end(); + inline IteratorRange ext_inst_imports(); + inline IteratorRange ext_inst_imports() const; + + // There are several kinds of debug instructions, according to where they can + // appear in the logical layout of a module: + // - Section 7a: OpString, OpSourceExtension, OpSource, OpSourceContinued + // - Section 7b: OpName, OpMemberName + // - Section 7c: OpModuleProcessed + // - Mostly anywhere: OpLine and OpNoLine + // + + // Iterators for debug 1 instructions (excluding OpLine & OpNoLine) contained + // in this module. These are for layout section 7a. + inline Module::inst_iterator debug1_begin(); + inline Module::inst_iterator debug1_end(); + inline IteratorRange debugs1(); + inline IteratorRange debugs1() const; + + // Iterators for debug 2 instructions (excluding OpLine & OpNoLine) contained + // in this module. These are for layout section 7b. + inline Module::inst_iterator debug2_begin(); + inline Module::inst_iterator debug2_end(); + inline IteratorRange debugs2(); + inline IteratorRange debugs2() const; + + // Iterators for debug 3 instructions (excluding OpLine & OpNoLine) contained + // in this module. These are for layout section 7c. + inline Module::inst_iterator debug3_begin(); + inline Module::inst_iterator debug3_end(); + inline IteratorRange debugs3(); + inline IteratorRange debugs3() const; + + // Clears all debug instructions (excluding OpLine & OpNoLine). + inline void debug_clear(); + + // Appends a capability instruction to this module. + inline void AddCapability(std::unique_ptr&& c); + // Appends an extension instruction to this module. + inline void AddExtension(std::unique_ptr&& e); + // Appends an extended instruction set instruction to this module. + inline void AddExtInstImport(std::unique_ptr&& e); + // Set the memory model for this module. + inline void SetMemoryModel(std::unique_ptr&& m); + // Appends an entry point instruction to this module. + inline void AddEntryPoint(std::unique_ptr&& e); + // Appends an execution mode instruction to this module. + inline void AddExecutionMode(std::unique_ptr&& e); + // Appends a debug 1 instruction (excluding OpLine & OpNoLine) to this module. + // "debug 1" instructions are the ones in layout section 7.a), see section + // 2.4 Logical Layout of a Module from the SPIR-V specification. + inline void AddDebug1Inst(std::unique_ptr&& d); + // Appends a debug 2 instruction (excluding OpLine & OpNoLine) to this module. + // "debug 2" instructions are the ones in layout section 7.b), see section + // 2.4 Logical Layout of a Module from the SPIR-V specification. + inline void AddDebug2Inst(std::unique_ptr&& d); + // Appends a debug 3 instruction (OpModuleProcessed) to this module. + // This is due to decision by the SPIR Working Group, pending publication. + inline void AddDebug3Inst(std::unique_ptr&& d); + // Appends an annotation instruction to this module. + inline void AddAnnotationInst(std::unique_ptr&& a); + // Appends a type-declaration instruction to this module. + inline void AddType(std::unique_ptr&& t); + // Appends a constant, global variable, or OpUndef instruction to this module. + inline void AddGlobalValue(std::unique_ptr&& v); + // Appends a function to this module. + inline void AddFunction(std::unique_ptr&& f); + + // Returns a pointer to a def-use manager. If the def-use manager is + // invalid, it is rebuilt first. + opt::analysis::DefUseManager* get_def_use_mgr() { + if (!AreAnalysesValid(kAnalysisDefUse)) { + BuildDefUseManager(); + } + return def_use_mgr_.get(); + } + + // Returns a pointer to a liveness analysis. If the liveness analysis is + // invalid, it is rebuilt first. + opt::LivenessAnalysis* GetLivenessAnalysis() { + if (!AreAnalysesValid(kAnalysisRegisterPressure)) { + BuildRegPressureAnalysis(); + } + return reg_pressure_.get(); + } + + // Returns the basic block for instruction |instr|. Re-builds the instruction + // block map, if needed. + ir::BasicBlock* get_instr_block(ir::Instruction* instr) { + if (!AreAnalysesValid(kAnalysisInstrToBlockMapping)) { + BuildInstrToBlockMapping(); + } + auto entry = instr_to_block_.find(instr); + return (entry != instr_to_block_.end()) ? entry->second : nullptr; + } + + // Returns the basic block for |id|. Re-builds the instruction block map, if + // needed. + // + // |id| must be a registered definition. + ir::BasicBlock* get_instr_block(uint32_t id) { + ir::Instruction* def = get_def_use_mgr()->GetDef(id); + return get_instr_block(def); + } + + // Sets the basic block for |inst|. Re-builds the mapping if it has become + // invalid. + void set_instr_block(ir::Instruction* inst, ir::BasicBlock* block) { + if (AreAnalysesValid(kAnalysisInstrToBlockMapping)) { + instr_to_block_[inst] = block; + } + } + + // Returns a pointer the decoration manager. If the decoration manger is + // invalid, it is rebuilt first. + opt::analysis::DecorationManager* get_decoration_mgr() { + if (!AreAnalysesValid(kAnalysisDecorations)) { + BuildDecorationManager(); + } + return decoration_mgr_.get(); + }; + + // Returns a pointer to the constant manager. If no constant manager has been + // created yet, it creates one. NOTE: Once created, the constant manager + // remains active and it is never re-built. + opt::analysis::ConstantManager* get_constant_mgr() { + if (!constant_mgr_) + constant_mgr_.reset(new opt::analysis::ConstantManager(this)); + return constant_mgr_.get(); + } + + // Returns a pointer to the type manager. If no type manager has been created + // yet, it creates one. NOTE: Once created, the type manager remains active it + // is never re-built. + opt::analysis::TypeManager* get_type_mgr() { + if (!type_mgr_) + type_mgr_.reset(new opt::analysis::TypeManager(consumer(), this)); + return type_mgr_.get(); + } + + // Returns a pointer to the scalar evolution analysis. If it is invalid it + // will be rebuilt first. + opt::ScalarEvolutionAnalysis* GetScalarEvolutionAnalysis() { + if (!AreAnalysesValid(kAnalysisScalarEvolution)) { + BuildScalarEvolutionAnalysis(); + } + return scalar_evolution_analysis_.get(); + } + + // Build the map from the ids to the OpName and OpMemberName instruction + // associated with it. + inline void BuildIdToNameMap(); + + // Returns a range of instrucions that contain all of the OpName and + // OpMemberNames associated with the given id. + inline IteratorRange::iterator> + GetNames(uint32_t id); + + // Sets the message consumer to the given |consumer|. |consumer| which will be + // invoked every time there is a message to be communicated to the outside. + void SetMessageConsumer(spvtools::MessageConsumer c) { + consumer_ = std::move(c); + } + + // Returns the reference to the message consumer for this pass. + const spvtools::MessageConsumer& consumer() const { return consumer_; } + + // Rebuilds the analyses in |set| that are invalid. + void BuildInvalidAnalyses(Analysis set); + + // Invalidates all of the analyses except for those in |preserved_analyses|. + void InvalidateAnalysesExceptFor(Analysis preserved_analyses); + + // Invalidates the analyses marked in |analyses_to_invalidate|. + void InvalidateAnalyses(Analysis analyses_to_invalidate); + + // Deletes the instruction defining the given |id|. Returns true on + // success, false if the given |id| is not defined at all. This method also + // erases the name, decorations, and defintion of |id|. + // + // Pointers and iterators pointing to the deleted instructions become invalid. + // However other pointers and iterators are still valid. + bool KillDef(uint32_t id); + + // Deletes the given instruction |inst|. This method erases the + // information of the given instruction's uses of its operands. If |inst| + // defines a result id, its name and decorations will also be deleted. + // + // Pointer and iterator pointing to the deleted instructions become invalid. + // However other pointers and iterators are still valid. + // + // Note that if an instruction is not in an instruction list, the memory may + // not be safe to delete, so the instruction is turned into a OpNop instead. + // This can happen with OpLabel. + // + // Returns a pointer to the instruction after |inst| or |nullptr| if no such + // instruction exists. + Instruction* KillInst(ir::Instruction* inst); + + // Returns true if all of the given analyses are valid. + bool AreAnalysesValid(Analysis set) { return (set & valid_analyses_) == set; } + + // Replaces all uses of |before| id with |after| id. Returns true if any + // replacement happens. This method does not kill the definition of the + // |before| id. If |after| is the same as |before|, does nothing and returns + // false. + // + // |before| and |after| must be registered definitions in the DefUseManager. + bool ReplaceAllUsesWith(uint32_t before, uint32_t after); + + // Returns true if all of the analyses that are suppose to be valid are + // actually valid. + bool IsConsistent(); + + // The IRContext will look at the def and uses of |inst| and update any valid + // analyses will be updated accordingly. + inline void AnalyzeDefUse(Instruction* inst); + + // Informs the IRContext that the uses of |inst| are going to change, and that + // is should forget everything it know about the current uses. Any valid + // analyses will be updated accordingly. + void ForgetUses(Instruction* inst); + + // The IRContext will look at the uses of |inst| and update any valid analyses + // will be updated accordingly. + void AnalyzeUses(Instruction* inst); + + // Kill all name and decorate ops targeting |id|. + void KillNamesAndDecorates(uint32_t id); + + // Kill all name and decorate ops targeting the result id of |inst|. + void KillNamesAndDecorates(ir::Instruction* inst); + + // Returns the next unique id for use by an instruction. + inline uint32_t TakeNextUniqueId() { + assert(unique_id_ != std::numeric_limits::max()); + + // Skip zero. + return ++unique_id_; + } + + // Returns true if |inst| is a combinator in the current context. + // |combinator_ops_| is built if it has not been already. + inline bool IsCombinatorInstruction(ir::Instruction* inst) { + if (!AreAnalysesValid(kAnalysisCombinators)) { + InitializeCombinators(); + } + const uint32_t kExtInstSetIdInIndx = 0; + const uint32_t kExtInstInstructionInIndx = 1; + + if (inst->opcode() != SpvOpExtInst) { + return combinator_ops_[0].count(inst->opcode()) != 0; + } else { + uint32_t set = inst->GetSingleWordInOperand(kExtInstSetIdInIndx); + uint32_t op = inst->GetSingleWordInOperand(kExtInstInstructionInIndx); + return combinator_ops_[set].count(op) != 0; + } + } + + // Returns a pointer to the CFG for all the functions in |module_|. + ir::CFG* cfg() { + if (!AreAnalysesValid(kAnalysisCFG)) { + BuildCFG(); + } + return cfg_.get(); + } + + // Gets the loop descriptor for function |f|. + ir::LoopDescriptor* GetLoopDescriptor(const ir::Function* f); + + // Gets the dominator analysis for function |f|. + opt::DominatorAnalysis* GetDominatorAnalysis(const ir::Function* f); + + // Gets the postdominator analysis for function |f|. + opt::PostDominatorAnalysis* GetPostDominatorAnalysis(const ir::Function* f); + + // Remove the dominator tree of |f| from the cache. + inline void RemoveDominatorAnalysis(const ir::Function* f) { + dominator_trees_.erase(f); + } + + // Remove the postdominator tree of |f| from the cache. + inline void RemovePostDominatorAnalysis(const ir::Function* f) { + post_dominator_trees_.erase(f); + } + + // Return the next available SSA id and increment it. + inline uint32_t TakeNextId() { return module()->TakeNextIdBound(); } + + opt::FeatureManager* get_feature_mgr() { + if (!feature_mgr_.get()) { + AnalyzeFeatures(); + } + return feature_mgr_.get(); + } + + // Returns the grammar for this context. + const libspirv::AssemblyGrammar& grammar() const { return grammar_; } + + // If |inst| has not yet been analysed by the def-use manager, then analyse + // its definitions and uses. + inline void UpdateDefUse(Instruction* inst); + + private: + // Builds the def-use manager from scratch, even if it was already valid. + void BuildDefUseManager() { + def_use_mgr_.reset(new opt::analysis::DefUseManager(module())); + valid_analyses_ = valid_analyses_ | kAnalysisDefUse; + } + + // Builds the instruction-block map for the whole module. + void BuildInstrToBlockMapping() { + instr_to_block_.clear(); + for (auto& fn : *module_) { + for (auto& block : fn) { + block.ForEachInst([this, &block](ir::Instruction* inst) { + instr_to_block_[inst] = █ + }); + } + } + valid_analyses_ = valid_analyses_ | kAnalysisInstrToBlockMapping; + } + + void BuildDecorationManager() { + decoration_mgr_.reset(new opt::analysis::DecorationManager(module())); + valid_analyses_ = valid_analyses_ | kAnalysisDecorations; + } + + void BuildCFG() { + cfg_.reset(new ir::CFG(module())); + valid_analyses_ = valid_analyses_ | kAnalysisCFG; + } + + void BuildScalarEvolutionAnalysis() { + scalar_evolution_analysis_.reset(new opt::ScalarEvolutionAnalysis(this)); + valid_analyses_ = valid_analyses_ | kAnalysisScalarEvolution; + } + + // Builds the liveness analysis from scratch, even if it was already valid. + void BuildRegPressureAnalysis() { + reg_pressure_.reset(new opt::LivenessAnalysis(this)); + valid_analyses_ = valid_analyses_ | kAnalysisRegisterPressure; + } + + // Removes all computed dominator and post-dominator trees. This will force + // the context to rebuild the trees on demand. + void ResetDominatorAnalysis() { + // Clear the cache. + dominator_trees_.clear(); + post_dominator_trees_.clear(); + valid_analyses_ = valid_analyses_ | kAnalysisDominatorAnalysis; + } + + // Removes all computed loop descriptors. + void ResetLoopAnalysis() { + // Clear the cache. + loop_descriptors_.clear(); + valid_analyses_ = valid_analyses_ | kAnalysisLoopAnalysis; + } + + // Analyzes the features in the owned module. Builds the manager if required. + void AnalyzeFeatures() { + feature_mgr_.reset(new opt::FeatureManager(grammar_)); + feature_mgr_->Analyze(module()); + } + + // Scans a module looking for it capabilities, and initializes combinator_ops_ + // accordingly. + void InitializeCombinators(); + + // Add the combinator opcode for the given capability to combinator_ops_. + void AddCombinatorsForCapability(uint32_t capability); + + // Add the combinator opcode for the given extension to combinator_ops_. + void AddCombinatorsForExtension(ir::Instruction* extension); + + // Remove |inst| from |id_to_name_| if it is in map. + void RemoveFromIdToName(const Instruction* inst); + + // Returns true if it is suppose to be valid but it is incorrect. Returns + // true if the cfg is invalidated. + bool CheckCFG(); + + // The SPIR-V syntax context containing grammar tables for opcodes and + // operands. + spv_context syntax_context_; + + // Auxiliary object for querying SPIR-V grammar facts. + libspirv::AssemblyGrammar grammar_; + + // An unique identifier for instructions in |module_|. Can be used to order + // instructions in a container. + // + // This member is initialized to 0, but always issues this value plus one. + // Therefore, 0 is not a valid unique id for an instruction. + uint32_t unique_id_; + + // The module being processed within this IR context. + std::unique_ptr module_; + + // A message consumer for diagnostics. + spvtools::MessageConsumer consumer_; + + // The def-use manager for |module_|. + std::unique_ptr def_use_mgr_; + + // The instruction decoration manager for |module_|. + std::unique_ptr decoration_mgr_; + std::unique_ptr feature_mgr_; + + // A map from instructions the the basic block they belong to. This mapping is + // built on-demand when get_instr_block() is called. + // + // NOTE: Do not traverse this map. Ever. Use the function and basic block + // iterators to traverse instructions. + std::unordered_map instr_to_block_; + + // A bitset indicating which analyes are currently valid. + Analysis valid_analyses_; + + // Opcodes of shader capability core executable instructions + // without side-effect. + std::unordered_map> combinator_ops_; + + // The CFG for all the functions in |module_|. + std::unique_ptr cfg_; + + // Each function in the module will create its own dominator tree. We cache + // the result so it doesn't need to be rebuilt each time. + std::map dominator_trees_; + std::map + post_dominator_trees_; + + // Cache of loop descriptors for each function. + std::unordered_map loop_descriptors_; + + // Constant manager for |module_|. + std::unique_ptr constant_mgr_; + + // Type manager for |module_|. + std::unique_ptr type_mgr_; + + // A map from an id to its corresponding OpName and OpMemberName instructions. + std::unique_ptr> id_to_name_; + + // The cache scalar evolution analysis node. + std::unique_ptr scalar_evolution_analysis_; + + // The liveness analysis |module_|. + std::unique_ptr reg_pressure_; +}; + +inline ir::IRContext::Analysis operator|(ir::IRContext::Analysis lhs, + ir::IRContext::Analysis rhs) { + return static_cast(static_cast(lhs) | + static_cast(rhs)); +} + +inline ir::IRContext::Analysis& operator|=(ir::IRContext::Analysis& lhs, + ir::IRContext::Analysis rhs) { + lhs = static_cast(static_cast(lhs) | + static_cast(rhs)); + return lhs; +} + +inline ir::IRContext::Analysis operator<<(ir::IRContext::Analysis a, + int shift) { + return static_cast(static_cast(a) << shift); +} + +inline ir::IRContext::Analysis& operator<<=(ir::IRContext::Analysis& a, + int shift) { + a = static_cast(static_cast(a) << shift); + return a; +} + +std::vector spvtools::ir::IRContext::GetConstants() { + return module()->GetConstants(); +} + +std::vector IRContext::GetConstants() const { + return ((const Module*)module())->GetConstants(); +} + +Module::inst_iterator IRContext::annotation_begin() { + return module()->annotation_begin(); +} + +Module::inst_iterator IRContext::annotation_end() { + return module()->annotation_end(); +} + +IteratorRange IRContext::annotations() { + return module_->annotations(); +} + +IteratorRange IRContext::annotations() const { + return ((const Module*)module_.get())->annotations(); +} + +Module::inst_iterator IRContext::capability_begin() { + return module()->capability_begin(); +} + +Module::inst_iterator IRContext::capability_end() { + return module()->capability_end(); +} + +IteratorRange IRContext::capabilities() { + return module()->capabilities(); +} + +IteratorRange IRContext::capabilities() const { + return ((const Module*)module())->capabilities(); +} + +ir::Module::inst_iterator IRContext::types_values_begin() { + return module()->types_values_begin(); +} + +ir::Module::inst_iterator IRContext::types_values_end() { + return module()->types_values_end(); +} + +IteratorRange IRContext::types_values() { + return module()->types_values(); +} + +IteratorRange IRContext::types_values() const { + return ((const Module*)module_.get())->types_values(); +} + +Module::inst_iterator IRContext::ext_inst_import_begin() { + return module()->ext_inst_import_begin(); +} + +Module::inst_iterator IRContext::ext_inst_import_end() { + return module()->ext_inst_import_end(); +} + +IteratorRange IRContext::ext_inst_imports() { + return module()->ext_inst_imports(); +} + +IteratorRange IRContext::ext_inst_imports() const { + return ((const Module*)module_.get())->ext_inst_imports(); +} + +Module::inst_iterator IRContext::debug1_begin() { + return module()->debug1_begin(); +} + +Module::inst_iterator IRContext::debug1_end() { return module()->debug1_end(); } + +IteratorRange IRContext::debugs1() { + return module()->debugs1(); +} + +IteratorRange IRContext::debugs1() const { + return ((const Module*)module_.get())->debugs1(); +} + +Module::inst_iterator IRContext::debug2_begin() { + return module()->debug2_begin(); +} +Module::inst_iterator IRContext::debug2_end() { return module()->debug2_end(); } + +IteratorRange IRContext::debugs2() { + return module()->debugs2(); +} + +IteratorRange IRContext::debugs2() const { + return ((const Module*)module_.get())->debugs2(); +} + +Module::inst_iterator IRContext::debug3_begin() { + return module()->debug3_begin(); +} + +Module::inst_iterator IRContext::debug3_end() { return module()->debug3_end(); } + +IteratorRange IRContext::debugs3() { + return module()->debugs3(); +} + +IteratorRange IRContext::debugs3() const { + return ((const Module*)module_.get())->debugs3(); +} + +void IRContext::debug_clear() { module_->debug_clear(); } + +void IRContext::AddCapability(std::unique_ptr&& c) { + AddCombinatorsForCapability(c->GetSingleWordInOperand(0)); + module()->AddCapability(std::move(c)); +} + +void IRContext::AddExtension(std::unique_ptr&& e) { + module()->AddExtension(std::move(e)); +} + +void IRContext::AddExtInstImport(std::unique_ptr&& e) { + AddCombinatorsForExtension(e.get()); + module()->AddExtInstImport(std::move(e)); +} + +void IRContext::SetMemoryModel(std::unique_ptr&& m) { + module()->SetMemoryModel(std::move(m)); +} + +void IRContext::AddEntryPoint(std::unique_ptr&& e) { + module()->AddEntryPoint(std::move(e)); +} + +void IRContext::AddExecutionMode(std::unique_ptr&& e) { + module()->AddExecutionMode(std::move(e)); +} + +void IRContext::AddDebug1Inst(std::unique_ptr&& d) { + module()->AddDebug1Inst(std::move(d)); +} + +void IRContext::AddDebug2Inst(std::unique_ptr&& d) { + if (AreAnalysesValid(kAnalysisNameMap)) { + if (d->opcode() == SpvOpName || d->opcode() == SpvOpMemberName) { + id_to_name_->insert({d->result_id(), d.get()}); + } + } + module()->AddDebug2Inst(std::move(d)); +} + +void IRContext::AddDebug3Inst(std::unique_ptr&& d) { + module()->AddDebug3Inst(std::move(d)); +} + +void IRContext::AddAnnotationInst(std::unique_ptr&& a) { + if (AreAnalysesValid(kAnalysisDecorations)) { + get_decoration_mgr()->AddDecoration(a.get()); + } + module()->AddAnnotationInst(std::move(a)); +} + +void IRContext::AddType(std::unique_ptr&& t) { + module()->AddType(std::move(t)); + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->AnalyzeInstDef(&*(--types_values_end())); + } +} + +void IRContext::AddGlobalValue(std::unique_ptr&& v) { + module()->AddGlobalValue(std::move(v)); + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->AnalyzeInstDef(&*(--types_values_end())); + } +} + +void IRContext::AddFunction(std::unique_ptr&& f) { + module()->AddFunction(std::move(f)); +} + +void IRContext::AnalyzeDefUse(Instruction* inst) { + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->AnalyzeInstDefUse(inst); + } +} + +void IRContext::UpdateDefUse(Instruction* inst) { + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->UpdateDefUse(inst); + } +} + +void IRContext::BuildIdToNameMap() { + id_to_name_.reset(new std::multimap()); + for (Instruction& debug_inst : debugs2()) { + if (debug_inst.opcode() == SpvOpMemberName || + debug_inst.opcode() == SpvOpName) { + id_to_name_->insert({debug_inst.GetSingleWordInOperand(0), &debug_inst}); + } + } + valid_analyses_ = valid_analyses_ | kAnalysisNameMap; +} + +IteratorRange::iterator> +IRContext::GetNames(uint32_t id) { + if (!AreAnalysesValid(kAnalysisNameMap)) { + BuildIdToNameMap(); + } + auto result = id_to_name_->equal_range(id); + return make_range(std::move(result.first), std::move(result.second)); +} + +} // namespace ir +} // namespace spvtools +#endif // SPIRV_TOOLS_IR_CONTEXT_H diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.cpp index e3d848426db8ecddbcae73da2d1b906b055aa0e7..a526d6f9eaddc1b2e3f3d8c2ac44c549f56fdd41 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.cpp @@ -20,9 +20,9 @@ namespace spvtools { namespace ir { -IrLoader::IrLoader(const MessageConsumer& consumer, Module* module) +IrLoader::IrLoader(const MessageConsumer& consumer, Module* m) : consumer_(consumer), - module_(module), + module_(m), source_(""), inst_index_(0) {} @@ -30,12 +30,12 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { ++inst_index_; const auto opcode = static_cast(inst->opcode); if (IsDebugLineInst(opcode)) { - dbg_line_info_.push_back(Instruction(*inst)); + dbg_line_info_.push_back(Instruction(module()->context(), *inst)); return true; } std::unique_ptr spv_inst( - new Instruction(*inst, std::move(dbg_line_info_))); + new Instruction(module()->context(), *inst, std::move(dbg_line_info_))); dbg_line_info_.clear(); const char* src = source_.c_str(); @@ -114,7 +114,7 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { module_->AddGlobalValue(std::move(spv_inst)); } else { SPIRV_UNIMPLEMENTED(consumer_, - "unhandled inst type outside function defintion"); + "unhandled inst type outside function definition"); } } else { if (block_ == nullptr) { // Inside function but outside blocks diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.h index bcb55f1e3acd63e10b6717f248539b72c3636e93..2f0ca8b0be7233ce543db2d13f9929fd7481e0ad 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ir_loader.h @@ -39,11 +39,13 @@ class IrLoader { // All internal messages will be communicated to the outside via the given // message |consumer|. This instance only keeps a reference to the |consumer|, // so the |consumer| should outlive this instance. - IrLoader(const MessageConsumer& consumer, Module* module); + IrLoader(const MessageConsumer& consumer, Module* m); // Sets the source name of the module. void SetSource(const std::string& src) { source_ = src; } + Module* module() const { return module_; } + // Sets the fields in the module's header to the given parameters. void SetModuleHeader(uint32_t magic, uint32_t version, uint32_t generator, uint32_t bound, uint32_t reserved) { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/iterator.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/iterator.h index d82c954d967dba1efde00357a3d13630886917c6..13ff979083d23631af70b399465e6a0d14d91bde 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/iterator.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/iterator.h @@ -99,6 +99,14 @@ class UptrVectorIterator inline typename std::enable_if::type Erase(); + // Returns the underlying iterator. + UnderlyingIterator Get() const { return iterator_; } + + // Returns a valid end iterator for the underlying container. + UptrVectorIterator End() const { + return UptrVectorIterator(container_, container_->end()); + } + private: UptrVector* container_; // The container we are manipulating. UnderlyingIterator iterator_; // The raw iterator from the container. @@ -108,7 +116,10 @@ class UptrVectorIterator template class IteratorRange { public: - IteratorRange(IteratorType b, IteratorType e) : begin_(b), end_(e) {} + IteratorRange(const IteratorType& b, const IteratorType& e) + : begin_(b), end_(e) {} + IteratorRange(IteratorType&& b, IteratorType&& e) + : begin_(std::move(b)), end_(std::move(e)) {} IteratorType begin() const { return begin_; } IteratorType end() const { return end_; } @@ -121,6 +132,22 @@ class IteratorRange { IteratorType end_; }; +// Returns a (begin, end) iterator pair for the given iterators. +// The iterators must belong to the same container. +template +inline IteratorRange make_range(const IteratorType& begin, + const IteratorType& end) { + return {begin, end}; +} + +// Returns a (begin, end) iterator pair for the given iterators. +// The iterators must belong to the same container. +template +inline IteratorRange make_range(IteratorType&& begin, + IteratorType&& end) { + return {std::move(begin), std::move(end)}; +} + // Returns a (begin, end) iterator pair for the given container. template > @@ -139,6 +166,105 @@ inline IteratorRange make_const_range( IteratorType(&container, container.cend())}; } +// Wrapping iterator class that only consider elements that satisfy the given +// predicate |Predicate|. When moving to the next element of the iterator, the +// FilterIterator will iterate over the range until it finds an element that +// satisfies |Predicate| or reaches the end of the iterator. +// +// Currently this iterator is always an input iterator. +template +class FilterIterator + : public std::iterator< + std::input_iterator_tag, typename SubIterator::value_type, + typename SubIterator::difference_type, typename SubIterator::pointer, + typename SubIterator::reference> { + public: + // Iterator interface. + using iterator_category = typename SubIterator::iterator_category; + using value_type = typename SubIterator::value_type; + using pointer = typename SubIterator::pointer; + using reference = typename SubIterator::reference; + using difference_type = typename SubIterator::difference_type; + + using Range = IteratorRange; + + FilterIterator(const IteratorRange& iteration_range, + Predicate predicate) + : cur_(iteration_range.begin()), + end_(iteration_range.end()), + predicate_(predicate) { + if (!IsPredicateSatisfied()) { + MoveToNextPosition(); + } + } + + FilterIterator(const SubIterator& end, Predicate predicate) + : FilterIterator({end, end}, predicate) {} + + inline FilterIterator& operator++() { + MoveToNextPosition(); + return *this; + } + inline FilterIterator operator++(int) { + FilterIterator old = *this; + MoveToNextPosition(); + return old; + } + + reference operator*() const { return *cur_; } + pointer operator->() { return &*cur_; } + + inline bool operator==(const FilterIterator& rhs) const { + return cur_ == rhs.cur_ && end_ == rhs.end_; + } + inline bool operator!=(const FilterIterator& rhs) const { + return !(*this == rhs); + } + + // Returns the underlying iterator. + SubIterator Get() const { return cur_; } + + // Returns the sentinel iterator. + FilterIterator GetEnd() const { return FilterIterator(end_, predicate_); } + + private: + // Returns true if the predicate is satisfied or the current iterator reached + // the end. + bool IsPredicateSatisfied() { return cur_ == end_ || predicate_(*cur_); } + + void MoveToNextPosition() { + if (cur_ == end_) return; + + do { + ++cur_; + } while (!IsPredicateSatisfied()); + } + + SubIterator cur_; + SubIterator end_; + Predicate predicate_; +}; + +template +FilterIterator MakeFilterIterator( + const IteratorRange& sub_iterator_range, Predicate predicate) { + return FilterIterator(sub_iterator_range, predicate); +} + +template +FilterIterator MakeFilterIterator( + const SubIterator& begin, const SubIterator& end, Predicate predicate) { + return MakeFilterIterator(make_range(begin, end), predicate); +} + +template +typename FilterIterator::Range MakeFilterIteratorRange( + const SubIterator& begin, const SubIterator& end, Predicate predicate) { + return typename FilterIterator::Range( + MakeFilterIterator(begin, end, predicate), + MakeFilterIterator(end, end, predicate)); +} + template inline UptrVectorIterator& UptrVectorIterator::operator++() { ++iterator_; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abefb44dfc42f493b5cb61bcb4b1659fada8321e --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.cpp @@ -0,0 +1,124 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/licm_pass.h" +#include "opt/module.h" +#include "opt/pass.h" + +#include +#include + +namespace spvtools { +namespace opt { + +Pass::Status LICMPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; + + if (c != nullptr) { + modified = ProcessIRContext(); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +bool LICMPass::ProcessIRContext() { + bool modified = false; + ir::Module* module = get_module(); + + // Process each function in the module + for (ir::Function& f : *module) { + modified |= ProcessFunction(&f); + } + return modified; +} + +bool LICMPass::ProcessFunction(ir::Function* f) { + bool modified = false; + ir::LoopDescriptor* loop_descriptor = context()->GetLoopDescriptor(f); + + // Process each loop in the function + for (ir::Loop& loop : *loop_descriptor) { + // Ignore nested loops, as we will process them in order in ProcessLoop + if (loop.IsNested()) { + continue; + } + modified |= ProcessLoop(&loop, f); + } + return modified; +} + +bool LICMPass::ProcessLoop(ir::Loop* loop, ir::Function* f) { + bool modified = false; + + // Process all nested loops first + for (ir::Loop* nested_loop : *loop) { + modified |= ProcessLoop(nested_loop, f); + } + + std::vector loop_bbs{}; + modified |= AnalyseAndHoistFromBB(loop, f, loop->GetHeaderBlock(), &loop_bbs); + + for (size_t i = 0; i < loop_bbs.size(); ++i) { + ir::BasicBlock* bb = loop_bbs[i]; + // do not delete the element + modified |= AnalyseAndHoistFromBB(loop, f, bb, &loop_bbs); + } + + return modified; +} + +bool LICMPass::AnalyseAndHoistFromBB(ir::Loop* loop, ir::Function* f, + ir::BasicBlock* bb, + std::vector* loop_bbs) { + bool modified = false; + std::function hoist_inst = + [this, &loop, &modified](ir::Instruction* inst) { + if (loop->ShouldHoistInstruction(this->context(), inst)) { + HoistInstruction(loop, inst); + modified = true; + } + }; + + if (IsImmediatelyContainedInLoop(loop, f, bb)) { + bb->ForEachInst(hoist_inst, false); + } + + opt::DominatorAnalysis* dom_analysis = context()->GetDominatorAnalysis(f); + opt::DominatorTree& dom_tree = dom_analysis->GetDomTree(); + + for (opt::DominatorTreeNode* child_dom_tree_node : + *dom_tree.GetTreeNode(bb)) { + if (loop->IsInsideLoop(child_dom_tree_node->bb_)) { + loop_bbs->push_back(child_dom_tree_node->bb_); + } + } + + return modified; +} + +bool LICMPass::IsImmediatelyContainedInLoop(ir::Loop* loop, ir::Function* f, + ir::BasicBlock* bb) { + ir::LoopDescriptor* loop_descriptor = context()->GetLoopDescriptor(f); + return loop == (*loop_descriptor)[bb->id()]; +} + +void LICMPass::HoistInstruction(ir::Loop* loop, ir::Instruction* inst) { + ir::BasicBlock* pre_header_bb = loop->GetOrCreatePreHeaderBlock(); + inst->InsertBefore(std::move(&(*pre_header_bb->tail()))); + context()->set_instr_block(inst, pre_header_bb); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..1d8ae20399c3dd1dcbcddc632b6f9b7605f94e34 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/licm_pass.h @@ -0,0 +1,68 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LICM_PASS_H_ +#define SOURCE_OPT_LICM_PASS_H_ + +#include "opt/basic_block.h" +#include "opt/instruction.h" +#include "opt/loop_descriptor.h" +#include "opt/pass.h" + +#include + +namespace spvtools { +namespace opt { + +class LICMPass : public Pass { + public: + LICMPass() {} + + const char* name() const override { return "loop-invariant-code-motion"; } + Status Process(ir::IRContext*) override; + + private: + // Searches the IRContext for functions and processes each, moving invariants + // outside loops within the function where possible + // Returns true if a change was made to a function within the IRContext + bool ProcessIRContext(); + + // Checks the function for loops, calling ProcessLoop on each one found. + // Returns true if a change was made to the function, false otherwise. + bool ProcessFunction(ir::Function* f); + + // Checks for invariants in the loop and attempts to move them to the loops + // preheader. Works from inner loop to outer when nested loops are found. + // Returns true if a change was made to the loop, false otherwise. + bool ProcessLoop(ir::Loop* loop, ir::Function* f); + + // Analyses each instruction in |bb|, hoisting invariants to |pre_header_bb|. + // Each child of |bb| wrt to |dom_tree| is pushed to |loop_bbs| + bool AnalyseAndHoistFromBB(ir::Loop* loop, ir::Function* f, + ir::BasicBlock* bb, + std::vector* loop_bbs); + + // Returns true if |bb| is immediately contained in |loop| + bool IsImmediatelyContainedInLoop(ir::Loop* loop, ir::Function* f, + ir::BasicBlock* bb); + + // Move the instruction to the given BasicBlock + // This method will update the instruction to block mapping for the context + void HoistInstruction(ir::Loop* loop, ir::Instruction* inst); +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LICM_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.cpp index e57daaabf302817bcea4e190bbc610af8a6aea53..f87478ab57fb48bb3984ba91a6e099a8da62622b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.cpp @@ -16,6 +16,7 @@ #include "local_access_chain_convert_pass.h" +#include "ir_context.h" #include "iterator.h" namespace spvtools { @@ -25,65 +26,44 @@ namespace { const uint32_t kStoreValIdInIdx = 1; const uint32_t kAccessChainPtrIdInIdx = 0; -const uint32_t kTypePointerTypeIdInIdx = 1; const uint32_t kConstantValueInIdx = 0; const uint32_t kTypeIntWidthInIdx = 0; -} // anonymous namespace - -void LocalAccessChainConvertPass::DeleteIfUseless(ir::Instruction* inst) { - const uint32_t resId = inst->result_id(); - assert(resId != 0); - if (HasOnlyNamesAndDecorates(resId)) { - KillNamesAndDecorates(resId); - def_use_mgr_->KillInst(inst); - } -} - -uint32_t LocalAccessChainConvertPass::GetPointeeTypeId( - const ir::Instruction* ptrInst) const { - const uint32_t ptrTypeId = ptrInst->type_id(); - const ir::Instruction* ptrTypeInst = def_use_mgr_->GetDef(ptrTypeId); - return ptrTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); -} +} // anonymous namespace void LocalAccessChainConvertPass::BuildAndAppendInst( - SpvOp opcode, - uint32_t typeId, - uint32_t resultId, + SpvOp opcode, uint32_t typeId, uint32_t resultId, const std::vector& in_opnds, std::vector>* newInsts) { - std::unique_ptr newInst(new ir::Instruction( - opcode, typeId, resultId, in_opnds)); - def_use_mgr_->AnalyzeInstDefUse(&*newInst); + std::unique_ptr newInst( + new ir::Instruction(context(), opcode, typeId, resultId, in_opnds)); + get_def_use_mgr()->AnalyzeInstDefUse(&*newInst); newInsts->emplace_back(std::move(newInst)); } uint32_t LocalAccessChainConvertPass::BuildAndAppendVarLoad( - const ir::Instruction* ptrInst, - uint32_t* varId, - uint32_t* varPteTypeId, + const ir::Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, std::vector>* newInsts) { const uint32_t ldResultId = TakeNextId(); *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); - const ir::Instruction* varInst = def_use_mgr_->GetDef(*varId); + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(*varId); assert(varInst->opcode() == SpvOpVariable); *varPteTypeId = GetPointeeTypeId(varInst); BuildAndAppendInst(SpvOpLoad, *varPteTypeId, ldResultId, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, newInsts); + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, + newInsts); return ldResultId; } void LocalAccessChainConvertPass::AppendConstantOperands( - const ir::Instruction* ptrInst, - std::vector* in_opnds) { + const ir::Instruction* ptrInst, std::vector* in_opnds) { uint32_t iidIdx = 0; - ptrInst->ForEachInId([&iidIdx, &in_opnds, this](const uint32_t *iid) { + ptrInst->ForEachInId([&iidIdx, &in_opnds, this](const uint32_t* iid) { if (iidIdx > 0) { - const ir::Instruction* cInst = def_use_mgr_->GetDef(*iid); + const ir::Instruction* cInst = get_def_use_mgr()->GetDef(*iid); uint32_t val = cInst->GetSingleWordInOperand(kConstantValueInIdx); in_opnds->push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {val}}); + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {val}}); } ++iidIdx; }); @@ -92,116 +72,114 @@ void LocalAccessChainConvertPass::AppendConstantOperands( uint32_t LocalAccessChainConvertPass::GenAccessChainLoadReplacement( const ir::Instruction* ptrInst, std::vector>* newInsts) { - // Build and append load of variable in ptrInst uint32_t varId; uint32_t varPteTypeId; - const uint32_t ldResultId = BuildAndAppendVarLoad(ptrInst, &varId, - &varPteTypeId, newInsts); + const uint32_t ldResultId = + BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); // Build and append Extract const uint32_t extResultId = TakeNextId(); const uint32_t ptrPteTypeId = GetPointeeTypeId(ptrInst); - std::vector ext_in_opnds = - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}}}; + std::vector ext_in_opnds = { + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}}}; AppendConstantOperands(ptrInst, &ext_in_opnds); - BuildAndAppendInst(SpvOpCompositeExtract, ptrPteTypeId, extResultId, + BuildAndAppendInst(SpvOpCompositeExtract, ptrPteTypeId, extResultId, ext_in_opnds, newInsts); return extResultId; } void LocalAccessChainConvertPass::GenAccessChainStoreReplacement( - const ir::Instruction* ptrInst, - uint32_t valId, + const ir::Instruction* ptrInst, uint32_t valId, std::vector>* newInsts) { - // Build and append load of variable in ptrInst uint32_t varId; uint32_t varPteTypeId; - const uint32_t ldResultId = BuildAndAppendVarLoad(ptrInst, &varId, - &varPteTypeId, newInsts); + const uint32_t ldResultId = + BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); // Build and append Insert const uint32_t insResultId = TakeNextId(); - std::vector ins_in_opnds = - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}}}; + std::vector ins_in_opnds = { + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}}}; AppendConstantOperands(ptrInst, &ins_in_opnds); - BuildAndAppendInst( - SpvOpCompositeInsert, varPteTypeId, insResultId, ins_in_opnds, newInsts); + BuildAndAppendInst(SpvOpCompositeInsert, varPteTypeId, insResultId, + ins_in_opnds, newInsts); // Build and append Store - BuildAndAppendInst(SpvOpStore, 0, 0, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {varId}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {insResultId}}}, - newInsts); + BuildAndAppendInst(SpvOpStore, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {varId}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {insResultId}}}, + newInsts); } bool LocalAccessChainConvertPass::IsConstantIndexAccessChain( const ir::Instruction* acp) const { uint32_t inIdx = 0; - uint32_t nonConstCnt = 0; - acp->ForEachInId([&inIdx, &nonConstCnt, this](const uint32_t* tid) { + return acp->WhileEachInId([&inIdx, this](const uint32_t* tid) { if (inIdx > 0) { - ir::Instruction* opInst = def_use_mgr_->GetDef(*tid); - if (opInst->opcode() != SpvOpConstant) ++nonConstCnt; + ir::Instruction* opInst = get_def_use_mgr()->GetDef(*tid); + if (opInst->opcode() != SpvOpConstant) return false; } ++inIdx; + return true; }); - return nonConstCnt == 0; } bool LocalAccessChainConvertPass::HasOnlySupportedRefs(uint32_t ptrId) { - if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) + if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) return true; + if (get_def_use_mgr()->WhileEachUser(ptrId, [this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { + if (!HasOnlySupportedRefs(user->result_id())) { + return false; + } + } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && + !IsNonTypeDecorate(op)) { + return false; + } + return true; + })) { + supported_ref_ptrs_.insert(ptrId); return true; - analysis::UseList* uses = def_use_mgr_->GetUses(ptrId); - assert(uses != nullptr); - for (auto u : *uses) { - SpvOp op = u.inst->opcode(); - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { - if (!HasOnlySupportedRefs(u.inst->result_id())) return false; - } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) - return false; } - supported_ref_ptrs_.insert(ptrId); - return true; + return false; } void LocalAccessChainConvertPass::FindTargetVars(ir::Function* func) { for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { switch (ii->opcode()) { - case SpvOpStore: - case SpvOpLoad: { - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - break; - const SpvOp op = ptrInst->opcode(); - // Rule out variables with non-supported refs eg function calls - if (!HasOnlySupportedRefs(varId)) { - seen_non_target_vars_.insert(varId); - seen_target_vars_.erase(varId); - break; - } - // Rule out variables with nested access chains - // TODO(): Convert nested access chains - if (IsNonPtrAccessChain(op) && - ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx) != varId) { - seen_non_target_vars_.insert(varId); - seen_target_vars_.erase(varId); - break; - } - // Rule out variables accessed with non-constant indices - if (!IsConstantIndexAccessChain(ptrInst)) { - seen_non_target_vars_.insert(varId); - seen_target_vars_.erase(varId); + case SpvOpStore: + case SpvOpLoad: { + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(&*ii, &varId); + if (!IsTargetVar(varId)) break; + const SpvOp op = ptrInst->opcode(); + // Rule out variables with non-supported refs eg function calls + if (!HasOnlySupportedRefs(varId)) { + seen_non_target_vars_.insert(varId); + seen_target_vars_.erase(varId); + break; + } + // Rule out variables with nested access chains + // TODO(): Convert nested access chains + if (IsNonPtrAccessChain(op) && ptrInst->GetSingleWordInOperand( + kAccessChainPtrIdInIdx) != varId) { + seen_non_target_vars_.insert(varId); + seen_target_vars_.erase(varId); + break; + } + // Rule out variables accessed with non-constant indices + if (!IsConstantIndexAccessChain(ptrInst)) { + seen_non_target_vars_.insert(varId); + seen_target_vars_.erase(varId); + break; + } + } break; + default: break; - } - } break; - default: - break; } } } @@ -213,53 +191,61 @@ bool LocalAccessChainConvertPass::ConvertLocalAccessChains(ir::Function* func) { // extract and insert sequences bool modified = false; for (auto bi = func->begin(); bi != func->end(); ++bi) { + std::vector dead_instructions; for (auto ii = bi->begin(); ii != bi->end(); ++ii) { switch (ii->opcode()) { - case SpvOpLoad: { - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsNonPtrAccessChain(ptrInst->opcode())) + case SpvOpLoad: { + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(&*ii, &varId); + if (!IsNonPtrAccessChain(ptrInst->opcode())) break; + if (!IsTargetVar(varId)) break; + std::vector> newInsts; + uint32_t replId = GenAccessChainLoadReplacement(ptrInst, &newInsts); + context()->KillNamesAndDecorates(&*ii); + context()->ReplaceAllUsesWith(ii->result_id(), replId); + dead_instructions.push_back(&*ii); + ++ii; + ii = ii.InsertBefore(std::move(newInsts)); + ++ii; + modified = true; + } break; + case SpvOpStore: { + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(&*ii, &varId); + if (!IsNonPtrAccessChain(ptrInst->opcode())) break; + if (!IsTargetVar(varId)) break; + std::vector> newInsts; + uint32_t valId = ii->GetSingleWordInOperand(kStoreValIdInIdx); + GenAccessChainStoreReplacement(ptrInst, valId, &newInsts); + dead_instructions.push_back(&*ii); + ++ii; + ii = ii.InsertBefore(std::move(newInsts)); + ++ii; + ++ii; + modified = true; + } break; + default: break; - if (!IsTargetVar(varId)) - break; - std::vector> newInsts; - uint32_t replId = - GenAccessChainLoadReplacement(ptrInst, &newInsts); - ReplaceAndDeleteLoad(&*ii, replId); - ++ii; - ii = ii.InsertBefore(std::move(newInsts)); - ++ii; - modified = true; - } break; - case SpvOpStore: { - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsNonPtrAccessChain(ptrInst->opcode())) - break; - if (!IsTargetVar(varId)) - break; - std::vector> newInsts; - uint32_t valId = ii->GetSingleWordInOperand(kStoreValIdInIdx); - GenAccessChainStoreReplacement(ptrInst, valId, &newInsts); - def_use_mgr_->KillInst(&*ii); - DeleteIfUseless(ptrInst); - ++ii; - ii = ii.InsertBefore(std::move(newInsts)); - ++ii; - ++ii; - modified = true; - } break; - default: - break; } } + + while (!dead_instructions.empty()) { + ir::Instruction* inst = dead_instructions.back(); + dead_instructions.pop_back(); + DCEInst(inst, [&dead_instructions](ir::Instruction* other_inst) { + auto i = std::find(dead_instructions.begin(), dead_instructions.end(), + other_inst); + if (i != dead_instructions.end()) { + dead_instructions.erase(i); + } + }); + } } return modified; } -void LocalAccessChainConvertPass::Initialize(ir::Module* module) { - - module_ = module; +void LocalAccessChainConvertPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); // Initialize Target Variable Caches seen_target_vars_.clear(); @@ -268,20 +254,15 @@ void LocalAccessChainConvertPass::Initialize(ir::Module* module) { // Initialize collections supported_ref_ptrs_.clear(); - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - - // Initialize next unused Id. - InitNextId(); - // Initialize extension whitelist InitExtensions(); -}; +} bool LocalAccessChainConvertPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } @@ -291,66 +272,70 @@ bool LocalAccessChainConvertPass::AllExtensionsSupported() const { Pass::Status LocalAccessChainConvertPass::ProcessImpl() { // If non-32-bit integer type in module, terminate processing // TODO(): Handle non-32-bit integer constants in access chains - for (const ir::Instruction& inst : module_->types_values()) + for (const ir::Instruction& inst : get_module()->types_values()) if (inst.opcode() == SpvOpTypeInt && inst.GetSingleWordInOperand(kTypeIntWidthInIdx) != 32) return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; + for (auto& ai : get_module()->annotations()) + if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Collect all named and decorated ids - FindNamedOrDecoratedIds(); + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; // Process all entry point functions. ProcessFunction pfn = [this](ir::Function* fp) { return ConvertLocalAccessChains(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } LocalAccessChainConvertPass::LocalAccessChainConvertPass() {} -Pass::Status LocalAccessChainConvertPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status LocalAccessChainConvertPass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } void LocalAccessChainConvertPass::InitExtensions() { extensions_whitelist_.clear(); extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", }); } } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.h index e43503d1f651c20c24c68e780c0f8582b73b2537..98f009a89eceead0af9bf397103a7a1d736583cf 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_access_chain_convert_pass.h @@ -17,7 +17,6 @@ #ifndef LIBSPIRV_OPT_LOCAL_ACCESS_CHAIN_CONVERT_PASS_H_ #define LIBSPIRV_OPT_LOCAL_ACCESS_CHAIN_CONVERT_PASS_H_ - #include #include #include @@ -27,8 +26,8 @@ #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { @@ -38,13 +37,19 @@ class LocalAccessChainConvertPass : public MemPass { public: LocalAccessChainConvertPass(); const char* name() const override { return "convert-local-access-chains"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } using ProcessFunction = std::function; private: // Return true if all refs through |ptrId| are only loads or stores and - // cache ptrId in supported_ref_ptrs_. + // cache ptrId in supported_ref_ptrs_. TODO(dnovillo): This function is + // replicated in other passes and it's slightly different in every pass. Is it + // possible to make one common implementation? bool HasOnlySupportedRefs(uint32_t ptrId); // Search |func| and cache function scope variables of target type that are @@ -52,46 +57,42 @@ class LocalAccessChainConvertPass : public MemPass { // variables. void FindTargetVars(ir::Function* func); - // Delete |inst| if it has no uses. Assumes |inst| has a non-zero resultId. - void DeleteIfUseless(ir::Instruction* inst); - - // Return type id for |ptrInst|'s pointee - uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst) const; - // Build instruction from |opcode|, |typeId|, |resultId|, and |in_opnds|. // Append to |newInsts|. - void BuildAndAppendInst(SpvOp opcode, uint32_t typeId, uint32_t resultId, - const std::vector& in_opnds, - std::vector>* newInsts); + void BuildAndAppendInst( + SpvOp opcode, uint32_t typeId, uint32_t resultId, + const std::vector& in_opnds, + std::vector>* newInsts); // Build load of variable in |ptrInst| and append to |newInsts|. // Return var in |varId| and its pointee type in |varPteTypeId|. - uint32_t BuildAndAppendVarLoad(const ir::Instruction* ptrInst, - uint32_t* varId, uint32_t* varPteTypeId, - std::vector>* newInsts); + uint32_t BuildAndAppendVarLoad( + const ir::Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, + std::vector>* newInsts); // Append literal integer operands to |in_opnds| corresponding to constant // integer operands from access chain |ptrInst|. Assumes all indices in // access chains are OpConstant. - void AppendConstantOperands( const ir::Instruction* ptrInst, - std::vector* in_opnds); + void AppendConstantOperands(const ir::Instruction* ptrInst, + std::vector* in_opnds); // Create a load/insert/store equivalent to a store of // |valId| through (constant index) access chaing |ptrInst|. // Append to |newInsts|. - void GenAccessChainStoreReplacement(const ir::Instruction* ptrInst, - uint32_t valId, + void GenAccessChainStoreReplacement( + const ir::Instruction* ptrInst, uint32_t valId, std::vector>* newInsts); // For the (constant index) access chain |ptrInst|, create an // equivalent load and extract. Append to |newInsts|. - uint32_t GenAccessChainLoadReplacement(const ir::Instruction* ptrInst, + uint32_t GenAccessChainLoadReplacement( + const ir::Instruction* ptrInst, std::vector>* newInsts); // Return true if all indices of access chain |acp| are OpConstant integers bool IsConstantIndexAccessChain(const ir::Instruction* acp) const; - // Identify all function scope variables of target type which are + // Identify all function scope variables of target type which are // accessed only with loads, stores and access chains with constant // indices. Convert all loads and stores of such variables into equivalent // loads, stores, extracts and inserts. This unifies access to these @@ -108,7 +109,7 @@ class LocalAccessChainConvertPass : public MemPass { // Return true if all extensions in this module are allowed by this pass. bool AllExtensionsSupported() const; - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); // Variables with only supported references, ie. loads and stores using @@ -123,4 +124,3 @@ class LocalAccessChainConvertPass : public MemPass { } // namespace spvtools #endif // LIBSPIRV_OPT_LOCAL_ACCESS_CHAIN_CONVERT_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6fb48cafc11e4bfaf5ccb247aa6f77d72e75691 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.cpp @@ -0,0 +1,69 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "local_redundancy_elimination.h" + +#include "value_number_table.h" + +namespace spvtools { +namespace opt { + +Pass::Status LocalRedundancyEliminationPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + + bool modified = false; + ValueNumberTable vnTable(context()); + + for (auto& func : *get_module()) { + for (auto& bb : func) { + // Keeps track of all ids that contain a given value number. We keep + // track of multiple values because they could have the same value, but + // different decorations. + std::map value_to_ids; + if (EliminateRedundanciesInBB(&bb, vnTable, &value_to_ids)) + modified = true; + } + } + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +bool LocalRedundancyEliminationPass::EliminateRedundanciesInBB( + ir::BasicBlock* block, const ValueNumberTable& vnTable, + std::map* value_to_ids) { + bool modified = false; + + auto func = [this, &vnTable, &modified, value_to_ids](ir::Instruction* inst) { + if (inst->result_id() == 0) { + return; + } + + uint32_t value = vnTable.GetValueNumber(inst); + + if (value == 0) { + return; + } + + auto candidate = value_to_ids->insert({value, inst->result_id()}); + if (!candidate.second) { + context()->KillNamesAndDecorates(inst); + context()->ReplaceAllUsesWith(inst->result_id(), candidate.first->second); + context()->KillInst(inst); + modified = true; + } + }; + block->ForEachInst(func); + return modified; +} +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.h new file mode 100644 index 0000000000000000000000000000000000000000..cc83b60616b3ae43ff4a867591c7129089c97c85 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_redundancy_elimination.h @@ -0,0 +1,65 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_ +#define LIBSPIRV_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_ + +#include "ir_context.h" +#include "pass.h" +#include "value_number_table.h" + +namespace spvtools { +namespace opt { + +// This pass implements local redundancy elimination. Its goal is to reduce the +// number of times the same value is computed. It works on each basic block +// independently, ie local. For each instruction in a basic block, it gets the +// value number for the result id, |id|, of the instruction. If that value +// number has already been computed in the basic block, it tries to replace the +// uses of |id| by the id that already contains the same value. Then the +// current instruction is deleted. +class LocalRedundancyEliminationPass : public Pass { + public: + const char* name() const override { return "local-redundancy-elimination"; } + Status Process(ir::IRContext*) override; + virtual ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisDecorations | + ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisNameMap; + } + + protected: + // Deletes instructions in |block| whose value is in |value_to_ids| or is + // computed earlier in |block|. + // + // |vnTable| must have computed a value number for every result id defined + // in |bb|. + // + // |value_to_ids| is a map from value number to ids. If {vn, id} is in + // |value_to_ids| then vn is the value number of id, and the definition of id + // dominates |bb|. + // + // Returns true if the module is changed. + bool EliminateRedundanciesInBB(ir::BasicBlock* block, + const ValueNumberTable& vnTable, + std::map* value_to_ids); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.cpp index 630fba33c6ee7f404a9e5a858567856f00e1d06c..e55d449a947c6e2d47b2f384aa713fb926b9b420 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.cpp @@ -25,121 +25,106 @@ namespace { const uint32_t kStoreValIdInIdx = 1; -} // anonymous namespace +} // anonymous namespace bool LocalSingleBlockLoadStoreElimPass::HasOnlySupportedRefs(uint32_t ptrId) { - if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) + if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) return true; + if (get_def_use_mgr()->WhileEachUser(ptrId, [this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { + if (!HasOnlySupportedRefs(user->result_id())) { + return false; + } + } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && + !IsNonTypeDecorate(op)) { + return false; + } + return true; + })) { + supported_ref_ptrs_.insert(ptrId); return true; - analysis::UseList* uses = def_use_mgr_->GetUses(ptrId); - assert(uses != nullptr); - for (auto u : *uses) { - SpvOp op = u.inst->opcode(); - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { - if (!HasOnlySupportedRefs(u.inst->result_id())) return false; - } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) - return false; } - supported_ref_ptrs_.insert(ptrId); - return true; + return false; } bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( ir::Function* func) { // Perform local store/load and load/load elimination on each block bool modified = false; + std::vector instructions_to_kill; for (auto bi = func->begin(); bi != func->end(); ++bi) { var2store_.clear(); var2load_.clear(); - pinned_vars_.clear(); - for (auto ii = bi->begin(); ii != bi->end(); ++ii) { + auto next = bi->begin(); + for (auto ii = next; ii != bi->end(); ii = next) { + ++next; switch (ii->opcode()) { - case SpvOpStore: { - // Verify store variable is target type - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - continue; - if (!HasOnlySupportedRefs(varId)) - continue; - // Register the store - if (ptrInst->opcode() == SpvOpVariable) { - // if not pinned, look for WAW - if (pinned_vars_.find(varId) == pinned_vars_.end()) { + case SpvOpStore: { + // Verify store variable is target type + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(&*ii, &varId); + if (!IsTargetVar(varId)) continue; + if (!HasOnlySupportedRefs(varId)) continue; + // Register the store + if (ptrInst->opcode() == SpvOpVariable) { + var2store_[varId] = &*ii; + } else { + assert(IsNonPtrAccessChain(ptrInst->opcode())); + var2store_.erase(varId); + } + var2load_.erase(varId); + } break; + case SpvOpLoad: { + // Verify store variable is target type + uint32_t varId; + ir::Instruction* ptrInst = GetPtr(&*ii, &varId); + if (!IsTargetVar(varId)) continue; + if (!HasOnlySupportedRefs(varId)) continue; + // Look for previous store or load + uint32_t replId = 0; + if (ptrInst->opcode() == SpvOpVariable) { auto si = var2store_.find(varId); if (si != var2store_.end()) { - def_use_mgr_->KillInst(si->second); + replId = si->second->GetSingleWordInOperand(kStoreValIdInIdx); + } else { + auto li = var2load_.find(varId); + if (li != var2load_.end()) { + replId = li->second->result_id(); + } } } - var2store_[varId] = &*ii; - } - else { - assert(IsNonPtrAccessChain(ptrInst->opcode())); - var2store_.erase(varId); - } - pinned_vars_.erase(varId); - var2load_.erase(varId); - } break; - case SpvOpLoad: { - // Verify store variable is target type - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - continue; - if (!HasOnlySupportedRefs(varId)) - continue; - // Look for previous store or load - uint32_t replId = 0; - if (ptrInst->opcode() == SpvOpVariable) { - auto si = var2store_.find(varId); - if (si != var2store_.end()) { - replId = si->second->GetSingleWordInOperand(kStoreValIdInIdx); - } - else { - auto li = var2load_.find(varId); - if (li != var2load_.end()) { - replId = li->second->result_id(); - } + if (replId != 0) { + // replace load's result id and delete load + context()->KillNamesAndDecorates(&*ii); + context()->ReplaceAllUsesWith(ii->result_id(), replId); + instructions_to_kill.push_back(&*ii); + modified = true; + } else { + if (ptrInst->opcode() == SpvOpVariable) + var2load_[varId] = &*ii; // register load } - } - if (replId != 0) { - // replace load's result id and delete load - ReplaceAndDeleteLoad(&*ii, replId); - modified = true; - } - else { - if (ptrInst->opcode() == SpvOpVariable) - var2load_[varId] = &*ii; // register load - pinned_vars_.insert(varId); - } - } break; - case SpvOpFunctionCall: { - // Conservatively assume all locals are redefined for now. - // TODO(): Handle more optimally - var2store_.clear(); - var2load_.clear(); - pinned_vars_.clear(); - } break; - default: - break; + } break; + case SpvOpFunctionCall: { + // Conservatively assume all locals are redefined for now. + // TODO(): Handle more optimally + var2store_.clear(); + var2load_.clear(); + } break; + default: + break; } } - // Go back and delete useless stores in block - // TODO(greg-lunarg): Consider moving DCE into separate pass - for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - if (ii->opcode() != SpvOpStore) - continue; - if (IsLiveStore(&*ii)) - continue; - DCEInst(&*ii); - } } + + for (ir::Instruction* inst : instructions_to_kill) { + context()->KillInst(inst); + } + return modified; } -void LocalSingleBlockLoadStoreElimPass::Initialize(ir::Module* module) { - - module_ = module; +void LocalSingleBlockLoadStoreElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); // Initialize Target Type Caches seen_target_vars_.clear(); @@ -148,21 +133,15 @@ void LocalSingleBlockLoadStoreElimPass::Initialize(ir::Module* module) { // Clear collections supported_ref_ptrs_.clear(); - // TODO(greg-lunarg): Reuse def/use from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - - // Start new ids with next availablein module - InitNextId(); - // Initialize extensions whitelist InitExtensions(); -}; +} bool LocalSingleBlockLoadStoreElimPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } @@ -170,63 +149,69 @@ bool LocalSingleBlockLoadStoreElimPass::AllExtensionsSupported() const { } Pass::Status LocalSingleBlockLoadStoreElimPass::ProcessImpl() { - // Assumes logical addressing only - if (module_->HasCapability(SpvCapabilityAddresses)) + // Assumes relaxed logical addressing only (see instruction.h). + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; + for (auto& ai : get_module()->annotations()) + if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; // If any extensions in the module are not explicitly supported, - // return unmodified. - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Collect all named and decorated ids - FindNamedOrDecoratedIds(); + // return unmodified. + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; // Process all entry point functions ProcessFunction pfn = [this](ir::Function* fp) { return LocalSingleBlockLoadStoreElim(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(); + + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElimPass() {} -Pass::Status LocalSingleBlockLoadStoreElimPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status LocalSingleBlockLoadStoreElimPass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } void LocalSingleBlockLoadStoreElimPass::InitExtensions() { extensions_whitelist_.clear(); extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", }); } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.h index 8116cf6313a86699082978574f2f093108acd33d..fa68788c1348feaf23597a95c1b77122d22ca591 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_block_elim_pass.h @@ -17,18 +17,17 @@ #ifndef LIBSPIRV_OPT_LOCAL_SINGLE_BLOCK_ELIM_PASS_H_ #define LIBSPIRV_OPT_LOCAL_SINGLE_BLOCK_ELIM_PASS_H_ - #include #include #include -#include #include #include +#include #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { @@ -38,11 +37,18 @@ class LocalSingleBlockLoadStoreElimPass : public MemPass { public: LocalSingleBlockLoadStoreElimPass(); const char* name() const override { return "eliminate-local-single-block"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } private: // Return true if all uses of |varId| are only through supported reference - // operations ie. loads and store. Also cache in supported_ref_ptrs_; + // operations ie. loads and store. Also cache in supported_ref_ptrs_. + // TODO(dnovillo): This function is replicated in other passes and it's + // slightly different in every pass. Is it possible to make one common + // implementation? bool HasOnlySupportedRefs(uint32_t varId); // On all entry point functions, within each basic block, eliminate @@ -59,7 +65,7 @@ class LocalSingleBlockLoadStoreElimPass : public MemPass { // Return true if all extensions in this module are supported by this pass. bool AllExtensionsSupported() const; - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); // Map from function scope variable to a store of that variable in the @@ -95,4 +101,3 @@ class LocalSingleBlockLoadStoreElimPass : public MemPass { } // namespace spvtools #endif // LIBSPIRV_OPT_LOCAL_SINGLE_BLOCK_ELIM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.cpp index b9603d936240ecfcac644fcc6887c5bfae483b04..92d6a5223a99f0b8cc332f98ba8366c4398e61bc 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.cpp @@ -18,10 +18,7 @@ #include "cfa.h" #include "iterator.h" -#include "spirv/1.0/GLSL.std.450.h" - -// Universal Limit of ResultID + 1 -static const int kInvalidId = 0x400000; +#include "latest_version_glsl_std_450_header.h" namespace spvtools { namespace opt { @@ -29,246 +26,35 @@ namespace opt { namespace { const uint32_t kStoreValIdInIdx = 1; +const uint32_t kVariableInitIdInIdx = 1; -} // anonymous namespace - -bool LocalSingleStoreElimPass::HasOnlySupportedRefs(uint32_t ptrId) { - if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) - return true; - analysis::UseList* uses = def_use_mgr_->GetUses(ptrId); - assert(uses != nullptr); - for (auto u : *uses) { - SpvOp op = u.inst->opcode(); - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { - if (!HasOnlySupportedRefs(u.inst->result_id())) return false; - } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) - return false; - } - supported_ref_ptrs_.insert(ptrId); - return true; -} +} // anonymous namespace -void LocalSingleStoreElimPass::SingleStoreAnalyze(ir::Function* func) { - ssa_var2store_.clear(); - non_ssa_vars_.clear(); - store2idx_.clear(); - store2blk_.clear(); - for (auto bi = func->begin(); bi != func->end(); ++bi) { - uint32_t instIdx = 0; - for (auto ii = bi->begin(); ii != bi->end(); ++ii, ++instIdx) { - switch (ii->opcode()) { - case SpvOpStore: { - // Verify store variable is target type - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - if (non_ssa_vars_.find(varId) != non_ssa_vars_.end()) - continue; - if (ptrInst->opcode() != SpvOpVariable) { - non_ssa_vars_.insert(varId); - ssa_var2store_.erase(varId); - continue; - } - // Verify target type and function storage class - if (!IsTargetVar(varId)) { - non_ssa_vars_.insert(varId); - continue; - } - if (!HasOnlySupportedRefs(varId)) { - non_ssa_vars_.insert(varId); - continue; - } - // Ignore variables with multiple stores - if (ssa_var2store_.find(varId) != ssa_var2store_.end()) { - non_ssa_vars_.insert(varId); - ssa_var2store_.erase(varId); - continue; - } - // Remember pointer to variable's store and it's - // ordinal position in block - ssa_var2store_[varId] = &*ii; - store2idx_[&*ii] = instIdx; - store2blk_[&*ii] = &*bi; - } break; - default: - break; - } // switch - } - } -} - -LocalSingleStoreElimPass::GetBlocksFunction -LocalSingleStoreElimPass::AugmentedCFGSuccessorsFunction() const { - return [this](const ir::BasicBlock* block) { - auto asmi = augmented_successors_map_.find(block); - if (asmi != augmented_successors_map_.end()) - return &(*asmi).second; - auto smi = successors_map_.find(block); - return &(*smi).second; - }; -} - -LocalSingleStoreElimPass::GetBlocksFunction -LocalSingleStoreElimPass::AugmentedCFGPredecessorsFunction() const { - return [this](const ir::BasicBlock* block) { - auto apmi = augmented_predecessors_map_.find(block); - if (apmi != augmented_predecessors_map_.end()) - return &(*apmi).second; - auto pmi = predecessors_map_.find(block); - return &(*pmi).second; - }; -} - -void LocalSingleStoreElimPass::CalculateImmediateDominators( - ir::Function* func) { - // Compute CFG - vector ordered_blocks; - predecessors_map_.clear(); - successors_map_.clear(); - for (auto& blk : *func) { - ordered_blocks.push_back(&blk); - blk.ForEachSuccessorLabel([&blk, &ordered_blocks, this](uint32_t sbid) { - successors_map_[&blk].push_back(label2block_[sbid]); - predecessors_map_[label2block_[sbid]].push_back(&blk); - }); - } - // Compute Augmented CFG - augmented_successors_map_.clear(); - augmented_predecessors_map_.clear(); - successors_map_[&pseudo_exit_block_] = {}; - predecessors_map_[&pseudo_entry_block_] = {}; - auto succ_func = [this](const ir::BasicBlock* b) - { return &successors_map_[b]; }; - auto pred_func = [this](const ir::BasicBlock* b) - { return &predecessors_map_[b]; }; - CFA::ComputeAugmentedCFG( - ordered_blocks, - &pseudo_entry_block_, - &pseudo_exit_block_, - &augmented_successors_map_, - &augmented_predecessors_map_, - succ_func, - pred_func); - // Compute Dominators - vector postorder; - auto ignore_block = [](cbb_ptr) {}; - auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; - spvtools::CFA::DepthFirstTraversal( - ordered_blocks[0], AugmentedCFGSuccessorsFunction(), - ignore_block, [&](cbb_ptr b) { postorder.push_back(b); }, - ignore_edge); - auto edges = spvtools::CFA::CalculateDominators( - postorder, AugmentedCFGPredecessorsFunction()); - idom_.clear(); - for (auto edge : edges) - idom_[edge.first] = edge.second; -} - -bool LocalSingleStoreElimPass::Dominates( - ir::BasicBlock* blk0, uint32_t idx0, - ir::BasicBlock* blk1, uint32_t idx1) { - if (blk0 == blk1) - return idx0 <= idx1; - ir::BasicBlock* b = blk1; - while (idom_[b] != b) { - b = idom_[b]; - if (b == blk0) - return true; - } - return false; -} - -bool LocalSingleStoreElimPass::SingleStoreProcess(ir::Function* func) { - CalculateImmediateDominators(func); +bool LocalSingleStoreElimPass::LocalSingleStoreElim(ir::Function* func) { bool modified = false; - for (auto bi = func->begin(); bi != func->end(); ++bi) { - uint32_t instIdx = 0; - for (auto ii = bi->begin(); ii != bi->end(); ++ii, ++instIdx) { - if (ii->opcode() != SpvOpLoad) - continue; - uint32_t varId; - ir::Instruction* ptrInst = GetPtr(&*ii, &varId); - // Skip access chain loads - if (ptrInst->opcode() != SpvOpVariable) - continue; - const auto vsi = ssa_var2store_.find(varId); - if (vsi == ssa_var2store_.end()) - continue; - if (non_ssa_vars_.find(varId) != non_ssa_vars_.end()) - continue; - // store must dominate load - if (!Dominates(store2blk_[vsi->second], store2idx_[vsi->second], &*bi, instIdx)) - continue; - // Use store value as replacement id - uint32_t replId = vsi->second->GetSingleWordInOperand(kStoreValIdInIdx); - // replace all instances of the load's id with the SSA value's id - ReplaceAndDeleteLoad(&*ii, replId); - modified = true; - } - } - return modified; -} -bool LocalSingleStoreElimPass::SingleStoreDCE() { - bool modified = false; - for (auto v : ssa_var2store_) { - // check that it hasn't already been DCE'd - if (v.second->opcode() != SpvOpStore) - continue; - if (non_ssa_vars_.find(v.first) != non_ssa_vars_.end()) - continue; - if (!IsLiveStore(v.second)) { - DCEInst(v.second); - modified = true; + // Check all function scope variables in |func|. + ir::BasicBlock* entry_block = &*func->begin(); + for (ir::Instruction& inst : *entry_block) { + if (inst.opcode() != SpvOpVariable) { + break; } + + modified |= ProcessVariable(&inst); } return modified; } -bool LocalSingleStoreElimPass::LocalSingleStoreElim(ir::Function* func) { - bool modified = false; - SingleStoreAnalyze(func); - if (ssa_var2store_.empty()) - return false; - modified |= SingleStoreProcess(func); - modified |= SingleStoreDCE(); - return modified; +void LocalSingleStoreElimPass::Initialize(ir::IRContext* irContext) { + InitializeProcessing(irContext); + InitExtensionWhiteList(); } -void LocalSingleStoreElimPass::Initialize(ir::Module* module) { - module_ = module; - - // Initialize function and block maps - label2block_.clear(); - for (auto& fn : *module_) { - for (auto& blk : fn) { - uint32_t bid = blk.id(); - label2block_[bid] = &blk; - } - } - - // Initialize Target Type Caches - seen_target_vars_.clear(); - seen_non_target_vars_.clear(); - - // Initialize Supported Ref Pointer Cache - supported_ref_ptrs_.clear(); - - // TODO: Reuse def/use (and other state) from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - - // Initialize next unused Id - InitNextId(); - - // Initialize extension whitelist - InitExtensions(); -}; - bool LocalSingleStoreElimPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } @@ -276,68 +62,186 @@ bool LocalSingleStoreElimPass::AllExtensionsSupported() const { } Pass::Status LocalSingleStoreElimPass::ProcessImpl() { - // Assumes logical addressing only - if (module_->HasCapability(SpvCapabilityAddresses)) + // Assumes relaxed logical addressing only (see instruction.h) + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) return Status::SuccessWithoutChange; - // Do not process if module contains OpGroupDecorate. Additional - // support required in KillNamesAndDecorates(). - // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; + // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Collect all named and decorated ids - FindNamedOrDecoratedIds(); + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; // Process all entry point functions ProcessFunction pfn = [this](ir::Function* fp) { return LocalSingleStoreElim(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -LocalSingleStoreElimPass::LocalSingleStoreElimPass() - : pseudo_entry_block_(std::unique_ptr( - new ir::Instruction(SpvOpLabel, 0, 0, {}))), - pseudo_exit_block_(std::unique_ptr( - new ir::Instruction(SpvOpLabel, 0, kInvalidId, {}))) {} +LocalSingleStoreElimPass::LocalSingleStoreElimPass() {} -Pass::Status LocalSingleStoreElimPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status LocalSingleStoreElimPass::Process(ir::IRContext* irContext) { + Initialize(irContext); return ProcessImpl(); } -void LocalSingleStoreElimPass::InitExtensions() { - extensions_whitelist_.clear(); +void LocalSingleStoreElimPass::InitExtensionWhiteList() { extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", + }); +} +bool LocalSingleStoreElimPass::ProcessVariable(ir::Instruction* var_inst) { + vector users; + FindUses(var_inst, &users); + + ir::Instruction* store_inst = FindSingleStoreAndCheckUses(var_inst, users); + + if (store_inst == nullptr) { + return false; + } + + return RewriteLoads(store_inst, users); +} + +ir::Instruction* LocalSingleStoreElimPass::FindSingleStoreAndCheckUses( + ir::Instruction* var_inst, const vector& users) const { + // Make sure there is exactly 1 store. + ir::Instruction* store_inst = nullptr; + + // If |var_inst| has an initializer, then that will count as a store. + if (var_inst->NumInOperands() > 1) { + store_inst = var_inst; + } + + for (ir::Instruction* user : users) { + switch (user->opcode()) { + case SpvOpStore: + // Since we are in the relaxed addressing mode, the use has to be the + // base address of the store, and not the value being store. Otherwise, + // we would have a pointer to a pointer to function scope memory, which + // is not allowed. + if (store_inst == nullptr) { + store_inst = user; + } else { + // More than 1 store. + return nullptr; + } + break; + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + if (FeedsAStore(user)) { + // Has a partial store. Cannot propagate that. + return nullptr; + } + break; + case SpvOpLoad: + case SpvOpImageTexelPointer: + case SpvOpName: + case SpvOpCopyObject: + break; + default: + if (!user->IsDecoration()) { + // Don't know if this instruction modifies the variable. + // Conservatively assume it is a store. + return nullptr; + } + break; + } + } + return store_inst; +} + +void LocalSingleStoreElimPass::FindUses( + const ir::Instruction* var_inst, + std::vector* users) const { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + def_use_mgr->ForEachUser(var_inst, [users, this](ir::Instruction* user) { + users->push_back(user); + if (user->opcode() == SpvOpCopyObject) { + FindUses(user, users); + } + }); +} + +bool LocalSingleStoreElimPass::FeedsAStore(ir::Instruction* inst) const { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + return !def_use_mgr->WhileEachUser(inst, [this](ir::Instruction* user) { + switch (user->opcode()) { + case SpvOpStore: + return false; + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + case SpvOpCopyObject: + return !FeedsAStore(user); + case SpvOpLoad: + case SpvOpImageTexelPointer: + case SpvOpName: + return true; + default: + // Don't know if this instruction modifies the variable. + // Conservatively assume it is a store. + return user->IsDecoration(); + } }); } +bool LocalSingleStoreElimPass::RewriteLoads( + ir::Instruction* store_inst, const std::vector& uses) { + ir::BasicBlock* store_block = context()->get_instr_block(store_inst); + opt::DominatorAnalysis* dominator_analysis = + context()->GetDominatorAnalysis(store_block->GetParent()); + + uint32_t stored_id; + if (store_inst->opcode() == SpvOpStore) + stored_id = store_inst->GetSingleWordInOperand(kStoreValIdInIdx); + else + stored_id = store_inst->GetSingleWordInOperand(kVariableInitIdInIdx); + + std::vector uses_in_store_block; + bool modified = false; + for (ir::Instruction* use : uses) { + if (use->opcode() == SpvOpLoad) { + if (dominator_analysis->Dominates(store_inst, use)) { + modified = true; + context()->KillNamesAndDecorates(use->result_id()); + context()->ReplaceAllUsesWith(use->result_id(), stored_id); + context()->KillInst(use); + } + } + } + + return modified; +} + } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.h index 4d52112e013f5834e235126330ab8b77110d772f..00f4a813b5b01b3549caa576262886328d981740 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_single_store_elim_pass.h @@ -17,7 +17,6 @@ #ifndef LIBSPIRV_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_ #define LIBSPIRV_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_ - #include #include #include @@ -27,63 +26,26 @@ #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { // See optimizer.hpp for documentation. -class LocalSingleStoreElimPass : public MemPass { +class LocalSingleStoreElimPass : public Pass { using cbb_ptr = const ir::BasicBlock*; public: LocalSingleStoreElimPass(); const char* name() const override { return "eliminate-local-single-store"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext* irContext) override; - private: - // Return true if all refs through |ptrId| are only loads or stores and - // cache ptrId in supported_ref_ptrs_. - bool HasOnlySupportedRefs(uint32_t ptrId); - - // Find all function scope variables in |func| that are stored to - // only once (SSA) and map to their stored value id. Only analyze - // variables of scalar, vector, matrix types and struct and array - // types comprising only these types. Currently this analysis is - // is not done in the presence of function calls. TODO(): Allow - // analysis in the presence of function calls. - void SingleStoreAnalyze(ir::Function* func); - - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; - - /// Returns the block successors function for the augmented CFG. - GetBlocksFunction AugmentedCFGSuccessorsFunction() const; - - /// Returns the block predecessors function for the augmented CFG. - GetBlocksFunction AugmentedCFGPredecessorsFunction() const; - - // Calculate immediate dominators for |func|'s CFG. Leaves result - // in idom_. Entries for augmented CFG (pseudo blocks) are not created. - void CalculateImmediateDominators(ir::Function* func); - - // Return true if instruction in |blk0| at ordinal position |idx0| - // dominates instruction in |blk1| at position |idx1|. - bool Dominates(ir::BasicBlock* blk0, uint32_t idx0, - ir::BasicBlock* blk1, uint32_t idx1); - - // For each load of an SSA variable in |func|, replace all uses of - // the load with the value stored if the store dominates the load. - // Assumes that SingleStoreAnalyze() has just been run. Return true - // if any instructions are modified. - bool SingleStoreProcess(ir::Function* func); - - // Remove all stores to useless SSA variables. Remove useless - // access chains and variables as well. Assumes SingleStoreAnalyze - // and SingleStoreProcess has been run. - bool SingleStoreDCE(); + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse; + } + private: // Do "single-store" optimization of function variables defined only // with a single non-access-chain store in |func|. Replace all their // non-access-chain loads with the value that is stored and eliminate @@ -91,58 +53,42 @@ class LocalSingleStoreElimPass : public MemPass { bool LocalSingleStoreElim(ir::Function* func); // Initialize extensions whitelist - void InitExtensions(); + void InitExtensionWhiteList(); // Return true if all extensions in this module are allowed by this pass. bool AllExtensionsSupported() const; - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* irContext); Pass::Status ProcessImpl(); - // Map from block's label id to block - std::unordered_map label2block_; - - // Map from SSA Variable to its single store - std::unordered_map ssa_var2store_; - - // Map from store to its ordinal position in its block. - std::unordered_map store2idx_; - - // Map from store to its block. - std::unordered_map store2blk_; - - // Set of non-SSA Variables - std::unordered_set non_ssa_vars_; - - // Variables with only supported references, ie. loads and stores using - // variable directly or through non-ptr access chains. - std::unordered_set supported_ref_ptrs_; - - // Augmented CFG Entry Block - ir::BasicBlock pseudo_entry_block_; - - // Augmented CFG Exit Block - ir::BasicBlock pseudo_exit_block_; - - // CFG Predecessors - std::unordered_map> - predecessors_map_; - - // CFG Successors - std::unordered_map> - successors_map_; - - // CFG Augmented Predecessors - std::unordered_map> - augmented_predecessors_map_; - - // CFG Augmented Successors - std::unordered_map> - augmented_successors_map_; - - // Immediate Dominator Map - // If block has no idom it points to itself. - std::unordered_map idom_; + // If there is a single store to |var_inst|, and it covers the entire + // variable, then replace all of the loads of the entire variable that are + // dominated by the store by the value that was stored. Returns true if the + // module was changed. + bool ProcessVariable(ir::Instruction* var_inst); + + // Collects all of the uses of |var_inst| into |uses|. This looks through + // OpObjectCopy's that copy the address of the variable, and collects those + // uses as well. + void FindUses(const ir::Instruction* var_inst, + std::vector* uses) const; + + // Returns a store to |var_inst| if + // - it is a store to the entire variable, + // - and there are no other instructions that may modify |var_inst|. + ir::Instruction* FindSingleStoreAndCheckUses( + ir::Instruction* var_inst, + const std::vector& users) const; + + // Returns true if the address that results from |inst| may be used as a base + // address in a store instruction or may be used to compute the base address + // of a store instruction. + bool FeedsAStore(ir::Instruction* inst) const; + + // Replaces all of the loads in |uses| by the value stored in |store_inst|. + // The load instructions are then killed. + bool RewriteLoads(ir::Instruction* store_inst, + const std::vector& uses); // Extensions supported by this pass. std::unordered_set extensions_whitelist_; @@ -152,4 +98,3 @@ class LocalSingleStoreElimPass : public MemPass { } // namespace spvtools #endif // LIBSPIRV_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.cpp index bea8bbf0f505b529d9de05ae73b10f05829aa021..14c14bd3bdcc58ee8dc4da0bc68ded49345eab4e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.cpp @@ -16,520 +16,25 @@ #include "local_ssa_elim_pass.h" -#include "iterator.h" #include "cfa.h" +#include "iterator.h" +#include "ssa_rewrite_pass.h" namespace spvtools { namespace opt { -namespace { - -const uint32_t kStoreValIdInIdx = 1; -const uint32_t kTypePointerTypeIdInIdx = 1; -const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeContinueBlockIdInIdx = 1; - -} // anonymous namespace - -bool LocalMultiStoreElimPass::HasOnlySupportedRefs(uint32_t varId) { - if (supported_ref_vars_.find(varId) != supported_ref_vars_.end()) - return true; - analysis::UseList* uses = def_use_mgr_->GetUses(varId); - if (uses == nullptr) - return true; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) - return false; - } - supported_ref_vars_.insert(varId); - return true; -} - -void LocalMultiStoreElimPass::InitSSARewrite(ir::Function& func) { - // Init predecessors - label2preds_.clear(); - for (auto& blk : func) { - uint32_t blkId = blk.id(); - blk.ForEachSuccessorLabel([&blkId, this](uint32_t sbid) { - label2preds_[sbid].push_back(blkId); - }); - } - // Collect target (and non-) variable sets. Remove variables with - // non-load/store refs from target variable set - for (auto& blk : func) { - for (auto& inst : blk) { - switch (inst.opcode()) { - case SpvOpStore: - case SpvOpLoad: { - uint32_t varId; - (void) GetPtr(&inst, &varId); - if (!IsTargetVar(varId)) - break; - if (HasOnlySupportedRefs(varId)) - break; - seen_non_target_vars_.insert(varId); - seen_target_vars_.erase(varId); - } break; - default: - break; - } - } - } -} - -uint32_t LocalMultiStoreElimPass::MergeBlockIdIfAny(const ir::BasicBlock& blk, - uint32_t* cbid) { - auto merge_ii = blk.cend(); - --merge_ii; - *cbid = 0; - uint32_t mbid = 0; - if (merge_ii != blk.cbegin()) { - --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) { - mbid = merge_ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); - *cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); - } - else if (merge_ii->opcode() == SpvOpSelectionMerge) { - mbid = merge_ii->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); - } - } - return mbid; -} - -void LocalMultiStoreElimPass::ComputeStructuredSuccessors(ir::Function* func) { - block2structured_succs_.clear(); - for (auto& blk : *func) { - // If no predecessors in function, make successor to pseudo entry - if (label2preds_[blk.id()].size() == 0) - block2structured_succs_[&pseudo_entry_block_].push_back(&blk); - // If header, make merge block first successor. - uint32_t cbid; - const uint32_t mbid = MergeBlockIdIfAny(blk, &cbid); - if (mbid != 0) { - block2structured_succs_[&blk].push_back(id2block_[mbid]); - if (cbid != 0) - block2structured_succs_[&blk].push_back(id2block_[cbid]); - } - // add true successors - blk.ForEachSuccessorLabel([&blk, this](uint32_t sbid) { - block2structured_succs_[&blk].push_back(id2block_[sbid]); - }); - } -} - -void LocalMultiStoreElimPass::ComputeStructuredOrder( - ir::Function* func, std::list* order) { - // Compute structured successors and do DFS - ComputeStructuredSuccessors(func); - auto ignore_block = [](cbb_ptr) {}; - auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; - auto get_structured_successors = [this](const ir::BasicBlock* block) { - return &(block2structured_succs_[block]); }; - // TODO(greg-lunarg): Get rid of const_cast by making moving const - // out of the cfa.h prototypes and into the invoking code. - auto post_order = [&](cbb_ptr b) { - order->push_front(const_cast(b)); }; - - spvtools::CFA::DepthFirstTraversal( - &pseudo_entry_block_, get_structured_successors, ignore_block, - post_order, ignore_edge); -} - -void LocalMultiStoreElimPass::SSABlockInitSinglePred(ir::BasicBlock* block_ptr) { - // Copy map entry from single predecessor - const uint32_t label = block_ptr->id(); - const uint32_t predLabel = label2preds_[label].front(); - assert(visitedBlocks_.find(predLabel) != visitedBlocks_.end()); - label2ssa_map_[label] = label2ssa_map_[predLabel]; -} - -bool LocalMultiStoreElimPass::IsLiveAfter(uint32_t var_id, uint32_t label) const { - // For now, return very conservative result: true. This will result in - // correct, but possibly usused, phi code to be generated. A subsequent - // DCE pass should eliminate this code. - // TODO(greg-lunarg): Return more accurate information - (void) var_id; - (void) label; - return true; -} - -uint32_t LocalMultiStoreElimPass::Type2Undef(uint32_t type_id) { - const auto uitr = type2undefs_.find(type_id); - if (uitr != type2undefs_.end()) - return uitr->second; - const uint32_t undefId = TakeNextId(); - std::unique_ptr undef_inst( - new ir::Instruction(SpvOpUndef, type_id, undefId, {})); - def_use_mgr_->AnalyzeInstDefUse(&*undef_inst); - module_->AddGlobalValue(std::move(undef_inst)); - type2undefs_[type_id] = undefId; - return undefId; -} - -uint32_t LocalMultiStoreElimPass::GetPointeeTypeId( - const ir::Instruction* ptrInst) const { - const uint32_t ptrTypeId = ptrInst->type_id(); - const ir::Instruction* ptrTypeInst = def_use_mgr_->GetDef(ptrTypeId); - return ptrTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); -} - -void LocalMultiStoreElimPass::SSABlockInitLoopHeader( - std::list::iterator block_itr) { - const uint32_t label = (*block_itr)->id(); - // Determine backedge label. - uint32_t backLabel = 0; - for (uint32_t predLabel : label2preds_[label]) - if (visitedBlocks_.find(predLabel) == visitedBlocks_.end()) { - assert(backLabel == 0); - backLabel = predLabel; - break; - } - assert(backLabel != 0); - // Determine merge block. - auto mergeInst = (*block_itr)->end(); - --mergeInst; - --mergeInst; - uint32_t mergeLabel = mergeInst->GetSingleWordInOperand( - kLoopMergeMergeBlockIdInIdx); - // Collect all live variables and a default value for each across all - // non-backedge predecesors. Must be ordered map because phis are - // generated based on order and test results will otherwise vary across - // platforms. - std::map liveVars; - for (uint32_t predLabel : label2preds_[label]) { - for (auto var_val : label2ssa_map_[predLabel]) { - uint32_t varId = var_val.first; - liveVars[varId] = var_val.second; - } - } - // Add all stored variables in loop. Set their default value id to zero. - for (auto bi = block_itr; (*bi)->id() != mergeLabel; ++bi) { - ir::BasicBlock* bp = *bi; - for (auto ii = bp->begin(); ii != bp->end(); ++ii) { - if (ii->opcode() != SpvOpStore) - continue; - uint32_t varId; - (void) GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - continue; - liveVars[varId] = 0; - } - } - // Insert phi for all live variables that require them. All variables - // defined in loop require a phi. Otherwise all variables - // with differing predecessor values require a phi. - auto insertItr = (*block_itr)->begin(); - for (auto var_val : liveVars) { - const uint32_t varId = var_val.first; - if (!IsLiveAfter(varId, label)) - continue; - const uint32_t val0Id = var_val.second; - bool needsPhi = false; - if (val0Id != 0) { - for (uint32_t predLabel : label2preds_[label]) { - // Skip back edge predecessor. - if (predLabel == backLabel) - continue; - const auto var_val_itr = label2ssa_map_[predLabel].find(varId); - // Missing (undef) values always cause difference with (defined) value - if (var_val_itr == label2ssa_map_[predLabel].end()) { - needsPhi = true; - break; - } - if (var_val_itr->second != val0Id) { - needsPhi = true; - break; - } - } - } - else { - needsPhi = true; - } - // If val is the same for all predecessors, enter it in map - if (!needsPhi) { - label2ssa_map_[label].insert(var_val); - continue; - } - // Val differs across predecessors. Add phi op to block and - // add its result id to the map. For back edge predecessor, - // use the variable id. We will patch this after visiting back - // edge predecessor. For predecessors that do not define a value, - // use undef. - std::vector phi_in_operands; - uint32_t typeId = GetPointeeTypeId(def_use_mgr_->GetDef(varId)); - for (uint32_t predLabel : label2preds_[label]) { - uint32_t valId; - if (predLabel == backLabel) { - valId = varId; - } - else { - const auto var_val_itr = label2ssa_map_[predLabel].find(varId); - if (var_val_itr == label2ssa_map_[predLabel].end()) - valId = Type2Undef(typeId); - else - valId = var_val_itr->second; - } - phi_in_operands.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}); - phi_in_operands.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {predLabel}}); - } - const uint32_t phiId = TakeNextId(); - std::unique_ptr newPhi( - new ir::Instruction(SpvOpPhi, typeId, phiId, phi_in_operands)); - // The only phis requiring patching are the ones we create. - phis_to_patch_.insert(phiId); - // Only analyze the phi define now; analyze the phi uses after the - // phi backedge predecessor value is patched. - def_use_mgr_->AnalyzeInstDef(&*newPhi); - insertItr = insertItr.InsertBefore(std::move(newPhi)); - ++insertItr; - label2ssa_map_[label].insert({ varId, phiId }); - } -} - -void LocalMultiStoreElimPass::SSABlockInitMultiPred(ir::BasicBlock* block_ptr) { - const uint32_t label = block_ptr->id(); - // Collect all live variables and a default value for each across all - // predecesors. Must be ordered map because phis are generated based on - // order and test results will otherwise vary across platforms. - std::map liveVars; - for (uint32_t predLabel : label2preds_[label]) { - assert(visitedBlocks_.find(predLabel) != visitedBlocks_.end()); - for (auto var_val : label2ssa_map_[predLabel]) { - const uint32_t varId = var_val.first; - liveVars[varId] = var_val.second; - } - } - // For each live variable, look for a difference in values across - // predecessors that would require a phi and insert one. - auto insertItr = block_ptr->begin(); - for (auto var_val : liveVars) { - const uint32_t varId = var_val.first; - if (!IsLiveAfter(varId, label)) - continue; - const uint32_t val0Id = var_val.second; - bool differs = false; - for (uint32_t predLabel : label2preds_[label]) { - const auto var_val_itr = label2ssa_map_[predLabel].find(varId); - // Missing values cause a difference because we'll need to create an - // undef for that predecessor. - if (var_val_itr == label2ssa_map_[predLabel].end()) { - differs = true; - break; - } - if (var_val_itr->second != val0Id) { - differs = true; - break; - } - } - // If val is the same for all predecessors, enter it in map - if (!differs) { - label2ssa_map_[label].insert(var_val); - continue; - } - // Val differs across predecessors. Add phi op to block and - // add its result id to the map - std::vector phi_in_operands; - const uint32_t typeId = GetPointeeTypeId(def_use_mgr_->GetDef(varId)); - for (uint32_t predLabel : label2preds_[label]) { - const auto var_val_itr = label2ssa_map_[predLabel].find(varId); - // If variable not defined on this path, use undef - const uint32_t valId = (var_val_itr != label2ssa_map_[predLabel].end()) ? - var_val_itr->second : Type2Undef(typeId); - phi_in_operands.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}); - phi_in_operands.push_back( - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {predLabel}}); - } - const uint32_t phiId = TakeNextId(); - std::unique_ptr newPhi( - new ir::Instruction(SpvOpPhi, typeId, phiId, phi_in_operands)); - def_use_mgr_->AnalyzeInstDefUse(&*newPhi); - insertItr = insertItr.InsertBefore(std::move(newPhi)); - ++insertItr; - label2ssa_map_[label].insert({varId, phiId}); - } -} - -bool LocalMultiStoreElimPass::IsLoopHeader(ir::BasicBlock* block_ptr) const { - auto iItr = block_ptr->end(); - --iItr; - if (iItr == block_ptr->begin()) - return false; - --iItr; - return iItr->opcode() == SpvOpLoopMerge; -} - -void LocalMultiStoreElimPass::SSABlockInit( - std::list::iterator block_itr) { - const size_t numPreds = label2preds_[(*block_itr)->id()].size(); - if (numPreds == 0) - return; - if (numPreds == 1) - SSABlockInitSinglePred(*block_itr); - else if (IsLoopHeader(*block_itr)) - SSABlockInitLoopHeader(block_itr); - else - SSABlockInitMultiPred(*block_itr); -} - -void LocalMultiStoreElimPass::PatchPhis(uint32_t header_id, uint32_t back_id) { - ir::BasicBlock* header = id2block_[header_id]; - auto phiItr = header->begin(); - for (; phiItr->opcode() == SpvOpPhi; ++phiItr) { - // Only patch phis that we created in a loop header. - // There might be other phis unrelated to our optimizations. - if (0 == phis_to_patch_.count(phiItr->result_id())) continue; - - // Find phi operand index for back edge - uint32_t cnt = 0; - uint32_t idx = phiItr->NumInOperands(); - phiItr->ForEachInId([&cnt,&back_id,&idx](uint32_t* iid) { - if (cnt % 2 == 1 && *iid == back_id) idx = cnt - 1; - ++cnt; - }); - assert(idx != phiItr->NumInOperands()); - // Replace temporary phi operand with variable's value in backedge block - // map. Use undef if variable not in map. - const uint32_t varId = phiItr->GetSingleWordInOperand(idx); - const auto valItr = label2ssa_map_[back_id].find(varId); - uint32_t valId = - (valItr != label2ssa_map_[back_id].end()) - ? valItr->second - : Type2Undef(GetPointeeTypeId(def_use_mgr_->GetDef(varId))); - phiItr->SetInOperand(idx, {valId}); - // Analyze uses now that they are complete - def_use_mgr_->AnalyzeInstUse(&*phiItr); - } -} - -bool LocalMultiStoreElimPass::EliminateMultiStoreLocal(ir::Function* func) { - InitSSARewrite(*func); - // Process all blocks in structured order. This is just one way (the - // simplest?) to make sure all predecessors blocks are processed before - // a block itself. - std::list structuredOrder; - ComputeStructuredOrder(func, &structuredOrder); - bool modified = false; - for (auto bi = structuredOrder.begin(); bi != structuredOrder.end(); ++bi) { - // Skip pseudo entry block - if (*bi == &pseudo_entry_block_) - continue; - // Initialize this block's label2ssa_map_ entry using predecessor maps. - // Then process all stores and loads of targeted variables. - SSABlockInit(bi); - ir::BasicBlock* bp = *bi; - const uint32_t label = bp->id(); - for (auto ii = bp->begin(); ii != bp->end(); ++ii) { - switch (ii->opcode()) { - case SpvOpStore: { - uint32_t varId; - (void) GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - break; - // Register new stored value for the variable - label2ssa_map_[label][varId] = - ii->GetSingleWordInOperand(kStoreValIdInIdx); - } break; - case SpvOpLoad: { - uint32_t varId; - (void) GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - break; - uint32_t replId = 0; - const auto ssaItr = label2ssa_map_.find(label); - if (ssaItr != label2ssa_map_.end()) { - const auto valItr = ssaItr->second.find(varId); - if (valItr != ssaItr->second.end()) - replId = valItr->second; - } - // If variable is not defined, use undef - if (replId == 0) { - replId = Type2Undef(GetPointeeTypeId(def_use_mgr_->GetDef(varId))); - } - // Replace load's id with the last stored value id for variable - // and delete load. Kill any names or decorates using id before - // replacing to prevent incorrect replacement in those instructions. - const uint32_t loadId = ii->result_id(); - KillNamesAndDecorates(loadId); - (void)def_use_mgr_->ReplaceAllUsesWith(loadId, replId); - def_use_mgr_->KillInst(&*ii); - modified = true; - } break; - default: { - } break; - } - } - visitedBlocks_.insert(label); - // Look for successor backedge and patch phis in loop header - // if found. - uint32_t header = 0; - bp->ForEachSuccessorLabel([&header,this](uint32_t succ) { - if (visitedBlocks_.find(succ) == visitedBlocks_.end()) return; - assert(header == 0); - header = succ; - }); - if (header != 0) - PatchPhis(header, label); - } - // Remove all target variable stores. - for (auto bi = func->begin(); bi != func->end(); ++bi) { - for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - if (ii->opcode() != SpvOpStore) - continue; - uint32_t varId; - (void) GetPtr(&*ii, &varId); - if (!IsTargetVar(varId)) - continue; - assert(!HasLoads(varId)); - DCEInst(&*ii); - modified = true; - } - } - return modified; -} - -void LocalMultiStoreElimPass::Initialize(ir::Module* module) { - - module_ = module; - - // TODO(greg-lunarg): Reuse def/use from previous passes - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module_)); - - // Initialize function and block maps - id2block_.clear(); - block2structured_succs_.clear(); - for (auto& fn : *module_) - for (auto& blk : fn) - id2block_[blk.id()] = &blk; - - // Clear collections - seen_target_vars_.clear(); - seen_non_target_vars_.clear(); - visitedBlocks_.clear(); - type2undefs_.clear(); - supported_ref_vars_.clear(); - block2structured_succs_.clear(); - label2preds_.clear(); - label2ssa_map_.clear(); - phis_to_patch_.clear(); - - // Start new ids with next availablein module - InitNextId(); +void LocalMultiStoreElimPass::Initialize(ir::IRContext* c) { + InitializeProcessing(c); // Initialize extension whitelist InitExtensions(); -}; +} bool LocalMultiStoreElimPass::AllExtensionsSupported() const { // If any extension not in whitelist, return false - for (auto& ei : module_->extensions()) { - const char* extName = reinterpret_cast( - &ei.GetInOperand(0).words[0]); + for (auto& ei : get_module()->extensions()) { + const char* extName = + reinterpret_cast(&ei.GetInOperand(0).words[0]); if (extensions_whitelist_.find(extName) == extensions_whitelist_.end()) return false; } @@ -537,72 +42,70 @@ bool LocalMultiStoreElimPass::AllExtensionsSupported() const { } Pass::Status LocalMultiStoreElimPass::ProcessImpl() { - // Assumes all control flow structured. - // TODO(greg-lunarg): Do SSA rewrite for non-structured control flow - if (!module_->HasCapability(SpvCapabilityShader)) - return Status::SuccessWithoutChange; - // Assumes logical addressing only + // Assumes relaxed logical addressing only (see instruction.h) // TODO(greg-lunarg): Add support for physical addressing - if (module_->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) - return Status::SuccessWithoutChange; + for (auto& ai : get_module()->annotations()) + if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; // Do not process if any disallowed extensions are enabled - if (!AllExtensionsSupported()) - return Status::SuccessWithoutChange; - // Collect all named and decorated ids - FindNamedOrDecoratedIds(); + if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; // Process functions ProcessFunction pfn = [this](ir::Function* fp) { - return EliminateMultiStoreLocal(fp); + return SSARewriter(this).RewriteFunctionIntoSSA(fp); }; - bool modified = ProcessEntryPointCallTree(pfn, module_); - FinalizeNextId(); + bool modified = ProcessEntryPointCallTree(pfn, get_module()); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -LocalMultiStoreElimPass::LocalMultiStoreElimPass() - : pseudo_entry_block_(std::unique_ptr( - new ir::Instruction(SpvOpLabel, 0, 0, {}))) {} +LocalMultiStoreElimPass::LocalMultiStoreElimPass() {} -Pass::Status LocalMultiStoreElimPass::Process(ir::Module* module) { - Initialize(module); +Pass::Status LocalMultiStoreElimPass::Process(ir::IRContext* c) { + Initialize(c); return ProcessImpl(); } void LocalMultiStoreElimPass::InitExtensions() { extensions_whitelist_.clear(); extensions_whitelist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", + "SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", }); } } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.h index 0a90fea439c265fd658c5a19bc9401fdb141e3c4..c3f70f62c8464354698c840a0ffcb777fbce5dd3 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/local_ssa_elim_pass.h @@ -17,18 +17,17 @@ #ifndef LIBSPIRV_OPT_LOCAL_SSA_ELIM_PASS_H_ #define LIBSPIRV_OPT_LOCAL_SSA_ELIM_PASS_H_ - #include #include #include -#include #include #include +#include #include "basic_block.h" #include "def_use_manager.h" -#include "module.h" #include "mem_pass.h" +#include "module.h" namespace spvtools { namespace opt { @@ -38,142 +37,28 @@ class LocalMultiStoreElimPass : public MemPass { using cbb_ptr = const ir::BasicBlock*; public: - using GetBlocksFunction = - std::function*(const ir::BasicBlock*)>; + using GetBlocksFunction = + std::function*(const ir::BasicBlock*)>; LocalMultiStoreElimPass(); const char* name() const override { return "eliminate-local-multi-store"; } - Status Process(ir::Module*) override; - - private: - // Return type id for |ptrInst|'s pointee - uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst) const; - - // Return true if all uses of |varId| are only through supported reference - // operations ie. loads and store. Also cache in supported_ref_vars_; - bool HasOnlySupportedRefs(uint32_t varId); - - // Initialize data structures used by EliminateLocalMultiStore for - // function |func|, specifically block predecessors and target variables. - void InitSSARewrite(ir::Function& func); - - // Returns the id of the merge block declared by a merge instruction in - // this block, if any. If none, returns zero. - uint32_t MergeBlockIdIfAny(const ir::BasicBlock& blk, uint32_t* cbid); - - // Compute structured successors for function |func|. - // A block's structured successors are the blocks it branches to - // together with its declared merge block if it has one. - // When order matters, the merge block always appears first. - // This assures correct depth first search in the presence of early - // returns and kills. If the successor vector contain duplicates - // if the merge block, they are safely ignored by DFS. - void ComputeStructuredSuccessors(ir::Function* func); - - // Compute structured block order for |func| into |structuredOrder|. This - // order has the property that dominators come before all blocks they - // dominate and merge blocks come after all blocks that are in the control - // constructs of their header. - void ComputeStructuredOrder(ir::Function* func, - std::list* order); - - // Return true if loop header block - bool IsLoopHeader(ir::BasicBlock* block_ptr) const; - - // Initialize label2ssa_map_ entry for block |block_ptr| with single - // predecessor. - void SSABlockInitSinglePred(ir::BasicBlock* block_ptr); - - // Return true if variable is loaded in block with |label| or in - // any succeeding block in structured order. - bool IsLiveAfter(uint32_t var_id, uint32_t label) const; - - // Initialize label2ssa_map_ entry for loop header block pointed to - // |block_itr| by merging entries from all predecessors. If any value - // ids differ for any variable across predecessors, create a phi function - // in the block and use that value id for the variable in the new map. - // Assumes all predecessors have been visited by EliminateLocalMultiStore - // except the back edge. Use a dummy value in the phi for the back edge - // until the back edge block is visited and patch the phi value then. - void SSABlockInitLoopHeader(std::list::iterator block_itr); + Status Process(ir::IRContext* c) override; - // Initialize label2ssa_map_ entry for multiple predecessor block - // |block_ptr| by merging label2ssa_map_ entries for all predecessors. - // If any value ids differ for any variable across predecessors, create - // a phi function in the block and use that value id for the variable in - // the new map. Assumes all predecessors have been visited by - // EliminateLocalMultiStore. - void SSABlockInitMultiPred(ir::BasicBlock* block_ptr); - - // Initialize the label2ssa_map entry for a block pointed to by |block_itr|. - // Insert phi instructions into block when necessary. All predecessor - // blocks must have been visited by EliminateLocalMultiStore except for - // backedges. - void SSABlockInit(std::list::iterator block_itr); - - // Return undef in function for type. Create and insert an undef after the - // first non-variable in the function if it doesn't already exist. Add - // undef to function undef map. - uint32_t Type2Undef(uint32_t type_id); - - // Patch phis in loop header block |header_id| now that the map is complete - // for the backedge predecessor |back_id|. Specifically, for each phi, find - // the value corresponding to the backedge predecessor. That was temporarily - // set with the variable id that this phi corresponds to. Change this phi - // operand to the the value which corresponds to that variable in the - // predecessor map. - void PatchPhis(uint32_t header_id, uint32_t back_id); + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping; + } + private: // Initialize extensions whitelist void InitExtensions(); // Return true if all extensions in this module are allowed by this pass. bool AllExtensionsSupported() const; - // Remove remaining loads and stores of function scope variables only - // referenced with non-access-chain loads and stores from function |func|. - // Insert Phi functions where necessary. Running LocalAccessChainRemoval, - // SingleBlockLocalElim and SingleStoreLocalElim beforehand will improve - // the runtime and effectiveness of this function. - bool EliminateMultiStoreLocal(ir::Function* func); - - void Initialize(ir::Module* module); + void Initialize(ir::IRContext* c); Pass::Status ProcessImpl(); - // Map from block's label id to block. - std::unordered_map id2block_; - - // Set of label ids of visited blocks - std::unordered_set visitedBlocks_; - - // Map from type to undef - std::unordered_map type2undefs_; - - // Variables that are only referenced by supported operations for this - // pass ie. loads and stores. - std::unordered_set supported_ref_vars_; - - // Map from block to its structured successor blocks. See - // ComputeStructuredSuccessors() for definition. - std::unordered_map> - block2structured_succs_; - - // Map from block's label id to its predecessor blocks ids - std::unordered_map> label2preds_; - - // Map from block's label id to a map of a variable to its value at the - // end of the block. - std::unordered_map> - label2ssa_map_; - - // The Ids of OpPhi instructions that are in a loop header and which require - // patching of the value for the loop back-edge. - std::unordered_set phis_to_patch_; - - // Extra block whose successors are all blocks with no predecessors - // in function. - ir::BasicBlock pseudo_entry_block_; - // Extensions supported by this pass. std::unordered_set extensions_whitelist_; }; @@ -182,4 +67,3 @@ class LocalMultiStoreElimPass : public MemPass { } // namespace spvtools #endif // LIBSPIRV_OPT_LOCAL_SSA_ELIM_PASS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53997a9c9493f7b0f40df605bf92ab988306fc9c --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.cpp @@ -0,0 +1,1627 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/loop_dependence.h" + +#include +#include +#include +#include +#include +#include + +#include "opt/instruction.h" +#include "opt/scalar_analysis.h" +#include "opt/scalar_analysis_nodes.h" + +namespace spvtools { +namespace opt { + +using SubscriptPair = std::pair; + +namespace { + +// Calculate the greatest common divisor of a & b using Stein's algorithm. +// https://en.wikipedia.org/wiki/Binary_GCD_algorithm +int64_t GreatestCommonDivisor(int64_t a, int64_t b) { + // Simple cases + if (a == b) { + return a; + } else if (a == 0) { + return b; + } else if (b == 0) { + return a; + } + + // Both even + if (a % 2 == 0 && b % 2 == 0) { + return 2 * GreatestCommonDivisor(a / 2, b / 2); + } + + // Even a, odd b + if (a % 2 == 0 && b % 2 == 1) { + return GreatestCommonDivisor(a / 2, b); + } + + // Odd a, even b + if (a % 2 == 1 && b % 2 == 0) { + return GreatestCommonDivisor(a, b / 2); + } + + // Both odd, reduce the larger argument + if (a > b) { + return GreatestCommonDivisor((a - b) / 2, b); + } else { + return GreatestCommonDivisor((b - a) / 2, a); + } +} + +// Check if node is affine, ie in the form: a0*i0 + a1*i1 + ... an*in + c +// and contains only the following types of nodes: SERecurrentNode, SEAddNode +// and SEConstantNode +bool IsInCorrectFormForGCDTest(SENode* node) { + bool children_ok = true; + + if (auto add_node = node->AsSEAddNode()) { + for (auto child : add_node->GetChildren()) { + children_ok &= IsInCorrectFormForGCDTest(child); + } + } + + bool this_ok = node->AsSERecurrentNode() || node->AsSEAddNode() || + node->AsSEConstantNode(); + + return children_ok && this_ok; +} + +// If |node| is an SERecurrentNode then returns |node| or if |node| is an +// SEAddNode returns a vector of SERecurrentNode that are its children. +std::vector GetAllTopLevelRecurrences(SENode* node) { + auto nodes = std::vector{}; + if (auto recurrent_node = node->AsSERecurrentNode()) { + nodes.push_back(recurrent_node); + } + + if (auto add_node = node->AsSEAddNode()) { + for (auto child : add_node->GetChildren()) { + auto child_nodes = GetAllTopLevelRecurrences(child); + nodes.insert(nodes.end(), child_nodes.begin(), child_nodes.end()); + } + } + + return nodes; +} + +// If |node| is an SEConstantNode then returns |node| or if |node| is an +// SEAddNode returns a vector of SEConstantNode that are its children. +std::vector GetAllTopLevelConstants(SENode* node) { + auto nodes = std::vector{}; + if (auto recurrent_node = node->AsSEConstantNode()) { + nodes.push_back(recurrent_node); + } + + if (auto add_node = node->AsSEAddNode()) { + for (auto child : add_node->GetChildren()) { + auto child_nodes = GetAllTopLevelConstants(child); + nodes.insert(nodes.end(), child_nodes.begin(), child_nodes.end()); + } + } + + return nodes; +} + +bool AreOffsetsAndCoefficientsConstant( + const std::vector& nodes) { + for (auto node : nodes) { + if (!node->GetOffset()->AsSEConstantNode() || + !node->GetOffset()->AsSEConstantNode()) { + return false; + } + } + return true; +} + +// Fold all SEConstantNode that appear in |recurrences| and |constants| into a +// single integer value. +int64_t CalculateConstantTerm(const std::vector& recurrences, + const std::vector& constants) { + int64_t constant_term = 0; + for (auto recurrence : recurrences) { + constant_term += + recurrence->GetOffset()->AsSEConstantNode()->FoldToSingleValue(); + } + + for (auto constant : constants) { + constant_term += constant->FoldToSingleValue(); + } + + return constant_term; +} + +int64_t CalculateGCDFromCoefficients( + const std::vector& recurrences, int64_t running_gcd) { + for (SERecurrentNode* recurrence : recurrences) { + auto coefficient = recurrence->GetCoefficient()->AsSEConstantNode(); + + running_gcd = GreatestCommonDivisor( + running_gcd, std::abs(coefficient->FoldToSingleValue())); + } + + return running_gcd; +} + +// Compare 2 fractions while first normalizing them, e.g. 2/4 and 4/8 will both +// be simplified to 1/2 and then determined to be equal. +bool NormalizeAndCompareFractions(int64_t numerator_0, int64_t denominator_0, + int64_t numerator_1, int64_t denominator_1) { + auto gcd_0 = + GreatestCommonDivisor(std::abs(numerator_0), std::abs(denominator_0)); + auto gcd_1 = + GreatestCommonDivisor(std::abs(numerator_1), std::abs(denominator_1)); + + auto normalized_numerator_0 = numerator_0 / gcd_0; + auto normalized_denominator_0 = denominator_0 / gcd_0; + auto normalized_numerator_1 = numerator_1 / gcd_1; + auto normalized_denominator_1 = denominator_1 / gcd_1; + + return normalized_numerator_0 == normalized_numerator_1 && + normalized_denominator_0 == normalized_denominator_1; +} + +} // namespace + +bool LoopDependenceAnalysis::GetDependence(const ir::Instruction* source, + const ir::Instruction* destination, + DistanceVector* distance_vector) { + // Start off by finding and marking all the loops in |loops_| that are + // irrelevant to the dependence analysis. + MarkUnsusedDistanceEntriesAsIrrelevant(source, destination, distance_vector); + + ir::Instruction* source_access_chain = GetOperandDefinition(source, 0); + ir::Instruction* destination_access_chain = + GetOperandDefinition(destination, 0); + + // If the access chains aren't collecting from the same structure there is no + // dependence. + ir::Instruction* source_array = GetOperandDefinition(source_access_chain, 0); + ir::Instruction* destination_array = + GetOperandDefinition(destination_access_chain, 0); + if (source_array != destination_array) { + PrintDebug("Proved independence through different arrays."); + return true; + } + + // To handle multiple subscripts we must get every operand in the access + // chains past the first. + std::vector source_subscripts = GetSubscripts(source); + std::vector destination_subscripts = + GetSubscripts(destination); + + auto sets_of_subscripts = + PartitionSubscripts(source_subscripts, destination_subscripts); + + auto first_coupled = std::partition( + std::begin(sets_of_subscripts), std::end(sets_of_subscripts), + [](const std::set>& set) { + return set.size() == 1; + }); + + // Go through each subscript testing for independence. + // If any subscript results in independence, we prove independence between the + // load and store. + // If we can't prove independence we store what information we can gather in + // a DistanceVector. + for (auto it = std::begin(sets_of_subscripts); it < first_coupled; ++it) { + auto source_subscript = std::get<0>(*(*it).begin()); + auto destination_subscript = std::get<1>(*(*it).begin()); + + SENode* source_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(source_subscript)); + SENode* destination_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(destination_subscript)); + + // Check the loops are in a form we support. + auto subscript_pair = std::make_pair(source_node, destination_node); + + const ir::Loop* loop = GetLoopForSubscriptPair(subscript_pair); + if (loop) { + if (!IsSupportedLoop(loop)) { + PrintDebug( + "GetDependence found an unsupported loop form. Assuming <=> for " + "loop."); + DistanceEntry* distance_entry = + GetDistanceEntryForSubscriptPair(subscript_pair, distance_vector); + if (distance_entry) { + distance_entry->direction = DistanceEntry::Directions::ALL; + } + continue; + } + } + + // If either node is simplified to a CanNotCompute we can't perform any + // analysis so must assume <=> dependence and return. + if (source_node->GetType() == SENode::CanNotCompute || + destination_node->GetType() == SENode::CanNotCompute) { + // Record the <=> dependence if we can get a DistanceEntry + PrintDebug( + "GetDependence found source_node || destination_node as " + "CanNotCompute. Abandoning evaluation for this subscript."); + DistanceEntry* distance_entry = + GetDistanceEntryForSubscriptPair(subscript_pair, distance_vector); + if (distance_entry) { + distance_entry->direction = DistanceEntry::Directions::ALL; + } + continue; + } + + // We have no induction variables so can apply a ZIV test. + if (IsZIV(subscript_pair)) { + PrintDebug("Found a ZIV subscript pair"); + if (ZIVTest(subscript_pair)) { + PrintDebug("Proved independence with ZIVTest."); + return true; + } + } + + // We have only one induction variable so should attempt an SIV test. + if (IsSIV(subscript_pair)) { + PrintDebug("Found a SIV subscript pair."); + if (SIVTest(subscript_pair, distance_vector)) { + PrintDebug("Proved independence with SIVTest."); + return true; + } + } + + // We have multiple induction variables so should attempt an MIV test. + if (IsMIV(subscript_pair)) { + PrintDebug("Found a MIV subscript pair."); + if (GCDMIVTest(subscript_pair)) { + PrintDebug("Proved independence with the GCD test."); + auto current_loops = CollectLoops(source_node, destination_node); + + for (auto current_loop : current_loops) { + auto distance_entry = + GetDistanceEntryForLoop(current_loop, distance_vector); + distance_entry->direction = DistanceEntry::Directions::NONE; + } + return true; + } + } + } + + for (auto it = first_coupled; it < std::end(sets_of_subscripts); ++it) { + auto coupled_instructions = *it; + std::vector coupled_subscripts{}; + + for (const auto& elem : coupled_instructions) { + auto source_subscript = std::get<0>(elem); + auto destination_subscript = std::get<1>(elem); + + SENode* source_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(source_subscript)); + SENode* destination_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(destination_subscript)); + + coupled_subscripts.push_back({source_node, destination_node}); + } + + auto supported = true; + + for (const auto& subscript : coupled_subscripts) { + auto loops = CollectLoops(std::get<0>(subscript), std::get<1>(subscript)); + + auto is_subscript_supported = + std::all_of(std::begin(loops), std::end(loops), + [this](const ir::Loop* l) { return IsSupportedLoop(l); }); + + supported = supported && is_subscript_supported; + } + + if (DeltaTest(coupled_subscripts, distance_vector)) { + return true; + } + } + + // We were unable to prove independence so must gather all of the direction + // information we found. + PrintDebug( + "Couldn't prove independence.\n" + "All possible direction information has been collected in the input " + "DistanceVector."); + + return false; +} + +bool LoopDependenceAnalysis::ZIVTest( + const std::pair& subscript_pair) { + auto source = std::get<0>(subscript_pair); + auto destination = std::get<1>(subscript_pair); + + PrintDebug("Performing ZIVTest"); + // If source == destination, dependence with direction = and distance 0. + if (source == destination) { + PrintDebug("ZIVTest found EQ dependence."); + return false; + } else { + PrintDebug("ZIVTest found independence."); + // Otherwise we prove independence. + return true; + } +} + +bool LoopDependenceAnalysis::SIVTest( + const std::pair& subscript_pair, + DistanceVector* distance_vector) { + DistanceEntry* distance_entry = + GetDistanceEntryForSubscriptPair(subscript_pair, distance_vector); + if (!distance_entry) { + PrintDebug( + "SIVTest could not find a DistanceEntry for subscript_pair. Exiting"); + } + + SENode* source_node = std::get<0>(subscript_pair); + SENode* destination_node = std::get<1>(subscript_pair); + + int64_t source_induction_count = CountInductionVariables(source_node); + int64_t destination_induction_count = + CountInductionVariables(destination_node); + + // If the source node has no induction variables we can apply a + // WeakZeroSrcTest. + if (source_induction_count == 0) { + PrintDebug("Found source has no induction variable."); + if (WeakZeroSourceSIVTest( + source_node, destination_node->AsSERecurrentNode(), + destination_node->AsSERecurrentNode()->GetCoefficient(), + distance_entry)) { + PrintDebug("Proved independence with WeakZeroSourceSIVTest."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } + } + + // If the destination has no induction variables we can apply a + // WeakZeroDestTest. + if (destination_induction_count == 0) { + PrintDebug("Found destination has no induction variable."); + if (WeakZeroDestinationSIVTest( + source_node->AsSERecurrentNode(), destination_node, + source_node->AsSERecurrentNode()->GetCoefficient(), + distance_entry)) { + PrintDebug("Proved independence with WeakZeroDestinationSIVTest."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } + } + + // We now need to collect the SERecurrentExpr nodes from source and + // destination. We do not handle cases where source or destination have + // multiple SERecurrentExpr nodes. + std::vector source_recurrent_nodes = + source_node->CollectRecurrentNodes(); + std::vector destination_recurrent_nodes = + destination_node->CollectRecurrentNodes(); + + if (source_recurrent_nodes.size() == 1 && + destination_recurrent_nodes.size() == 1) { + PrintDebug("Found source and destination have 1 induction variable."); + SERecurrentNode* source_recurrent_expr = *source_recurrent_nodes.begin(); + SERecurrentNode* destination_recurrent_expr = + *destination_recurrent_nodes.begin(); + + // If the coefficients are identical we can apply a StrongSIVTest. + if (source_recurrent_expr->GetCoefficient() == + destination_recurrent_expr->GetCoefficient()) { + PrintDebug("Found source and destination share coefficient."); + if (StrongSIVTest(source_node, destination_node, + source_recurrent_expr->GetCoefficient(), + distance_entry)) { + PrintDebug("Proved independence with StrongSIVTest"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } + } + + // If the coefficients are of equal magnitude and opposite sign we can + // apply a WeakCrossingSIVTest. + if (source_recurrent_expr->GetCoefficient() == + scalar_evolution_.CreateNegation( + destination_recurrent_expr->GetCoefficient())) { + PrintDebug("Found source coefficient = -destination coefficient."); + if (WeakCrossingSIVTest(source_node, destination_node, + source_recurrent_expr->GetCoefficient(), + distance_entry)) { + PrintDebug("Proved independence with WeakCrossingSIVTest"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } + } + } + + return false; +} + +bool LoopDependenceAnalysis::StrongSIVTest(SENode* source, SENode* destination, + SENode* coefficient, + DistanceEntry* distance_entry) { + PrintDebug("Performing StrongSIVTest."); + // If both source and destination are SERecurrentNodes we can perform tests + // based on distance. + // If either source or destination contain value unknown nodes or if one or + // both are not SERecurrentNodes we must attempt a symbolic test. + std::vector source_value_unknown_nodes = + source->CollectValueUnknownNodes(); + std::vector destination_value_unknown_nodes = + destination->CollectValueUnknownNodes(); + if (source_value_unknown_nodes.size() > 0 || + destination_value_unknown_nodes.size() > 0) { + PrintDebug( + "StrongSIVTest found symbolics. Will attempt SymbolicStrongSIVTest."); + return SymbolicStrongSIVTest(source, destination, coefficient, + distance_entry); + } + + if (!source->AsSERecurrentNode() || !destination->AsSERecurrentNode()) { + PrintDebug( + "StrongSIVTest could not simplify source and destination to " + "SERecurrentNodes so will exit."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; + } + + // Build an SENode for distance. + std::pair subscript_pair = + std::make_pair(source, destination); + const ir::Loop* subscript_loop = GetLoopForSubscriptPair(subscript_pair); + SENode* source_constant_term = + GetConstantTerm(subscript_loop, source->AsSERecurrentNode()); + SENode* destination_constant_term = + GetConstantTerm(subscript_loop, destination->AsSERecurrentNode()); + if (!source_constant_term || !destination_constant_term) { + PrintDebug( + "StrongSIVTest could not collect the constant terms of either source " + "or destination so will exit."); + return false; + } + SENode* constant_term_delta = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateSubtraction( + destination_constant_term, source_constant_term)); + + // Scalar evolution doesn't perform division, so we must fold to constants and + // do it manually. + // We must check the offset delta and coefficient are constants. + int64_t distance = 0; + SEConstantNode* delta_constant = constant_term_delta->AsSEConstantNode(); + SEConstantNode* coefficient_constant = coefficient->AsSEConstantNode(); + if (delta_constant && coefficient_constant) { + int64_t delta_value = delta_constant->FoldToSingleValue(); + int64_t coefficient_value = coefficient_constant->FoldToSingleValue(); + PrintDebug( + "StrongSIVTest found delta value and coefficient value as constants " + "with values:\n" + "\tdelta value: " + + ToString(delta_value) + + "\n\tcoefficient value: " + ToString(coefficient_value) + "\n"); + // Check if the distance is not integral to try to prove independence. + if (delta_value % coefficient_value != 0) { + PrintDebug( + "StrongSIVTest proved independence through distance not being an " + "integer."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } else { + distance = delta_value / coefficient_value; + PrintDebug("StrongSIV test found distance as " + ToString(distance)); + } + } else { + // If we can't fold delta and coefficient to single values we can't produce + // distance. + // As a result we can't perform the rest of the pass and must assume + // dependence in all directions. + PrintDebug("StrongSIVTest could not produce a distance. Must exit."); + distance_entry->distance = DistanceEntry::Directions::ALL; + return false; + } + + // Next we gather the upper and lower bounds as constants if possible. If + // distance > upper_bound - lower_bound we prove independence. + SENode* lower_bound = GetLowerBound(subscript_loop); + SENode* upper_bound = GetUpperBound(subscript_loop); + if (lower_bound && upper_bound) { + PrintDebug("StrongSIVTest found bounds."); + SENode* bounds = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(upper_bound, lower_bound)); + + if (bounds->GetType() == SENode::SENodeType::Constant) { + int64_t bounds_value = bounds->AsSEConstantNode()->FoldToSingleValue(); + PrintDebug( + "StrongSIVTest found upper_bound - lower_bound as a constant with " + "value " + + ToString(bounds_value)); + + // If the absolute value of the distance is > upper bound - lower bound + // then we prove independence. + if (llabs(distance) > llabs(bounds_value)) { + PrintDebug( + "StrongSIVTest proved independence through distance escaping the " + "loop bounds."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::NONE; + distance_entry->distance = distance; + return true; + } + } + } else { + PrintDebug("StrongSIVTest was unable to gather lower and upper bounds."); + } + + // Otherwise we can get a direction as follows + // { < if distance > 0 + // direction = { = if distance == 0 + // { > if distance < 0 + PrintDebug( + "StrongSIVTest could not prove independence. Gathering direction " + "information."); + if (distance > 0) { + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::LT; + distance_entry->distance = distance; + return false; + } + if (distance == 0) { + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::EQ; + distance_entry->distance = 0; + return false; + } + if (distance < 0) { + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::GT; + distance_entry->distance = distance; + return false; + } + + // We were unable to prove independence or discern any additional information + // Must assume <=> direction. + PrintDebug( + "StrongSIVTest was unable to determine any dependence information."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; +} + +bool LoopDependenceAnalysis::SymbolicStrongSIVTest( + SENode* source, SENode* destination, SENode* coefficient, + DistanceEntry* distance_entry) { + PrintDebug("Performing SymbolicStrongSIVTest."); + SENode* source_destination_delta = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(source, destination)); + // By cancelling out the induction variables by subtracting the source and + // destination we can produce an expression of symbolics and constants. This + // expression can be compared to the loop bounds to find if the offset is + // outwith the bounds. + std::pair subscript_pair = + std::make_pair(source, destination); + const ir::Loop* subscript_loop = GetLoopForSubscriptPair(subscript_pair); + if (IsProvablyOutsideOfLoopBounds(subscript_loop, source_destination_delta, + coefficient)) { + PrintDebug( + "SymbolicStrongSIVTest proved independence through loop bounds."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } + // We were unable to prove independence or discern any additional information. + // Must assume <=> direction. + PrintDebug( + "SymbolicStrongSIVTest was unable to determine any dependence " + "information."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; +} + +bool LoopDependenceAnalysis::WeakZeroSourceSIVTest( + SENode* source, SERecurrentNode* destination, SENode* coefficient, + DistanceEntry* distance_entry) { + PrintDebug("Performing WeakZeroSourceSIVTest."); + std::pair subscript_pair = + std::make_pair(source, destination); + const ir::Loop* subscript_loop = GetLoopForSubscriptPair(subscript_pair); + // Build an SENode for distance. + SENode* destination_constant_term = + GetConstantTerm(subscript_loop, destination); + SENode* delta = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(source, destination_constant_term)); + + // Scalar evolution doesn't perform division, so we must fold to constants and + // do it manually. + int64_t distance = 0; + SEConstantNode* delta_constant = delta->AsSEConstantNode(); + SEConstantNode* coefficient_constant = coefficient->AsSEConstantNode(); + if (delta_constant && coefficient_constant) { + PrintDebug( + "WeakZeroSourceSIVTest folding delta and coefficient to constants."); + int64_t delta_value = delta_constant->FoldToSingleValue(); + int64_t coefficient_value = coefficient_constant->FoldToSingleValue(); + // Check if the distance is not integral. + if (delta_value % coefficient_value != 0) { + PrintDebug( + "WeakZeroSourceSIVTest proved independence through distance not " + "being an integer."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } else { + distance = delta_value / coefficient_value; + PrintDebug( + "WeakZeroSourceSIVTest calculated distance with the following " + "values\n" + "\tdelta value: " + + ToString(delta_value) + + "\n\tcoefficient value: " + ToString(coefficient_value) + + "\n\tdistance: " + ToString(distance) + "\n"); + } + } else { + PrintDebug( + "WeakZeroSourceSIVTest was unable to fold delta and coefficient to " + "constants."); + } + + // If we can prove the distance is outside the bounds we prove independence. + SEConstantNode* lower_bound = + GetLowerBound(subscript_loop)->AsSEConstantNode(); + SEConstantNode* upper_bound = + GetUpperBound(subscript_loop)->AsSEConstantNode(); + if (lower_bound && upper_bound) { + PrintDebug("WeakZeroSourceSIVTest found bounds as SEConstantNodes."); + int64_t lower_bound_value = lower_bound->FoldToSingleValue(); + int64_t upper_bound_value = upper_bound->FoldToSingleValue(); + if (!IsWithinBounds(llabs(distance), lower_bound_value, + upper_bound_value)) { + PrintDebug( + "WeakZeroSourceSIVTest proved independence through distance escaping " + "the loop bounds."); + PrintDebug( + "Bound values were as follow\n" + "\tlower bound value: " + + ToString(lower_bound_value) + + "\n\tupper bound value: " + ToString(upper_bound_value) + + "\n\tdistance value: " + ToString(distance) + "\n"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::NONE; + distance_entry->distance = distance; + return true; + } + } else { + PrintDebug( + "WeakZeroSourceSIVTest was unable to find lower and upper bound as " + "SEConstantNodes."); + } + + // Now we want to see if we can detect to peel the first or last iterations. + + // We get the FirstTripValue as GetFirstTripInductionNode() + + // GetConstantTerm(destination) + SENode* first_trip_SENode = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateAddNode( + GetFirstTripInductionNode(subscript_loop), + GetConstantTerm(subscript_loop, destination))); + + // If source == FirstTripValue, peel_first. + if (first_trip_SENode) { + PrintDebug("WeakZeroSourceSIVTest built first_trip_SENode."); + if (first_trip_SENode->AsSEConstantNode()) { + PrintDebug( + "WeakZeroSourceSIVTest has found first_trip_SENode as an " + "SEConstantNode with value: " + + ToString(first_trip_SENode->AsSEConstantNode()->FoldToSingleValue()) + + "\n"); + } + if (source == first_trip_SENode) { + // We have found that peeling the first iteration will break dependency. + PrintDebug( + "WeakZeroSourceSIVTest has found peeling first iteration will break " + "dependency"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::PEEL; + distance_entry->peel_first = true; + return false; + } + } else { + PrintDebug("WeakZeroSourceSIVTest was unable to build first_trip_SENode"); + } + + // We get the LastTripValue as GetFinalTripInductionNode(coefficient) + + // GetConstantTerm(destination) + SENode* final_trip_SENode = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateAddNode( + GetFinalTripInductionNode(subscript_loop, coefficient), + GetConstantTerm(subscript_loop, destination))); + + // If source == LastTripValue, peel_last. + if (final_trip_SENode) { + PrintDebug("WeakZeroSourceSIVTest built final_trip_SENode."); + if (first_trip_SENode->AsSEConstantNode()) { + PrintDebug( + "WeakZeroSourceSIVTest has found final_trip_SENode as an " + "SEConstantNode with value: " + + ToString(final_trip_SENode->AsSEConstantNode()->FoldToSingleValue()) + + "\n"); + } + if (source == final_trip_SENode) { + // We have found that peeling the last iteration will break dependency. + PrintDebug( + "WeakZeroSourceSIVTest has found peeling final iteration will break " + "dependency"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::PEEL; + distance_entry->peel_last = true; + return false; + } + } else { + PrintDebug("WeakZeroSourceSIVTest was unable to build final_trip_SENode"); + } + + // We were unable to prove independence or discern any additional information. + // Must assume <=> direction. + PrintDebug( + "WeakZeroSourceSIVTest was unable to determine any dependence " + "information."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; +} + +bool LoopDependenceAnalysis::WeakZeroDestinationSIVTest( + SERecurrentNode* source, SENode* destination, SENode* coefficient, + DistanceEntry* distance_entry) { + PrintDebug("Performing WeakZeroDestinationSIVTest."); + // Build an SENode for distance. + std::pair subscript_pair = + std::make_pair(source, destination); + const ir::Loop* subscript_loop = GetLoopForSubscriptPair(subscript_pair); + SENode* source_constant_term = GetConstantTerm(subscript_loop, source); + SENode* delta = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(destination, source_constant_term)); + + // Scalar evolution doesn't perform division, so we must fold to constants and + // do it manually. + int64_t distance = 0; + SEConstantNode* delta_constant = delta->AsSEConstantNode(); + SEConstantNode* coefficient_constant = coefficient->AsSEConstantNode(); + if (delta_constant && coefficient_constant) { + PrintDebug( + "WeakZeroDestinationSIVTest folding delta and coefficient to " + "constants."); + int64_t delta_value = delta_constant->FoldToSingleValue(); + int64_t coefficient_value = coefficient_constant->FoldToSingleValue(); + // Check if the distance is not integral. + if (delta_value % coefficient_value != 0) { + PrintDebug( + "WeakZeroDestinationSIVTest proved independence through distance not " + "being an integer."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } else { + distance = delta_value / coefficient_value; + PrintDebug( + "WeakZeroDestinationSIVTest calculated distance with the following " + "values\n" + "\tdelta value: " + + ToString(delta_value) + + "\n\tcoefficient value: " + ToString(coefficient_value) + + "\n\tdistance: " + ToString(distance) + "\n"); + } + } else { + PrintDebug( + "WeakZeroDestinationSIVTest was unable to fold delta and coefficient " + "to constants."); + } + + // If we can prove the distance is outside the bounds we prove independence. + SEConstantNode* lower_bound = + GetLowerBound(subscript_loop)->AsSEConstantNode(); + SEConstantNode* upper_bound = + GetUpperBound(subscript_loop)->AsSEConstantNode(); + if (lower_bound && upper_bound) { + PrintDebug("WeakZeroDestinationSIVTest found bounds as SEConstantNodes."); + int64_t lower_bound_value = lower_bound->FoldToSingleValue(); + int64_t upper_bound_value = upper_bound->FoldToSingleValue(); + if (!IsWithinBounds(llabs(distance), lower_bound_value, + upper_bound_value)) { + PrintDebug( + "WeakZeroDestinationSIVTest proved independence through distance " + "escaping the loop bounds."); + PrintDebug( + "Bound values were as follows\n" + "\tlower bound value: " + + ToString(lower_bound_value) + + "\n\tupper bound value: " + ToString(upper_bound_value) + + "\n\tdistance value: " + ToString(distance)); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::NONE; + distance_entry->distance = distance; + return true; + } + } else { + PrintDebug( + "WeakZeroDestinationSIVTest was unable to find lower and upper bound " + "as SEConstantNodes."); + } + + // Now we want to see if we can detect to peel the first or last iterations. + + // We get the FirstTripValue as GetFirstTripInductionNode() + + // GetConstantTerm(source) + SENode* first_trip_SENode = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateAddNode(GetFirstTripInductionNode(subscript_loop), + GetConstantTerm(subscript_loop, source))); + + // If destination == FirstTripValue, peel_first. + if (first_trip_SENode) { + PrintDebug("WeakZeroDestinationSIVTest built first_trip_SENode."); + if (first_trip_SENode->AsSEConstantNode()) { + PrintDebug( + "WeakZeroDestinationSIVTest has found first_trip_SENode as an " + "SEConstantNode with value: " + + ToString(first_trip_SENode->AsSEConstantNode()->FoldToSingleValue()) + + "\n"); + } + if (destination == first_trip_SENode) { + // We have found that peeling the first iteration will break dependency. + PrintDebug( + "WeakZeroDestinationSIVTest has found peeling first iteration will " + "break dependency"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::PEEL; + distance_entry->peel_first = true; + return false; + } + } else { + PrintDebug( + "WeakZeroDestinationSIVTest was unable to build first_trip_SENode"); + } + + // We get the LastTripValue as GetFinalTripInductionNode(coefficient) + + // GetConstantTerm(source) + SENode* final_trip_SENode = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateAddNode( + GetFinalTripInductionNode(subscript_loop, coefficient), + GetConstantTerm(subscript_loop, source))); + + // If destination == LastTripValue, peel_last. + if (final_trip_SENode) { + PrintDebug("WeakZeroDestinationSIVTest built final_trip_SENode."); + if (final_trip_SENode->AsSEConstantNode()) { + PrintDebug( + "WeakZeroDestinationSIVTest has found final_trip_SENode as an " + "SEConstantNode with value: " + + ToString(final_trip_SENode->AsSEConstantNode()->FoldToSingleValue()) + + "\n"); + } + if (destination == final_trip_SENode) { + // We have found that peeling the last iteration will break dependency. + PrintDebug( + "WeakZeroDestinationSIVTest has found peeling final iteration will " + "break dependency"); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::PEEL; + distance_entry->peel_last = true; + return false; + } + } else { + PrintDebug( + "WeakZeroDestinationSIVTest was unable to build final_trip_SENode"); + } + + // We were unable to prove independence or discern any additional information. + // Must assume <=> direction. + PrintDebug( + "WeakZeroDestinationSIVTest was unable to determine any dependence " + "information."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; +} + +bool LoopDependenceAnalysis::WeakCrossingSIVTest( + SENode* source, SENode* destination, SENode* coefficient, + DistanceEntry* distance_entry) { + PrintDebug("Performing WeakCrossingSIVTest."); + // We currently can't handle symbolic WeakCrossingSIVTests. If either source + // or destination are not SERecurrentNodes we must exit. + if (!source->AsSERecurrentNode() || !destination->AsSERecurrentNode()) { + PrintDebug( + "WeakCrossingSIVTest found source or destination != SERecurrentNode. " + "Exiting"); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; + } + + // Build an SENode for distance. + SENode* offset_delta = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateSubtraction( + destination->AsSERecurrentNode()->GetOffset(), + source->AsSERecurrentNode()->GetOffset())); + + // Scalar evolution doesn't perform division, so we must fold to constants and + // do it manually. + int64_t distance = 0; + SEConstantNode* delta_constant = offset_delta->AsSEConstantNode(); + SEConstantNode* coefficient_constant = coefficient->AsSEConstantNode(); + if (delta_constant && coefficient_constant) { + PrintDebug( + "WeakCrossingSIVTest folding offset_delta and coefficient to " + "constants."); + int64_t delta_value = delta_constant->FoldToSingleValue(); + int64_t coefficient_value = coefficient_constant->FoldToSingleValue(); + // Check if the distance is not integral or if it has a non-integral part + // equal to 1/2. + if (delta_value % (2 * coefficient_value) != 0 && + static_cast(delta_value % (2 * coefficient_value)) / + static_cast(2 * coefficient_value) != + 0.5) { + PrintDebug( + "WeakCrossingSIVTest proved independence through distance escaping " + "the loop bounds."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DIRECTION; + distance_entry->direction = DistanceEntry::Directions::NONE; + return true; + } else { + distance = delta_value / (2 * coefficient_value); + } + + if (distance == 0) { + PrintDebug("WeakCrossingSIVTest found EQ dependence."); + distance_entry->dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + distance_entry->direction = DistanceEntry::Directions::EQ; + distance_entry->distance = 0; + return false; + } + } else { + PrintDebug( + "WeakCrossingSIVTest was unable to fold offset_delta and coefficient " + "to constants."); + } + + // We were unable to prove independence or discern any additional information. + // Must assume <=> direction. + PrintDebug( + "WeakCrossingSIVTest was unable to determine any dependence " + "information."); + distance_entry->direction = DistanceEntry::Directions::ALL; + return false; +} + +// Perform the GCD test if both, the source and the destination nodes, are in +// the form a0*i0 + a1*i1 + ... an*in + c. +bool LoopDependenceAnalysis::GCDMIVTest( + const std::pair& subscript_pair) { + auto source = std::get<0>(subscript_pair); + auto destination = std::get<1>(subscript_pair); + + // Bail out if source/destination is in an unexpected form. + if (!IsInCorrectFormForGCDTest(source) || + !IsInCorrectFormForGCDTest(destination)) { + return false; + } + + auto source_recurrences = GetAllTopLevelRecurrences(source); + auto dest_recurrences = GetAllTopLevelRecurrences(destination); + + // Bail out if all offsets and coefficients aren't constant. + if (!AreOffsetsAndCoefficientsConstant(source_recurrences) || + !AreOffsetsAndCoefficientsConstant(dest_recurrences)) { + return false; + } + + // Calculate the GCD of all coefficients. + auto source_constants = GetAllTopLevelConstants(source); + int64_t source_constant = + CalculateConstantTerm(source_recurrences, source_constants); + + auto dest_constants = GetAllTopLevelConstants(destination); + int64_t destination_constant = + CalculateConstantTerm(dest_recurrences, dest_constants); + + int64_t delta = std::abs(source_constant - destination_constant); + + int64_t running_gcd = 0; + + running_gcd = CalculateGCDFromCoefficients(source_recurrences, running_gcd); + running_gcd = CalculateGCDFromCoefficients(dest_recurrences, running_gcd); + + return delta % running_gcd != 0; +} + +using PartitionedSubscripts = + std::vector>>; +PartitionedSubscripts LoopDependenceAnalysis::PartitionSubscripts( + const std::vector& source_subscripts, + const std::vector& destination_subscripts) { + PartitionedSubscripts partitions{}; + + auto num_subscripts = source_subscripts.size(); + + // Create initial partitions with one subscript pair per partition. + for (size_t i = 0; i < num_subscripts; ++i) { + partitions.push_back({{source_subscripts[i], destination_subscripts[i]}}); + } + + // Iterate over the loops to create all partitions + for (auto loop : loops_) { + int64_t k = -1; + + for (size_t j = 0; j < partitions.size(); ++j) { + auto& current_partition = partitions[j]; + + // Does |loop| appear in |current_partition| + auto it = std::find_if( + current_partition.begin(), current_partition.end(), + [loop, + this](const std::pair& elem) + -> bool { + auto source_recurrences = + scalar_evolution_.AnalyzeInstruction(std::get<0>(elem)) + ->CollectRecurrentNodes(); + auto destination_recurrences = + scalar_evolution_.AnalyzeInstruction(std::get<1>(elem)) + ->CollectRecurrentNodes(); + + source_recurrences.insert(source_recurrences.end(), + destination_recurrences.begin(), + destination_recurrences.end()); + + auto loops_in_pair = CollectLoops(source_recurrences); + auto end_it = loops_in_pair.end(); + + return std::find(loops_in_pair.begin(), end_it, loop) != end_it; + }); + + auto has_loop = it != current_partition.end(); + + if (has_loop) { + if (k == -1) { + k = j; + } else { + // Add |partitions[j]| to |partitions[k]| and discard |partitions[j]| + partitions[static_cast(k)].insert(current_partition.begin(), + current_partition.end()); + current_partition.clear(); + } + } + } + } + + // Remove empty (discarded) partitions + partitions.erase( + std::remove_if( + partitions.begin(), partitions.end(), + [](const std::set>& + partition) { return partition.empty(); }), + partitions.end()); + + return partitions; +} + +Constraint* LoopDependenceAnalysis::IntersectConstraints( + Constraint* constraint_0, Constraint* constraint_1, + const SENode* lower_bound, const SENode* upper_bound) { + if (constraint_0->AsDependenceNone()) { + return constraint_1; + } else if (constraint_1->AsDependenceNone()) { + return constraint_0; + } + + // Both constraints are distances. Either the same distance or independent. + if (constraint_0->AsDependenceDistance() && + constraint_1->AsDependenceDistance()) { + auto dist_0 = constraint_0->AsDependenceDistance(); + auto dist_1 = constraint_1->AsDependenceDistance(); + + if (*dist_0->GetDistance() == *dist_1->GetDistance()) { + return constraint_0; + } else { + return make_constraint(); + } + } + + // Both constraints are points. Either the same point or independent. + if (constraint_0->AsDependencePoint() && constraint_1->AsDependencePoint()) { + auto point_0 = constraint_0->AsDependencePoint(); + auto point_1 = constraint_1->AsDependencePoint(); + + if (*point_0->GetSource() == *point_1->GetSource() && + *point_0->GetDestination() == *point_1->GetDestination()) { + return constraint_0; + } else { + return make_constraint(); + } + } + + // Both constraints are lines/distances. + if ((constraint_0->AsDependenceDistance() || + constraint_0->AsDependenceLine()) && + (constraint_1->AsDependenceDistance() || + constraint_1->AsDependenceLine())) { + auto is_distance_0 = constraint_0->AsDependenceDistance() != nullptr; + auto is_distance_1 = constraint_1->AsDependenceDistance() != nullptr; + + auto a0 = is_distance_0 ? scalar_evolution_.CreateConstant(1) + : constraint_0->AsDependenceLine()->GetA(); + auto b0 = is_distance_0 ? scalar_evolution_.CreateConstant(-1) + : constraint_0->AsDependenceLine()->GetB(); + auto c0 = + is_distance_0 + ? scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateNegation( + constraint_0->AsDependenceDistance()->GetDistance())) + : constraint_0->AsDependenceLine()->GetC(); + + auto a1 = is_distance_1 ? scalar_evolution_.CreateConstant(1) + : constraint_1->AsDependenceLine()->GetA(); + auto b1 = is_distance_1 ? scalar_evolution_.CreateConstant(-1) + : constraint_1->AsDependenceLine()->GetB(); + auto c1 = + is_distance_1 + ? scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateNegation( + constraint_1->AsDependenceDistance()->GetDistance())) + : constraint_1->AsDependenceLine()->GetC(); + + if (a0->AsSEConstantNode() && b0->AsSEConstantNode() && + c0->AsSEConstantNode() && a1->AsSEConstantNode() && + b1->AsSEConstantNode() && c1->AsSEConstantNode()) { + auto constant_a0 = a0->AsSEConstantNode()->FoldToSingleValue(); + auto constant_b0 = b0->AsSEConstantNode()->FoldToSingleValue(); + auto constant_c0 = c0->AsSEConstantNode()->FoldToSingleValue(); + + auto constant_a1 = a1->AsSEConstantNode()->FoldToSingleValue(); + auto constant_b1 = b1->AsSEConstantNode()->FoldToSingleValue(); + auto constant_c1 = c1->AsSEConstantNode()->FoldToSingleValue(); + + // a & b can't both be zero, otherwise it wouldn't be line. + if (NormalizeAndCompareFractions(constant_a0, constant_b0, constant_a1, + constant_b1)) { + // Slopes are equal, either parallel lines or the same line. + + if (constant_b0 == 0 && constant_b1 == 0) { + if (NormalizeAndCompareFractions(constant_c0, constant_a0, + constant_c1, constant_a1)) { + return constraint_0; + } + + return make_constraint(); + } else if (NormalizeAndCompareFractions(constant_c0, constant_b0, + constant_c1, constant_b1)) { + // Same line. + return constraint_0; + } else { + // Parallel lines can't intersect, report independence. + return make_constraint(); + } + + } else { + // Lines are not parallel, therefore, they must intersect. + + // Calculate intersection. + if (upper_bound->AsSEConstantNode() && + lower_bound->AsSEConstantNode()) { + auto constant_lower_bound = + lower_bound->AsSEConstantNode()->FoldToSingleValue(); + auto constant_upper_bound = + upper_bound->AsSEConstantNode()->FoldToSingleValue(); + + auto up = constant_b1 * constant_c0 - constant_b0 * constant_c1; + // Both b or both a can't be 0, so down is never 0 + // otherwise would have entered the parallel line section. + auto down = constant_b1 * constant_a0 - constant_b0 * constant_a1; + + auto x_coord = up / down; + + int64_t y_coord = 0; + int64_t arg1 = 0; + int64_t const_b_to_use = 0; + + if (constant_b1 != 0) { + arg1 = constant_c1 - constant_a1 * x_coord; + y_coord = arg1 / constant_b1; + const_b_to_use = constant_b1; + } else if (constant_b0 != 0) { + arg1 = constant_c0 - constant_a0 * x_coord; + y_coord = arg1 / constant_b0; + const_b_to_use = constant_b0; + } + + if (up % down == 0 && + arg1 % const_b_to_use == 0 && // Coordinates are integers. + constant_lower_bound <= + x_coord && // x_coord is within loop bounds. + x_coord <= constant_upper_bound && + constant_lower_bound <= + y_coord && // y_coord is within loop bounds. + y_coord <= constant_upper_bound) { + // Lines intersect at integer coordinates. + return make_constraint( + scalar_evolution_.CreateConstant(x_coord), + scalar_evolution_.CreateConstant(y_coord), + constraint_0->GetLoop()); + + } else { + return make_constraint(); + } + + } else { + // Not constants, bail out. + return make_constraint(); + } + } + + } else { + // Not constants, bail out. + return make_constraint(); + } + } + + // One constraint is a line/distance and the other is a point. + if ((constraint_0->AsDependencePoint() && + (constraint_1->AsDependenceLine() || + constraint_1->AsDependenceDistance())) || + (constraint_1->AsDependencePoint() && + (constraint_0->AsDependenceLine() || + constraint_0->AsDependenceDistance()))) { + auto point_0 = constraint_0->AsDependencePoint() != nullptr; + + auto point = point_0 ? constraint_0->AsDependencePoint() + : constraint_1->AsDependencePoint(); + + auto line_or_distance = point_0 ? constraint_1 : constraint_0; + + auto is_distance = line_or_distance->AsDependenceDistance() != nullptr; + + auto a = is_distance ? scalar_evolution_.CreateConstant(1) + : line_or_distance->AsDependenceLine()->GetA(); + auto b = is_distance ? scalar_evolution_.CreateConstant(-1) + : line_or_distance->AsDependenceLine()->GetB(); + auto c = + is_distance + ? scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateNegation( + line_or_distance->AsDependenceDistance()->GetDistance())) + : line_or_distance->AsDependenceLine()->GetC(); + + auto x = point->GetSource(); + auto y = point->GetDestination(); + + if (a->AsSEConstantNode() && b->AsSEConstantNode() && + c->AsSEConstantNode() && x->AsSEConstantNode() && + y->AsSEConstantNode()) { + auto constant_a = a->AsSEConstantNode()->FoldToSingleValue(); + auto constant_b = b->AsSEConstantNode()->FoldToSingleValue(); + auto constant_c = c->AsSEConstantNode()->FoldToSingleValue(); + + auto constant_x = x->AsSEConstantNode()->FoldToSingleValue(); + auto constant_y = y->AsSEConstantNode()->FoldToSingleValue(); + + auto left_hand_side = constant_a * constant_x + constant_b * constant_y; + + if (left_hand_side == constant_c) { + // Point is on line, return point + return point_0 ? constraint_0 : constraint_1; + } else { + // Point not on line, report independence (empty constraint). + return make_constraint(); + } + + } else { + // Not constants, bail out. + return make_constraint(); + } + } + + return nullptr; +} + +// Propagate constraints function as described in section 5 of Practical +// Dependence Testing, Goff, Kennedy, Tseng, 1991. +SubscriptPair LoopDependenceAnalysis::PropagateConstraints( + const SubscriptPair& subscript_pair, + const std::vector& constraints) { + SENode* new_first = subscript_pair.first; + SENode* new_second = subscript_pair.second; + + for (auto& constraint : constraints) { + // In the paper this is a[k]. We're extracting the coefficient ('a') of a + // recurrent expression with respect to the loop 'k'. + SENode* coefficient_of_recurrent = + scalar_evolution_.GetCoefficientFromRecurrentTerm( + new_first, constraint->GetLoop()); + + // In the paper this is a'[k]. + SENode* coefficient_of_recurrent_prime = + scalar_evolution_.GetCoefficientFromRecurrentTerm( + new_second, constraint->GetLoop()); + + if (constraint->GetType() == Constraint::Distance) { + DependenceDistance* as_distance = constraint->AsDependenceDistance(); + + // In the paper this is a[k]*d + SENode* rhs = scalar_evolution_.CreateMultiplyNode( + coefficient_of_recurrent, as_distance->GetDistance()); + + // In the paper this is a[k] <- 0 + SENode* zeroed_coefficient = + scalar_evolution_.BuildGraphWithoutRecurrentTerm( + new_first, constraint->GetLoop()); + + // In the paper this is e <- e - a[k]*d. + new_first = scalar_evolution_.CreateSubtraction(zeroed_coefficient, rhs); + new_first = scalar_evolution_.SimplifyExpression(new_first); + + // In the paper this is a'[k] - a[k]. + SENode* new_child = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(coefficient_of_recurrent_prime, + coefficient_of_recurrent)); + + // In the paper this is a'[k]'i[k]. + SERecurrentNode* prime_recurrent = + scalar_evolution_.GetRecurrentTerm(new_second, constraint->GetLoop()); + + if (!prime_recurrent) continue; + + // As we hash the nodes we need to create a new node when we update a + // child. + SENode* new_recurrent = scalar_evolution_.CreateRecurrentExpression( + constraint->GetLoop(), prime_recurrent->GetOffset(), new_child); + // In the paper this is a'[k] <- a'[k] - a[k]. + new_second = scalar_evolution_.UpdateChildNode( + new_second, prime_recurrent, new_recurrent); + } + } + + new_second = scalar_evolution_.SimplifyExpression(new_second); + return std::make_pair(new_first, new_second); +} + +bool LoopDependenceAnalysis::DeltaTest( + const std::vector& coupled_subscripts, + DistanceVector* dv_entry) { + std::vector constraints(loops_.size()); + + std::vector loop_appeared(loops_.size()); + + std::generate(std::begin(constraints), std::end(constraints), + [this]() { return make_constraint(); }); + + // Separate SIV and MIV subscripts + std::vector siv_subscripts{}; + std::vector miv_subscripts{}; + + for (const auto& subscript_pair : coupled_subscripts) { + if (IsSIV(subscript_pair)) { + siv_subscripts.push_back(subscript_pair); + } else { + miv_subscripts.push_back(subscript_pair); + } + } + + // Delta Test + while (!siv_subscripts.empty()) { + std::vector results(siv_subscripts.size()); + + std::vector current_distances( + siv_subscripts.size(), DistanceVector(loops_.size())); + + // Apply SIV test to all SIV subscripts, report independence if any of them + // is independent + std::transform( + std::begin(siv_subscripts), std::end(siv_subscripts), + std::begin(current_distances), std::begin(results), + [this](SubscriptPair& p, DistanceVector& d) { return SIVTest(p, &d); }); + + if (std::accumulate(std::begin(results), std::end(results), false, + std::logical_or{})) { + return true; + } + + // Derive new constraint vector. + std::vector> all_new_constrants{}; + + for (size_t i = 0; i < siv_subscripts.size(); ++i) { + auto loop = GetLoopForSubscriptPair(siv_subscripts[i]); + + auto loop_id = + std::distance(std::begin(loops_), + std::find(std::begin(loops_), std::end(loops_), loop)); + + loop_appeared[loop_id] = true; + auto distance_entry = current_distances[i].GetEntries()[loop_id]; + + if (distance_entry.dependence_information == + DistanceEntry::DependenceInformation::DISTANCE) { + // Construct a DependenceDistance. + auto node = scalar_evolution_.CreateConstant(distance_entry.distance); + + all_new_constrants.push_back( + {make_constraint(node, loop), loop_id}); + } else { + // Construct a DependenceLine. + const auto& subscript_pair = siv_subscripts[i]; + SENode* source_node = std::get<0>(subscript_pair); + SENode* destination_node = std::get<1>(subscript_pair); + + int64_t source_induction_count = CountInductionVariables(source_node); + int64_t destination_induction_count = + CountInductionVariables(destination_node); + + SENode* a = nullptr; + SENode* b = nullptr; + SENode* c = nullptr; + + if (destination_induction_count != 0) { + a = destination_node->AsSERecurrentNode()->GetCoefficient(); + c = scalar_evolution_.CreateNegation( + destination_node->AsSERecurrentNode()->GetOffset()); + } else { + a = scalar_evolution_.CreateConstant(0); + c = scalar_evolution_.CreateNegation(destination_node); + } + + if (source_induction_count != 0) { + b = scalar_evolution_.CreateNegation( + source_node->AsSERecurrentNode()->GetCoefficient()); + c = scalar_evolution_.CreateAddNode( + c, source_node->AsSERecurrentNode()->GetOffset()); + } else { + b = scalar_evolution_.CreateConstant(0); + c = scalar_evolution_.CreateAddNode(c, source_node); + } + + a = scalar_evolution_.SimplifyExpression(a); + b = scalar_evolution_.SimplifyExpression(b); + c = scalar_evolution_.SimplifyExpression(c); + + all_new_constrants.push_back( + {make_constraint(a, b, c, loop), loop_id}); + } + } + + // Calculate the intersection between the new and existing constraints. + std::vector intersection = constraints; + for (const auto& constraint_to_intersect : all_new_constrants) { + auto loop_id = std::get<1>(constraint_to_intersect); + auto loop = loops_[loop_id]; + intersection[loop_id] = IntersectConstraints( + intersection[loop_id], std::get<0>(constraint_to_intersect), + GetLowerBound(loop), GetUpperBound(loop)); + } + + // Report independence if an empty constraint (DependenceEmpty) is found. + auto first_empty = + std::find_if(std::begin(intersection), std::end(intersection), + [](Constraint* constraint) { + return constraint->AsDependenceEmpty() != nullptr; + }); + if (first_empty != std::end(intersection)) { + return true; + } + std::vector new_siv_subscripts{}; + std::vector new_miv_subscripts{}; + + auto equal = + std::equal(std::begin(constraints), std::end(constraints), + std::begin(intersection), + [](Constraint* a, Constraint* b) { return *a == *b; }); + + // If any constraints have changed, propagate them into the rest of the + // subscripts possibly creating new ZIV/SIV subscripts. + if (!equal) { + std::vector new_subscripts(miv_subscripts.size()); + + // Propagate constraints into MIV subscripts + std::transform(std::begin(miv_subscripts), std::end(miv_subscripts), + std::begin(new_subscripts), + [this, &intersection](SubscriptPair& subscript_pair) { + return PropagateConstraints(subscript_pair, + intersection); + }); + + // If a ZIV subscript is returned, apply test, otherwise, update untested + // subscripts. + for (auto& subscript : new_subscripts) { + if (IsZIV(subscript) && ZIVTest(subscript)) { + return true; + } else if (IsSIV(subscript)) { + new_siv_subscripts.push_back(subscript); + } else { + new_miv_subscripts.push_back(subscript); + } + } + } + + // Set new constraints and subscripts to test. + std::swap(siv_subscripts, new_siv_subscripts); + std::swap(miv_subscripts, new_miv_subscripts); + std::swap(constraints, intersection); + } + + // Create the dependence vector from the constraints. + for (size_t i = 0; i < loops_.size(); ++i) { + // Don't touch entries for loops that weren't tested. + if (loop_appeared[i]) { + auto current_constraint = constraints[i]; + auto& current_distance_entry = (*dv_entry).GetEntries()[i]; + + if (auto dependence_distance = + current_constraint->AsDependenceDistance()) { + if (auto constant_node = + dependence_distance->GetDistance()->AsSEConstantNode()) { + current_distance_entry.dependence_information = + DistanceEntry::DependenceInformation::DISTANCE; + + current_distance_entry.distance = constant_node->FoldToSingleValue(); + if (current_distance_entry.distance == 0) { + current_distance_entry.direction = DistanceEntry::Directions::EQ; + } else if (current_distance_entry.distance < 0) { + current_distance_entry.direction = DistanceEntry::Directions::GT; + } else { + current_distance_entry.direction = DistanceEntry::Directions::LT; + } + } + } else if (auto dependence_point = + current_constraint->AsDependencePoint()) { + auto source = dependence_point->GetSource(); + auto destination = dependence_point->GetDestination(); + + if (source->AsSEConstantNode() && destination->AsSEConstantNode()) { + current_distance_entry = DistanceEntry( + source->AsSEConstantNode()->FoldToSingleValue(), + destination->AsSEConstantNode()->FoldToSingleValue()); + } + } + } + } + + // Test any remaining MIV subscripts and report independence if found. + std::vector results(miv_subscripts.size()); + + std::transform(std::begin(miv_subscripts), std::end(miv_subscripts), + std::begin(results), + [this](const SubscriptPair& p) { return GCDMIVTest(p); }); + + return std::accumulate(std::begin(results), std::end(results), false, + std::logical_or{}); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.h new file mode 100644 index 0000000000000000000000000000000000000000..9537ff8fef508ed76d70bb1bf502664f4d651bc3 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence.h @@ -0,0 +1,562 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LOOP_DEPENDENCE_H_ +#define SOURCE_OPT_LOOP_DEPENDENCE_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "opt/instruction.h" +#include "opt/ir_context.h" +#include "opt/loop_descriptor.h" +#include "opt/scalar_analysis.h" + +namespace spvtools { +namespace opt { + +// Stores information about dependence between a load and a store wrt a single +// loop in a loop nest. +// DependenceInformation +// * UNKNOWN if no dependence information can be gathered or is gathered +// for it. +// * DIRECTION if a dependence direction could be found, but not a +// distance. +// * DISTANCE if a dependence distance could be found. +// * PEEL if peeling either the first or last iteration will break +// dependence between the given load and store. +// * IRRELEVANT if it has no effect on the dependence between the given +// load and store. +// +// If peel_first == true, the analysis has found that peeling the first +// iteration of this loop will break dependence. +// +// If peel_last == true, the analysis has found that peeling the last iteration +// of this loop will break dependence. +class DistanceEntry { + public: + enum DependenceInformation { + UNKNOWN = 0, + DIRECTION = 1, + DISTANCE = 2, + PEEL = 3, + IRRELEVANT = 4, + POINT = 5 + }; + enum Directions { + NONE = 0, + LT = 1, + EQ = 2, + LE = 3, + GT = 4, + NE = 5, + GE = 6, + ALL = 7 + }; + DependenceInformation dependence_information; + Directions direction; + int64_t distance; + bool peel_first; + bool peel_last; + int64_t point_x; + int64_t point_y; + + DistanceEntry() + : dependence_information(DependenceInformation::UNKNOWN), + direction(Directions::ALL), + distance(0), + peel_first(false), + peel_last(false), + point_x(0), + point_y(0) {} + + explicit DistanceEntry(Directions direction_) + : dependence_information(DependenceInformation::DIRECTION), + direction(direction_), + distance(0), + peel_first(false), + peel_last(false), + point_x(0), + point_y(0) {} + + DistanceEntry(Directions direction_, int64_t distance_) + : dependence_information(DependenceInformation::DISTANCE), + direction(direction_), + distance(distance_), + peel_first(false), + peel_last(false), + point_x(0), + point_y(0) {} + + DistanceEntry(int64_t x, int64_t y) + : dependence_information(DependenceInformation::POINT), + direction(Directions::ALL), + distance(0), + peel_first(false), + peel_last(false), + point_x(x), + point_y(y) {} + + bool operator==(const DistanceEntry& rhs) const { + return direction == rhs.direction && peel_first == rhs.peel_first && + peel_last == rhs.peel_last && distance == rhs.distance && + point_x == rhs.point_x && point_y == rhs.point_y; + } + + bool operator!=(const DistanceEntry& rhs) const { return !(*this == rhs); } +}; + +// Stores a vector of DistanceEntrys, one per loop in the analysis. +// A DistanceVector holds all of the information gathered in a dependence +// analysis wrt the loops stored in the LoopDependenceAnalysis performing the +// analysis. +class DistanceVector { + public: + explicit DistanceVector(size_t size) : entries(size, DistanceEntry{}) {} + + explicit DistanceVector(std::vector entries_) + : entries(entries_) {} + + DistanceEntry& GetEntry(size_t index) { return entries[index]; } + const DistanceEntry& GetEntry(size_t index) const { return entries[index]; } + + std::vector& GetEntries() { return entries; } + const std::vector& GetEntries() const { return entries; } + + bool operator==(const DistanceVector& rhs) const { + if (entries.size() != rhs.entries.size()) { + return false; + } + for (size_t i = 0; i < entries.size(); ++i) { + if (entries[i] != rhs.entries[i]) { + return false; + } + } + return true; + } + bool operator!=(const DistanceVector& rhs) const { return !(*this == rhs); } + + private: + std::vector entries; +}; + +class DependenceLine; +class DependenceDistance; +class DependencePoint; +class DependenceNone; +class DependenceEmpty; + +class Constraint { + public: + explicit Constraint(const ir::Loop* loop) : loop_(loop) {} + enum ConstraintType { Line, Distance, Point, None, Empty }; + + virtual ConstraintType GetType() const = 0; + + virtual ~Constraint() {} + + // Get the loop this constraint belongs to. + const ir::Loop* GetLoop() const { return loop_; } + + bool operator==(const Constraint& other) const; + + bool operator!=(const Constraint& other) const; + +#define DeclareCastMethod(target) \ + virtual target* As##target() { return nullptr; } \ + virtual const target* As##target() const { return nullptr; } + DeclareCastMethod(DependenceLine); + DeclareCastMethod(DependenceDistance); + DeclareCastMethod(DependencePoint); + DeclareCastMethod(DependenceNone); + DeclareCastMethod(DependenceEmpty); +#undef DeclareCastMethod + + protected: + const ir::Loop* loop_; +}; + +class DependenceLine : public Constraint { + public: + DependenceLine(SENode* a, SENode* b, SENode* c, const ir::Loop* loop) + : Constraint(loop), a_(a), b_(b), c_(c) {} + + ConstraintType GetType() const final { return Line; } + + DependenceLine* AsDependenceLine() final { return this; } + const DependenceLine* AsDependenceLine() const final { return this; } + + SENode* GetA() const { return a_; } + SENode* GetB() const { return b_; } + SENode* GetC() const { return c_; } + + private: + SENode* a_; + SENode* b_; + SENode* c_; +}; + +class DependenceDistance : public Constraint { + public: + DependenceDistance(SENode* distance, const ir::Loop* loop) + : Constraint(loop), distance_(distance) {} + + ConstraintType GetType() const final { return Distance; } + + DependenceDistance* AsDependenceDistance() final { return this; } + const DependenceDistance* AsDependenceDistance() const final { return this; } + + SENode* GetDistance() const { return distance_; } + + private: + SENode* distance_; +}; + +class DependencePoint : public Constraint { + public: + DependencePoint(SENode* source, SENode* destination, const ir::Loop* loop) + : Constraint(loop), source_(source), destination_(destination) {} + + ConstraintType GetType() const final { return Point; } + + DependencePoint* AsDependencePoint() final { return this; } + const DependencePoint* AsDependencePoint() const final { return this; } + + SENode* GetSource() const { return source_; } + SENode* GetDestination() const { return destination_; } + + private: + SENode* source_; + SENode* destination_; +}; + +class DependenceNone : public Constraint { + public: + DependenceNone() : Constraint(nullptr) {} + ConstraintType GetType() const final { return None; } + + DependenceNone* AsDependenceNone() final { return this; } + const DependenceNone* AsDependenceNone() const final { return this; } +}; + +class DependenceEmpty : public Constraint { + public: + DependenceEmpty() : Constraint(nullptr) {} + ConstraintType GetType() const final { return Empty; } + + DependenceEmpty* AsDependenceEmpty() final { return this; } + const DependenceEmpty* AsDependenceEmpty() const final { return this; } +}; + +// Provides dependence information between a store instruction and a load +// instruction inside the same loop in a loop nest. +// +// The analysis can only check dependence between stores and loads with regard +// to the loop nest it is created with. +// +// The analysis can output debugging information to a stream. The output +// describes the control flow of the analysis and what information it can deduce +// at each step. +// SetDebugStream and ClearDebugStream are provided for this functionality. +// +// The dependency algorithm is based on the 1990 Paper +// Practical Dependence Testing +// Gina Goff, Ken Kennedy, Chau-Wen Tseng +// +// The algorithm first identifies subscript pairs between the load and store. +// Each pair is tested until all have been tested or independence is found. +// The number of induction variables in a pair determines which test to perform +// on it; +// Zero Index Variable (ZIV) is used when no induction variables are present +// in the pair. +// Single Index Variable (SIV) is used when only one induction variable is +// present, but may occur multiple times in the pair. +// Multiple Index Variable (MIV) is used when more than one induction variable +// is present in the pair. +class LoopDependenceAnalysis { + public: + LoopDependenceAnalysis(ir::IRContext* context, + std::vector loops) + : context_(context), + loops_(loops), + scalar_evolution_(context), + debug_stream_(nullptr), + constraints_{} {} + + // Finds the dependence between |source| and |destination|. + // |source| should be an OpLoad. + // |destination| should be an OpStore. + // Any direction and distance information found will be stored in + // |distance_vector|. + // Returns true if independence is found, false otherwise. + bool GetDependence(const ir::Instruction* source, + const ir::Instruction* destination, + DistanceVector* distance_vector); + + // Returns true if |subscript_pair| represents a Zero Index Variable pair + // (ZIV) + bool IsZIV(const std::pair& subscript_pair); + + // Returns true if |subscript_pair| represents a Single Index Variable + // (SIV) pair + bool IsSIV(const std::pair& subscript_pair); + + // Returns true if |subscript_pair| represents a Multiple Index Variable + // (MIV) pair + bool IsMIV(const std::pair& subscript_pair); + + // Finds the lower bound of |loop| as an SENode* and returns the result. + // The lower bound is the starting value of the loops induction variable + SENode* GetLowerBound(const ir::Loop* loop); + + // Finds the upper bound of |loop| as an SENode* and returns the result. + // The upper bound is the last value before the loop exit condition is met. + SENode* GetUpperBound(const ir::Loop* loop); + + // Returns true if |value| is between |bound_one| and |bound_two| (inclusive). + bool IsWithinBounds(int64_t value, int64_t bound_one, int64_t bound_two); + + // Finds the bounds of |loop| as upper_bound - lower_bound and returns the + // resulting SENode. + // If the operations can not be completed a nullptr is returned. + SENode* GetTripCount(const ir::Loop* loop); + + // Returns the SENode* produced by building an SENode from the result of + // calling GetInductionInitValue on |loop|. + // If the operation can not be completed a nullptr is returned. + SENode* GetFirstTripInductionNode(const ir::Loop* loop); + + // Returns the SENode* produced by building an SENode from the result of + // GetFirstTripInductionNode + (GetTripCount - 1) * induction_coefficient. + // If the operation can not be completed a nullptr is returned. + SENode* GetFinalTripInductionNode(const ir::Loop* loop, + SENode* induction_coefficient); + + // Returns all the distinct loops that appear in |nodes|. + std::set CollectLoops( + const std::vector& nodes); + + // Returns all the distinct loops that appear in |source| and |destination|. + std::set CollectLoops(SENode* source, SENode* destination); + + // Returns true if |distance| is provably outside the loop bounds. + // |coefficient| must be an SENode representing the coefficient of the + // induction variable of |loop|. + // This method is able to handle some symbolic cases which IsWithinBounds + // can't handle. + bool IsProvablyOutsideOfLoopBounds(const ir::Loop* loop, SENode* distance, + SENode* coefficient); + + // Sets the ostream for debug information for the analysis. + void SetDebugStream(std::ostream& debug_stream) { + debug_stream_ = &debug_stream; + } + + // Clears the stored ostream to stop debug information printing. + void ClearDebugStream() { debug_stream_ = nullptr; } + + // Returns the ScalarEvolutionAnalysis used by this analysis. + ScalarEvolutionAnalysis* GetScalarEvolution() { return &scalar_evolution_; } + + // Creates a new constraint of type |T| and returns the pointer to it. + template + Constraint* make_constraint(Args&&... args) { + constraints_.push_back( + std::unique_ptr(new T(std::forward(args)...))); + + return constraints_.back().get(); + } + + // Subscript partitioning as described in Figure 1 of 'Practical Dependence + // Testing' by Gina Goff, Ken Kennedy, and Chau-Wen Tseng from PLDI '91. + // Partitions the subscripts into independent subscripts and minimally coupled + // sets of subscripts. + // Returns the partitioning of subscript pairs. Sets of size 1 indicates an + // independent subscript-pair and others indicate coupled sets. + using PartitionedSubscripts = + std::vector>>; + PartitionedSubscripts PartitionSubscripts( + const std::vector& source_subscripts, + const std::vector& destination_subscripts); + + // Returns the ir::Loop* matching the loop for |subscript_pair|. + // |subscript_pair| must be an SIV pair. + const ir::Loop* GetLoopForSubscriptPair( + const std::pair& subscript_pair); + + // Returns the DistanceEntry matching the loop for |subscript_pair|. + // |subscript_pair| must be an SIV pair. + DistanceEntry* GetDistanceEntryForSubscriptPair( + const std::pair& subscript_pair, + DistanceVector* distance_vector); + + // Returns the DistanceEntry matching |loop|. + DistanceEntry* GetDistanceEntryForLoop(const ir::Loop* loop, + DistanceVector* distance_vector); + + // Returns a vector of Instruction* which form the subscripts of the array + // access defined by the access chain |instruction|. + std::vector GetSubscripts( + const ir::Instruction* instruction); + + // Delta test as described in Figure 3 of 'Practical Dependence + // Testing' by Gina Goff, Ken Kennedy, and Chau-Wen Tseng from PLDI '91. + bool DeltaTest( + const std::vector>& coupled_subscripts, + DistanceVector* dv_entry); + + // Constraint propagation as described in Figure 5 of 'Practical Dependence + // Testing' by Gina Goff, Ken Kennedy, and Chau-Wen Tseng from PLDI '91. + std::pair PropagateConstraints( + const std::pair& subscript_pair, + const std::vector& constraints); + + // Constraint intersection as described in Figure 4 of 'Practical Dependence + // Testing' by Gina Goff, Ken Kennedy, and Chau-Wen Tseng from PLDI '91. + Constraint* IntersectConstraints(Constraint* constraint_0, + Constraint* constraint_1, + const SENode* lower_bound, + const SENode* upper_bound); + + // Returns true if each loop in |loops| is in a form supported by this + // analysis. + // A loop is supported if it has a single induction variable and that + // induction variable has a step of +1 or -1 per loop iteration. + bool CheckSupportedLoops(std::vector loops); + + // Returns true if |loop| is in a form supported by this analysis. + // A loop is supported if it has a single induction variable and that + // induction variable has a step of +1 or -1 per loop iteration. + bool IsSupportedLoop(const ir::Loop* loop); + + private: + ir::IRContext* context_; + + // The loop nest we are analysing the dependence of. + std::vector loops_; + + // The ScalarEvolutionAnalysis used by this analysis to store and perform much + // of its logic. + ScalarEvolutionAnalysis scalar_evolution_; + + // The ostream debug information for the analysis to print to. + std::ostream* debug_stream_; + + // Stores all the constraints created by the analysis. + std::list> constraints_; + + // Returns true if independence can be proven and false if it can't be proven. + bool ZIVTest(const std::pair& subscript_pair); + + // Analyzes the subscript pair to find an applicable SIV test. + // Returns true if independence can be proven and false if it can't be proven. + bool SIVTest(const std::pair& subscript_pair, + DistanceVector* distance_vector); + + // Takes the form a*i + c1, a*i + c2 + // When c1 and c2 are loop invariant and a is constant + // distance = (c1 - c2)/a + // < if distance > 0 + // direction = = if distance = 0 + // > if distance < 0 + // Returns true if independence is proven and false if it can't be proven. + bool StrongSIVTest(SENode* source, SENode* destination, SENode* coeff, + DistanceEntry* distance_entry); + + // Takes for form a*i + c1, a*i + c2 + // where c1 and c2 are loop invariant and a is constant. + // c1 and/or c2 contain one or more SEValueUnknown nodes. + bool SymbolicStrongSIVTest(SENode* source, SENode* destination, + SENode* coefficient, + DistanceEntry* distance_entry); + + // Takes the form a1*i + c1, a2*i + c2 + // where a1 = 0 + // distance = (c1 - c2) / a2 + // Returns true if independence is proven and false if it can't be proven. + bool WeakZeroSourceSIVTest(SENode* source, SERecurrentNode* destination, + SENode* coefficient, + DistanceEntry* distance_entry); + + // Takes the form a1*i + c1, a2*i + c2 + // where a2 = 0 + // distance = (c2 - c1) / a1 + // Returns true if independence is proven and false if it can't be proven. + bool WeakZeroDestinationSIVTest(SERecurrentNode* source, SENode* destination, + SENode* coefficient, + DistanceEntry* distance_entry); + + // Takes the form a1*i + c1, a2*i + c2 + // where a1 = -a2 + // distance = (c2 - c1) / 2*a1 + // Returns true if independence is proven and false if it can't be proven. + bool WeakCrossingSIVTest(SENode* source, SENode* destination, + SENode* coefficient, DistanceEntry* distance_entry); + + // Uses the def_use_mgr to get the instruction referenced by + // SingleWordInOperand(|id|) when called on |instruction|. + ir::Instruction* GetOperandDefinition(const ir::Instruction* instruction, + int id); + + // Perform the GCD test if both, the source and the destination nodes, are in + // the form a0*i0 + a1*i1 + ... an*in + c. + bool GCDMIVTest(const std::pair& subscript_pair); + + // Finds the number of induction variables in |node|. + // Returns -1 on failure. + int64_t CountInductionVariables(SENode* node); + + // Finds the number of induction variables shared between |source| and + // |destination|. + // Returns -1 on failure. + int64_t CountInductionVariables(SENode* source, SENode* destination); + + // Takes the offset from the induction variable and subtracts the lower bound + // from it to get the constant term added to the induction. + // Returns the resuting constant term, or nullptr if it could not be produced. + SENode* GetConstantTerm(const ir::Loop* loop, SERecurrentNode* induction); + + // Marks all the distance entries in |distance_vector| that were relate to + // loops in |loops_| but were not used in any subscripts as irrelevant to the + // to the dependence test. + void MarkUnsusedDistanceEntriesAsIrrelevant( + const ir::Instruction* source, const ir::Instruction* destination, + DistanceVector* distance_vector); + + // Converts |value| to a std::string and returns the result. + // This is required because Android does not compile std::to_string. + template + std::string ToString(valueT value) { + std::ostringstream string_stream; + string_stream << value; + return string_stream.str(); + } + + // Prints |debug_msg| and "\n" to the ostream pointed to by |debug_stream_|. + // Won't print anything if |debug_stream_| is nullptr. + void PrintDebug(std::string debug_msg); +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LOOP_DEPENDENCE_H__ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence_helpers.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence_helpers.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5420221524a96c53c7e143f667766c2706b32928 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_dependence_helpers.cpp @@ -0,0 +1,545 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/loop_dependence.h" + +#include +#include +#include +#include +#include +#include + +#include "opt/basic_block.h" +#include "opt/instruction.h" +#include "opt/scalar_analysis.h" +#include "opt/scalar_analysis_nodes.h" + +namespace spvtools { +namespace opt { + +bool LoopDependenceAnalysis::IsZIV( + const std::pair& subscript_pair) { + return CountInductionVariables(subscript_pair.first, subscript_pair.second) == + 0; +} + +bool LoopDependenceAnalysis::IsSIV( + const std::pair& subscript_pair) { + return CountInductionVariables(subscript_pair.first, subscript_pair.second) == + 1; +} + +bool LoopDependenceAnalysis::IsMIV( + const std::pair& subscript_pair) { + return CountInductionVariables(subscript_pair.first, subscript_pair.second) > + 1; +} + +SENode* LoopDependenceAnalysis::GetLowerBound(const ir::Loop* loop) { + ir::Instruction* cond_inst = loop->GetConditionInst(); + if (!cond_inst) { + return nullptr; + } + ir::Instruction* lower_inst = GetOperandDefinition(cond_inst, 0); + switch (cond_inst->opcode()) { + case SpvOpULessThan: + case SpvOpSLessThan: + case SpvOpULessThanEqual: + case SpvOpSLessThanEqual: + case SpvOpUGreaterThan: + case SpvOpSGreaterThan: + case SpvOpUGreaterThanEqual: + case SpvOpSGreaterThanEqual: { + // If we have a phi we are looking at the induction variable. We look + // through the phi to the initial value of the phi upon entering the loop. + if (lower_inst->opcode() == SpvOpPhi) { + lower_inst = GetOperandDefinition(lower_inst, 0); + // We don't handle looking through multiple phis. + if (lower_inst->opcode() == SpvOpPhi) { + return nullptr; + } + } + return scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(lower_inst)); + } + default: + return nullptr; + } +} + +SENode* LoopDependenceAnalysis::GetUpperBound(const ir::Loop* loop) { + ir::Instruction* cond_inst = loop->GetConditionInst(); + if (!cond_inst) { + return nullptr; + } + ir::Instruction* upper_inst = GetOperandDefinition(cond_inst, 1); + switch (cond_inst->opcode()) { + case SpvOpULessThan: + case SpvOpSLessThan: { + // When we have a < condition we must subtract 1 from the analyzed upper + // instruction. + SENode* upper_bound = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction( + scalar_evolution_.AnalyzeInstruction(upper_inst), + scalar_evolution_.CreateConstant(1))); + return upper_bound; + } + case SpvOpUGreaterThan: + case SpvOpSGreaterThan: { + // When we have a > condition we must add 1 to the analyzed upper + // instruction. + SENode* upper_bound = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateAddNode( + scalar_evolution_.AnalyzeInstruction(upper_inst), + scalar_evolution_.CreateConstant(1))); + return upper_bound; + } + case SpvOpULessThanEqual: + case SpvOpSLessThanEqual: + case SpvOpUGreaterThanEqual: + case SpvOpSGreaterThanEqual: { + // We don't need to modify the results of analyzing when we have <= or >=. + SENode* upper_bound = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(upper_inst)); + return upper_bound; + } + default: + return nullptr; + } +} + +bool LoopDependenceAnalysis::IsWithinBounds(int64_t value, int64_t bound_one, + int64_t bound_two) { + if (bound_one < bound_two) { + // If |bound_one| is the lower bound. + return (value >= bound_one && value <= bound_two); + } else if (bound_one > bound_two) { + // If |bound_two| is the lower bound. + return (value >= bound_two && value <= bound_one); + } else { + // Both bounds have the same value. + return value == bound_one; + } +} + +bool LoopDependenceAnalysis::IsProvablyOutsideOfLoopBounds( + const ir::Loop* loop, SENode* distance, SENode* coefficient) { + // We test to see if we can reduce the coefficient to an integral constant. + SEConstantNode* coefficient_constant = coefficient->AsSEConstantNode(); + if (!coefficient_constant) { + PrintDebug( + "IsProvablyOutsideOfLoopBounds could not reduce coefficient to a " + "SEConstantNode so must exit."); + return false; + } + + SENode* lower_bound = GetLowerBound(loop); + SENode* upper_bound = GetUpperBound(loop); + if (!lower_bound || !upper_bound) { + PrintDebug( + "IsProvablyOutsideOfLoopBounds could not get both the lower and upper " + "bounds so must exit."); + return false; + } + // If the coefficient is positive we calculate bounds as upper - lower + // If the coefficient is negative we calculate bounds as lower - upper + SENode* bounds = nullptr; + if (coefficient_constant->FoldToSingleValue() >= 0) { + PrintDebug( + "IsProvablyOutsideOfLoopBounds found coefficient >= 0.\n" + "Using bounds as upper - lower."); + bounds = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(upper_bound, lower_bound)); + } else { + PrintDebug( + "IsProvablyOutsideOfLoopBounds found coefficient < 0.\n" + "Using bounds as lower - upper."); + bounds = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(lower_bound, upper_bound)); + } + + // We can attempt to deal with symbolic cases by subtracting |distance| and + // the bound nodes. If we can subtract, simplify and produce a SEConstantNode + // we can produce some information. + SEConstantNode* distance_minus_bounds = + scalar_evolution_ + .SimplifyExpression( + scalar_evolution_.CreateSubtraction(distance, bounds)) + ->AsSEConstantNode(); + if (distance_minus_bounds) { + PrintDebug( + "IsProvablyOutsideOfLoopBounds found distance - bounds as a " + "SEConstantNode with value " + + ToString(distance_minus_bounds->FoldToSingleValue())); + // If distance - bounds > 0 we prove the distance is outwith the loop + // bounds. + if (distance_minus_bounds->FoldToSingleValue() > 0) { + PrintDebug( + "IsProvablyOutsideOfLoopBounds found distance escaped the loop " + "bounds."); + return true; + } + } + + return false; +} + +const ir::Loop* LoopDependenceAnalysis::GetLoopForSubscriptPair( + const std::pair& subscript_pair) { + // Collect all the SERecurrentNodes. + std::vector source_nodes = + std::get<0>(subscript_pair)->CollectRecurrentNodes(); + std::vector destination_nodes = + std::get<1>(subscript_pair)->CollectRecurrentNodes(); + + // Collect all the loops stored by the SERecurrentNodes. + std::unordered_set loops{}; + for (auto source_nodes_it = source_nodes.begin(); + source_nodes_it != source_nodes.end(); ++source_nodes_it) { + loops.insert((*source_nodes_it)->GetLoop()); + } + for (auto destination_nodes_it = destination_nodes.begin(); + destination_nodes_it != destination_nodes.end(); + ++destination_nodes_it) { + loops.insert((*destination_nodes_it)->GetLoop()); + } + + // If we didn't find 1 loop |subscript_pair| is a subscript over multiple or 0 + // loops. We don't handle this so return nullptr. + if (loops.size() != 1) { + PrintDebug("GetLoopForSubscriptPair found loops.size() != 1."); + return nullptr; + } + return *loops.begin(); +} + +DistanceEntry* LoopDependenceAnalysis::GetDistanceEntryForLoop( + const ir::Loop* loop, DistanceVector* distance_vector) { + if (!loop) { + return nullptr; + } + + DistanceEntry* distance_entry = nullptr; + for (size_t loop_index = 0; loop_index < loops_.size(); ++loop_index) { + if (loop == loops_[loop_index]) { + distance_entry = &(distance_vector->GetEntries()[loop_index]); + break; + } + } + + return distance_entry; +} + +DistanceEntry* LoopDependenceAnalysis::GetDistanceEntryForSubscriptPair( + const std::pair& subscript_pair, + DistanceVector* distance_vector) { + const ir::Loop* loop = GetLoopForSubscriptPair(subscript_pair); + + return GetDistanceEntryForLoop(loop, distance_vector); +} + +SENode* LoopDependenceAnalysis::GetTripCount(const ir::Loop* loop) { + ir::BasicBlock* condition_block = loop->FindConditionBlock(); + if (!condition_block) { + return nullptr; + } + ir::Instruction* induction_instr = + loop->FindConditionVariable(condition_block); + if (!induction_instr) { + return nullptr; + } + ir::Instruction* cond_instr = loop->GetConditionInst(); + if (!cond_instr) { + return nullptr; + } + + size_t iteration_count = 0; + + // We have to check the instruction type here. If the condition instruction + // isn't a supported type we can't calculate the trip count. + if (loop->IsSupportedCondition(cond_instr->opcode())) { + if (loop->FindNumberOfIterations(induction_instr, &*condition_block->tail(), + &iteration_count)) { + return scalar_evolution_.CreateConstant( + static_cast(iteration_count)); + } + } + + return nullptr; +} + +SENode* LoopDependenceAnalysis::GetFirstTripInductionNode( + const ir::Loop* loop) { + ir::BasicBlock* condition_block = loop->FindConditionBlock(); + if (!condition_block) { + return nullptr; + } + ir::Instruction* induction_instr = + loop->FindConditionVariable(condition_block); + if (!induction_instr) { + return nullptr; + } + int64_t induction_initial_value = 0; + if (!loop->GetInductionInitValue(induction_instr, &induction_initial_value)) { + return nullptr; + } + + SENode* induction_init_SENode = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateConstant(induction_initial_value)); + return induction_init_SENode; +} + +SENode* LoopDependenceAnalysis::GetFinalTripInductionNode( + const ir::Loop* loop, SENode* induction_coefficient) { + SENode* first_trip_induction_node = GetFirstTripInductionNode(loop); + if (!first_trip_induction_node) { + return nullptr; + } + // Get trip_count as GetTripCount - 1 + // This is because the induction variable is not stepped on the first + // iteration of the loop + SENode* trip_count = + scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateSubtraction( + GetTripCount(loop), scalar_evolution_.CreateConstant(1))); + // Return first_trip_induction_node + trip_count * induction_coefficient + return scalar_evolution_.SimplifyExpression(scalar_evolution_.CreateAddNode( + first_trip_induction_node, + scalar_evolution_.CreateMultiplyNode(trip_count, induction_coefficient))); +} + +std::set LoopDependenceAnalysis::CollectLoops( + const std::vector& recurrent_nodes) { + // We don't handle loops with more than one induction variable. Therefore we + // can identify the number of induction variables by collecting all of the + // loops the collected recurrent nodes belong to. + std::set loops{}; + for (auto recurrent_nodes_it = recurrent_nodes.begin(); + recurrent_nodes_it != recurrent_nodes.end(); ++recurrent_nodes_it) { + loops.insert((*recurrent_nodes_it)->GetLoop()); + } + + return loops; +} + +int64_t LoopDependenceAnalysis::CountInductionVariables(SENode* node) { + if (!node) { + return -1; + } + + std::vector recurrent_nodes = node->CollectRecurrentNodes(); + + // We don't handle loops with more than one induction variable. Therefore we + // can identify the number of induction variables by collecting all of the + // loops the collected recurrent nodes belong to. + std::set loops = CollectLoops(recurrent_nodes); + + return static_cast(loops.size()); +} + +std::set LoopDependenceAnalysis::CollectLoops( + SENode* source, SENode* destination) { + if (!source || !destination) { + return std::set{}; + } + + std::vector source_nodes = source->CollectRecurrentNodes(); + std::vector destination_nodes = + destination->CollectRecurrentNodes(); + + std::set loops = CollectLoops(source_nodes); + std::set destination_loops = CollectLoops(destination_nodes); + + loops.insert(std::begin(destination_loops), std::end(destination_loops)); + + return loops; +} + +int64_t LoopDependenceAnalysis::CountInductionVariables(SENode* source, + SENode* destination) { + if (!source || !destination) { + return -1; + } + + std::set loops = CollectLoops(source, destination); + + return static_cast(loops.size()); +} + +ir::Instruction* LoopDependenceAnalysis::GetOperandDefinition( + const ir::Instruction* instruction, int id) { + return context_->get_def_use_mgr()->GetDef( + instruction->GetSingleWordInOperand(id)); +} + +std::vector LoopDependenceAnalysis::GetSubscripts( + const ir::Instruction* instruction) { + ir::Instruction* access_chain = GetOperandDefinition(instruction, 0); + + std::vector subscripts; + + for (auto i = 1u; i < access_chain->NumInOperandWords(); ++i) { + subscripts.push_back(GetOperandDefinition(access_chain, i)); + } + + return subscripts; +} + +SENode* LoopDependenceAnalysis::GetConstantTerm(const ir::Loop* loop, + SERecurrentNode* induction) { + SENode* offset = induction->GetOffset(); + SENode* lower_bound = GetLowerBound(loop); + if (!offset || !lower_bound) { + return nullptr; + } + SENode* constant_term = scalar_evolution_.SimplifyExpression( + scalar_evolution_.CreateSubtraction(offset, lower_bound)); + return constant_term; +} + +bool LoopDependenceAnalysis::CheckSupportedLoops( + std::vector loops) { + for (auto loop : loops) { + if (!IsSupportedLoop(loop)) { + return false; + } + } + return true; +} + +void LoopDependenceAnalysis::MarkUnsusedDistanceEntriesAsIrrelevant( + const ir::Instruction* source, const ir::Instruction* destination, + DistanceVector* distance_vector) { + std::vector source_subscripts = GetSubscripts(source); + std::vector destination_subscripts = + GetSubscripts(destination); + + std::set used_loops{}; + + for (ir::Instruction* source_inst : source_subscripts) { + SENode* source_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(source_inst)); + std::vector recurrent_nodes = + source_node->CollectRecurrentNodes(); + for (SERecurrentNode* recurrent_node : recurrent_nodes) { + used_loops.insert(recurrent_node->GetLoop()); + } + } + + for (ir::Instruction* destination_inst : destination_subscripts) { + SENode* destination_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(destination_inst)); + std::vector recurrent_nodes = + destination_node->CollectRecurrentNodes(); + for (SERecurrentNode* recurrent_node : recurrent_nodes) { + used_loops.insert(recurrent_node->GetLoop()); + } + } + + for (size_t i = 0; i < loops_.size(); ++i) { + if (used_loops.find(loops_[i]) == used_loops.end()) { + distance_vector->GetEntries()[i].dependence_information = + DistanceEntry::DependenceInformation::IRRELEVANT; + } + } +} + +bool LoopDependenceAnalysis::IsSupportedLoop(const ir::Loop* loop) { + std::vector inductions{}; + loop->GetInductionVariables(inductions); + if (inductions.size() != 1) { + return false; + } + ir::Instruction* induction = inductions[0]; + SENode* induction_node = scalar_evolution_.SimplifyExpression( + scalar_evolution_.AnalyzeInstruction(induction)); + if (!induction_node->AsSERecurrentNode()) { + return false; + } + SENode* induction_step = + induction_node->AsSERecurrentNode()->GetCoefficient(); + if (!induction_step->AsSEConstantNode()) { + return false; + } + if (!(induction_step->AsSEConstantNode()->FoldToSingleValue() == 1 || + induction_step->AsSEConstantNode()->FoldToSingleValue() == -1)) { + return false; + } + return true; +} + +void LoopDependenceAnalysis::PrintDebug(std::string debug_msg) { + if (debug_stream_) { + (*debug_stream_) << debug_msg << "\n"; + } +} + +bool Constraint::operator==(const Constraint& other) const { + // A distance of |d| is equivalent to a line |x - y = -d| + if ((GetType() == ConstraintType::Distance && + other.GetType() == ConstraintType::Line) || + (GetType() == ConstraintType::Line && + other.GetType() == ConstraintType::Distance)) { + auto is_distance = AsDependenceLine() != nullptr; + + auto as_distance = + is_distance ? AsDependenceDistance() : other.AsDependenceDistance(); + auto distance = as_distance->GetDistance(); + + auto line = other.AsDependenceLine(); + + auto scalar_evolution = distance->GetParentAnalysis(); + + auto neg_distance = scalar_evolution->SimplifyExpression( + scalar_evolution->CreateNegation(distance)); + + return *scalar_evolution->CreateConstant(1) == *line->GetA() && + *scalar_evolution->CreateConstant(-1) == *line->GetB() && + *neg_distance == *line->GetC(); + } + + if (GetType() != other.GetType()) { + return false; + } + + if (AsDependenceDistance()) { + return *AsDependenceDistance()->GetDistance() == + *other.AsDependenceDistance()->GetDistance(); + } + + if (AsDependenceLine()) { + auto this_line = AsDependenceLine(); + auto other_line = other.AsDependenceLine(); + return *this_line->GetA() == *other_line->GetA() && + *this_line->GetB() == *other_line->GetB() && + *this_line->GetC() == *other_line->GetC(); + } + + if (AsDependencePoint()) { + auto this_point = AsDependencePoint(); + auto other_point = other.AsDependencePoint(); + + return *this_point->GetSource() == *other_point->GetSource() && + *this_point->GetDestination() == *other_point->GetDestination(); + } + + return true; +} + +bool Constraint::operator!=(const Constraint& other) const { + return !(*this == other); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9889b40fec30c8512c5dd99a68da4cea0fbc11dd --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.cpp @@ -0,0 +1,945 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/loop_descriptor.h" +#include +#include +#include +#include +#include + +#include "constants.h" +#include "opt/cfg.h" +#include "opt/dominator_tree.h" +#include "opt/ir_builder.h" +#include "opt/ir_context.h" +#include "opt/iterator.h" +#include "opt/make_unique.h" +#include "opt/tree_iterator.h" + +namespace spvtools { +namespace ir { + +// Takes in a phi instruction |induction| and the loop |header| and returns the +// step operation of the loop. +ir::Instruction* Loop::GetInductionStepOperation( + const ir::Instruction* induction) const { + // Induction must be a phi instruction. + assert(induction->opcode() == SpvOpPhi); + + ir::Instruction* step = nullptr; + + opt::analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); + + // Traverse the incoming operands of the phi instruction. + for (uint32_t operand_id = 1; operand_id < induction->NumInOperands(); + operand_id += 2) { + // Incoming edge. + ir::BasicBlock* incoming_block = + context_->cfg()->block(induction->GetSingleWordInOperand(operand_id)); + + // Check if the block is dominated by header, and thus coming from within + // the loop. + if (IsInsideLoop(incoming_block)) { + step = def_use_manager->GetDef( + induction->GetSingleWordInOperand(operand_id - 1)); + break; + } + } + + if (!step || !IsSupportedStepOp(step->opcode())) { + return nullptr; + } + + // The induction variable which binds the loop must only be modified once. + uint32_t lhs = step->GetSingleWordInOperand(0); + uint32_t rhs = step->GetSingleWordInOperand(1); + + // One of the left hand side or right hand side of the step instruction must + // be the induction phi and the other must be an OpConstant. + if (lhs != induction->result_id() && rhs != induction->result_id()) { + return nullptr; + } + + if (def_use_manager->GetDef(lhs)->opcode() != SpvOp::SpvOpConstant && + def_use_manager->GetDef(rhs)->opcode() != SpvOp::SpvOpConstant) { + return nullptr; + } + + return step; +} + +// Returns true if the |step| operation is an induction variable step operation +// which is currently handled. +bool Loop::IsSupportedStepOp(SpvOp step) const { + switch (step) { + case SpvOp::SpvOpISub: + case SpvOp::SpvOpIAdd: + return true; + default: + return false; + } +} + +bool Loop::IsSupportedCondition(SpvOp condition) const { + switch (condition) { + // < + case SpvOp::SpvOpULessThan: + case SpvOp::SpvOpSLessThan: + // > + case SpvOp::SpvOpUGreaterThan: + case SpvOp::SpvOpSGreaterThan: + + // >= + case SpvOp::SpvOpSGreaterThanEqual: + case SpvOp::SpvOpUGreaterThanEqual: + // <= + case SpvOp::SpvOpSLessThanEqual: + case SpvOp::SpvOpULessThanEqual: + + return true; + default: + return false; + } +} + +int64_t Loop::GetResidualConditionValue(SpvOp condition, int64_t initial_value, + int64_t step_value, + size_t number_of_iterations, + size_t factor) { + int64_t remainder = + initial_value + (number_of_iterations % factor) * step_value; + + // We subtract or add one as the above formula calculates the remainder if the + // loop where just less than or greater than. Adding or subtracting one should + // give a functionally equivalent value. + switch (condition) { + case SpvOp::SpvOpSGreaterThanEqual: + case SpvOp::SpvOpUGreaterThanEqual: { + remainder -= 1; + break; + } + case SpvOp::SpvOpSLessThanEqual: + case SpvOp::SpvOpULessThanEqual: { + remainder += 1; + break; + } + + default: + break; + } + return remainder; +} + +ir::Instruction* Loop::GetConditionInst() const { + ir::BasicBlock* condition_block = FindConditionBlock(); + if (!condition_block) { + return nullptr; + } + ir::Instruction* branch_conditional = &*condition_block->tail(); + if (!branch_conditional || + branch_conditional->opcode() != SpvOpBranchConditional) { + return nullptr; + } + ir::Instruction* condition_inst = context_->get_def_use_mgr()->GetDef( + branch_conditional->GetSingleWordInOperand(0)); + if (IsSupportedCondition(condition_inst->opcode())) { + return condition_inst; + } + + return nullptr; +} + +// Extract the initial value from the |induction| OpPhi instruction and store it +// in |value|. If the function couldn't find the initial value of |induction| +// return false. +bool Loop::GetInductionInitValue(const ir::Instruction* induction, + int64_t* value) const { + ir::Instruction* constant_instruction = nullptr; + opt::analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); + + for (uint32_t operand_id = 0; operand_id < induction->NumInOperands(); + operand_id += 2) { + ir::BasicBlock* bb = context_->cfg()->block( + induction->GetSingleWordInOperand(operand_id + 1)); + + if (!IsInsideLoop(bb)) { + constant_instruction = def_use_manager->GetDef( + induction->GetSingleWordInOperand(operand_id)); + } + } + + if (!constant_instruction) return false; + + const opt::analysis::Constant* constant = + context_->get_constant_mgr()->FindDeclaredConstant( + constant_instruction->result_id()); + if (!constant) return false; + + if (value) { + const opt::analysis::Integer* type = + constant->AsIntConstant()->type()->AsInteger(); + + if (type->IsSigned()) { + *value = constant->AsIntConstant()->GetS32BitValue(); + } else { + *value = constant->AsIntConstant()->GetU32BitValue(); + } + } + + return true; +} + +Loop::Loop(IRContext* context, opt::DominatorAnalysis* dom_analysis, + BasicBlock* header, BasicBlock* continue_target, + BasicBlock* merge_target) + : context_(context), + loop_header_(header), + loop_continue_(continue_target), + loop_merge_(merge_target), + loop_preheader_(nullptr), + parent_(nullptr), + loop_is_marked_for_removal_(false) { + assert(context); + assert(dom_analysis); + loop_preheader_ = FindLoopPreheader(dom_analysis); +} + +BasicBlock* Loop::FindLoopPreheader(opt::DominatorAnalysis* dom_analysis) { + CFG* cfg = context_->cfg(); + opt::DominatorTree& dom_tree = dom_analysis->GetDomTree(); + opt::DominatorTreeNode* header_node = dom_tree.GetTreeNode(loop_header_); + + // The loop predecessor. + BasicBlock* loop_pred = nullptr; + + auto header_pred = cfg->preds(loop_header_->id()); + for (uint32_t p_id : header_pred) { + opt::DominatorTreeNode* node = dom_tree.GetTreeNode(p_id); + if (node && !dom_tree.Dominates(header_node, node)) { + // The predecessor is not part of the loop, so potential loop preheader. + if (loop_pred && node->bb_ != loop_pred) { + // If we saw 2 distinct predecessors that are outside the loop, we don't + // have a loop preheader. + return nullptr; + } + loop_pred = node->bb_; + } + } + // Safe guard against invalid code, SPIR-V spec forbids loop with the entry + // node as header. + assert(loop_pred && "The header node is the entry block ?"); + + // So we have a unique basic block that can enter this loop. + // If this loop is the unique successor of this block, then it is a loop + // preheader. + bool is_preheader = true; + uint32_t loop_header_id = loop_header_->id(); + const auto* const_loop_pred = loop_pred; + const_loop_pred->ForEachSuccessorLabel( + [&is_preheader, loop_header_id](const uint32_t id) { + if (id != loop_header_id) is_preheader = false; + }); + if (is_preheader) return loop_pred; + return nullptr; +} + +bool Loop::IsInsideLoop(Instruction* inst) const { + const BasicBlock* parent_block = context_->get_instr_block(inst); + if (!parent_block) return false; + return IsInsideLoop(parent_block); +} + +bool Loop::IsBasicBlockInLoopSlow(const BasicBlock* bb) { + assert(bb->GetParent() && "The basic block does not belong to a function"); + opt::DominatorAnalysis* dom_analysis = + context_->GetDominatorAnalysis(bb->GetParent()); + if (dom_analysis->IsReachable(bb) && + !dom_analysis->Dominates(GetHeaderBlock(), bb)) + return false; + + return true; +} + +BasicBlock* Loop::GetOrCreatePreHeaderBlock() { + if (loop_preheader_) return loop_preheader_; + + CFG* cfg = context_->cfg(); + loop_header_ = cfg->SplitLoopHeader(loop_header_); + return loop_preheader_; +} + +void Loop::SetLatchBlock(BasicBlock* latch) { +#ifndef NDEBUG + assert(latch->GetParent() && "The basic block does not belong to a function"); + + const auto* const_latch = latch; + const_latch->ForEachSuccessorLabel([this](uint32_t id) { + assert((!IsInsideLoop(id) || id == GetHeaderBlock()->id()) && + "A predecessor of the continue block does not belong to the loop"); + }); +#endif // NDEBUG + assert(IsInsideLoop(latch) && "The continue block is not in the loop"); + + SetLatchBlockImpl(latch); +} + +void Loop::SetMergeBlock(BasicBlock* merge) { +#ifndef NDEBUG + assert(merge->GetParent() && "The basic block does not belong to a function"); +#endif // NDEBUG + assert(!IsInsideLoop(merge) && "The merge block is in the loop"); + + SetMergeBlockImpl(merge); + if (GetHeaderBlock()->GetLoopMergeInst()) { + UpdateLoopMergeInst(); + } +} + +void Loop::SetPreHeaderBlock(BasicBlock* preheader) { + if (preheader) { + assert(!IsInsideLoop(preheader) && "The preheader block is in the loop"); + assert(preheader->tail()->opcode() == SpvOpBranch && + "The preheader block does not unconditionally branch to the header " + "block"); + assert(preheader->tail()->GetSingleWordOperand(0) == + GetHeaderBlock()->id() && + "The preheader block does not unconditionally branch to the header " + "block"); + } + loop_preheader_ = preheader; +} + +void Loop::GetExitBlocks(std::unordered_set* exit_blocks) const { + ir::CFG* cfg = context_->cfg(); + exit_blocks->clear(); + + for (uint32_t bb_id : GetBlocks()) { + const spvtools::ir::BasicBlock* bb = cfg->block(bb_id); + bb->ForEachSuccessorLabel([exit_blocks, this](uint32_t succ) { + if (!IsInsideLoop(succ)) { + exit_blocks->insert(succ); + } + }); + } +} + +void Loop::GetMergingBlocks( + std::unordered_set* merging_blocks) const { + assert(GetMergeBlock() && "This loop is not structured"); + ir::CFG* cfg = context_->cfg(); + merging_blocks->clear(); + + std::stack to_visit; + to_visit.push(GetMergeBlock()); + while (!to_visit.empty()) { + const ir::BasicBlock* bb = to_visit.top(); + to_visit.pop(); + merging_blocks->insert(bb->id()); + for (uint32_t pred_id : cfg->preds(bb->id())) { + if (!IsInsideLoop(pred_id) && !merging_blocks->count(pred_id)) { + to_visit.push(cfg->block(pred_id)); + } + } + } +} + +namespace { + +static inline bool IsBasicBlockSafeToClone(IRContext* context, BasicBlock* bb) { + for (ir::Instruction& inst : *bb) { + if (!inst.IsBranch() && !context->IsCombinatorInstruction(&inst)) + return false; + } + + return true; +} + +} // namespace + +bool Loop::IsSafeToClone() const { + ir::CFG& cfg = *context_->cfg(); + + for (uint32_t bb_id : GetBlocks()) { + BasicBlock* bb = cfg.block(bb_id); + assert(bb); + if (!IsBasicBlockSafeToClone(context_, bb)) return false; + } + + // Look at the merge construct. + if (GetHeaderBlock()->GetLoopMergeInst()) { + std::unordered_set blocks; + GetMergingBlocks(&blocks); + blocks.erase(GetMergeBlock()->id()); + for (uint32_t bb_id : blocks) { + BasicBlock* bb = cfg.block(bb_id); + assert(bb); + if (!IsBasicBlockSafeToClone(context_, bb)) return false; + } + } + + return true; +} + +bool Loop::IsLCSSA() const { + ir::CFG* cfg = context_->cfg(); + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + std::unordered_set exit_blocks; + GetExitBlocks(&exit_blocks); + + // Declare ir_context so we can capture context_ in the below lambda + ir::IRContext* ir_context = context_; + + for (uint32_t bb_id : GetBlocks()) { + for (Instruction& insn : *cfg->block(bb_id)) { + // All uses must be either: + // - In the loop; + // - In an exit block and in a phi instruction. + if (!def_use_mgr->WhileEachUser( + &insn, + [&exit_blocks, ir_context, this](ir::Instruction* use) -> bool { + BasicBlock* parent = ir_context->get_instr_block(use); + assert(parent && "Invalid analysis"); + if (IsInsideLoop(parent)) return true; + if (use->opcode() != SpvOpPhi) return false; + return exit_blocks.count(parent->id()); + })) + return false; + } + } + return true; +} + +bool Loop::ShouldHoistInstruction(IRContext* context, Instruction* inst) { + return AreAllOperandsOutsideLoop(context, inst) && + inst->IsOpcodeCodeMotionSafe(); +} + +bool Loop::AreAllOperandsOutsideLoop(IRContext* context, Instruction* inst) { + opt::analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); + bool all_outside_loop = true; + + const std::function operand_outside_loop = + [this, &def_use_mgr, &all_outside_loop](uint32_t* id) { + if (this->IsInsideLoop(def_use_mgr->GetDef(*id))) { + all_outside_loop = false; + return; + } + }; + + inst->ForEachInId(operand_outside_loop); + return all_outside_loop; +} + +void Loop::ComputeLoopStructuredOrder( + std::vector* ordered_loop_blocks, bool include_pre_header, + bool include_merge) const { + ir::CFG& cfg = *context_->cfg(); + + // Reserve the memory: all blocks in the loop + extra if needed. + ordered_loop_blocks->reserve(GetBlocks().size() + include_pre_header + + include_merge); + + if (include_pre_header && GetPreHeaderBlock()) + ordered_loop_blocks->push_back(loop_preheader_); + cfg.ForEachBlockInReversePostOrder( + loop_header_, [ordered_loop_blocks, this](BasicBlock* bb) { + if (IsInsideLoop(bb)) ordered_loop_blocks->push_back(bb); + }); + if (include_merge && GetMergeBlock()) + ordered_loop_blocks->push_back(loop_merge_); +} + +LoopDescriptor::LoopDescriptor(const Function* f) + : loops_(), dummy_top_loop_(nullptr) { + PopulateList(f); +} + +LoopDescriptor::~LoopDescriptor() { ClearLoops(); } + +void LoopDescriptor::PopulateList(const Function* f) { + IRContext* context = f->GetParent()->context(); + + opt::DominatorAnalysis* dom_analysis = context->GetDominatorAnalysis(f); + + ClearLoops(); + + // Post-order traversal of the dominator tree to find all the OpLoopMerge + // instructions. + opt::DominatorTree& dom_tree = dom_analysis->GetDomTree(); + for (opt::DominatorTreeNode& node : + ir::make_range(dom_tree.post_begin(), dom_tree.post_end())) { + Instruction* merge_inst = node.bb_->GetLoopMergeInst(); + if (merge_inst) { + bool all_backedge_unreachable = true; + for (uint32_t pid : context->cfg()->preds(node.bb_->id())) { + if (dom_analysis->IsReachable(pid) && + dom_analysis->Dominates(node.bb_->id(), pid)) { + all_backedge_unreachable = false; + break; + } + } + if (all_backedge_unreachable) + continue; // ignore this one, we actually never branch back. + + // The id of the merge basic block of this loop. + uint32_t merge_bb_id = merge_inst->GetSingleWordOperand(0); + + // The id of the continue basic block of this loop. + uint32_t continue_bb_id = merge_inst->GetSingleWordOperand(1); + + // The merge target of this loop. + BasicBlock* merge_bb = context->cfg()->block(merge_bb_id); + + // The continue target of this loop. + BasicBlock* continue_bb = context->cfg()->block(continue_bb_id); + + // The basic block containing the merge instruction. + BasicBlock* header_bb = context->get_instr_block(merge_inst); + + // Add the loop to the list of all the loops in the function. + Loop* current_loop = + new Loop(context, dom_analysis, header_bb, continue_bb, merge_bb); + loops_.push_back(current_loop); + + // We have a bottom-up construction, so if this loop has nested-loops, + // they are by construction at the tail of the loop list. + for (auto itr = loops_.rbegin() + 1; itr != loops_.rend(); ++itr) { + Loop* previous_loop = *itr; + + // If the loop already has a parent, then it has been processed. + if (previous_loop->HasParent()) continue; + + // If the current loop does not dominates the previous loop then it is + // not nested loop. + if (!dom_analysis->Dominates(header_bb, + previous_loop->GetHeaderBlock())) + continue; + // If the current loop merge dominates the previous loop then it is + // not nested loop. + if (dom_analysis->Dominates(merge_bb, previous_loop->GetHeaderBlock())) + continue; + + current_loop->AddNestedLoop(previous_loop); + } + opt::DominatorTreeNode* dom_merge_node = dom_tree.GetTreeNode(merge_bb); + for (opt::DominatorTreeNode& loop_node : + make_range(node.df_begin(), node.df_end())) { + // Check if we are in the loop. + if (dom_tree.Dominates(dom_merge_node, &loop_node)) continue; + current_loop->AddBasicBlock(loop_node.bb_); + basic_block_to_loop_.insert( + std::make_pair(loop_node.bb_->id(), current_loop)); + } + } + } + for (Loop* loop : loops_) { + if (!loop->HasParent()) dummy_top_loop_.nested_loops_.push_back(loop); + } +} + +ir::BasicBlock* Loop::FindConditionBlock() const { + if (!loop_merge_) { + return nullptr; + } + ir::BasicBlock* condition_block = nullptr; + + uint32_t in_loop_pred = 0; + for (uint32_t p : context_->cfg()->preds(loop_merge_->id())) { + if (IsInsideLoop(p)) { + if (in_loop_pred) { + // 2 in-loop predecessors. + return nullptr; + } + in_loop_pred = p; + } + } + if (!in_loop_pred) { + // Merge block is unreachable. + return nullptr; + } + + ir::BasicBlock* bb = context_->cfg()->block(in_loop_pred); + + if (!bb) return nullptr; + + const ir::Instruction& branch = *bb->ctail(); + + // Make sure the branch is a conditional branch. + if (branch.opcode() != SpvOpBranchConditional) return nullptr; + + // Make sure one of the two possible branches is to the merge block. + if (branch.GetSingleWordInOperand(1) == loop_merge_->id() || + branch.GetSingleWordInOperand(2) == loop_merge_->id()) { + condition_block = bb; + } + + return condition_block; +} + +bool Loop::FindNumberOfIterations(const ir::Instruction* induction, + const ir::Instruction* branch_inst, + size_t* iterations_out, + int64_t* step_value_out, + int64_t* init_value_out) const { + // From the branch instruction find the branch condition. + opt::analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); + + // Condition instruction from the OpConditionalBranch. + ir::Instruction* condition = + def_use_manager->GetDef(branch_inst->GetSingleWordOperand(0)); + + assert(IsSupportedCondition(condition->opcode())); + + // Get the constant manager from the ir context. + opt::analysis::ConstantManager* const_manager = context_->get_constant_mgr(); + + // Find the constant value used by the condition variable. Exit out if it + // isn't a constant int. + const opt::analysis::Constant* upper_bound = + const_manager->FindDeclaredConstant(condition->GetSingleWordOperand(3)); + if (!upper_bound) return false; + + // Must be integer because of the opcode on the condition. + int64_t condition_value = 0; + + const opt::analysis::Integer* type = + upper_bound->AsIntConstant()->type()->AsInteger(); + + if (type->width() > 32) { + return false; + } + + if (type->IsSigned()) { + condition_value = upper_bound->AsIntConstant()->GetS32BitValue(); + } else { + condition_value = upper_bound->AsIntConstant()->GetU32BitValue(); + } + + // Find the instruction which is stepping through the loop. + ir::Instruction* step_inst = GetInductionStepOperation(induction); + if (!step_inst) return false; + + // Find the constant value used by the condition variable. + const opt::analysis::Constant* step_constant = + const_manager->FindDeclaredConstant(step_inst->GetSingleWordOperand(3)); + if (!step_constant) return false; + + // Must be integer because of the opcode on the condition. + int64_t step_value = 0; + + const opt::analysis::Integer* step_type = + step_constant->AsIntConstant()->type()->AsInteger(); + + if (step_type->IsSigned()) { + step_value = step_constant->AsIntConstant()->GetS32BitValue(); + } else { + step_value = step_constant->AsIntConstant()->GetU32BitValue(); + } + + // If this is a subtraction step we should negate the step value. + if (step_inst->opcode() == SpvOp::SpvOpISub) { + step_value = -step_value; + } + + // Find the inital value of the loop and make sure it is a constant integer. + int64_t init_value = 0; + if (!GetInductionInitValue(induction, &init_value)) return false; + + // If iterations is non null then store the value in that. + int64_t num_itrs = GetIterations(condition->opcode(), condition_value, + init_value, step_value); + + // If the loop body will not be reached return false. + if (num_itrs <= 0) { + return false; + } + + if (iterations_out) { + assert(static_cast(num_itrs) <= std::numeric_limits::max()); + *iterations_out = static_cast(num_itrs); + } + + if (step_value_out) { + *step_value_out = step_value; + } + + if (init_value_out) { + *init_value_out = init_value; + } + + return true; +} + +// We retrieve the number of iterations using the following formula, diff / +// |step_value| where diff is calculated differently according to the +// |condition| and uses the |condition_value| and |init_value|. If diff / +// |step_value| is NOT cleanly divisable then we add one to the sum. +int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, + int64_t init_value, int64_t step_value) const { + int64_t diff = 0; + + switch (condition) { + case SpvOp::SpvOpSLessThan: + case SpvOp::SpvOpULessThan: { + // If the condition is not met to begin with the loop will never iterate. + if (!(init_value < condition_value)) return 0; + + diff = condition_value - init_value; + + // If the operation is a less then operation then the diff and step must + // have the same sign otherwise the induction will never cross the + // condition (either never true or always true). + if ((diff < 0 && step_value > 0) || (diff > 0 && step_value < 0)) { + return 0; + } + + break; + } + case SpvOp::SpvOpSGreaterThan: + case SpvOp::SpvOpUGreaterThan: { + // If the condition is not met to begin with the loop will never iterate. + if (!(init_value > condition_value)) return 0; + + diff = init_value - condition_value; + + // If the operation is a greater than operation then the diff and step + // must have opposite signs. Otherwise the condition will always be true + // or will never be true. + if ((diff < 0 && step_value < 0) || (diff > 0 && step_value > 0)) { + return 0; + } + + break; + } + + case SpvOp::SpvOpSGreaterThanEqual: + case SpvOp::SpvOpUGreaterThanEqual: { + // If the condition is not met to begin with the loop will never iterate. + if (!(init_value >= condition_value)) return 0; + + // We subract one to make it the same as SpvOpGreaterThan as it is + // functionally equivalent. + diff = init_value - (condition_value - 1); + + // If the operation is a greater than operation then the diff and step + // must have opposite signs. Otherwise the condition will always be true + // or will never be true. + if ((diff > 0 && step_value > 0) || (diff < 0 && step_value < 0)) { + return 0; + } + + break; + } + + case SpvOp::SpvOpSLessThanEqual: + case SpvOp::SpvOpULessThanEqual: { + // If the condition is not met to begin with the loop will never iterate. + if (!(init_value <= condition_value)) return 0; + + // We add one to make it the same as SpvOpLessThan as it is functionally + // equivalent. + diff = (condition_value + 1) - init_value; + + // If the operation is a less than operation then the diff and step must + // have the same sign otherwise the induction will never cross the + // condition (either never true or always true). + if ((diff < 0 && step_value > 0) || (diff > 0 && step_value < 0)) { + return 0; + } + + break; + } + + default: + assert(false && + "Could not retrieve number of iterations from the loop condition. " + "Condition is not supported."); + } + + // Take the abs of - step values. + step_value = llabs(step_value); + diff = llabs(diff); + int64_t result = diff / step_value; + + if (diff % step_value != 0) { + result += 1; + } + return result; +} + +// Returns the list of induction variables within the loop. +void Loop::GetInductionVariables( + std::vector& induction_variables) const { + for (ir::Instruction& inst : *loop_header_) { + if (inst.opcode() == SpvOp::SpvOpPhi) { + induction_variables.push_back(&inst); + } + } +} + +ir::Instruction* Loop::FindConditionVariable( + const ir::BasicBlock* condition_block) const { + // Find the branch instruction. + const ir::Instruction& branch_inst = *condition_block->ctail(); + + ir::Instruction* induction = nullptr; + // Verify that the branch instruction is a conditional branch. + if (branch_inst.opcode() == SpvOp::SpvOpBranchConditional) { + // From the branch instruction find the branch condition. + opt::analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); + + // Find the instruction representing the condition used in the conditional + // branch. + ir::Instruction* condition = + def_use_manager->GetDef(branch_inst.GetSingleWordOperand(0)); + + // Ensure that the condition is a less than operation. + if (condition && IsSupportedCondition(condition->opcode())) { + // The left hand side operand of the operation. + ir::Instruction* variable_inst = + def_use_manager->GetDef(condition->GetSingleWordOperand(2)); + + // Make sure the variable instruction used is a phi. + if (!variable_inst || variable_inst->opcode() != SpvOpPhi) return nullptr; + + // Make sure the phi instruction only has two incoming blocks. Each + // incoming block will be represented by two in operands in the phi + // instruction, the value and the block which that value came from. We + // assume the cannocalised phi will have two incoming values, one from the + // preheader and one from the continue block. + size_t max_supported_operands = 4; + if (variable_inst->NumInOperands() == max_supported_operands) { + // The operand index of the first incoming block label. + uint32_t operand_label_1 = 1; + + // The operand index of the second incoming block label. + uint32_t operand_label_2 = 3; + + // Make sure one of them is the preheader. + if (!IsInsideLoop( + variable_inst->GetSingleWordInOperand(operand_label_1)) && + !IsInsideLoop( + variable_inst->GetSingleWordInOperand(operand_label_2))) { + return nullptr; + } + + // And make sure that the other is the latch block. + if (variable_inst->GetSingleWordInOperand(operand_label_1) != + loop_continue_->id() && + variable_inst->GetSingleWordInOperand(operand_label_2) != + loop_continue_->id()) { + return nullptr; + } + } else { + return nullptr; + } + + if (!FindNumberOfIterations(variable_inst, &branch_inst, nullptr)) + return nullptr; + induction = variable_inst; + } + } + + return induction; +} + +// Add and remove loops which have been marked for addition and removal to +// maintain the state of the loop descriptor class. +void LoopDescriptor::PostModificationCleanup() { + LoopContainerType loops_to_remove_; + for (ir::Loop* loop : loops_) { + if (loop->IsMarkedForRemoval()) { + loops_to_remove_.push_back(loop); + if (loop->HasParent()) { + loop->GetParent()->RemoveChildLoop(loop); + } + } + } + + for (ir::Loop* loop : loops_to_remove_) { + loops_.erase(std::find(loops_.begin(), loops_.end(), loop)); + } + + for (auto& pair : loops_to_add_) { + ir::Loop* parent = pair.first; + ir::Loop* loop = pair.second; + + if (parent) { + loop->SetParent(nullptr); + parent->AddNestedLoop(loop); + + for (uint32_t block_id : loop->GetBlocks()) { + parent->AddBasicBlock(block_id); + } + } + + loops_.emplace_back(loop); + } + + loops_to_add_.clear(); +} + +void LoopDescriptor::ClearLoops() { + for (Loop* loop : loops_) { + delete loop; + } + loops_.clear(); +} + +// Adds a new loop nest to the descriptor set. +ir::Loop* LoopDescriptor::AddLoopNest(std::unique_ptr new_loop) { + ir::Loop* loop = new_loop.release(); + if (!loop->HasParent()) dummy_top_loop_.nested_loops_.push_back(loop); + // Iterate from inner to outer most loop, adding basic block to loop mapping + // as we go. + for (ir::Loop& current_loop : + make_range(iterator::begin(loop), iterator::end(nullptr))) { + loops_.push_back(¤t_loop); + for (uint32_t bb_id : current_loop.GetBlocks()) + basic_block_to_loop_.insert(std::make_pair(bb_id, ¤t_loop)); + } + + return loop; +} + +void LoopDescriptor::RemoveLoop(ir::Loop* loop) { + ir::Loop* parent = loop->GetParent() ? loop->GetParent() : &dummy_top_loop_; + parent->nested_loops_.erase(std::find(parent->nested_loops_.begin(), + parent->nested_loops_.end(), loop)); + std::for_each( + loop->nested_loops_.begin(), loop->nested_loops_.end(), + [loop](ir::Loop* sub_loop) { sub_loop->SetParent(loop->GetParent()); }); + parent->nested_loops_.insert(parent->nested_loops_.end(), + loop->nested_loops_.begin(), + loop->nested_loops_.end()); + for (uint32_t bb_id : loop->GetBlocks()) { + ir::Loop* l = FindLoopForBasicBlock(bb_id); + if (l == loop) { + SetBasicBlockToLoop(bb_id, l->GetParent()); + } else { + ForgetBasicBlock(bb_id); + } + } + + LoopContainerType::iterator it = + std::find(loops_.begin(), loops_.end(), loop); + assert(it != loops_.end()); + delete loop; + loops_.erase(it); +} + +} // namespace ir +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.h new file mode 100644 index 0000000000000000000000000000000000000000..210ec89305609cad7079acb2a39d18caad51ff56 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_descriptor.h @@ -0,0 +1,546 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_LOOP_DESCRIPTORS_H_ +#define LIBSPIRV_OPT_LOOP_DESCRIPTORS_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "opt/basic_block.h" +#include "opt/module.h" +#include "opt/tree_iterator.h" + +namespace spvtools { +namespace opt { +class DominatorAnalysis; +struct DominatorTreeNode; +} // namespace opt +namespace ir { +class IRContext; +class CFG; +class LoopDescriptor; + +// A class to represent and manipulate a loop in structured control flow. +class Loop { + // The type used to represent nested child loops. + using ChildrenList = std::vector; + + public: + using iterator = ChildrenList::iterator; + using const_iterator = ChildrenList::const_iterator; + using BasicBlockListTy = std::unordered_set; + + explicit Loop(IRContext* context) + : context_(context), + loop_header_(nullptr), + loop_continue_(nullptr), + loop_merge_(nullptr), + loop_preheader_(nullptr), + parent_(nullptr), + loop_is_marked_for_removal_(false) {} + + Loop(IRContext* context, opt::DominatorAnalysis* analysis, BasicBlock* header, + BasicBlock* continue_target, BasicBlock* merge_target); + + // Iterators over the immediate sub-loops. + inline iterator begin() { return nested_loops_.begin(); } + inline iterator end() { return nested_loops_.end(); } + inline const_iterator begin() const { return cbegin(); } + inline const_iterator end() const { return cend(); } + inline const_iterator cbegin() const { return nested_loops_.begin(); } + inline const_iterator cend() const { return nested_loops_.end(); } + + // Returns the header (first basic block of the loop). This block contains the + // OpLoopMerge instruction. + inline BasicBlock* GetHeaderBlock() { return loop_header_; } + inline const BasicBlock* GetHeaderBlock() const { return loop_header_; } + inline void SetHeaderBlock(BasicBlock* header) { loop_header_ = header; } + + // Updates the OpLoopMerge instruction to reflect the current state of the + // loop. + inline void UpdateLoopMergeInst() { + assert(GetHeaderBlock()->GetLoopMergeInst() && + "The loop is not structured"); + ir::Instruction* merge_inst = GetHeaderBlock()->GetLoopMergeInst(); + merge_inst->SetInOperand(0, {GetMergeBlock()->id()}); + } + + // Returns the latch basic block (basic block that holds the back-edge). + // These functions return nullptr if the loop is not structured (i.e. if it + // has more than one backedge). + inline BasicBlock* GetLatchBlock() { return loop_continue_; } + inline const BasicBlock* GetLatchBlock() const { return loop_continue_; } + // Sets |latch| as the loop unique block branching back to the header. + // A latch block must have the following properties: + // - |latch| must be in the loop; + // - must be the only block branching back to the header block. + void SetLatchBlock(BasicBlock* latch); + + // Returns the basic block which marks the end of the loop. + // These functions return nullptr if the loop is not structured. + inline BasicBlock* GetMergeBlock() { return loop_merge_; } + inline const BasicBlock* GetMergeBlock() const { return loop_merge_; } + // Sets |merge| as the loop merge block. A merge block must have the following + // properties: + // - |merge| must not be in the loop; + // - all its predecessors must be in the loop. + // - it must not be already used as merge block. + // If the loop has an OpLoopMerge in its header, this instruction is also + // updated. + void SetMergeBlock(BasicBlock* merge); + + // Returns the loop pre-header, nullptr means that the loop predecessor does + // not qualify as a preheader. + // The preheader is the unique predecessor that: + // - Dominates the loop header; + // - Has only the loop header as successor. + inline BasicBlock* GetPreHeaderBlock() { return loop_preheader_; } + + // Returns the loop pre-header. + inline const BasicBlock* GetPreHeaderBlock() const { return loop_preheader_; } + // Sets |preheader| as the loop preheader block. A preheader block must have + // the following properties: + // - |merge| must not be in the loop; + // - have an unconditional branch to the loop header. + void SetPreHeaderBlock(BasicBlock* preheader); + + // Returns the loop pre-header, if there is no suitable preheader it will be + // created. + BasicBlock* GetOrCreatePreHeaderBlock(); + + // Returns true if this loop contains any nested loops. + inline bool HasNestedLoops() const { return nested_loops_.size() != 0; } + + // Clears and fills |exit_blocks| with all basic blocks that are not in the + // loop and has at least one predecessor in the loop. + void GetExitBlocks(std::unordered_set* exit_blocks) const; + + // Clears and fills |merging_blocks| with all basic blocks that are + // post-dominated by the merge block. The merge block must exist. + // The set |merging_blocks| will only contain the merge block if it is + // unreachable. + void GetMergingBlocks(std::unordered_set* merging_blocks) const; + + // Returns true if the loop is in a Loop Closed SSA form. + // In LCSSA form, all in-loop definitions are used in the loop or in phi + // instructions in the loop exit blocks. + bool IsLCSSA() const; + + // Returns the depth of this loop in the loop nest. + // The outer-most loop has a depth of 1. + inline size_t GetDepth() const { + size_t lvl = 1; + for (const Loop* loop = GetParent(); loop; loop = loop->GetParent()) lvl++; + return lvl; + } + + inline size_t NumImmediateChildren() const { return nested_loops_.size(); } + + // Adds |nested| as a nested loop of this loop. Automatically register |this| + // as the parent of |nested|. + inline void AddNestedLoop(Loop* nested) { + assert(!nested->GetParent() && "The loop has another parent."); + nested_loops_.push_back(nested); + nested->SetParent(this); + } + + inline Loop* GetParent() { return parent_; } + inline const Loop* GetParent() const { return parent_; } + + inline bool HasParent() const { return parent_; } + + // Returns true if this loop is itself nested within another loop. + inline bool IsNested() const { return parent_ != nullptr; } + + // Returns the set of all basic blocks contained within the loop. Will be all + // BasicBlocks dominated by the header which are not also dominated by the + // loop merge block. + inline const BasicBlockListTy& GetBlocks() const { + return loop_basic_blocks_; + } + + // Returns true if the basic block |bb| is inside this loop. + inline bool IsInsideLoop(const BasicBlock* bb) const { + return IsInsideLoop(bb->id()); + } + + // Returns true if the basic block id |bb_id| is inside this loop. + inline bool IsInsideLoop(uint32_t bb_id) const { + return loop_basic_blocks_.count(bb_id); + } + + // Returns true if the instruction |inst| is inside this loop. + bool IsInsideLoop(Instruction* inst) const; + + // Adds the Basic Block |bb| to this loop and its parents. + void AddBasicBlock(const BasicBlock* bb) { AddBasicBlock(bb->id()); } + + // Adds the Basic Block with |id| to this loop and its parents. + void AddBasicBlock(uint32_t id) { + for (Loop* loop = this; loop != nullptr; loop = loop->parent_) { + loop->loop_basic_blocks_.insert(id); + } + } + + // Removes the Basic Block id |bb_id| from this loop and its parents. + // It the user responsibility to make sure the removed block is not a merge, + // header or continue block. + void RemoveBasicBlock(uint32_t bb_id) { + for (Loop* loop = this; loop != nullptr; loop = loop->parent_) { + loop->loop_basic_blocks_.erase(bb_id); + } + } + + // Removes all the basic blocks from the set of basic blocks within the loop. + // This does not affect any of the stored pointers to the header, preheader, + // merge, or continue blocks. + void ClearBlocks() { loop_basic_blocks_.clear(); } + + // Adds the Basic Block |bb| this loop and its parents. + void AddBasicBlockToLoop(const BasicBlock* bb) { + assert(IsBasicBlockInLoopSlow(bb) && + "Basic block does not belong to the loop"); + + AddBasicBlock(bb); + } + + // Returns the list of induction variables within the loop. + void GetInductionVariables(std::vector& inductions) const; + + // This function uses the |condition| to find the induction variable which is + // used by the loop condition within the loop. This only works if the loop is + // bound by a single condition and single induction variable. + ir::Instruction* FindConditionVariable(const ir::BasicBlock* condition) const; + + // Returns the number of iterations within a loop when given the |induction| + // variable and the loop |condition| check. It stores the found number of + // iterations in the output parameter |iterations| and optionally, the step + // value in |step_value| and the initial value of the induction variable in + // |init_value|. + bool FindNumberOfIterations(const ir::Instruction* induction, + const ir::Instruction* condition, + size_t* iterations, + int64_t* step_amount = nullptr, + int64_t* init_value = nullptr) const; + + // Returns the value of the OpLoopMerge control operand as a bool. Loop + // control can be None(0), Unroll(1), or DontUnroll(2). This function returns + // true if it is set to Unroll. + inline bool HasUnrollLoopControl() const { + assert(loop_header_); + if (!loop_header_->GetLoopMergeInst()) return false; + + return loop_header_->GetLoopMergeInst()->GetSingleWordOperand(2) == 1; + } + + // Finds the conditional block with a branch to the merge and continue blocks + // within the loop body. + ir::BasicBlock* FindConditionBlock() const; + + // Remove the child loop form this loop. + inline void RemoveChildLoop(Loop* loop) { + nested_loops_.erase( + std::find(nested_loops_.begin(), nested_loops_.end(), loop)); + loop->SetParent(nullptr); + } + + // Mark this loop to be removed later by a call to + // LoopDescriptor::PostModificationCleanup. + inline void MarkLoopForRemoval() { loop_is_marked_for_removal_ = true; } + + // Returns whether or not this loop has been marked for removal. + inline bool IsMarkedForRemoval() const { return loop_is_marked_for_removal_; } + + // Returns true if all nested loops have been marked for removal. + inline bool AreAllChildrenMarkedForRemoval() const { + for (const Loop* child : nested_loops_) { + if (!child->IsMarkedForRemoval()) { + return false; + } + } + return true; + } + + // Checks if the loop contains any instruction that will prevent it from being + // cloned. If the loop is structured, the merge construct is also considered. + bool IsSafeToClone() const; + + // Sets the parent loop of this loop, that is, a loop which contains this loop + // as a nested child loop. + inline void SetParent(Loop* parent) { parent_ = parent; } + + // Returns true is the instruction is invariant and safe to move wrt loop + bool ShouldHoistInstruction(IRContext* context, Instruction* inst); + + // Returns true if all operands of inst are in basic blocks not contained in + // loop + bool AreAllOperandsOutsideLoop(IRContext* context, Instruction* inst); + + // Extract the initial value from the |induction| variable and store it in + // |value|. If the function couldn't find the initial value of |induction| + // return false. + bool GetInductionInitValue(const ir::Instruction* induction, + int64_t* value) const; + + // Takes in a phi instruction |induction| and the loop |header| and returns + // the step operation of the loop. + ir::Instruction* GetInductionStepOperation( + const ir::Instruction* induction) const; + + // Returns true if we can deduce the number of loop iterations in the step + // operation |step|. IsSupportedCondition must also be true for the condition + // instruction. + bool IsSupportedStepOp(SpvOp step) const; + + // Returns true if we can deduce the number of loop iterations in the + // condition operation |condition|. IsSupportedStepOp must also be true for + // the step instruction. + bool IsSupportedCondition(SpvOp condition) const; + + // Creates the list of the loop's basic block in structured order and store + // the result in |ordered_loop_blocks|. If |include_pre_header| is true, the + // pre-header block will also be included at the beginning of the list if it + // exist. If |include_merge| is true, the merge block will also be included at + // the end of the list if it exist. + void ComputeLoopStructuredOrder( + std::vector* ordered_loop_blocks, + bool include_pre_header = false, bool include_merge = false) const; + + // Given the loop |condition|, |initial_value|, |step_value|, the trip count + // |number_of_iterations|, and the |unroll_factor| requested, get the new + // condition value for the residual loop. + static int64_t GetResidualConditionValue(SpvOp condition, + int64_t initial_value, + int64_t step_value, + size_t number_of_iterations, + size_t unroll_factor); + + // Returns the condition instruction for entry into the loop + // Returns nullptr if it can't be found. + ir::Instruction* GetConditionInst() const; + + // Returns the context associated this loop. + IRContext* GetContext() const { return context_; } + + private: + IRContext* context_; + // The block which marks the start of the loop. + BasicBlock* loop_header_; + + // The block which begins the body of the loop. + BasicBlock* loop_continue_; + + // The block which marks the end of the loop. + BasicBlock* loop_merge_; + + // The block immediately before the loop header. + BasicBlock* loop_preheader_; + + // A parent of a loop is the loop which contains it as a nested child loop. + Loop* parent_; + + // Nested child loops of this loop. + ChildrenList nested_loops_; + + // A set of all the basic blocks which comprise the loop structure. Will be + // computed only when needed on demand. + BasicBlockListTy loop_basic_blocks_; + + // Check that |bb| is inside the loop using domination property. + // Note: this is for assertion purposes only, IsInsideLoop should be used + // instead. + bool IsBasicBlockInLoopSlow(const BasicBlock* bb); + + // Returns the loop preheader if it exists, returns nullptr otherwise. + BasicBlock* FindLoopPreheader(opt::DominatorAnalysis* dom_analysis); + + // Sets |latch| as the loop unique continue block. No checks are performed + // here. + inline void SetLatchBlockImpl(BasicBlock* latch) { loop_continue_ = latch; } + // Sets |merge| as the loop merge block. No checks are performed here. + inline void SetMergeBlockImpl(BasicBlock* merge) { loop_merge_ = merge; } + + // Each differnt loop |condition| affects how we calculate the number of + // iterations using the |condition_value|, |init_value|, and |step_values| of + // the induction variable. This method will return the number of iterations in + // a loop with those values for a given |condition|. + int64_t GetIterations(SpvOp condition, int64_t condition_value, + int64_t init_value, int64_t step_value) const; + + // This is to allow for loops to be removed mid iteration without invalidating + // the iterators. + bool loop_is_marked_for_removal_; + + // This is only to allow LoopDescriptor::dummy_top_loop_ to add top level + // loops as child. + friend class LoopDescriptor; + friend class LoopUtils; +}; + +// Loop descriptions class for a given function. +// For a given function, the class builds loop nests information. +// The analysis expects a structured control flow. +class LoopDescriptor { + public: + // Iterator interface (depth first postorder traversal). + using iterator = opt::PostOrderTreeDFIterator; + using const_iterator = opt::PostOrderTreeDFIterator; + + using pre_iterator = opt::TreeDFIterator; + using const_pre_iterator = opt::TreeDFIterator; + + // Creates a loop object for all loops found in |f|. + explicit LoopDescriptor(const Function* f); + + // Disable copy constructor, to avoid double-free on destruction. + LoopDescriptor(const LoopDescriptor&) = delete; + // Move constructor. + LoopDescriptor(LoopDescriptor&& other) : dummy_top_loop_(nullptr) { + // We need to take ownership of the Loop objects in the other + // LoopDescriptor, to avoid double-free. + loops_ = std::move(other.loops_); + other.loops_.clear(); + basic_block_to_loop_ = std::move(other.basic_block_to_loop_); + other.basic_block_to_loop_.clear(); + dummy_top_loop_ = std::move(other.dummy_top_loop_); + } + + // Destructor + ~LoopDescriptor(); + + // Returns the number of loops found in the function. + inline size_t NumLoops() const { return loops_.size(); } + + // Returns the loop at a particular |index|. The |index| must be in bounds, + // check with NumLoops before calling. + inline Loop& GetLoopByIndex(size_t index) const { + assert(loops_.size() > index && + "Index out of range (larger than loop count)"); + return *loops_[index]; + } + + // Returns the inner most loop that contains the basic block id |block_id|. + inline Loop* operator[](uint32_t block_id) const { + return FindLoopForBasicBlock(block_id); + } + + // Returns the inner most loop that contains the basic block |bb|. + inline Loop* operator[](const BasicBlock* bb) const { + return (*this)[bb->id()]; + } + + // Iterators for post order depth first traversal of the loops. + // Inner most loops will be visited first. + inline iterator begin() { return iterator::begin(&dummy_top_loop_); } + inline iterator end() { return iterator::end(&dummy_top_loop_); } + inline const_iterator begin() const { return cbegin(); } + inline const_iterator end() const { return cend(); } + inline const_iterator cbegin() const { + return const_iterator::begin(&dummy_top_loop_); + } + inline const_iterator cend() const { + return const_iterator::end(&dummy_top_loop_); + } + + // Iterators for pre-order depth first traversal of the loops. + // Inner most loops will be visited first. + inline pre_iterator pre_begin() { return ++pre_iterator(&dummy_top_loop_); } + inline pre_iterator pre_end() { return pre_iterator(); } + inline const_pre_iterator pre_begin() const { return pre_cbegin(); } + inline const_pre_iterator pre_end() const { return pre_cend(); } + inline const_pre_iterator pre_cbegin() const { + return ++const_pre_iterator(&dummy_top_loop_); + } + inline const_pre_iterator pre_cend() const { return const_pre_iterator(); } + + // Returns the inner most loop that contains the basic block |bb|. + inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) { + basic_block_to_loop_[bb_id] = loop; + } + + // Mark the loop |loop_to_add| as needing to be added when the user calls + // PostModificationCleanup. |parent| may be null. + inline void AddLoop(ir::Loop* loop_to_add, ir::Loop* parent) { + loops_to_add_.emplace_back(std::make_pair(parent, loop_to_add)); + } + + // Should be called to preserve the LoopAnalysis after loops have been marked + // for addition with AddLoop or MarkLoopForRemoval. + void PostModificationCleanup(); + + // Removes the basic block id |bb_id| from the block to loop mapping. + inline void ForgetBasicBlock(uint32_t bb_id) { + basic_block_to_loop_.erase(bb_id); + } + + // Adds the loop |new_loop| and all its nested loops to the descriptor set. + // The object takes ownership of all the loops. + ir::Loop* AddLoopNest(std::unique_ptr new_loop); + + // Remove the loop |loop|. + void RemoveLoop(ir::Loop* loop); + + void SetAsTopLoop(ir::Loop* loop) { + assert(std::find(dummy_top_loop_.begin(), dummy_top_loop_.end(), loop) == + dummy_top_loop_.end() && + "already registered"); + dummy_top_loop_.nested_loops_.push_back(loop); + } + + Loop* GetDummyRootLoop() { return &dummy_top_loop_; } + const Loop* GetDummyRootLoop() const { return &dummy_top_loop_; } + + private: + // TODO(dneto): This should be a vector of unique_ptr. But VisualStudio 2013 + // is unable to compile it. + using LoopContainerType = std::vector; + using LoopsToAddContainerType = std::vector>; + + // Creates loop descriptors for the function |f|. + void PopulateList(const Function* f); + + // Returns the inner most loop that contains the basic block id |block_id|. + inline Loop* FindLoopForBasicBlock(uint32_t block_id) const { + std::unordered_map::const_iterator it = + basic_block_to_loop_.find(block_id); + return it != basic_block_to_loop_.end() ? it->second : nullptr; + } + + // Erase all the loop information. + void ClearLoops(); + + // A list of all the loops in the function. This variable owns the Loop + // objects. + LoopContainerType loops_; + + // Dummy root: this "loop" is only there to help iterators creation. + Loop dummy_top_loop_; + + std::unordered_map basic_block_to_loop_; + + // List of the loops marked for addition when PostModificationCleanup is + // called. + LoopsToAddContainerType loops_to_add_; +}; + +} // namespace ir +} // namespace spvtools + +#endif // LIBSPIRV_OPT_LOOP_DESCRIPTORS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3da3a140644accba29eefb23aea21928ae0830d5 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.cpp @@ -0,0 +1,1095 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include +#include +#include +#include + +#include "ir_builder.h" +#include "ir_context.h" +#include "loop_descriptor.h" +#include "loop_peeling.h" +#include "loop_utils.h" +#include "scalar_analysis.h" +#include "scalar_analysis_nodes.h" + +namespace spvtools { +namespace opt { +size_t LoopPeelingPass::code_grow_threshold_ = 1000; + +void LoopPeeling::DuplicateAndConnectLoop( + LoopUtils::LoopCloningResult* clone_results) { + ir::CFG& cfg = *context_->cfg(); + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + assert(CanPeelLoop() && "Cannot peel loop!"); + + std::vector ordered_loop_blocks; + ir::BasicBlock* pre_header = loop_->GetOrCreatePreHeaderBlock(); + + loop_->ComputeLoopStructuredOrder(&ordered_loop_blocks); + + cloned_loop_ = loop_utils_.CloneLoop(clone_results, ordered_loop_blocks); + + // Add the basic block to the function. + ir::Function::iterator it = + loop_utils_.GetFunction()->FindBlock(pre_header->id()); + assert(it != loop_utils_.GetFunction()->end() && + "Pre-header not found in the function."); + loop_utils_.GetFunction()->AddBasicBlocks( + clone_results->cloned_bb_.begin(), clone_results->cloned_bb_.end(), ++it); + + // Make the |loop_|'s preheader the |cloned_loop_| one. + ir::BasicBlock* cloned_header = cloned_loop_->GetHeaderBlock(); + pre_header->ForEachSuccessorLabel( + [cloned_header](uint32_t* succ) { *succ = cloned_header->id(); }); + + // Update cfg. + cfg.RemoveEdge(pre_header->id(), loop_->GetHeaderBlock()->id()); + cloned_loop_->SetPreHeaderBlock(pre_header); + loop_->SetPreHeaderBlock(nullptr); + + // When cloning the loop, we didn't cloned the merge block, so currently + // |cloned_loop_| shares the same block as |loop_|. + // We mutate all branches from |cloned_loop_| block to |loop_|'s merge into a + // branch to |loop_|'s header (so header will also be the merge of + // |cloned_loop_|). + uint32_t cloned_loop_exit = 0; + for (uint32_t pred_id : cfg.preds(loop_->GetMergeBlock()->id())) { + if (loop_->IsInsideLoop(pred_id)) continue; + ir::BasicBlock* bb = cfg.block(pred_id); + assert(cloned_loop_exit == 0 && "The loop has multiple exits."); + cloned_loop_exit = bb->id(); + bb->ForEachSuccessorLabel([this](uint32_t* succ) { + if (*succ == loop_->GetMergeBlock()->id()) + *succ = loop_->GetHeaderBlock()->id(); + }); + } + + // Update cfg. + cfg.RemoveNonExistingEdges(loop_->GetMergeBlock()->id()); + cfg.AddEdge(cloned_loop_exit, loop_->GetHeaderBlock()->id()); + + // Patch the phi of the original loop header: + // - Set the loop entry branch to come from the cloned loop exit block; + // - Set the initial value of the phi using the corresponding cloned loop + // exit values. + // + // We patch the iterating value initializers of the original loop using the + // corresponding cloned loop exit values. Connects the cloned loop iterating + // values to the original loop. This make sure that the initial value of the + // second loop starts with the last value of the first loop. + // + // For example, loops like: + // + // int z = 0; + // for (int i = 0; i++ < M; i += cst1) { + // if (cond) + // z += cst2; + // } + // + // Will become: + // + // int z = 0; + // int i = 0; + // for (; i++ < M; i += cst1) { + // if (cond) + // z += cst2; + // } + // for (; i++ < M; i += cst1) { + // if (cond) + // z += cst2; + // } + loop_->GetHeaderBlock()->ForEachPhiInst([cloned_loop_exit, def_use_mgr, + clone_results, + this](ir::Instruction* phi) { + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + if (!loop_->IsInsideLoop(phi->GetSingleWordInOperand(i + 1))) { + phi->SetInOperand(i, + {clone_results->value_map_.at( + exit_value_.at(phi->result_id())->result_id())}); + phi->SetInOperand(i + 1, {cloned_loop_exit}); + def_use_mgr->AnalyzeInstUse(phi); + return; + } + } + }); + + // Force the creation of a new preheader for the original loop and set it as + // the merge block for the cloned loop. + cloned_loop_->SetMergeBlock(loop_->GetOrCreatePreHeaderBlock()); +} + +void LoopPeeling::InsertCanonicalInductionVariable( + LoopUtils::LoopCloningResult* clone_results) { + if (original_loop_canonical_induction_variable_) { + canonical_induction_variable_ = + context_->get_def_use_mgr()->GetDef(clone_results->value_map_.at( + original_loop_canonical_induction_variable_->result_id())); + return; + } + + ir::BasicBlock::iterator insert_point = + GetClonedLoop()->GetLatchBlock()->tail(); + if (GetClonedLoop()->GetLatchBlock()->GetMergeInst()) { + --insert_point; + } + InstructionBuilder builder(context_, &*insert_point, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + ir::Instruction* uint_1_cst = + builder.Add32BitConstantInteger(1, int_type_->IsSigned()); + // Create the increment. + // Note that we do "1 + 1" here, one of the operand should the phi + // value but we don't have it yet. The operand will be set latter. + ir::Instruction* iv_inc = builder.AddIAdd( + uint_1_cst->type_id(), uint_1_cst->result_id(), uint_1_cst->result_id()); + + builder.SetInsertPoint(&*GetClonedLoop()->GetHeaderBlock()->begin()); + + canonical_induction_variable_ = builder.AddPhi( + uint_1_cst->type_id(), + {builder.Add32BitConstantInteger(0, int_type_->IsSigned()) + ->result_id(), + GetClonedLoop()->GetPreHeaderBlock()->id(), iv_inc->result_id(), + GetClonedLoop()->GetLatchBlock()->id()}); + // Connect everything. + iv_inc->SetInOperand(0, {canonical_induction_variable_->result_id()}); + + // Update def/use manager. + context_->get_def_use_mgr()->AnalyzeInstUse(iv_inc); + + // If do-while form, use the incremented value. + if (do_while_form_) { + canonical_induction_variable_ = iv_inc; + } +} + +void LoopPeeling::GetIteratorUpdateOperations( + const ir::Loop* loop, ir::Instruction* iterator, + std::unordered_set* operations) { + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + operations->insert(iterator); + iterator->ForEachInId([def_use_mgr, loop, operations, this](uint32_t* id) { + ir::Instruction* insn = def_use_mgr->GetDef(*id); + if (insn->opcode() == SpvOpLabel) { + return; + } + if (operations->count(insn)) { + return; + } + if (!loop->IsInsideLoop(insn)) { + return; + } + GetIteratorUpdateOperations(loop, insn, operations); + }); +} + +// Gather the set of blocks for all the path from |entry| to |root|. +static void GetBlocksInPath(uint32_t block, uint32_t entry, + std::unordered_set* blocks_in_path, + const ir::CFG& cfg) { + for (uint32_t pid : cfg.preds(block)) { + if (blocks_in_path->insert(pid).second) { + if (pid != entry) { + GetBlocksInPath(pid, entry, blocks_in_path, cfg); + } + } + } +} + +bool LoopPeeling::IsConditionCheckSideEffectFree() const { + ir::CFG& cfg = *context_->cfg(); + + // The "do-while" form does not cause issues, the algorithm takes into account + // the first iteration. + if (!do_while_form_) { + uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; + + std::unordered_set blocks_in_path; + + blocks_in_path.insert(condition_block_id); + GetBlocksInPath(condition_block_id, loop_->GetHeaderBlock()->id(), + &blocks_in_path, cfg); + + for (uint32_t bb_id : blocks_in_path) { + ir::BasicBlock* bb = cfg.block(bb_id); + if (!bb->WhileEachInst([this](ir::Instruction* insn) { + if (insn->IsBranch()) return true; + switch (insn->opcode()) { + case SpvOpLabel: + case SpvOpSelectionMerge: + case SpvOpLoopMerge: + return true; + default: + break; + } + return context_->IsCombinatorInstruction(insn); + })) { + return false; + } + } + } + + return true; +} + +void LoopPeeling::GetIteratingExitValues() { + ir::CFG& cfg = *context_->cfg(); + + loop_->GetHeaderBlock()->ForEachPhiInst([this](ir::Instruction* phi) { + exit_value_[phi->result_id()] = nullptr; + }); + + if (!loop_->GetMergeBlock()) { + return; + } + if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { + return; + } + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; + + auto& header_pred = cfg.preds(loop_->GetHeaderBlock()->id()); + do_while_form_ = std::find(header_pred.begin(), header_pred.end(), + condition_block_id) != header_pred.end(); + if (do_while_form_) { + loop_->GetHeaderBlock()->ForEachPhiInst( + [condition_block_id, def_use_mgr, this](ir::Instruction* phi) { + std::unordered_set operations; + + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + if (condition_block_id == phi->GetSingleWordInOperand(i + 1)) { + exit_value_[phi->result_id()] = + def_use_mgr->GetDef(phi->GetSingleWordInOperand(i)); + } + } + }); + } else { + DominatorTree* dom_tree = + &context_->GetDominatorAnalysis(loop_utils_.GetFunction()) + ->GetDomTree(); + ir::BasicBlock* condition_block = cfg.block(condition_block_id); + + loop_->GetHeaderBlock()->ForEachPhiInst( + [dom_tree, condition_block, this](ir::Instruction* phi) { + std::unordered_set operations; + + // Not the back-edge value, check if the phi instruction is the only + // possible candidate. + GetIteratorUpdateOperations(loop_, phi, &operations); + + for (ir::Instruction* insn : operations) { + if (insn == phi) { + continue; + } + if (dom_tree->Dominates(context_->get_instr_block(insn), + condition_block)) { + return; + } + } + exit_value_[phi->result_id()] = phi; + }); + } +} + +void LoopPeeling::FixExitCondition( + const std::function& condition_builder) { + ir::CFG& cfg = *context_->cfg(); + + uint32_t condition_block_id = 0; + for (uint32_t id : cfg.preds(GetClonedLoop()->GetMergeBlock()->id())) { + if (GetClonedLoop()->IsInsideLoop(id)) { + condition_block_id = id; + break; + } + } + assert(condition_block_id != 0 && "2nd loop in improperly connected"); + + ir::BasicBlock* condition_block = cfg.block(condition_block_id); + ir::Instruction* exit_condition = condition_block->terminator(); + assert(exit_condition->opcode() == SpvOpBranchConditional); + ir::BasicBlock::iterator insert_point = condition_block->tail(); + if (condition_block->GetMergeInst()) { + --insert_point; + } + + exit_condition->SetInOperand(0, {condition_builder(&*insert_point)}); + + uint32_t to_continue_block_idx = + GetClonedLoop()->IsInsideLoop(exit_condition->GetSingleWordInOperand(1)) + ? 1 + : 2; + exit_condition->SetInOperand( + 1, {exit_condition->GetSingleWordInOperand(to_continue_block_idx)}); + exit_condition->SetInOperand(2, {GetClonedLoop()->GetMergeBlock()->id()}); + + // Update def/use manager. + context_->get_def_use_mgr()->AnalyzeInstUse(exit_condition); +} + +ir::BasicBlock* LoopPeeling::CreateBlockBefore(ir::BasicBlock* bb) { + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + ir::CFG& cfg = *context_->cfg(); + assert(cfg.preds(bb->id()).size() == 1 && "More than one predecessor"); + + std::unique_ptr new_bb = MakeUnique( + std::unique_ptr(new ir::Instruction( + context_, SpvOpLabel, 0, context_->TakeNextId(), {}))); + new_bb->SetParent(loop_utils_.GetFunction()); + // Update the loop descriptor. + ir::Loop* in_loop = (*loop_utils_.GetLoopDescriptor())[bb]; + if (in_loop) { + in_loop->AddBasicBlock(new_bb.get()); + loop_utils_.GetLoopDescriptor()->SetBasicBlockToLoop(new_bb->id(), in_loop); + } + + context_->set_instr_block(new_bb->GetLabelInst(), new_bb.get()); + def_use_mgr->AnalyzeInstDefUse(new_bb->GetLabelInst()); + + ir::BasicBlock* bb_pred = cfg.block(cfg.preds(bb->id())[0]); + bb_pred->tail()->ForEachInId([bb, &new_bb](uint32_t* id) { + if (*id == bb->id()) { + *id = new_bb->id(); + } + }); + cfg.RemoveEdge(bb_pred->id(), bb->id()); + cfg.AddEdge(bb_pred->id(), new_bb->id()); + def_use_mgr->AnalyzeInstUse(&*bb_pred->tail()); + + // Update the incoming branch. + bb->ForEachPhiInst([&new_bb, def_use_mgr](ir::Instruction* phi) { + phi->SetInOperand(1, {new_bb->id()}); + def_use_mgr->AnalyzeInstUse(phi); + }); + InstructionBuilder(context_, new_bb.get(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping) + .AddBranch(bb->id()); + cfg.RegisterBlock(new_bb.get()); + + // Add the basic block to the function. + ir::Function::iterator it = loop_utils_.GetFunction()->FindBlock(bb->id()); + assert(it != loop_utils_.GetFunction()->end() && + "Basic block not found in the function."); + ir::BasicBlock* ret = new_bb.get(); + loop_utils_.GetFunction()->AddBasicBlock(std::move(new_bb), it); + return ret; +} + +ir::BasicBlock* LoopPeeling::ProtectLoop(ir::Loop* loop, + ir::Instruction* condition, + ir::BasicBlock* if_merge) { + ir::BasicBlock* if_block = loop->GetOrCreatePreHeaderBlock(); + // Will no longer be a pre-header because of the if. + loop->SetPreHeaderBlock(nullptr); + // Kill the branch to the header. + context_->KillInst(&*if_block->tail()); + + InstructionBuilder builder(context_, if_block, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + builder.AddConditionalBranch(condition->result_id(), + loop->GetHeaderBlock()->id(), if_merge->id(), + if_merge->id()); + + return if_block; +} + +void LoopPeeling::PeelBefore(uint32_t peel_factor) { + assert(CanPeelLoop() && "Cannot peel loop"); + LoopUtils::LoopCloningResult clone_results; + + // Clone the loop and insert the cloned one before the loop. + DuplicateAndConnectLoop(&clone_results); + + // Add a canonical induction variable "canonical_induction_variable_". + InsertCanonicalInductionVariable(&clone_results); + + InstructionBuilder builder(context_, + &*cloned_loop_->GetPreHeaderBlock()->tail(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + ir::Instruction* factor = + builder.Add32BitConstantInteger(peel_factor, int_type_->IsSigned()); + + ir::Instruction* has_remaining_iteration = builder.AddLessThan( + factor->result_id(), loop_iteration_count_->result_id()); + ir::Instruction* max_iteration = builder.AddSelect( + factor->type_id(), has_remaining_iteration->result_id(), + factor->result_id(), loop_iteration_count_->result_id()); + + // Change the exit condition of the cloned loop to be (exit when become + // false): + // "canonical_induction_variable_" < min("factor", "loop_iteration_count_") + FixExitCondition([max_iteration, this](ir::Instruction* insert_before_point) { + return InstructionBuilder(context_, insert_before_point, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping) + .AddLessThan(canonical_induction_variable_->result_id(), + max_iteration->result_id()) + ->result_id(); + }); + + // "Protect" the second loop: the second loop can only be executed if + // |has_remaining_iteration| is true (i.e. factor < loop_iteration_count_). + ir::BasicBlock* if_merge_block = loop_->GetMergeBlock(); + loop_->SetMergeBlock(CreateBlockBefore(loop_->GetMergeBlock())); + // Prevent the second loop from being executed if we already executed all the + // required iterations. + ir::BasicBlock* if_block = + ProtectLoop(loop_, has_remaining_iteration, if_merge_block); + // Patch the phi of the merge block. + if_merge_block->ForEachPhiInst( + [&clone_results, if_block, this](ir::Instruction* phi) { + // if_merge_block had previously only 1 predecessor. + uint32_t incoming_value = phi->GetSingleWordInOperand(0); + auto def_in_loop = clone_results.value_map_.find(incoming_value); + if (def_in_loop != clone_results.value_map_.end()) + incoming_value = def_in_loop->second; + phi->AddOperand( + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {incoming_value}}); + phi->AddOperand( + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {if_block->id()}}); + context_->get_def_use_mgr()->AnalyzeInstUse(phi); + }); + + context_->InvalidateAnalysesExceptFor( + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisLoopAnalysis | ir::IRContext::kAnalysisCFG); +} + +void LoopPeeling::PeelAfter(uint32_t peel_factor) { + assert(CanPeelLoop() && "Cannot peel loop"); + LoopUtils::LoopCloningResult clone_results; + + // Clone the loop and insert the cloned one before the loop. + DuplicateAndConnectLoop(&clone_results); + + // Add a canonical induction variable "canonical_induction_variable_". + InsertCanonicalInductionVariable(&clone_results); + + InstructionBuilder builder(context_, + &*cloned_loop_->GetPreHeaderBlock()->tail(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + ir::Instruction* factor = + builder.Add32BitConstantInteger(peel_factor, int_type_->IsSigned()); + + ir::Instruction* has_remaining_iteration = builder.AddLessThan( + factor->result_id(), loop_iteration_count_->result_id()); + + // Change the exit condition of the cloned loop to be (exit when become + // false): + // "canonical_induction_variable_" + "factor" < "loop_iteration_count_" + FixExitCondition([factor, this](ir::Instruction* insert_before_point) { + InstructionBuilder cond_builder( + context_, insert_before_point, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + // Build the following check: canonical_induction_variable_ + factor < + // iteration_count + return cond_builder + .AddLessThan(cond_builder + .AddIAdd(canonical_induction_variable_->type_id(), + canonical_induction_variable_->result_id(), + factor->result_id()) + ->result_id(), + loop_iteration_count_->result_id()) + ->result_id(); + }); + + // "Protect" the first loop: the first loop can only be executed if + // factor < loop_iteration_count_. + + // The original loop's pre-header was the cloned loop merge block. + GetClonedLoop()->SetMergeBlock( + CreateBlockBefore(GetOriginalLoop()->GetPreHeaderBlock())); + // Use the second loop preheader as if merge block. + + // Prevent the first loop if only the peeled loop needs it. + ir::BasicBlock* if_block = + ProtectLoop(cloned_loop_, has_remaining_iteration, + GetOriginalLoop()->GetPreHeaderBlock()); + + // Patch the phi of the header block. + // We added an if to enclose the first loop and because the phi node are + // connected to the exit value of the first loop, the definition no longer + // dominate the preheader. + // We had to the preheader (our if merge block) the required phi instruction + // and patch the header phi. + GetOriginalLoop()->GetHeaderBlock()->ForEachPhiInst( + [&clone_results, if_block, this](ir::Instruction* phi) { + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + auto find_value_idx = [](ir::Instruction* phi_inst, ir::Loop* loop) { + uint32_t preheader_value_idx = + !loop->IsInsideLoop(phi_inst->GetSingleWordInOperand(1)) ? 0 : 2; + return preheader_value_idx; + }; + + ir::Instruction* cloned_phi = + def_use_mgr->GetDef(clone_results.value_map_.at(phi->result_id())); + uint32_t cloned_preheader_value = cloned_phi->GetSingleWordInOperand( + find_value_idx(cloned_phi, GetClonedLoop())); + + ir::Instruction* new_phi = + InstructionBuilder(context_, + &*GetOriginalLoop()->GetPreHeaderBlock()->tail(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping) + .AddPhi(phi->type_id(), + {phi->GetSingleWordInOperand( + find_value_idx(phi, GetOriginalLoop())), + GetClonedLoop()->GetMergeBlock()->id(), + cloned_preheader_value, if_block->id()}); + + phi->SetInOperand(find_value_idx(phi, GetOriginalLoop()), + {new_phi->result_id()}); + def_use_mgr->AnalyzeInstUse(phi); + }); + + context_->InvalidateAnalysesExceptFor( + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisLoopAnalysis | ir::IRContext::kAnalysisCFG); +} + +Pass::Status LoopPeelingPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + + bool modified = false; + ir::Module* module = c->module(); + + // Process each function in the module + for (ir::Function& f : *module) { + modified |= ProcessFunction(&f); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +bool LoopPeelingPass::ProcessFunction(ir::Function* f) { + bool modified = false; + ir::LoopDescriptor& loop_descriptor = *context()->GetLoopDescriptor(f); + + std::vector to_process_loop; + to_process_loop.reserve(loop_descriptor.NumLoops()); + for (ir::Loop& l : loop_descriptor) { + to_process_loop.push_back(&l); + } + + opt::ScalarEvolutionAnalysis scev_analysis(context()); + + for (ir::Loop* loop : to_process_loop) { + CodeMetrics loop_size; + loop_size.Analyze(*loop); + + auto try_peel = [&loop_size, &modified, + this](ir::Loop* loop_to_peel) -> ir::Loop* { + if (!loop_to_peel->IsLCSSA()) { + LoopUtils(context(), loop_to_peel).MakeLoopClosedSSA(); + } + + bool peeled_loop; + ir::Loop* still_peelable_loop; + std::tie(peeled_loop, still_peelable_loop) = + ProcessLoop(loop_to_peel, &loop_size); + + if (peeled_loop) { + modified = true; + } + + return still_peelable_loop; + }; + + ir::Loop* still_peelable_loop = try_peel(loop); + // The pass is working out the maximum factor by which a loop can be peeled. + // If the loop can potentially be peeled again, then there is only one + // possible direction, so only one call is still needed. + if (still_peelable_loop) { + try_peel(loop); + } + } + + return modified; +} + +std::pair LoopPeelingPass::ProcessLoop( + ir::Loop* loop, CodeMetrics* loop_size) { + opt::ScalarEvolutionAnalysis* scev_analysis = + context()->GetScalarEvolutionAnalysis(); + // Default values for bailing out. + std::pair bail_out{false, nullptr}; + + ir::BasicBlock* exit_block = loop->FindConditionBlock(); + if (!exit_block) { + return bail_out; + } + + ir::Instruction* exiting_iv = loop->FindConditionVariable(exit_block); + if (!exiting_iv) { + return bail_out; + } + size_t iterations = 0; + if (!loop->FindNumberOfIterations(exiting_iv, &*exit_block->tail(), + &iterations)) { + return bail_out; + } + if (!iterations) { + return bail_out; + } + + ir::Instruction* canonical_induction_variable = nullptr; + + loop->GetHeaderBlock()->WhileEachPhiInst([&canonical_induction_variable, + scev_analysis, + this](ir::Instruction* insn) { + if (const SERecurrentNode* iv = + scev_analysis->AnalyzeInstruction(insn)->AsSERecurrentNode()) { + const SEConstantNode* offset = iv->GetOffset()->AsSEConstantNode(); + const SEConstantNode* coeff = iv->GetCoefficient()->AsSEConstantNode(); + if (offset && coeff && offset->FoldToSingleValue() == 0 && + coeff->FoldToSingleValue() == 1) { + if (context()->get_type_mgr()->GetType(insn->type_id())->AsInteger()) { + canonical_induction_variable = insn; + return false; + } + } + } + return true; + }); + + bool is_signed = canonical_induction_variable + ? context() + ->get_type_mgr() + ->GetType(canonical_induction_variable->type_id()) + ->AsInteger() + ->IsSigned() + : false; + + LoopPeeling peeler( + loop, + InstructionBuilder(context(), loop->GetHeaderBlock(), + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping) + .Add32BitConstantInteger(static_cast(iterations), + is_signed), + canonical_induction_variable); + + if (!peeler.CanPeelLoop()) { + return bail_out; + } + + // For each basic block in the loop, check if it can be peeled. If it + // can, get the direction (before/after) and by which factor. + LoopPeelingInfo peel_info(loop, iterations, scev_analysis); + + uint32_t peel_before_factor = 0; + uint32_t peel_after_factor = 0; + + for (uint32_t block : loop->GetBlocks()) { + if (block == exit_block->id()) { + continue; + } + ir::BasicBlock* bb = cfg()->block(block); + PeelDirection direction; + uint32_t factor; + std::tie(direction, factor) = peel_info.GetPeelingInfo(bb); + + if (direction == PeelDirection::kNone) { + continue; + } + if (direction == PeelDirection::kBefore) { + peel_before_factor = std::max(peel_before_factor, factor); + } else { + assert(direction == PeelDirection::kAfter); + peel_after_factor = std::max(peel_after_factor, factor); + } + } + PeelDirection direction = PeelDirection::kNone; + uint32_t factor = 0; + + // Find which direction we should peel. + if (peel_before_factor) { + factor = peel_before_factor; + direction = PeelDirection::kBefore; + } + if (peel_after_factor) { + if (peel_before_factor < peel_after_factor) { + // Favor a peel after here and give the peel before another shot later. + factor = peel_after_factor; + direction = PeelDirection::kAfter; + } + } + + // Do the peel if we can. + if (direction == PeelDirection::kNone) return bail_out; + + // This does not take into account branch elimination opportunities and + // the unrolling. It assumes the peeled loop will be unrolled as well. + if (factor * loop_size->roi_size_ > code_grow_threshold_) { + return bail_out; + } + loop_size->roi_size_ *= factor; + + // Find if a loop should be peeled again. + ir::Loop* extra_opportunity = nullptr; + + if (direction == PeelDirection::kBefore) { + peeler.PeelBefore(factor); + if (stats_) { + stats_->peeled_loops_.emplace_back(loop, PeelDirection::kBefore, factor); + } + if (peel_after_factor) { + // We could have peeled after, give it another try. + extra_opportunity = peeler.GetOriginalLoop(); + } + } else { + peeler.PeelAfter(factor); + if (stats_) { + stats_->peeled_loops_.emplace_back(loop, PeelDirection::kAfter, factor); + } + if (peel_before_factor) { + // We could have peeled before, give it another try. + extra_opportunity = peeler.GetClonedLoop(); + } + } + + return {true, extra_opportunity}; +} + +uint32_t LoopPeelingPass::LoopPeelingInfo::GetFirstLoopInvariantOperand( + ir::Instruction* condition) const { + for (uint32_t i = 0; i < condition->NumInOperands(); i++) { + ir::BasicBlock* bb = + context_->get_instr_block(condition->GetSingleWordInOperand(i)); + if (bb && loop_->IsInsideLoop(bb)) { + return condition->GetSingleWordInOperand(i); + } + } + + return 0; +} + +uint32_t LoopPeelingPass::LoopPeelingInfo::GetFirstNonLoopInvariantOperand( + ir::Instruction* condition) const { + for (uint32_t i = 0; i < condition->NumInOperands(); i++) { + ir::BasicBlock* bb = + context_->get_instr_block(condition->GetSingleWordInOperand(i)); + if (!bb || !loop_->IsInsideLoop(bb)) { + return condition->GetSingleWordInOperand(i); + } + } + + return 0; +} + +static bool IsHandledCondition(SpvOp opcode) { + switch (opcode) { + case SpvOpIEqual: + case SpvOpINotEqual: + case SpvOpUGreaterThan: + case SpvOpSGreaterThan: + case SpvOpUGreaterThanEqual: + case SpvOpSGreaterThanEqual: + case SpvOpULessThan: + case SpvOpSLessThan: + case SpvOpULessThanEqual: + case SpvOpSLessThanEqual: + return true; + default: + return false; + } +} + +LoopPeelingPass::LoopPeelingInfo::Direction +LoopPeelingPass::LoopPeelingInfo::GetPeelingInfo(ir::BasicBlock* bb) const { + if (bb->terminator()->opcode() != SpvOpBranchConditional) { + return GetNoneDirection(); + } + + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + ir::Instruction* condition = + def_use_mgr->GetDef(bb->terminator()->GetSingleWordInOperand(0)); + + if (!IsHandledCondition(condition->opcode())) { + return GetNoneDirection(); + } + + if (!GetFirstLoopInvariantOperand(condition)) { + // No loop invariant, it cannot be peeled by this pass. + return GetNoneDirection(); + } + if (!GetFirstNonLoopInvariantOperand(condition)) { + // Seems to be a job for the unswitch pass. + return GetNoneDirection(); + } + + // Left hand-side. + SExpression lhs = scev_analysis_->AnalyzeInstruction( + def_use_mgr->GetDef(condition->GetSingleWordInOperand(0))); + if (lhs->GetType() == SENode::CanNotCompute) { + // Can't make any conclusion. + return GetNoneDirection(); + } + + // Right hand-side. + SExpression rhs = scev_analysis_->AnalyzeInstruction( + def_use_mgr->GetDef(condition->GetSingleWordInOperand(1))); + if (rhs->GetType() == SENode::CanNotCompute) { + // Can't make any conclusion. + return GetNoneDirection(); + } + + // Only take into account recurrent expression over the current loop. + bool is_lhs_rec = !scev_analysis_->IsLoopInvariant(loop_, lhs); + bool is_rhs_rec = !scev_analysis_->IsLoopInvariant(loop_, rhs); + + if ((is_lhs_rec && is_rhs_rec) || (!is_lhs_rec && !is_rhs_rec)) { + return GetNoneDirection(); + } + + if (is_lhs_rec) { + if (!lhs->AsSERecurrentNode() || + lhs->AsSERecurrentNode()->GetLoop() != loop_) { + return GetNoneDirection(); + } + } + if (is_rhs_rec) { + if (!rhs->AsSERecurrentNode() || + rhs->AsSERecurrentNode()->GetLoop() != loop_) { + return GetNoneDirection(); + } + } + + // If the op code is ==, then we try a peel before or after. + // If opcode is not <, >, <= or >=, we bail out. + // + // For the remaining cases, we canonicalize the expression so that the + // constant expression is on the left hand side and the recurring expression + // is on the right hand side. If we swap hand side, then < becomes >, <= + // becomes >= etc. + // If the opcode is <=, then we add 1 to the right hand side and do the peel + // check on <. + // If the opcode is >=, then we add 1 to the left hand side and do the peel + // check on >. + + CmpOperator cmp_operator; + switch (condition->opcode()) { + default: + return GetNoneDirection(); + case SpvOpIEqual: + case SpvOpINotEqual: + return HandleEquality(lhs, rhs); + case SpvOpUGreaterThan: + case SpvOpSGreaterThan: { + cmp_operator = CmpOperator::kGT; + break; + } + case SpvOpULessThan: + case SpvOpSLessThan: { + cmp_operator = CmpOperator::kLT; + break; + } + // We add one to transform >= into > and <= into <. + case SpvOpUGreaterThanEqual: + case SpvOpSGreaterThanEqual: { + cmp_operator = CmpOperator::kGE; + break; + } + case SpvOpULessThanEqual: + case SpvOpSLessThanEqual: { + cmp_operator = CmpOperator::kLE; + break; + } + } + + // Force the left hand side to be the non recurring expression. + if (is_lhs_rec) { + std::swap(lhs, rhs); + switch (cmp_operator) { + case CmpOperator::kLT: { + cmp_operator = CmpOperator::kGT; + break; + } + case CmpOperator::kGT: { + cmp_operator = CmpOperator::kLT; + break; + } + case CmpOperator::kLE: { + cmp_operator = CmpOperator::kGE; + break; + } + case CmpOperator::kGE: { + cmp_operator = CmpOperator::kLE; + break; + } + } + } + return HandleInequality(cmp_operator, lhs, rhs->AsSERecurrentNode()); +} + +SExpression LoopPeelingPass::LoopPeelingInfo::GetValueAtFirstIteration( + SERecurrentNode* rec) const { + return rec->GetOffset(); +} + +SExpression LoopPeelingPass::LoopPeelingInfo::GetValueAtIteration( + SERecurrentNode* rec, int64_t iteration) const { + SExpression coeff = rec->GetCoefficient(); + SExpression offset = rec->GetOffset(); + + return (coeff * iteration) + offset; +} + +SExpression LoopPeelingPass::LoopPeelingInfo::GetValueAtLastIteration( + SERecurrentNode* rec) const { + return GetValueAtIteration(rec, loop_max_iterations_ - 1); +} + +bool LoopPeelingPass::LoopPeelingInfo::EvalOperator(CmpOperator cmp_op, + SExpression lhs, + SExpression rhs, + bool* result) const { + assert(scev_analysis_->IsLoopInvariant(loop_, lhs)); + assert(scev_analysis_->IsLoopInvariant(loop_, rhs)); + // We perform the test: 0 cmp_op rhs - lhs + // What is left is then to determine the sign of the expression. + switch (cmp_op) { + case CmpOperator::kLT: { + return scev_analysis_->IsAlwaysGreaterThanZero(rhs - lhs, result); + } + case CmpOperator::kGT: { + return scev_analysis_->IsAlwaysGreaterThanZero(lhs - rhs, result); + } + case CmpOperator::kLE: { + return scev_analysis_->IsAlwaysGreaterOrEqualToZero(rhs - lhs, result); + } + case CmpOperator::kGE: { + return scev_analysis_->IsAlwaysGreaterOrEqualToZero(lhs - rhs, result); + } + } + return false; +} + +LoopPeelingPass::LoopPeelingInfo::Direction +LoopPeelingPass::LoopPeelingInfo::HandleEquality(SExpression lhs, + SExpression rhs) const { + { + // Try peel before opportunity. + SExpression lhs_cst = lhs; + if (SERecurrentNode* rec_node = lhs->AsSERecurrentNode()) { + lhs_cst = rec_node->GetOffset(); + } + SExpression rhs_cst = rhs; + if (SERecurrentNode* rec_node = rhs->AsSERecurrentNode()) { + rhs_cst = rec_node->GetOffset(); + } + + if (lhs_cst == rhs_cst) { + return Direction{LoopPeelingPass::PeelDirection::kBefore, 1}; + } + } + + { + // Try peel after opportunity. + SExpression lhs_cst = lhs; + if (SERecurrentNode* rec_node = lhs->AsSERecurrentNode()) { + // rec_node(x) = a * x + b + // assign to lhs: a * (loop_max_iterations_ - 1) + b + lhs_cst = GetValueAtLastIteration(rec_node); + } + SExpression rhs_cst = rhs; + if (SERecurrentNode* rec_node = rhs->AsSERecurrentNode()) { + // rec_node(x) = a * x + b + // assign to lhs: a * (loop_max_iterations_ - 1) + b + rhs_cst = GetValueAtLastIteration(rec_node); + } + + if (lhs_cst == rhs_cst) { + return Direction{LoopPeelingPass::PeelDirection::kAfter, 1}; + } + } + + return GetNoneDirection(); +} + +LoopPeelingPass::LoopPeelingInfo::Direction +LoopPeelingPass::LoopPeelingInfo::HandleInequality(CmpOperator cmp_op, + SExpression lhs, + SERecurrentNode* rhs) const { + SExpression offset = rhs->GetOffset(); + SExpression coefficient = rhs->GetCoefficient(); + // Compute (cst - B) / A. + std::pair flip_iteration = (lhs - offset) / coefficient; + if (!flip_iteration.first->AsSEConstantNode()) { + return GetNoneDirection(); + } + // note: !!flip_iteration.second normalize to 0/1 (via bool cast). + int64_t iteration = + flip_iteration.first->AsSEConstantNode()->FoldToSingleValue() + + !!flip_iteration.second; + if (iteration <= 0 || + loop_max_iterations_ <= static_cast(iteration)) { + // Always true or false within the loop bounds. + return GetNoneDirection(); + } + // If this is a <= or >= operator and the iteration, make sure |iteration| is + // the one flipping the condition. + // If (cst - B) and A are not divisible, this equivalent to a < or > check, so + // we skip this test. + if (!flip_iteration.second && + (cmp_op == CmpOperator::kLE || cmp_op == CmpOperator::kGE)) { + bool first_iteration; + bool current_iteration; + if (!EvalOperator(cmp_op, lhs, offset, &first_iteration) || + !EvalOperator(cmp_op, lhs, GetValueAtIteration(rhs, iteration), + ¤t_iteration)) { + return GetNoneDirection(); + } + // If the condition did not flip the next will. + if (first_iteration == current_iteration) { + iteration++; + } + } + + uint32_t cast_iteration = 0; + // sanity check: can we fit |iteration| in a uint32_t ? + if (static_cast(iteration) < std::numeric_limits::max()) { + cast_iteration = static_cast(iteration); + } + + if (cast_iteration) { + // Peel before if we are closer to the start, after if closer to the end. + if (loop_max_iterations_ / 2 > cast_iteration) { + return Direction{LoopPeelingPass::PeelDirection::kBefore, cast_iteration}; + } else { + return Direction{ + LoopPeelingPass::PeelDirection::kAfter, + static_cast(loop_max_iterations_ - cast_iteration)}; + } + } + + return GetNoneDirection(); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.h new file mode 100644 index 0000000000000000000000000000000000000000..6f108258f398d87046b660dec0768e4efd9de729 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_peeling.h @@ -0,0 +1,337 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LOOP_PEELING_H_ +#define SOURCE_OPT_LOOP_PEELING_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "opt/ir_context.h" +#include "opt/loop_descriptor.h" +#include "opt/loop_utils.h" +#include "opt/pass.h" +#include "opt/scalar_analysis.h" + +namespace spvtools { +namespace opt { + +// Utility class to perform the peeling of a given loop. +// The loop peeling transformation make a certain amount of a loop iterations to +// be executed either before (peel before) or after (peel after) the transformed +// loop. +// +// For peeling cases the transformation does the following steps: +// - It clones the loop and inserts the cloned loop before the original loop; +// - It connects all iterating values of the cloned loop with the +// corresponding original loop values so that the second loop starts with +// the appropriate values. +// - It inserts a new induction variable "i" is inserted into the cloned that +// starts with the value 0 and increment by step of one. +// +// The last step is specific to each case: +// - Peel before: the transformation is to peel the "N" first iterations. +// The exit condition of the cloned loop is changed so that the loop +// exits when "i < N" becomes false. The original loop is then protected to +// only execute if there is any iteration left to do. +// - Peel after: the transformation is to peel the "N" last iterations, +// then the exit condition of the cloned loop is changed so that the loop +// exits when "i + N < max_iteration" becomes false, where "max_iteration" +// is the upper bound of the loop. The cloned loop is then protected to +// only execute if there is any iteration left to do no covered by the +// second. +// +// To be peelable: +// - The loop must be in LCSSA form; +// - The loop must not contain any breaks; +// - The loop must not have any ambiguous iterators updates (see +// "CanPeelLoop"). +// The method "CanPeelLoop" checks that those constrained are met. +class LoopPeeling { + public: + // LoopPeeling constructor. + // |loop| is the loop to peel. + // |loop_iteration_count| is the instruction holding the |loop| iteration + // count, must be invariant for |loop| and must be of an int 32 type (signed + // or unsigned). + // |canonical_induction_variable| is an induction variable that can be used to + // count the number of iterations, must be of the same type as + // |loop_iteration_count| and start at 0 and increase by step of one at each + // iteration. The value nullptr is interpreted as no suitable variable exists + // and one will be created. + LoopPeeling(ir::Loop* loop, ir::Instruction* loop_iteration_count, + ir::Instruction* canonical_induction_variable = nullptr) + : context_(loop->GetContext()), + loop_utils_(loop->GetContext(), loop), + loop_(loop), + loop_iteration_count_(!loop->IsInsideLoop(loop_iteration_count) + ? loop_iteration_count + : nullptr), + int_type_(nullptr), + original_loop_canonical_induction_variable_( + canonical_induction_variable), + canonical_induction_variable_(nullptr) { + if (loop_iteration_count_) { + int_type_ = context_->get_type_mgr() + ->GetType(loop_iteration_count_->type_id()) + ->AsInteger(); + if (canonical_induction_variable_) { + assert(canonical_induction_variable_->type_id() == + loop_iteration_count_->type_id() && + "loop_iteration_count and canonical_induction_variable do not " + "have the same type"); + } + } + GetIteratingExitValues(); + } + + // Returns true if the loop can be peeled. + // To be peelable, all operation involved in the update of the loop iterators + // must not dominates the exit condition. This restriction is a work around to + // not miss compile code like: + // + // for (int i = 0; i + 1 < N; i++) {} + // for (int i = 0; ++i < N; i++) {} + // + // The increment will happen before the test on the exit condition leading to + // very look-a-like code. + // + // This restriction will not apply if a loop rotate is applied before (i.e. + // becomes a do-while loop). + bool CanPeelLoop() const { + ir::CFG& cfg = *context_->cfg(); + + if (!loop_iteration_count_) { + return false; + } + if (!int_type_) { + return false; + } + if (int_type_->width() != 32) { + return false; + } + if (!loop_->IsLCSSA()) { + return false; + } + if (!loop_->GetMergeBlock()) { + return false; + } + if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { + return false; + } + if (!IsConditionCheckSideEffectFree()) { + return false; + } + + return !std::any_of(exit_value_.cbegin(), exit_value_.cend(), + [](std::pair it) { + return it.second == nullptr; + }); + } + + // Moves the execution of the |factor| first iterations of the loop into a + // dedicated loop. + void PeelBefore(uint32_t factor); + + // Moves the execution of the |factor| last iterations of the loop into a + // dedicated loop. + void PeelAfter(uint32_t factor); + + // Returns the cloned loop. + ir::Loop* GetClonedLoop() { return cloned_loop_; } + // Returns the original loop. + ir::Loop* GetOriginalLoop() { return loop_; } + + private: + ir::IRContext* context_; + LoopUtils loop_utils_; + // The original loop. + ir::Loop* loop_; + // The initial |loop_| upper bound. + ir::Instruction* loop_iteration_count_; + // The int type to use for the canonical_induction_variable_. + analysis::Integer* int_type_; + // The cloned loop. + ir::Loop* cloned_loop_; + // This is set to true when the exit and back-edge branch instruction is the + // same. + bool do_while_form_; + // The canonical induction variable from the original loop if it exists. + ir::Instruction* original_loop_canonical_induction_variable_; + // The canonical induction variable of the cloned loop. The induction variable + // is initialized to 0 and incremented by step of 1. + ir::Instruction* canonical_induction_variable_; + // Map between loop iterators and exit values. Loop iterators + std::unordered_map exit_value_; + + // Duplicate |loop_| and place the new loop before the cloned loop. Iterating + // values from the cloned loop are then connected to the original loop as + // initializer. + void DuplicateAndConnectLoop(LoopUtils::LoopCloningResult* clone_results); + + // Insert the canonical induction variable into the first loop as a simplified + // counter. + void InsertCanonicalInductionVariable( + LoopUtils::LoopCloningResult* clone_results); + + // Fixes the exit condition of the before loop. The function calls + // |condition_builder| to get the condition to use in the conditional branch + // of the loop exit. The loop will be exited if the condition evaluate to + // true. |condition_builder| takes an ir::Instruction* that represent the + // insertion point. + void FixExitCondition( + const std::function& condition_builder); + + // Gathers all operations involved in the update of |iterator| into + // |operations|. + void GetIteratorUpdateOperations( + const ir::Loop* loop, ir::Instruction* iterator, + std::unordered_set* operations); + + // Gathers exiting iterator values. The function builds a map between each + // iterating value in the loop (a phi instruction in the loop header) and its + // SSA value when it exit the loop. If no exit value can be accurately found, + // it is map to nullptr (see comment on CanPeelLoop). + void GetIteratingExitValues(); + + // Returns true if a for-loop has no instruction with effects before the + // condition check. + bool IsConditionCheckSideEffectFree() const; + + // Creates a new basic block and insert it between |bb| and the predecessor of + // |bb|. + ir::BasicBlock* CreateBlockBefore(ir::BasicBlock* bb); + + // Inserts code to only execute |loop| only if the given |condition| is true. + // |if_merge| is a suitable basic block to be used by the if condition as + // merge block. + // The function returns the if block protecting the loop. + ir::BasicBlock* ProtectLoop(ir::Loop* loop, ir::Instruction* condition, + ir::BasicBlock* if_merge); +}; + +// Implements a loop peeling optimization. +// For each loop, the pass will try to peel it if there is conditions that +// are true for the "N" first or last iterations of the loop. +// To avoid code size explosion, too large loops will not be peeled. +class LoopPeelingPass : public Pass { + public: + // Describes the peeling direction. + enum class PeelDirection { + kNone, // Cannot peel + kBefore, // Can peel before + kAfter // Can peel last + }; + + // Holds some statistics about peeled function. + struct LoopPeelingStats { + std::vector> + peeled_loops_; + }; + + LoopPeelingPass(LoopPeelingStats* stats = nullptr) : stats_(stats) {} + + // Sets the loop peeling growth threshold. If the code size increase is above + // |code_grow_threshold|, the loop will not be peeled. The code size is + // measured in terms of SPIR-V instructions. + static void SetLoopPeelingThreshold(size_t code_grow_threshold) { + code_grow_threshold_ = code_grow_threshold; + } + + // Returns the loop peeling code growth threshold. + static size_t GetLoopPeelingThreshold() { return code_grow_threshold_; } + + const char* name() const override { return "loop-peeling"; } + + // Processes the given |module|. Returns Status::Failure if errors occur when + // processing. Returns the corresponding Status::Success if processing is + // succesful to indicate whether changes have been made to the modue. + Pass::Status Process(ir::IRContext* context) override; + + private: + // Describes the peeling direction. + enum class CmpOperator { + kLT, // less than + kGT, // greater than + kLE, // less than or equal + kGE, // greater than or equal + }; + + class LoopPeelingInfo { + public: + using Direction = std::pair; + + LoopPeelingInfo(ir::Loop* loop, size_t loop_max_iterations, + opt::ScalarEvolutionAnalysis* scev_analysis) + : context_(loop->GetContext()), + loop_(loop), + scev_analysis_(scev_analysis), + loop_max_iterations_(loop_max_iterations) {} + + // Returns by how much and to which direction a loop should be peeled to + // make the conditional branch of the basic block |bb| an unconditional + // branch. If |bb|'s terminator is not a conditional branch or the condition + // is not workable then it returns PeelDirection::kNone and a 0 factor. + Direction GetPeelingInfo(ir::BasicBlock* bb) const; + + private: + // Returns the id of the loop invariant operand of the conditional + // expression |condition|. It returns if no operand is invariant. + uint32_t GetFirstLoopInvariantOperand(ir::Instruction* condition) const; + // Returns the id of the non loop invariant operand of the conditional + // expression |condition|. It returns if all operands are invariant. + uint32_t GetFirstNonLoopInvariantOperand(ir::Instruction* condition) const; + + // Returns the value of |rec| at the first loop iteration. + SExpression GetValueAtFirstIteration(SERecurrentNode* rec) const; + // Returns the value of |rec| at the given |iteration|. + SExpression GetValueAtIteration(SERecurrentNode* rec, + int64_t iteration) const; + // Returns the value of |rec| at the last loop iteration. + SExpression GetValueAtLastIteration(SERecurrentNode* rec) const; + + bool EvalOperator(CmpOperator cmp_op, SExpression lhs, SExpression rhs, + bool* result) const; + + Direction HandleEquality(SExpression lhs, SExpression rhs) const; + Direction HandleInequality(CmpOperator cmp_op, SExpression lhs, + SERecurrentNode* rhs) const; + + static Direction GetNoneDirection() { + return Direction{LoopPeelingPass::PeelDirection::kNone, 0}; + } + ir::IRContext* context_; + ir::Loop* loop_; + opt::ScalarEvolutionAnalysis* scev_analysis_; + size_t loop_max_iterations_; + }; + // Peel profitable loops in |f|. + bool ProcessFunction(ir::Function* f); + // Peel |loop| if profitable. + std::pair ProcessLoop(ir::Loop* loop, + CodeMetrics* loop_size); + + static size_t code_grow_threshold_; + LoopPeelingStats* stats_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LOOP_PEELING_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..39aa1081043891214bcf00d8ee0998be0ac4a529 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.cpp @@ -0,0 +1,1057 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/loop_unroller.h" +#include +#include +#include +#include "opt/ir_builder.h" +#include "opt/loop_utils.h" + +// Implements loop util unrolling functionality for fully and partially +// unrolling loops. Given a factor it will duplicate the loop that many times, +// appending each one to the end of the old loop and removing backedges, to +// create a new unrolled loop. +// +// 1 - User calls LoopUtils::FullyUnroll or LoopUtils::PartiallyUnroll with a +// loop they wish to unroll. LoopUtils::CanPerformUnroll is used to +// validate that a given loop can be unrolled. That method (along with the +// constructor of loop) checks that the IR is in the expected canonicalised +// format. +// +// 2 - The LoopUtils methods create a LoopUnrollerUtilsImpl object to actually +// perform the unrolling. This implements helper methods to copy the loop basic +// blocks and remap the ids of instructions used inside them. +// +// 3 - The core of LoopUnrollerUtilsImpl is the Unroll method, this method +// actually performs the loop duplication. It does this by creating a +// LoopUnrollState object and then copying the loop as given by the factor +// parameter. The LoopUnrollState object retains the state of the unroller +// between the loop body copies as each iteration needs information on the last +// to adjust the phi induction variable, adjust the OpLoopMerge instruction in +// the main loop header, and change the previous continue block to point to the +// new header and the new continue block to the main loop header. +// +// 4 - If the loop is to be fully unrolled then it is simply closed after step +// 3, with the OpLoopMerge being deleted, the backedge removed, and the +// condition blocks folded. +// +// 5 - If it is being partially unrolled: if the unrolling factor leaves the +// loop with an even number of bodies with respect to the number of loop +// iterations then step 3 is all that is needed. If it is uneven then we need to +// duplicate the loop completely and unroll the duplicated loop to cover the +// residual part and adjust the first loop to cover only the "even" part. For +// instance if you request an unroll factor of 3 on a loop with 10 iterations +// then copying the body three times would leave you with three bodies in the +// loop +// where the loop still iterates over each 4 times. So we make two loops one +// iterating once then a second loop of three iterating 3 times. + +namespace spvtools { +namespace opt { +namespace { + +// Loop control constant value for DontUnroll flag. +static const uint32_t kLoopControlDontUnrollIndex = 2; + +// Operand index of the loop control parameter of the OpLoopMerge. +static const uint32_t kLoopControlIndex = 2; + +// This utility class encapsulates some of the state we need to maintain between +// loop unrolls. Specifically it maintains key blocks and the induction variable +// in the current loop duplication step and the blocks from the previous one. +// This is because each step of the unroll needs to use data from both the +// preceding step and the original loop. +struct LoopUnrollState { + LoopUnrollState() + : previous_phi_(nullptr), + previous_continue_block_(nullptr), + previous_condition_block_(nullptr), + new_phi(nullptr), + new_continue_block(nullptr), + new_condition_block(nullptr), + new_header_block(nullptr) {} + + // Initialize from the loop descriptor class. + LoopUnrollState(ir::Instruction* induction, ir::BasicBlock* continue_block, + ir::BasicBlock* condition, + std::vector&& phis) + : previous_phi_(induction), + previous_continue_block_(continue_block), + previous_condition_block_(condition), + new_phi(nullptr), + new_continue_block(nullptr), + new_condition_block(nullptr), + new_header_block(nullptr) { + previous_phis_ = std::move(phis); + } + + // Swap the state so that the new nodes are now the previous nodes. + void NextIterationState() { + previous_phi_ = new_phi; + previous_continue_block_ = new_continue_block; + previous_condition_block_ = new_condition_block; + previous_phis_ = std::move(new_phis_); + + // Clear new nodes. + new_phi = nullptr; + new_continue_block = nullptr; + new_condition_block = nullptr; + new_header_block = nullptr; + + // Clear new block/instruction maps. + new_blocks.clear(); + new_inst.clear(); + ids_to_new_inst.clear(); + } + + // The induction variable from the immediately preceding loop body. + ir::Instruction* previous_phi_; + + // All the phi nodes from the previous loop iteration. + std::vector previous_phis_; + + std::vector new_phis_; + // The previous continue block. The backedge will be removed from this and + // added to the new continue block. + ir::BasicBlock* previous_continue_block_; + + // The previous condition block. This may be folded to flatten the loop. + ir::BasicBlock* previous_condition_block_; + + // The new induction variable. + ir::Instruction* new_phi; + + // The new continue block. + ir::BasicBlock* new_continue_block; + + // The new condition block. + ir::BasicBlock* new_condition_block; + + // The new header block. + ir::BasicBlock* new_header_block; + + // A mapping of new block ids to the original blocks which they were copied + // from. + std::unordered_map new_blocks; + + // A mapping of the original instruction ids to the instruction ids to their + // copies. + std::unordered_map new_inst; + + std::unordered_map ids_to_new_inst; +}; + +// This class implements the actual unrolling. It uses a LoopUnrollState to +// maintain the state of the unrolling inbetween steps. +class LoopUnrollerUtilsImpl { + public: + using BasicBlockListTy = std::vector>; + + LoopUnrollerUtilsImpl(ir::IRContext* c, ir::Function* function) + : context_(c), + function_(*function), + loop_condition_block_(nullptr), + loop_induction_variable_(nullptr), + number_of_loop_iterations_(0), + loop_step_value_(0), + loop_init_value_(0) {} + + // Unroll the |loop| by given |factor| by copying the whole body |factor| + // times. The resulting basicblock structure will remain a loop. + void PartiallyUnroll(ir::Loop*, size_t factor); + + // If partially unrolling the |loop| would leave the loop with too many bodies + // for its number of iterations then this method should be used. This method + // will duplicate the |loop| completely, making the duplicated loop the + // successor of the original's merge block. The original loop will have its + // condition changed to loop over the residual part and the duplicate will be + // partially unrolled. The resulting structure will be two loops. + void PartiallyUnrollResidualFactor(ir::Loop* loop, size_t factor); + + // Fully unroll the |loop| by copying the full body by the total number of + // loop iterations, folding all conditions, and removing the backedge from the + // continue block to the header. + void FullyUnroll(ir::Loop* loop); + + // Get the ID of the variable in the |phi| paired with |label|. + uint32_t GetPhiDefID(const ir::Instruction* phi, uint32_t label) const; + + // Close the loop by removing the OpLoopMerge from the |loop| header block and + // making the backedge point to the merge block. + void CloseUnrolledLoop(ir::Loop* loop); + + // Remove the OpConditionalBranch instruction inside |conditional_block| used + // to branch to either exit or continue the loop and replace it with an + // unconditional OpBranch to block |new_target|. + void FoldConditionBlock(ir::BasicBlock* condtion_block, uint32_t new_target); + + // Add all blocks_to_add_ to function_ at the |insert_point|. + void AddBlocksToFunction(const ir::BasicBlock* insert_point); + + // Duplicates the |old_loop|, cloning each body and remaping the ids without + // removing instructions or changing relative structure. Result will be stored + // in |new_loop|. + void DuplicateLoop(ir::Loop* old_loop, ir::Loop* new_loop); + + inline size_t GetLoopIterationCount() const { + return number_of_loop_iterations_; + } + + // Extracts the initial state information from the |loop|. + void Init(ir::Loop* loop); + + // Replace the uses of each induction variable outside the loop with the final + // value of the induction variable before the loop exit. To reflect the proper + // state of a fully unrolled loop. + void ReplaceInductionUseWithFinalValue(ir::Loop* loop); + + // Remove all the instructions in the invalidated_instructions_ vector. + void RemoveDeadInstructions(); + + // Replace any use of induction variables outwith the loop with the final + // value of the induction variable in the unrolled loop. + void ReplaceOutsideLoopUseWithFinalValue(ir::Loop* loop); + + // Set the LoopControl operand of the OpLoopMerge instruction to be + // DontUnroll. + void MarkLoopControlAsDontUnroll(ir::Loop* loop) const; + + private: + // Remap all the in |basic_block| to new IDs and keep the mapping of new ids + // to old + // ids. |loop| is used to identify special loop blocks (header, continue, + // ect). + void AssignNewResultIds(ir::BasicBlock* basic_block); + + // Using the map built by AssignNewResultIds, for each instruction in + // |basic_block| use + // that map to substitute the IDs used by instructions (in the operands) with + // the new ids. + void RemapOperands(ir::BasicBlock* basic_block); + + // Copy the whole body of the loop, all blocks dominated by the |loop| header + // and not dominated by the |loop| merge. The copied body will be linked to by + // the old |loop| continue block and the new body will link to the |loop| + // header via the new continue block. |eliminate_conditions| is used to decide + // whether or not to fold all the condition blocks other than the last one. + void CopyBody(ir::Loop* loop, bool eliminate_conditions); + + // Copy a given |block_to_copy| in the |loop| and record the mapping of the + // old/new ids. |preserve_instructions| determines whether or not the method + // will modify (other than result_id) instructions which are copied. + void CopyBasicBlock(ir::Loop* loop, const ir::BasicBlock* block_to_copy, + bool preserve_instructions); + + // The actual implementation of the unroll step. Unrolls |loop| by given + // |factor| by copying the body by |factor| times. Also propagates the + // induction variable value throughout the copies. + void Unroll(ir::Loop* loop, size_t factor); + + // Fills the loop_blocks_inorder_ field with the ordered list of basic blocks + // as computed by the method ComputeLoopOrderedBlocks. + void ComputeLoopOrderedBlocks(ir::Loop* loop); + + // Adds the blocks_to_add_ to both the |loop| and to the parent of |loop| if + // the parent exists. + void AddBlocksToLoop(ir::Loop* loop) const; + + // After the partially unroll step the phi instructions in the header block + // will be in an illegal format. This function makes the phis legal by making + // the edge from the latch block come from the new latch block and the value + // to be the actual value of the phi at that point. + void LinkLastPhisToStart(ir::Loop* loop) const; + + // A pointer to the IRContext. Used to add/remove instructions and for usedef + // chains. + ir::IRContext* context_; + + // A reference the function the loop is within. + ir::Function& function_; + + // A list of basic blocks to be added to the loop at the end of an unroll + // step. + BasicBlockListTy blocks_to_add_; + + // List of instructions which are now dead and can be removed. + std::vector invalidated_instructions_; + + // Maintains the current state of the transform between calls to unroll. + LoopUnrollState state_; + + // An ordered list containing the loop basic blocks. + std::vector loop_blocks_inorder_; + + // The block containing the condition check which contains a conditional + // branch to the merge and continue block. + ir::BasicBlock* loop_condition_block_; + + // The induction variable of the loop. + ir::Instruction* loop_induction_variable_; + + // Phis used in the loop need to be remapped to use the actual result values + // and then be remapped at the end. + std::vector loop_phi_instructions_; + + // The number of loop iterations that the loop would preform pre-unroll. + size_t number_of_loop_iterations_; + + // The amount that the loop steps each iteration. + int64_t loop_step_value_; + + // The value the loop starts stepping from. + int64_t loop_init_value_; +}; + +/* + * Static helper functions. + */ + +// Retrieve the index of the OpPhi instruction |phi| which corresponds to the +// incoming |block| id. +static uint32_t GetPhiIndexFromLabel(const ir::BasicBlock* block, + const ir::Instruction* phi) { + for (uint32_t i = 1; i < phi->NumInOperands(); i += 2) { + if (block->id() == phi->GetSingleWordInOperand(i)) { + return i; + } + } + assert(false && "Could not find operand in instruction."); + return 0; +} + +void LoopUnrollerUtilsImpl::Init(ir::Loop* loop) { + loop_condition_block_ = loop->FindConditionBlock(); + + // When we reinit the second loop during PartiallyUnrollResidualFactor we need + // to use the cached value from the duplicate step as the dominator tree + // basded solution, loop->FindConditionBlock, requires all the nodes to be + // connected up with the correct branches. They won't be at this point. + if (!loop_condition_block_) { + loop_condition_block_ = state_.new_condition_block; + } + assert(loop_condition_block_); + + loop_induction_variable_ = loop->FindConditionVariable(loop_condition_block_); + assert(loop_induction_variable_); + + bool found = loop->FindNumberOfIterations( + loop_induction_variable_, &*loop_condition_block_->ctail(), + &number_of_loop_iterations_, &loop_step_value_, &loop_init_value_); + (void)found; // To silence unused variable warning on release builds. + assert(found); + + // Blocks are stored in an unordered set of ids in the loop class, we need to + // create the dominator ordered list. + ComputeLoopOrderedBlocks(loop); +} + +// This function is used to partially unroll the loop when the factor provided +// would normally lead to an illegal optimization. Instead of just unrolling the +// loop it creates two loops and unrolls one and adjusts the condition on the +// other. The end result being that the new loop pair iterates over the correct +// number of bodies. +void LoopUnrollerUtilsImpl::PartiallyUnrollResidualFactor(ir::Loop* loop, + size_t factor) { + std::unique_ptr new_label{new ir::Instruction( + context_, SpvOp::SpvOpLabel, 0, context_->TakeNextId(), {})}; + std::unique_ptr new_exit_bb{ + new ir::BasicBlock(std::move(new_label))}; + + // Save the id of the block before we move it. + uint32_t new_merge_id = new_exit_bb->id(); + + // Add the block the list of blocks to add, we want this merge block to be + // right at the start of the new blocks. + blocks_to_add_.push_back(std::move(new_exit_bb)); + ir::BasicBlock* new_exit_bb_raw = blocks_to_add_[0].get(); + ir::Instruction& original_conditional_branch = *loop_condition_block_->tail(); + // Duplicate the loop, providing access to the blocks of both loops. + // This is a naked new due to the VS2013 requirement of not having unique + // pointers in vectors, as it will be inserted into a vector with + // loop_descriptor.AddLoop. + ir::Loop* new_loop = new ir::Loop(*loop); + + // Clear the basic blocks of the new loop. + new_loop->ClearBlocks(); + + DuplicateLoop(loop, new_loop); + + // Add the blocks to the function. + AddBlocksToFunction(loop->GetMergeBlock()); + blocks_to_add_.clear(); + + // Create a new merge block for the first loop. + InstructionBuilder builder{context_, new_exit_bb_raw}; + // Make the first loop branch to the second. + builder.AddBranch(new_loop->GetHeaderBlock()->id()); + + loop_condition_block_ = state_.new_condition_block; + loop_induction_variable_ = state_.new_phi; + // Unroll the new loop by the factor with the usual -1 to account for the + // existing block iteration. + Unroll(new_loop, factor); + + LinkLastPhisToStart(new_loop); + AddBlocksToLoop(new_loop); + + // Add the new merge block to the back of the list of blocks to be added. It + // needs to be the last block added to maintain dominator order in the binary. + blocks_to_add_.push_back( + std::unique_ptr(new_loop->GetMergeBlock())); + + // Add the blocks to the function. + AddBlocksToFunction(loop->GetMergeBlock()); + + // Reset the usedef analysis. + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisLoopAnalysis); + opt::analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); + + // The loop condition. + ir::Instruction* condition_check = def_use_manager->GetDef( + original_conditional_branch.GetSingleWordOperand(0)); + + // This should have been checked by the LoopUtils::CanPerformUnroll function + // before entering this. + assert(loop->IsSupportedCondition(condition_check->opcode())); + + // We need to account for the initial body when calculating the remainder. + int64_t remainder = ir::Loop::GetResidualConditionValue( + condition_check->opcode(), loop_init_value_, loop_step_value_, + number_of_loop_iterations_, factor); + + assert(remainder > std::numeric_limits::min() && + remainder < std::numeric_limits::max()); + + ir::Instruction* new_constant = nullptr; + + // If the remainder is negative then we add a signed constant, otherwise just + // add an unsigned constant. + if (remainder < 0) { + new_constant = + builder.Add32BitSignedIntegerConstant(static_cast(remainder)); + } else { + new_constant = builder.Add32BitUnsignedIntegerConstant( + static_cast(remainder)); + } + + uint32_t constant_id = new_constant->result_id(); + + // Update the condition check. + condition_check->SetInOperand(1, {constant_id}); + + // Update the next phi node. The phi will have a constant value coming in from + // the preheader block. For the duplicated loop we need to update the constant + // to be the amount of iterations covered by the first loop and the incoming + // block to be the first loops new merge block. + std::vector new_inductions; + new_loop->GetInductionVariables(new_inductions); + + std::vector old_inductions; + loop->GetInductionVariables(old_inductions); + for (size_t index = 0; index < new_inductions.size(); ++index) { + ir::Instruction* new_induction = new_inductions[index]; + ir::Instruction* old_induction = old_inductions[index]; + // Get the index of the loop initalizer, the value coming in from the + // preheader. + uint32_t initalizer_index = + GetPhiIndexFromLabel(new_loop->GetPreHeaderBlock(), old_induction); + + // Replace the second loop initalizer with the phi from the first + new_induction->SetInOperand(initalizer_index - 1, + {old_induction->result_id()}); + new_induction->SetInOperand(initalizer_index, {new_merge_id}); + + // If the use of the first loop induction variable is outside of the loop + // then replace that use with the second loop induction variable. + uint32_t second_loop_induction = new_induction->result_id(); + auto replace_use_outside_of_loop = [loop, second_loop_induction]( + ir::Instruction* user, + uint32_t operand_index) { + if (!loop->IsInsideLoop(user)) { + user->SetOperand(operand_index, {second_loop_induction}); + } + }; + + context_->get_def_use_mgr()->ForEachUse(old_induction, + replace_use_outside_of_loop); + } + + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisLoopAnalysis); + + context_->ReplaceAllUsesWith(loop->GetMergeBlock()->id(), new_merge_id); + + ir::LoopDescriptor& loop_descriptor = + *context_->GetLoopDescriptor(&function_); + + loop_descriptor.AddLoop(new_loop, loop->GetParent()); + + RemoveDeadInstructions(); +} + +// Mark this loop as DontUnroll as it will already be unrolled and it may not +// be safe to unroll a previously partially unrolled loop. +void LoopUnrollerUtilsImpl::MarkLoopControlAsDontUnroll(ir::Loop* loop) const { + ir::Instruction* loop_merge_inst = loop->GetHeaderBlock()->GetLoopMergeInst(); + assert(loop_merge_inst && + "Loop merge instruction could not be found after entering unroller " + "(should have exited before this)"); + loop_merge_inst->SetInOperand(kLoopControlIndex, + {kLoopControlDontUnrollIndex}); +} + +// Duplicate the |loop| body |factor| - 1 number of times while keeping the loop +// backedge intact. This will leave the loop with |factor| number of bodies +// after accounting for the initial body. +void LoopUnrollerUtilsImpl::Unroll(ir::Loop* loop, size_t factor) { + // If we unroll a loop partially it will not be safe to unroll it further. + // This is due to the current method of calculating the number of loop + // iterations. + MarkLoopControlAsDontUnroll(loop); + + std::vector inductions; + loop->GetInductionVariables(inductions); + state_ = LoopUnrollState{loop_induction_variable_, loop->GetLatchBlock(), + loop_condition_block_, std::move(inductions)}; + for (size_t i = 0; i < factor - 1; ++i) { + CopyBody(loop, true); + } +} + +void LoopUnrollerUtilsImpl::RemoveDeadInstructions() { + // Remove the dead instructions. + for (ir::Instruction* inst : invalidated_instructions_) { + context_->KillInst(inst); + } +} + +void LoopUnrollerUtilsImpl::ReplaceInductionUseWithFinalValue(ir::Loop* loop) { + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisLoopAnalysis); + std::vector inductions; + loop->GetInductionVariables(inductions); + + for (size_t index = 0; index < inductions.size(); ++index) { + uint32_t trip_step_id = GetPhiDefID(state_.previous_phis_[index], + state_.previous_continue_block_->id()); + context_->ReplaceAllUsesWith(inductions[index]->result_id(), trip_step_id); + invalidated_instructions_.push_back(inductions[index]); + } +} + +// Fully unroll the loop by partially unrolling it by the number of loop +// iterations minus one for the body already accounted for. +void LoopUnrollerUtilsImpl::FullyUnroll(ir::Loop* loop) { + // We unroll the loop by number of iterations in the loop. + Unroll(loop, number_of_loop_iterations_); + + // The first condition block is preserved until now so it can be copied. + FoldConditionBlock(loop_condition_block_, 1); + + // Delete the OpLoopMerge and remove the backedge to the header. + CloseUnrolledLoop(loop); + + // Mark the loop for later deletion. This allows us to preserve the loop + // iterators but still disregard dead loops. + loop->MarkLoopForRemoval(); + + // If the loop has a parent add the new blocks to the parent. + if (loop->GetParent()) { + AddBlocksToLoop(loop->GetParent()); + } + + // Add the blocks to the function. + AddBlocksToFunction(loop->GetMergeBlock()); + + ReplaceInductionUseWithFinalValue(loop); + + RemoveDeadInstructions(); + // Invalidate all analyses. + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisLoopAnalysis); +} + +// Copy a given basic block, give it a new result_id, and store the new block +// and the id mapping in the state. |preserve_instructions| is used to determine +// whether or not this function should edit instructions other than the +// |result_id|. +void LoopUnrollerUtilsImpl::CopyBasicBlock(ir::Loop* loop, + const ir::BasicBlock* itr, + bool preserve_instructions) { + // Clone the block exactly, including the IDs. + ir::BasicBlock* basic_block = itr->Clone(context_); + basic_block->SetParent(itr->GetParent()); + + // Assign each result a new unique ID and keep a mapping of the old ids to + // the new ones. + AssignNewResultIds(basic_block); + + // If this is the continue block we are copying. + if (itr == loop->GetLatchBlock()) { + // Make the OpLoopMerge point to this block for the continue. + if (!preserve_instructions) { + ir::Instruction* merge_inst = loop->GetHeaderBlock()->GetLoopMergeInst(); + merge_inst->SetInOperand(1, {basic_block->id()}); + } + + state_.new_continue_block = basic_block; + } + + // If this is the header block we are copying. + if (itr == loop->GetHeaderBlock()) { + state_.new_header_block = basic_block; + + if (!preserve_instructions) { + // Remove the loop merge instruction if it exists. + ir::Instruction* merge_inst = basic_block->GetLoopMergeInst(); + if (merge_inst) invalidated_instructions_.push_back(merge_inst); + } + } + + // If this is the condition block we are copying. + if (itr == loop_condition_block_) { + state_.new_condition_block = basic_block; + } + + // Add this block to the list of blocks to add to the function at the end of + // the unrolling process. + blocks_to_add_.push_back(std::unique_ptr(basic_block)); + + // Keep tracking the old block via a map. + state_.new_blocks[itr->id()] = basic_block; +} + +void LoopUnrollerUtilsImpl::CopyBody(ir::Loop* loop, + bool eliminate_conditions) { + // Copy each basic block in the loop, give them new ids, and save state + // information. + for (const ir::BasicBlock* itr : loop_blocks_inorder_) { + CopyBasicBlock(loop, itr, false); + } + + // Set the previous continue block to point to the new header. + ir::Instruction& continue_branch = *state_.previous_continue_block_->tail(); + continue_branch.SetInOperand(0, {state_.new_header_block->id()}); + + // As the algorithm copies the original loop blocks exactly, the tail of the + // latch block on iterations after the first one will be a branch to the new + // header and not the actual loop header. The last continue block in the loop + // should always be a backedge to the global header. + ir::Instruction& new_continue_branch = *state_.new_continue_block->tail(); + new_continue_branch.SetInOperand(0, {loop->GetHeaderBlock()->id()}); + + std::vector inductions; + loop->GetInductionVariables(inductions); + for (size_t index = 0; index < inductions.size(); ++index) { + ir::Instruction* master_copy = inductions[index]; + + assert(master_copy->result_id() != 0); + ir::Instruction* induction_clone = + state_.ids_to_new_inst[state_.new_inst[master_copy->result_id()]]; + + state_.new_phis_.push_back(induction_clone); + assert(induction_clone->result_id() != 0); + + if (!state_.previous_phis_.empty()) { + state_.new_inst[master_copy->result_id()] = GetPhiDefID( + state_.previous_phis_[index], state_.previous_continue_block_->id()); + } else { + // Do not replace the first phi block ids. + state_.new_inst[master_copy->result_id()] = master_copy->result_id(); + } + } + + if (eliminate_conditions && + state_.new_condition_block != loop_condition_block_) { + FoldConditionBlock(state_.new_condition_block, 1); + } + + // Only reference to the header block is the backedge in the latch block, + // don't change this. + state_.new_inst[loop->GetHeaderBlock()->id()] = loop->GetHeaderBlock()->id(); + + for (auto& pair : state_.new_blocks) { + RemapOperands(pair.second); + } + + for (ir::Instruction* dead_phi : state_.new_phis_) + invalidated_instructions_.push_back(dead_phi); + + // Swap the state so the new is now the previous. + state_.NextIterationState(); +} + +uint32_t LoopUnrollerUtilsImpl::GetPhiDefID(const ir::Instruction* phi, + uint32_t label) const { + for (uint32_t operand = 3; operand < phi->NumOperands(); operand += 2) { + if (phi->GetSingleWordOperand(operand) == label) { + return phi->GetSingleWordOperand(operand - 1); + } + } + assert(false && "Could not find a phi index matching the provided label"); + return 0; +} + +void LoopUnrollerUtilsImpl::FoldConditionBlock(ir::BasicBlock* condition_block, + uint32_t operand_label) { + // Remove the old conditional branch to the merge and continue blocks. + ir::Instruction& old_branch = *condition_block->tail(); + uint32_t new_target = old_branch.GetSingleWordOperand(operand_label); + + context_->KillInst(&old_branch); + // Add the new unconditional branch to the merge block. + InstructionBuilder builder{context_, condition_block}; + builder.AddBranch(new_target); +} + +void LoopUnrollerUtilsImpl::CloseUnrolledLoop(ir::Loop* loop) { + // Remove the OpLoopMerge instruction from the function. + ir::Instruction* merge_inst = loop->GetHeaderBlock()->GetLoopMergeInst(); + invalidated_instructions_.push_back(merge_inst); + + // Remove the final backedge to the header and make it point instead to the + // merge block. + state_.previous_continue_block_->tail()->SetInOperand( + 0, {loop->GetMergeBlock()->id()}); + + // Remove all induction variables as the phis will now be invalid. Replace all + // uses with the constant initializer value (all uses of phis will be in + // the first iteration with the subsequent phis already having been removed). + std::vector inductions; + loop->GetInductionVariables(inductions); + + // We can use the state instruction mechanism to replace all internal loop + // values within the first loop trip (as the subsequent ones will be updated + // by the copy function) with the value coming in from the preheader and then + // use context ReplaceAllUsesWith for the uses outside the loop with the final + // trip phi value. + state_.new_inst.clear(); + for (ir::Instruction* induction : inductions) { + uint32_t initalizer_id = + GetPhiDefID(induction, loop->GetPreHeaderBlock()->id()); + + state_.new_inst[induction->result_id()] = initalizer_id; + } + + for (ir::BasicBlock* block : loop_blocks_inorder_) { + RemapOperands(block); + } +} + +// Uses the first loop to create a copy of the loop with new IDs. +void LoopUnrollerUtilsImpl::DuplicateLoop(ir::Loop* old_loop, + ir::Loop* new_loop) { + std::vector new_block_order; + + // Copy every block in the old loop. + for (const ir::BasicBlock* itr : loop_blocks_inorder_) { + CopyBasicBlock(old_loop, itr, true); + new_block_order.push_back(blocks_to_add_.back().get()); + } + + // Clone the merge block, give it a new id and record it in the state. + ir::BasicBlock* new_merge = old_loop->GetMergeBlock()->Clone(context_); + new_merge->SetParent(old_loop->GetMergeBlock()->GetParent()); + AssignNewResultIds(new_merge); + state_.new_blocks[old_loop->GetMergeBlock()->id()] = new_merge; + + // Remap the operands of every instruction in the loop to point to the new + // copies. + for (auto& pair : state_.new_blocks) { + RemapOperands(pair.second); + } + + loop_blocks_inorder_ = std::move(new_block_order); + + AddBlocksToLoop(new_loop); + + new_loop->SetHeaderBlock(state_.new_header_block); + new_loop->SetLatchBlock(state_.new_continue_block); + new_loop->SetMergeBlock(new_merge); +} + +// Whenever the utility copies a block it stores it in a tempory buffer, this +// function adds the buffer into the ir::Function. The blocks will be inserted +// after the block |insert_point|. +void LoopUnrollerUtilsImpl::AddBlocksToFunction( + const ir::BasicBlock* insert_point) { + for (auto basic_block_iterator = function_.begin(); + basic_block_iterator != function_.end(); ++basic_block_iterator) { + if (basic_block_iterator->id() == insert_point->id()) { + basic_block_iterator.InsertBefore(&blocks_to_add_); + return; + } + } + + assert( + false && + "Could not add basic blocks to function as insert point was not found."); +} + +// Assign all result_ids in |basic_block| instructions to new IDs and preserve +// the mapping of new ids to old ones. +void LoopUnrollerUtilsImpl::AssignNewResultIds(ir::BasicBlock* basic_block) { + // Label instructions aren't covered by normal traversal of the + // instructions. + uint32_t new_label_id = context_->TakeNextId(); + + // Assign a new id to the label. + state_.new_inst[basic_block->GetLabelInst()->result_id()] = new_label_id; + basic_block->GetLabelInst()->SetResultId(new_label_id); + + for (ir::Instruction& inst : *basic_block) { + uint32_t old_id = inst.result_id(); + + // Ignore stores etc. + if (old_id == 0) { + continue; + } + + // Give the instruction a new id. + inst.SetResultId(context_->TakeNextId()); + + // Save the mapping of old_id -> new_id. + state_.new_inst[old_id] = inst.result_id(); + // Check if this instruction is the induction variable. + if (loop_induction_variable_->result_id() == old_id) { + // Save a pointer to the new copy of it. + state_.new_phi = &inst; + } + state_.ids_to_new_inst[inst.result_id()] = &inst; + } +} + +// For all instructions in |basic_block| check if the operands used are from a +// copied instruction and if so swap out the operand for the copy of it. +void LoopUnrollerUtilsImpl::RemapOperands(ir::BasicBlock* basic_block) { + for (ir::Instruction& inst : *basic_block) { + auto remap_operands_to_new_ids = [this](uint32_t* id) { + auto itr = state_.new_inst.find(*id); + + if (itr != state_.new_inst.end()) { + *id = itr->second; + } + }; + + inst.ForEachInId(remap_operands_to_new_ids); + } +} + +// Generate the ordered list of basic blocks in the |loop| and cache it for +// later use. +void LoopUnrollerUtilsImpl::ComputeLoopOrderedBlocks(ir::Loop* loop) { + loop_blocks_inorder_.clear(); + loop->ComputeLoopStructuredOrder(&loop_blocks_inorder_); +} + +// Adds the blocks_to_add_ to both the loop and to the parent. +void LoopUnrollerUtilsImpl::AddBlocksToLoop(ir::Loop* loop) const { + // Add the blocks to this loop. + for (auto& block_itr : blocks_to_add_) { + loop->AddBasicBlock(block_itr.get()); + } + + // Add the blocks to the parent as well. + if (loop->GetParent()) AddBlocksToLoop(loop->GetParent()); +} + +void LoopUnrollerUtilsImpl::LinkLastPhisToStart(ir::Loop* loop) const { + std::vector inductions; + loop->GetInductionVariables(inductions); + + for (size_t i = 0; i < inductions.size(); ++i) { + ir::Instruction* last_phi_in_block = state_.previous_phis_[i]; + + uint32_t phi_index = GetPhiIndexFromLabel(state_.previous_continue_block_, + last_phi_in_block); + uint32_t phi_variable = + last_phi_in_block->GetSingleWordInOperand(phi_index - 1); + uint32_t phi_label = last_phi_in_block->GetSingleWordInOperand(phi_index); + + ir::Instruction* phi = inductions[i]; + phi->SetInOperand(phi_index - 1, {phi_variable}); + phi->SetInOperand(phi_index, {phi_label}); + } +} + +// Duplicate the |loop| body |factor| number of times while keeping the loop +// backedge intact. +void LoopUnrollerUtilsImpl::PartiallyUnroll(ir::Loop* loop, size_t factor) { + Unroll(loop, factor); + LinkLastPhisToStart(loop); + AddBlocksToLoop(loop); + AddBlocksToFunction(loop->GetMergeBlock()); + RemoveDeadInstructions(); +} + +/* + * End LoopUtilsImpl. + */ + +} // namespace + +/* + * + * Begin Utils. + * + * */ + +bool LoopUtils::CanPerformUnroll() { + // The loop is expected to be in structured order. + if (!loop_->GetHeaderBlock()->GetMergeInst()) { + return false; + } + + // Find check the loop has a condition we can find and evaluate. + const ir::BasicBlock* condition = loop_->FindConditionBlock(); + if (!condition) return false; + + // Check that we can find and process the induction variable. + const ir::Instruction* induction = loop_->FindConditionVariable(condition); + if (!induction || induction->opcode() != SpvOpPhi) return false; + + // Check that we can find the number of loop iterations. + if (!loop_->FindNumberOfIterations(induction, &*condition->ctail(), nullptr)) + return false; + + // Make sure the continue block is a unconditional branch to the header + // block. + const ir::Instruction& branch = *loop_->GetLatchBlock()->ctail(); + bool branching_assumption = + branch.opcode() == SpvOpBranch && + branch.GetSingleWordInOperand(0) == loop_->GetHeaderBlock()->id(); + if (!branching_assumption) { + return false; + } + + std::vector inductions; + loop_->GetInductionVariables(inductions); + + // Ban breaks within the loop. + const std::vector& merge_block_preds = + context_->cfg()->preds(loop_->GetMergeBlock()->id()); + if (merge_block_preds.size() != 1) { + return false; + } + + // Ban continues within the loop. + const std::vector& continue_block_preds = + context_->cfg()->preds(loop_->GetLatchBlock()->id()); + if (continue_block_preds.size() != 1) { + return false; + } + + // Ban returns in the loop. + // Iterate over all the blocks within the loop and check that none of them + // exit the loop. + for (uint32_t label_id : loop_->GetBlocks()) { + const ir::BasicBlock* block = context_->cfg()->block(label_id); + if (block->ctail()->opcode() == SpvOp::SpvOpKill || + block->ctail()->opcode() == SpvOp::SpvOpReturn || + block->ctail()->opcode() == SpvOp::SpvOpReturnValue) { + return false; + } + } + // Can only unroll inner loops. + if (!loop_->AreAllChildrenMarkedForRemoval()) { + return false; + } + + return true; +} + +bool LoopUtils::PartiallyUnroll(size_t factor) { + if (factor == 1 || !CanPerformUnroll()) return false; + + // Create the unroller utility. + LoopUnrollerUtilsImpl unroller{context_, + loop_->GetHeaderBlock()->GetParent()}; + unroller.Init(loop_); + + // If the unrolling factor is larger than or the same size as the loop just + // fully unroll the loop. + if (factor >= unroller.GetLoopIterationCount()) { + unroller.FullyUnroll(loop_); + return true; + } + + // If the loop unrolling factor is an residual number of iterations we need to + // let run the loop for the residual part then let it branch into the unrolled + // remaining part. We add one when calucating the remainder to take into + // account the one iteration already in the loop. + if (unroller.GetLoopIterationCount() % factor != 0) { + unroller.PartiallyUnrollResidualFactor(loop_, factor); + } else { + unroller.PartiallyUnroll(loop_, factor); + } + + return true; +} + +bool LoopUtils::FullyUnroll() { + if (!CanPerformUnroll()) return false; + + std::vector inductions; + loop_->GetInductionVariables(inductions); + + LoopUnrollerUtilsImpl unroller{context_, + loop_->GetHeaderBlock()->GetParent()}; + + unroller.Init(loop_); + unroller.FullyUnroll(loop_); + + return true; +} + +void LoopUtils::Finalize() { + // Clean up the loop descriptor to preserve the analysis. + + ir::LoopDescriptor* LD = context_->GetLoopDescriptor(&function_); + LD->PostModificationCleanup(); +} + +/* + * + * Begin Pass. + * + */ + +Pass::Status LoopUnroller::Process(ir::IRContext* c) { + context_ = c; + bool changed = false; + for (ir::Function& f : *c->module()) { + ir::LoopDescriptor* LD = context_->GetLoopDescriptor(&f); + for (ir::Loop& loop : *LD) { + LoopUtils loop_utils{c, &loop}; + if (!loop.HasUnrollLoopControl() || !loop_utils.CanPerformUnroll()) { + continue; + } + + if (fully_unroll_) { + loop_utils.FullyUnroll(); + } else { + loop_utils.PartiallyUnroll(unroll_factor_); + } + changed = true; + } + LD->PostModificationCleanup(); + } + + return changed ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.h new file mode 100644 index 0000000000000000000000000000000000000000..caf0a8ed3c6b6f6026cb4dd9cb1a2a7bfdb4588f --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unroller.h @@ -0,0 +1,41 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LOOP_UNROLLER_H_ +#define SOURCE_OPT_LOOP_UNROLLER_H_ +#include "opt/pass.h" + +namespace spvtools { +namespace opt { + +class LoopUnroller : public Pass { + public: + LoopUnroller() : Pass(), fully_unroll_(true), unroll_factor_(0) {} + LoopUnroller(bool fully_unroll, int unroll_factor) + : Pass(), fully_unroll_(fully_unroll), unroll_factor_(unroll_factor) {} + + const char* name() const override { return "Loop unroller"; } + + Status Process(ir::IRContext* context) override; + + private: + ir::IRContext* context_; + bool fully_unroll_; + int unroll_factor_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LOOP_UNROLLER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5579e82b98bec57d70c65fa8ad115f79601c3a02 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.cpp @@ -0,0 +1,904 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "loop_unswitch_pass.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "basic_block.h" +#include "dominator_tree.h" +#include "fold.h" +#include "function.h" +#include "instruction.h" +#include "ir_builder.h" +#include "ir_context.h" +#include "loop_descriptor.h" + +#include "loop_utils.h" + +namespace spvtools { +namespace opt { +namespace { + +static const uint32_t kTypePointerStorageClassInIdx = 0; +static const uint32_t kBranchCondTrueLabIdInIdx = 1; +static const uint32_t kBranchCondFalseLabIdInIdx = 2; + +} // anonymous namespace + +namespace { + +// This class handle the unswitch procedure for a given loop. +// The unswitch will not happen if: +// - The loop has any instruction that will prevent it; +// - The loop invariant condition is not uniform. +class LoopUnswitch { + public: + LoopUnswitch(ir::IRContext* context, ir::Function* function, ir::Loop* loop, + ir::LoopDescriptor* loop_desc) + : function_(function), + loop_(loop), + loop_desc_(*loop_desc), + context_(context), + switch_block_(nullptr) {} + + // Returns true if the loop can be unswitched. + // Can be unswitch if: + // - The loop has no instructions that prevents it (such as barrier); + // - The loop has one conditional branch or switch that do not depends on the + // loop; + // - The loop invariant condition is uniform; + bool CanUnswitchLoop() { + if (switch_block_) return true; + if (loop_->IsSafeToClone()) return false; + + ir::CFG& cfg = *context_->cfg(); + + for (uint32_t bb_id : loop_->GetBlocks()) { + ir::BasicBlock* bb = cfg.block(bb_id); + if (bb->terminator()->IsBranch() && + bb->terminator()->opcode() != SpvOpBranch) { + if (IsConditionLoopInvariant(bb->terminator())) { + switch_block_ = bb; + break; + } + } + } + + return switch_block_; + } + + // Return the iterator to the basic block |bb|. + ir::Function::iterator FindBasicBlockPosition(ir::BasicBlock* bb_to_find) { + ir::Function::iterator it = function_->FindBlock(bb_to_find->id()); + assert(it != function_->end() && "Basic Block not found"); + return it; + } + + // Creates a new basic block and insert it into the function |fn| at the + // position |ip|. This function preserves the def/use and instr to block + // managers. + ir::BasicBlock* CreateBasicBlock(ir::Function::iterator ip) { + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + ir::BasicBlock* bb = &*ip.InsertBefore(std::unique_ptr( + new ir::BasicBlock(std::unique_ptr(new ir::Instruction( + context_, SpvOpLabel, 0, context_->TakeNextId(), {}))))); + bb->SetParent(function_); + def_use_mgr->AnalyzeInstDef(bb->GetLabelInst()); + context_->set_instr_block(bb->GetLabelInst(), bb); + + return bb; + } + + // Unswitches |loop_|. + void PerformUnswitch() { + assert(CanUnswitchLoop() && + "Cannot unswitch if there is not constant condition"); + assert(loop_->GetPreHeaderBlock() && "This loop has no pre-header block"); + assert(loop_->IsLCSSA() && "This loop is not in LCSSA form"); + + ir::CFG& cfg = *context_->cfg(); + DominatorTree* dom_tree = + &context_->GetDominatorAnalysis(function_)->GetDomTree(); + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + LoopUtils loop_utils(context_, loop_); + + ////////////////////////////////////////////////////////////////////////////// + // Step 1: Create the if merge block for structured modules. + // To do so, the |loop_| merge block will become the if's one and we + // create a merge for the loop. This will limit the amount of duplicated + // code the structured control flow imposes. + // For non structured program, the new loop will be connected to + // the old loop's exit blocks. + ////////////////////////////////////////////////////////////////////////////// + + // Get the merge block if it exists. + ir::BasicBlock* if_merge_block = loop_->GetMergeBlock(); + // The merge block is only created if the loop has a unique exit block. We + // have this guarantee for structured loops, for compute loop it will + // trivially help maintain both a structured-like form and LCSAA. + ir::BasicBlock* loop_merge_block = + if_merge_block + ? CreateBasicBlock(FindBasicBlockPosition(if_merge_block)) + : nullptr; + if (loop_merge_block) { + // Add the instruction and update managers. + opt::InstructionBuilder builder( + context_, loop_merge_block, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + builder.AddBranch(if_merge_block->id()); + builder.SetInsertPoint(&*loop_merge_block->begin()); + cfg.RegisterBlock(loop_merge_block); + def_use_mgr->AnalyzeInstDef(loop_merge_block->GetLabelInst()); + // Update CFG. + if_merge_block->ForEachPhiInst( + [loop_merge_block, &builder, this](ir::Instruction* phi) { + ir::Instruction* cloned = phi->Clone(context_); + builder.AddInstruction(std::unique_ptr(cloned)); + phi->SetInOperand(0, {cloned->result_id()}); + phi->SetInOperand(1, {loop_merge_block->id()}); + for (uint32_t j = phi->NumInOperands() - 1; j > 1; j--) + phi->RemoveInOperand(j); + }); + // Copy the predecessor list (will get invalidated otherwise). + std::vector preds = cfg.preds(if_merge_block->id()); + for (uint32_t pid : preds) { + if (pid == loop_merge_block->id()) continue; + ir::BasicBlock* p_bb = cfg.block(pid); + p_bb->ForEachSuccessorLabel( + [if_merge_block, loop_merge_block](uint32_t* id) { + if (*id == if_merge_block->id()) *id = loop_merge_block->id(); + }); + cfg.AddEdge(pid, loop_merge_block->id()); + } + cfg.RemoveNonExistingEdges(if_merge_block->id()); + // Update loop descriptor. + if (ir::Loop* ploop = loop_->GetParent()) { + ploop->AddBasicBlock(loop_merge_block); + loop_desc_.SetBasicBlockToLoop(loop_merge_block->id(), ploop); + } + + // Update the dominator tree. + DominatorTreeNode* loop_merge_dtn = + dom_tree->GetOrInsertNode(loop_merge_block); + DominatorTreeNode* if_merge_block_dtn = + dom_tree->GetOrInsertNode(if_merge_block); + loop_merge_dtn->parent_ = if_merge_block_dtn->parent_; + loop_merge_dtn->children_.push_back(if_merge_block_dtn); + loop_merge_dtn->parent_->children_.push_back(loop_merge_dtn); + if_merge_block_dtn->parent_->children_.erase(std::find( + if_merge_block_dtn->parent_->children_.begin(), + if_merge_block_dtn->parent_->children_.end(), if_merge_block_dtn)); + + loop_->SetMergeBlock(loop_merge_block); + } + + //////////////////////////////////////////////////////////////////////////// + // Step 2: Build a new preheader for |loop_|, use the old one + // for the constant branch. + //////////////////////////////////////////////////////////////////////////// + + ir::BasicBlock* if_block = loop_->GetPreHeaderBlock(); + // If this preheader is the parent loop header, + // we need to create a dedicated block for the if. + ir::BasicBlock* loop_pre_header = + CreateBasicBlock(++FindBasicBlockPosition(if_block)); + opt::InstructionBuilder(context_, loop_pre_header, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping) + .AddBranch(loop_->GetHeaderBlock()->id()); + + if_block->tail()->SetInOperand(0, {loop_pre_header->id()}); + + // Update loop descriptor. + if (ir::Loop* ploop = loop_desc_[if_block]) { + ploop->AddBasicBlock(loop_pre_header); + loop_desc_.SetBasicBlockToLoop(loop_pre_header->id(), ploop); + } + + // Update the CFG. + cfg.RegisterBlock(loop_pre_header); + def_use_mgr->AnalyzeInstDef(loop_pre_header->GetLabelInst()); + cfg.AddEdge(if_block->id(), loop_pre_header->id()); + cfg.RemoveNonExistingEdges(loop_->GetHeaderBlock()->id()); + + loop_->GetHeaderBlock()->ForEachPhiInst( + [loop_pre_header, if_block](ir::Instruction* phi) { + phi->ForEachInId([loop_pre_header, if_block](uint32_t* id) { + if (*id == if_block->id()) { + *id = loop_pre_header->id(); + } + }); + }); + loop_->SetPreHeaderBlock(loop_pre_header); + + // Update the dominator tree. + DominatorTreeNode* loop_pre_header_dtn = + dom_tree->GetOrInsertNode(loop_pre_header); + DominatorTreeNode* if_block_dtn = dom_tree->GetTreeNode(if_block); + loop_pre_header_dtn->parent_ = if_block_dtn; + assert( + if_block_dtn->children_.size() == 1 && + "A loop preheader should only have the header block as a child in the " + "dominator tree"); + loop_pre_header_dtn->children_.push_back(if_block_dtn->children_[0]); + if_block_dtn->children_.clear(); + if_block_dtn->children_.push_back(loop_pre_header_dtn); + + // Make domination queries valid. + dom_tree->ResetDFNumbering(); + + // Compute an ordered list of basic block to clone: loop blocks + pre-header + // + merge block. + loop_->ComputeLoopStructuredOrder(&ordered_loop_blocks_, true, true); + + ///////////////////////////// + // Do the actual unswitch: // + // - Clone the loop // + // - Connect exits // + // - Specialize the loop // + ///////////////////////////// + + ir::Instruction* iv_condition = &*switch_block_->tail(); + SpvOp iv_opcode = iv_condition->opcode(); + ir::Instruction* condition = + def_use_mgr->GetDef(iv_condition->GetOperand(0).words[0]); + + analysis::ConstantManager* cst_mgr = context_->get_constant_mgr(); + const analysis::Type* cond_type = + context_->get_type_mgr()->GetType(condition->type_id()); + + // Build the list of value for which we need to clone and specialize the + // loop. + std::vector> constant_branch; + // Special case for the original loop + ir::Instruction* original_loop_constant_value; + ir::BasicBlock* original_loop_target; + if (iv_opcode == SpvOpBranchConditional) { + constant_branch.emplace_back( + cst_mgr->GetDefiningInstruction(cst_mgr->GetConstant(cond_type, {0})), + nullptr); + original_loop_constant_value = + cst_mgr->GetDefiningInstruction(cst_mgr->GetConstant(cond_type, {1})); + } else { + // We are looking to take the default branch, so we can't provide a + // specific value. + original_loop_constant_value = nullptr; + for (uint32_t i = 2; i < iv_condition->NumInOperands(); i += 2) { + constant_branch.emplace_back( + cst_mgr->GetDefiningInstruction(cst_mgr->GetConstant( + cond_type, iv_condition->GetInOperand(i).words)), + nullptr); + } + } + + // Get the loop landing pads. + std::unordered_set if_merging_blocks; + std::function is_from_original_loop; + if (loop_->GetHeaderBlock()->GetLoopMergeInst()) { + if_merging_blocks.insert(if_merge_block->id()); + is_from_original_loop = [this](uint32_t id) { + return loop_->IsInsideLoop(id) || loop_->GetMergeBlock()->id() == id; + }; + } else { + loop_->GetExitBlocks(&if_merging_blocks); + is_from_original_loop = [this](uint32_t id) { + return loop_->IsInsideLoop(id); + }; + } + + for (auto& specialisation_pair : constant_branch) { + ir::Instruction* specialisation_value = specialisation_pair.first; + ////////////////////////////////////////////////////////// + // Step 3: Duplicate |loop_|. + ////////////////////////////////////////////////////////// + LoopUtils::LoopCloningResult clone_result; + + ir::Loop* cloned_loop = + loop_utils.CloneLoop(&clone_result, ordered_loop_blocks_); + specialisation_pair.second = cloned_loop->GetPreHeaderBlock(); + + //////////////////////////////////// + // Step 4: Specialize the loop. // + //////////////////////////////////// + + { + std::unordered_set dead_blocks; + std::unordered_set unreachable_merges; + SimplifyLoop( + ir::make_range( + ir::UptrVectorIterator( + &clone_result.cloned_bb_, clone_result.cloned_bb_.begin()), + ir::UptrVectorIterator( + &clone_result.cloned_bb_, clone_result.cloned_bb_.end())), + cloned_loop, condition, specialisation_value, &dead_blocks); + + // We tagged dead blocks, create the loop before we invalidate any basic + // block. + cloned_loop = + CleanLoopNest(cloned_loop, dead_blocks, &unreachable_merges); + CleanUpCFG( + ir::UptrVectorIterator( + &clone_result.cloned_bb_, clone_result.cloned_bb_.begin()), + dead_blocks, unreachable_merges); + + /////////////////////////////////////////////////////////// + // Step 5: Connect convergent edges to the landing pads. // + /////////////////////////////////////////////////////////// + + for (uint32_t merge_bb_id : if_merging_blocks) { + ir::BasicBlock* merge = context_->cfg()->block(merge_bb_id); + // We are in LCSSA so we only care about phi instructions. + merge->ForEachPhiInst([is_from_original_loop, &dead_blocks, + &clone_result](ir::Instruction* phi) { + uint32_t num_in_operands = phi->NumInOperands(); + for (uint32_t i = 0; i < num_in_operands; i += 2) { + uint32_t pred = phi->GetSingleWordInOperand(i + 1); + if (is_from_original_loop(pred)) { + pred = clone_result.value_map_.at(pred); + if (!dead_blocks.count(pred)) { + uint32_t incoming_value_id = phi->GetSingleWordInOperand(i); + // Not all the incoming value are coming from the loop. + ValueMapTy::iterator new_value = + clone_result.value_map_.find(incoming_value_id); + if (new_value != clone_result.value_map_.end()) { + incoming_value_id = new_value->second; + } + phi->AddOperand({SPV_OPERAND_TYPE_ID, {incoming_value_id}}); + phi->AddOperand({SPV_OPERAND_TYPE_ID, {pred}}); + } + } + } + }); + } + } + function_->AddBasicBlocks(clone_result.cloned_bb_.begin(), + clone_result.cloned_bb_.end(), + ++FindBasicBlockPosition(if_block)); + } + + // Same as above but specialize the existing loop + { + std::unordered_set dead_blocks; + std::unordered_set unreachable_merges; + SimplifyLoop(ir::make_range(function_->begin(), function_->end()), loop_, + condition, original_loop_constant_value, &dead_blocks); + + for (uint32_t merge_bb_id : if_merging_blocks) { + ir::BasicBlock* merge = context_->cfg()->block(merge_bb_id); + // LCSSA, so we only care about phi instructions. + // If we the phi is reduced to a single incoming branch, do not + // propagate it to preserve LCSSA. + PatchPhis(merge, dead_blocks, true); + } + if (if_merge_block) { + bool has_live_pred = false; + for (uint32_t pid : cfg.preds(if_merge_block->id())) { + if (!dead_blocks.count(pid)) { + has_live_pred = true; + break; + } + } + if (!has_live_pred) unreachable_merges.insert(if_merge_block->id()); + } + original_loop_target = loop_->GetPreHeaderBlock(); + // We tagged dead blocks, prune the loop descriptor from any dead loops. + // After this call, |loop_| can be nullptr (i.e. the unswitch killed this + // loop). + loop_ = CleanLoopNest(loop_, dead_blocks, &unreachable_merges); + + CleanUpCFG(function_->begin(), dead_blocks, unreachable_merges); + } + + ///////////////////////////////////// + // Finally: connect the new loops. // + ///////////////////////////////////// + + // Delete the old jump + context_->KillInst(&*if_block->tail()); + opt::InstructionBuilder builder(context_, if_block); + if (iv_opcode == SpvOpBranchConditional) { + assert(constant_branch.size() == 1); + builder.AddConditionalBranch( + condition->result_id(), original_loop_target->id(), + constant_branch[0].second->id(), + if_merge_block ? if_merge_block->id() : kInvalidId); + } else { + std::vector, uint32_t>> targets; + for (auto& t : constant_branch) { + targets.emplace_back(t.first->GetInOperand(0).words, t.second->id()); + } + + builder.AddSwitch(condition->result_id(), original_loop_target->id(), + targets, + if_merge_block ? if_merge_block->id() : kInvalidId); + } + + switch_block_ = nullptr; + ordered_loop_blocks_.clear(); + + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisLoopAnalysis); + } + + // Returns true if the unswitch killed the original |loop_|. + bool WasLoopKilled() const { return loop_ == nullptr; } + + private: + using ValueMapTy = std::unordered_map; + using BlockMapTy = std::unordered_map; + + ir::Function* function_; + ir::Loop* loop_; + ir::LoopDescriptor& loop_desc_; + ir::IRContext* context_; + + ir::BasicBlock* switch_block_; + // Map between instructions and if they are dynamically uniform. + std::unordered_map dynamically_uniform_; + // The loop basic blocks in structured order. + std::vector ordered_loop_blocks_; + + // Returns the next usable id for the context. + uint32_t TakeNextId() { return context_->TakeNextId(); } + + // Patches |bb|'s phi instruction by removing incoming value from unexisting + // or tagged as dead branches. + void PatchPhis(ir::BasicBlock* bb, + const std::unordered_set& dead_blocks, + bool preserve_phi) { + ir::CFG& cfg = *context_->cfg(); + + std::vector phi_to_kill; + const std::vector& bb_preds = cfg.preds(bb->id()); + auto is_branch_dead = [&bb_preds, &dead_blocks](uint32_t id) { + return dead_blocks.count(id) || + std::find(bb_preds.begin(), bb_preds.end(), id) == bb_preds.end(); + }; + bb->ForEachPhiInst([&phi_to_kill, &is_branch_dead, preserve_phi, + this](ir::Instruction* insn) { + uint32_t i = 0; + while (i < insn->NumInOperands()) { + uint32_t incoming_id = insn->GetSingleWordInOperand(i + 1); + if (is_branch_dead(incoming_id)) { + // Remove the incoming block id operand. + insn->RemoveInOperand(i + 1); + // Remove the definition id operand. + insn->RemoveInOperand(i); + continue; + } + i += 2; + } + // If there is only 1 remaining edge, propagate the value and + // kill the instruction. + if (insn->NumInOperands() == 2 && !preserve_phi) { + phi_to_kill.push_back(insn); + context_->ReplaceAllUsesWith(insn->result_id(), + insn->GetSingleWordInOperand(0)); + } + }); + for (ir::Instruction* insn : phi_to_kill) { + context_->KillInst(insn); + } + } + + // Removes any block that is tagged as dead, if the block is in + // |unreachable_merges| then all block's instructions are replaced by a + // OpUnreachable. + void CleanUpCFG(ir::UptrVectorIterator bb_it, + const std::unordered_set& dead_blocks, + const std::unordered_set& unreachable_merges) { + ir::CFG& cfg = *context_->cfg(); + + while (bb_it != bb_it.End()) { + ir::BasicBlock& bb = *bb_it; + + if (unreachable_merges.count(bb.id())) { + if (bb.begin() != bb.tail() || + bb.terminator()->opcode() != SpvOpUnreachable) { + // Make unreachable, but leave the label. + bb.KillAllInsts(false); + opt::InstructionBuilder(context_, &bb).AddUnreachable(); + cfg.RemoveNonExistingEdges(bb.id()); + } + ++bb_it; + } else if (dead_blocks.count(bb.id())) { + cfg.ForgetBlock(&bb); + // Kill this block. + bb.KillAllInsts(true); + bb_it = bb_it.Erase(); + } else { + cfg.RemoveNonExistingEdges(bb.id()); + ++bb_it; + } + } + } + + // Return true if |c_inst| is a Boolean constant and set |cond_val| with the + // value that |c_inst| + bool GetConstCondition(const ir::Instruction* c_inst, bool* cond_val) { + bool cond_is_const; + switch (c_inst->opcode()) { + case SpvOpConstantFalse: { + *cond_val = false; + cond_is_const = true; + } break; + case SpvOpConstantTrue: { + *cond_val = true; + cond_is_const = true; + } break; + default: { cond_is_const = false; } break; + } + return cond_is_const; + } + + // Simplifies |loop| assuming the instruction |to_version_insn| takes the + // value |cst_value|. |block_range| is an iterator range returning the loop + // basic blocks in a structured order (dominator first). + // The function will ignore basic blocks returned by |block_range| if they + // does not belong to the loop. + // The set |dead_blocks| will contain all the dead basic blocks. + // + // Requirements: + // - |loop| must be in the LCSSA form; + // - |cst_value| must be constant or null (to represent the default target + // of an OpSwitch). + void SimplifyLoop( + ir::IteratorRange> block_range, + ir::Loop* loop, ir::Instruction* to_version_insn, + ir::Instruction* cst_value, std::unordered_set* dead_blocks) { + ir::CFG& cfg = *context_->cfg(); + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + std::function ignore_node; + ignore_node = [loop](uint32_t bb_id) { return !loop->IsInsideLoop(bb_id); }; + + std::vector> use_list; + def_use_mgr->ForEachUse( + to_version_insn, [&use_list, &ignore_node, this]( + ir::Instruction* inst, uint32_t operand_index) { + ir::BasicBlock* bb = context_->get_instr_block(inst); + + if (!bb || ignore_node(bb->id())) { + // Out of the loop, the specialization does not apply any more. + return; + } + use_list.emplace_back(inst, operand_index); + }); + + // First pass: inject the specialized value into the loop (and only the + // loop). + for (auto use : use_list) { + ir::Instruction* inst = use.first; + uint32_t operand_index = use.second; + ir::BasicBlock* bb = context_->get_instr_block(inst); + + // If it is not a branch, simply inject the value. + if (!inst->IsBranch()) { + // To also handle switch, cst_value can be nullptr: this case + // means that we are looking to branch to the default target of + // the switch. We don't actually know its value so we don't touch + // it if it not a switch. + if (cst_value) { + inst->SetOperand(operand_index, {cst_value->result_id()}); + def_use_mgr->AnalyzeInstUse(inst); + } + } + + // The user is a branch, kill dead branches. + uint32_t live_target = 0; + std::unordered_set dead_branches; + switch (inst->opcode()) { + case SpvOpBranchConditional: { + assert(cst_value && "No constant value to specialize !"); + bool branch_cond = false; + if (GetConstCondition(cst_value, &branch_cond)) { + uint32_t true_label = + inst->GetSingleWordInOperand(kBranchCondTrueLabIdInIdx); + uint32_t false_label = + inst->GetSingleWordInOperand(kBranchCondFalseLabIdInIdx); + live_target = branch_cond ? true_label : false_label; + uint32_t dead_target = !branch_cond ? true_label : false_label; + cfg.RemoveEdge(bb->id(), dead_target); + } + break; + } + case SpvOpSwitch: { + live_target = inst->GetSingleWordInOperand(1); + if (cst_value) { + if (!cst_value->IsConstant()) break; + const ir::Operand& cst = cst_value->GetInOperand(0); + for (uint32_t i = 2; i < inst->NumInOperands(); i += 2) { + const ir::Operand& literal = inst->GetInOperand(i); + if (literal == cst) { + live_target = inst->GetSingleWordInOperand(i + 1); + break; + } + } + } + for (uint32_t i = 1; i < inst->NumInOperands(); i += 2) { + uint32_t id = inst->GetSingleWordInOperand(i); + if (id != live_target) { + cfg.RemoveEdge(bb->id(), id); + } + } + } + default: + break; + } + if (live_target != 0) { + // Check for the presence of the merge block. + if (ir::Instruction* merge = bb->GetMergeInst()) + context_->KillInst(merge); + context_->KillInst(&*bb->tail()); + opt::InstructionBuilder builder( + context_, bb, + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping); + builder.AddBranch(live_target); + } + } + + // Go through the loop basic block and tag all blocks that are obviously + // dead. + std::unordered_set visited; + for (ir::BasicBlock& bb : block_range) { + if (ignore_node(bb.id())) continue; + visited.insert(bb.id()); + + // Check if this block is dead, if so tag it as dead otherwise patch phi + // instructions. + bool has_live_pred = false; + for (uint32_t pid : cfg.preds(bb.id())) { + if (!dead_blocks->count(pid)) { + has_live_pred = true; + break; + } + } + if (!has_live_pred) { + dead_blocks->insert(bb.id()); + const ir::BasicBlock& cbb = bb; + // Patch the phis for any back-edge. + cbb.ForEachSuccessorLabel( + [dead_blocks, &visited, &cfg, this](uint32_t id) { + if (!visited.count(id) || dead_blocks->count(id)) return; + ir::BasicBlock* succ = cfg.block(id); + PatchPhis(succ, *dead_blocks, false); + }); + continue; + } + // Update the phi instructions, some incoming branch have/will disappear. + PatchPhis(&bb, *dead_blocks, /* preserve_phi = */ false); + } + } + + // Returns true if the header is not reachable or tagged as dead or if we + // never loop back. + bool IsLoopDead(ir::BasicBlock* header, ir::BasicBlock* latch, + const std::unordered_set& dead_blocks) { + if (!header || dead_blocks.count(header->id())) return true; + if (!latch || dead_blocks.count(latch->id())) return true; + for (uint32_t pid : context_->cfg()->preds(header->id())) { + if (!dead_blocks.count(pid)) { + // Seems reachable. + return false; + } + } + return true; + } + + // Cleans the loop nest under |loop| and reflect changes to the loop + // descriptor. This will kill all descriptors that represent dead loops. + // If |loop_| is killed, it will be set to nullptr. + // Any merge blocks that become unreachable will be added to + // |unreachable_merges|. + // The function returns the pointer to |loop| or nullptr if the loop was + // killed. + ir::Loop* CleanLoopNest(ir::Loop* loop, + const std::unordered_set& dead_blocks, + std::unordered_set* unreachable_merges) { + // This represent the pair of dead loop and nearest alive parent (nullptr if + // no parent). + std::unordered_map dead_loops; + auto get_parent = [&dead_loops](ir::Loop* l) -> ir::Loop* { + std::unordered_map::iterator it = + dead_loops.find(l); + if (it != dead_loops.end()) return it->second; + return nullptr; + }; + + bool is_main_loop_dead = + IsLoopDead(loop->GetHeaderBlock(), loop->GetLatchBlock(), dead_blocks); + if (is_main_loop_dead) { + if (ir::Instruction* merge = loop->GetHeaderBlock()->GetLoopMergeInst()) { + context_->KillInst(merge); + } + dead_loops[loop] = loop->GetParent(); + } else + dead_loops[loop] = loop; + // For each loop, check if we killed it. If we did, find a suitable parent + // for its children. + for (ir::Loop& sub_loop : + ir::make_range(++opt::TreeDFIterator(loop), + opt::TreeDFIterator())) { + if (IsLoopDead(sub_loop.GetHeaderBlock(), sub_loop.GetLatchBlock(), + dead_blocks)) { + if (ir::Instruction* merge = + sub_loop.GetHeaderBlock()->GetLoopMergeInst()) { + context_->KillInst(merge); + } + dead_loops[&sub_loop] = get_parent(&sub_loop); + } else { + // The loop is alive, check if its merge block is dead, if it is, tag it + // as required. + if (sub_loop.GetMergeBlock()) { + uint32_t merge_id = sub_loop.GetMergeBlock()->id(); + if (dead_blocks.count(merge_id)) { + unreachable_merges->insert(sub_loop.GetMergeBlock()->id()); + } + } + } + } + if (!is_main_loop_dead) dead_loops.erase(loop); + + // Remove dead blocks from live loops. + for (uint32_t bb_id : dead_blocks) { + ir::Loop* l = loop_desc_[bb_id]; + if (l) { + l->RemoveBasicBlock(bb_id); + loop_desc_.ForgetBasicBlock(bb_id); + } + } + + std::for_each( + dead_loops.begin(), dead_loops.end(), + [&loop, this]( + std::unordered_map::iterator::reference it) { + if (it.first == loop) loop = nullptr; + loop_desc_.RemoveLoop(it.first); + }); + + return loop; + } + + // Returns true if |var| is dynamically uniform. + // Note: this is currently approximated as uniform. + bool IsDynamicallyUniform(ir::Instruction* var, const ir::BasicBlock* entry, + const DominatorTree& post_dom_tree) { + assert(post_dom_tree.IsPostDominator()); + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + auto it = dynamically_uniform_.find(var->result_id()); + + if (it != dynamically_uniform_.end()) return it->second; + + analysis::DecorationManager* dec_mgr = context_->get_decoration_mgr(); + + bool& is_uniform = dynamically_uniform_[var->result_id()]; + is_uniform = false; + + dec_mgr->WhileEachDecoration(var->result_id(), SpvDecorationUniform, + [&is_uniform](const ir::Instruction&) { + is_uniform = true; + return false; + }); + if (is_uniform) { + return is_uniform; + } + + ir::BasicBlock* parent = context_->get_instr_block(var); + if (!parent) { + return is_uniform = true; + } + + if (!post_dom_tree.Dominates(parent->id(), entry->id())) { + return is_uniform = false; + } + if (var->opcode() == SpvOpLoad) { + const uint32_t PtrTypeId = + def_use_mgr->GetDef(var->GetSingleWordInOperand(0))->type_id(); + const ir::Instruction* PtrTypeInst = def_use_mgr->GetDef(PtrTypeId); + uint32_t storage_class = + PtrTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx); + if (storage_class != SpvStorageClassUniform && + storage_class != SpvStorageClassUniformConstant) { + return is_uniform = false; + } + } else { + if (!context_->IsCombinatorInstruction(var)) { + return is_uniform = false; + } + } + + return is_uniform = var->WhileEachInId([entry, &post_dom_tree, + this](const uint32_t* id) { + return IsDynamicallyUniform(context_->get_def_use_mgr()->GetDef(*id), + entry, post_dom_tree); + }); + } + + // Returns true if |insn| is constant and dynamically uniform within the loop. + bool IsConditionLoopInvariant(ir::Instruction* insn) { + assert(insn->IsBranch()); + assert(insn->opcode() != SpvOpBranch); + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + ir::Instruction* condition = + def_use_mgr->GetDef(insn->GetOperand(0).words[0]); + return !loop_->IsInsideLoop(condition) && + IsDynamicallyUniform( + condition, function_->entry().get(), + context_->GetPostDominatorAnalysis(function_)->GetDomTree()); + } +}; + +} // namespace + +Pass::Status LoopUnswitchPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + + bool modified = false; + ir::Module* module = c->module(); + + // Process each function in the module + for (ir::Function& f : *module) { + modified |= ProcessFunction(&f); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +bool LoopUnswitchPass::ProcessFunction(ir::Function* f) { + bool modified = false; + std::unordered_set processed_loop; + + ir::LoopDescriptor& loop_descriptor = *context()->GetLoopDescriptor(f); + + bool loop_changed = true; + while (loop_changed) { + loop_changed = false; + for (ir::Loop& loop : + ir::make_range(++opt::TreeDFIterator( + loop_descriptor.GetDummyRootLoop()), + opt::TreeDFIterator())) { + if (processed_loop.count(&loop)) continue; + processed_loop.insert(&loop); + + LoopUnswitch unswitcher(context(), f, &loop, &loop_descriptor); + while (!unswitcher.WasLoopKilled() && unswitcher.CanUnswitchLoop()) { + if (!loop.IsLCSSA()) { + LoopUtils(context(), &loop).MakeLoopClosedSSA(); + } + modified = true; + loop_changed = true; + unswitcher.PerformUnswitch(); + } + if (loop_changed) break; + } + } + + return modified; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..dbe58147934524d13afb506711ece26d72ff2769 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_unswitch_pass.h @@ -0,0 +1,43 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_LOOP_UNSWITCH_PASS_H_ +#define LIBSPIRV_OPT_LOOP_UNSWITCH_PASS_H_ + +#include "opt/loop_descriptor.h" +#include "opt/pass.h" + +namespace spvtools { +namespace opt { + +// Implements the loop unswitch optimization. +// The loop unswitch hoists invariant "if" statements if the conditions are +// constant within the loop and clones the loop for each branch. +class LoopUnswitchPass : public Pass { + public: + const char* name() const override { return "loop-unswitch"; } + + // Processes the given |module|. Returns Status::Failure if errors occur when + // processing. Returns the corresponding Status::Success if processing is + // succesful to indicate whether changes have been made to the modue. + Pass::Status Process(ir::IRContext* context) override; + + private: + bool ProcessFunction(ir::Function* f); +}; + +} // namespace opt +} // namespace spvtools + +#endif // !LIBSPIRV_OPT_LOOP_UNSWITCH_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b87f659d87c8b734005ea00b77a8eae094f5215a --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.cpp @@ -0,0 +1,621 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include +#include +#include + +#include "cfa.h" +#include "opt/cfg.h" +#include "opt/ir_builder.h" +#include "opt/ir_context.h" +#include "opt/loop_descriptor.h" +#include "opt/loop_utils.h" + +namespace spvtools { +namespace opt { + +namespace { +// Return true if |bb| is dominated by at least one block in |exits| +static inline bool DominatesAnExit( + ir::BasicBlock* bb, const std::unordered_set& exits, + const opt::DominatorTree& dom_tree) { + for (ir::BasicBlock* e_bb : exits) + if (dom_tree.Dominates(bb, e_bb)) return true; + return false; +} + +// Utility class to rewrite out-of-loop uses of an in-loop definition in terms +// of phi instructions to achieve a LCSSA form. +// For a given definition, the class user registers phi instructions using that +// definition in all loop exit blocks by which the definition escapes. +// Then, when rewriting a use of the definition, the rewriter walks the +// paths from the use the loop exits. At each step, it will insert a phi +// instruction to merge the incoming value according to exit blocks definition. +class LCSSARewriter { + public: + LCSSARewriter(ir::IRContext* context, const opt::DominatorTree& dom_tree, + const std::unordered_set& exit_bb, + ir::BasicBlock* merge_block) + : context_(context), + cfg_(context_->cfg()), + dom_tree_(dom_tree), + exit_bb_(exit_bb), + merge_block_id_(merge_block ? merge_block->id() : 0) {} + + struct UseRewriter { + explicit UseRewriter(LCSSARewriter* base, const ir::Instruction& def_insn) + : base_(base), def_insn_(def_insn) {} + // Rewrites the use of |def_insn_| by the instruction |user| at the index + // |operand_index| in terms of phi instruction. This recursively builds new + // phi instructions from |user| to the loop exit blocks' phis. The use of + // |def_insn_| in |user| is replaced by the relevant phi instruction at the + // end of the operation. + // It is assumed that |user| does not dominates any of the loop exit basic + // block. This operation does not update the def/use manager, instead it + // records what needs to be updated. The actual update is performed by + // UpdateManagers. + void RewriteUse(ir::BasicBlock* bb, ir::Instruction* user, + uint32_t operand_index) { + assert( + (user->opcode() != SpvOpPhi || bb != GetParent(user)) && + "The root basic block must be the incoming edge if |user| is a phi " + "instruction"); + assert((user->opcode() == SpvOpPhi || bb == GetParent(user)) && + "The root basic block must be the instruction parent if |user| is " + "not " + "phi instruction"); + + ir::Instruction* new_def = GetOrBuildIncoming(bb->id()); + + user->SetOperand(operand_index, {new_def->result_id()}); + rewritten_.insert(user); + } + + // In-place update of some managers (avoid full invalidation). + inline void UpdateManagers() { + opt::analysis::DefUseManager* def_use_mgr = + base_->context_->get_def_use_mgr(); + // Register all new definitions. + for (ir::Instruction* insn : rewritten_) { + def_use_mgr->AnalyzeInstDef(insn); + } + // Register all new uses. + for (ir::Instruction* insn : rewritten_) { + def_use_mgr->AnalyzeInstUse(insn); + } + } + + private: + // Return the basic block that |instr| belongs to. + ir::BasicBlock* GetParent(ir::Instruction* instr) { + return base_->context_->get_instr_block(instr); + } + + // Builds a phi instruction for the basic block |bb|. The function assumes + // that |defining_blocks| contains the list of basic block that define the + // usable value for each predecessor of |bb|. + inline ir::Instruction* CreatePhiInstruction( + ir::BasicBlock* bb, const std::vector& defining_blocks) { + std::vector incomings; + const std::vector& bb_preds = base_->cfg_->preds(bb->id()); + assert(bb_preds.size() == defining_blocks.size()); + for (size_t i = 0; i < bb_preds.size(); i++) { + incomings.push_back( + GetOrBuildIncoming(defining_blocks[i])->result_id()); + incomings.push_back(bb_preds[i]); + } + opt::InstructionBuilder builder( + base_->context_, &*bb->begin(), + ir::IRContext::kAnalysisInstrToBlockMapping); + ir::Instruction* incoming_phi = + builder.AddPhi(def_insn_.type_id(), incomings); + + rewritten_.insert(incoming_phi); + return incoming_phi; + } + + // Builds a phi instruction for the basic block |bb|, all incoming values + // will be |value|. + inline ir::Instruction* CreatePhiInstruction(ir::BasicBlock* bb, + const ir::Instruction& value) { + std::vector incomings; + const std::vector& bb_preds = base_->cfg_->preds(bb->id()); + for (size_t i = 0; i < bb_preds.size(); i++) { + incomings.push_back(value.result_id()); + incomings.push_back(bb_preds[i]); + } + opt::InstructionBuilder builder( + base_->context_, &*bb->begin(), + ir::IRContext::kAnalysisInstrToBlockMapping); + ir::Instruction* incoming_phi = + builder.AddPhi(def_insn_.type_id(), incomings); + + rewritten_.insert(incoming_phi); + return incoming_phi; + } + + // Return the new def to use for the basic block |bb_id|. + // If |bb_id| does not have a suitable def to use then we: + // - return the common def used by all predecessors; + // - if there is no common def, then we build a new phi instr at the + // beginning of |bb_id| and return this new instruction. + ir::Instruction* GetOrBuildIncoming(uint32_t bb_id) { + assert(base_->cfg_->block(bb_id) != nullptr && "Unknown basic block"); + + ir::Instruction*& incoming_phi = bb_to_phi_[bb_id]; + if (incoming_phi) { + return incoming_phi; + } + + ir::BasicBlock* bb = &*base_->cfg_->block(bb_id); + // If this is an exit basic block, look if there already is an eligible + // phi instruction. An eligible phi has |def_insn_| as all incoming + // values. + if (base_->exit_bb_.count(bb)) { + // Look if there is an eligible phi in this block. + if (!bb->WhileEachPhiInst([&incoming_phi, this](ir::Instruction* phi) { + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + if (phi->GetSingleWordInOperand(i) != def_insn_.result_id()) + return true; + } + incoming_phi = phi; + rewritten_.insert(incoming_phi); + return false; + })) { + return incoming_phi; + } + incoming_phi = CreatePhiInstruction(bb, def_insn_); + return incoming_phi; + } + + // Get the block that defines the value to use for each predecessor. + // If the vector has 1 value, then it means that this block does not need + // to build a phi instruction unless |bb_id| is the loop merge block. + const std::vector& defining_blocks = + base_->GetDefiningBlocks(bb_id); + + // Special case for structured loops: merge block might be different from + // the exit block set. To maintain structured properties it will ease + // transformations if the merge block also holds a phi instruction like + // the exit ones. + if (defining_blocks.size() > 1 || bb_id == base_->merge_block_id_) { + if (defining_blocks.size() > 1) { + incoming_phi = CreatePhiInstruction(bb, defining_blocks); + } else { + assert(bb_id == base_->merge_block_id_); + incoming_phi = + CreatePhiInstruction(bb, *GetOrBuildIncoming(defining_blocks[0])); + } + } else { + incoming_phi = GetOrBuildIncoming(defining_blocks[0]); + } + + return incoming_phi; + } + + LCSSARewriter* base_; + const ir::Instruction& def_insn_; + std::unordered_map bb_to_phi_; + std::unordered_set rewritten_; + }; + + private: + // Return the new def to use for the basic block |bb_id|. + // If |bb_id| does not have a suitable def to use then we: + // - return the common def used by all predecessors; + // - if there is no common def, then we build a new phi instr at the + // beginning of |bb_id| and return this new instruction. + const std::vector& GetDefiningBlocks(uint32_t bb_id) { + assert(cfg_->block(bb_id) != nullptr && "Unknown basic block"); + std::vector& defining_blocks = bb_to_defining_blocks_[bb_id]; + + if (defining_blocks.size()) return defining_blocks; + + // Check if one of the loop exit basic block dominates |bb_id|. + for (const ir::BasicBlock* e_bb : exit_bb_) { + if (dom_tree_.Dominates(e_bb->id(), bb_id)) { + defining_blocks.push_back(e_bb->id()); + return defining_blocks; + } + } + + // Process parents, they will returns their suitable blocks. + // If they are all the same, this means this basic block is dominated by a + // common block, so we won't need to build a phi instruction. + for (uint32_t pred_id : cfg_->preds(bb_id)) { + const std::vector& pred_blocks = GetDefiningBlocks(pred_id); + if (pred_blocks.size() == 1) + defining_blocks.push_back(pred_blocks[0]); + else + defining_blocks.push_back(pred_id); + } + assert(defining_blocks.size()); + if (std::all_of(defining_blocks.begin(), defining_blocks.end(), + [&defining_blocks](uint32_t id) { + return id == defining_blocks[0]; + })) { + // No need for a phi. + defining_blocks.resize(1); + } + + return defining_blocks; + } + + ir::IRContext* context_; + ir::CFG* cfg_; + const opt::DominatorTree& dom_tree_; + const std::unordered_set& exit_bb_; + uint32_t merge_block_id_; + // This map represent the set of known paths. For each key, the vector + // represent the set of blocks holding the definition to be used to build the + // phi instruction. + // If the vector has 0 value, then the path is unknown yet, and must be built. + // If the vector has 1 value, then the value defined by that basic block + // should be used. + // If the vector has more than 1 value, then a phi node must be created, the + // basic block ordering is the same as the predecessor ordering. + std::unordered_map> bb_to_defining_blocks_; +}; + +// Make the set |blocks| closed SSA. The set is closed SSA if all the uses +// outside the set are phi instructions in exiting basic block set (hold by +// |lcssa_rewriter|). +inline void MakeSetClosedSSA(ir::IRContext* context, ir::Function* function, + const std::unordered_set& blocks, + const std::unordered_set& exit_bb, + LCSSARewriter* lcssa_rewriter) { + ir::CFG& cfg = *context->cfg(); + opt::DominatorTree& dom_tree = + context->GetDominatorAnalysis(function)->GetDomTree(); + opt::analysis::DefUseManager* def_use_manager = context->get_def_use_mgr(); + + for (uint32_t bb_id : blocks) { + ir::BasicBlock* bb = cfg.block(bb_id); + // If bb does not dominate an exit block, then it cannot have escaping defs. + if (!DominatesAnExit(bb, exit_bb, dom_tree)) continue; + for (ir::Instruction& inst : *bb) { + LCSSARewriter::UseRewriter rewriter(lcssa_rewriter, inst); + def_use_manager->ForEachUse( + &inst, [&blocks, &rewriter, &exit_bb, context]( + ir::Instruction* use, uint32_t operand_index) { + ir::BasicBlock* use_parent = context->get_instr_block(use); + assert(use_parent); + if (blocks.count(use_parent->id())) return; + + if (use->opcode() == SpvOpPhi) { + // If the use is a Phi instruction and the incoming block is + // coming from the loop, then that's consistent with LCSSA form. + if (exit_bb.count(use_parent)) { + return; + } else { + // That's not an exit block, but the user is a phi instruction. + // Consider the incoming branch only. + use_parent = context->get_instr_block( + use->GetSingleWordOperand(operand_index + 1)); + } + } + // Rewrite the use. Note that this call does not invalidate the + // def/use manager. So this operation is safe. + rewriter.RewriteUse(use_parent, use, operand_index); + }); + rewriter.UpdateManagers(); + } + } +} + +} // namespace + +void LoopUtils::CreateLoopDedicatedExits() { + ir::Function* function = loop_->GetHeaderBlock()->GetParent(); + ir::LoopDescriptor& loop_desc = *context_->GetLoopDescriptor(function); + ir::CFG& cfg = *context_->cfg(); + opt::analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + const ir::IRContext::Analysis PreservedAnalyses = + ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping; + + // Gathers the set of basic block that are not in this loop and have at least + // one predecessor in the loop and one not in the loop. + std::unordered_set exit_bb_set; + loop_->GetExitBlocks(&exit_bb_set); + + std::unordered_set new_loop_exits; + bool made_change = false; + // For each block, we create a new one that gathers all branches from + // the loop and fall into the block. + for (uint32_t non_dedicate_id : exit_bb_set) { + ir::BasicBlock* non_dedicate = cfg.block(non_dedicate_id); + const std::vector& bb_pred = cfg.preds(non_dedicate_id); + // Ignore the block if all the predecessors are in the loop. + if (std::all_of(bb_pred.begin(), bb_pred.end(), + [this](uint32_t id) { return loop_->IsInsideLoop(id); })) { + new_loop_exits.insert(non_dedicate); + continue; + } + + made_change = true; + ir::Function::iterator insert_pt = function->begin(); + for (; insert_pt != function->end() && &*insert_pt != non_dedicate; + ++insert_pt) { + } + assert(insert_pt != function->end() && "Basic Block not found"); + + // Create the dedicate exit basic block. + ir::BasicBlock& exit = *insert_pt.InsertBefore( + std::unique_ptr(new ir::BasicBlock( + std::unique_ptr(new ir::Instruction( + context_, SpvOpLabel, 0, context_->TakeNextId(), {}))))); + exit.SetParent(function); + + // Redirect in loop predecessors to |exit| block. + for (uint32_t exit_pred_id : bb_pred) { + if (loop_->IsInsideLoop(exit_pred_id)) { + ir::BasicBlock* pred_block = cfg.block(exit_pred_id); + pred_block->ForEachSuccessorLabel([non_dedicate, &exit](uint32_t* id) { + if (*id == non_dedicate->id()) *id = exit.id(); + }); + // Update the CFG. + // |non_dedicate|'s predecessor list will be updated at the end of the + // loop. + cfg.RegisterBlock(pred_block); + } + } + + // Register the label to the def/use manager, requires for the phi patching. + def_use_mgr->AnalyzeInstDefUse(exit.GetLabelInst()); + context_->set_instr_block(exit.GetLabelInst(), &exit); + + opt::InstructionBuilder builder(context_, &exit, PreservedAnalyses); + // Now jump from our dedicate basic block to the old exit. + // We also reset the insert point so all instructions are inserted before + // the branch. + builder.SetInsertPoint(builder.AddBranch(non_dedicate->id())); + non_dedicate->ForEachPhiInst([&builder, &exit, def_use_mgr, + this](ir::Instruction* phi) { + // New phi operands for this instruction. + std::vector new_phi_op; + // Phi operands for the dedicated exit block. + std::vector exit_phi_op; + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + uint32_t def_id = phi->GetSingleWordInOperand(i); + uint32_t incoming_id = phi->GetSingleWordInOperand(i + 1); + if (loop_->IsInsideLoop(incoming_id)) { + exit_phi_op.push_back(def_id); + exit_phi_op.push_back(incoming_id); + } else { + new_phi_op.push_back(def_id); + new_phi_op.push_back(incoming_id); + } + } + + // Build the new phi instruction dedicated exit block. + ir::Instruction* exit_phi = builder.AddPhi(phi->type_id(), exit_phi_op); + // Build the new incoming branch. + new_phi_op.push_back(exit_phi->result_id()); + new_phi_op.push_back(exit.id()); + // Rewrite operands. + uint32_t idx = 0; + for (; idx < new_phi_op.size(); idx++) + phi->SetInOperand(idx, {new_phi_op[idx]}); + // Remove extra operands, from last to first (more efficient). + for (uint32_t j = phi->NumInOperands() - 1; j >= idx; j--) + phi->RemoveInOperand(j); + // Update the def/use manager for this |phi|. + def_use_mgr->AnalyzeInstUse(phi); + }); + // Update the CFG. + cfg.RegisterBlock(&exit); + cfg.RemoveNonExistingEdges(non_dedicate->id()); + new_loop_exits.insert(&exit); + // If non_dedicate is in a loop, add the new dedicated exit in that loop. + if (ir::Loop* parent_loop = loop_desc[non_dedicate]) + parent_loop->AddBasicBlock(&exit); + } + + if (new_loop_exits.size() == 1) { + loop_->SetMergeBlock(*new_loop_exits.begin()); + } + + if (made_change) { + context_->InvalidateAnalysesExceptFor( + PreservedAnalyses | ir::IRContext::kAnalysisCFG | + ir::IRContext::Analysis::kAnalysisLoopAnalysis); + } +} + +void LoopUtils::MakeLoopClosedSSA() { + CreateLoopDedicatedExits(); + + ir::Function* function = loop_->GetHeaderBlock()->GetParent(); + ir::CFG& cfg = *context_->cfg(); + opt::DominatorTree& dom_tree = + context_->GetDominatorAnalysis(function)->GetDomTree(); + + std::unordered_set exit_bb; + { + std::unordered_set exit_bb_id; + loop_->GetExitBlocks(&exit_bb_id); + for (uint32_t bb_id : exit_bb_id) { + exit_bb.insert(cfg.block(bb_id)); + } + } + + LCSSARewriter lcssa_rewriter(context_, dom_tree, exit_bb, + loop_->GetMergeBlock()); + MakeSetClosedSSA(context_, function, loop_->GetBlocks(), exit_bb, + &lcssa_rewriter); + + // Make sure all defs post-dominated by the merge block have their last use no + // further than the merge block. + if (loop_->GetMergeBlock()) { + std::unordered_set merging_bb_id; + loop_->GetMergingBlocks(&merging_bb_id); + merging_bb_id.erase(loop_->GetMergeBlock()->id()); + // Reset the exit set, now only the merge block is the exit. + exit_bb.clear(); + exit_bb.insert(loop_->GetMergeBlock()); + // LCSSARewriter is reusable here only because it forces the creation of a + // phi instruction in the merge block. + MakeSetClosedSSA(context_, function, merging_bb_id, exit_bb, + &lcssa_rewriter); + } + + context_->InvalidateAnalysesExceptFor( + ir::IRContext::Analysis::kAnalysisCFG | + ir::IRContext::Analysis::kAnalysisDominatorAnalysis | + ir::IRContext::Analysis::kAnalysisLoopAnalysis); +} + +ir::Loop* LoopUtils::CloneLoop( + LoopCloningResult* cloning_result, + const std::vector& ordered_loop_blocks) const { + analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); + + std::unique_ptr new_loop = MakeUnique(context_); + + ir::CFG& cfg = *context_->cfg(); + + // Clone and place blocks in a SPIR-V compliant order (dominators first). + for (ir::BasicBlock* old_bb : ordered_loop_blocks) { + // For each basic block in the loop, we clone it and register the mapping + // between old and new ids. + ir::BasicBlock* new_bb = old_bb->Clone(context_); + new_bb->SetParent(&function_); + new_bb->GetLabelInst()->SetResultId(context_->TakeNextId()); + def_use_mgr->AnalyzeInstDef(new_bb->GetLabelInst()); + context_->set_instr_block(new_bb->GetLabelInst(), new_bb); + cloning_result->cloned_bb_.emplace_back(new_bb); + + cloning_result->old_to_new_bb_[old_bb->id()] = new_bb; + cloning_result->new_to_old_bb_[new_bb->id()] = old_bb; + cloning_result->value_map_[old_bb->id()] = new_bb->id(); + + if (loop_->IsInsideLoop(old_bb)) new_loop->AddBasicBlock(new_bb); + + for (auto& inst : *new_bb) { + if (inst.HasResultId()) { + uint32_t old_result_id = inst.result_id(); + inst.SetResultId(context_->TakeNextId()); + cloning_result->value_map_[old_result_id] = inst.result_id(); + + // Only look at the defs for now, uses are not updated yet. + def_use_mgr->AnalyzeInstDef(&inst); + } + } + } + + // All instructions (including all labels) have been cloned, + // remap instruction operands id with the new ones. + for (std::unique_ptr& bb_ref : cloning_result->cloned_bb_) { + ir::BasicBlock* bb = bb_ref.get(); + + for (ir::Instruction& insn : *bb) { + insn.ForEachInId([cloning_result](uint32_t* old_id) { + // If the operand is defined in the loop, remap the id. + auto id_it = cloning_result->value_map_.find(*old_id); + if (id_it != cloning_result->value_map_.end()) { + *old_id = id_it->second; + } + }); + // Only look at what the instruction uses. All defs are register, so all + // should be fine now. + def_use_mgr->AnalyzeInstUse(&insn); + context_->set_instr_block(&insn, bb); + } + cfg.RegisterBlock(bb); + } + + PopulateLoopNest(new_loop.get(), *cloning_result); + + return new_loop.release(); +} + +void LoopUtils::PopulateLoopNest( + ir::Loop* new_loop, const LoopCloningResult& cloning_result) const { + std::unordered_map loop_mapping; + loop_mapping[loop_] = new_loop; + + if (loop_->HasParent()) loop_->GetParent()->AddNestedLoop(new_loop); + PopulateLoopDesc(new_loop, loop_, cloning_result); + + for (ir::Loop& sub_loop : + ir::make_range(++opt::TreeDFIterator(loop_), + opt::TreeDFIterator())) { + ir::Loop* cloned = new ir::Loop(context_); + if (ir::Loop* parent = loop_mapping[sub_loop.GetParent()]) + parent->AddNestedLoop(cloned); + loop_mapping[&sub_loop] = cloned; + PopulateLoopDesc(cloned, &sub_loop, cloning_result); + } + + loop_desc_->AddLoopNest(std::unique_ptr(new_loop)); +} + +// Populates |new_loop| descriptor according to |old_loop|'s one. +void LoopUtils::PopulateLoopDesc( + ir::Loop* new_loop, ir::Loop* old_loop, + const LoopCloningResult& cloning_result) const { + for (uint32_t bb_id : old_loop->GetBlocks()) { + ir::BasicBlock* bb = cloning_result.old_to_new_bb_.at(bb_id); + new_loop->AddBasicBlock(bb); + } + new_loop->SetHeaderBlock( + cloning_result.old_to_new_bb_.at(old_loop->GetHeaderBlock()->id())); + if (old_loop->GetLatchBlock()) + new_loop->SetLatchBlock( + cloning_result.old_to_new_bb_.at(old_loop->GetLatchBlock()->id())); + if (old_loop->GetMergeBlock()) { + auto it = + cloning_result.old_to_new_bb_.find(old_loop->GetMergeBlock()->id()); + ir::BasicBlock* bb = it != cloning_result.old_to_new_bb_.end() + ? it->second + : old_loop->GetMergeBlock(); + new_loop->SetMergeBlock(bb); + } + if (old_loop->GetPreHeaderBlock()) { + auto it = + cloning_result.old_to_new_bb_.find(old_loop->GetPreHeaderBlock()->id()); + if (it != cloning_result.old_to_new_bb_.end()) { + new_loop->SetPreHeaderBlock(it->second); + } + } +} + +// Class to gather some metrics about a region of interest. +void CodeMetrics::Analyze(const ir::Loop& loop) { + ir::CFG& cfg = *loop.GetContext()->cfg(); + + roi_size_ = 0; + block_sizes_.clear(); + + for (uint32_t id : loop.GetBlocks()) { + const ir::BasicBlock* bb = cfg.block(id); + size_t bb_size = 0; + bb->ForEachInst([&bb_size](const ir::Instruction* insn) { + if (insn->opcode() == SpvOpLabel) return; + if (insn->IsNop()) return; + if (insn->opcode() == SpvOpPhi) return; + bb_size++; + }); + block_sizes_[bb->id()] = bb_size; + roi_size_ += bb_size; + } +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..47f78e67826732f930f97edbe7c0f955663d1f41 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/loop_utils.h @@ -0,0 +1,171 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LOOP_UTILS_H_ +#define SOURCE_OPT_LOOP_UTILS_H_ +#include +#include +#include +#include "opt/ir_context.h" +#include "opt/loop_descriptor.h" + +namespace spvtools { + +namespace opt { + +// Class to gather some metrics about a Region Of Interest (ROI). +// So far it counts the number of instructions in a ROI (excluding debug +// and label instructions) per basic block and in total. +struct CodeMetrics { + void Analyze(const ir::Loop& loop); + + // The number of instructions per basic block in the ROI. + std::unordered_map block_sizes_; + + // Number of instruction in the ROI. + size_t roi_size_; +}; + +// LoopUtils is used to encapsulte loop optimizations and from the passes which +// use them. Any pass which needs a loop optimization should do it through this +// or through a pass which is using this. +class LoopUtils { + public: + // Holds a auxiliary results of the loop cloning procedure. + struct LoopCloningResult { + using ValueMapTy = std::unordered_map; + using BlockMapTy = std::unordered_map; + + // Mapping between the original loop ids and the new one. + ValueMapTy value_map_; + // Mapping between original loop blocks to the cloned one. + BlockMapTy old_to_new_bb_; + // Mapping between the cloned loop blocks to original one. + BlockMapTy new_to_old_bb_; + // List of cloned basic block. + std::vector> cloned_bb_; + }; + + LoopUtils(ir::IRContext* context, ir::Loop* loop) + : context_(context), + loop_desc_( + context->GetLoopDescriptor(loop->GetHeaderBlock()->GetParent())), + loop_(loop), + function_(*loop_->GetHeaderBlock()->GetParent()) {} + + // The converts the current loop to loop closed SSA form. + // In the loop closed SSA, all loop exiting values go through a dedicated Phi + // instruction. For instance: + // + // for (...) { + // A1 = ... + // if (...) + // A2 = ... + // A = phi A1, A2 + // } + // ... = op A ... + // + // Becomes + // + // for (...) { + // A1 = ... + // if (...) + // A2 = ... + // A = phi A1, A2 + // } + // C = phi A + // ... = op C ... + // + // This makes some loop transformations (such as loop unswitch) simpler + // (removes the needs to take care of exiting variables). + void MakeLoopClosedSSA(); + + // Create dedicate exit basic block. This ensure all exit basic blocks has the + // loop as sole predecessors. + // By construction, structured control flow already has a dedicated exit + // block. + // Preserves: CFG, def/use and instruction to block mapping. + void CreateLoopDedicatedExits(); + + // Clone |loop_| and remap its instructions. Newly created blocks + // will be added to the |cloning_result.cloned_bb_| list, correctly ordered to + // be inserted into a function. + // It is assumed that |ordered_loop_blocks| is compatible with the result of + // |Loop::ComputeLoopStructuredOrder|. If the preheader and merge block are in + // the list they will also be cloned. If not, the resulting loop will share + // them with the original loop. + // The function preserves the def/use, cfg and instr to block analyses. + // The cloned loop nest will be added to the loop descriptor and will have + // ownership. + ir::Loop* CloneLoop( + LoopCloningResult* cloning_result, + const std::vector& ordered_loop_blocks) const; + + // Perfom a partial unroll of |loop| by given |factor|. This will copy the + // body of the loop |factor| times. So a |factor| of one would give a new loop + // with the original body plus one unrolled copy body. + bool PartiallyUnroll(size_t factor); + + // Fully unroll |loop|. + bool FullyUnroll(); + + // This function validates that |loop| meets the assumptions made by the + // implementation of the loop unroller. As the implementation accommodates + // more types of loops this function can reduce its checks. + // + // The conditions checked to ensure the loop can be unrolled are as follows: + // 1. That the loop is in structured order. + // 2. That the continue block is a branch to the header. + // 3. That the only phi used in the loop is the induction variable. + // TODO(stephen@codeplay.com): This is a temporary mesure, after the loop is + // converted into LCSAA form and has a single entry and exit we can rewrite + // the other phis. + // 4. That this is an inner most loop, or that loops contained within this + // loop have already been fully unrolled. + // 5. That each instruction in the loop is only used within the loop. + // (Related to the above phi condition). + bool CanPerformUnroll(); + + // Maintains the loop descriptor object after the unroll functions have been + // called, otherwise the analysis should be invalidated. + void Finalize(); + + // Returns the context associate to |loop_|. + ir::IRContext* GetContext() { return context_; } + // Returns the loop descriptor owning |loop_|. + ir::LoopDescriptor* GetLoopDescriptor() { return loop_desc_; } + // Returns the loop on which the object operates on. + ir::Loop* GetLoop() const { return loop_; } + // Returns the function that |loop_| belong to. + ir::Function* GetFunction() const { return &function_; } + + private: + ir::IRContext* context_; + ir::LoopDescriptor* loop_desc_; + ir::Loop* loop_; + ir::Function& function_; + + // Populates the loop nest of |new_loop| according to |loop_| nest. + void PopulateLoopNest(ir::Loop* new_loop, + const LoopCloningResult& cloning_result) const; + + // Populates |new_loop| descriptor according to |old_loop|'s one. + void PopulateLoopDesc(ir::Loop* new_loop, ir::Loop* old_loop, + const LoopCloningResult& cloning_result) const; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LOOP_UTILS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.cpp index b176a6f2546584a814f6eb4f39e345bd7632e04d..f8e3f4f54347e77c9bdf478bffa0d38dce8ca8c4 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.cpp @@ -16,6 +16,10 @@ #include "mem_pass.h" +#include "basic_block.h" +#include "cfa.h" +#include "dominator_analysis.h" +#include "ir_context.h" #include "iterator.h" namespace spvtools { @@ -23,50 +27,46 @@ namespace opt { namespace { -const uint32_t kStorePtrIdInIdx = 0; -const uint32_t kLoadPtrIdInIdx = 0; -const uint32_t kAccessChainPtrIdInIdx = 0; const uint32_t kCopyObjectOperandInIdx = 0; const uint32_t kTypePointerStorageClassInIdx = 0; const uint32_t kTypePointerTypeIdInIdx = 1; -} // namespace anonymous +} // namespace - -bool MemPass::IsBaseTargetType( - const ir::Instruction* typeInst) const { +bool MemPass::IsBaseTargetType(const ir::Instruction* typeInst) const { switch (typeInst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: - case SpvOpTypeBool: - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeImage: - case SpvOpTypeSampler: - case SpvOpTypeSampledImage: - return true; - default: - break; + case SpvOpTypeInt: + case SpvOpTypeFloat: + case SpvOpTypeBool: + case SpvOpTypeVector: + case SpvOpTypeMatrix: + case SpvOpTypeImage: + case SpvOpTypeSampler: + case SpvOpTypeSampledImage: + case SpvOpTypePointer: + return true; + default: + break; } return false; } -bool MemPass::IsTargetType( - const ir::Instruction* typeInst) const { - if (IsBaseTargetType(typeInst)) +bool MemPass::IsTargetType(const ir::Instruction* typeInst) const { + if (IsBaseTargetType(typeInst)) return true; + if (typeInst->opcode() == SpvOpTypeArray) { + if (!IsTargetType( + get_def_use_mgr()->GetDef(typeInst->GetSingleWordOperand(1)))) { + return false; + } return true; - if (typeInst->opcode() == SpvOpTypeArray) - return IsBaseTargetType( - def_use_mgr_->GetDef(typeInst->GetSingleWordOperand(1))); - if (typeInst->opcode() != SpvOpTypeStruct) - return false; + } + if (typeInst->opcode() != SpvOpTypeStruct) return false; // All struct members must be math type - int nonMathComp = 0; - typeInst->ForEachInId([&nonMathComp,this](const uint32_t* tid) { - ir::Instruction* compTypeInst = def_use_mgr_->GetDef(*tid); - if (!IsBaseTargetType(compTypeInst)) ++nonMathComp; + return typeInst->WhileEachInId([this](const uint32_t* tid) { + ir::Instruction* compTypeInst = get_def_use_mgr()->GetDef(*tid); + if (!IsTargetType(compTypeInst)) return false; + return true; }); - return nonMathComp == 0; } bool MemPass::IsNonPtrAccessChain(const SpvOp opcode) const { @@ -75,154 +75,91 @@ bool MemPass::IsNonPtrAccessChain(const SpvOp opcode) const { bool MemPass::IsPtr(uint32_t ptrId) { uint32_t varId = ptrId; - ir::Instruction* ptrInst = def_use_mgr_->GetDef(varId); + ir::Instruction* ptrInst = get_def_use_mgr()->GetDef(varId); while (ptrInst->opcode() == SpvOpCopyObject) { varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); - ptrInst = def_use_mgr_->GetDef(varId); + ptrInst = get_def_use_mgr()->GetDef(varId); } const SpvOp op = ptrInst->opcode(); - if (op == SpvOpVariable || IsNonPtrAccessChain(op)) - return true; - if (op != SpvOpFunctionParameter) - return false; + if (op == SpvOpVariable || IsNonPtrAccessChain(op)) return true; + if (op != SpvOpFunctionParameter) return false; const uint32_t varTypeId = ptrInst->type_id(); - const ir::Instruction* varTypeInst = def_use_mgr_->GetDef(varTypeId); + const ir::Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); return varTypeInst->opcode() == SpvOpTypePointer; } -ir::Instruction* MemPass::GetPtr( - uint32_t ptrId, uint32_t* varId) { +ir::Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { *varId = ptrId; - ir::Instruction* ptrInst = def_use_mgr_->GetDef(*varId); - while (ptrInst->opcode() == SpvOpCopyObject) { - *varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); - ptrInst = def_use_mgr_->GetDef(*varId); + ir::Instruction* ptrInst = get_def_use_mgr()->GetDef(*varId); + ir::Instruction* varInst; + + if (ptrInst->opcode() != SpvOpVariable && + ptrInst->opcode() != SpvOpFunctionParameter) { + varInst = ptrInst->GetBaseAddress(); + } else { + varInst = ptrInst; } - ir::Instruction* varInst = ptrInst; - while (varInst->opcode() != SpvOpVariable && - varInst->opcode() != SpvOpFunctionParameter) { - if (IsNonPtrAccessChain(varInst->opcode())) { - *varId = varInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); - } - else { - assert(varInst->opcode() == SpvOpCopyObject); - *varId = varInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); - } - varInst = def_use_mgr_->GetDef(*varId); + if (varInst->opcode() == SpvOpVariable) { + *varId = varInst->result_id(); + } else { + *varId = 0; } - return ptrInst; -} - -ir::Instruction* MemPass::GetPtr( - ir::Instruction* ip, uint32_t* varId) { - const SpvOp op = ip->opcode(); - assert(op == SpvOpStore || op == SpvOpLoad); - const uint32_t ptrId = ip->GetSingleWordInOperand( - op == SpvOpStore ? kStorePtrIdInIdx : kLoadPtrIdInIdx); - return GetPtr(ptrId, varId); -} -bool MemPass::IsTargetVar(uint32_t varId) { - if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) - return false; - if (seen_target_vars_.find(varId) != seen_target_vars_.end()) - return true; - const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); - if (varInst->opcode() != SpvOpVariable) - return false;; - const uint32_t varTypeId = varInst->type_id(); - const ir::Instruction* varTypeInst = def_use_mgr_->GetDef(varTypeId); - if (varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) != - SpvStorageClassFunction) { - seen_non_target_vars_.insert(varId); - return false; - } - const uint32_t varPteTypeId = - varTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); - ir::Instruction* varPteTypeInst = def_use_mgr_->GetDef(varPteTypeId); - if (!IsTargetType(varPteTypeInst)) { - seen_non_target_vars_.insert(varId); - return false; + while (ptrInst->opcode() == SpvOpCopyObject) { + uint32_t temp = ptrInst->GetSingleWordInOperand(0); + ptrInst = get_def_use_mgr()->GetDef(temp); } - seen_target_vars_.insert(varId); - return true; + + return ptrInst; } -void MemPass::FindNamedOrDecoratedIds() { - named_or_decorated_ids_.clear(); - for (auto& di : module_->debugs2()) - if (di.opcode() == SpvOpName) - named_or_decorated_ids_.insert(di.GetSingleWordInOperand(0)); - for (auto& ai : module_->annotations()) - if (ai.opcode() == SpvOpDecorate || ai.opcode() == SpvOpDecorateId) - named_or_decorated_ids_.insert(ai.GetSingleWordInOperand(0)); +ir::Instruction* MemPass::GetPtr(ir::Instruction* ip, uint32_t* varId) { + assert(ip->opcode() == SpvOpStore || ip->opcode() == SpvOpLoad || + ip->opcode() == SpvOpImageTexelPointer); + + // All of these opcode place the pointer in position 0. + const uint32_t ptrId = ip->GetSingleWordInOperand(0); + return GetPtr(ptrId, varId); } bool MemPass::HasOnlyNamesAndDecorates(uint32_t id) const { - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses == nullptr) - return true; - if (named_or_decorated_ids_.find(id) == named_or_decorated_ids_.end()) - return false; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (op != SpvOpName && !IsNonTypeDecorate(op)) + return get_def_use_mgr()->WhileEachUser(id, [this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (op != SpvOpName && !IsNonTypeDecorate(op)) { return false; - } - return true; -} - -void MemPass::KillNamesAndDecorates(uint32_t id) { - // TODO(greg-lunarg): Remove id from any OpGroupDecorate and - // kill if no other operands. - if (named_or_decorated_ids_.find(id) == named_or_decorated_ids_.end()) - return; - analysis::UseList* uses = def_use_mgr_->GetUses(id); - if (uses == nullptr) - return; - std::list killList; - for (auto u : *uses) { - const SpvOp op = u.inst->opcode(); - if (op == SpvOpName || IsNonTypeDecorate(op)) - killList.push_back(u.inst); - } - for (auto kip : killList) - def_use_mgr_->KillInst(kip); + } + return true; + }); } -void MemPass::KillNamesAndDecorates(ir::Instruction* inst) { - const uint32_t rId = inst->result_id(); - if (rId == 0) - return; - KillNamesAndDecorates(rId); +void MemPass::KillAllInsts(ir::BasicBlock* bp, bool killLabel) { + bp->KillAllInsts(killLabel); } bool MemPass::HasLoads(uint32_t varId) const { - analysis::UseList* uses = def_use_mgr_->GetUses(varId); - if (uses == nullptr) - return false; - for (auto u : *uses) { - SpvOp op = u.inst->opcode(); + return !get_def_use_mgr()->WhileEachUser(varId, [this]( + ir::Instruction* user) { + SpvOp op = user->opcode(); // TODO(): The following is slightly conservative. Could be // better handling of non-store/name. if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { - if (HasLoads(u.inst->result_id())) - return true; + if (HasLoads(user->result_id())) { + return false; + } + } else if (op != SpvOpStore && op != SpvOpName && !IsNonTypeDecorate(op)) { + return false; } - else if (op != SpvOpStore && op != SpvOpName) - return true; - } - return false; + return true; + }); } bool MemPass::IsLiveVar(uint32_t varId) const { - const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(varId); // assume live if not a variable eg. function parameter - if (varInst->opcode() != SpvOpVariable) - return true; + if (varInst->opcode() != SpvOpVariable) return true; // non-function scope vars are live const uint32_t varTypeId = varInst->type_id(); - const ir::Instruction* varTypeInst = def_use_mgr_->GetDef(varTypeId); + const ir::Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); if (varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) != SpvStorageClassFunction) return true; @@ -230,27 +167,19 @@ bool MemPass::IsLiveVar(uint32_t varId) const { return HasLoads(varId); } -bool MemPass::IsLiveStore(ir::Instruction* storeInst) { - // get store's variable - uint32_t varId; - (void) GetPtr(storeInst, &varId); - return IsLiveVar(varId); -} - -void MemPass::AddStores( - uint32_t ptr_id, std::queue* insts) { - analysis::UseList* uses = def_use_mgr_->GetUses(ptr_id); - if (uses != nullptr) { - for (auto u : *uses) { - if (IsNonPtrAccessChain(u.inst->opcode())) - AddStores(u.inst->result_id(), insts); - else if (u.inst->opcode() == SpvOpStore) - insts->push(u.inst); +void MemPass::AddStores(uint32_t ptr_id, std::queue* insts) { + get_def_use_mgr()->ForEachUser(ptr_id, [this, insts](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (IsNonPtrAccessChain(op)) { + AddStores(user->result_id(), insts); + } else if (op == SpvOpStore) { + insts->push(user); } - } + }); } -void MemPass::DCEInst(ir::Instruction* inst) { +void MemPass::DCEInst(ir::Instruction* inst, + const function& call_back) { std::queue deadInsts; deadInsts.push(inst); while (!deadInsts.empty()) { @@ -261,39 +190,304 @@ void MemPass::DCEInst(ir::Instruction* inst) { continue; } // Remember operands - std::vector ids; - di->ForEachInId([&ids](uint32_t* iid) { - ids.push_back(*iid); - }); + std::set ids; + di->ForEachInId([&ids](uint32_t* iid) { ids.insert(*iid); }); uint32_t varId = 0; // Remember variable if dead load - if (di->opcode() == SpvOpLoad) - (void) GetPtr(di, &varId); - KillNamesAndDecorates(di); - def_use_mgr_->KillInst(di); + if (di->opcode() == SpvOpLoad) (void)GetPtr(di, &varId); + if (call_back) { + call_back(di); + } + context()->KillInst(di); // For all operands with no remaining uses, add their instruction // to the dead instruction queue. for (auto id : ids) - if (HasOnlyNamesAndDecorates(id)) - deadInsts.push(def_use_mgr_->GetDef(id)); + if (HasOnlyNamesAndDecorates(id)) { + ir::Instruction* odi = get_def_use_mgr()->GetDef(id); + if (context()->IsCombinatorInstruction(odi)) deadInsts.push(odi); + } // if a load was deleted and it was the variable's // last load, add all its stores to dead queue - if (varId != 0 && !IsLiveVar(varId)) - AddStores(varId, &deadInsts); + if (varId != 0 && !IsLiveVar(varId)) AddStores(varId, &deadInsts); deadInsts.pop(); } } -void MemPass::ReplaceAndDeleteLoad( - ir::Instruction* loadInst, uint32_t replId) { - const uint32_t loadId = loadInst->result_id(); - KillNamesAndDecorates(loadId); - (void) def_use_mgr_->ReplaceAllUsesWith(loadId, replId); - DCEInst(loadInst); +MemPass::MemPass() {} + +bool MemPass::HasOnlySupportedRefs(uint32_t varId) { + return get_def_use_mgr()->WhileEachUser(varId, [this](ir::Instruction* user) { + SpvOp op = user->opcode(); + if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && + !IsNonTypeDecorate(op)) { + return false; + } + return true; + }); +} + +uint32_t MemPass::Type2Undef(uint32_t type_id) { + const auto uitr = type2undefs_.find(type_id); + if (uitr != type2undefs_.end()) return uitr->second; + const uint32_t undefId = TakeNextId(); + std::unique_ptr undef_inst( + new ir::Instruction(context(), SpvOpUndef, type_id, undefId, {})); + get_def_use_mgr()->AnalyzeInstDefUse(&*undef_inst); + get_module()->AddGlobalValue(std::move(undef_inst)); + type2undefs_[type_id] = undefId; + return undefId; } -MemPass::MemPass() : module_(nullptr), def_use_mgr_(nullptr), next_id_(0) {} +bool MemPass::IsTargetVar(uint32_t varId) { + if (varId == 0) { + return false; + } + + if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) + return false; + if (seen_target_vars_.find(varId) != seen_target_vars_.end()) return true; + const ir::Instruction* varInst = get_def_use_mgr()->GetDef(varId); + if (varInst->opcode() != SpvOpVariable) return false; + const uint32_t varTypeId = varInst->type_id(); + const ir::Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); + if (varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) != + SpvStorageClassFunction) { + seen_non_target_vars_.insert(varId); + return false; + } + const uint32_t varPteTypeId = + varTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); + ir::Instruction* varPteTypeInst = get_def_use_mgr()->GetDef(varPteTypeId); + if (!IsTargetType(varPteTypeInst)) { + seen_non_target_vars_.insert(varId); + return false; + } + seen_target_vars_.insert(varId); + return true; +} + +// Remove all |phi| operands coming from unreachable blocks (i.e., blocks not in +// |reachable_blocks|). There are two types of removal that this function can +// perform: +// +// 1- Any operand that comes directly from an unreachable block is completely +// removed. Since the block is unreachable, the edge between the unreachable +// block and the block holding |phi| has been removed. +// +// 2- Any operand that comes via a live block and was defined at an unreachable +// block gets its value replaced with an OpUndef value. Since the argument +// was generated in an unreachable block, it no longer exists, so it cannot +// be referenced. However, since the value does not reach |phi| directly +// from the unreachable block, the operand cannot be removed from |phi|. +// Therefore, we replace the argument value with OpUndef. +// +// For example, in the switch() below, assume that we want to remove the +// argument with value %11 coming from block %41. +// +// [ ... ] +// %41 = OpLabel <--- Unreachable block +// %11 = OpLoad %int %y +// [ ... ] +// OpSelectionMerge %16 None +// OpSwitch %12 %16 10 %13 13 %14 18 %15 +// %13 = OpLabel +// OpBranch %16 +// %14 = OpLabel +// OpStore %outparm %int_14 +// OpBranch %16 +// %15 = OpLabel +// OpStore %outparm %int_15 +// OpBranch %16 +// %16 = OpLabel +// %30 = OpPhi %int %11 %41 %int_42 %13 %11 %14 %11 %15 +// +// Since %41 is now an unreachable block, the first operand of |phi| needs to +// be removed completely. But the operands (%11 %14) and (%11 %15) cannot be +// removed because %14 and %15 are reachable blocks. Since %11 no longer exist, +// in those arguments, we replace all references to %11 with an OpUndef value. +// This results in |phi| looking like: +// +// %50 = OpUndef %int +// [ ... ] +// %30 = OpPhi %int %int_42 %13 %50 %14 %50 %15 +void MemPass::RemovePhiOperands( + ir::Instruction* phi, + const unordered_set& reachable_blocks) { + std::vector keep_operands; + uint32_t type_id = 0; + // The id of an undefined value we've generated. + uint32_t undef_id = 0; + + // Traverse all the operands in |phi|. Build the new operand vector by adding + // all the original operands from |phi| except the unwanted ones. + for (uint32_t i = 0; i < phi->NumOperands();) { + if (i < 2) { + // The first two arguments are always preserved. + keep_operands.push_back(phi->GetOperand(i)); + ++i; + continue; + } + + // The remaining Phi arguments come in pairs. Index 'i' contains the + // variable id, index 'i + 1' is the originating block id. + assert(i % 2 == 0 && i < phi->NumOperands() - 1 && + "malformed Phi arguments"); + + ir::BasicBlock* in_block = cfg()->block(phi->GetSingleWordOperand(i + 1)); + if (reachable_blocks.find(in_block) == reachable_blocks.end()) { + // If the incoming block is unreachable, remove both operands as this + // means that the |phi| has lost an incoming edge. + i += 2; + continue; + } + + // In all other cases, the operand must be kept but may need to be changed. + uint32_t arg_id = phi->GetSingleWordOperand(i); + ir::Instruction* arg_def_instr = get_def_use_mgr()->GetDef(arg_id); + ir::BasicBlock* def_block = context()->get_instr_block(arg_def_instr); + if (def_block && + reachable_blocks.find(def_block) == reachable_blocks.end()) { + // If the current |phi| argument was defined in an unreachable block, it + // means that this |phi| argument is no longer defined. Replace it with + // |undef_id|. + if (!undef_id) { + type_id = arg_def_instr->type_id(); + undef_id = Type2Undef(type_id); + } + keep_operands.push_back( + ir::Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {undef_id})); + } else { + // Otherwise, the argument comes from a reachable block or from no block + // at all (meaning that it was defined in the global section of the + // program). In both cases, keep the argument intact. + keep_operands.push_back(phi->GetOperand(i)); + } + + keep_operands.push_back(phi->GetOperand(i + 1)); + + i += 2; + } + + context()->ForgetUses(phi); + phi->ReplaceOperands(keep_operands); + context()->AnalyzeUses(phi); +} + +void MemPass::RemoveBlock(ir::Function::iterator* bi) { + auto& rm_block = **bi; + + // Remove instructions from the block. + rm_block.ForEachInst([&rm_block, this](ir::Instruction* inst) { + // Note that we do not kill the block label instruction here. The label + // instruction is needed to identify the block, which is needed by the + // removal of phi operands. + if (inst != rm_block.GetLabelInst()) { + context()->KillInst(inst); + } + }); + + // Remove the label instruction last. + auto label = rm_block.GetLabelInst(); + context()->KillInst(label); + + *bi = bi->Erase(); +} + +bool MemPass::RemoveUnreachableBlocks(ir::Function* func) { + bool modified = false; + + // Mark reachable all blocks reachable from the function's entry block. + std::unordered_set reachable_blocks; + std::unordered_set visited_blocks; + std::queue worklist; + reachable_blocks.insert(func->entry().get()); + + // Initially mark the function entry point as reachable. + worklist.push(func->entry().get()); + + auto mark_reachable = [&reachable_blocks, &visited_blocks, &worklist, + this](uint32_t label_id) { + auto successor = cfg()->block(label_id); + if (visited_blocks.count(successor) == 0) { + reachable_blocks.insert(successor); + worklist.push(successor); + visited_blocks.insert(successor); + } + }; + + // Transitively mark all blocks reachable from the entry as reachable. + while (!worklist.empty()) { + ir::BasicBlock* block = worklist.front(); + worklist.pop(); + + // All the successors of a live block are also live. + static_cast(block)->ForEachSuccessorLabel( + mark_reachable); + + // All the Merge and ContinueTarget blocks of a live block are also live. + block->ForMergeAndContinueLabel(mark_reachable); + } + + // Update operands of Phi nodes that reference unreachable blocks. + for (auto& block : *func) { + // If the block is about to be removed, don't bother updating its + // Phi instructions. + if (reachable_blocks.count(&block) == 0) { + continue; + } + + // If the block is reachable and has Phi instructions, remove all + // operands from its Phi instructions that reference unreachable blocks. + // If the block has no Phi instructions, this is a no-op. + block.ForEachPhiInst([&reachable_blocks, this](ir::Instruction* phi) { + RemovePhiOperands(phi, reachable_blocks); + }); + } + + // Erase unreachable blocks. + for (auto ebi = func->begin(); ebi != func->end();) { + if (reachable_blocks.count(&*ebi) == 0) { + RemoveBlock(&ebi); + modified = true; + } else { + ++ebi; + } + } + + return modified; +} + +bool MemPass::CFGCleanup(ir::Function* func) { + bool modified = false; + modified |= RemoveUnreachableBlocks(func); + return modified; +} + +void MemPass::CollectTargetVars(ir::Function* func) { + seen_target_vars_.clear(); + seen_non_target_vars_.clear(); + type2undefs_.clear(); + + // Collect target (and non-) variable sets. Remove variables with + // non-load/store refs from target variable set + for (auto& blk : *func) { + for (auto& inst : blk) { + switch (inst.opcode()) { + case SpvOpStore: + case SpvOpLoad: { + uint32_t varId; + (void)GetPtr(&inst, &varId); + if (!IsTargetVar(varId)) break; + if (HasOnlySupportedRefs(varId)) break; + seen_non_target_vars_.insert(varId); + seen_target_vars_.erase(varId); + } break; + default: + break; + } + } + } +} } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.h index f86f306afa50e2befa6e7efcaae8797c56d2f7f6..3778fc12c4f3d37064375b0ffcbfc6da9285dfdc 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/mem_pass.h @@ -14,11 +14,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef LIBSPIRV_OPT_OPT_PASS_H_ -#define LIBSPIRV_OPT_OPT_PASS_H_ - +#ifndef LIBSPIRV_OPT_MEM_PASS_H_ +#define LIBSPIRV_OPT_MEM_PASS_H_ #include +#include #include #include #include @@ -27,6 +27,7 @@ #include "basic_block.h" #include "def_use_manager.h" +#include "dominator_analysis.h" #include "module.h" #include "pass.h" @@ -40,6 +41,33 @@ class MemPass : public Pass { MemPass(); virtual ~MemPass() = default; + // Returns an undef value for the given |var_id|'s type. + uint32_t GetUndefVal(uint32_t var_id) { + return Type2Undef(GetPointeeTypeId(get_def_use_mgr()->GetDef(var_id))); + } + + // Given a load or store |ip|, return the pointer instruction. + // Also return the base variable's id in |varId|. If no base variable is + // found, |varId| will be 0. + ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId); + + // Return true if |varId| is a previously identified target variable. + // Return false if |varId| is a previously identified non-target variable. + // + // Non-target variables are variable of function scope of a target type that + // are accessed with constant-index access chains. not accessed with + // non-constant-index access chains. Also cache non-target variables. + // + // If variable is not cached, return true if variable is a function scope + // variable of target type, false otherwise. Updates caches of target and + // non-target variables. + bool IsTargetVar(uint32_t varId); + + // Collect target SSA variables. This traverses all the loads and stores in + // function |func| looking for variables that can be replaced with SSA IDs. It + // populates the sets |seen_target_vars_| and |seen_non_target_vars_|. + void CollectTargetVars(ir::Function* func); + protected: // Returns true if |typeInst| is a scalar type // or a vector or matrix @@ -58,32 +86,16 @@ class MemPass : public Pass { bool IsPtr(uint32_t ptrId); // Given the id of a pointer |ptrId|, return the top-most non-CopyObj. - // Also return the base variable's id in |varId|. + // Also return the base variable's id in |varId|. If no base variable is + // found, |varId| will be 0. ir::Instruction* GetPtr(uint32_t ptrId, uint32_t* varId); - // Given a load or store |ip|, return the pointer instruction. - // Also return the base variable's id in |varId|. - ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId); - - // Return true if |varId| is a previously identified target variable. - // Return false if |varId| is a previously identified non-target variable. - // See FindTargetVars() for definition of target variable. If variable is - // not cached, return true if variable is a function scope variable of - // target type, false otherwise. Updates caches of target and non-target - // variables. - bool IsTargetVar(uint32_t varId); - // Return true if all uses of |id| are only name or decorate ops. bool HasOnlyNamesAndDecorates(uint32_t id) const; - // Kill all name and decorate ops using |inst| - void KillNamesAndDecorates(ir::Instruction* inst); - - // Kill all name and decorate ops using |id| - void KillNamesAndDecorates(uint32_t id); - - // Collect all named or decorated ids in module - void FindNamedOrDecoratedIds(); + // Kill all instructions in block |bp|. Whether or not to kill the label is + // indicated by |killLabel|. + void KillAllInsts(ir::BasicBlock* bp, bool killLabel = true); // Return true if any instruction loads from |varId| bool HasLoads(uint32_t varId) const; @@ -92,47 +104,27 @@ class MemPass : public Pass { // a load bool IsLiveVar(uint32_t varId) const; - // Return true if |storeInst| is not a function variable or if its - // base variable has a load - bool IsLiveStore(ir::Instruction* storeInst); - // Add stores using |ptr_id| to |insts| void AddStores(uint32_t ptr_id, std::queue* insts); // Delete |inst| and iterate DCE on all its operands if they are now // useless. If a load is deleted and its variable has no other loads, // delete all its variable's stores. - void DCEInst(ir::Instruction* inst); + void DCEInst(ir::Instruction* inst, + const std::function&); - // Replace all instances of |loadInst|'s id with |replId| and delete - // |loadInst|. - void ReplaceAndDeleteLoad(ir::Instruction* loadInst, uint32_t replId); + // Call all the cleanup helper functions on |func|. + bool CFGCleanup(ir::Function* func); // Return true if |op| is supported decorate. inline bool IsNonTypeDecorate(uint32_t op) const { return (op == SpvOpDecorate || op == SpvOpDecorateId); } - // Initialize next available id from |module|. - void InitNextId() { - next_id_ = module_->IdBound(); - } - - // Save next available id into |module|. - void FinalizeNextId() { - module_->SetIdBound(next_id_); - } - - // Return next available id and calculate next. - inline uint32_t TakeNextId() { - return next_id_++; - } - - // Module this pass is processing - ir::Module* module_; - - // Def-Uses for the module we are processing - std::unique_ptr def_use_mgr_; + // Return undef in function for type. Create and insert an undef after the + // first non-variable in the function if it doesn't already exist. Add + // undef to function undef map. + uint32_t Type2Undef(uint32_t type_id); // Cache of verified target vars std::unordered_set seen_target_vars_; @@ -140,15 +132,32 @@ class MemPass : public Pass { // Cache of verified non-target vars std::unordered_set seen_non_target_vars_; - // named or decorated ids - std::unordered_set named_or_decorated_ids_; - - // Next unused ID - uint32_t next_id_; + private: + // Return true if all uses of |varId| are only through supported reference + // operations ie. loads and store. Also cache in supported_ref_vars_. + // TODO(dnovillo): This function is replicated in other passes and it's + // slightly different in every pass. Is it possible to make one common + // implementation? + bool HasOnlySupportedRefs(uint32_t varId); + + // Remove all the unreachable basic blocks in |func|. + bool RemoveUnreachableBlocks(ir::Function* func); + + // Remove the block pointed by the iterator |*bi|. This also removes + // all the instructions in the pointed-to block. + void RemoveBlock(ir::Function::iterator* bi); + + // Remove Phi operands in |phi| that are coming from blocks not in + // |reachable_blocks|. + void RemovePhiOperands( + ir::Instruction* phi, + const std::unordered_set& reachable_blocks); + + // Map from type to undef + std::unordered_map type2undefs_; }; } // namespace opt } // namespace spvtools -#endif // LIBSPIRV_OPT_OPT_PASS_H_ - +#endif // LIBSPIRV_OPT_MEM_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10d336c2ee14f5634667a94ed3d1316903d99e06 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.cpp @@ -0,0 +1,659 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "merge_return_pass.h" + +#include "instruction.h" +#include "ir_builder.h" +#include "ir_context.h" +#include "make_unique.h" +#include "reflect.h" + +namespace spvtools { +namespace opt { + +Pass::Status MergeReturnPass::Process(ir::IRContext* irContext) { + InitializeProcessing(irContext); + + bool modified = false; + bool is_shader = + context()->get_feature_mgr()->HasCapability(SpvCapabilityShader); + for (auto& function : *get_module()) { + std::vector return_blocks = CollectReturnBlocks(&function); + if (return_blocks.size() <= 1) continue; + + function_ = &function; + return_flag_ = nullptr; + return_value_ = nullptr; + final_return_block_ = nullptr; + + modified = true; + if (is_shader) { + ProcessStructured(&function, return_blocks); + } else { + MergeReturnBlocks(&function, return_blocks); + } + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +void MergeReturnPass::ProcessStructured( + ir::Function* function, const std::vector& return_blocks) { + std::list order; + cfg()->ComputeStructuredOrder(function, &*function->begin(), &order); + + // Create the new return block + CreateReturnBlock(); + + // Create the return + CreateReturn(final_return_block_); + + cfg()->RegisterBlock(final_return_block_); + + state_.clear(); + state_.emplace_back(nullptr, nullptr); + for (auto block : order) { + if (cfg()->IsPseudoEntryBlock(block) || cfg()->IsPseudoExitBlock(block)) { + continue; + } + + auto blockId = block->GetLabelInst()->result_id(); + if (blockId == CurrentState().CurrentMergeId()) { + // Pop the current state as we've hit the merge + state_.pop_back(); + } + + ProcessStructuredBlock(block); + + // Generate state for next block + if (ir::Instruction* mergeInst = block->GetMergeInst()) { + ir::Instruction* loopMergeInst = block->GetLoopMergeInst(); + if (!loopMergeInst) loopMergeInst = state_.back().LoopMergeInst(); + state_.emplace_back(loopMergeInst, mergeInst); + } + } + + // Predicate successors of the original return blocks as necessary. + PredicateBlocks(return_blocks); + + // We have not kept the dominator tree up-to-date. + // Invalidate it at this point to make sure it will be rebuilt. + context()->RemoveDominatorAnalysis(function); + AddNewPhiNodes(); +} + +void MergeReturnPass::CreateReturnBlock() { + // Create a label for the new return block + std::unique_ptr return_label( + new ir::Instruction(context(), SpvOpLabel, 0u, TakeNextId(), {})); + + // Create the new basic block + std::unique_ptr return_block( + new ir::BasicBlock(std::move(return_label))); + function_->AddBasicBlock(std::move(return_block)); + final_return_block_ = &*(--function_->end()); + context()->AnalyzeDefUse(final_return_block_->GetLabelInst()); + context()->set_instr_block(final_return_block_->GetLabelInst(), + final_return_block_); + final_return_block_->SetParent(function_); +} + +void MergeReturnPass::CreateReturn(ir::BasicBlock* block) { + AddReturnValue(); + + if (return_value_) { + // Load and return the final return value + uint32_t loadId = TakeNextId(); + block->AddInstruction(MakeUnique( + context(), SpvOpLoad, function_->type_id(), loadId, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {return_value_->result_id()}}})); + ir::Instruction* var_inst = block->terminator(); + context()->AnalyzeDefUse(var_inst); + context()->set_instr_block(var_inst, block); + + block->AddInstruction(MakeUnique( + context(), SpvOpReturnValue, 0, 0, + std::initializer_list{{SPV_OPERAND_TYPE_ID, {loadId}}})); + context()->AnalyzeDefUse(block->terminator()); + context()->set_instr_block(block->terminator(), block); + } else { + block->AddInstruction(MakeUnique(context(), SpvOpReturn)); + context()->AnalyzeDefUse(block->terminator()); + context()->set_instr_block(block->terminator(), block); + } +} + +void MergeReturnPass::ProcessStructuredBlock(ir::BasicBlock* block) { + SpvOp tail_opcode = block->tail()->opcode(); + if (tail_opcode == SpvOpReturn || tail_opcode == SpvOpReturnValue) { + if (!return_flag_) { + AddReturnFlag(); + } + } + + if (tail_opcode == SpvOpReturn || tail_opcode == SpvOpReturnValue || + tail_opcode == SpvOpUnreachable) { + if (CurrentState().InLoop()) { + // Can always break out of innermost loop + BranchToBlock(block, CurrentState().LoopMergeId()); + } else if (CurrentState().InStructuredFlow()) { + BranchToBlock(block, CurrentState().CurrentMergeId()); + } else { + BranchToBlock(block, final_return_block_->id()); + } + } +} + +void MergeReturnPass::BranchToBlock(ir::BasicBlock* block, uint32_t target) { + if (block->tail()->opcode() == SpvOpReturn || + block->tail()->opcode() == SpvOpReturnValue) { + RecordReturned(block); + RecordReturnValue(block); + } + + // Fix up existing phi nodes. + // + // A new edge is being added from |block| to |target|, so go through + // |target|'s phi nodes add an undef incoming value for |block|. + ir::BasicBlock* target_block = context()->get_instr_block(target); + target_block->ForEachPhiInst([this, block](ir::Instruction* inst) { + uint32_t undefId = Type2Undef(inst->type_id()); + inst->AddOperand({SPV_OPERAND_TYPE_ID, {undefId}}); + inst->AddOperand({SPV_OPERAND_TYPE_ID, {block->id()}}); + context()->UpdateDefUse(inst); + }); + + const auto& target_pred = cfg()->preds(target); + if (target_pred.size() == 1) { + MarkForNewPhiNodes(target_block, + context()->get_instr_block(target_pred[0])); + } + + ir::Instruction* return_inst = block->terminator(); + return_inst->SetOpcode(SpvOpBranch); + return_inst->ReplaceOperands({{SPV_OPERAND_TYPE_ID, {target}}}); + context()->get_def_use_mgr()->AnalyzeInstDefUse(return_inst); + cfg()->AddEdge(block->id(), target); +} + +void MergeReturnPass::CreatePhiNodesForInst(ir::BasicBlock* merge_block, + uint32_t predecessor, + ir::Instruction& inst) { + opt::DominatorAnalysis* dom_tree = + context()->GetDominatorAnalysis(merge_block->GetParent()); + ir::BasicBlock* inst_bb = context()->get_instr_block(&inst); + + if (inst.result_id() != 0) { + std::vector users_to_update; + context()->get_def_use_mgr()->ForEachUser( + &inst, + [&users_to_update, &dom_tree, inst_bb, this](ir::Instruction* user) { + if (!dom_tree->Dominates(inst_bb, context()->get_instr_block(user))) { + users_to_update.push_back(user); + } + }); + + if (users_to_update.empty()) { + return; + } + + // There is at least one values that needs to be replaced. + // First create the OpPhi instruction. + InstructionBuilder builder(context(), &*merge_block->begin(), + ir::IRContext::kAnalysisDefUse); + uint32_t undef_id = Type2Undef(inst.type_id()); + std::vector phi_operands; + + // Add the operands for the defining instructions. + phi_operands.push_back(inst.result_id()); + phi_operands.push_back(predecessor); + + // Add undef from all other blocks. + std::vector preds = cfg()->preds(merge_block->id()); + for (uint32_t pred_id : preds) { + if (pred_id != predecessor) { + phi_operands.push_back(undef_id); + phi_operands.push_back(pred_id); + } + } + + ir::Instruction* new_phi = builder.AddPhi(inst.type_id(), phi_operands); + uint32_t result_of_phi = new_phi->result_id(); + + // Update all of the users to use the result of the new OpPhi. + for (ir::Instruction* user : users_to_update) { + user->ForEachInId([&inst, result_of_phi](uint32_t* id) { + if (*id == inst.result_id()) { + *id = result_of_phi; + } + }); + context()->AnalyzeUses(user); + } + } +} + +void MergeReturnPass::PredicateBlocks( + const std::vector& return_blocks) { + // The CFG is being modified as the function proceeds so avoid caching + // successors. + std::vector stack; + auto add_successors = [this, &stack](ir::BasicBlock* block) { + const ir::BasicBlock* const_block = + const_cast(block); + const_block->ForEachSuccessorLabel([this, &stack](const uint32_t idx) { + stack.push_back(context()->get_instr_block(idx)); + }); + }; + + std::unordered_set seen; + std::unordered_set predicated; + for (auto b : return_blocks) { + seen.clear(); + add_successors(b); + + while (!stack.empty()) { + ir::BasicBlock* block = stack.back(); + assert(block); + stack.pop_back(); + + if (block == b) continue; + if (block == final_return_block_) continue; + if (!seen.insert(block).second) continue; + if (!predicated.insert(block).second) continue; + + // Skip structured subgraphs. + ir::BasicBlock* next = block; + while (next->GetMergeInst()) { + next = context()->get_instr_block(next->MergeBlockIdIfAny()); + } + add_successors(next); + PredicateBlock(block, next, &predicated); + } + } +} + +bool MergeReturnPass::RequiresPredication( + const ir::BasicBlock* block, const ir::BasicBlock* tail_block) const { + // This is intentionally conservative. + // TODO(alanbaker): re-visit this when more performance data is available. + if (block != tail_block) return true; + + bool requires_predicate = false; + block->ForEachInst([&requires_predicate](const ir::Instruction* inst) { + if (inst->opcode() != SpvOpPhi && inst->opcode() != SpvOpLabel && + !ir::IsTerminatorInst(inst->opcode())) { + requires_predicate = true; + } + }); + return requires_predicate; +} + +void MergeReturnPass::PredicateBlock( + ir::BasicBlock* block, ir::BasicBlock* tail_block, + std::unordered_set* predicated) { + if (!RequiresPredication(block, tail_block)) { + return; + } + + // Make sure the cfg is build here. If we don't then it becomes very hard to + // know which new blocks need to be updated. + context()->BuildInvalidAnalyses(ir::IRContext::kAnalysisCFG); + + // When predicating, be aware of whether this block is a header block, a merge + // block or both. + // + // If this block is a merge block, ensure the appropriate header stays + // up-to-date with any changes (i.e. points to the pre-header). + // + // If this block is a header block, predicate the entire structured subgraph. + // This can act recursively. + + // If |block| is a loop head, then the back edge must jump to the original + // code, not the new header. + if (block->GetLoopMergeInst()) { + cfg()->SplitLoopHeader(block); + } + + // Leave the phi instructions behind. + auto iter = block->begin(); + while (iter->opcode() == SpvOpPhi) { + ++iter; + } + + // Forget about the edges leaving block. They will be removed. + cfg()->RemoveSuccessorEdges(block); + + std::unique_ptr new_block( + block->SplitBasicBlock(context(), TakeNextId(), iter)); + ir::BasicBlock* old_body = + function_->InsertBasicBlockAfter(std::move(new_block), block); + predicated->insert(old_body); + + if (tail_block == block) { + tail_block = old_body; + } + + const ir::BasicBlock* const_old_body = + static_cast(old_body); + const_old_body->ForEachSuccessorLabel( + [old_body, block, this](const uint32_t label) { + ir::BasicBlock* target_bb = context()->get_instr_block(label); + if (MarkedSinglePred(target_bb) == block) { + MarkForNewPhiNodes(target_bb, old_body); + } + }); + + std::unique_ptr new_merge_block(new ir::BasicBlock( + MakeUnique(context(), SpvOpLabel, 0, TakeNextId(), + std::initializer_list{}))); + + ir::BasicBlock* new_merge = + function_->InsertBasicBlockAfter(std::move(new_merge_block), tail_block); + predicated->insert(new_merge); + new_merge->SetParent(function_); + + // Register the new labels. + get_def_use_mgr()->AnalyzeInstDef(old_body->GetLabelInst()); + context()->set_instr_block(old_body->GetLabelInst(), old_body); + get_def_use_mgr()->AnalyzeInstDef(new_merge->GetLabelInst()); + context()->set_instr_block(new_merge->GetLabelInst(), new_merge); + + // Move the tail branch into the new merge and fix the mapping. If a single + // block is being predicated then its branch was moved to the old body + // previously. + std::unique_ptr inst; + ir::Instruction* i = tail_block->terminator(); + cfg()->RemoveSuccessorEdges(tail_block); + get_def_use_mgr()->ClearInst(i); + inst.reset(std::move(i)); + inst->RemoveFromList(); + new_merge->end().InsertBefore(std::move(inst)); + get_def_use_mgr()->AnalyzeInstUse(new_merge->terminator()); + context()->set_instr_block(new_merge->terminator(), new_merge); + + // Add a branch to the new merge. If we jumped multiple blocks, the branch is + // added to tail_block, otherwise the branch belongs in old_body. + tail_block->AddInstruction(MakeUnique( + context(), SpvOpBranch, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {new_merge->id()}}})); + get_def_use_mgr()->AnalyzeInstUse(tail_block->terminator()); + context()->set_instr_block(tail_block->terminator(), tail_block); + + // Within the new header we need the following: + // 1. Load of the return status flag + // 2. Declare the merge block + // 3. Branch to new merge (true) or old body (false) + + // 1. Load of the return status flag + analysis::Bool bool_type; + uint32_t bool_id = context()->get_type_mgr()->GetId(&bool_type); + assert(bool_id != 0); + uint32_t load_id = TakeNextId(); + block->AddInstruction(MakeUnique( + context(), SpvOpLoad, bool_id, load_id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {return_flag_->result_id()}}})); + get_def_use_mgr()->AnalyzeInstDefUse(block->terminator()); + context()->set_instr_block(block->terminator(), block); + + // 2. Declare the merge block + block->AddInstruction( + MakeUnique(context(), SpvOpSelectionMerge, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {new_merge->id()}}, + {SPV_OPERAND_TYPE_SELECTION_CONTROL, + {SpvSelectionControlMaskNone}}})); + get_def_use_mgr()->AnalyzeInstUse(block->terminator()); + context()->set_instr_block(block->terminator(), block); + + // 3. Branch to new merge (true) or old body (false) + block->AddInstruction(MakeUnique( + context(), SpvOpBranchConditional, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {load_id}}, + {SPV_OPERAND_TYPE_ID, {new_merge->id()}}, + {SPV_OPERAND_TYPE_ID, {old_body->id()}}})); + get_def_use_mgr()->AnalyzeInstUse(block->terminator()); + context()->set_instr_block(block->terminator(), block); + + assert(old_body->begin() != old_body->end()); + assert(block->begin() != block->end()); + assert(new_merge->begin() != new_merge->end()); + + // Update the cfg + cfg()->AddEdges(block); + cfg()->RegisterBlock(old_body); + if (old_body != tail_block) { + cfg()->AddEdges(tail_block); + } + cfg()->RegisterBlock(new_merge); + MarkForNewPhiNodes(new_merge, tail_block); +} + +void MergeReturnPass::RecordReturned(ir::BasicBlock* block) { + if (block->tail()->opcode() != SpvOpReturn && + block->tail()->opcode() != SpvOpReturnValue) + return; + + assert(return_flag_ && "Did not generate the return flag variable."); + + if (!constant_true_) { + analysis::Bool temp; + const analysis::Bool* bool_type = + context()->get_type_mgr()->GetRegisteredType(&temp)->AsBool(); + + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + const analysis::Constant* true_const = + const_mgr->GetConstant(bool_type, {true}); + constant_true_ = const_mgr->GetDefiningInstruction(true_const); + context()->UpdateDefUse(constant_true_); + } + + std::unique_ptr return_store(new ir::Instruction( + context(), SpvOpStore, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {return_flag_->result_id()}}, + {SPV_OPERAND_TYPE_ID, {constant_true_->result_id()}}})); + + ir::Instruction* store_inst = + &*block->tail().InsertBefore(std::move(return_store)); + context()->set_instr_block(store_inst, block); + context()->AnalyzeDefUse(store_inst); +} + +void MergeReturnPass::RecordReturnValue(ir::BasicBlock* block) { + auto terminator = *block->tail(); + if (terminator.opcode() != SpvOpReturnValue) { + return; + } + + assert(return_value_ && + "Did not generate the variable to hold the return value."); + + std::unique_ptr value_store(new ir::Instruction( + context(), SpvOpStore, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {return_value_->result_id()}}, + {SPV_OPERAND_TYPE_ID, {terminator.GetSingleWordInOperand(0u)}}})); + + ir::Instruction* store_inst = + &*block->tail().InsertBefore(std::move(value_store)); + context()->set_instr_block(store_inst, block); + context()->AnalyzeDefUse(store_inst); +} + +void MergeReturnPass::AddReturnValue() { + if (return_value_) return; + + uint32_t return_type_id = function_->type_id(); + if (get_def_use_mgr()->GetDef(return_type_id)->opcode() == SpvOpTypeVoid) + return; + + uint32_t return_ptr_type = context()->get_type_mgr()->FindPointerToType( + return_type_id, SpvStorageClassFunction); + + uint32_t var_id = TakeNextId(); + std::unique_ptr returnValue(new ir::Instruction( + context(), SpvOpVariable, return_ptr_type, var_id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); + + auto insert_iter = function_->begin()->begin(); + insert_iter.InsertBefore(std::move(returnValue)); + ir::BasicBlock* entry_block = &*function_->begin(); + return_value_ = &*entry_block->begin(); + context()->AnalyzeDefUse(return_value_); + context()->set_instr_block(return_value_, entry_block); +} + +void MergeReturnPass::AddReturnFlag() { + if (return_flag_) return; + + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + + analysis::Bool temp; + uint32_t bool_id = type_mgr->GetTypeInstruction(&temp); + analysis::Bool* bool_type = type_mgr->GetType(bool_id)->AsBool(); + + const analysis::Constant* false_const = + const_mgr->GetConstant(bool_type, {false}); + uint32_t const_false_id = + const_mgr->GetDefiningInstruction(false_const)->result_id(); + + uint32_t bool_ptr_id = + type_mgr->FindPointerToType(bool_id, SpvStorageClassFunction); + + uint32_t var_id = TakeNextId(); + std::unique_ptr returnFlag(new ir::Instruction( + context(), SpvOpVariable, bool_ptr_id, var_id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}, + {SPV_OPERAND_TYPE_ID, {const_false_id}}})); + + auto insert_iter = function_->begin()->begin(); + + insert_iter.InsertBefore(std::move(returnFlag)); + ir::BasicBlock* entry_block = &*function_->begin(); + return_flag_ = &*entry_block->begin(); + context()->AnalyzeDefUse(return_flag_); + context()->set_instr_block(return_flag_, entry_block); +} + +std::vector MergeReturnPass::CollectReturnBlocks( + ir::Function* function) { + std::vector return_blocks; + for (auto& block : *function) { + ir::Instruction& terminator = *block.tail(); + if (terminator.opcode() == SpvOpReturn || + terminator.opcode() == SpvOpReturnValue) { + return_blocks.push_back(&block); + } + } + return return_blocks; +} + +void MergeReturnPass::MergeReturnBlocks( + ir::Function* function, const std::vector& return_blocks) { + if (return_blocks.size() <= 1) { + // No work to do. + return; + } + + CreateReturnBlock(); + uint32_t return_id = final_return_block_->id(); + auto ret_block_iter = --function->end(); + // Create the PHI for the merged block (if necessary). + // Create new return. + std::vector phi_ops; + for (auto block : return_blocks) { + if (block->tail()->opcode() == SpvOpReturnValue) { + phi_ops.push_back( + {SPV_OPERAND_TYPE_ID, {block->tail()->GetSingleWordInOperand(0u)}}); + phi_ops.push_back({SPV_OPERAND_TYPE_ID, {block->id()}}); + } + } + + if (!phi_ops.empty()) { + // Need a PHI node to select the correct return value. + uint32_t phi_result_id = TakeNextId(); + uint32_t phi_type_id = function->type_id(); + std::unique_ptr phi_inst(new ir::Instruction( + context(), SpvOpPhi, phi_type_id, phi_result_id, phi_ops)); + ret_block_iter->AddInstruction(std::move(phi_inst)); + ir::BasicBlock::iterator phiIter = ret_block_iter->tail(); + + std::unique_ptr return_inst( + new ir::Instruction(context(), SpvOpReturnValue, 0u, 0u, + {{SPV_OPERAND_TYPE_ID, {phi_result_id}}})); + ret_block_iter->AddInstruction(std::move(return_inst)); + ir::BasicBlock::iterator ret = ret_block_iter->tail(); + + // Register the phi def and mark instructions for use updates. + get_def_use_mgr()->AnalyzeInstDefUse(&*phiIter); + get_def_use_mgr()->AnalyzeInstDef(&*ret); + } else { + std::unique_ptr return_inst( + new ir::Instruction(context(), SpvOpReturn)); + ret_block_iter->AddInstruction(std::move(return_inst)); + } + + // Replace returns with branches + for (auto block : return_blocks) { + context()->ForgetUses(block->terminator()); + block->tail()->SetOpcode(SpvOpBranch); + block->tail()->ReplaceOperands({{SPV_OPERAND_TYPE_ID, {return_id}}}); + get_def_use_mgr()->AnalyzeInstUse(block->terminator()); + get_def_use_mgr()->AnalyzeInstUse(block->GetLabelInst()); + } + + get_def_use_mgr()->AnalyzeInstDefUse(ret_block_iter->GetLabelInst()); +} + +void MergeReturnPass::AddNewPhiNodes() { + opt::DominatorAnalysis* dom_tree = context()->GetDominatorAnalysis(function_); + std::list order; + cfg()->ComputeStructuredOrder(function_, &*function_->begin(), &order); + + for (ir::BasicBlock* bb : order) { + AddNewPhiNodes(bb, new_merge_nodes_[bb], + dom_tree->ImmediateDominator(bb)->id()); + } +} + +void MergeReturnPass::AddNewPhiNodes(ir::BasicBlock* bb, ir::BasicBlock* pred, + uint32_t header_id) { + opt::DominatorAnalysis* dom_tree = context()->GetDominatorAnalysis(function_); + // Insert as a stopping point. We do not have to add anything in the block or + // above because the header dominates |bb|. + + ir::BasicBlock* current_bb = pred; + while (current_bb != nullptr && current_bb->id() != header_id) { + for (ir::Instruction& inst : *current_bb) { + CreatePhiNodesForInst(bb, pred->id(), inst); + } + current_bb = dom_tree->ImmediateDominator(current_bb); + } +} + +void MergeReturnPass::MarkForNewPhiNodes(ir::BasicBlock* block, + ir::BasicBlock* single_original_pred) { + new_merge_nodes_[block] = single_original_pred; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..b4f47e3ad12e43685486fdf4e599aae4e49268a2 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/merge_return_pass.h @@ -0,0 +1,307 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_MERGE_RETURN_PASS_H_ +#define LIBSPIRV_OPT_MERGE_RETURN_PASS_H_ + +#include "basic_block.h" +#include "function.h" +#include "mem_pass.h" + +#include +#include + +namespace spvtools { +namespace opt { + +/******************************************************************************* + * + * Handling Structured Control Flow: + * + * Structured control flow guarantees that the CFG will reconverge at a given + * point (the merge block). Within structured control flow, all blocks must be + * post-dominated by the merge block, except return blocks and break blocks. + * A break block is a block that branches to the innermost loop's merge block. + * + * Beyond this, we further assume that all unreachable blocks have been + * cleanedup. This means that the only unreachable blocks are those necessary + * for valid structured control flow. + * + * Algorithm: + * + * If a return is encountered, it should record that: i) the function has + * "returned" and ii) the value of the return. The return should be replaced + * with a branch. If current block is not within structured control flow, this + * is the final return. This block should branch to the new return block (its + * direct successor). If the current block is within structured control flow, + * the branch destination should be the innermost loop's merge (if it exists) + * or the merge block of the immediate structured control flow. If the merge + * block produces any live values it will need to be predicated. While the merge + * is nested in structured control flow, the predication path should branch to + * the next best merge block available. Once structured control flow has been + * exited, remaining blocks must be predicated with new structured control flow + * (OpSelectionMerge). These should be nested correctly in case of straight line + * branching to reach the final return block. + * + * In the final return block, the return value should be loaded and returned. + * Memory promotion passes should be able to promote the newly introduced + * variables ("has returned" and "return value"). + * + * Predicating the Final Merge: + * + * At each merge block predication needs to be introduced (optimization: only if + * that block produces value live beyond it). This needs to be done carefully. + * The merge block should be split into multiple blocks. + * + * 1 (header) + * / \ + * (ret) 2 3 (merge) + * + * || + * \/ + * + * 1 (header) + * / \ + * 2 | + * \ / + * 3 (merge for 1, new header) + * / \ + * | 3 (old body) + * \ / + * (ret) 4 (new merge) + * + * In the above (simple) example, the return originally in |2| is passed through + * the merge. That merge is predicated such that the old body of the block is + * the else branch. The branch condition is based on the value of the "has + * returned" variable. In more complicated examples (blocks between |1| and + * |3|), the SSA would need to fixed up due the newly reconvergent path at the + * merge for |1|. Assuming |3| originally was also a return block, the old body + * of |3| should also store the return value for that case. The return value in + * |4| just requires loading the return value variable. + * + ******************************************************************************/ + +// Documented in optimizer.hpp +class MergeReturnPass : public MemPass { + public: + MergeReturnPass() + : function_(nullptr), + return_flag_(nullptr), + return_value_(nullptr), + constant_true_(nullptr), + final_return_block_(nullptr) {} + + const char* name() const override { return "merge-return"; } + Status Process(ir::IRContext*) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + // return ir::IRContext::kAnalysisDefUse; + return ir::IRContext::kAnalysisNone; + } + + private: + // This class is used to store the a loop merge instruction and a selection + // merge instruction. The intended use is that is represent the inner most + // contain selection construct and the inner most loop construct. + class StructuredControlState { + public: + StructuredControlState(ir::Instruction* loop, ir::Instruction* merge) + : loop_merge_(loop), current_merge_(merge) {} + + StructuredControlState(const StructuredControlState&) = default; + + bool InLoop() const { return loop_merge_; } + bool InStructuredFlow() const { return CurrentMergeId() != 0; } + + uint32_t CurrentMergeId() const { + return current_merge_ ? current_merge_->GetSingleWordInOperand(0u) : 0u; + } + + uint32_t CurrentMergeHeader() const { + return current_merge_ ? current_merge_->context() + ->get_instr_block(current_merge_) + ->id() + : 0; + } + + uint32_t LoopMergeId() const { + return loop_merge_ ? loop_merge_->GetSingleWordInOperand(0u) : 0u; + } + + uint32_t CurrentLoopHeader() const { + return loop_merge_ + ? loop_merge_->context()->get_instr_block(loop_merge_)->id() + : 0; + } + + ir::Instruction* LoopMergeInst() const { return loop_merge_; } + + private: + ir::Instruction* loop_merge_; + ir::Instruction* current_merge_; + }; + + // Returns all BasicBlocks terminated by OpReturn or OpReturnValue in + // |function|. + std::vector CollectReturnBlocks(ir::Function* function); + + // Creates a new basic block with a single return. If |function| returns a + // value, a phi node is created to select the correct value to return. + // Replaces old returns with an unconditional branch to the new block. + void MergeReturnBlocks(ir::Function* function, + const std::vector& returnBlocks); + + // Merges the return instruction in |function| so that it has a single return + // statement. It is assumed that |function| has structured control flow, and + // that |return_blocks| is a list of all of the basic blocks in |function| + // that have a return. + void ProcessStructured(ir::Function* function, + const std::vector& return_blocks); + + // Changes an OpReturn* or OpUnreachable instruction at the end of |block| + // into a store to |return_flag_|, a store to |return_value_| (if necessary), + // and a branch to the appropriate merge block. + // + // Is is assumed that |AddReturnValue| have already been called to created the + // variable to store a return value if there is one. + // + // Note this will break the semantics. To fix this, PredicateBlock will have + // to be called on the merge block the branch targets. + void ProcessStructuredBlock(ir::BasicBlock* block); + + // Creates a variable used to store whether or not the control flow has + // traversed a block that used to have a return. A pointer to the instruction + // declaring the variable is stored in |return_flag_|. + void AddReturnFlag(); + + // Creates the variable used to store the return value when passing through + // a block that use to contain an OpReturnValue. + void AddReturnValue(); + + // Adds a store that stores true to |return_flag_| immediately before the + // terminator of |block|. It is assumed that |AddReturnFlag| has already been + // called. + void RecordReturned(ir::BasicBlock* block); + + // Adds an instruction that stores the value being returned in the + // OpReturnValue in |block|. The value is stored to |return_value_|, and the + // store is placed before the OpReturnValue. + // + // If |block| does not contain an OpReturnValue, then this function has no + // effect. If |block| contains an OpReturnValue, then |AddReturnValue| must + // have already been called to create the variable to store to. + void RecordReturnValue(ir::BasicBlock* block); + + // Adds an unconditional branch in |block| that branches to |target|. It also + // adds stores to |return_flag_| and |return_value_| as needed. + // |AddReturnFlag| and |AddReturnValue| must have already been called. + void BranchToBlock(ir::BasicBlock* block, uint32_t target); + + // Returns true if we need to pridicate |block| where |tail_block| is the + // merge point. (See |PredicateBlocks|). There is no need to predicate if + // there is no code that could be executed. + bool RequiresPredication(const ir::BasicBlock* block, + const ir::BasicBlock* tail_block) const; + + // For every basic block that is reachable from a basic block in + // |return_blocks|, extra code is added to jump around any code that should + // not be executed because the original code would have already returned. This + // involves adding new selections constructs to jump around these + // instructions. + void PredicateBlocks(const std::vector& return_blocks); + + // Add the predication code (see |PredicateBlocks|) to |tail_block| if it + // requires predication. |tail_block| and any new blocks that are known to + // not require predication will be added to |predicated|. + void PredicateBlock(ir::BasicBlock* block, ir::BasicBlock* tail_block, + std::unordered_set* predicated); + + // Add an |OpReturn| or |OpReturnValue| to the end of |block|. If an + // |OpReturnValue| is needed, the return value is loaded from |return_value_|. + void CreateReturn(ir::BasicBlock* block); + + // Creates a block at the end of the function that will become the single + // return block at the end of the pass. + void CreateReturnBlock(); + + // Creates a Phi node in |merge_block| for the result of |inst| coming from + // |predecessor|. Any uses of the result of |inst| that are no longer + // dominated by |inst|, are replaced with the result of the new |OpPhi| + // instruction. + void CreatePhiNodesForInst(ir::BasicBlock* merge_block, uint32_t predecessor, + ir::Instruction& inst); + + // Traverse the nodes in |new_merge_nodes_|, and adds the OpPhi instructions + // that are needed to make the code correct. It is assumed that at this point + // there are no unreachable blocks in the control flow graph. + void AddNewPhiNodes(); + + // Creates any new phi nodes that are needed in |bb| now that |pred| is no + // longer the only block that preceedes |bb|. |header_id| is the id of the + // basic block for the loop or selection construct that merges at |bb|. + void AddNewPhiNodes(ir::BasicBlock* bb, ir::BasicBlock* pred, + uint32_t header_id); + + // Saves |block| to a list of basic block that will require OpPhi nodes to be + // added by calling |AddNewPhiNodes|. It is assumed that |block| used to have + // a single predecessor, |single_original_pred|, but now has more. + void MarkForNewPhiNodes(ir::BasicBlock* block, + ir::BasicBlock* single_original_pred); + + // Return the original single predcessor of |block| if it was flagged as + // having a single predecessor. |nullptr| is returned otherwise. + ir::BasicBlock* MarkedSinglePred(ir::BasicBlock* block) { + auto it = new_merge_nodes_.find(block); + if (it != new_merge_nodes_.end()) { + return it->second; + } else { + return nullptr; + } + } + + StructuredControlState& CurrentState() { return state_.back(); } + + // A stack used to keep track of the innermost contain loop and selection + // constructs. + std::vector state_; + + // The current function being transformed. + ir::Function* function_; + + // The |OpVariable| instruction defining a boolean variable used to keep track + // of whether or not the function is trying to return. + ir::Instruction* return_flag_; + + // The |OpVariable| instruction defining a variabled to used to keep track of + // the value that was returned when passing through a block that use to + // contain an |OpReturnValue|. + ir::Instruction* return_value_; + + // The instruction defining the boolean constant true. + ir::Instruction* constant_true_; + + // The basic block that is suppose to become the contain the only return value + // after processing the current function. + ir::BasicBlock* final_return_block_; + // This map contains the set of nodes that use to have a single predcessor, + // but now have more. They will need new OpPhi nodes. For each of the nodes, + // it is mapped to it original single predcessor. It is assumed there are no + // values that will need a phi on the new edges. + std::unordered_map new_merge_nodes_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_MERGE_RETURN_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.cpp index 1a869211f92baa661f5f6584299e4f1502ed4193..1e87c2c045056cb103a12fc1ae9bfe5edf6991d2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "operand.h" #include "reflect.h" @@ -24,45 +25,40 @@ namespace spvtools { namespace ir { std::vector Module::GetTypes() { - std::vector insts; - for (uint32_t i = 0; i < types_values_.size(); ++i) { - if (IsTypeInst(types_values_[i]->opcode())) - insts.push_back(types_values_[i].get()); + std::vector type_insts; + for (auto& inst : types_values_) { + if (IsTypeInst(inst.opcode())) type_insts.push_back(&inst); } - return insts; -}; + return type_insts; +} std::vector Module::GetTypes() const { - std::vector insts; - for (uint32_t i = 0; i < types_values_.size(); ++i) { - if (IsTypeInst(types_values_[i]->opcode())) - insts.push_back(types_values_[i].get()); + std::vector type_insts; + for (auto& inst : types_values_) { + if (IsTypeInst(inst.opcode())) type_insts.push_back(&inst); } - return insts; -}; + return type_insts; +} std::vector Module::GetConstants() { - std::vector insts; - for (uint32_t i = 0; i < types_values_.size(); ++i) { - if (IsConstantInst(types_values_[i]->opcode())) - insts.push_back(types_values_[i].get()); + std::vector const_insts; + for (auto& inst : types_values_) { + if (IsConstantInst(inst.opcode())) const_insts.push_back(&inst); } - return insts; -}; + return const_insts; +} std::vector Module::GetConstants() const { - std::vector insts; - for (uint32_t i = 0; i < types_values_.size(); ++i) { - if (IsConstantInst(types_values_[i]->opcode())) - insts.push_back(types_values_[i].get()); + std::vector const_insts; + for (auto& inst : types_values_) { + if (IsConstantInst(inst.opcode())) const_insts.push_back(&inst); } - return insts; -}; + return const_insts; +} uint32_t Module::GetGlobalValue(SpvOp opcode) const { - for (uint32_t i = 0; i < types_values_.size(); ++i) { - if (types_values_[i]->opcode() == opcode) - return types_values_[i]->result_id(); + for (auto& inst : types_values_) { + if (inst.opcode() == opcode) return inst.result_id(); } return 0; } @@ -70,37 +66,37 @@ uint32_t Module::GetGlobalValue(SpvOp opcode) const { void Module::AddGlobalValue(SpvOp opcode, uint32_t result_id, uint32_t type_id) { std::unique_ptr newGlobal( - new ir::Instruction(opcode, type_id, result_id, {})); + new ir::Instruction(context(), opcode, type_id, result_id, {})); AddGlobalValue(std::move(newGlobal)); } void Module::ForEachInst(const std::function& f, bool run_on_debug_line_insts) { -#define DELEGATE(i) i->ForEachInst(f, run_on_debug_line_insts) - for (auto& i : capabilities_) DELEGATE(i); - for (auto& i : extensions_) DELEGATE(i); - for (auto& i : ext_inst_imports_) DELEGATE(i); - if (memory_model_) DELEGATE(memory_model_); - for (auto& i : entry_points_) DELEGATE(i); - for (auto& i : execution_modes_) DELEGATE(i); - for (auto& i : debugs1_) DELEGATE(i); - for (auto& i : debugs2_) DELEGATE(i); - for (auto& i : debugs3_) DELEGATE(i); - for (auto& i : annotations_) DELEGATE(i); - for (auto& i : types_values_) DELEGATE(i); - for (auto& i : functions_) DELEGATE(i); +#define DELEGATE(list) list.ForEachInst(f, run_on_debug_line_insts) + DELEGATE(capabilities_); + DELEGATE(extensions_); + DELEGATE(ext_inst_imports_); + if (memory_model_) memory_model_->ForEachInst(f, run_on_debug_line_insts); + DELEGATE(entry_points_); + DELEGATE(execution_modes_); + DELEGATE(debugs1_); + DELEGATE(debugs2_); + DELEGATE(debugs3_); + DELEGATE(annotations_); + DELEGATE(types_values_); + for (auto& i : functions_) i->ForEachInst(f, run_on_debug_line_insts); #undef DELEGATE } void Module::ForEachInst(const std::function& f, bool run_on_debug_line_insts) const { -#define DELEGATE(i) \ - static_cast(i.get())->ForEachInst( \ - f, run_on_debug_line_insts) +#define DELEGATE(i) i.ForEachInst(f, run_on_debug_line_insts) for (auto& i : capabilities_) DELEGATE(i); for (auto& i : extensions_) DELEGATE(i); for (auto& i : ext_inst_imports_) DELEGATE(i); - if (memory_model_) DELEGATE(memory_model_); + if (memory_model_) + static_cast(memory_model_.get()) + ->ForEachInst(f, run_on_debug_line_insts); for (auto& i : entry_points_) DELEGATE(i); for (auto& i : execution_modes_) DELEGATE(i); for (auto& i : debugs1_) DELEGATE(i); @@ -145,9 +141,9 @@ uint32_t Module::ComputeIdBound() const { return highest + 1; } -bool Module::HasCapability(uint32_t cap) { +bool Module::HasExplicitCapability(uint32_t cap) { for (auto& ci : capabilities_) { - uint32_t tcap = ci->GetSingleWordOperand(0); + uint32_t tcap = ci.GetSingleWordOperand(0); if (tcap == cap) { return true; } @@ -157,11 +153,21 @@ bool Module::HasCapability(uint32_t cap) { uint32_t Module::GetExtInstImportId(const char* extstr) { for (auto& ei : ext_inst_imports_) - if (!strcmp(extstr, reinterpret_cast( - &ei->GetInOperand(0).words[0]))) - return ei->result_id(); + if (!strcmp(extstr, + reinterpret_cast(&(ei.GetInOperand(0).words[0])))) + return ei.result_id(); return 0; } +std::ostream& operator<<(std::ostream& str, const Module& module) { + module.ForEachInst([&str](const ir::Instruction* inst) { + str << *inst; + if (inst->opcode() != SpvOpFunctionEnd) { + str << std::endl; + } + }); + return str; +} + } // namespace ir } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.h index 0ce6398ba940be02f65b1e1026ee55a323cb81a9..163c4e30e0941277b922bccc41f71c6f7fe2f012 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/module.h @@ -27,6 +27,8 @@ namespace spvtools { namespace ir { +class IRContext; + // A struct for containing the module header information. struct ModuleHeader { uint32_t magic_number; @@ -42,47 +44,65 @@ class Module { public: using iterator = UptrVectorIterator; using const_iterator = UptrVectorIterator; - using inst_iterator = UptrVectorIterator; - using const_inst_iterator = UptrVectorIterator; + using inst_iterator = InstructionList::iterator; + using const_inst_iterator = InstructionList::const_iterator; // Creates an empty module with zero'd header. Module() : header_({}) {} // Sets the header to the given |header|. void SetHeader(const ModuleHeader& header) { header_ = header; } + // Sets the Id bound. void SetIdBound(uint32_t bound) { header_.bound = bound; } + // Returns the Id bound. uint32_t IdBound() { return header_.bound; } + + // Returns the current Id bound and increases it to the next available value. + uint32_t TakeNextIdBound() { return header_.bound++; } + // Appends a capability instruction to this module. inline void AddCapability(std::unique_ptr c); + // Appends an extension instruction to this module. inline void AddExtension(std::unique_ptr e); + // Appends an extended instruction set instruction to this module. inline void AddExtInstImport(std::unique_ptr e); + // Set the memory model for this module. inline void SetMemoryModel(std::unique_ptr m); + // Appends an entry point instruction to this module. inline void AddEntryPoint(std::unique_ptr e); + // Appends an execution mode instruction to this module. inline void AddExecutionMode(std::unique_ptr e); + // Appends a debug 1 instruction (excluding OpLine & OpNoLine) to this module. // "debug 1" instructions are the ones in layout section 7.a), see section // 2.4 Logical Layout of a Module from the SPIR-V specification. inline void AddDebug1Inst(std::unique_ptr d); + // Appends a debug 2 instruction (excluding OpLine & OpNoLine) to this module. // "debug 2" instructions are the ones in layout section 7.b), see section // 2.4 Logical Layout of a Module from the SPIR-V specification. inline void AddDebug2Inst(std::unique_ptr d); + // Appends a debug 3 instruction (OpModuleProcessed) to this module. // This is due to decision by the SPIR Working Group, pending publication. inline void AddDebug3Inst(std::unique_ptr d); + // Appends an annotation instruction to this module. inline void AddAnnotationInst(std::unique_ptr a); + // Appends a type-declaration instruction to this module. inline void AddType(std::unique_ptr t); + // Appends a constant, global variable, or OpUndef instruction to this module. inline void AddGlobalValue(std::unique_ptr v); + // Appends a function to this module. inline void AddFunction(std::unique_ptr f); @@ -119,7 +139,9 @@ class Module { // Return the memory model instruction contained inthis module. inline Instruction* GetMemoryModel() { return memory_model_.get(); } - inline const Instruction* GetMemoryModel() const { return memory_model_.get(); } + inline const Instruction* GetMemoryModel() const { + return memory_model_.get(); + } // There are several kinds of debug instructions, according to where they can // appear in the logical layout of a module: @@ -161,7 +183,11 @@ class Module { inline IteratorRange execution_modes() const; // Clears all debug instructions (excluding OpLine & OpNoLine). - void debug_clear() { debug1_clear(); debug2_clear(); debug3_clear(); } + void debug_clear() { + debug1_clear(); + debug2_clear(); + debug3_clear(); + } // Clears all debug 1 instructions (excluding OpLine & OpNoLine). void debug1_clear() { debugs1_.clear(); } @@ -193,6 +219,8 @@ class Module { // Iterators for functions contained in this module. iterator begin() { return iterator(&functions_, functions_.begin()); } iterator end() { return iterator(&functions_, functions_.end()); } + const_iterator begin() const { return cbegin(); } + const_iterator end() const { return cend(); } inline const_iterator cbegin() const; inline const_iterator cend() const; @@ -211,43 +239,53 @@ class Module { uint32_t ComputeIdBound() const; // Returns true if module has capability |cap| - bool HasCapability(uint32_t cap); + bool HasExplicitCapability(uint32_t cap); // Returns id for OpExtInst instruction for extension |extstr|. // Returns 0 if not found. uint32_t GetExtInstImportId(const char* extstr); + // Sets the associated context for this module + void SetContext(IRContext* c) { context_ = c; } + + // Gets the associated context for this module + IRContext* context() const { return context_; } + private: ModuleHeader header_; // Module header // The following fields respect the "Logical Layout of a Module" in // Section 2.4 of the SPIR-V specification. - std::vector> capabilities_; - std::vector> extensions_; - std::vector> ext_inst_imports_; + IRContext* context_; + InstructionList capabilities_; + InstructionList extensions_; + InstructionList ext_inst_imports_; // A module only has one memory model instruction. std::unique_ptr memory_model_; - std::vector> entry_points_; - std::vector> execution_modes_; - std::vector> debugs1_; - std::vector> debugs2_; - std::vector> debugs3_; - std::vector> annotations_; + InstructionList entry_points_; + InstructionList execution_modes_; + InstructionList debugs1_; + InstructionList debugs2_; + InstructionList debugs3_; + InstructionList annotations_; // Type declarations, constants, and global variable declarations. - std::vector> types_values_; + InstructionList types_values_; std::vector> functions_; }; +// Pretty-prints |module| to |str|. Returns |str|. +std::ostream& operator<<(std::ostream& str, const Module& module); + inline void Module::AddCapability(std::unique_ptr c) { - capabilities_.emplace_back(std::move(c)); + capabilities_.push_back(std::move(c)); } inline void Module::AddExtension(std::unique_ptr e) { - extensions_.emplace_back(std::move(e)); + extensions_.push_back(std::move(e)); } inline void Module::AddExtInstImport(std::unique_ptr e) { - ext_inst_imports_.emplace_back(std::move(e)); + ext_inst_imports_.push_back(std::move(e)); } inline void Module::SetMemoryModel(std::unique_ptr m) { @@ -255,35 +293,35 @@ inline void Module::SetMemoryModel(std::unique_ptr m) { } inline void Module::AddEntryPoint(std::unique_ptr e) { - entry_points_.emplace_back(std::move(e)); + entry_points_.push_back(std::move(e)); } inline void Module::AddExecutionMode(std::unique_ptr e) { - execution_modes_.emplace_back(std::move(e)); + execution_modes_.push_back(std::move(e)); } inline void Module::AddDebug1Inst(std::unique_ptr d) { - debugs1_.emplace_back(std::move(d)); + debugs1_.push_back(std::move(d)); } inline void Module::AddDebug2Inst(std::unique_ptr d) { - debugs2_.emplace_back(std::move(d)); + debugs2_.push_back(std::move(d)); } inline void Module::AddDebug3Inst(std::unique_ptr d) { - debugs3_.emplace_back(std::move(d)); + debugs3_.push_back(std::move(d)); } inline void Module::AddAnnotationInst(std::unique_ptr a) { - annotations_.emplace_back(std::move(a)); + annotations_.push_back(std::move(a)); } inline void Module::AddType(std::unique_ptr t) { - types_values_.emplace_back(std::move(t)); + types_values_.push_back(std::move(t)); } inline void Module::AddGlobalValue(std::unique_ptr v) { - types_values_.emplace_back(std::move(v)); + types_values_.push_back(std::move(v)); } inline void Module::AddFunction(std::unique_ptr f) { @@ -291,147 +329,137 @@ inline void Module::AddFunction(std::unique_ptr f) { } inline Module::inst_iterator Module::capability_begin() { - return inst_iterator(&capabilities_, capabilities_.begin()); + return capabilities_.begin(); } inline Module::inst_iterator Module::capability_end() { - return inst_iterator(&capabilities_, capabilities_.end()); + return capabilities_.end(); } inline IteratorRange Module::capabilities() { - return make_range(capabilities_); + return make_range(capabilities_.begin(), capabilities_.end()); } inline IteratorRange Module::capabilities() const { - return make_const_range(capabilities_); + return make_range(capabilities_.begin(), capabilities_.end()); } inline Module::inst_iterator Module::ext_inst_import_begin() { - return inst_iterator(&ext_inst_imports_, ext_inst_imports_.begin()); + return ext_inst_imports_.begin(); } inline Module::inst_iterator Module::ext_inst_import_end() { - return inst_iterator(&ext_inst_imports_, ext_inst_imports_.end()); + return ext_inst_imports_.end(); } inline IteratorRange Module::ext_inst_imports() { - return make_range(ext_inst_imports_); + return make_range(ext_inst_imports_.begin(), ext_inst_imports_.end()); } -inline IteratorRange Module::ext_inst_imports() const { - return make_const_range(ext_inst_imports_); +inline IteratorRange Module::ext_inst_imports() + const { + return make_range(ext_inst_imports_.begin(), ext_inst_imports_.end()); } -inline Module::inst_iterator Module::debug1_begin() { - return inst_iterator(&debugs1_, debugs1_.begin()); -} -inline Module::inst_iterator Module::debug1_end() { - return inst_iterator(&debugs1_, debugs1_.end()); -} +inline Module::inst_iterator Module::debug1_begin() { return debugs1_.begin(); } +inline Module::inst_iterator Module::debug1_end() { return debugs1_.end(); } inline IteratorRange Module::debugs1() { - return make_range(debugs1_); + return make_range(debugs1_.begin(), debugs1_.end()); } inline IteratorRange Module::debugs1() const { - return make_const_range(debugs1_); + return make_range(debugs1_.begin(), debugs1_.end()); } -inline Module::inst_iterator Module::debug2_begin() { - return inst_iterator(&debugs2_, debugs2_.begin()); -} -inline Module::inst_iterator Module::debug2_end() { - return inst_iterator(&debugs2_, debugs2_.end()); -} +inline Module::inst_iterator Module::debug2_begin() { return debugs2_.begin(); } +inline Module::inst_iterator Module::debug2_end() { return debugs2_.end(); } inline IteratorRange Module::debugs2() { - return make_range(debugs2_); + return make_range(debugs2_.begin(), debugs2_.end()); } inline IteratorRange Module::debugs2() const { - return make_const_range(debugs2_); + return make_range(debugs2_.begin(), debugs2_.end()); } -inline Module::inst_iterator Module::debug3_begin() { - return inst_iterator(&debugs3_, debugs3_.begin()); -} -inline Module::inst_iterator Module::debug3_end() { - return inst_iterator(&debugs3_, debugs3_.end()); -} +inline Module::inst_iterator Module::debug3_begin() { return debugs3_.begin(); } +inline Module::inst_iterator Module::debug3_end() { return debugs3_.end(); } inline IteratorRange Module::debugs3() { - return make_range(debugs3_); + return make_range(debugs3_.begin(), debugs3_.end()); } inline IteratorRange Module::debugs3() const { - return make_const_range(debugs3_); + return make_range(debugs3_.begin(), debugs3_.end()); } inline IteratorRange Module::entry_points() { - return make_range(entry_points_); + return make_range(entry_points_.begin(), entry_points_.end()); } inline IteratorRange Module::entry_points() const { - return make_const_range(entry_points_); + return make_range(entry_points_.begin(), entry_points_.end()); } inline Module::inst_iterator Module::execution_mode_begin() { - return inst_iterator(&execution_modes_, execution_modes_.begin()); + return execution_modes_.begin(); } inline Module::inst_iterator Module::execution_mode_end() { - return inst_iterator(&execution_modes_, execution_modes_.end()); + return execution_modes_.end(); } inline IteratorRange Module::execution_modes() { - return make_range(execution_modes_); + return make_range(execution_modes_.begin(), execution_modes_.end()); } -inline IteratorRange Module::execution_modes() const { - return make_const_range(execution_modes_); +inline IteratorRange Module::execution_modes() + const { + return make_range(execution_modes_.begin(), execution_modes_.end()); } inline Module::inst_iterator Module::annotation_begin() { - return inst_iterator(&annotations_, annotations_.begin()); + return annotations_.begin(); } inline Module::inst_iterator Module::annotation_end() { - return inst_iterator(&annotations_, annotations_.end()); + return annotations_.end(); } inline IteratorRange Module::annotations() { - return make_range(annotations_); + return make_range(annotations_.begin(), annotations_.end()); } inline IteratorRange Module::annotations() const { - return make_const_range(annotations_); + return make_range(annotations_.begin(), annotations_.end()); } inline Module::inst_iterator Module::extension_begin() { - return inst_iterator(&extensions_, extensions_.begin()); + return extensions_.begin(); } inline Module::inst_iterator Module::extension_end() { - return inst_iterator(&extensions_, extensions_.end()); + return extensions_.end(); } inline IteratorRange Module::extensions() { - return make_range(extensions_); + return make_range(extensions_.begin(), extensions_.end()); } inline IteratorRange Module::extensions() const { - return make_const_range(extensions_); + return make_range(extensions_.begin(), extensions_.end()); } inline Module::inst_iterator Module::types_values_begin() { - return inst_iterator(&types_values_, types_values_.begin()); + return types_values_.begin(); } inline Module::inst_iterator Module::types_values_end() { - return inst_iterator(&types_values_, types_values_.end()); + return types_values_.end(); } inline IteratorRange Module::types_values() { - return make_range(types_values_); + return make_range(types_values_.begin(), types_values_.end()); } inline IteratorRange Module::types_values() const { - return make_const_range(types_values_); + return make_range(types_values_.begin(), types_values_.end()); } inline Module::const_iterator Module::cbegin() const { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/null_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/null_pass.h index 832e891d9eea03d7cf8651085fac06e63b546fb2..54ea06e3571ef31f1a7dd27253e4b459e4332d54 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/null_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/null_pass.h @@ -25,7 +25,9 @@ namespace opt { class NullPass : public Pass { public: const char* name() const override { return "null"; } - Status Process(ir::Module*) override { return Status::SuccessWithoutChange; } + Status Process(ir::IRContext*) override { + return Status::SuccessWithoutChange; + } }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/optimizer.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/optimizer.cpp index 2fdfe21b783e69e3362acb3edc218d553ec92395..df59f2a0a06a307c2aa5e05858caded0f17d202c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/optimizer.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/optimizer.cpp @@ -18,6 +18,7 @@ #include "make_unique.h" #include "pass_manager.h" #include "passes.h" +#include "simplification_pass.h" namespace spvtools { @@ -66,56 +67,162 @@ Optimizer& Optimizer::RegisterPass(PassToken&& p) { return *this; } +// The legalization passes take a spir-v shader generated by an HLSL front-end +// and turn it into a valid vulkan spir-v shader. There are two ways in which +// the code will be invalid at the start: +// +// 1) There will be opaque objects, like images, which will be passed around +// in intermediate objects. Valid spir-v will have to replace the use of +// the opaque object with an intermediate object that is the result of the +// load of the global opaque object. +// +// 2) There will be variables that contain pointers to structured or uniform +// buffers. It be legal, the variables must be eliminated, and the +// references to the structured buffers must use the result of OpVariable +// in the Uniform storage class. +// +// Optimization in this list must accept shaders with these relaxation of the +// rules. There is not guarantee that this list of optimizations is able to +// legalize all inputs, but it is on a best effort basis. +// +// The legalization problem is essentially a very general copy propagation +// problem. The optimization we use are all used to either do copy propagation +// or enable more copy propagation. +Optimizer& Optimizer::RegisterLegalizationPasses() { + return + // Remove unreachable block so that merge return works. + RegisterPass(CreateDeadBranchElimPass()) + // Merge the returns so we can inline. + .RegisterPass(CreateMergeReturnPass()) + // Make sure uses and definitions are in the same function. + .RegisterPass(CreateInlineExhaustivePass()) + // Make private variable function scope + .RegisterPass(CreateEliminateDeadFunctionsPass()) + .RegisterPass(CreatePrivateToLocalPass()) + // Propagate the value stored to the loads in very simple cases. + .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) + .RegisterPass(CreateLocalSingleStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + // Split up aggragates so they are easier to deal with. + .RegisterPass(CreateScalarReplacementPass()) + // Remove loads and stores so everything is in intermediate values. + // Takes care of copy propagation of non-members. + .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) + .RegisterPass(CreateLocalSingleStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateLocalMultiStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + // Propagate constants to get as many constant conditions on branches + // as possible. + .RegisterPass(CreateCCPPass()) + .RegisterPass(CreateDeadBranchElimPass()) + // Copy propagate members. Cleans up code sequences generated by + // scalar replacement. Also important for removing OpPhi nodes. + .RegisterPass(CreateSimplificationPass()) + .RegisterPass(CreateInsertExtractElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateCopyPropagateArraysPass()) + // May need loop unrolling here see + // https://github.com/Microsoft/DirectXShaderCompiler/pull/930 + // Get rid of unused code that contain traces of illegal code + // or unused references to unbound external objects + .RegisterPass(CreateDeadInsertElimPass()) + .RegisterPass(CreateAggressiveDCEPass()); +} + Optimizer& Optimizer::RegisterPerformancePasses() { - return RegisterPass(CreateInlineExhaustivePass()) + return RegisterPass(CreateRemoveDuplicatesPass()) + .RegisterPass(CreateMergeReturnPass()) + .RegisterPass(CreateInlineExhaustivePass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) + .RegisterPass(CreateLocalSingleStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateScalarReplacementPass()) .RegisterPass(CreateLocalAccessChainConvertPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateLocalMultiStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateCCPPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateRedundancyEliminationPass()) .RegisterPass(CreateInsertExtractElimPass()) + .RegisterPass(CreateDeadInsertElimPass()) + .RegisterPass(CreateDeadBranchElimPass()) + .RegisterPass(CreateSimplificationPass()) + .RegisterPass(CreateIfConversionPass()) + .RegisterPass(CreateCopyPropagateArraysPass()) .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateBlockMergePass()) + .RegisterPass(CreateRedundancyEliminationPass()) .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateBlockMergePass()) - .RegisterPass(CreateLocalMultiStoreElimPass()) - .RegisterPass(CreateInsertExtractElimPass()) - .RegisterPass(CreateCommonUniformElimPass()) - .RegisterPass(CreateDeadVariableEliminationPass()); + .RegisterPass(CreateInsertExtractElimPass()); + // Currently exposing driver bugs resulting in crashes (#946) + // .RegisterPass(CreateCommonUniformElimPass()) } Optimizer& Optimizer::RegisterSizePasses() { - return RegisterPass(CreateInlineExhaustivePass()) + return RegisterPass(CreateRemoveDuplicatesPass()) + .RegisterPass(CreateMergeReturnPass()) + .RegisterPass(CreateInlineExhaustivePass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateScalarReplacementPass()) .RegisterPass(CreateLocalAccessChainConvertPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) .RegisterPass(CreateInsertExtractElimPass()) + .RegisterPass(CreateDeadInsertElimPass()) + .RegisterPass(CreateLocalMultiStoreElimPass()) + .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateCCPPass()) .RegisterPass(CreateAggressiveDCEPass()) .RegisterPass(CreateDeadBranchElimPass()) + .RegisterPass(CreateIfConversionPass()) + .RegisterPass(CreateAggressiveDCEPass()) .RegisterPass(CreateBlockMergePass()) - .RegisterPass(CreateLocalMultiStoreElimPass()) .RegisterPass(CreateInsertExtractElimPass()) - .RegisterPass(CreateCommonUniformElimPass()) - .RegisterPass(CreateDeadVariableEliminationPass()); + .RegisterPass(CreateDeadInsertElimPass()) + .RegisterPass(CreateRedundancyEliminationPass()) + .RegisterPass(CreateCFGCleanupPass()) + // Currently exposing driver bugs resulting in crashes (#946) + // .RegisterPass(CreateCommonUniformElimPass()) + .RegisterPass(CreateAggressiveDCEPass()); } bool Optimizer::Run(const uint32_t* original_binary, const size_t original_binary_size, std::vector* optimized_binary) const { - std::unique_ptr module = + std::unique_ptr context = BuildModule(impl_->target_env, impl_->pass_manager.consumer(), original_binary, original_binary_size); - if (module == nullptr) return false; + if (context == nullptr) return false; - auto status = impl_->pass_manager.Run(module.get()); + auto status = impl_->pass_manager.Run(context.get()); if (status == opt::Pass::Status::SuccessWithChange || (status == opt::Pass::Status::SuccessWithoutChange && (optimized_binary->data() != original_binary || optimized_binary->size() != original_binary_size))) { optimized_binary->clear(); - module->ToBinary(optimized_binary, /* skip_nop = */ true); + context->module()->ToBinary(optimized_binary, /* skip_nop = */ true); } return status != opt::Pass::Status::Failure; } +Optimizer& Optimizer::SetPrintAll(std::ostream* out) { + impl_->pass_manager.SetPrintAll(out); + return *this; +} + +Optimizer& Optimizer::SetTimeReport(std::ostream* out) { + impl_->pass_manager.SetTimeReport(out); + return *this; +} + Optimizer::PassToken CreateNullPass() { return MakeUnique(MakeUnique()); } @@ -125,6 +232,11 @@ Optimizer::PassToken CreateStripDebugInfoPass() { MakeUnique()); } +Optimizer::PassToken CreateStripReflectInfoPass() { + return MakeUnique( + MakeUnique()); +} + Optimizer::PassToken CreateEliminateDeadFunctionsPass() { return MakeUnique( MakeUnique()); @@ -212,6 +324,11 @@ Optimizer::PassToken CreateInsertExtractElimPass() { MakeUnique()); } +Optimizer::PassToken CreateDeadInsertElimPass() { + return MakeUnique( + MakeUnique()); +} + Optimizer::PassToken CreateDeadBranchElimPass() { return MakeUnique( MakeUnique()); @@ -237,6 +354,11 @@ Optimizer::PassToken CreateCompactIdsPass() { MakeUnique()); } +Optimizer::PassToken CreateMergeReturnPass() { + return MakeUnique( + MakeUnique()); +} + std::vector Optimizer::GetPassNames() const { std::vector v; for (uint32_t i = 0; i < impl_->pass_manager.NumPasses(); i++) { @@ -250,4 +372,82 @@ Optimizer::PassToken CreateCFGCleanupPass() { MakeUnique()); } +Optimizer::PassToken CreateLocalRedundancyEliminationPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateLoopInvariantCodeMotionPass() { + return MakeUnique(MakeUnique()); +} + +Optimizer::PassToken CreateLoopPeelingPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateLoopUnswitchPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateRedundancyEliminationPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateRemoveDuplicatesPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateScalarReplacementPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreatePrivateToLocalPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateCCPPass() { + return MakeUnique(MakeUnique()); +} + +Optimizer::PassToken CreateWorkaround1209Pass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateIfConversionPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateReplaceInvalidOpcodePass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateSimplificationPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateLoopUnrollPass(bool fully_unroll, int factor) { + return MakeUnique( + MakeUnique(fully_unroll, factor)); +} + +Optimizer::PassToken CreateSSARewritePass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateCopyPropagateArraysPass() { + return MakeUnique( + MakeUnique()); +} + } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.cpp index c9d7c11ff08f0557f9b5605b8c4ee3dd5d493f19..bceeba0c464d2985685999afd71e92bb86709c91 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.cpp @@ -24,9 +24,12 @@ namespace opt { namespace { const uint32_t kEntryPointFunctionIdInIdx = 1; +const uint32_t kTypePointerTypeIdInIdx = 1; } // namespace +Pass::Pass() : consumer_(nullptr), context_(nullptr), already_run_(false) {} + void Pass::AddCalls(ir::Function* func, std::queue* todo) { for (auto bi = func->begin(); bi != func->end(); ++bi) for (auto ii = bi->begin(); ii != bi->end(); ++ii) @@ -46,20 +49,21 @@ bool Pass::ProcessEntryPointCallTree(ProcessFunction& pfn, ir::Module* module) { return ProcessCallTreeFromRoots(pfn, id2function, &roots); } -bool Pass::ProcessReachableCallTree(ProcessFunction& pfn, ir::Module* module) { +bool Pass::ProcessReachableCallTree(ProcessFunction& pfn, + ir::IRContext* irContext) { // Map from function's result id to function std::unordered_map id2function; - for (auto& fn : *module) id2function[fn.result_id()] = &fn; + for (auto& fn : *irContext->module()) id2function[fn.result_id()] = &fn; std::queue roots; // Add all entry points since they can be reached from outside the module. - for (auto& e : module->entry_points()) + for (auto& e : irContext->module()->entry_points()) roots.push(e.GetSingleWordInOperand(kEntryPointFunctionIdInIdx)); // Add all exported functions since they can be reached from outside the // module. - for (auto& a : module->annotations()) { + for (auto& a : irContext->annotations()) { // TODO: Handle group decorations as well. Currently not generate by any // front-end, but could be coming. if (a.opcode() == SpvOp::SpvOpDecorate) { @@ -97,6 +101,26 @@ bool Pass::ProcessCallTreeFromRoots( } return modified; } + +Pass::Status Pass::Run(ir::IRContext* ctx) { + if (already_run_) { + return Status::Failure; + } + already_run_ = true; + + Pass::Status status = Process(ctx); + if (status == Status::SuccessWithChange) { + ctx->InvalidateAnalysesExceptFor(GetPreservedAnalyses()); + } + assert(ctx->IsConsistent()); + return status; +} + +uint32_t Pass::GetPointeeTypeId(const ir::Instruction* ptrInst) const { + const uint32_t ptrTypeId = ptrInst->type_id(); + const ir::Instruction* ptrTypeInst = get_def_use_mgr()->GetDef(ptrTypeId); + return ptrTypeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx); +} + } // namespace opt } // namespace spvtools - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.h index ee04ae5d5622bf8375036d7fb12e86f40c8ad1c5..468b537662168e321ca6c7c5d2019450757365ce 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass.h @@ -20,9 +20,11 @@ #include #include #include - #include +#include "basic_block.h" +#include "def_use_manager.h" +#include "ir_context.h" #include "module.h" #include "spirv-tools/libspirv.hpp" @@ -50,7 +52,7 @@ class Pass { // The constructed instance will have an empty message consumer, which just // ignores all messages from the library. Use SetMessageConsumer() to supply // one if messages are of concern. - Pass() : consumer_(nullptr) {} + Pass(); // Destructs the pass. virtual ~Pass() = default; @@ -66,9 +68,33 @@ class Pass { // Sets the message consumer to the given |consumer|. |consumer| which will be // invoked every time there is a message to be communicated to the outside. void SetMessageConsumer(MessageConsumer c) { consumer_ = std::move(c); } + // Returns the reference to the message consumer for this pass. const MessageConsumer& consumer() const { return consumer_; } + // Returns the def-use manager used for this pass. TODO(dnovillo): This should + // be handled by the pass manager. + analysis::DefUseManager* get_def_use_mgr() const { + return context()->get_def_use_mgr(); + } + + analysis::DecorationManager* get_decoration_mgr() const { + return context()->get_decoration_mgr(); + } + + FeatureManager* get_feature_mgr() const { + return context()->get_feature_mgr(); + } + + // Returns a pointer to the current module for this pass. + ir::Module* get_module() const { return context_->module(); } + + // Returns a pointer to the current context for this pass. + ir::IRContext* context() const { return context_; } + + // Returns a pointer to the CFG for current module. + ir::CFG* cfg() const { return context()->cfg(); } + // Add to |todo| all ids of functions called in |func|. void AddCalls(ir::Function* func, std::queue* todo); @@ -80,7 +106,7 @@ class Pass { // Applies |pfn| to every function in the call trees rooted at the entry // points and exported functions. Returns true if any call |pfn| returns // true. By convention |pfn| should return true if it modified the module. - bool ProcessReachableCallTree(ProcessFunction& pfn, ir::Module* module); + bool ProcessReachableCallTree(ProcessFunction& pfn, ir::IRContext* irContext); // Applies |pfn| to every function in the call trees rooted at the elements of // |roots|. Returns true if any call to |pfn| returns true. By convention @@ -91,13 +117,47 @@ class Pass { const std::unordered_map& id2function, std::queue* roots); + // Run the pass on the given |module|. Returns Status::Failure if errors occur + // when processing. Returns the corresponding Status::Success if processing is + // successful to indicate whether changes are made to the module. If there + // were any changes it will also invalidate the analyses in the IRContext + // that are not preserved. + // + // It is an error if |Run| is called twice with the same instance of the pass. + // If this happens the return value will be |Failure|. + virtual Status Run(ir::IRContext* ctx) final; + + // Returns the set of analyses that the pass is guaranteed to preserve. + virtual ir::IRContext::Analysis GetPreservedAnalyses() { + return ir::IRContext::kAnalysisNone; + } + + // Return type id for |ptrInst|'s pointee + uint32_t GetPointeeTypeId(const ir::Instruction* ptrInst) const; + + protected: + // Initialize basic data structures for the pass. This sets up the def-use + // manager, module and other attributes. + virtual void InitializeProcessing(ir::IRContext* c) { context_ = c; } + // Processes the given |module|. Returns Status::Failure if errors occur when // processing. Returns the corresponding Status::Success if processing is // succesful to indicate whether changes are made to the module. - virtual Status Process(ir::Module* module) = 0; + virtual Status Process(ir::IRContext* context) = 0; + + // Return the next available SSA id and increment it. + uint32_t TakeNextId() { return context_->TakeNextId(); } private: MessageConsumer consumer_; // Message consumer. + + // The context that this pass belongs to. + ir::IRContext* context_; + + // An instance of a pass can only be run once because it is too hard to + // enforce proper resetting of internal state for each instance. This member + // is used to check that we do not run the same instance twice. + bool already_run_; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.cpp index 2def7bb08209340bae0599bc600ee99e68e5409b..45c9c04afd7e63da039dea56739f3c3a1285e43f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.cpp @@ -14,19 +14,53 @@ #include "pass_manager.h" +#include +#include + +#include "ir_context.h" +#include "spirv-tools/libspirv.hpp" +#include "util/timer.h" + namespace spvtools { + namespace opt { -Pass::Status PassManager::Run(ir::Module* module) { +Pass::Status PassManager::Run(ir::IRContext* context) { auto status = Pass::Status::SuccessWithoutChange; - for (const auto& pass : passes_) { - const auto one_status = pass->Process(module); + + // If print_all_stream_ is not null, prints the disassembly of the module + // to that stream, with the given preamble and optionally the pass name. + auto print_disassembly = [&context, this](const char* preamble, Pass* pass) { + if (print_all_stream_) { + std::vector binary; + context->module()->ToBinary(&binary, false); + SpirvTools t(SPV_ENV_UNIVERSAL_1_2); + std::string disassembly; + t.Disassemble(binary, &disassembly, 0); + *print_all_stream_ << preamble << (pass ? pass->name() : "") << "\n" + << disassembly << std::endl; + } + }; + + SPIRV_TIMER_DESCRIPTION(time_report_stream_, /* measure_mem_usage = */ true); + for (auto& pass : passes_) { + print_disassembly("; IR before pass ", pass.get()); + SPIRV_TIMER_SCOPED(time_report_stream_, (pass ? pass->name() : ""), true); + const auto one_status = pass->Run(context); if (one_status == Pass::Status::Failure) return one_status; if (one_status == Pass::Status::SuccessWithChange) status = one_status; + + // Reset the pass to free any memory used by the pass. + pass.reset(nullptr); } + print_disassembly("; IR after last pass", nullptr); + // Set the Id bound in the header in case a pass forgot to do so. + // + // TODO(dnovillo): This should be unnecessary and automatically maintained by + // the IRContext. if (status == Pass::Status::SuccessWithChange) { - module->SetIdBound(module->ComputeIdBound()); + context->module()->SetIdBound(context->module()->ComputeIdBound()); } passes_.clear(); return status; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.h index 2cf91590459517e74c44c9f4d4660b697c0c34c4..da3620a9e3b2007d3bc7d6cb381ebbad480e4ec3 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/pass_manager.h @@ -16,12 +16,14 @@ #define LIBSPIRV_OPT_PASS_MANAGER_H_ #include +#include #include #include "log.h" #include "module.h" #include "pass.h" +#include "ir_context.h" #include "spirv-tools/libspirv.hpp" namespace spvtools { @@ -37,7 +39,10 @@ class PassManager { // The constructed instance will have an empty message consumer, which just // ignores all messages from the library. Use SetMessageConsumer() to supply // one if messages are of concern. - PassManager() : consumer_(nullptr) {} + PassManager() + : consumer_(nullptr), + print_all_stream_(nullptr), + time_report_stream_(nullptr) {} // Sets the message consumer to the given |consumer|. void SetMessageConsumer(MessageConsumer c) { consumer_ = std::move(c); } @@ -65,13 +70,35 @@ class PassManager { // whether changes are made to the module. // // After running all the passes, they are removed from the list. - Pass::Status Run(ir::Module* module); + Pass::Status Run(ir::IRContext* context); + + // Sets the option to print the disassembly before each pass and after the + // last pass. Output is written to |out| if that is not null. No output + // is generated if |out| is null. + PassManager& SetPrintAll(std::ostream* out) { + print_all_stream_ = out; + return *this; + } + + // Sets the option to print the resource utilization of each pass. Output is + // written to |out| if that is not null. No output is generated if |out| is + // null. + PassManager& SetTimeReport(std::ostream* out) { + time_report_stream_ = out; + return *this; + } private: // Consumer for messages. MessageConsumer consumer_; // A vector of passes. Order matters. std::vector> passes_; + // The output stream to write disassembly to before each pass, and after + // the last pass. If this is null, no output is generated. + std::ostream* print_all_stream_; + // The output stream to write the resource utilization of each pass. If this + // is null, no output is generated. + std::ostream* time_report_stream_; }; inline void PassManager::AddPass(std::unique_ptr pass) { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/passes.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/passes.h index 657f494567431fb845c7fd729cc5c331566cf98d..9d14335343430da535070ace10037880bb806653 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/passes.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/passes.h @@ -17,29 +17,46 @@ // A single header to include all passes. +#include "aggressive_dead_code_elim_pass.h" #include "block_merge_pass.h" +#include "ccp_pass.h" #include "cfg_cleanup_pass.h" #include "common_uniform_elim_pass.h" #include "compact_ids_pass.h" +#include "copy_prop_arrays.h" #include "dead_branch_elim_pass.h" +#include "dead_insert_elim_pass.h" #include "dead_variable_elimination.h" #include "eliminate_dead_constant_pass.h" +#include "eliminate_dead_functions_pass.h" #include "flatten_decoration_pass.h" #include "fold_spec_constant_op_and_composite_pass.h" +#include "freeze_spec_constant_value_pass.h" +#include "if_conversion.h" #include "inline_exhaustive_pass.h" #include "inline_opaque_pass.h" #include "insert_extract_elim.h" +#include "licm_pass.h" +#include "local_access_chain_convert_pass.h" +#include "local_redundancy_elimination.h" #include "local_single_block_elim_pass.h" #include "local_single_store_elim_pass.h" #include "local_ssa_elim_pass.h" -#include "freeze_spec_constant_value_pass.h" -#include "local_access_chain_convert_pass.h" -#include "aggressive_dead_code_elim_pass.h" +#include "loop_peeling.h" +#include "loop_unroller.h" +#include "loop_unswitch_pass.h" +#include "merge_return_pass.h" #include "null_pass.h" +#include "private_to_local_pass.h" +#include "redundancy_elimination.h" +#include "remove_duplicates_pass.h" +#include "replace_invalid_opc.h" +#include "scalar_replacement_pass.h" #include "set_spec_constant_default_value_pass.h" +#include "ssa_rewrite_pass.h" #include "strength_reduction_pass.h" #include "strip_debug_info_pass.h" +#include "strip_reflect_info_pass.h" #include "unify_const_pass.h" -#include "eliminate_dead_functions_pass.h" - +#include "workaround1209.h" #endif // LIBSPIRV_OPT_PASSES_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc8ef53c13f92c60dcd507ca73f570468cfe012a --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.cpp @@ -0,0 +1,181 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "private_to_local_pass.h" + +#include "ir_context.h" + +namespace { +const uint32_t kVariableStorageClassInIdx = 0; +const uint32_t kSpvTypePointerTypeIdInIdx = 1; +} // namespace + +namespace spvtools { +namespace opt { + +Pass::Status PrivateToLocalPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; + + // Private variables require the shader capability. If this is not a shader, + // there is no work to do. + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) + return Status::SuccessWithoutChange; + + std::vector> variables_to_move; + for (auto& inst : context()->types_values()) { + if (inst.opcode() != SpvOpVariable) { + continue; + } + + if (inst.GetSingleWordInOperand(kVariableStorageClassInIdx) != + SpvStorageClassPrivate) { + continue; + } + + ir::Function* target_function = FindLocalFunction(inst); + if (target_function != nullptr) { + variables_to_move.push_back({&inst, target_function}); + } + } + + modified = !variables_to_move.empty(); + for (auto p : variables_to_move) { + MoveVariable(p.first, p.second); + } + + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +ir::Function* PrivateToLocalPass::FindLocalFunction( + const ir::Instruction& inst) const { + bool found_first_use = false; + ir::Function* target_function = nullptr; + context()->get_def_use_mgr()->ForEachUser( + inst.result_id(), + [&target_function, &found_first_use, this](ir::Instruction* use) { + ir::BasicBlock* current_block = context()->get_instr_block(use); + if (current_block == nullptr) { + return; + } + + if (!IsValidUse(use)) { + found_first_use = true; + target_function = nullptr; + return; + } + ir::Function* current_function = current_block->GetParent(); + if (!found_first_use) { + found_first_use = true; + target_function = current_function; + } else if (target_function != current_function) { + target_function = nullptr; + } + }); + return target_function; +} // namespace opt + +void PrivateToLocalPass::MoveVariable(ir::Instruction* variable, + ir::Function* function) { + // The variable needs to be removed from the global section, and placed in the + // header of the function. First step remove from the global list. + variable->RemoveFromList(); + std::unique_ptr var(variable); // Take ownership. + context()->ForgetUses(variable); + + // Update the storage class of the variable. + variable->SetInOperand(kVariableStorageClassInIdx, {SpvStorageClassFunction}); + + // Update the type as well. + uint32_t new_type_id = GetNewType(variable->type_id()); + variable->SetResultType(new_type_id); + + // Place the variable at the start of the first basic block. + context()->AnalyzeUses(variable); + function->begin()->begin()->InsertBefore(move(var)); + + // Update uses where the type may have changed. + UpdateUses(variable->result_id()); +} + +uint32_t PrivateToLocalPass::GetNewType(uint32_t old_type_id) { + auto type_mgr = context()->get_type_mgr(); + ir::Instruction* old_type_inst = get_def_use_mgr()->GetDef(old_type_id); + uint32_t pointee_type_id = + old_type_inst->GetSingleWordInOperand(kSpvTypePointerTypeIdInIdx); + uint32_t new_type_id = + type_mgr->FindPointerToType(pointee_type_id, SpvStorageClassFunction); + return new_type_id; +} + +bool PrivateToLocalPass::IsValidUse(const ir::Instruction* inst) const { + // The cases in this switch have to match the cases in |UpdateUse|. + // If we don't know how to update it, it is not valid. + switch (inst->opcode()) { + case SpvOpLoad: + case SpvOpStore: + case SpvOpImageTexelPointer: // Treat like a load + return true; + case SpvOpAccessChain: + return context()->get_def_use_mgr()->WhileEachUser( + inst, [this](const ir::Instruction* user) { + if (!IsValidUse(user)) return false; + return true; + }); + case SpvOpName: + return true; + default: + return spvOpcodeIsDecoration(inst->opcode()); + } +} + +void PrivateToLocalPass::UpdateUse(ir::Instruction* inst) { + // The cases in this switch have to match the cases in |IsValidUse|. If we + // don't think it is valid, the optimization will not view the variable as a + // candidate, and therefore the use will not be updated. + switch (inst->opcode()) { + case SpvOpLoad: + case SpvOpStore: + case SpvOpImageTexelPointer: // Treat like a load + // The type is fine because it is the type pointed to, and that does not + // change. + break; + case SpvOpAccessChain: + context()->ForgetUses(inst); + inst->SetResultType(GetNewType(inst->type_id())); + context()->AnalyzeUses(inst); + + // Update uses where the type may have changed. + UpdateUses(inst->result_id()); + break; + case SpvOpName: + break; + default: + assert(spvOpcodeIsDecoration(inst->opcode()) && + "Do not know how to update the type for this instruction."); + break; + } +} +void PrivateToLocalPass::UpdateUses(uint32_t id) { + std::vector uses; + this->context()->get_def_use_mgr()->ForEachUser( + id, [&uses](ir::Instruction* use) { uses.push_back(use); }); + + for (ir::Instruction* use : uses) { + UpdateUse(use); + } +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..89cd994f1a9ad1e105e9bae0c25f3c92ec40a721 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/private_to_local_pass.h @@ -0,0 +1,71 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_PRIVATE_TO_LOCAL_PASS_H_ +#define LIBSPIRV_OPT_PRIVATE_TO_LOCAL_PASS_H_ + +#include "ir_context.h" +#include "pass.h" + +namespace spvtools { +namespace opt { + +// This pass implements total redundancy elimination. This is the same as +// local redundancy elimination except it looks across basic block boundaries. +// An instruction, inst, is totally redundant if there is another instruction +// that dominates inst, and also computes the same value. +class PrivateToLocalPass : public Pass { + public: + const char* name() const override { return "private-to-local"; } + Status Process(ir::IRContext*) override; + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisDecorations | + ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisNameMap; + } + + private: + // Moves |variable| from the private storage class to the function storage + // class of |function|. + void MoveVariable(ir::Instruction* variable, ir::Function* function); + + // |inst| is an instruction declaring a varible. If that variable is + // referenced in a single function and all of uses are valid as defined by + // |IsValidUse|, then that function is returned. Otherwise, the return + // value is |nullptr|. + ir::Function* FindLocalFunction(const ir::Instruction& inst) const; + + // Returns true is |inst| is a valid use of a pointer. In this case, a + // valid use is one where the transformation is able to rewrite the type to + // match a change in storage class of the original variable. + bool IsValidUse(const ir::Instruction* inst) const; + + // Given the result id of a pointer type, |old_type_id|, this function + // returns the id of a the same pointer type except the storage class has + // been changed to function. If the type does not already exist, it will be + // created. + uint32_t GetNewType(uint32_t old_type_id); + + // Updates |inst|, and any instruction dependent on |inst|, to reflect the + // change of the base pointer now pointing to the function storage class. + void UpdateUse(ir::Instruction* inst); + void UpdateUses(uint32_t id); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_PRIVATE_TO_LOCAL_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5d76127ae59fbabc76222936527c5fbbb26f9e6 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.cpp @@ -0,0 +1,291 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "propagator.h" + +namespace spvtools { +namespace opt { + +void SSAPropagator::AddControlEdge(const Edge& edge) { + ir::BasicBlock* dest_bb = edge.dest; + + // Refuse to add the exit block to the work list. + if (dest_bb == ctx_->cfg()->pseudo_exit_block()) { + return; + } + + // Try to mark the edge executable. If it was already in the set of + // executable edges, do nothing. + if (!MarkEdgeExecutable(edge)) { + return; + } + + // If the edge had not already been marked executable, add the destination + // basic block to the work list. + blocks_.push(dest_bb); +} + +void SSAPropagator::AddSSAEdges(ir::Instruction* instr) { + // Ignore instructions that produce no result. + if (instr->result_id() == 0) { + return; + } + + get_def_use_mgr()->ForEachUser( + instr->result_id(), [this](ir::Instruction* use_instr) { + // If the basic block for |use_instr| has not been simulated yet, do + // nothing. The instruction |use_instr| will be simulated next time the + // block is scheduled. + if (!BlockHasBeenSimulated(ctx_->get_instr_block(use_instr))) { + return; + } + + if (ShouldSimulateAgain(use_instr)) { + ssa_edge_uses_.push(use_instr); + } + }); +} + +bool SSAPropagator::IsPhiArgExecutable(ir::Instruction* phi, uint32_t i) const { + ir::BasicBlock* phi_bb = ctx_->get_instr_block(phi); + + uint32_t in_label_id = phi->GetSingleWordOperand(i + 1); + ir::Instruction* in_label_instr = get_def_use_mgr()->GetDef(in_label_id); + ir::BasicBlock* in_bb = ctx_->get_instr_block(in_label_instr); + + return IsEdgeExecutable(Edge(in_bb, phi_bb)); +} + +bool SSAPropagator::SetStatus(ir::Instruction* inst, PropStatus status) { + bool has_old_status = false; + PropStatus old_status = kVarying; + if (HasStatus(inst)) { + has_old_status = true; + old_status = Status(inst); + } + + assert((!has_old_status || old_status <= status) && + "Invalid lattice transition"); + + bool status_changed = !has_old_status || (old_status != status); + if (status_changed) statuses_[inst] = status; + + return status_changed; +} + +bool SSAPropagator::Simulate(ir::Instruction* instr) { + bool changed = false; + + // Don't bother visiting instructions that should not be simulated again. + if (!ShouldSimulateAgain(instr)) { + return changed; + } + + ir::BasicBlock* dest_bb = nullptr; + PropStatus status = visit_fn_(instr, &dest_bb); + bool status_changed = SetStatus(instr, status); + + if (status == kVarying) { + // The statement produces a varying result, add it to the list of statements + // not to simulate anymore and add its SSA def-use edges for simulation. + DontSimulateAgain(instr); + if (status_changed) { + AddSSAEdges(instr); + } + + // If |instr| is a block terminator, add all the control edges out of its + // block. + if (instr->IsBlockTerminator()) { + ir::BasicBlock* block = ctx_->get_instr_block(instr); + for (const auto& e : bb_succs_.at(block)) { + AddControlEdge(e); + } + } + return false; + } else if (status == kInteresting) { + // Add the SSA edges coming out of this instruction if the propagation + // status has changed. + if (status_changed) { + AddSSAEdges(instr); + } + + // If there are multiple outgoing control flow edges and we know which one + // will be taken, add the destination block to the CFG work list. + if (dest_bb) { + AddControlEdge(Edge(ctx_->get_instr_block(instr), dest_bb)); + } + changed = true; + } + + // At this point, we are dealing with instructions that are in status + // kInteresting or kNotInteresting. To decide whether this instruction should + // be simulated again, we examine its operands. If at least one operand O is + // defined at an instruction D that should be simulated again, then the output + // of D might affect |instr|, so we should simulate |instr| again. + bool has_operands_to_simulate = false; + if (instr->opcode() == SpvOpPhi) { + // For Phi instructions, an operand causes the Phi to be simulated again if + // the operand comes from an edge that has not yet been traversed or if its + // definition should be simulated again. + for (uint32_t i = 2; i < instr->NumOperands(); i += 2) { + // Phi arguments come in pairs. Index 'i' contains the + // variable id, index 'i + 1' is the originating block id. + assert(i % 2 == 0 && i < instr->NumOperands() - 1 && + "malformed Phi arguments"); + + uint32_t arg_id = instr->GetSingleWordOperand(i); + ir::Instruction* arg_def_instr = get_def_use_mgr()->GetDef(arg_id); + if (!IsPhiArgExecutable(instr, i) || ShouldSimulateAgain(arg_def_instr)) { + has_operands_to_simulate = true; + break; + } + } + } else { + // For regular instructions, check if the defining instruction of each + // operand needs to be simulated again. If so, then this instruction should + // also be simulated again. + has_operands_to_simulate = + !instr->WhileEachInId([this](const uint32_t* use) { + ir::Instruction* def_instr = get_def_use_mgr()->GetDef(*use); + if (ShouldSimulateAgain(def_instr)) { + return false; + } + return true; + }); + } + + if (!has_operands_to_simulate) { + DontSimulateAgain(instr); + } + + return changed; +} + +bool SSAPropagator::Simulate(ir::BasicBlock* block) { + if (block == ctx_->cfg()->pseudo_exit_block()) { + return false; + } + + // Always simulate Phi instructions, even if we have simulated this block + // before. We do this because Phi instructions receive their inputs from + // incoming edges. When those edges are marked executable, the corresponding + // operand can be simulated. + bool changed = false; + block->ForEachPhiInst( + [&changed, this](ir::Instruction* instr) { changed |= Simulate(instr); }); + + // If this is the first time this block is being simulated, simulate every + // statement in it. + if (!BlockHasBeenSimulated(block)) { + block->ForEachInst([this, &changed](ir::Instruction* instr) { + if (instr->opcode() != SpvOpPhi) { + changed |= Simulate(instr); + } + }); + + MarkBlockSimulated(block); + + // If this block has exactly one successor, mark the edge to its successor + // as executable. + if (bb_succs_.at(block).size() == 1) { + AddControlEdge(bb_succs_.at(block).at(0)); + } + } + + return changed; +} + +void SSAPropagator::Initialize(ir::Function* fn) { + // Compute predecessor and successor blocks for every block in |fn|'s CFG. + // TODO(dnovillo): Move this to ir::CFG and always build them. Alternately, + // move it to IRContext and build CFG preds/succs on-demand. + bb_succs_[ctx_->cfg()->pseudo_entry_block()].push_back( + Edge(ctx_->cfg()->pseudo_entry_block(), fn->entry().get())); + + for (auto& block : *fn) { + const auto& const_block = block; + const_block.ForEachSuccessorLabel([this, &block](const uint32_t label_id) { + ir::BasicBlock* succ_bb = + ctx_->get_instr_block(get_def_use_mgr()->GetDef(label_id)); + bb_succs_[&block].push_back(Edge(&block, succ_bb)); + bb_preds_[succ_bb].push_back(Edge(succ_bb, &block)); + }); + if (block.IsReturnOrAbort()) { + bb_succs_[&block].push_back( + Edge(&block, ctx_->cfg()->pseudo_exit_block())); + bb_preds_[ctx_->cfg()->pseudo_exit_block()].push_back( + Edge(ctx_->cfg()->pseudo_exit_block(), &block)); + } + } + + // Add the edges out of the entry block to seed the propagator. + const auto& entry_succs = bb_succs_[ctx_->cfg()->pseudo_entry_block()]; + for (const auto& e : entry_succs) { + AddControlEdge(e); + } +} + +bool SSAPropagator::Run(ir::Function* fn) { + Initialize(fn); + + bool changed = false; + while (!blocks_.empty() || !ssa_edge_uses_.empty()) { + // Simulate all blocks first. Simulating blocks will add SSA edges to + // follow after all the blocks have been simulated. + if (!blocks_.empty()) { + auto block = blocks_.front(); + changed |= Simulate(block); + blocks_.pop(); + continue; + } + + // Simulate edges from the SSA queue. + if (!ssa_edge_uses_.empty()) { + ir::Instruction* instr = ssa_edge_uses_.front(); + changed |= Simulate(instr); + ssa_edge_uses_.pop(); + } + } + +#ifndef NDEBUG + // Verify all visited values have settled. No value that has been simulated + // should end on not interesting. + fn->ForEachInst([this](ir::Instruction* inst) { + assert( + (!HasStatus(inst) || Status(inst) != SSAPropagator::kNotInteresting) && + "Unsettled value"); + }); +#endif + + return changed; +} + +std::ostream& operator<<(std::ostream& str, + const SSAPropagator::PropStatus& status) { + switch (status) { + case SSAPropagator::kVarying: + str << "Varying"; + break; + case SSAPropagator::kInteresting: + str << "Interesting"; + break; + default: + str << "Not interesting"; + break; + } + return str; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.h new file mode 100644 index 0000000000000000000000000000000000000000..f81690c77a0473730247dd56b4f15e393fdf4e99 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/propagator.h @@ -0,0 +1,319 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_PROPAGATOR_H_ +#define LIBSPIRV_OPT_PROPAGATOR_H_ + +#include +#include +#include +#include +#include +#include + +#include "ir_context.h" +#include "module.h" + +namespace spvtools { +namespace opt { + +// Represents a CFG control edge. +struct Edge { + Edge(ir::BasicBlock* b1, ir::BasicBlock* b2) : source(b1), dest(b2) { + assert(source && "CFG edges cannot have a null source block."); + assert(dest && "CFG edges cannot have a null destination block."); + } + ir::BasicBlock* source; + ir::BasicBlock* dest; + bool operator<(const Edge& o) const { + return std::make_pair(source->id(), dest->id()) < + std::make_pair(o.source->id(), o.dest->id()); + } +}; + +// This class implements a generic value propagation algorithm based on the +// conditional constant propagation algorithm proposed in +// +// Constant propagation with conditional branches, +// Wegman and Zadeck, ACM TOPLAS 13(2):181-210. +// +// A Propagation Engine for GCC +// Diego Novillo, GCC Summit 2005 +// http://ols.fedoraproject.org/GCC/Reprints-2005/novillo-Reprint.pdf +// +// The purpose of this implementation is to act as a common framework for any +// transformation that needs to propagate values from statements producing new +// values to statements using those values. Simulation proceeds as follows: +// +// 1- Initially, all edges of the CFG are marked not executable and the CFG +// worklist is seeded with all the statements in the entry basic block. +// +// 2- Every instruction I is simulated by calling a pass-provided function +// |visit_fn|. This function is responsible for three things: +// +// (a) Keep a value table of interesting values. This table maps SSA IDs to +// their values. For instance, when implementing constant propagation, +// given a store operation 'OpStore %f %int_3', |visit_fn| should assign +// the value 3 to the table slot for %f. +// +// In general, |visit_fn| will need to use the value table to replace its +// operands, fold the result and decide whether a new value needs to be +// stored in the table. |visit_fn| should only create a new mapping in +// the value table if all the operands in the instruction are known and +// present in the value table. +// +// (b) Return a status indicator to direct the propagator logic. Once the +// instruction is simulated, the propagator needs to know whether this +// instruction produced something interesting. This is indicated via +// |visit_fn|'s return value: +// +// SSAPropagator::kNotInteresting: Instruction I produces nothing of +// interest and does not affect any of the work lists. The +// propagator will visit the statement again if any of its operands +// produce an interesting value in the future. +// +// |visit_fn| should always return this value when it is not sure +// whether the instruction will produce an interesting value in the +// future or not. For instance, for constant propagation, an OpIAdd +// instruction may produce a constant if its two operands are +// constant, but the first time we visit the instruction, we still +// may not have its operands in the value table. +// +// SSAPropagator::kVarying: The value produced by I cannot be determined +// at compile time. Further simulation of I is not required. The +// propagator will not visit this instruction again. Additionally, +// the propagator will add all the instructions at the end of SSA +// def-use edges to be simulated again. +// +// If I is a basic block terminator, it will mark all outgoing edges +// as executable so they are traversed one more time. Eventually +// the kVarying attribute will be spread out to all the data and +// control dependents for I. +// +// It is important for propagation to use kVarying as a bottom value +// for the propagation lattice. It should never be possible for an +// instruction to return kVarying once and kInteresting on a second +// visit. Otherwise, propagation would not stabilize. +// +// SSAPropagator::kInteresting: Instruction I produces a value that can +// be computed at compile time. In this case, |visit_fn| should +// create a new mapping between I's result ID and the produced +// value. Much like the kNotInteresting case, the propagator will +// visit this instruction again if any of its operands changes. +// This is useful when the statement changes from one interesting +// state to another. +// +// (c) For conditional branches, |visit_fn| may decide which edge to take out +// of I's basic block. For example, if the operand for an OpSwitch is +// known to take a specific constant value, |visit_fn| should figure out +// the destination basic block and pass it back by setting the second +// argument to |visit_fn|. +// +// At the end of propagation, values in the value table are guaranteed to be +// stable and can be replaced in the IR. +// +// 3- The propagator keeps two work queues. Instructions are only added to +// these queues if they produce an interesting or varying value. None of this +// should be handled by |visit_fn|. The propagator keeps track of this +// automatically (see SSAPropagator::Simulate for implementation). +// +// CFG blocks: contains the queue of blocks to be simulated. +// Blocks are added to this queue if their incoming edges are +// executable. +// +// SSA Edges: An SSA edge is a def-use edge between a value-producing +// instruction and its use instruction. The SSA edges list +// contains the statements at the end of a def-use edge that need +// to be re-visited when an instruction produces a kVarying or +// kInteresting result. +// +// 4- Simulation terminates when all work queues are drained. +// +// +// EXAMPLE: Basic constant store propagator. +// +// Suppose we want to propagate all constant assignments of the form "OpStore +// %id %cst" where "%id" is some variable and "%cst" an OpConstant. The +// following code builds a table |values| where every id that was assigned a +// constant value is mapped to the constant value it was assigned. +// +// auto ctx = spvtools::BuildModule(...); +// std::map values; +// const auto visit_fn = [&ctx, &values](ir::Instruction* instr, +// ir::BasicBlock** dest_bb) { +// if (instr->opcode() == SpvOpStore) { +// uint32_t rhs_id = instr->GetSingleWordOperand(1); +// ir::Instruction* rhs_def = ctx->get_def_use_mgr()->GetDef(rhs_id); +// if (rhs_def->opcode() == SpvOpConstant) { +// uint32_t val = rhs_def->GetSingleWordOperand(2); +// values[rhs_id] = val; +// return opt::SSAPropagator::kInteresting; +// } +// } +// return opt::SSAPropagator::kVarying; +// }; +// opt::SSAPropagator propagator(ctx.get(), &cfg, visit_fn); +// propagator.Run(&fn); +// +// Given the code: +// +// %int_4 = OpConstant %int 4 +// %int_3 = OpConstant %int 3 +// %int_1 = OpConstant %int 1 +// OpStore %x %int_4 +// OpStore %y %int_3 +// OpStore %z %int_1 +// +// After SSAPropagator::Run returns, the |values| map will contain the entries: +// values[%x] = 4, values[%y] = 3, and, values[%z] = 1. +class SSAPropagator { + public: + // Lattice values used for propagation. See class documentation for + // a description. + enum PropStatus { kNotInteresting, kInteresting, kVarying }; + + using VisitFunction = + std::function; + + SSAPropagator(ir::IRContext* context, const VisitFunction& visit_fn) + : ctx_(context), visit_fn_(visit_fn) {} + + // Runs the propagator on function |fn|. Returns true if changes were made to + // the function. Otherwise, it returns false. + bool Run(ir::Function* fn); + + // Returns true if the |i|th argument for |phi| comes through a CFG edge that + // has been marked executable. |i| should be an index value accepted by + // Instruction::GetSingleWordOperand. + bool IsPhiArgExecutable(ir::Instruction* phi, uint32_t i) const; + + // Returns true if |inst| has a recorded status. This will be true once |inst| + // has been simulated once. + bool HasStatus(ir::Instruction* inst) const { return statuses_.count(inst); } + + // Returns the current propagation status of |inst|. Assumes + // |HasStatus(inst)| returns true. + PropStatus Status(ir::Instruction* inst) const { + return statuses_.find(inst)->second; + } + + // Records the propagation status |status| for |inst|. Returns true if the + // status for |inst| has changed or set was set for the first time. + bool SetStatus(ir::Instruction* inst, PropStatus status); + + private: + // Initialize processing. + void Initialize(ir::Function* fn); + + // Simulate the execution |block| by calling |visit_fn_| on every instruction + // in it. + bool Simulate(ir::BasicBlock* block); + + // Simulate the execution of |instr| by replacing all the known values in + // every operand and determining whether the result is interesting for + // propagation. This invokes the callback function |visit_fn_| to determine + // the value computed by |instr|. + bool Simulate(ir::Instruction* instr); + + // Returns true if |instr| should be simulated again. + bool ShouldSimulateAgain(ir::Instruction* instr) const { + return do_not_simulate_.find(instr) == do_not_simulate_.end(); + } + + // Add |instr| to the set of instructions not to simulate again. + void DontSimulateAgain(ir::Instruction* instr) { + do_not_simulate_.insert(instr); + } + + // Returns true if |block| has been simulated already. + bool BlockHasBeenSimulated(ir::BasicBlock* block) const { + return simulated_blocks_.find(block) != simulated_blocks_.end(); + } + + // Marks block |block| as simulated. + void MarkBlockSimulated(ir::BasicBlock* block) { + simulated_blocks_.insert(block); + } + + // Marks |edge| as executable. Returns false if the edge was already marked + // as executable. + bool MarkEdgeExecutable(const Edge& edge) { + return executable_edges_.insert(edge).second; + } + + // Returns true if |edge| has been marked as executable. + bool IsEdgeExecutable(const Edge& edge) const { + return executable_edges_.find(edge) != executable_edges_.end(); + } + + // Returns a pointer to the def-use manager for |ctx_|. + analysis::DefUseManager* get_def_use_mgr() const { + return ctx_->get_def_use_mgr(); + } + + // If the CFG edge |e| has not been executed, this function adds |e|'s + // destination block to the work list. + void AddControlEdge(const Edge& e); + + // Adds all the instructions that use the result of |instr| to the SSA edges + // work list. If |instr| produces no result id, this does nothing. + void AddSSAEdges(ir::Instruction* instr); + + // IR context to use. + ir::IRContext* ctx_; + + // Function that visits instructions during simulation. The output of this + // function is used to determine if the simulated instruction produced a value + // interesting for propagation. The function is responsible for keeping + // track of interesting values by storing them in some user-provided map. + VisitFunction visit_fn_; + + // SSA def-use edges to traverse. Each entry is a destination statement for an + // SSA def-use edge as returned by |def_use_manager_|. + std::queue ssa_edge_uses_; + + // Blocks to simulate. + std::queue blocks_; + + // Blocks simulated during propagation. + std::unordered_set simulated_blocks_; + + // Set of instructions that should not be simulated again because they have + // been found to be in the kVarying state. + std::unordered_set do_not_simulate_; + + // Map between a basic block and its predecessor edges. + // TODO(dnovillo): Move this to ir::CFG and always build them. Alternately, + // move it to IRContext and build CFG preds/succs on-demand. + std::unordered_map> bb_preds_; + + // Map between a basic block and its successor edges. + // TODO(dnovillo): Move this to ir::CFG and always build them. Alternately, + // move it to IRContext and build CFG preds/succs on-demand. + std::unordered_map> bb_succs_; + + // Set of executable CFG edges. + std::set executable_edges_; + + // Tracks instruction propagation status. + std::unordered_map statuses_; +}; + +std::ostream& operator<<(std::ostream& str, + const SSAPropagator::PropStatus& status); + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_PROPAGATOR_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.cpp new file mode 100644 index 0000000000000000000000000000000000000000..347e2fef7cf1f80751e04ea7f4dc9ef0e2e4ab69 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.cpp @@ -0,0 +1,58 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "redundancy_elimination.h" + +#include "value_number_table.h" + +namespace spvtools { +namespace opt { + +Pass::Status RedundancyEliminationPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + + bool modified = false; + ValueNumberTable vnTable(context()); + + for (auto& func : *get_module()) { + // Build the dominator tree for this function. It is how the code is + // traversed. + opt::DominatorTree& dom_tree = + context()->GetDominatorAnalysis(&func)->GetDomTree(); + + // Keeps track of all ids that contain a given value number. We keep + // track of multiple values because they could have the same value, but + // different decorations. + std::map value_to_ids; + + if (EliminateRedundanciesFrom(dom_tree.GetRoot(), vnTable, value_to_ids)) { + modified = true; + } + } + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +bool RedundancyEliminationPass::EliminateRedundanciesFrom( + DominatorTreeNode* bb, const ValueNumberTable& vnTable, + std::map value_to_ids) { + bool modified = EliminateRedundanciesInBB(bb->bb_, vnTable, &value_to_ids); + + for (auto dominated_bb : bb->children_) { + modified |= EliminateRedundanciesFrom(dominated_bb, vnTable, value_to_ids); + } + + return modified; +} +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.h new file mode 100644 index 0000000000000000000000000000000000000000..634ecc330dc43a2af89dff9b04770fb19664ae1a --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/redundancy_elimination.h @@ -0,0 +1,54 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_REDUNDANCY_ELIMINATION_H_ +#define LIBSPIRV_OPT_REDUNDANCY_ELIMINATION_H_ + +#include "ir_context.h" +#include "local_redundancy_elimination.h" +#include "pass.h" +#include "value_number_table.h" + +namespace spvtools { +namespace opt { + +// This pass implements total redundancy elimination. This is the same as +// local redundancy elimination except it looks across basic block boundaries. +// An instruction, inst, is totally redundant if there is another instruction +// that dominates inst, and also computes the same value. +class RedundancyEliminationPass : public LocalRedundancyEliminationPass { + public: + const char* name() const override { return "redundancy-elimination"; } + Status Process(ir::IRContext*) override; + + protected: + // Removes for all total redundancies in the function starting at |bb|. + // + // |vnTable| must have computed a value number for every result id defined + // in the function containing |bb|. + // + // |value_to_ids| is a map from value number to ids. If {vn, id} is in + // |value_to_ids| then vn is the value number of id, and the defintion of id + // dominates |bb|. + // + // Returns true if at least one instruction is deleted. + bool EliminateRedundanciesFrom(DominatorTreeNode* bb, + const ValueNumberTable& vnTable, + std::map value_to_ids); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_REDUNDANCY_ELIMINATION_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/reflect.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/reflect.h index 46d004933baf6470192e2daaa30c82b1be9ed14d..ef2d8494786449c0f231ee68c1756b8a59ac7e78 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/reflect.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/reflect.h @@ -15,7 +15,7 @@ #ifndef LIBSPIRV_OPT_REFLECT_H_ #define LIBSPIRV_OPT_REFLECT_H_ -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" namespace spvtools { namespace ir { @@ -38,7 +38,9 @@ inline bool IsDebugLineInst(SpvOp opcode) { return opcode == SpvOpLine || opcode == SpvOpNoLine; } inline bool IsAnnotationInst(SpvOp opcode) { - return opcode >= SpvOpDecorate && opcode <= SpvOpGroupMemberDecorate; + return (opcode >= SpvOpDecorate && opcode <= SpvOpGroupMemberDecorate) || + opcode == SpvOpDecorateId || opcode == SpvOpDecorateStringGOOGLE || + opcode == SpvOpMemberDecorateStringGOOGLE; } inline bool IsTypeInst(SpvOp opcode) { return (opcode >= SpvOpTypeVoid && opcode <= SpvOpTypeForwardPointer) || @@ -47,6 +49,12 @@ inline bool IsTypeInst(SpvOp opcode) { inline bool IsConstantInst(SpvOp opcode) { return opcode >= SpvOpConstantTrue && opcode <= SpvOpSpecConstantOp; } +inline bool IsCompileTimeConstantInst(SpvOp opcode) { + return opcode >= SpvOpConstantTrue && opcode <= SpvOpConstantNull; +} +inline bool IsSpecConstantInst(SpvOp opcode) { + return opcode >= SpvOpSpecConstantTrue && opcode <= SpvOpSpecConstantOp; +} inline bool IsTerminatorInst(SpvOp opcode) { return opcode >= SpvOpBranch && opcode <= SpvOpUnreachable; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d414e701d1eea3c118fb953b213ee12f3c87dd8a --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.cpp @@ -0,0 +1,578 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "register_pressure.h" + +#include + +#include "cfg.h" +#include "def_use_manager.h" +#include "dominator_tree.h" +#include "function.h" +#include "ir_context.h" +#include "iterator.h" + +namespace spvtools { +namespace opt { + +namespace { +// Predicate for the FilterIterator to only consider instructions that are not +// phi instructions defined in the basic block |bb|. +class ExcludePhiDefinedInBlock { + public: + ExcludePhiDefinedInBlock(ir::IRContext* context, const ir::BasicBlock* bb) + : context_(context), bb_(bb) {} + + bool operator()(ir::Instruction* insn) const { + return !(insn->opcode() == SpvOpPhi && + context_->get_instr_block(insn) == bb_); + } + + private: + ir::IRContext* context_; + const ir::BasicBlock* bb_; +}; + +// Returns true if |insn| generates a SSA register that is likely to require a +// physical register. +bool CreatesRegisterUsage(ir::Instruction* insn) { + if (!insn->HasResultId()) return false; + if (insn->opcode() == SpvOpUndef) return false; + if (ir::IsConstantInst(insn->opcode())) return false; + if (insn->opcode() == SpvOpLabel) return false; + return true; +} + +// Compute the register liveness for each basic block of a function. This also +// fill-up some information about the pick register usage and a break down of +// register usage. This implements: "A non-iterative data-flow algorithm for +// computing liveness sets in strict ssa programs" from Boissinot et al. +class ComputeRegisterLiveness { + public: + ComputeRegisterLiveness(RegisterLiveness* reg_pressure, ir::Function* f) + : reg_pressure_(reg_pressure), + context_(reg_pressure->GetContext()), + function_(f), + cfg_(*reg_pressure->GetContext()->cfg()), + def_use_manager_(*reg_pressure->GetContext()->get_def_use_mgr()), + dom_tree_( + reg_pressure->GetContext()->GetDominatorAnalysis(f)->GetDomTree()), + loop_desc_(*reg_pressure->GetContext()->GetLoopDescriptor(f)) {} + + // Computes the register liveness for |function_| and then estimate the + // register usage. The liveness algorithm works in 2 steps: + // - First, compute the liveness for each basic blocks, but will ignore any + // back-edge; + // - Second, walk loop forest to propagate registers crossing back-edges + // (add iterative values into the liveness set). + void Compute() { + cfg_.ForEachBlockInPostOrder( + &*function_->begin(), + [this](ir::BasicBlock* bb) { ComputePartialLiveness(bb); }); + DoLoopLivenessUnification(); + EvaluateRegisterRequirements(); + } + + private: + // Registers all SSA register used by successors of |bb| in their phi + // instructions. + void ComputePhiUses(const ir::BasicBlock& bb, + RegisterLiveness::RegionRegisterLiveness::LiveSet* live) { + uint32_t bb_id = bb.id(); + bb.ForEachSuccessorLabel([live, bb_id, this](uint32_t sid) { + ir::BasicBlock* succ_bb = cfg_.block(sid); + succ_bb->ForEachPhiInst([live, bb_id, this](const ir::Instruction* phi) { + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + if (phi->GetSingleWordInOperand(i + 1) == bb_id) { + ir::Instruction* insn_op = + def_use_manager_.GetDef(phi->GetSingleWordInOperand(i)); + if (CreatesRegisterUsage(insn_op)) { + live->insert(insn_op); + break; + } + } + } + }); + }); + } + + // Computes register liveness for each basic blocks but ignores all + // back-edges. + void ComputePartialLiveness(ir::BasicBlock* bb) { + assert(reg_pressure_->Get(bb) == nullptr && + "Basic block already processed"); + + RegisterLiveness::RegionRegisterLiveness* live_inout = + reg_pressure_->GetOrInsert(bb->id()); + ComputePhiUses(*bb, &live_inout->live_out_); + + const ir::BasicBlock* cbb = bb; + cbb->ForEachSuccessorLabel([&live_inout, bb, this](uint32_t sid) { + // Skip back edges. + if (dom_tree_.Dominates(sid, bb->id())) { + return; + } + + ir::BasicBlock* succ_bb = cfg_.block(sid); + RegisterLiveness::RegionRegisterLiveness* succ_live_inout = + reg_pressure_->Get(succ_bb); + assert(succ_live_inout && + "Successor liveness analysis was not performed"); + + ExcludePhiDefinedInBlock predicate(context_, succ_bb); + auto filter = ir::MakeFilterIteratorRange( + succ_live_inout->live_in_.begin(), succ_live_inout->live_in_.end(), + predicate); + live_inout->live_out_.insert(filter.begin(), filter.end()); + }); + + live_inout->live_in_ = live_inout->live_out_; + for (ir::Instruction& insn : ir::make_range(bb->rbegin(), bb->rend())) { + if (insn.opcode() == SpvOpPhi) { + live_inout->live_in_.insert(&insn); + break; + } + live_inout->live_in_.erase(&insn); + insn.ForEachInId([live_inout, this](uint32_t* id) { + ir::Instruction* insn_op = def_use_manager_.GetDef(*id); + if (CreatesRegisterUsage(insn_op)) { + live_inout->live_in_.insert(insn_op); + } + }); + } + } + + // Propagates the register liveness information of each loop iterators. + void DoLoopLivenessUnification() { + for (const ir::Loop* loop : *loop_desc_.GetDummyRootLoop()) { + DoLoopLivenessUnification(*loop); + } + } + + // Propagates the register liveness information of loop iterators trough-out + // the loop body. + void DoLoopLivenessUnification(const ir::Loop& loop) { + auto blocks_in_loop = ir::MakeFilterIteratorRange( + loop.GetBlocks().begin(), loop.GetBlocks().end(), + [&loop, this](uint32_t bb_id) { + return bb_id != loop.GetHeaderBlock()->id() && + loop_desc_[bb_id] == &loop; + }); + + RegisterLiveness::RegionRegisterLiveness* header_live_inout = + reg_pressure_->Get(loop.GetHeaderBlock()); + assert(header_live_inout && + "Liveness analysis was not performed for the current block"); + + ExcludePhiDefinedInBlock predicate(context_, loop.GetHeaderBlock()); + auto live_loop = ir::MakeFilterIteratorRange( + header_live_inout->live_in_.begin(), header_live_inout->live_in_.end(), + predicate); + + for (uint32_t bb_id : blocks_in_loop) { + ir::BasicBlock* bb = cfg_.block(bb_id); + + RegisterLiveness::RegionRegisterLiveness* live_inout = + reg_pressure_->Get(bb); + live_inout->live_in_.insert(live_loop.begin(), live_loop.end()); + live_inout->live_out_.insert(live_loop.begin(), live_loop.end()); + } + + for (const ir::Loop* inner_loop : loop) { + RegisterLiveness::RegionRegisterLiveness* live_inout = + reg_pressure_->Get(inner_loop->GetHeaderBlock()); + live_inout->live_in_.insert(live_loop.begin(), live_loop.end()); + live_inout->live_out_.insert(live_loop.begin(), live_loop.end()); + + DoLoopLivenessUnification(*inner_loop); + } + } + + // Get the number of required registers for this each basic block. + void EvaluateRegisterRequirements() { + for (ir::BasicBlock& bb : *function_) { + RegisterLiveness::RegionRegisterLiveness* live_inout = + reg_pressure_->Get(bb.id()); + assert(live_inout != nullptr && "Basic block not processed"); + + size_t reg_count = live_inout->live_out_.size(); + for (ir::Instruction* insn : live_inout->live_out_) { + live_inout->AddRegisterClass(insn); + } + live_inout->used_registers_ = reg_count; + + std::unordered_set die_in_block; + for (ir::Instruction& insn : ir::make_range(bb.rbegin(), bb.rend())) { + // If it is a phi instruction, the register pressure will not change + // anymore. + if (insn.opcode() == SpvOpPhi) { + break; + } + + insn.ForEachInId( + [live_inout, &die_in_block, ®_count, this](uint32_t* id) { + ir::Instruction* op_insn = def_use_manager_.GetDef(*id); + if (!CreatesRegisterUsage(op_insn) || + live_inout->live_out_.count(op_insn)) { + // already taken into account. + return; + } + if (!die_in_block.count(*id)) { + live_inout->AddRegisterClass(def_use_manager_.GetDef(*id)); + reg_count++; + die_in_block.insert(*id); + } + }); + live_inout->used_registers_ = + std::max(live_inout->used_registers_, reg_count); + if (CreatesRegisterUsage(&insn)) { + reg_count--; + } + } + } + } + + RegisterLiveness* reg_pressure_; + ir::IRContext* context_; + ir::Function* function_; + ir::CFG& cfg_; + analysis::DefUseManager& def_use_manager_; + DominatorTree& dom_tree_; + ir::LoopDescriptor& loop_desc_; +}; +} // namespace + +// Get the number of required registers for each basic block. +void RegisterLiveness::RegionRegisterLiveness::AddRegisterClass( + ir::Instruction* insn) { + assert(CreatesRegisterUsage(insn) && "Instruction does not use a register"); + analysis::Type* type = + insn->context()->get_type_mgr()->GetType(insn->type_id()); + + RegisterLiveness::RegisterClass reg_class{type, false}; + + insn->context()->get_decoration_mgr()->WhileEachDecoration( + insn->result_id(), SpvDecorationUniform, + [®_class](const ir::Instruction&) { + reg_class.is_uniform_ = true; + return false; + }); + + AddRegisterClass(reg_class); +} + +void RegisterLiveness::Analyze(ir::Function* f) { + block_pressure_.clear(); + ComputeRegisterLiveness(this, f).Compute(); +} + +void RegisterLiveness::ComputeLoopRegisterPressure( + const ir::Loop& loop, RegionRegisterLiveness* loop_reg_pressure) const { + loop_reg_pressure->Clear(); + + const RegionRegisterLiveness* header_live_inout = Get(loop.GetHeaderBlock()); + loop_reg_pressure->live_in_ = header_live_inout->live_in_; + + std::unordered_set exit_blocks; + loop.GetExitBlocks(&exit_blocks); + + for (uint32_t bb_id : exit_blocks) { + const RegionRegisterLiveness* live_inout = Get(bb_id); + loop_reg_pressure->live_out_.insert(live_inout->live_in_.begin(), + live_inout->live_in_.end()); + } + + std::unordered_set seen_insn; + for (ir::Instruction* insn : loop_reg_pressure->live_out_) { + loop_reg_pressure->AddRegisterClass(insn); + seen_insn.insert(insn->result_id()); + } + for (ir::Instruction* insn : loop_reg_pressure->live_in_) { + if (!seen_insn.count(insn->result_id())) { + continue; + } + loop_reg_pressure->AddRegisterClass(insn); + seen_insn.insert(insn->result_id()); + } + + loop_reg_pressure->used_registers_ = 0; + + for (uint32_t bb_id : loop.GetBlocks()) { + ir::BasicBlock* bb = context_->cfg()->block(bb_id); + + const RegionRegisterLiveness* live_inout = Get(bb_id); + assert(live_inout != nullptr && "Basic block not processed"); + loop_reg_pressure->used_registers_ = std::max( + loop_reg_pressure->used_registers_, live_inout->used_registers_); + + for (ir::Instruction& insn : *bb) { + if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + seen_insn.count(insn.result_id())) { + continue; + } + loop_reg_pressure->AddRegisterClass(&insn); + } + } +} + +void RegisterLiveness::SimulateFusion( + const ir::Loop& l1, const ir::Loop& l2, + RegionRegisterLiveness* sim_result) const { + sim_result->Clear(); + + // Compute the live-in state: + // sim_result.live_in = l1.live_in U l2.live_in + // This assumes that |l1| does not generated register that is live-out for + // |l1|. + const RegionRegisterLiveness* l1_header_live_inout = Get(l1.GetHeaderBlock()); + sim_result->live_in_ = l1_header_live_inout->live_in_; + + const RegionRegisterLiveness* l2_header_live_inout = Get(l2.GetHeaderBlock()); + sim_result->live_in_.insert(l2_header_live_inout->live_in_.begin(), + l2_header_live_inout->live_in_.end()); + + // The live-out set of the fused loop is the l2 live-out set. + std::unordered_set exit_blocks; + l2.GetExitBlocks(&exit_blocks); + + for (uint32_t bb_id : exit_blocks) { + const RegionRegisterLiveness* live_inout = Get(bb_id); + sim_result->live_out_.insert(live_inout->live_in_.begin(), + live_inout->live_in_.end()); + } + + // Compute the register usage information. + std::unordered_set seen_insn; + for (ir::Instruction* insn : sim_result->live_out_) { + sim_result->AddRegisterClass(insn); + seen_insn.insert(insn->result_id()); + } + for (ir::Instruction* insn : sim_result->live_in_) { + if (!seen_insn.count(insn->result_id())) { + continue; + } + sim_result->AddRegisterClass(insn); + seen_insn.insert(insn->result_id()); + } + + sim_result->used_registers_ = 0; + + // The loop fusion is injecting the l1 before the l2, the latch of l1 will be + // connected to the header of l2. + // To compute the register usage, we inject the loop live-in (union of l1 and + // l2 live-in header blocks) into the the live in/out of each basic block of + // l1 to get the peak register usage. We then repeat the operation to for l2 + // basic blocks but in this case we inject the live-out of the latch of l1. + auto live_loop = ir::MakeFilterIteratorRange( + sim_result->live_in_.begin(), sim_result->live_in_.end(), + [&l1, &l2](ir::Instruction* insn) { + ir::BasicBlock* bb = insn->context()->get_instr_block(insn); + return insn->HasResultId() && + !(insn->opcode() == SpvOpPhi && + (bb == l1.GetHeaderBlock() || bb == l2.GetHeaderBlock())); + }); + + for (uint32_t bb_id : l1.GetBlocks()) { + ir::BasicBlock* bb = context_->cfg()->block(bb_id); + + const RegionRegisterLiveness* live_inout_info = Get(bb_id); + assert(live_inout_info != nullptr && "Basic block not processed"); + RegionRegisterLiveness::LiveSet live_out = live_inout_info->live_out_; + live_out.insert(live_loop.begin(), live_loop.end()); + sim_result->used_registers_ = + std::max(sim_result->used_registers_, + live_inout_info->used_registers_ + live_out.size() - + live_inout_info->live_out_.size()); + + for (ir::Instruction& insn : *bb) { + if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + seen_insn.count(insn.result_id())) { + continue; + } + sim_result->AddRegisterClass(&insn); + } + } + + const RegionRegisterLiveness* l1_latch_live_inout_info = + Get(l1.GetLatchBlock()->id()); + assert(l1_latch_live_inout_info != nullptr && "Basic block not processed"); + RegionRegisterLiveness::LiveSet l1_latch_live_out = + l1_latch_live_inout_info->live_out_; + l1_latch_live_out.insert(live_loop.begin(), live_loop.end()); + + auto live_loop_l2 = + ir::make_range(l1_latch_live_out.begin(), l1_latch_live_out.end()); + + for (uint32_t bb_id : l2.GetBlocks()) { + ir::BasicBlock* bb = context_->cfg()->block(bb_id); + + const RegionRegisterLiveness* live_inout_info = Get(bb_id); + assert(live_inout_info != nullptr && "Basic block not processed"); + RegionRegisterLiveness::LiveSet live_out = live_inout_info->live_out_; + live_out.insert(live_loop_l2.begin(), live_loop_l2.end()); + sim_result->used_registers_ = + std::max(sim_result->used_registers_, + live_inout_info->used_registers_ + live_out.size() - + live_inout_info->live_out_.size()); + + for (ir::Instruction& insn : *bb) { + if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + seen_insn.count(insn.result_id())) { + continue; + } + sim_result->AddRegisterClass(&insn); + } + } +} + +void RegisterLiveness::SimulateFission( + const ir::Loop& loop, + const std::unordered_set& moved_inst, + const std::unordered_set& copied_inst, + RegionRegisterLiveness* l1_sim_result, + RegionRegisterLiveness* l2_sim_result) const { + l1_sim_result->Clear(); + l2_sim_result->Clear(); + + // Filter predicates: consider instructions that only belong to the first and + // second loop. + auto belong_to_loop1 = [&moved_inst, &copied_inst, + &loop](ir::Instruction* insn) { + return moved_inst.count(insn) || copied_inst.count(insn) || + !loop.IsInsideLoop(insn); + }; + auto belong_to_loop2 = [&moved_inst](ir::Instruction* insn) { + return !moved_inst.count(insn); + }; + + const RegionRegisterLiveness* header_live_inout = Get(loop.GetHeaderBlock()); + // l1 live-in + { + auto live_loop = ir::MakeFilterIteratorRange( + header_live_inout->live_in_.begin(), header_live_inout->live_in_.end(), + belong_to_loop1); + l1_sim_result->live_in_.insert(live_loop.begin(), live_loop.end()); + } + // l2 live-in + { + auto live_loop = ir::MakeFilterIteratorRange( + header_live_inout->live_in_.begin(), header_live_inout->live_in_.end(), + belong_to_loop2); + l2_sim_result->live_in_.insert(live_loop.begin(), live_loop.end()); + } + + std::unordered_set exit_blocks; + loop.GetExitBlocks(&exit_blocks); + + // l2 live-out. + for (uint32_t bb_id : exit_blocks) { + const RegionRegisterLiveness* live_inout = Get(bb_id); + l2_sim_result->live_out_.insert(live_inout->live_in_.begin(), + live_inout->live_in_.end()); + } + // l1 live-out. + { + auto live_out = ir::MakeFilterIteratorRange( + l2_sim_result->live_out_.begin(), l2_sim_result->live_out_.end(), + belong_to_loop1); + l1_sim_result->live_out_.insert(live_out.begin(), live_out.end()); + } + { + auto live_out = ir::MakeFilterIteratorRange(l2_sim_result->live_in_.begin(), + l2_sim_result->live_in_.end(), + belong_to_loop1); + l1_sim_result->live_out_.insert(live_out.begin(), live_out.end()); + } + // Lives out of l1 are live out of l2 so are live in of l2 as well. + l2_sim_result->live_in_.insert(l1_sim_result->live_out_.begin(), + l1_sim_result->live_out_.end()); + + for (ir::Instruction* insn : l1_sim_result->live_in_) { + l1_sim_result->AddRegisterClass(insn); + } + for (ir::Instruction* insn : l2_sim_result->live_in_) { + l2_sim_result->AddRegisterClass(insn); + } + + l1_sim_result->used_registers_ = 0; + l2_sim_result->used_registers_ = 0; + + for (uint32_t bb_id : loop.GetBlocks()) { + ir::BasicBlock* bb = context_->cfg()->block(bb_id); + + const RegisterLiveness::RegionRegisterLiveness* live_inout = Get(bb_id); + assert(live_inout != nullptr && "Basic block not processed"); + auto l1_block_live_out = ir::MakeFilterIteratorRange( + live_inout->live_out_.begin(), live_inout->live_out_.end(), + belong_to_loop1); + auto l2_block_live_out = ir::MakeFilterIteratorRange( + live_inout->live_out_.begin(), live_inout->live_out_.end(), + belong_to_loop2); + + size_t l1_reg_count = + std::distance(l1_block_live_out.begin(), l1_block_live_out.end()); + size_t l2_reg_count = + std::distance(l2_block_live_out.begin(), l2_block_live_out.end()); + + std::unordered_set die_in_block; + for (ir::Instruction& insn : ir::make_range(bb->rbegin(), bb->rend())) { + if (insn.opcode() == SpvOpPhi) { + break; + } + + bool does_belong_to_loop1 = belong_to_loop1(&insn); + bool does_belong_to_loop2 = belong_to_loop2(&insn); + insn.ForEachInId([live_inout, &die_in_block, &l1_reg_count, &l2_reg_count, + does_belong_to_loop1, does_belong_to_loop2, + this](uint32_t* id) { + ir::Instruction* op_insn = context_->get_def_use_mgr()->GetDef(*id); + if (!CreatesRegisterUsage(op_insn) || + live_inout->live_out_.count(op_insn)) { + // already taken into account. + return; + } + if (!die_in_block.count(*id)) { + if (does_belong_to_loop1) { + l1_reg_count++; + } + if (does_belong_to_loop2) { + l2_reg_count++; + } + die_in_block.insert(*id); + } + }); + l1_sim_result->used_registers_ = + std::max(l1_sim_result->used_registers_, l1_reg_count); + l2_sim_result->used_registers_ = + std::max(l2_sim_result->used_registers_, l2_reg_count); + if (CreatesRegisterUsage(&insn)) { + if (does_belong_to_loop1) { + if (!l1_sim_result->live_in_.count(&insn)) { + l1_sim_result->AddRegisterClass(&insn); + } + l1_reg_count--; + } + if (does_belong_to_loop2) { + if (!l2_sim_result->live_in_.count(&insn)) { + l2_sim_result->AddRegisterClass(&insn); + } + l2_reg_count--; + } + } + } + } +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.h new file mode 100644 index 0000000000000000000000000000000000000000..d827a20369deac218192ded4bcfb75c10d38b608 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/register_pressure.h @@ -0,0 +1,201 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_REGISTER_PRESSURE_H_ +#define LIBSPIRV_OPT_REGISTER_PRESSURE_H_ + +#include +#include +#include +#include + +#include "function.h" +#include "types.h" + +namespace spvtools { +namespace ir { +class IRContext; +class Loop; +class LoopDescriptor; +} // namespace ir + +namespace opt { + +// Handles the register pressure of a function for different regions (function, +// loop, basic block). It also contains some utilities to foresee the register +// pressure following code transformations. +class RegisterLiveness { + public: + // Classification of SSA registers. + struct RegisterClass { + analysis::Type* type_; + bool is_uniform_; + + bool operator==(const RegisterClass& rhs) const { + return std::tie(type_, is_uniform_) == + std::tie(rhs.type_, rhs.is_uniform_); + } + }; + + struct RegionRegisterLiveness { + using LiveSet = std::unordered_set; + using RegClassSetTy = std::vector>; + + // SSA register live when entering the basic block. + LiveSet live_in_; + // SSA register live when exiting the basic block. + LiveSet live_out_; + + // Maximum number of required registers. + size_t used_registers_; + // Break down of the number of required registers per class of register. + RegClassSetTy registers_classes_; + + void Clear() { + live_out_.clear(); + live_in_.clear(); + used_registers_ = 0; + registers_classes_.clear(); + } + + void AddRegisterClass(const RegisterClass& reg_class) { + auto it = std::find_if( + registers_classes_.begin(), registers_classes_.end(), + [®_class](const std::pair& class_count) { + return class_count.first == reg_class; + }); + if (it != registers_classes_.end()) { + it->second++; + } else { + registers_classes_.emplace_back(std::move(reg_class), + static_cast(1)); + } + } + + void AddRegisterClass(ir::Instruction* insn); + }; + + RegisterLiveness(ir::IRContext* context, ir::Function* f) + : context_(context) { + Analyze(f); + } + + // Returns liveness and register information for the basic block |bb|. If no + // entry exist for the basic block, the function returns null. + const RegionRegisterLiveness* Get(const ir::BasicBlock* bb) const { + return Get(bb->id()); + } + + // Returns liveness and register information for the basic block id |bb_id|. + // If no entry exist for the basic block, the function returns null. + const RegionRegisterLiveness* Get(uint32_t bb_id) const { + RegionRegisterLivenessMap::const_iterator it = block_pressure_.find(bb_id); + if (it != block_pressure_.end()) { + return &it->second; + } + return nullptr; + } + + ir::IRContext* GetContext() const { return context_; } + + // Returns liveness and register information for the basic block |bb|. If no + // entry exist for the basic block, the function returns null. + RegionRegisterLiveness* Get(const ir::BasicBlock* bb) { + return Get(bb->id()); + } + + // Returns liveness and register information for the basic block id |bb_id|. + // If no entry exist for the basic block, the function returns null. + RegionRegisterLiveness* Get(uint32_t bb_id) { + RegionRegisterLivenessMap::iterator it = block_pressure_.find(bb_id); + if (it != block_pressure_.end()) { + return &it->second; + } + return nullptr; + } + + // Returns liveness and register information for the basic block id |bb_id| or + // create a new empty entry if no entry already existed. + RegionRegisterLiveness* GetOrInsert(uint32_t bb_id) { + return &block_pressure_[bb_id]; + } + + // Compute the register pressure for the |loop| and store the result into + // |reg_pressure|. The live-in set corresponds to the live-in set of the + // header block, the live-out set of the loop corresponds to the union of the + // live-in sets of each exit basic block. + void ComputeLoopRegisterPressure(const ir::Loop& loop, + RegionRegisterLiveness* reg_pressure) const; + + // Estimate the register pressure for the |l1| and |l2| as if they were making + // one unique loop. The result is stored into |simulation_result|. + void SimulateFusion(const ir::Loop& l1, const ir::Loop& l2, + RegionRegisterLiveness* simulation_result) const; + + // Estimate the register pressure of |loop| after it has been fissioned + // according to |moved_instructions| and |copied_instructions|. The function + // assumes that the fission creates a new loop before |loop|, moves any + // instructions present inside |moved_instructions| and copies any + // instructions present inside |copied_instructions| into this new loop. + // The set |loop1_sim_result| store the simulation result of the loop with the + // moved instructions. The set |loop2_sim_result| store the simulation result + // of the loop with the removed instructions. + void SimulateFission( + const ir::Loop& loop, + const std::unordered_set& moved_instructions, + const std::unordered_set& copied_instructions, + RegionRegisterLiveness* loop1_sim_result, + RegionRegisterLiveness* loop2_sim_result) const; + + private: + using RegionRegisterLivenessMap = + std::unordered_map; + + ir::IRContext* context_; + RegionRegisterLivenessMap block_pressure_; + + void Analyze(ir::Function* f); +}; + +// Handles the register pressure of a function for different regions (function, +// loop, basic block). It also contains some utilities to foresee the register +// pressure following code transformations. +class LivenessAnalysis { + using LivenessAnalysisMap = + std::unordered_map; + + public: + LivenessAnalysis(ir::IRContext* context) : context_(context) {} + + // Computes the liveness analysis for the function |f| and cache the result. + // If the analysis was performed for this function, then the cached analysis + // is returned. + const RegisterLiveness* Get(ir::Function* f) { + LivenessAnalysisMap::iterator it = analysis_cache_.find(f); + if (it != analysis_cache_.end()) { + return &it->second; + } + return &analysis_cache_.emplace(f, RegisterLiveness{context_, f}) + .first->second; + } + + private: + ir::IRContext* context_; + LivenessAnalysisMap analysis_cache_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // ! LIBSPIRV_OPT_REGISTER_PRESSURE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.cpp index a44e5dcabbeb1d058bb93c963a23c8333b45c427..0a54d76ea97db9edba877e56cee3d4f050c13b30 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.cpp @@ -23,7 +23,9 @@ #include #include "decoration_manager.h" +#include "ir_context.h" #include "opcode.h" +#include "reflect.h" namespace spvtools { namespace opt { @@ -31,34 +33,36 @@ namespace opt { using ir::Instruction; using ir::Module; using ir::Operand; -using opt::analysis::DefUseManager; using opt::analysis::DecorationManager; +using opt::analysis::DefUseManager; -Pass::Status RemoveDuplicatesPass::Process(Module* module) { - DefUseManager defUseManager(consumer(), module); - DecorationManager decManager(module); - - bool modified = RemoveDuplicateCapabilities(module); - modified |= RemoveDuplicatesExtInstImports(module, defUseManager); - modified |= RemoveDuplicateTypes(module, defUseManager, decManager); - modified |= RemoveDuplicateDecorations(module); +Pass::Status RemoveDuplicatesPass::Process(ir::IRContext* ir_context) { + bool modified = RemoveDuplicateCapabilities(ir_context); + modified |= RemoveDuplicatesExtInstImports(ir_context); + modified |= RemoveDuplicateTypes(ir_context); + modified |= RemoveDuplicateDecorations(ir_context); return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -bool RemoveDuplicatesPass::RemoveDuplicateCapabilities(Module* module) const { +bool RemoveDuplicatesPass::RemoveDuplicateCapabilities( + ir::IRContext* ir_context) const { bool modified = false; + if (ir_context->capabilities().empty()) { + return modified; + } + std::unordered_set capabilities; - for (auto i = module->capability_begin(); i != module->capability_end();) { + for (auto* i = &*ir_context->capability_begin(); i;) { auto res = capabilities.insert(i->GetSingleWordOperand(0u)); if (res.second) { // Never seen before, keep it. - ++i; + i = i->NextNode(); } else { // It's a duplicate, remove it. - i = i.Erase(); + i = ir_context->KillInst(i); modified = true; } } @@ -67,22 +71,25 @@ bool RemoveDuplicatesPass::RemoveDuplicateCapabilities(Module* module) const { } bool RemoveDuplicatesPass::RemoveDuplicatesExtInstImports( - Module* module, analysis::DefUseManager& defUseManager) const { + ir::IRContext* ir_context) const { bool modified = false; - std::unordered_map extInstImports; - for (auto i = module->ext_inst_import_begin(); - i != module->ext_inst_import_end();) { - auto res = extInstImports.emplace( + if (ir_context->ext_inst_imports().empty()) { + return modified; + } + + std::unordered_map ext_inst_imports; + for (auto* i = &*ir_context->ext_inst_import_begin(); i;) { + auto res = ext_inst_imports.emplace( reinterpret_cast(i->GetInOperand(0u).words.data()), i->result_id()); if (res.second) { // Never seen before, keep it. - ++i; + i = i->NextNode(); } else { // It's a duplicate, remove it. - defUseManager.ReplaceAllUsesWith(i->result_id(), res.first->second); - i = i.Erase(); + ir_context->ReplaceAllUsesWith(i->result_id(), res.first->second); + i = ir_context->KillInst(i); modified = true; } } @@ -91,79 +98,89 @@ bool RemoveDuplicatesPass::RemoveDuplicatesExtInstImports( } bool RemoveDuplicatesPass::RemoveDuplicateTypes( - Module* module, DefUseManager& defUseManager, - DecorationManager& decManager) const { + ir::IRContext* ir_context) const { bool modified = false; - std::vector visitedTypes; - visitedTypes.reserve(module->types_values().size()); + if (ir_context->types_values().empty()) { + return modified; + } - for (auto i = module->types_values_begin(); - i != module->types_values_end();) { + std::vector visited_types; + std::vector to_delete; + for (auto* i = &*ir_context->types_values_begin(); i; i = i->NextNode()) { // We only care about types. if (!spvOpcodeGeneratesType((i->opcode())) && i->opcode() != SpvOpTypeForwardPointer) { - ++i; continue; } // Is the current type equal to one of the types we have aready visited? - SpvId idToKeep = 0u; - for (auto j : visitedTypes) { - if (AreTypesEqual(*i, j, defUseManager, decManager)) { - idToKeep = j.result_id(); + SpvId id_to_keep = 0u; + // TODO(dneto0): Use a trie to avoid quadratic behaviour? Extract the + // ResultIdTrie from unify_const_pass.cpp for this. + for (auto j : visited_types) { + if (AreTypesEqual(*i, *j, ir_context)) { + id_to_keep = j->result_id(); break; } } - if (idToKeep == 0u) { + if (id_to_keep == 0u) { // This is a never seen before type, keep it around. - visitedTypes.emplace_back(*i); - ++i; + visited_types.emplace_back(i); } else { // The same type has already been seen before, remove this one. - defUseManager.ReplaceAllUsesWith(i->result_id(), idToKeep); + ir_context->KillNamesAndDecorates(i->result_id()); + ir_context->ReplaceAllUsesWith(i->result_id(), id_to_keep); modified = true; - i = i.Erase(); + to_delete.emplace_back(i); } } + for (auto i : to_delete) { + ir_context->KillInst(i); + } + return modified; } +// TODO(pierremoreau): Duplicate decoration groups should be removed. For +// example, in +// OpDecorate %1 Constant +// %1 = OpDecorationGroup +// OpDecorate %2 Constant +// %2 = OpDecorationGroup +// OpGroupDecorate %1 %3 +// OpGroupDecorate %2 %4 +// group %2 could be removed. bool RemoveDuplicatesPass::RemoveDuplicateDecorations( - ir::Module* module) const { + ir::IRContext* ir_context) const { bool modified = false; - std::unordered_map constants; - for (const auto& i : module->types_values()) - if (i.opcode() == SpvOpConstant) constants[i.result_id()] = &i; - for (const auto& i : module->types_values()) - if (i.opcode() == SpvOpConstant) constants[i.result_id()] = &i; + std::vector visited_decorations; - std::vector visitedDecorations; - visitedDecorations.reserve(module->annotations().size()); - - opt::analysis::DecorationManager decorationManager(module); - for (auto i = module->annotation_begin(); i != module->annotation_end();) { + opt::analysis::DecorationManager decoration_manager(ir_context->module()); + for (auto* i = &*ir_context->annotation_begin(); i;) { // Is the current decoration equal to one of the decorations we have aready // visited? - bool alreadyVisited = false; - for (const Instruction* j : visitedDecorations) { - if (decorationManager.AreDecorationsTheSame(&*i, j)) { - alreadyVisited = true; + bool already_visited = false; + // TODO(dneto0): Use a trie to avoid quadratic behaviour? Extract the + // ResultIdTrie from unify_const_pass.cpp for this. + for (const Instruction* j : visited_decorations) { + if (decoration_manager.AreDecorationsTheSame(&*i, j, false)) { + already_visited = true; break; } } - if (!alreadyVisited) { + if (!already_visited) { // This is a never seen before decoration, keep it around. - visitedDecorations.emplace_back(&*i); - ++i; + visited_decorations.emplace_back(&*i); + i = i->NextNode(); } else { // The same decoration has already been seen before, remove this one. modified = true; - i = i.Erase(); + i = ir_context->KillInst(i); } } @@ -172,102 +189,17 @@ bool RemoveDuplicatesPass::RemoveDuplicateDecorations( bool RemoveDuplicatesPass::AreTypesEqual(const Instruction& inst1, const Instruction& inst2, - const DefUseManager& defUseManager, - const DecorationManager& decManager) { + ir::IRContext* context) { if (inst1.opcode() != inst2.opcode()) return false; - if (!decManager.HaveTheSameDecorations(inst1.result_id(), inst2.result_id())) - return false; - - switch (inst1.opcode()) { - case SpvOpTypeVoid: - case SpvOpTypeBool: - case SpvOpTypeSampler: - case SpvOpTypeEvent: - case SpvOpTypeDeviceEvent: - case SpvOpTypeReserveId: - case SpvOpTypeQueue: - case SpvOpTypePipeStorage: - case SpvOpTypeNamedBarrier: - return true; - case SpvOpTypeInt: - return inst1.GetSingleWordInOperand(0u) == - inst2.GetSingleWordInOperand(0u) && - inst1.GetSingleWordInOperand(1u) == - inst2.GetSingleWordInOperand(1u); - case SpvOpTypeFloat: - case SpvOpTypePipe: - case SpvOpTypeForwardPointer: - return inst1.GetSingleWordInOperand(0u) == - inst2.GetSingleWordInOperand(0u); - case SpvOpTypeVector: - case SpvOpTypeMatrix: - return AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(0u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(0u)), - defUseManager, decManager) && - inst1.GetSingleWordInOperand(1u) == - inst2.GetSingleWordInOperand(1u); - case SpvOpTypeImage: - return AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(0u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(0u)), - defUseManager, decManager) && - inst1.GetSingleWordInOperand(1u) == - inst2.GetSingleWordInOperand(1u) && - inst1.GetSingleWordInOperand(2u) == - inst2.GetSingleWordInOperand(2u) && - inst1.GetSingleWordInOperand(3u) == - inst2.GetSingleWordInOperand(3u) && - inst1.GetSingleWordInOperand(4u) == - inst2.GetSingleWordInOperand(4u) && - inst1.GetSingleWordInOperand(5u) == - inst2.GetSingleWordInOperand(5u) && - inst1.GetSingleWordInOperand(6u) == - inst2.GetSingleWordInOperand(6u) && - inst1.NumOperands() == inst2.NumOperands() && - (inst1.NumInOperands() == 7u || - inst1.GetSingleWordInOperand(7u) == - inst2.GetSingleWordInOperand(7u)); - case SpvOpTypeSampledImage: - case SpvOpTypeRuntimeArray: - return AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(0u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(0u)), - defUseManager, decManager); - case SpvOpTypeArray: - return AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(0u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(0u)), - defUseManager, decManager) && - AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(1u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(1u)), - defUseManager, decManager); - case SpvOpTypeStruct: - case SpvOpTypeFunction: { - bool res = inst1.NumInOperands() == inst2.NumInOperands(); - for (uint32_t i = 0u; i < inst1.NumInOperands() && res; ++i) - res &= AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(i)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(i)), - defUseManager, decManager); - return res; - } - case SpvOpTypeOpaque: - return std::strcmp(reinterpret_cast( - inst1.GetInOperand(0u).words.data()), - reinterpret_cast( - inst2.GetInOperand(0u).words.data())) == 0; - case SpvOpTypePointer: - return inst1.GetSingleWordInOperand(0u) == - inst2.GetSingleWordInOperand(0u) && - AreTypesEqual( - *defUseManager.GetDef(inst1.GetSingleWordInOperand(1u)), - *defUseManager.GetDef(inst2.GetSingleWordInOperand(1u)), - defUseManager, decManager); - default: - return false; - } + if (!ir::IsTypeInst(inst1.opcode())) return false; + + const analysis::Type* type1 = + context->get_type_mgr()->GetType(inst1.result_id()); + const analysis::Type* type2 = + context->get_type_mgr()->GetType(inst2.result_id()); + if (type1 && type2 && *type1 == *type2) return true; + + return false; } } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.h index fcf4a058fcc5bb5c616847fc8a9d1b3e54ec9374..d766f6733b1d365b4fb013a5e9e7b9c8932d70ed 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/remove_duplicates_pass.h @@ -19,6 +19,7 @@ #include "decoration_manager.h" #include "def_use_manager.h" +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -32,21 +33,32 @@ using IdDecorationsList = class RemoveDuplicatesPass : public Pass { public: const char* name() const override { return "remove-duplicates"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; + // TODO(pierremoreau): Move this function somewhere else (e.g. pass.h or + // within the type manager) // Returns whether two types are equal, and have the same decorations. static bool AreTypesEqual(const ir::Instruction& inst1, const ir::Instruction& inst2, - const analysis::DefUseManager& defUseManager, - const analysis::DecorationManager& decoManager); + ir::IRContext* context); private: - bool RemoveDuplicateCapabilities(ir::Module* module) const; - bool RemoveDuplicatesExtInstImports( - ir::Module* module, analysis::DefUseManager& defUseManager) const; - bool RemoveDuplicateTypes(ir::Module* module, - analysis::DefUseManager& defUseManager, - analysis::DecorationManager& decManager) const; - bool RemoveDuplicateDecorations(ir::Module* module) const; + // Remove duplicate capabilities from the module attached to |ir_context|. + // + // Returns true if the module was modified, false otherwise. + bool RemoveDuplicateCapabilities(ir::IRContext* ir_context) const; + // Remove duplicate extended instruction imports from the module attached to + // |ir_context|. + // + // Returns true if the module was modified, false otherwise. + bool RemoveDuplicatesExtInstImports(ir::IRContext* ir_context) const; + // Remove duplicate types from the module attached to |ir_context|. + // + // Returns true if the module was modified, false otherwise. + bool RemoveDuplicateTypes(ir::IRContext* ir_context) const; + // Remove duplicate decorations from the module attached to |ir_context|. + // + // Returns true if the module was modified, false otherwise. + bool RemoveDuplicateDecorations(ir::IRContext* ir_context) const; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a025c3ce99fabf1ec090b5ce4d7e64bac075fdcd --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.cpp @@ -0,0 +1,207 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "replace_invalid_opc.h" + +#include + +namespace spvtools { +namespace opt { + +Pass::Status ReplaceInvalidOpcodePass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; + + if (context()->get_feature_mgr()->HasCapability(SpvCapabilityLinkage)) { + return Status::SuccessWithoutChange; + } + + SpvExecutionModel execution_model = GetExecutionModel(); + if (execution_model == SpvExecutionModelKernel) { + // We do not handle kernels. + return Status::SuccessWithoutChange; + } + if (execution_model == SpvExecutionModelMax) { + // Mixed execution models for the entry points. This case is not currently + // handled. + return Status::SuccessWithoutChange; + } + + for (ir::Function& func : *get_module()) { + modified |= RewriteFunction(&func, execution_model); + } + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +SpvExecutionModel ReplaceInvalidOpcodePass::GetExecutionModel() { + SpvExecutionModel result = SpvExecutionModelMax; + bool first = true; + for (ir::Instruction& entry_point : get_module()->entry_points()) { + if (first) { + result = + static_cast(entry_point.GetSingleWordInOperand(0)); + first = false; + } else { + SpvExecutionModel current_model = + static_cast(entry_point.GetSingleWordInOperand(0)); + if (current_model != result) { + result = SpvExecutionModelMax; + break; + } + } + } + return result; +} + +bool ReplaceInvalidOpcodePass::RewriteFunction(ir::Function* function, + SpvExecutionModel model) { + bool modified = false; + ir::Instruction* last_line_dbg_inst = nullptr; + function->ForEachInst( + [model, &modified, &last_line_dbg_inst, this](ir::Instruction* inst) { + // Track the debug information so we can have a meaningful message. + if (inst->opcode() == SpvOpLabel || inst->opcode() == SpvOpNoLine) { + last_line_dbg_inst = nullptr; + return; + } else if (inst->opcode() == SpvOpLine) { + last_line_dbg_inst = inst; + return; + } + + bool replace = false; + if (model != SpvExecutionModelFragment && + IsFragmentShaderOnlyInstruction(inst)) { + replace = true; + } + + if (model != SpvExecutionModelTessellationControl && + model != SpvExecutionModelGLCompute) { + if (inst->opcode() == SpvOpControlBarrier) { + assert(model != SpvExecutionModelKernel && + "Expecting to be working on a shader module."); + replace = true; + } + } + + if (replace) { + modified = true; + if (last_line_dbg_inst == nullptr) { + ReplaceInstruction(inst, nullptr, 0, 0); + } else { + // Get the name of the source file. + ir::Instruction* file_name = context()->get_def_use_mgr()->GetDef( + last_line_dbg_inst->GetSingleWordInOperand(0)); + const char* source = reinterpret_cast( + &file_name->GetInOperand(0).words[0]); + + // Get the line number and column number. + uint32_t line_number = + last_line_dbg_inst->GetSingleWordInOperand(1); + uint32_t col_number = last_line_dbg_inst->GetSingleWordInOperand(2); + + // Replace the instruction. + ReplaceInstruction(inst, source, line_number, col_number); + } + } + }, + /* run_on_debug_line_insts = */ true); + return modified; +} + +bool ReplaceInvalidOpcodePass::IsFragmentShaderOnlyInstruction( + ir::Instruction* inst) { + switch (inst->opcode()) { + case SpvOpDPdx: + case SpvOpDPdy: + case SpvOpFwidth: + case SpvOpDPdxFine: + case SpvOpDPdyFine: + case SpvOpFwidthFine: + case SpvOpDPdxCoarse: + case SpvOpDPdyCoarse: + case SpvOpFwidthCoarse: + case SpvOpImageSampleImplicitLod: + case SpvOpImageSampleDrefImplicitLod: + case SpvOpImageSampleProjImplicitLod: + case SpvOpImageSampleProjDrefImplicitLod: + case SpvOpImageSparseSampleImplicitLod: + case SpvOpImageSparseSampleDrefImplicitLod: + case SpvOpImageQueryLod: + // TODO: Teach |ReplaceInstruction| to handle block terminators. Then + // uncomment the OpKill case. + // case SpvOpKill: + return true; + default: + return false; + } +} + +void ReplaceInvalidOpcodePass::ReplaceInstruction(ir::Instruction* inst, + const char* source, + uint32_t line_number, + uint32_t column_number) { + if (inst->result_id() != 0) { + uint32_t const_id = GetSpecialConstant(inst->type_id()); + context()->KillNamesAndDecorates(inst); + context()->ReplaceAllUsesWith(inst->result_id(), const_id); + } + assert(!inst->IsBlockTerminator() && + "We cannot simply delete a block terminator. It must be replaced " + "with something."); + if (consumer()) { + std::string message = BuildWarningMessage(inst->opcode()); + consumer()(SPV_MSG_WARNING, source, {line_number, column_number, 0}, + message.c_str()); + } + context()->KillInst(inst); +} + +uint32_t ReplaceInvalidOpcodePass::GetSpecialConstant(uint32_t type_id) { + const analysis::Constant* special_const = nullptr; + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + + ir::Instruction* type = context()->get_def_use_mgr()->GetDef(type_id); + if (type->opcode() == SpvOpTypeVector) { + uint32_t component_const = + GetSpecialConstant(type->GetSingleWordInOperand(0)); + std::vector ids; + for (uint32_t i = 0; i < type->GetSingleWordInOperand(1); ++i) { + ids.push_back(component_const); + } + special_const = const_mgr->GetConstant(type_mgr->GetType(type_id), ids); + } else { + assert(type->opcode() == SpvOpTypeInt || type->opcode() == SpvOpTypeFloat); + std::vector literal_words; + for (uint32_t i = 0; i < type->GetSingleWordInOperand(0); i += 32) { + literal_words.push_back(0xDEADBEEF); + } + special_const = + const_mgr->GetConstant(type_mgr->GetType(type_id), literal_words); + } + assert(special_const != nullptr); + return const_mgr->GetDefiningInstruction(special_const)->result_id(); +} + +std::string ReplaceInvalidOpcodePass::BuildWarningMessage(SpvOp opcode) { + spv_opcode_desc opcode_info; + context()->grammar().lookupOpcode(opcode, &opcode_info); + std::string message = "Removing "; + message += opcode_info->name; + message += " instruction because of incompatible execution model."; + return message; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.h new file mode 100644 index 0000000000000000000000000000000000000000..e661fcec06cc70cbbe9ac37767fa87055d43a2c6 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/replace_invalid_opc.h @@ -0,0 +1,65 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_REPLACE_INVALID_OPC_H_ +#define LIBSPIRV_OPT_REPLACE_INVALID_OPC_H_ + +#include "pass.h" + +namespace spvtools { +namespace opt { + +// This pass will runs on shader modules only. It will replace the result of +// instructions that are valid for shader modules, but not the current shader +// stage, with a constant value. If the instruction does not have a return +// value, the instruction will simply be deleted. +class ReplaceInvalidOpcodePass : public Pass { + public: + const char* name() const override { return "replace-invalid-opcodes"; } + Status Process(ir::IRContext*) override; + + private: + // Returns the execution model that is used by every entry point in the + // module. If more than one execution model is used in the module, then the + // return value is SpvExecutionModelMax. + SpvExecutionModel GetExecutionModel(); + + // Replaces all instructions in |function| that are invalid with execution + // model |mode|, but valid for another shader model, with a special constant + // value. See |GetSpecialConstant|. + bool RewriteFunction(ir::Function* function, SpvExecutionModel mode); + + // Returns true if |inst| is valid for fragment shaders only. + bool IsFragmentShaderOnlyInstruction(ir::Instruction* inst); + + // Replaces all uses of the result of |inst|, if there is one, with the id of + // a special constant. Then |inst| is killed. |inst| cannot be a block + // terminator because the basic block will then become invalid. |inst| is no + // longer valid after calling this function. + void ReplaceInstruction(ir::Instruction* inst, const char* source, + uint32_t line_number, uint32_t column_number); + + // Returns the id of a constant with type |type_id|. The type must be an + // integer, float, or vector. For scalar types, the hex representation of the + // constant will be the concatenation of 0xDEADBEEF with itself until the + // width of the type has been reached. For a vector, each element of the + // constant will be constructed the same way. + uint32_t GetSpecialConstant(uint32_t type_id); + std::string BuildWarningMessage(SpvOp opcode); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_REPLACE_INVALID_OPC_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0920c2ea3a4b9337e456e0c116952c99ec33e04d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.cpp @@ -0,0 +1,976 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/scalar_analysis.h" + +#include +#include +#include +#include + +#include "opt/ir_context.h" + +// Transforms a given scalar operation instruction into a DAG representation. +// +// 1. Take an instruction and traverse its operands until we reach a +// constant node or an instruction which we do not know how to compute the +// value, such as a load. +// +// 2. Create a new node for each instruction traversed and build the nodes for +// the in operands of that instruction as well. +// +// 3. Add the operand nodes as children of the first and hash the node. Use the +// hash to see if the node is already in the cache. We ensure the children are +// always in sorted order so that two nodes with the same children but inserted +// in a different order have the same hash and so that the overloaded operator== +// will return true. If the node is already in the cache return the cached +// version instead. +// +// 4. The created DAG can then be simplified by +// ScalarAnalysis::SimplifyExpression, implemented in +// scalar_analysis_simplification.cpp. See that file for further information on +// the simplification process. +// + +namespace spvtools { +namespace opt { + +uint32_t SENode::NumberOfNodes = 0; + +ScalarEvolutionAnalysis::ScalarEvolutionAnalysis(ir::IRContext* context) + : context_(context) { + // Create and cached the CantComputeNode. + cached_cant_compute_ = + GetCachedOrAdd(std::unique_ptr(new SECantCompute(this))); +} + +SENode* ScalarEvolutionAnalysis::CreateNegation(SENode* operand) { + // If operand is can't compute then the whole graph is can't compute. + if (operand->IsCantCompute()) return CreateCantComputeNode(); + + if (operand->GetType() == SENode::Constant) { + return CreateConstant(-operand->AsSEConstantNode()->FoldToSingleValue()); + } + std::unique_ptr negation_node{new SENegative(this)}; + negation_node->AddChild(operand); + return GetCachedOrAdd(std::move(negation_node)); +} + +SENode* ScalarEvolutionAnalysis::CreateConstant(int64_t integer) { + return GetCachedOrAdd( + std::unique_ptr(new SEConstantNode(this, integer))); +} + +SENode* ScalarEvolutionAnalysis::CreateRecurrentExpression( + const ir::Loop* loop, SENode* offset, SENode* coefficient) { + assert(loop && "Recurrent add expressions must have a valid loop."); + + // If operands are can't compute then the whole graph is can't compute. + if (offset->IsCantCompute() || coefficient->IsCantCompute()) + return CreateCantComputeNode(); + + std::unique_ptr phi_node{new SERecurrentNode(this, loop)}; + phi_node->AddOffset(offset); + phi_node->AddCoefficient(coefficient); + + return GetCachedOrAdd(std::move(phi_node)); +} + +SENode* ScalarEvolutionAnalysis::AnalyzeMultiplyOp( + const ir::Instruction* multiply) { + assert(multiply->opcode() == SpvOp::SpvOpIMul && + "Multiply node did not come from a multiply instruction"); + opt::analysis::DefUseManager* def_use = context_->get_def_use_mgr(); + + SENode* op1 = + AnalyzeInstruction(def_use->GetDef(multiply->GetSingleWordInOperand(0))); + SENode* op2 = + AnalyzeInstruction(def_use->GetDef(multiply->GetSingleWordInOperand(1))); + + return CreateMultiplyNode(op1, op2); +} + +SENode* ScalarEvolutionAnalysis::CreateMultiplyNode(SENode* operand_1, + SENode* operand_2) { + // If operands are can't compute then the whole graph is can't compute. + if (operand_1->IsCantCompute() || operand_2->IsCantCompute()) + return CreateCantComputeNode(); + + if (operand_1->GetType() == SENode::Constant && + operand_2->GetType() == SENode::Constant) { + return CreateConstant(operand_1->AsSEConstantNode()->FoldToSingleValue() * + operand_2->AsSEConstantNode()->FoldToSingleValue()); + } + + std::unique_ptr multiply_node{new SEMultiplyNode(this)}; + + multiply_node->AddChild(operand_1); + multiply_node->AddChild(operand_2); + + return GetCachedOrAdd(std::move(multiply_node)); +} + +SENode* ScalarEvolutionAnalysis::CreateSubtraction(SENode* operand_1, + SENode* operand_2) { + // Fold if both operands are constant. + if (operand_1->GetType() == SENode::Constant && + operand_2->GetType() == SENode::Constant) { + return CreateConstant(operand_1->AsSEConstantNode()->FoldToSingleValue() - + operand_2->AsSEConstantNode()->FoldToSingleValue()); + } + + return CreateAddNode(operand_1, CreateNegation(operand_2)); +} + +SENode* ScalarEvolutionAnalysis::CreateAddNode(SENode* operand_1, + SENode* operand_2) { + // Fold if both operands are constant and the |simplify| flag is true. + if (operand_1->GetType() == SENode::Constant && + operand_2->GetType() == SENode::Constant) { + return CreateConstant(operand_1->AsSEConstantNode()->FoldToSingleValue() + + operand_2->AsSEConstantNode()->FoldToSingleValue()); + } + + // If operands are can't compute then the whole graph is can't compute. + if (operand_1->IsCantCompute() || operand_2->IsCantCompute()) + return CreateCantComputeNode(); + + std::unique_ptr add_node{new SEAddNode(this)}; + + add_node->AddChild(operand_1); + add_node->AddChild(operand_2); + + return GetCachedOrAdd(std::move(add_node)); +} + +SENode* ScalarEvolutionAnalysis::AnalyzeInstruction( + const ir::Instruction* inst) { + auto itr = recurrent_node_map_.find(inst); + if (itr != recurrent_node_map_.end()) return itr->second; + + SENode* output = nullptr; + switch (inst->opcode()) { + case SpvOp::SpvOpPhi: { + output = AnalyzePhiInstruction(inst); + break; + } + case SpvOp::SpvOpConstant: + case SpvOp::SpvOpConstantNull: { + output = AnalyzeConstant(inst); + break; + } + case SpvOp::SpvOpISub: + case SpvOp::SpvOpIAdd: { + output = AnalyzeAddOp(inst); + break; + } + case SpvOp::SpvOpIMul: { + output = AnalyzeMultiplyOp(inst); + break; + } + default: { + output = CreateValueUnknownNode(inst); + break; + } + } + + return output; +} + +SENode* ScalarEvolutionAnalysis::AnalyzeConstant(const ir::Instruction* inst) { + if (inst->opcode() == SpvOp::SpvOpConstantNull) return CreateConstant(0); + + assert(inst->opcode() == SpvOp::SpvOpConstant); + assert(inst->NumInOperands() == 1); + int64_t value = 0; + + // Look up the instruction in the constant manager. + const opt::analysis::Constant* constant = + context_->get_constant_mgr()->FindDeclaredConstant(inst->result_id()); + + if (!constant) return CreateCantComputeNode(); + + const opt::analysis::IntConstant* int_constant = constant->AsIntConstant(); + + // Exit out if it is a 64 bit integer. + if (!int_constant || int_constant->words().size() != 1) + return CreateCantComputeNode(); + + if (int_constant->type()->AsInteger()->IsSigned()) { + value = int_constant->GetS32BitValue(); + } else { + value = int_constant->GetU32BitValue(); + } + + return CreateConstant(value); +} + +// Handles both addition and subtraction. If the |sub| flag is set then the +// addition will be op1+(-op2) otherwise op1+op2. +SENode* ScalarEvolutionAnalysis::AnalyzeAddOp(const ir::Instruction* inst) { + assert((inst->opcode() == SpvOp::SpvOpIAdd || + inst->opcode() == SpvOp::SpvOpISub) && + "Add node must be created from a OpIAdd or OpISub instruction"); + + opt::analysis::DefUseManager* def_use = context_->get_def_use_mgr(); + + SENode* op1 = + AnalyzeInstruction(def_use->GetDef(inst->GetSingleWordInOperand(0))); + + SENode* op2 = + AnalyzeInstruction(def_use->GetDef(inst->GetSingleWordInOperand(1))); + + // To handle subtraction we wrap the second operand in a unary negation node. + if (inst->opcode() == SpvOp::SpvOpISub) { + op2 = CreateNegation(op2); + } + + return CreateAddNode(op1, op2); +} + +SENode* ScalarEvolutionAnalysis::AnalyzePhiInstruction( + const ir::Instruction* phi) { + // The phi should only have two incoming value pairs. + if (phi->NumInOperands() != 4) { + return CreateCantComputeNode(); + } + + opt::analysis::DefUseManager* def_use = context_->get_def_use_mgr(); + + // Get the basic block this instruction belongs to. + ir::BasicBlock* basic_block = + context_->get_instr_block(const_cast(phi)); + + // And then the function that the basic blocks belongs to. + ir::Function* function = basic_block->GetParent(); + + // Use the function to get the loop descriptor. + ir::LoopDescriptor* loop_descriptor = context_->GetLoopDescriptor(function); + + // We only handle phis in loops at the moment. + if (!loop_descriptor) return CreateCantComputeNode(); + + // Get the innermost loop which this block belongs to. + ir::Loop* loop = (*loop_descriptor)[basic_block->id()]; + + // If the loop doesn't exist or doesn't have a preheader or latch block, exit + // out. + if (!loop || !loop->GetLatchBlock() || !loop->GetPreHeaderBlock() || + loop->GetHeaderBlock() != basic_block) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + std::unique_ptr phi_node{new SERecurrentNode(this, loop)}; + + // We add the node to this map to allow it to be returned before the node is + // fully built. This is needed as the subsequent call to AnalyzeInstruction + // could lead back to this |phi| instruction so we return the pointer + // immediately in AnalyzeInstruction to break the recursion. + recurrent_node_map_[phi] = phi_node.get(); + + // Traverse the operands of the instruction an create new nodes for each one. + for (uint32_t i = 0; i < phi->NumInOperands(); i += 2) { + uint32_t value_id = phi->GetSingleWordInOperand(i); + uint32_t incoming_label_id = phi->GetSingleWordInOperand(i + 1); + + ir::Instruction* value_inst = def_use->GetDef(value_id); + SENode* value_node = AnalyzeInstruction(value_inst); + + // If any operand is CantCompute then the whole graph is CantCompute. + if (value_node->IsCantCompute()) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + // If the value is coming from the preheader block then the value is the + // initial value of the phi. + if (incoming_label_id == loop->GetPreHeaderBlock()->id()) { + phi_node->AddOffset(value_node); + } else if (incoming_label_id == loop->GetLatchBlock()->id()) { + // Assumed to be in the form of step + phi. + if (value_node->GetType() != SENode::Add) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + SENode* step_node = nullptr; + SENode* phi_operand = nullptr; + SENode* operand_1 = value_node->GetChild(0); + SENode* operand_2 = value_node->GetChild(1); + + // Find which node is the step term. + if (!operand_1->AsSERecurrentNode()) + step_node = operand_1; + else if (!operand_2->AsSERecurrentNode()) + step_node = operand_2; + + // Find which node is the recurrent expression. + if (operand_1->AsSERecurrentNode()) + phi_operand = operand_1; + else if (operand_2->AsSERecurrentNode()) + phi_operand = operand_2; + + // If it is not in the form step + phi exit out. + if (!(step_node && phi_operand)) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + // If the phi operand is not the same phi node exit out. + if (phi_operand != phi_node.get()) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + if (!IsLoopInvariant(loop, step_node)) + return recurrent_node_map_[phi] = CreateCantComputeNode(); + + phi_node->AddCoefficient(step_node); + } + } + + // Once the node is fully built we update the map with the version from the + // cache (if it has already been added to the cache). + return recurrent_node_map_[phi] = GetCachedOrAdd(std::move(phi_node)); +} + +SENode* ScalarEvolutionAnalysis::CreateValueUnknownNode( + const ir::Instruction* inst) { + std::unique_ptr load_node{ + new SEValueUnknown(this, inst->result_id())}; + return GetCachedOrAdd(std::move(load_node)); +} + +SENode* ScalarEvolutionAnalysis::CreateCantComputeNode() { + return cached_cant_compute_; +} + +// Add the created node into the cache of nodes. If it already exists return it. +SENode* ScalarEvolutionAnalysis::GetCachedOrAdd( + std::unique_ptr prospective_node) { + auto itr = node_cache_.find(prospective_node); + if (itr != node_cache_.end()) { + return (*itr).get(); + } + + SENode* raw_ptr_to_node = prospective_node.get(); + node_cache_.insert(std::move(prospective_node)); + return raw_ptr_to_node; +} + +bool ScalarEvolutionAnalysis::IsLoopInvariant(const ir::Loop* loop, + const SENode* node) const { + for (auto itr = node->graph_cbegin(); itr != node->graph_cend(); ++itr) { + if (const SERecurrentNode* rec = itr->AsSERecurrentNode()) { + const ir::BasicBlock* header = rec->GetLoop()->GetHeaderBlock(); + + // If the loop which the recurrent expression belongs to is either |loop + // or a nested loop inside |loop| then we assume it is variant. + if (loop->IsInsideLoop(header)) { + return false; + } + } else if (const SEValueUnknown* unknown = itr->AsSEValueUnknown()) { + // If the instruction is inside the loop we conservatively assume it is + // loop variant. + if (loop->IsInsideLoop(unknown->ResultId())) return false; + } + } + + return true; +} + +SENode* ScalarEvolutionAnalysis::GetCoefficientFromRecurrentTerm( + SENode* node, const ir::Loop* loop) { + // Traverse the DAG to find the recurrent expression belonging to |loop|. + for (auto itr = node->graph_begin(); itr != node->graph_end(); ++itr) { + SERecurrentNode* rec = itr->AsSERecurrentNode(); + if (rec && rec->GetLoop() == loop) { + return rec->GetCoefficient(); + } + } + return CreateConstant(0); +} + +SENode* ScalarEvolutionAnalysis::UpdateChildNode(SENode* parent, + SENode* old_child, + SENode* new_child) { + // Only handles add. + if (parent->GetType() != SENode::Add) return parent; + + std::vector new_children; + for (SENode* child : *parent) { + if (child == old_child) { + new_children.push_back(new_child); + } else { + new_children.push_back(child); + } + } + + std::unique_ptr add_node{new SEAddNode(this)}; + for (SENode* child : new_children) { + add_node->AddChild(child); + } + + return SimplifyExpression(GetCachedOrAdd(std::move(add_node))); +} + +// Rebuild the |node| eliminating, if it exists, the recurrent term which +// belongs to the |loop|. +SENode* ScalarEvolutionAnalysis::BuildGraphWithoutRecurrentTerm( + SENode* node, const ir::Loop* loop) { + // If the node is already a recurrent expression belonging to loop then just + // return the offset. + SERecurrentNode* recurrent = node->AsSERecurrentNode(); + if (recurrent) { + if (recurrent->GetLoop() == loop) { + return recurrent->GetOffset(); + } else { + return node; + } + } + + std::vector new_children; + // Otherwise find the recurrent node in the children of this node. + for (auto itr : *node) { + recurrent = itr->AsSERecurrentNode(); + if (recurrent && recurrent->GetLoop() == loop) { + new_children.push_back(recurrent->GetOffset()); + } else { + new_children.push_back(itr); + } + } + + std::unique_ptr add_node{new SEAddNode(this)}; + for (SENode* child : new_children) { + add_node->AddChild(child); + } + + return SimplifyExpression(GetCachedOrAdd(std::move(add_node))); +} + +// Return the recurrent term belonging to |loop| if it appears in the graph +// starting at |node| or null if it doesn't. +SERecurrentNode* ScalarEvolutionAnalysis::GetRecurrentTerm( + SENode* node, const ir::Loop* loop) { + for (auto itr = node->graph_begin(); itr != node->graph_end(); ++itr) { + SERecurrentNode* rec = itr->AsSERecurrentNode(); + if (rec && rec->GetLoop() == loop) { + return rec; + } + } + return nullptr; +} +std::string SENode::AsString() const { + switch (GetType()) { + case Constant: + return "Constant"; + case RecurrentAddExpr: + return "RecurrentAddExpr"; + case Add: + return "Add"; + case Negative: + return "Negative"; + case Multiply: + return "Multiply"; + case ValueUnknown: + return "Value Unknown"; + case CanNotCompute: + return "Can not compute"; + } + return "NULL"; +} + +bool SENode::operator==(const SENode& other) const { + if (GetType() != other.GetType()) return false; + + if (other.GetChildren().size() != children_.size()) return false; + + const SERecurrentNode* this_as_recurrent = AsSERecurrentNode(); + + // Check the children are the same, for SERecurrentNodes we need to check the + // offset and coefficient manually as the child vector is sorted by ids so the + // offset/coefficient information is lost. + if (!this_as_recurrent) { + for (size_t index = 0; index < children_.size(); ++index) { + if (other.GetChildren()[index] != children_[index]) return false; + } + } else { + const SERecurrentNode* other_as_recurrent = other.AsSERecurrentNode(); + + // We've already checked the types are the same, this should not fail if + // this->AsSERecurrentNode() succeeded. + assert(other_as_recurrent); + + if (this_as_recurrent->GetCoefficient() != + other_as_recurrent->GetCoefficient()) + return false; + + if (this_as_recurrent->GetOffset() != other_as_recurrent->GetOffset()) + return false; + + if (this_as_recurrent->GetLoop() != other_as_recurrent->GetLoop()) + return false; + } + + // If we're dealing with a value unknown node check both nodes were created by + // the same instruction. + if (GetType() == SENode::ValueUnknown) { + if (AsSEValueUnknown()->ResultId() != + other.AsSEValueUnknown()->ResultId()) { + return false; + } + } + + if (AsSEConstantNode()) { + if (AsSEConstantNode()->FoldToSingleValue() != + other.AsSEConstantNode()->FoldToSingleValue()) + return false; + } + + return true; +} + +bool SENode::operator!=(const SENode& other) const { return !(*this == other); } + +namespace { +// Helper functions to insert 32/64 bit values into the 32 bit hash string. This +// allows us to add pointers to the string by reinterpreting the pointers as +// uintptr_t. PushToString will deduce the type, call sizeof on it and use +// that size to call into the correct PushToStringImpl functor depending on +// whether it is 32 or 64 bit. + +template +struct PushToStringImpl; + +template +struct PushToStringImpl { + void operator()(T id, std::u32string* str) { + str->push_back(static_cast(id >> 32)); + str->push_back(static_cast(id)); + } +}; + +template +struct PushToStringImpl { + void operator()(T id, std::u32string* str) { + str->push_back(static_cast(id)); + } +}; + +template +static void PushToString(T id, std::u32string* str) { + PushToStringImpl{}(id, str); +} + +} // namespace + +// Implements the hashing of SENodes. +size_t SENodeHash::operator()(const SENode* node) const { + // Concatinate the terms into a string which we can hash. + std::u32string hash_string{}; + + // Hashing the type as a string is safer than hashing the enum as the enum is + // very likely to collide with constants. + for (char ch : node->AsString()) { + hash_string.push_back(static_cast(ch)); + } + + // We just ignore the literal value unless it is a constant. + if (node->GetType() == SENode::Constant) + PushToString(node->AsSEConstantNode()->FoldToSingleValue(), &hash_string); + + const SERecurrentNode* recurrent = node->AsSERecurrentNode(); + + // If we're dealing with a recurrent expression hash the loop as well so that + // nested inductions like i=0,i++ and j=0,j++ correspond to different nodes. + if (recurrent) { + PushToString(reinterpret_cast(recurrent->GetLoop()), + &hash_string); + + // Recurrent expressions can't be hashed using the normal method as the + // order of coefficient and offset matters to the hash. + PushToString(reinterpret_cast(recurrent->GetCoefficient()), + &hash_string); + PushToString(reinterpret_cast(recurrent->GetOffset()), + &hash_string); + + return std::hash{}(hash_string); + } + + // Hash the result id of the original instruction which created this node if + // it is a value unknown node. + if (node->GetType() == SENode::ValueUnknown) { + PushToString(node->AsSEValueUnknown()->ResultId(), &hash_string); + } + + // Hash the pointers of the child nodes, each SENode has a unique pointer + // associated with it. + const std::vector& children = node->GetChildren(); + for (const SENode* child : children) { + PushToString(reinterpret_cast(child), &hash_string); + } + + return std::hash{}(hash_string); +} + +// This overload is the actual overload used by the node_cache_ set. +size_t SENodeHash::operator()(const std::unique_ptr& node) const { + return this->operator()(node.get()); +} + +void SENode::DumpDot(std::ostream& out, bool recurse) const { + size_t unique_id = std::hash{}(this); + out << unique_id << " [label=\"" << AsString() << " "; + if (GetType() == SENode::Constant) { + out << "\nwith value: " << this->AsSEConstantNode()->FoldToSingleValue(); + } + out << "\"]\n"; + for (const SENode* child : children_) { + size_t child_unique_id = std::hash{}(child); + out << unique_id << " -> " << child_unique_id << " \n"; + if (recurse) child->DumpDot(out, true); + } +} + +namespace { +class IsGreaterThanZero { + public: + explicit IsGreaterThanZero(ir::IRContext* context) : context_(context) {} + + // Determine if the value of |node| is always strictly greater than zero if + // |or_equal_zero| is false or greater or equal to zero if |or_equal_zero| is + // true. It returns true is the evaluation was able to conclude something, in + // which case the result is stored in |result|. + // The algorithm work by going through all the nodes and determine the + // sign of each of them. + bool Eval(const SENode* node, bool or_equal_zero, bool* result) { + *result = false; + switch (Visit(node)) { + case Signedness::kPositiveOrNegative: { + return false; + } + case Signedness::kStrictlyNegative: { + *result = false; + break; + } + case Signedness::kNegative: { + if (!or_equal_zero) { + return false; + } + *result = false; + break; + } + case Signedness::kStrictlyPositive: { + *result = true; + break; + } + case Signedness::kPositive: { + if (!or_equal_zero) { + return false; + } + *result = true; + break; + } + } + return true; + } + + private: + enum class Signedness { + kPositiveOrNegative, // Yield a value positive or negative. + kStrictlyNegative, // Yield a value strictly less than 0. + kNegative, // Yield a value less or equal to 0. + kStrictlyPositive, // Yield a value strictly greater than 0. + kPositive // Yield a value greater or equal to 0. + }; + + // Combine the signedness according to arithmetic rules of a given operator. + using Combiner = std::function; + + // Returns a functor to interpret the signedness of 2 expressions as if they + // were added. + Combiner GetAddCombiner() const { + return [](Signedness lhs, Signedness rhs) { + switch (lhs) { + case Signedness::kPositiveOrNegative: + break; + case Signedness::kStrictlyNegative: + if (rhs == Signedness::kStrictlyNegative || + rhs == Signedness::kNegative) + return lhs; + break; + case Signedness::kNegative: { + if (rhs == Signedness::kStrictlyNegative) + return Signedness::kStrictlyNegative; + if (rhs == Signedness::kNegative) return Signedness::kNegative; + break; + } + case Signedness::kStrictlyPositive: { + if (rhs == Signedness::kStrictlyPositive || + rhs == Signedness::kPositive) { + return Signedness::kStrictlyPositive; + } + break; + } + case Signedness::kPositive: { + if (rhs == Signedness::kStrictlyPositive) + return Signedness::kStrictlyPositive; + if (rhs == Signedness::kPositive) return Signedness::kPositive; + break; + } + } + return Signedness::kPositiveOrNegative; + }; + } + + // Returns a functor to interpret the signedness of 2 expressions as if they + // were multiplied. + Combiner GetMulCombiner() const { + return [](Signedness lhs, Signedness rhs) { + switch (lhs) { + case Signedness::kPositiveOrNegative: + break; + case Signedness::kStrictlyNegative: { + switch (rhs) { + case Signedness::kPositiveOrNegative: { + break; + } + case Signedness::kStrictlyNegative: { + return Signedness::kStrictlyPositive; + } + case Signedness::kNegative: { + return Signedness::kPositive; + } + case Signedness::kStrictlyPositive: { + return Signedness::kStrictlyNegative; + } + case Signedness::kPositive: { + return Signedness::kNegative; + } + } + break; + } + case Signedness::kNegative: { + switch (rhs) { + case Signedness::kPositiveOrNegative: { + break; + } + case Signedness::kStrictlyNegative: + case Signedness::kNegative: { + return Signedness::kPositive; + } + case Signedness::kStrictlyPositive: + case Signedness::kPositive: { + return Signedness::kNegative; + } + } + break; + } + case Signedness::kStrictlyPositive: { + return rhs; + } + case Signedness::kPositive: { + switch (rhs) { + case Signedness::kPositiveOrNegative: { + break; + } + case Signedness::kStrictlyNegative: + case Signedness::kNegative: { + return Signedness::kNegative; + } + case Signedness::kStrictlyPositive: + case Signedness::kPositive: { + return Signedness::kPositive; + } + } + break; + } + } + return Signedness::kPositiveOrNegative; + }; + } + + Signedness Visit(const SENode* node) { + switch (node->GetType()) { + case SENode::Constant: + return Visit(node->AsSEConstantNode()); + break; + case SENode::RecurrentAddExpr: + return Visit(node->AsSERecurrentNode()); + break; + case SENode::Negative: + return Visit(node->AsSENegative()); + break; + case SENode::CanNotCompute: + return Visit(node->AsSECantCompute()); + break; + case SENode::ValueUnknown: + return Visit(node->AsSEValueUnknown()); + break; + case SENode::Add: + return VisitExpr(node, GetAddCombiner()); + break; + case SENode::Multiply: + return VisitExpr(node, GetMulCombiner()); + break; + } + return Signedness::kPositiveOrNegative; + } + + // Returns the signedness of a constant |node|. + Signedness Visit(const SEConstantNode* node) { + if (0 == node->FoldToSingleValue()) return Signedness::kPositive; + if (0 < node->FoldToSingleValue()) return Signedness::kStrictlyPositive; + if (0 > node->FoldToSingleValue()) return Signedness::kStrictlyNegative; + return Signedness::kPositiveOrNegative; + } + + // Returns the signedness of an unknown |node| based on its type. + Signedness Visit(const SEValueUnknown* node) { + ir::Instruction* insn = + context_->get_def_use_mgr()->GetDef(node->ResultId()); + analysis::Type* type = context_->get_type_mgr()->GetType(insn->type_id()); + assert(type && "Can't retrieve a type for the instruction"); + analysis::Integer* int_type = type->AsInteger(); + assert(type && "Can't retrieve an integer type for the instruction"); + return int_type->IsSigned() ? Signedness::kPositiveOrNegative + : Signedness::kPositive; + } + + // Returns the signedness of a recurring expression. + Signedness Visit(const SERecurrentNode* node) { + Signedness coeff_sign = Visit(node->GetCoefficient()); + // SERecurrentNode represent an affine expression in the range [0, + // loop_bound], so the result cannot be strictly positive or negative. + switch (coeff_sign) { + default: + break; + case Signedness::kStrictlyNegative: + coeff_sign = Signedness::kNegative; + break; + case Signedness::kStrictlyPositive: + coeff_sign = Signedness::kPositive; + break; + } + return GetAddCombiner()(coeff_sign, Visit(node->GetOffset())); + } + + // Returns the signedness of a negation |node|. + Signedness Visit(const SENegative* node) { + switch (Visit(*node->begin())) { + case Signedness::kPositiveOrNegative: { + return Signedness::kPositiveOrNegative; + } + case Signedness::kStrictlyNegative: { + return Signedness::kStrictlyPositive; + } + case Signedness::kNegative: { + return Signedness::kPositive; + } + case Signedness::kStrictlyPositive: { + return Signedness::kStrictlyNegative; + } + case Signedness::kPositive: { + return Signedness::kNegative; + } + } + return Signedness::kPositiveOrNegative; + } + + Signedness Visit(const SECantCompute*) { + return Signedness::kPositiveOrNegative; + } + + // Returns the signedness of a binary expression by using the combiner + // |reduce|. + Signedness VisitExpr( + const SENode* node, + std::function reduce) { + Signedness result = Visit(*node->begin()); + for (const SENode* operand : ir::make_range(++node->begin(), node->end())) { + if (result == Signedness::kPositiveOrNegative) { + return Signedness::kPositiveOrNegative; + } + result = reduce(result, Visit(operand)); + } + return result; + } + + ir::IRContext* context_; +}; +} // namespace + +bool ScalarEvolutionAnalysis::IsAlwaysGreaterThanZero(SENode* node, + bool* is_gt_zero) const { + return IsGreaterThanZero(context_).Eval(node, false, is_gt_zero); +} + +bool ScalarEvolutionAnalysis::IsAlwaysGreaterOrEqualToZero( + SENode* node, bool* is_ge_zero) const { + return IsGreaterThanZero(context_).Eval(node, true, is_ge_zero); +} + +namespace { + +// Remove |node| from the |mul| chain (of the form A * ... * |node| * ... * Z), +// if |node| is not in the chain, returns the original chain. +static SENode* RemoveOneNodeFromMultiplyChain(SEMultiplyNode* mul, + const SENode* node) { + SENode* lhs = mul->GetChildren()[0]; + SENode* rhs = mul->GetChildren()[1]; + if (lhs == node) { + return rhs; + } + if (rhs == node) { + return lhs; + } + if (lhs->AsSEMultiplyNode()) { + SENode* res = RemoveOneNodeFromMultiplyChain(lhs->AsSEMultiplyNode(), node); + if (res != lhs) + return mul->GetParentAnalysis()->CreateMultiplyNode(res, rhs); + } + if (rhs->AsSEMultiplyNode()) { + SENode* res = RemoveOneNodeFromMultiplyChain(rhs->AsSEMultiplyNode(), node); + if (res != rhs) + return mul->GetParentAnalysis()->CreateMultiplyNode(res, rhs); + } + + return mul; +} +} // namespace + +std::pair SExpression::operator/( + SExpression rhs_wrapper) const { + SENode* lhs = node_; + SENode* rhs = rhs_wrapper.node_; + // Check for division by 0. + if (rhs->AsSEConstantNode() && + !rhs->AsSEConstantNode()->FoldToSingleValue()) { + return {scev_->CreateCantComputeNode(), 0}; + } + + // Trivial case. + if (lhs->AsSEConstantNode() && rhs->AsSEConstantNode()) { + int64_t lhs_value = lhs->AsSEConstantNode()->FoldToSingleValue(); + int64_t rhs_value = rhs->AsSEConstantNode()->FoldToSingleValue(); + return {scev_->CreateConstant(lhs_value / rhs_value), + lhs_value % rhs_value}; + } + + // look for a "c U / U" pattern. + if (lhs->AsSEMultiplyNode()) { + assert(lhs->GetChildren().size() == 2 && + "More than 2 operand for a multiply node."); + SENode* res = RemoveOneNodeFromMultiplyChain(lhs->AsSEMultiplyNode(), rhs); + if (res != lhs) { + return {res, 0}; + } + } + + return {scev_->CreateCantComputeNode(), 0}; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.h new file mode 100644 index 0000000000000000000000000000000000000000..88726c98298386ad539fca8c6bcf6440c977227f --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis.h @@ -0,0 +1,299 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_SCALAR_ANALYSIS_H_ +#define SOURCE_OPT_SCALAR_ANALYSIS_H_ + +#include +#include +#include +#include +#include +#include + +#include "opt/basic_block.h" +#include "opt/instruction.h" +#include "opt/scalar_analysis_nodes.h" + +namespace spvtools { +namespace ir { +class IRContext; +class Loop; +} // namespace ir + +namespace opt { + +// Manager for the Scalar Evolution analysis. Creates and maintains a DAG of +// scalar operations generated from analysing the use def graph from incoming +// instructions. Each node is hashed as it is added so like node (for instance, +// two induction variables i=0,i++ and j=0,j++) become the same node. After +// creating a DAG with AnalyzeInstruction it can the be simplified into a more +// usable form with SimplifyExpression. +class ScalarEvolutionAnalysis { + public: + explicit ScalarEvolutionAnalysis(ir::IRContext* context); + + // Create a unary negative node on |operand|. + SENode* CreateNegation(SENode* operand); + + // Creates a subtraction between the two operands by adding |operand_1| to the + // negation of |operand_2|. + SENode* CreateSubtraction(SENode* operand_1, SENode* operand_2); + + // Create an addition node between two operands. The |simplify| when set will + // allow the function to return an SEConstant instead of an addition if the + // two input operands are also constant. + SENode* CreateAddNode(SENode* operand_1, SENode* operand_2); + + // Create a multiply node between two operands. + SENode* CreateMultiplyNode(SENode* operand_1, SENode* operand_2); + + // Create a node representing a constant integer. + SENode* CreateConstant(int64_t integer); + + // Create a value unknown node, such as a load. + SENode* CreateValueUnknownNode(const ir::Instruction* inst); + + // Create a CantComputeNode. Used to exit out of analysis. + SENode* CreateCantComputeNode(); + + // Create a new recurrent node with |offset| and |coefficient|, with respect + // to |loop|. + SENode* CreateRecurrentExpression(const ir::Loop* loop, SENode* offset, + SENode* coefficient); + + // Construct the DAG by traversing use def chain of |inst|. + SENode* AnalyzeInstruction(const ir::Instruction* inst); + + // Simplify the |node| by grouping like terms or if contains a recurrent + // expression, rewrite the graph so the whole DAG (from |node| down) is in + // terms of that recurrent expression. + // + // For example. + // Induction variable i=0, i++ would produce Rec(0,1) so i+1 could be + // transformed into Rec(1,1). + // + // X+X*2+Y-Y+34-17 would be transformed into 3*X + 17, where X and Y are + // ValueUnknown nodes (such as a load instruction). + SENode* SimplifyExpression(SENode* node); + + // Add |prospective_node| into the cache and return a raw pointer to it. If + // |prospective_node| is already in the cache just return the raw pointer. + SENode* GetCachedOrAdd(std::unique_ptr prospective_node); + + // Checks that the graph starting from |node| is invariant to the |loop|. + bool IsLoopInvariant(const ir::Loop* loop, const SENode* node) const; + + // Sets |is_gt_zero| to true if |node| represent a value always strictly + // greater than 0. The result of |is_gt_zero| is valid only if the function + // returns true. + bool IsAlwaysGreaterThanZero(SENode* node, bool* is_gt_zero) const; + + // Sets |is_ge_zero| to true if |node| represent a value greater or equals to + // 0. The result of |is_ge_zero| is valid only if the function returns true. + bool IsAlwaysGreaterOrEqualToZero(SENode* node, bool* is_ge_zero) const; + + // Find the recurrent term belonging to |loop| in the graph starting from + // |node| and return the coefficient of that recurrent term. Constant zero + // will be returned if no recurrent could be found. |node| should be in + // simplest form. + SENode* GetCoefficientFromRecurrentTerm(SENode* node, const ir::Loop* loop); + + // Return a rebuilt graph starting from |node| with the recurrent expression + // belonging to |loop| being zeroed out. Returned node will be simplified. + SENode* BuildGraphWithoutRecurrentTerm(SENode* node, const ir::Loop* loop); + + // Return the recurrent term belonging to |loop| if it appears in the graph + // starting at |node| or null if it doesn't. + SERecurrentNode* GetRecurrentTerm(SENode* node, const ir::Loop* loop); + + SENode* UpdateChildNode(SENode* parent, SENode* child, SENode* new_child); + + private: + SENode* AnalyzeConstant(const ir::Instruction* inst); + + // Handles both addition and subtraction. If the |instruction| is OpISub + // then the resulting node will be op1+(-op2) otherwise if it is OpIAdd then + // the result will be op1+op2. |instruction| must be OpIAdd or OpISub. + SENode* AnalyzeAddOp(const ir::Instruction* instruction); + + SENode* AnalyzeMultiplyOp(const ir::Instruction* multiply); + + SENode* AnalyzePhiInstruction(const ir::Instruction* phi); + + ir::IRContext* context_; + + // A map of instructions to SENodes. This is used to track recurrent + // expressions as they are added when analyzing instructions. Recurrent + // expressions come from phi nodes which by nature can include recursion so we + // check if nodes have already been built when analyzing instructions. + std::map recurrent_node_map_; + + // On creation we create and cache the CantCompute node so we not need to + // perform a needless create step. + SENode* cached_cant_compute_; + + // Helper functor to allow two unique_ptr to nodes to be compare. Only + // needed + // for the unordered_set implementation. + struct NodePointersEquality { + bool operator()(const std::unique_ptr& lhs, + const std::unique_ptr& rhs) const { + return *lhs == *rhs; + } + }; + + // Cache of nodes. All pointers to the nodes are references to the memory + // managed by they set. + std::unordered_set, SENodeHash, NodePointersEquality> + node_cache_; +}; + +// Wrapping class to manipulate SENode pointer using + - * / operators. +class SExpression { + public: + // Implicit on purpose ! + SExpression(SENode* node) + : node_(node->GetParentAnalysis()->SimplifyExpression(node)), + scev_(node->GetParentAnalysis()) {} + + inline operator SENode*() const { return node_; } + inline SENode* operator->() const { return node_; } + const SENode& operator*() const { return *node_; } + + inline ScalarEvolutionAnalysis* GetScalarEvolutionAnalysis() const { + return scev_; + } + + inline SExpression operator+(SENode* rhs) const; + template ::value, int>::type = 0> + inline SExpression operator+(T integer) const; + inline SExpression operator+(SExpression rhs) const; + + inline SExpression operator-() const; + inline SExpression operator-(SENode* rhs) const; + template ::value, int>::type = 0> + inline SExpression operator-(T integer) const; + inline SExpression operator-(SExpression rhs) const; + + inline SExpression operator*(SENode* rhs) const; + template ::value, int>::type = 0> + inline SExpression operator*(T integer) const; + inline SExpression operator*(SExpression rhs) const; + + template ::value, int>::type = 0> + inline std::pair operator/(T integer) const; + // Try to perform a division. Returns the pair . If it fails to simplify it, the function returns a + // CanNotCompute node. + std::pair operator/(SExpression rhs) const; + + private: + SENode* node_; + ScalarEvolutionAnalysis* scev_; +}; + +inline SExpression SExpression::operator+(SENode* rhs) const { + return scev_->CreateAddNode(node_, rhs); +} + +template ::value, int>::type> +inline SExpression SExpression::operator+(T integer) const { + return *this + scev_->CreateConstant(integer); +} + +inline SExpression SExpression::operator+(SExpression rhs) const { + return *this + rhs.node_; +} + +inline SExpression SExpression::operator-() const { + return scev_->CreateNegation(node_); +} + +inline SExpression SExpression::operator-(SENode* rhs) const { + return *this + scev_->CreateNegation(rhs); +} + +template ::value, int>::type> +inline SExpression SExpression::operator-(T integer) const { + return *this - scev_->CreateConstant(integer); +} + +inline SExpression SExpression::operator-(SExpression rhs) const { + return *this - rhs.node_; +} + +inline SExpression SExpression::operator*(SENode* rhs) const { + return scev_->CreateMultiplyNode(node_, rhs); +} + +template ::value, int>::type> +inline SExpression SExpression::operator*(T integer) const { + return *this * scev_->CreateConstant(integer); +} + +inline SExpression SExpression::operator*(SExpression rhs) const { + return *this * rhs.node_; +} + +template ::value, int>::type> +inline std::pair SExpression::operator/(T integer) const { + return *this / scev_->CreateConstant(integer); +} + +template ::value, int>::type> +inline SExpression operator+(T lhs, SExpression rhs) { + return rhs + lhs; +} +inline SExpression operator+(SENode* lhs, SExpression rhs) { return rhs + lhs; } + +template ::value, int>::type> +inline SExpression operator-(T lhs, SExpression rhs) { + return SExpression{rhs.GetScalarEvolutionAnalysis()->CreateConstant(lhs)} - + rhs; +} +inline SExpression operator-(SENode* lhs, SExpression rhs) { + return SExpression{lhs} - rhs; +} + +template ::value, int>::type> +inline SExpression operator*(T lhs, SExpression rhs) { + return rhs * lhs; +} +inline SExpression operator*(SENode* lhs, SExpression rhs) { return rhs * lhs; } + +template ::value, int>::type> +inline std::pair operator/(T lhs, SExpression rhs) { + return SExpression{rhs.GetScalarEvolutionAnalysis()->CreateConstant(lhs)} / + rhs; +} +inline std::pair operator/(SENode* lhs, SExpression rhs) { + return SExpression{lhs} / rhs; +} + +} // namespace opt +} // namespace spvtools +#endif // SOURCE_OPT_SCALAR_ANALYSIS_H__ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_nodes.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_nodes.h new file mode 100644 index 0000000000000000000000000000000000000000..f9fdb6bd003cc2af25fb595997bde1c22b21d2f0 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_nodes.h @@ -0,0 +1,349 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASI, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_SCALAR_ANALYSIS_NODES_H_ +#define SOURCE_OPT_SCALAR_ANALYSIS_NODES_H_ + +#include +#include +#include +#include +#include "opt/tree_iterator.h" + +namespace spvtools { +namespace ir { +class Loop; +} // namespace ir + +namespace opt { + +class ScalarEvolutionAnalysis; +class SEConstantNode; +class SERecurrentNode; +class SEAddNode; +class SEMultiplyNode; +class SENegative; +class SEValueUnknown; +class SECantCompute; + +// Abstract class representing a node in the scalar evolution DAG. Each node +// contains a vector of pointers to its children and each subclass of SENode +// implements GetType and an As method to allow casting. SENodes can be hashed +// using the SENodeHash functor. The vector of children is sorted when a node is +// added. This is important as it allows the hash of X+Y to be the same as Y+X. +class SENode { + public: + enum SENodeType { + Constant, + RecurrentAddExpr, + Add, + Multiply, + Negative, + ValueUnknown, + CanNotCompute + }; + + using ChildContainerType = std::vector; + + explicit SENode(opt::ScalarEvolutionAnalysis* parent_analysis) + : parent_analysis_(parent_analysis), unique_id_(++NumberOfNodes) {} + + virtual SENodeType GetType() const = 0; + + virtual ~SENode() {} + + virtual inline void AddChild(SENode* child) { + // If this is a constant node, assert. + if (AsSEConstantNode()) { + assert(false && "Trying to add a child node to a constant!"); + } + + // Find the first point in the vector where |child| is greater than the node + // currently in the vector. + auto find_first_less_than = [child](const SENode* node) { + return child->unique_id_ <= node->unique_id_; + }; + + auto position = std::find_if_not(children_.begin(), children_.end(), + find_first_less_than); + // Children are sorted so the hashing and equality operator will be the same + // for a node with the same children. X+Y should be the same as Y+X. + children_.insert(position, child); + } + + // Get the type as an std::string. This is used to represent the node in the + // dot output and is used to hash the type as well. + std::string AsString() const; + + // Dump the SENode and its immediate children, if |recurse| is true then it + // will recurse through all children to print the DAG starting from this node + // as a root. + void DumpDot(std::ostream& out, bool recurse = false) const; + + // Checks if two nodes are the same by hashing them. + bool operator==(const SENode& other) const; + + // Checks if two nodes are not the same by comparing the hashes. + bool operator!=(const SENode& other) const; + + // Return the child node at |index|. + inline SENode* GetChild(size_t index) { return children_[index]; } + inline const SENode* GetChild(size_t index) const { return children_[index]; } + + // Iterator to iterate over the child nodes. + using iterator = ChildContainerType::iterator; + using const_iterator = ChildContainerType::const_iterator; + + // Iterate over immediate child nodes. + iterator begin() { return children_.begin(); } + iterator end() { return children_.end(); } + + // Constant overloads for iterating over immediate child nodes. + const_iterator begin() const { return children_.cbegin(); } + const_iterator end() const { return children_.cend(); } + const_iterator cbegin() { return children_.cbegin(); } + const_iterator cend() { return children_.cend(); } + + // Collect all the recurrent nodes in this SENode + std::vector CollectRecurrentNodes() { + std::vector recurrent_nodes{}; + + if (auto recurrent_node = AsSERecurrentNode()) { + recurrent_nodes.push_back(recurrent_node); + } + + for (auto child : GetChildren()) { + auto child_recurrent_nodes = child->CollectRecurrentNodes(); + recurrent_nodes.insert(recurrent_nodes.end(), + child_recurrent_nodes.begin(), + child_recurrent_nodes.end()); + } + + return recurrent_nodes; + } + + // Collect all the value unknown nodes in this SENode + std::vector CollectValueUnknownNodes() { + std::vector value_unknown_nodes{}; + + if (auto value_unknown_node = AsSEValueUnknown()) { + value_unknown_nodes.push_back(value_unknown_node); + } + + for (auto child : GetChildren()) { + auto child_value_unknown_nodes = child->CollectValueUnknownNodes(); + value_unknown_nodes.insert(value_unknown_nodes.end(), + child_value_unknown_nodes.begin(), + child_value_unknown_nodes.end()); + } + + return value_unknown_nodes; + } + + // Iterator to iterate over the entire DAG. Even though we are using the tree + // iterator it should still be safe to iterate over. However, nodes with + // multiple parents will be visited multiple times, unlike in a tree. + using dag_iterator = TreeDFIterator; + using const_dag_iterator = TreeDFIterator; + + // Iterate over all child nodes in the graph. + dag_iterator graph_begin() { return dag_iterator(this); } + dag_iterator graph_end() { return dag_iterator(); } + const_dag_iterator graph_begin() const { return graph_cbegin(); } + const_dag_iterator graph_end() const { return graph_cend(); } + const_dag_iterator graph_cbegin() const { return const_dag_iterator(this); } + const_dag_iterator graph_cend() const { return const_dag_iterator(); } + + // Return the vector of immediate children. + const ChildContainerType& GetChildren() const { return children_; } + ChildContainerType& GetChildren() { return children_; } + + // Return true if this node is a cant compute node. + bool IsCantCompute() const { return GetType() == CanNotCompute; } + +// Implements a casting method for each type. +#define DeclareCastMethod(target) \ + virtual target* As##target() { return nullptr; } \ + virtual const target* As##target() const { return nullptr; } + DeclareCastMethod(SEConstantNode); + DeclareCastMethod(SERecurrentNode); + DeclareCastMethod(SEAddNode); + DeclareCastMethod(SEMultiplyNode); + DeclareCastMethod(SENegative); + DeclareCastMethod(SEValueUnknown); + DeclareCastMethod(SECantCompute); +#undef DeclareCastMethod + + // Get the analysis which has this node in its cache. + inline opt::ScalarEvolutionAnalysis* GetParentAnalysis() const { + return parent_analysis_; + } + + protected: + ChildContainerType children_; + + opt::ScalarEvolutionAnalysis* parent_analysis_; + + // The unique id of this node, assigned on creation by incrementing the static + // node count. + uint32_t unique_id_; + + // The number of nodes created. + static uint32_t NumberOfNodes; +}; + +// Function object to handle the hashing of SENodes. Hashing algorithm hashes +// the type (as a string), the literal value of any constants, and the child +// pointers which are assumed to be unique. +struct SENodeHash { + size_t operator()(const std::unique_ptr& node) const; + size_t operator()(const SENode* node) const; +}; + +// A node representing a constant integer. +class SEConstantNode : public SENode { + public: + SEConstantNode(opt::ScalarEvolutionAnalysis* parent_analysis, int64_t value) + : SENode(parent_analysis), literal_value_(value) {} + + SENodeType GetType() const final { return Constant; } + + int64_t FoldToSingleValue() const { return literal_value_; } + + SEConstantNode* AsSEConstantNode() override { return this; } + const SEConstantNode* AsSEConstantNode() const override { return this; } + + inline void AddChild(SENode*) final { + assert(false && "Attempting to add a child to a constant node!"); + } + + protected: + int64_t literal_value_; +}; + +// A node representing a recurrent expression in the code. A recurrent +// expression is an expression whose value can be expressed as a linear +// expression of the loop iterations. Such as an induction variable. The actual +// value of a recurrent expression is coefficent_ * iteration + offset_, hence +// an induction variable i=0, i++ becomes a recurrent expression with an offset +// of zero and a coefficient of one. +class SERecurrentNode : public SENode { + public: + SERecurrentNode(opt::ScalarEvolutionAnalysis* parent_analysis, + const ir::Loop* loop) + : SENode(parent_analysis), loop_(loop) {} + + SENodeType GetType() const final { return RecurrentAddExpr; } + + inline void AddCoefficient(SENode* child) { + coefficient_ = child; + SENode::AddChild(child); + } + + inline void AddOffset(SENode* child) { + offset_ = child; + SENode::AddChild(child); + } + + inline const SENode* GetCoefficient() const { return coefficient_; } + inline SENode* GetCoefficient() { return coefficient_; } + + inline const SENode* GetOffset() const { return offset_; } + inline SENode* GetOffset() { return offset_; } + + // Return the loop which this recurrent expression is recurring within. + const ir::Loop* GetLoop() const { return loop_; } + + SERecurrentNode* AsSERecurrentNode() override { return this; } + const SERecurrentNode* AsSERecurrentNode() const override { return this; } + + private: + SENode* coefficient_; + SENode* offset_; + const ir::Loop* loop_; +}; + +// A node representing an addition operation between child nodes. +class SEAddNode : public SENode { + public: + explicit SEAddNode(opt::ScalarEvolutionAnalysis* parent_analysis) + : SENode(parent_analysis) {} + + SENodeType GetType() const final { return Add; } + + SEAddNode* AsSEAddNode() override { return this; } + const SEAddNode* AsSEAddNode() const override { return this; } +}; + +// A node representing a multiply operation between child nodes. +class SEMultiplyNode : public SENode { + public: + explicit SEMultiplyNode(opt::ScalarEvolutionAnalysis* parent_analysis) + : SENode(parent_analysis) {} + + SENodeType GetType() const final { return Multiply; } + + SEMultiplyNode* AsSEMultiplyNode() override { return this; } + const SEMultiplyNode* AsSEMultiplyNode() const override { return this; } +}; + +// A node representing a unary negative operation. +class SENegative : public SENode { + public: + explicit SENegative(opt::ScalarEvolutionAnalysis* parent_analysis) + : SENode(parent_analysis) {} + + SENodeType GetType() const final { return Negative; } + + SENegative* AsSENegative() override { return this; } + const SENegative* AsSENegative() const override { return this; } +}; + +// A node representing a value which we do not know the value of, such as a load +// instruction. +class SEValueUnknown : public SENode { + public: + // SEValueUnknowns must come from an instruction |unique_id| is the unique id + // of that instruction. This is so we cancompare value unknowns and have a + // unique value unknown for each instruction. + SEValueUnknown(opt::ScalarEvolutionAnalysis* parent_analysis, + uint32_t result_id) + : SENode(parent_analysis), result_id_(result_id) {} + + SENodeType GetType() const final { return ValueUnknown; } + + SEValueUnknown* AsSEValueUnknown() override { return this; } + const SEValueUnknown* AsSEValueUnknown() const override { return this; } + + inline uint32_t ResultId() const { return result_id_; } + + private: + uint32_t result_id_; +}; + +// A node which we cannot reason about at all. +class SECantCompute : public SENode { + public: + explicit SECantCompute(opt::ScalarEvolutionAnalysis* parent_analysis) + : SENode(parent_analysis) {} + + SENodeType GetType() const final { return CanNotCompute; } + + SECantCompute* AsSECantCompute() override { return this; } + const SECantCompute* AsSECantCompute() const override { return this; } +}; + +} // namespace opt +} // namespace spvtools +#endif // SOURCE_OPT_SCALAR_ANALYSIS_NODES_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_simplification.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_simplification.cpp new file mode 100644 index 0000000000000000000000000000000000000000..018896a466dd8eb41e04fe7bc7f0587b4643cc5f --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_analysis_simplification.cpp @@ -0,0 +1,539 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "opt/scalar_analysis.h" + +#include +#include +#include +#include +#include +#include +#include + +// Simplifies scalar analysis DAGs. +// +// 1. Given a node passed to SimplifyExpression we first simplify the graph by +// calling SimplifyPolynomial. This groups like nodes following basic arithmetic +// rules, so multiple adds of the same load instruction could be grouped into a +// single multiply of that instruction. SimplifyPolynomial will traverse the DAG +// and build up an accumulator buffer for each class of instruction it finds. +// For example take the loop: +// for (i=0, i accumulators_; +}; + +// From a |multiply| build up the accumulator objects. +bool SENodeSimplifyImpl::AccumulatorsFromMultiply(SENode* multiply, + bool negation) { + if (multiply->GetChildren().size() != 2 || + multiply->GetType() != SENode::Multiply) + return false; + + SENode* operand_1 = multiply->GetChild(0); + SENode* operand_2 = multiply->GetChild(1); + + SENode* value_unknown = nullptr; + SENode* constant = nullptr; + + // Work out which operand is the unknown value. + if (operand_1->GetType() == SENode::ValueUnknown || + operand_1->GetType() == SENode::RecurrentAddExpr) + value_unknown = operand_1; + else if (operand_2->GetType() == SENode::ValueUnknown || + operand_2->GetType() == SENode::RecurrentAddExpr) + value_unknown = operand_2; + + // Work out which operand is the constant coefficient. + if (operand_1->GetType() == SENode::Constant) + constant = operand_1; + else if (operand_2->GetType() == SENode::Constant) + constant = operand_2; + + // If the expression is not a variable multiplied by a constant coefficient, + // exit out. + if (!(value_unknown && constant)) { + return false; + } + + int64_t sign = negation ? -1 : 1; + + auto iterator = accumulators_.find(value_unknown); + int64_t new_value = constant->AsSEConstantNode()->FoldToSingleValue() * sign; + // Add the result of the multiplication to the accumulators. + if (iterator != accumulators_.end()) { + (*iterator).second += new_value; + } else { + accumulators_.insert({value_unknown, new_value}); + } + + return true; +} + +SENode* SENodeSimplifyImpl::Simplify() { + // We only handle graphs with an addition, multiplication, or negation, at the + // root. + if (node_->GetType() != SENode::Add && node_->GetType() != SENode::Multiply && + node_->GetType() != SENode::Negative) + return node_; + + SENode* simplified_polynomial = SimplifyPolynomial(); + + SERecurrentNode* recurrent_expr = nullptr; + node_ = simplified_polynomial; + + // Fold recurrent expressions which are with respect to the same loop into a + // single recurrent expression. + simplified_polynomial = FoldRecurrentAddExpressions(simplified_polynomial); + + simplified_polynomial = + EliminateZeroCoefficientRecurrents(simplified_polynomial); + + // Traverse the immediate children of the new node to find the recurrent + // expression. If there is more than one there is nothing further we can do. + for (SENode* child : simplified_polynomial->GetChildren()) { + if (child->GetType() == SENode::RecurrentAddExpr) { + recurrent_expr = child->AsSERecurrentNode(); + } + } + + // We need to count the number of unique recurrent expressions in the DAG to + // ensure there is only one. + for (auto child_iterator = simplified_polynomial->graph_begin(); + child_iterator != simplified_polynomial->graph_end(); ++child_iterator) { + if (child_iterator->GetType() == SENode::RecurrentAddExpr && + recurrent_expr != child_iterator->AsSERecurrentNode()) { + return simplified_polynomial; + } + } + + if (recurrent_expr) { + return SimplifyRecurrentAddExpression(recurrent_expr); + } + + return simplified_polynomial; +} + +// Traverse the graph to build up the accumulator objects. +void SENodeSimplifyImpl::GatherAccumulatorsFromChildNodes(SENode* new_node, + SENode* child, + bool negation) { + int32_t sign = negation ? -1 : 1; + + if (child->GetType() == SENode::Constant) { + // Collect all the constants and add them together. + constant_accumulator_ += + child->AsSEConstantNode()->FoldToSingleValue() * sign; + + } else if (child->GetType() == SENode::ValueUnknown || + child->GetType() == SENode::RecurrentAddExpr) { + // To rebuild the graph of X+X+X*2 into 4*X we count the occurrences of X + // and create a new node of count*X after. X can either be a ValueUnknown or + // a RecurrentAddExpr. The count for each X is stored in the accumulators_ + // map. + + auto iterator = accumulators_.find(child); + // If we've encountered this term before add to the accumulator for it. + if (iterator == accumulators_.end()) + accumulators_.insert({child, sign}); + else + iterator->second += sign; + + } else if (child->GetType() == SENode::Multiply) { + if (!AccumulatorsFromMultiply(child, negation)) { + new_node->AddChild(child); + } + + } else if (child->GetType() == SENode::Add) { + for (SENode* next_child : *child) { + GatherAccumulatorsFromChildNodes(new_node, next_child, negation); + } + + } else if (child->GetType() == SENode::Negative) { + SENode* negated_node = child->GetChild(0); + GatherAccumulatorsFromChildNodes(new_node, negated_node, !negation); + } else { + // If we can't work out how to fold the expression just add it back into + // the graph. + new_node->AddChild(child); + } +} + +SERecurrentNode* SENodeSimplifyImpl::UpdateCoefficient( + SERecurrentNode* recurrent, int64_t coefficient_update) const { + std::unique_ptr new_recurrent_node{new SERecurrentNode( + recurrent->GetParentAnalysis(), recurrent->GetLoop())}; + + SENode* new_coefficient = analysis_.CreateMultiplyNode( + recurrent->GetCoefficient(), + analysis_.CreateConstant(coefficient_update)); + + // See if the node can be simplified. + SENode* simplified = analysis_.SimplifyExpression(new_coefficient); + if (simplified->GetType() != SENode::CanNotCompute) + new_coefficient = simplified; + + if (coefficient_update < 0) { + new_recurrent_node->AddOffset( + analysis_.CreateNegation(recurrent->GetOffset())); + } else { + new_recurrent_node->AddOffset(recurrent->GetOffset()); + } + + new_recurrent_node->AddCoefficient(new_coefficient); + + return analysis_.GetCachedOrAdd(std::move(new_recurrent_node)) + ->AsSERecurrentNode(); +} + +// Simplify all the terms in the polynomial function. +SENode* SENodeSimplifyImpl::SimplifyPolynomial() { + std::unique_ptr new_add{new SEAddNode(node_->GetParentAnalysis())}; + + // Traverse the graph and gather the accumulators from it. + GatherAccumulatorsFromChildNodes(new_add.get(), node_, false); + + // Fold all the constants into a single constant node. + if (constant_accumulator_ != 0) { + new_add->AddChild(analysis_.CreateConstant(constant_accumulator_)); + } + + for (auto& pair : accumulators_) { + SENode* term = pair.first; + int64_t count = pair.second; + + // We can eliminate the term completely. + if (count == 0) continue; + + if (count == 1) { + new_add->AddChild(term); + } else if (count == -1 && term->GetType() != SENode::RecurrentAddExpr) { + // If the count is -1 we can just add a negative version of that node, + // unless it is a recurrent expression as we would rather the negative + // goes on the recurrent expressions children. This makes it easier to + // work with in other places. + new_add->AddChild(analysis_.CreateNegation(term)); + } else { + // Output value unknown terms as count*term and output recurrent + // expression terms as rec(offset, coefficient + count) offset and + // coefficient are the same as in the original expression. + if (term->GetType() == SENode::ValueUnknown) { + SENode* count_as_constant = analysis_.CreateConstant(count); + new_add->AddChild( + analysis_.CreateMultiplyNode(count_as_constant, term)); + } else { + assert(term->GetType() == SENode::RecurrentAddExpr && + "We only handle value unknowns or recurrent expressions"); + + // Create a new recurrent expression by adding the count to the + // coefficient of the old one. + new_add->AddChild(UpdateCoefficient(term->AsSERecurrentNode(), count)); + } + } + } + + // If there is only one term in the addition left just return that term. + if (new_add->GetChildren().size() == 1) { + return new_add->GetChild(0); + } + + // If there are no terms left in the addition just return 0. + if (new_add->GetChildren().size() == 0) { + return analysis_.CreateConstant(0); + } + + return analysis_.GetCachedOrAdd(std::move(new_add)); +} + +SENode* SENodeSimplifyImpl::FoldRecurrentAddExpressions(SENode* root) { + std::unique_ptr new_node{new SEAddNode(&analysis_)}; + + // A mapping of loops to the list of recurrent expressions which are with + // respect to those loops. + std::map>> + loops_to_recurrent{}; + + bool has_multiple_same_loop_recurrent_terms = false; + + for (SENode* child : *root) { + bool negation = false; + + if (child->GetType() == SENode::Negative) { + child = child->GetChild(0); + negation = true; + } + + if (child->GetType() == SENode::RecurrentAddExpr) { + const ir::Loop* loop = child->AsSERecurrentNode()->GetLoop(); + + SERecurrentNode* rec = child->AsSERecurrentNode(); + if (loops_to_recurrent.find(loop) == loops_to_recurrent.end()) { + loops_to_recurrent[loop] = {std::make_pair(rec, negation)}; + } else { + loops_to_recurrent[loop].push_back(std::make_pair(rec, negation)); + has_multiple_same_loop_recurrent_terms = true; + } + } else { + new_node->AddChild(child); + } + } + + if (!has_multiple_same_loop_recurrent_terms) return root; + + for (auto pair : loops_to_recurrent) { + std::vector>& recurrent_expressions = + pair.second; + const ir::Loop* loop = pair.first; + + std::unique_ptr new_coefficient{new SEAddNode(&analysis_)}; + std::unique_ptr new_offset{new SEAddNode(&analysis_)}; + + for (auto node_pair : recurrent_expressions) { + SERecurrentNode* node = node_pair.first; + bool negative = node_pair.second; + + if (!negative) { + new_coefficient->AddChild(node->GetCoefficient()); + new_offset->AddChild(node->GetOffset()); + } else { + new_coefficient->AddChild( + analysis_.CreateNegation(node->GetCoefficient())); + new_offset->AddChild(analysis_.CreateNegation(node->GetOffset())); + } + } + + std::unique_ptr new_recurrent{ + new SERecurrentNode(&analysis_, loop)}; + + SENode* new_coefficient_simplified = + analysis_.SimplifyExpression(new_coefficient.get()); + + SENode* new_offset_simplified = + analysis_.SimplifyExpression(new_offset.get()); + + if (new_coefficient_simplified->GetType() == SENode::Constant && + new_coefficient_simplified->AsSEConstantNode()->FoldToSingleValue() == + 0) { + return new_offset_simplified; + } + + new_recurrent->AddCoefficient(new_coefficient_simplified); + new_recurrent->AddOffset(new_offset_simplified); + + new_node->AddChild(analysis_.GetCachedOrAdd(std::move(new_recurrent))); + } + + // If we only have one child in the add just return that. + if (new_node->GetChildren().size() == 1) { + return new_node->GetChild(0); + } + + return analysis_.GetCachedOrAdd(std::move(new_node)); +} + +SENode* SENodeSimplifyImpl::EliminateZeroCoefficientRecurrents(SENode* node) { + if (node->GetType() != SENode::Add) return node; + + bool has_change = false; + + std::vector new_children{}; + for (SENode* child : *node) { + if (child->GetType() == SENode::RecurrentAddExpr) { + SENode* coefficient = child->AsSERecurrentNode()->GetCoefficient(); + // If coefficient is zero then we can eliminate the recurrent expression + // entirely and just return the offset as the recurrent expression is + // representing the equation coefficient*iterations + offset. + if (coefficient->GetType() == SENode::Constant && + coefficient->AsSEConstantNode()->FoldToSingleValue() == 0) { + new_children.push_back(child->AsSERecurrentNode()->GetOffset()); + has_change = true; + } else { + new_children.push_back(child); + } + } else { + new_children.push_back(child); + } + } + + if (!has_change) return node; + + std::unique_ptr new_add{new SEAddNode(node_->GetParentAnalysis())}; + + for (SENode* child : new_children) { + new_add->AddChild(child); + } + + return analysis_.GetCachedOrAdd(std::move(new_add)); +} + +SENode* SENodeSimplifyImpl::SimplifyRecurrentAddExpression( + SERecurrentNode* recurrent_expr) { + const std::vector& children = node_->GetChildren(); + + std::unique_ptr recurrent_node{new SERecurrentNode( + recurrent_expr->GetParentAnalysis(), recurrent_expr->GetLoop())}; + + // Create and simplify the new offset node. + std::unique_ptr new_offset{ + new SEAddNode(recurrent_expr->GetParentAnalysis())}; + new_offset->AddChild(recurrent_expr->GetOffset()); + + for (SENode* child : children) { + if (child->GetType() != SENode::RecurrentAddExpr) { + new_offset->AddChild(child); + } + } + + // Simplify the new offset. + SENode* simplified_child = analysis_.SimplifyExpression(new_offset.get()); + + // If the child can be simplified, add the simplified form otherwise, add it + // via the usual caching mechanism. + if (simplified_child->GetType() != SENode::CanNotCompute) { + recurrent_node->AddOffset(simplified_child); + } else { + recurrent_expr->AddOffset(analysis_.GetCachedOrAdd(std::move(new_offset))); + } + + recurrent_node->AddCoefficient(recurrent_expr->GetCoefficient()); + + return analysis_.GetCachedOrAdd(std::move(recurrent_node)); +} + +/* + * Scalar Analysis simplification public methods. + */ + +SENode* ScalarEvolutionAnalysis::SimplifyExpression(SENode* node) { + SENodeSimplifyImpl impl{this, node}; + + return impl.Simplify(); +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e96f70ebfdaf222c00bab01ac0f1f9471fe666c --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp @@ -0,0 +1,694 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "scalar_replacement_pass.h" + +#include "enum_string_mapping.h" +#include "extensions.h" +#include "make_unique.h" +#include "reflect.h" +#include "types.h" + +#include +#include + +namespace spvtools { +namespace opt { + +// Heuristic aggregate element limit. +const uint32_t MAX_NUM_ELEMENTS = 100u; + +Pass::Status ScalarReplacementPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + + Status status = Status::SuccessWithoutChange; + for (auto& f : *get_module()) { + Status functionStatus = ProcessFunction(&f); + if (functionStatus == Status::Failure) + return functionStatus; + else if (functionStatus == Status::SuccessWithChange) + status = functionStatus; + } + + return status; +} + +Pass::Status ScalarReplacementPass::ProcessFunction(ir::Function* function) { + std::queue worklist; + ir::BasicBlock& entry = *function->begin(); + for (auto iter = entry.begin(); iter != entry.end(); ++iter) { + // Function storage class OpVariables must appear as the first instructions + // of the entry block. + if (iter->opcode() != SpvOpVariable) break; + + ir::Instruction* varInst = &*iter; + if (CanReplaceVariable(varInst)) { + worklist.push(varInst); + } + } + + Status status = Status::SuccessWithoutChange; + while (!worklist.empty()) { + ir::Instruction* varInst = worklist.front(); + worklist.pop(); + + if (!ReplaceVariable(varInst, &worklist)) + return Status::Failure; + else + status = Status::SuccessWithChange; + } + + return status; +} + +bool ScalarReplacementPass::ReplaceVariable( + ir::Instruction* inst, std::queue* worklist) { + std::vector replacements; + CreateReplacementVariables(inst, &replacements); + + std::vector dead; + dead.push_back(inst); + if (!get_def_use_mgr()->WhileEachUser( + inst, [this, &replacements, &dead](ir::Instruction* user) { + if (!ir::IsAnnotationInst(user->opcode())) { + switch (user->opcode()) { + case SpvOpLoad: + ReplaceWholeLoad(user, replacements); + dead.push_back(user); + break; + case SpvOpStore: + ReplaceWholeStore(user, replacements); + dead.push_back(user); + break; + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + if (!ReplaceAccessChain(user, replacements)) return false; + dead.push_back(user); + break; + case SpvOpName: + case SpvOpMemberName: + break; + default: + assert(false && "Unexpected opcode"); + break; + } + } + return true; + })) + return false; + + // Clean up some dead code. + while (!dead.empty()) { + ir::Instruction* toKill = dead.back(); + dead.pop_back(); + + context()->KillInst(toKill); + } + + // Attempt to further scalarize. + for (auto var : replacements) { + if (get_def_use_mgr()->NumUsers(var) == 0) { + context()->KillInst(var); + } else if (CanReplaceVariable(var)) { + worklist->push(var); + } + } + + return true; +} + +void ScalarReplacementPass::ReplaceWholeLoad( + ir::Instruction* load, const std::vector& replacements) { + // Replaces the load of the entire composite with a load from each replacement + // variable followed by a composite construction. + ir::BasicBlock* block = context()->get_instr_block(load); + std::vector loads; + loads.reserve(replacements.size()); + ir::BasicBlock::iterator where(load); + for (auto var : replacements) { + // Create a load of each replacement variable. + ir::Instruction* type = GetStorageType(var); + uint32_t loadId = TakeNextId(); + std::unique_ptr newLoad( + new ir::Instruction(context(), SpvOpLoad, type->result_id(), loadId, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}})); + // Copy memory access attributes which start at index 1. Index 0 is the + // pointer to load. + for (uint32_t i = 1; i < load->NumInOperands(); ++i) { + ir::Operand copy(load->GetInOperand(i)); + newLoad->AddOperand(std::move(copy)); + } + where = where.InsertBefore(std::move(newLoad)); + get_def_use_mgr()->AnalyzeInstDefUse(&*where); + context()->set_instr_block(&*where, block); + loads.push_back(&*where); + } + + // Construct a new composite. + uint32_t compositeId = TakeNextId(); + where = load; + std::unique_ptr compositeConstruct(new ir::Instruction( + context(), SpvOpCompositeConstruct, load->type_id(), compositeId, {})); + for (auto l : loads) { + ir::Operand op(SPV_OPERAND_TYPE_ID, + std::initializer_list{l->result_id()}); + compositeConstruct->AddOperand(std::move(op)); + } + where = where.InsertBefore(std::move(compositeConstruct)); + get_def_use_mgr()->AnalyzeInstDefUse(&*where); + context()->set_instr_block(&*where, block); + context()->ReplaceAllUsesWith(load->result_id(), compositeId); +} + +void ScalarReplacementPass::ReplaceWholeStore( + ir::Instruction* store, const std::vector& replacements) { + // Replaces a store to the whole composite with a series of extract and stores + // to each element. + uint32_t storeInput = store->GetSingleWordInOperand(1u); + ir::BasicBlock* block = context()->get_instr_block(store); + ir::BasicBlock::iterator where(store); + uint32_t elementIndex = 0; + for (auto var : replacements) { + // Create the extract. + ir::Instruction* type = GetStorageType(var); + uint32_t extractId = TakeNextId(); + std::unique_ptr extract(new ir::Instruction( + context(), SpvOpCompositeExtract, type->result_id(), extractId, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {storeInput}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {elementIndex++}}})); + auto iter = where.InsertBefore(std::move(extract)); + get_def_use_mgr()->AnalyzeInstDefUse(&*iter); + context()->set_instr_block(&*iter, block); + + // Create the store. + std::unique_ptr newStore( + new ir::Instruction(context(), SpvOpStore, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}, + {SPV_OPERAND_TYPE_ID, {extractId}}})); + // Copy memory access attributes which start at index 2. Index 0 is the + // pointer and index 1 is the data. + for (uint32_t i = 2; i < store->NumInOperands(); ++i) { + ir::Operand copy(store->GetInOperand(i)); + newStore->AddOperand(std::move(copy)); + } + iter = where.InsertBefore(std::move(newStore)); + get_def_use_mgr()->AnalyzeInstDefUse(&*iter); + context()->set_instr_block(&*iter, block); + } +} + +bool ScalarReplacementPass::ReplaceAccessChain( + ir::Instruction* chain, const std::vector& replacements) { + // Replaces the access chain with either another access chain (with one fewer + // indexes) or a direct use of the replacement variable. + uint32_t indexId = chain->GetSingleWordInOperand(1u); + const ir::Instruction* index = get_def_use_mgr()->GetDef(indexId); + size_t indexValue = GetConstantInteger(index); + if (indexValue > replacements.size()) { + // Out of bounds access, this is illegal IR. + return false; + } else { + const ir::Instruction* var = replacements[indexValue]; + if (chain->NumInOperands() > 2) { + // Replace input access chain with another access chain. + ir::BasicBlock::iterator chainIter(chain); + uint32_t replacementId = TakeNextId(); + std::unique_ptr replacementChain(new ir::Instruction( + context(), chain->opcode(), chain->type_id(), replacementId, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}})); + // Add the remaining indexes. + for (uint32_t i = 2; i < chain->NumInOperands(); ++i) { + ir::Operand copy(chain->GetInOperand(i)); + replacementChain->AddOperand(std::move(copy)); + } + auto iter = chainIter.InsertBefore(std::move(replacementChain)); + get_def_use_mgr()->AnalyzeInstDefUse(&*iter); + context()->set_instr_block(&*iter, context()->get_instr_block(chain)); + context()->ReplaceAllUsesWith(chain->result_id(), replacementId); + } else { + // Replace with a use of the variable. + context()->ReplaceAllUsesWith(chain->result_id(), var->result_id()); + } + } + + return true; +} + +void ScalarReplacementPass::CreateReplacementVariables( + ir::Instruction* inst, std::vector* replacements) { + ir::Instruction* type = GetStorageType(inst); + uint32_t elem = 0; + switch (type->opcode()) { + case SpvOpTypeStruct: + type->ForEachInOperand([this, inst, &elem, replacements](uint32_t* id) { + CreateVariable(*id, inst, elem++, replacements); + }); + break; + case SpvOpTypeArray: + for (uint32_t i = 0; i != GetArrayLength(type); ++i) { + CreateVariable(type->GetSingleWordInOperand(0u), inst, i, replacements); + } + break; + + case SpvOpTypeMatrix: + case SpvOpTypeVector: + for (uint32_t i = 0; i != GetNumElements(type); ++i) { + CreateVariable(type->GetSingleWordInOperand(0u), inst, i, replacements); + } + break; + + default: + assert(false && "Unexpected type."); + break; + } + + TransferAnnotations(inst, replacements); +} + +void ScalarReplacementPass::TransferAnnotations( + const ir::Instruction* source, + std::vector* replacements) { + // Only transfer invariant and restrict decorations on the variable. There are + // no type or member decorations that are necessary to transfer. + for (auto inst : + get_decoration_mgr()->GetDecorationsFor(source->result_id(), false)) { + assert(inst->opcode() == SpvOpDecorate); + uint32_t decoration = inst->GetSingleWordInOperand(1u); + if (decoration == SpvDecorationInvariant || + decoration == SpvDecorationRestrict) { + for (auto var : *replacements) { + std::unique_ptr annotation(new ir::Instruction( + context(), SpvOpDecorate, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}, + {SPV_OPERAND_TYPE_DECORATION, {decoration}}})); + for (uint32_t i = 2; i < inst->NumInOperands(); ++i) { + ir::Operand copy(inst->GetInOperand(i)); + annotation->AddOperand(std::move(copy)); + } + context()->AddAnnotationInst(std::move(annotation)); + get_def_use_mgr()->AnalyzeInstUse(&*--context()->annotation_end()); + } + } + } +} + +void ScalarReplacementPass::CreateVariable( + uint32_t typeId, ir::Instruction* varInst, uint32_t index, + std::vector* replacements) { + uint32_t ptrId = GetOrCreatePointerType(typeId); + uint32_t id = TakeNextId(); + std::unique_ptr variable(new ir::Instruction( + context(), SpvOpVariable, ptrId, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); + + ir::BasicBlock* block = context()->get_instr_block(varInst); + block->begin().InsertBefore(std::move(variable)); + ir::Instruction* inst = &*block->begin(); + + // If varInst was initialized, make sure to initialize its replacement. + GetOrCreateInitialValue(varInst, index, inst); + get_def_use_mgr()->AnalyzeInstDefUse(inst); + context()->set_instr_block(inst, block); + + replacements->push_back(inst); +} + +uint32_t ScalarReplacementPass::GetOrCreatePointerType(uint32_t id) { + auto iter = pointee_to_pointer_.find(id); + if (iter != pointee_to_pointer_.end()) return iter->second; + + analysis::Type* pointeeTy; + std::unique_ptr pointerTy; + std::tie(pointeeTy, pointerTy) = + context()->get_type_mgr()->GetTypeAndPointerType(id, + SpvStorageClassFunction); + uint32_t ptrId = 0; + if (id == context()->get_type_mgr()->GetId(pointeeTy)) { + // Non-ambiguous type, just ask the type manager for an id. + ptrId = context()->get_type_mgr()->GetTypeInstruction(pointerTy.get()); + pointee_to_pointer_[id] = ptrId; + return ptrId; + } + + // Ambiguous type. We must perform a linear search to try and find the right + // type. + for (auto global : context()->types_values()) { + if (global.opcode() == SpvOpTypePointer && + global.GetSingleWordInOperand(0u) == SpvStorageClassFunction && + global.GetSingleWordInOperand(1u) == id) { + if (!context()->get_feature_mgr()->HasExtension( + libspirv::Extension::kSPV_KHR_variable_pointers) || + get_decoration_mgr()->GetDecorationsFor(id, false).empty()) { + // If variable pointers is enabled, only reuse a decoration-less + // pointer of the correct type. + ptrId = global.result_id(); + break; + } + } + } + + if (ptrId != 0) { + pointee_to_pointer_[id] = ptrId; + return ptrId; + } + + ptrId = TakeNextId(); + context()->AddType(MakeUnique( + context(), SpvOpTypePointer, 0, ptrId, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}, + {SPV_OPERAND_TYPE_ID, {id}}})); + ir::Instruction* ptr = &*--context()->types_values_end(); + get_def_use_mgr()->AnalyzeInstDefUse(ptr); + pointee_to_pointer_[id] = ptrId; + // Register with the type manager if necessary. + context()->get_type_mgr()->RegisterType(ptrId, *pointerTy); + + return ptrId; +} + +void ScalarReplacementPass::GetOrCreateInitialValue(ir::Instruction* source, + uint32_t index, + ir::Instruction* newVar) { + assert(source->opcode() == SpvOpVariable); + if (source->NumInOperands() < 2) return; + + uint32_t initId = source->GetSingleWordInOperand(1u); + uint32_t storageId = GetStorageType(newVar)->result_id(); + ir::Instruction* init = get_def_use_mgr()->GetDef(initId); + uint32_t newInitId = 0; + // TODO(dnovillo): Refactor this with constant propagation. + if (init->opcode() == SpvOpConstantNull) { + // Initialize to appropriate NULL. + auto iter = type_to_null_.find(storageId); + if (iter == type_to_null_.end()) { + newInitId = TakeNextId(); + type_to_null_[storageId] = newInitId; + context()->AddGlobalValue(MakeUnique( + context(), SpvOpConstantNull, storageId, newInitId, + std::initializer_list{})); + ir::Instruction* newNull = &*--context()->types_values_end(); + get_def_use_mgr()->AnalyzeInstDefUse(newNull); + } else { + newInitId = iter->second; + } + } else if (ir::IsSpecConstantInst(init->opcode())) { + // Create a new constant extract. + newInitId = TakeNextId(); + context()->AddGlobalValue(MakeUnique( + context(), SpvOpSpecConstantOp, storageId, newInitId, + std::initializer_list{ + {SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER, {SpvOpCompositeExtract}}, + {SPV_OPERAND_TYPE_ID, {init->result_id()}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {index}}})); + ir::Instruction* newSpecConst = &*--context()->types_values_end(); + get_def_use_mgr()->AnalyzeInstDefUse(newSpecConst); + } else if (init->opcode() == SpvOpConstantComposite) { + // Get the appropriate index constant. + newInitId = init->GetSingleWordInOperand(index); + ir::Instruction* element = get_def_use_mgr()->GetDef(newInitId); + if (element->opcode() == SpvOpUndef) { + // Undef is not a valid initializer for a variable. + newInitId = 0; + } + } else { + assert(false); + } + + if (newInitId != 0) { + newVar->AddOperand({SPV_OPERAND_TYPE_ID, {newInitId}}); + } +} + +size_t ScalarReplacementPass::GetIntegerLiteral(const ir::Operand& op) const { + assert(op.words.size() <= 2); + size_t len = 0; + for (uint32_t i = 0; i != op.words.size(); ++i) { + len |= (op.words[i] << (32 * i)); + } + return len; +} + +size_t ScalarReplacementPass::GetConstantInteger( + const ir::Instruction* constant) const { + assert(get_def_use_mgr()->GetDef(constant->type_id())->opcode() == + SpvOpTypeInt); + assert(constant->opcode() == SpvOpConstant || + constant->opcode() == SpvOpConstantNull); + if (constant->opcode() == SpvOpConstantNull) { + return 0; + } + + const ir::Operand& op = constant->GetInOperand(0u); + return GetIntegerLiteral(op); +} + +size_t ScalarReplacementPass::GetArrayLength( + const ir::Instruction* arrayType) const { + assert(arrayType->opcode() == SpvOpTypeArray); + const ir::Instruction* length = + get_def_use_mgr()->GetDef(arrayType->GetSingleWordInOperand(1u)); + return GetConstantInteger(length); +} + +size_t ScalarReplacementPass::GetNumElements( + const ir::Instruction* type) const { + assert(type->opcode() == SpvOpTypeVector || + type->opcode() == SpvOpTypeMatrix); + const ir::Operand& op = type->GetInOperand(1u); + assert(op.words.size() <= 2); + size_t len = 0; + for (uint32_t i = 0; i != op.words.size(); ++i) { + len |= (op.words[i] << (32 * i)); + } + return len; +} + +ir::Instruction* ScalarReplacementPass::GetStorageType( + const ir::Instruction* inst) const { + assert(inst->opcode() == SpvOpVariable); + + uint32_t ptrTypeId = inst->type_id(); + uint32_t typeId = + get_def_use_mgr()->GetDef(ptrTypeId)->GetSingleWordInOperand(1u); + return get_def_use_mgr()->GetDef(typeId); +} + +bool ScalarReplacementPass::CanReplaceVariable( + const ir::Instruction* varInst) const { + assert(varInst->opcode() == SpvOpVariable); + + // Can only replace function scope variables. + if (varInst->GetSingleWordInOperand(0u) != SpvStorageClassFunction) + return false; + + if (!CheckTypeAnnotations(get_def_use_mgr()->GetDef(varInst->type_id()))) + return false; + + const ir::Instruction* typeInst = GetStorageType(varInst); + return CheckType(typeInst) && CheckAnnotations(varInst) && CheckUses(varInst); +} + +bool ScalarReplacementPass::CheckType(const ir::Instruction* typeInst) const { + if (!CheckTypeAnnotations(typeInst)) return false; + + switch (typeInst->opcode()) { + case SpvOpTypeStruct: + // Don't bother with empty structs or very large structs. + if (typeInst->NumInOperands() == 0 || + typeInst->NumInOperands() > MAX_NUM_ELEMENTS) + return false; + return true; + case SpvOpTypeArray: + if (GetArrayLength(typeInst) > MAX_NUM_ELEMENTS) return false; + return true; + // TODO(alanbaker): Develop some heuristics for when this should be + // re-enabled. + //// Specifically including matrix and vector in an attempt to reduce the + //// number of vector registers required. + // case SpvOpTypeMatrix: + // case SpvOpTypeVector: + // if (GetNumElements(typeInst) > MAX_NUM_ELEMENTS) return false; + // return true; + + case SpvOpTypeRuntimeArray: + default: + return false; + } +} + +bool ScalarReplacementPass::CheckTypeAnnotations( + const ir::Instruction* typeInst) const { + for (auto inst : + get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { + uint32_t decoration; + if (inst->opcode() == SpvOpDecorate) { + decoration = inst->GetSingleWordInOperand(1u); + } else { + assert(inst->opcode() == SpvOpMemberDecorate); + decoration = inst->GetSingleWordInOperand(2u); + } + + switch (decoration) { + case SpvDecorationRowMajor: + case SpvDecorationColMajor: + case SpvDecorationArrayStride: + case SpvDecorationMatrixStride: + case SpvDecorationCPacked: + case SpvDecorationInvariant: + case SpvDecorationRestrict: + case SpvDecorationOffset: + case SpvDecorationAlignment: + case SpvDecorationAlignmentId: + case SpvDecorationMaxByteOffset: + break; + default: + return false; + } + } + + return true; +} + +bool ScalarReplacementPass::CheckAnnotations( + const ir::Instruction* varInst) const { + for (auto inst : + get_decoration_mgr()->GetDecorationsFor(varInst->result_id(), false)) { + assert(inst->opcode() == SpvOpDecorate); + uint32_t decoration = inst->GetSingleWordInOperand(1u); + switch (decoration) { + case SpvDecorationInvariant: + case SpvDecorationRestrict: + case SpvDecorationAlignment: + case SpvDecorationAlignmentId: + case SpvDecorationMaxByteOffset: + break; + default: + return false; + } + } + + return true; +} + +bool ScalarReplacementPass::CheckUses(const ir::Instruction* inst) const { + VariableStats stats = {0, 0}; + bool ok = CheckUses(inst, &stats); + + // TODO(alanbaker/greg-lunarg): Add some meaningful heuristics about when + // SRoA is costly, such as when the structure has many (unaccessed?) + // members. + + return ok; +} + +bool ScalarReplacementPass::CheckUses(const ir::Instruction* inst, + VariableStats* stats) const { + bool ok = true; + get_def_use_mgr()->ForEachUse( + inst, [this, stats, &ok](const ir::Instruction* user, uint32_t index) { + // Annotations are check as a group separately. + if (!ir::IsAnnotationInst(user->opcode())) { + switch (user->opcode()) { + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + if (index == 2u) { + uint32_t id = user->GetSingleWordOperand(3u); + const ir::Instruction* opInst = get_def_use_mgr()->GetDef(id); + if (!ir::IsCompileTimeConstantInst(opInst->opcode())) { + ok = false; + } else { + if (!CheckUsesRelaxed(user)) ok = false; + } + stats->num_partial_accesses++; + } else { + ok = false; + } + break; + case SpvOpLoad: + if (!CheckLoad(user, index)) ok = false; + stats->num_full_accesses++; + break; + case SpvOpStore: + if (!CheckStore(user, index)) ok = false; + stats->num_full_accesses++; + break; + case SpvOpName: + case SpvOpMemberName: + break; + default: + ok = false; + break; + } + } + }); + + return ok; +} + +bool ScalarReplacementPass::CheckUsesRelaxed( + const ir::Instruction* inst) const { + bool ok = true; + get_def_use_mgr()->ForEachUse( + inst, [this, &ok](const ir::Instruction* user, uint32_t index) { + switch (user->opcode()) { + case SpvOpAccessChain: + case SpvOpInBoundsAccessChain: + if (index != 2u) { + ok = false; + } else { + if (!CheckUsesRelaxed(user)) ok = false; + } + break; + case SpvOpLoad: + if (!CheckLoad(user, index)) ok = false; + break; + case SpvOpStore: + if (!CheckStore(user, index)) ok = false; + break; + default: + ok = false; + break; + } + }); + + return ok; +} + +bool ScalarReplacementPass::CheckLoad(const ir::Instruction* inst, + uint32_t index) const { + if (index != 2u) return false; + if (inst->NumInOperands() >= 2 && + inst->GetSingleWordInOperand(1u) & SpvMemoryAccessVolatileMask) + return false; + return true; +} + +bool ScalarReplacementPass::CheckStore(const ir::Instruction* inst, + uint32_t index) const { + if (index != 0u) return false; + if (inst->NumInOperands() >= 3 && + inst->GetSingleWordInOperand(2u) & SpvMemoryAccessVolatileMask) + return false; + return true; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..a48174ff7abb1b328eec7c3e4927d60b876696d4 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/scalar_replacement_pass.h @@ -0,0 +1,205 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_SCALAR_REPLACEMENT_PASS_H_ +#define LIBSPIRV_OPT_SCALAR_REPLACEMENT_PASS_H_ + +#include "function.h" +#include "pass.h" +#include "type_manager.h" + +#include + +namespace spvtools { +namespace opt { + +// Documented in optimizer.hpp +class ScalarReplacementPass : public Pass { + public: + ScalarReplacementPass() = default; + + const char* name() const override { return "scalar-replacement"; } + + // Attempts to scalarize all appropriate function scope variables. Returns + // SuccessWithChange if any change is made. + Status Process(ir::IRContext* c) override; + + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisDecorations | + ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisNameMap; + } + + private: + // Small container for tracking statistics about variables. + // + // TODO(alanbaker): Develop some useful heuristics to tune this pass. + struct VariableStats { + uint32_t num_partial_accesses; + uint32_t num_full_accesses; + }; + + // Attempts to scalarize all appropriate function scope variables in + // |function|. Returns SuccessWithChange if any changes are mode. + Status ProcessFunction(ir::Function* function); + + // Returns true if |varInst| can be scalarized. + // + // Examines the use chain of |varInst| to verify all uses are valid for + // scalarization. + bool CanReplaceVariable(const ir::Instruction* varInst) const; + + // Returns true if |typeInst| is an acceptable type to scalarize. + // + // Allows all aggregate types except runtime arrays. Additionally, checks the + // that the number of elements that would be scalarized is within bounds. + bool CheckType(const ir::Instruction* typeInst) const; + + // Returns true if all the decorations for |varInst| are acceptable for + // scalarization. + bool CheckAnnotations(const ir::Instruction* varInst) const; + + // Returns true if all the decorations for |typeInst| are acceptable for + // scalarization. + bool CheckTypeAnnotations(const ir::Instruction* typeInst) const; + + // Returns true if the uses of |inst| are acceptable for scalarization. + // + // Recursively checks all the uses of |inst|. For |inst| specifically, only + // allows SpvOpAccessChain, SpvOpInBoundsAccessChain, SpvOpLoad and + // SpvOpStore. Access chains must have the first index be a compile-time + // constant. Subsequent uses of access chains (including other access chains) + // are checked in a more relaxed manner. + bool CheckUses(const ir::Instruction* inst) const; + + // Helper function for the above |CheckUses|. + // + // This version tracks some stats about the current OpVariable. These stats + // are used to drive heuristics about when to scalarize. + bool CheckUses(const ir::Instruction* inst, VariableStats* stats) const; + + // Relaxed helper function for |CheckUses|. + bool CheckUsesRelaxed(const ir::Instruction* inst) const; + + // Transfers appropriate decorations from |source| to |replacements|. + void TransferAnnotations(const ir::Instruction* source, + std::vector* replacements); + + // Scalarizes |inst| and updates its uses. + // + // |inst| must be an OpVariable. It is replaced with an OpVariable for each + // for element of the composite type. Uses of |inst| are updated as + // appropriate. If the replacement variables are themselves scalarizable, they + // get added to |worklist| for further processing. If any replacement + // variable ends up with no uses it is erased. Returns false if any + // subsequent access chain is out of bounds. + bool ReplaceVariable(ir::Instruction* inst, + std::queue* worklist); + + // Returns the underlying storage type for |inst|. + // + // |inst| must be an OpVariable. Returns the type that is pointed to by + // |inst|. + ir::Instruction* GetStorageType(const ir::Instruction* inst) const; + + // Returns true if the load can be scalarized. + // + // |inst| must be an OpLoad. Returns true if |index| is the pointer operand of + // |inst| and the load is not from volatile memory. + bool CheckLoad(const ir::Instruction* inst, uint32_t index) const; + + // Returns true if the store can be scalarized. + // + // |inst| must be an OpStore. Returns true if |index| is the pointer operand + // of |inst| and the store is not to volatile memory. + bool CheckStore(const ir::Instruction* inst, uint32_t index) const; + + // Creates a variable of type |typeId| from the |index|'th element of + // |varInst|. The new variable is added to |replacements|. + void CreateVariable(uint32_t typeId, ir::Instruction* varInst, uint32_t index, + std::vector* replacements); + + // Populates |replacements| with a new OpVariable for each element of |inst|. + // + // |inst| must be an OpVariable of a composite type. New variables are + // initialized the same as the corresponding index in |inst|. |replacements| + // will contain a variable for each element of the composite with matching + // indexes (i.e. the 0'th element of |inst| is the 0'th entry of + // |replacements|). + void CreateReplacementVariables(ir::Instruction* inst, + std::vector* replacements); + + // Returns the value of an OpConstant of integer type. + // + // |constant| must use two or fewer words to generate the value. + size_t GetConstantInteger(const ir::Instruction* constant) const; + + // Returns the integer literal for |op|. + size_t GetIntegerLiteral(const ir::Operand& op) const; + + // Returns the array length for |arrayInst|. + size_t GetArrayLength(const ir::Instruction* arrayInst) const; + + // Returns the number of elements in |type|. + // + // |type| must be a vector or matrix type. + size_t GetNumElements(const ir::Instruction* type) const; + + // Returns an id for a pointer to |id|. + uint32_t GetOrCreatePointerType(uint32_t id); + + // Creates the initial value for the |index| element of |source| in |newVar|. + // + // If there is an initial value for |source| for element |index|, it is + // appended as an operand on |newVar|. If the initial value is OpUndef, no + // initial value is added to |newVar|. + void GetOrCreateInitialValue(ir::Instruction* source, uint32_t index, + ir::Instruction* newVar); + + // Replaces the load to the entire composite. + // + // Generates a load for each replacement variable and then creates a new + // composite by combining all of the loads. + // + // |load| must be a load. + void ReplaceWholeLoad(ir::Instruction* load, + const std::vector& replacements); + + // Replaces the store to the entire composite. + // + // Generates a composite extract and store for each element in the scalarized + // variable from the original store data input. + void ReplaceWholeStore(ir::Instruction* store, + const std::vector& replacements); + + // Replaces an access chain to the composite variable with either a direct use + // of the appropriate replacement variable or another access chain with the + // replacement variable as the base and one fewer indexes. Returns false if + // the chain has an out of bounds access. + bool ReplaceAccessChain(ir::Instruction* chain, + const std::vector& replacements); + + // Maps storage type to a pointer type enclosing that type. + std::unordered_map pointee_to_pointer_; + + // Maps type id to OpConstantNull for that type. + std::unordered_map type_to_null_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_SCALAR_REPLACEMENT_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp index 02422ca452efb2d8b7c60b17e18cee78fe2fde07..bce78f9c6a57f441de33c0e4b0fb97c75c04dc00 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp @@ -21,6 +21,7 @@ #include #include "def_use_manager.h" +#include "ir_context.h" #include "make_unique.h" #include "spirv-tools/libspirv.h" #include "type_manager.h" @@ -31,10 +32,10 @@ namespace spvtools { namespace opt { namespace { -using spvutils::NumberType; using spvutils::EncodeNumberStatus; -using spvutils::ParseNumber; +using spvutils::NumberType; using spvutils::ParseAndEncodeNumber; +using spvutils::ParseNumber; // Given a numeric value in a null-terminated c string and the expected type of // the value, parses the string and encodes it in a vector of words. If the @@ -136,14 +137,16 @@ ir::Instruction* GetSpecIdTargetFromDecorationGroup( // the first OpGroupDecoration instruction that uses the given decoration // group. ir::Instruction* group_decorate_inst = nullptr; - for (const auto& u : - *def_use_mgr->GetUses(decoration_group_defining_inst.result_id())) { - if (u.inst->opcode() == SpvOp::SpvOpGroupDecorate) { - group_decorate_inst = u.inst; - break; - } - } - if (!group_decorate_inst) return nullptr; + if (def_use_mgr->WhileEachUser(&decoration_group_defining_inst, + [&group_decorate_inst](ir::Instruction* user) { + if (user->opcode() == + SpvOp::SpvOpGroupDecorate) { + group_decorate_inst = user; + return false; + } + return true; + })) + return nullptr; // Scan through the target ids of the OpGroupDecorate instruction. There // should be only one spec constant target consumes the SpecId decoration. @@ -185,9 +188,12 @@ ir::Instruction* GetSpecIdTargetFromDecorationGroup( } return target_inst; } -}; +} // namespace + +Pass::Status SetSpecConstantDefaultValuePass::Process( + ir::IRContext* irContext) { + InitializeProcessing(irContext); -Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { // The operand index of decoration target in an OpDecorate instruction. const uint32_t kTargetIdOperandIndex = 0; // The operand index of the decoration literal in an OpDecorate instruction. @@ -201,8 +207,6 @@ Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { const uint32_t kOpSpecConstantLiteralInOperandIndex = 0; bool modified = false; - analysis::DefUseManager def_use_mgr(consumer(), module); - analysis::TypeManager type_mgr(consumer(), *module); // Scan through all the annotation instructions to find 'OpDecorate SpecId' // instructions. Then extract the decoration target of those instructions. // The decoration targets should be spec constant defining instructions with @@ -212,7 +216,7 @@ Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { // is found for a spec id, the string will be parsed according to the target // spec constant type. The parsed value will be used to replace the original // default value of the target spec constant. - for (ir::Instruction& inst : module->annotations()) { + for (ir::Instruction& inst : irContext->annotations()) { // Only process 'OpDecorate SpecId' instructions if (inst.opcode() != SpvOp::SpvOpDecorate) continue; if (inst.NumOperands() != kOpDecorateSpecIdNumOperands) continue; @@ -228,10 +232,10 @@ Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { // Find the spec constant defining instruction. Note that the // target_id might be a decoration group id. ir::Instruction* spec_inst = nullptr; - if (ir::Instruction* target_inst = def_use_mgr.GetDef(target_id)) { + if (ir::Instruction* target_inst = get_def_use_mgr()->GetDef(target_id)) { if (target_inst->opcode() == SpvOp::SpvOpDecorationGroup) { spec_inst = - GetSpecIdTargetFromDecorationGroup(*target_inst, &def_use_mgr); + GetSpecIdTargetFromDecorationGroup(*target_inst, get_def_use_mgr()); } else { spec_inst = target_inst; } @@ -253,8 +257,9 @@ Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { // Gets the string of the default value and parses it to bit pattern // with the type of the spec constant. const std::string& default_value_str = iter->second; - bit_pattern = ParseDefaultValueStr(default_value_str.c_str(), - type_mgr.GetType(spec_inst->type_id())); + bit_pattern = ParseDefaultValueStr( + default_value_str.c_str(), + context()->get_type_mgr()->GetType(spec_inst->type_id())); } else { // Search for the new bit-pattern-form default value for this spec id. @@ -265,7 +270,8 @@ Pass::Status SetSpecConstantDefaultValuePass::Process(ir::Module* module) { // Gets the bit-pattern of the default value from the map directly. bit_pattern = ParseDefaultValueBitPattern( - iter->second, type_mgr.GetType(spec_inst->type_id())); + iter->second, + context()->get_type_mgr()->GetType(spec_inst->type_id())); } if (bit_pattern.empty()) continue; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.h index 15fcc0ab532f8b593c121cdcc2952e918ce29b45..95667bb895f8c05c226a9ea32a4434e76b685e50 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.h @@ -19,6 +19,7 @@ #include #include +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -37,20 +38,25 @@ class SetSpecConstantDefaultValuePass : public Pass { // in the form of string. explicit SetSpecConstantDefaultValuePass( const SpecIdToValueStrMap& default_values) - : spec_id_to_value_str_(default_values), spec_id_to_value_bit_pattern_() {} + : spec_id_to_value_str_(default_values), + spec_id_to_value_bit_pattern_() {} explicit SetSpecConstantDefaultValuePass(SpecIdToValueStrMap&& default_values) - : spec_id_to_value_str_(std::move(default_values)), spec_id_to_value_bit_pattern_() {} + : spec_id_to_value_str_(std::move(default_values)), + spec_id_to_value_bit_pattern_() {} // Constructs a pass instance with a map from spec ids to default values in // the form of bit pattern. explicit SetSpecConstantDefaultValuePass( const SpecIdToValueBitPatternMap& default_values) - : spec_id_to_value_str_(), spec_id_to_value_bit_pattern_(default_values) {} - explicit SetSpecConstantDefaultValuePass(SpecIdToValueBitPatternMap&& default_values) - : spec_id_to_value_str_(), spec_id_to_value_bit_pattern_(std::move(default_values)) {} + : spec_id_to_value_str_(), + spec_id_to_value_bit_pattern_(default_values) {} + explicit SetSpecConstantDefaultValuePass( + SpecIdToValueBitPatternMap&& default_values) + : spec_id_to_value_str_(), + spec_id_to_value_bit_pattern_(std::move(default_values)) {} const char* name() const override { return "set-spec-const-default-value"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; // Parses the given null-terminated C string to get a mapping from Spec Id to // default value strings. Returns a unique pointer of the mapping from spec @@ -95,7 +101,8 @@ class SetSpecConstantDefaultValuePass : public Pass { // The mapping from spec ids to their string-form default values to be set. const SpecIdToValueStrMap spec_id_to_value_str_; - // The mapping from spec ids to their bitpattern-form default values to be set. + // The mapping from spec ids to their bitpattern-form default values to be + // set. const SpecIdToValueBitPatternMap spec_id_to_value_bit_pattern_; }; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..356ab90be0e07da8e4ec0de7c5042785bf3f33d5 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.cpp @@ -0,0 +1,114 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "simplification_pass.h" + +#include +#include +#include + +#include "fold.h" + +namespace spvtools { +namespace opt { + +Pass::Status SimplificationPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; + + for (ir::Function& function : *get_module()) { + modified |= SimplifyFunction(&function); + } + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +bool SimplificationPass::SimplifyFunction(ir::Function* function) { + bool modified = false; + // Phase 1: Traverse all instructions in dominance order. + // The second phase will only be on the instructions whose inputs have changed + // after being processed during phase 1. Since OpPhi instructions are the + // only instructions whose inputs do not necessarily dominate the use, we keep + // track of the OpPhi instructions already seen, and add them to the work list + // for phase 2 when needed. + std::vector work_list; + std::unordered_set process_phis; + std::unordered_set inst_to_kill; + std::unordered_set in_work_list; + + cfg()->ForEachBlockInReversePostOrder( + function->entry().get(), + [&modified, &process_phis, &work_list, &in_work_list, &inst_to_kill, + this](ir::BasicBlock* bb) { + for (ir::Instruction* inst = &*bb->begin(); inst; + inst = inst->NextNode()) { + if (inst->opcode() == SpvOpPhi) { + process_phis.insert(inst); + } + + if (inst->opcode() == SpvOpCopyObject || FoldInstruction(inst)) { + modified = true; + context()->AnalyzeUses(inst); + get_def_use_mgr()->ForEachUser(inst, [&work_list, &process_phis, + &in_work_list]( + ir::Instruction* use) { + if (process_phis.count(use) && in_work_list.insert(use).second) { + work_list.push_back(use); + } + }); + if (inst->opcode() == SpvOpCopyObject) { + context()->ReplaceAllUsesWith(inst->result_id(), + inst->GetSingleWordInOperand(0)); + inst_to_kill.insert(inst); + in_work_list.insert(inst); + } + } + } + }); + + // Phase 2: process the instructions in the work list until all of the work is + // done. This time we add all users to the work list because phase 1 + // has already finished. + for (size_t i = 0; i < work_list.size(); ++i) { + ir::Instruction* inst = work_list[i]; + in_work_list.erase(inst); + if (inst->opcode() == SpvOpCopyObject || FoldInstruction(inst)) { + modified = true; + context()->AnalyzeUses(inst); + get_def_use_mgr()->ForEachUser( + inst, [&work_list, &in_work_list](ir::Instruction* use) { + if (!use->IsDecoration() && use->opcode() != SpvOpName && + in_work_list.insert(use).second) { + work_list.push_back(use); + } + }); + + if (inst->opcode() == SpvOpCopyObject) { + context()->ReplaceAllUsesWith(inst->result_id(), + inst->GetSingleWordInOperand(0)); + inst_to_kill.insert(inst); + in_work_list.insert(inst); + } + } + } + + // Phase 3: Kill instructions we know are no longer needed. + for (ir::Instruction* inst : inst_to_kill) { + context()->KillInst(inst); + } + + return modified; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..206d9dc8eb9208fbb2e4ea65998cd059056706aa --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/simplification_pass.h @@ -0,0 +1,49 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_SIMPLIFICATION_PASS_H_ +#define LIBSPIRV_OPT_SIMPLIFICATION_PASS_H_ + +#include "function.h" +#include "ir_context.h" +#include "pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class SimplificationPass : public Pass { + public: + const char* name() const override { return "simplify-instructions"; } + Status Process(ir::IRContext*) override; + virtual ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisDefUse | + ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisDecorations | + ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisNameMap; + } + + private: + // Returns true if the module was changed. The simplifier is called on every + // instruction in |function| until nothing else in the function can be + // simplified. + bool SimplifyFunction(ir::Function* function); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_SIMPLIFICATION_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e8be883647dba7b46794d31dc8b3334973b6efb --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.cpp @@ -0,0 +1,582 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file implements the SSA rewriting algorithm proposed in +// +// Simple and Efficient Construction of Static Single Assignment Form. +// Braun M., Buchwald S., Hack S., Leißa R., Mallon C., Zwinkau A. (2013) +// In: Jhala R., De Bosschere K. (eds) +// Compiler Construction. CC 2013. +// Lecture Notes in Computer Science, vol 7791. +// Springer, Berlin, Heidelberg +// +// https://link.springer.com/chapter/10.1007/978-3-642-37051-9_6 +// +// In contrast to common eager algorithms based on dominance and dominance +// frontier information, this algorithm works backwards from load operations. +// +// When a target variable is loaded, it queries the variable's reaching +// definition. If the reaching definition is unknown at the current location, +// it searches backwards in the CFG, inserting Phi instructions at join points +// in the CFG along the way until it finds the desired store instruction. +// +// The algorithm avoids repeated lookups using memoization. +// +// For reducible CFGs, which are a superset of the structured CFGs in SPIRV, +// this algorithm is proven to produce minimal SSA. That is, it inserts the +// minimal number of Phi instructions required to ensure the SSA property, but +// some Phi instructions may be dead +// (https://en.wikipedia.org/wiki/Static_single_assignment_form). + +#include "ssa_rewrite_pass.h" +#include "cfg.h" +#include "make_unique.h" +#include "mem_pass.h" +#include "opcode.h" + +#include + +// Debug logging (0: Off, 1-N: Verbosity level). Replace this with the +// implementation done for +// https://github.com/KhronosGroup/SPIRV-Tools/issues/1351 +// #define SSA_REWRITE_DEBUGGING_LEVEL 3 + +#ifdef SSA_REWRITE_DEBUGGING_LEVEL +#include +#else +#define SSA_REWRITE_DEBUGGING_LEVEL 0 +#endif + +namespace spvtools { +namespace opt { + +namespace { +const uint32_t kStoreValIdInIdx = 1; +const uint32_t kVariableInitIdInIdx = 1; +} // namespace + +std::string SSARewriter::PhiCandidate::PrettyPrint(const ir::CFG* cfg) const { + std::ostringstream str; + str << "%" << result_id_ << " = Phi[%" << var_id_ << ", BB %" << bb_->id() + << "]("; + if (phi_args_.size() > 0) { + uint32_t arg_ix = 0; + for (uint32_t pred_label : cfg->preds(bb_->id())) { + uint32_t arg_id = phi_args_[arg_ix++]; + str << "[%" << arg_id << ", bb(%" << pred_label << ")] "; + } + } + str << ")"; + if (copy_of_ != 0) { + str << " [COPY OF " << copy_of_ << "]"; + } + str << ((is_complete_) ? " [COMPLETE]" : " [INCOMPLETE]"); + + return str.str(); +} + +SSARewriter::PhiCandidate& SSARewriter::CreatePhiCandidate(uint32_t var_id, + ir::BasicBlock* bb) { + uint32_t phi_result_id = pass_->context()->TakeNextId(); + auto result = phi_candidates_.emplace( + phi_result_id, PhiCandidate(var_id, phi_result_id, bb)); + PhiCandidate& phi_candidate = result.first->second; + return phi_candidate; +} + +void SSARewriter::ReplacePhiUsersWith(const PhiCandidate& phi_to_remove, + uint32_t repl_id) { + for (uint32_t user_id : phi_to_remove.users()) { + PhiCandidate* user_phi = GetPhiCandidate(user_id); + if (user_phi) { + // If the user is a Phi candidate, replace all arguments that refer to + // |phi_to_remove.result_id()| with |repl_id|. + for (uint32_t& arg : user_phi->phi_args()) { + if (arg == phi_to_remove.result_id()) { + arg = repl_id; + } + } + } else { + // For regular loads, traverse the |load_replacement_| table looking for + // instances of |phi_to_remove|. + for (auto& it : load_replacement_) { + if (it.second == phi_to_remove.result_id()) { + it.second = repl_id; + } + } + } + } +} + +uint32_t SSARewriter::TryRemoveTrivialPhi(PhiCandidate* phi_candidate) { + uint32_t same_id = 0; + for (uint32_t arg_id : phi_candidate->phi_args()) { + if (arg_id == same_id || arg_id == phi_candidate->result_id()) { + // This is a self-reference operand or a reference to the same value ID. + continue; + } + if (same_id != 0) { + // This Phi candidate merges at least two values. Therefore, it is not + // trivial. + assert(phi_candidate->copy_of() == 0 && + "Phi candidate transitioning from copy to non-copy."); + return phi_candidate->result_id(); + } + same_id = arg_id; + } + + // The previous logic has determined that this Phi candidate |phi_candidate| + // is trivial. It is essentially the copy operation phi_candidate->phi_result + // = Phi(same, same, same, ...). Since it is not necessary, we can re-route + // all the users of |phi_candidate->phi_result| to all its users, and remove + // |phi_candidate|. + + // Mark the Phi candidate as a trivial copy of |same_id|, so it won't be + // generated. + phi_candidate->MarkCopyOf(same_id); + + assert(same_id != 0 && "Completed Phis cannot have %0 in their arguments"); + + // Since |phi_candidate| always produces |same_id|, replace all the users of + // |phi_candidate| with |same_id|. + ReplacePhiUsersWith(*phi_candidate, same_id); + + return same_id; +} + +uint32_t SSARewriter::AddPhiOperands(PhiCandidate* phi_candidate) { + assert(phi_candidate->phi_args().size() == 0 && + "Phi candidate already has arguments"); + + bool found_0_arg = false; + for (uint32_t pred : pass_->cfg()->preds(phi_candidate->bb()->id())) { + ir::BasicBlock* pred_bb = pass_->cfg()->block(pred); + + // If |pred_bb| is not sealed, use %0 to indicate that + // |phi_candidate| needs to be completed after the whole CFG has + // been processed. + // + // Note that we cannot call GetReachingDef() in these cases + // because this would generate an empty Phi candidate in + // |pred_bb|. When |pred_bb| is later processed, a new definition + // for |phi_candidate->var_id_| will be lost because + // |phi_candidate| will still be reached by the empty Phi. + // + // Consider: + // + // BB %23: + // %38 = Phi[%i](%int_0[%1], %39[%25]) + // + // ... + // + // BB %25: [Starts unsealed] + // %39 = Phi[%i]() + // %34 = ... + // OpStore %i %34 -> Currdef(%i) at %25 is %34 + // OpBranch %23 + // + // When we first create the Phi in %38, we add an operandless Phi in + // %39 to hold the unknown reaching def for %i. + // + // But then, when we go to complete %39 at the end. The reaching def + // for %i in %25's predecessor is %38 itself. So we miss the fact + // that %25 has a def for %i that should be used. + // + // By making the argument %0, we make |phi_candidate| incomplete, + // which will cause it to be completed after the whole CFG has + // been scanned. + uint32_t arg_id = IsBlockSealed(pred_bb) + ? GetReachingDef(phi_candidate->var_id(), pred_bb) + : 0; + phi_candidate->phi_args().push_back(arg_id); + + if (arg_id == 0) { + found_0_arg = true; + } else { + // If this argument is another Phi candidate, add |phi_candidate| to the + // list of users for the defining Phi. + PhiCandidate* defining_phi = GetPhiCandidate(arg_id); + if (defining_phi && defining_phi != phi_candidate) { + defining_phi->AddUser(phi_candidate->result_id()); + } + } + } + + // If we could not fill-in all the arguments of this Phi, mark it incomplete + // so it gets completed after the whole CFG has been processed. + if (found_0_arg) { + phi_candidate->MarkIncomplete(); + incomplete_phis_.push(phi_candidate); + return phi_candidate->result_id(); + } + + // Try to remove |phi_candidate|, if it's trivial. + uint32_t repl_id = TryRemoveTrivialPhi(phi_candidate); + if (repl_id == phi_candidate->result_id()) { + // |phi_candidate| is complete and not trivial. Add it to the + // list of Phi candidates to generate. + phi_candidate->MarkComplete(); + phis_to_generate_.push_back(phi_candidate); + } + + return repl_id; +} + +uint32_t SSARewriter::GetReachingDef(uint32_t var_id, ir::BasicBlock* bb) { + // If |var_id| has a definition in |bb|, return it. + const auto& bb_it = defs_at_block_.find(bb); + if (bb_it != defs_at_block_.end()) { + const auto& current_defs = bb_it->second; + const auto& var_it = current_defs.find(var_id); + if (var_it != current_defs.end()) { + return var_it->second; + } + } + + // Otherwise, look up the value for |var_id| in |bb|'s predecessors. + uint32_t val_id = 0; + auto& predecessors = pass_->cfg()->preds(bb->id()); + if (predecessors.size() == 1) { + // If |bb| has exactly one predecessor, we look for |var_id|'s definition + // there. + val_id = GetReachingDef(var_id, pass_->cfg()->block(predecessors[0])); + } else if (predecessors.size() > 1) { + // If there is more than one predecessor, this is a join block which may + // require a Phi instruction. This will act as |var_id|'s current + // definition to break potential cycles. + PhiCandidate& phi_candidate = CreatePhiCandidate(var_id, bb); + WriteVariable(var_id, bb, phi_candidate.result_id()); + val_id = AddPhiOperands(&phi_candidate); + } + + // If we could not find a store for this variable in the path from the root + // of the CFG, the variable is not defined, so we use undef. + if (val_id == 0) { + val_id = pass_->GetUndefVal(var_id); + } + + WriteVariable(var_id, bb, val_id); + + return val_id; +} + +void SSARewriter::SealBlock(ir::BasicBlock* bb) { + auto result = sealed_blocks_.insert(bb); + (void)result; + assert(result.second == true && + "Tried to seal the same basic block more than once."); +} + +void SSARewriter::ProcessStore(ir::Instruction* inst, ir::BasicBlock* bb) { + auto opcode = inst->opcode(); + assert((opcode == SpvOpStore || opcode == SpvOpVariable) && + "Expecting a store or a variable definition instruction."); + + uint32_t var_id = 0; + uint32_t val_id = 0; + if (opcode == SpvOpStore) { + (void)pass_->GetPtr(inst, &var_id); + val_id = inst->GetSingleWordInOperand(kStoreValIdInIdx); + } else if (inst->NumInOperands() >= 2) { + var_id = inst->result_id(); + val_id = inst->GetSingleWordInOperand(kVariableInitIdInIdx); + } + if (pass_->IsTargetVar(var_id)) { + WriteVariable(var_id, bb, val_id); + +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + std::cerr << "\tFound store '%" << var_id << " = %" << val_id << "': " + << inst->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) + << "\n"; +#endif + } +} + +void SSARewriter::ProcessLoad(ir::Instruction* inst, ir::BasicBlock* bb) { + uint32_t var_id = 0; + (void)pass_->GetPtr(inst, &var_id); + if (pass_->IsTargetVar(var_id)) { + // Get the immediate reaching definition for |var_id|. + uint32_t val_id = GetReachingDef(var_id, bb); + + // Schedule a replacement for the result of this load instruction with + // |val_id|. After all the rewriting decisions are made, every use of + // this load will be replaced with |val_id|. + const uint32_t load_id = inst->result_id(); + assert(load_replacement_.count(load_id) == 0); + load_replacement_[load_id] = val_id; + PhiCandidate* defining_phi = GetPhiCandidate(val_id); + if (defining_phi) { + defining_phi->AddUser(load_id); + } + +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + std::cerr << "\tFound load: " + << inst->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) + << " (replacement for %" << load_id << " is %" << val_id << ")\n"; +#endif + } +} + +void SSARewriter::PrintPhiCandidates() const { + std::cerr << "\nPhi candidates:\n"; + for (const auto& phi_it : phi_candidates_) { + std::cerr << "\tBB %" << phi_it.second.bb()->id() << ": " + << phi_it.second.PrettyPrint(pass_->cfg()) << "\n"; + } + std::cerr << "\n"; +} + +void SSARewriter::PrintReplacementTable() const { + std::cerr << "\nLoad replacement table\n"; + for (const auto& it : load_replacement_) { + std::cerr << "\t%" << it.first << " -> %" << it.second << "\n"; + } + std::cerr << "\n"; +} + +void SSARewriter::GenerateSSAReplacements(ir::BasicBlock* bb) { +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + std::cerr << "Generating SSA replacements for block: " << bb->id() << "\n"; + std::cerr << bb->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) + << "\n"; +#endif + + for (auto& inst : *bb) { + auto opcode = inst.opcode(); + if (opcode == SpvOpStore || opcode == SpvOpVariable) { + ProcessStore(&inst, bb); + } else if (inst.opcode() == SpvOpLoad) { + ProcessLoad(&inst, bb); + } + } + + // Seal |bb|. This means that all the stores in it have been scanned and it's + // ready to feed them into its successors. + SealBlock(bb); + +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + PrintPhiCandidates(); + PrintReplacementTable(); + std::cerr << "\n\n"; +#endif +} + +uint32_t SSARewriter::GetReplacement(std::pair repl) { + uint32_t val_id = repl.second; + auto it = load_replacement_.find(val_id); + while (it != load_replacement_.end()) { + val_id = it->second; + it = load_replacement_.find(val_id); + } + return val_id; +} + +uint32_t SSARewriter::GetPhiArgument(const PhiCandidate* phi_candidate, + uint32_t ix) { + assert(phi_candidate->IsReady() && + "Tried to get the final argument from an incomplete/trivial Phi"); + + uint32_t arg_id = phi_candidate->phi_args()[ix]; + while (arg_id != 0) { + PhiCandidate* phi_user = GetPhiCandidate(arg_id); + if (phi_user == nullptr || phi_user->IsReady()) { + // If the argument is not a Phi or it's a Phi candidate ready to be + // emitted, return it. + return arg_id; + } + arg_id = phi_user->copy_of(); + } + + assert(false && + "No Phi candidates in the copy-of chain are ready to be generated"); + + return 0; +} + +bool SSARewriter::ApplyReplacements() { + bool modified = false; + +#if SSA_REWRITE_DEBUGGING_LEVEL > 2 + std::cerr << "\n\nApplying replacement decisions to IR\n\n"; + PrintPhiCandidates(); + PrintReplacementTable(); + std::cerr << "\n\n"; +#endif + + // Add Phi instructions from completed Phi candidates. + std::vector generated_phis; + for (const PhiCandidate* phi_candidate : phis_to_generate_) { +#if SSA_REWRITE_DEBUGGING_LEVEL > 2 + std::cerr << "Phi candidate: " << phi_candidate->PrettyPrint(pass_->cfg()) + << "\n"; +#endif + + assert(phi_candidate->is_complete() && + "Tried to instantiate a Phi instruction from an incomplete Phi " + "candidate"); + + // Build the vector of operands for the new OpPhi instruction. + uint32_t type_id = pass_->GetPointeeTypeId( + pass_->get_def_use_mgr()->GetDef(phi_candidate->var_id())); + std::vector phi_operands; + uint32_t arg_ix = 0; + for (uint32_t pred_label : pass_->cfg()->preds(phi_candidate->bb()->id())) { + uint32_t op_val_id = GetPhiArgument(phi_candidate, arg_ix++); + phi_operands.push_back( + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {op_val_id}}); + phi_operands.push_back( + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {pred_label}}); + } + + // Generate a new OpPhi instruction and insert it in its basic + // block. + std::unique_ptr phi_inst( + new ir::Instruction(pass_->context(), SpvOpPhi, type_id, + phi_candidate->result_id(), phi_operands)); + generated_phis.push_back(phi_inst.get()); + pass_->get_def_use_mgr()->AnalyzeInstDef(&*phi_inst); + pass_->context()->set_instr_block(&*phi_inst, phi_candidate->bb()); + auto insert_it = phi_candidate->bb()->begin(); + insert_it.InsertBefore(std::move(phi_inst)); + modified = true; + } + + // Scan uses for all inserted Phi instructions. Do this separately from the + // registration of the Phi instruction itself to avoid trying to analyze uses + // of Phi instructions that have not been registered yet. + for (ir::Instruction* phi_inst : generated_phis) { + pass_->get_def_use_mgr()->AnalyzeInstUse(&*phi_inst); + } + +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + std::cerr << "\n\nReplacing the result of load instructions with the " + "corresponding SSA id\n\n"; +#endif + + // Apply replacements from the load replacement table. + for (auto& repl : load_replacement_) { + uint32_t load_id = repl.first; + uint32_t val_id = GetReplacement(repl); + ir::Instruction* load_inst = + pass_->context()->get_def_use_mgr()->GetDef(load_id); + +#if SSA_REWRITE_DEBUGGING_LEVEL > 2 + std::cerr << "\t" + << load_inst->PrettyPrint( + SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) + << " (%" << load_id << " -> %" << val_id << ")\n"; +#endif + + // Remove the load instruction and replace all the uses of this load's + // result with |val_id|. Kill any names or decorates using the load's + // result before replacing to prevent incorrect replacement in those + // instructions. + pass_->context()->KillNamesAndDecorates(load_id); + pass_->context()->ReplaceAllUsesWith(load_id, val_id); + pass_->context()->KillInst(load_inst); + modified = true; + } + + return modified; +} + +void SSARewriter::FinalizePhiCandidate(PhiCandidate* phi_candidate) { + assert(phi_candidate->phi_args().size() > 0 && + "Phi candidate should have arguments"); + + uint32_t ix = 0; + for (uint32_t pred : pass_->cfg()->preds(phi_candidate->bb()->id())) { + ir::BasicBlock* pred_bb = pass_->cfg()->block(pred); + uint32_t& arg_id = phi_candidate->phi_args()[ix++]; + if (arg_id == 0) { + // If |pred_bb| is still not sealed, it means it's unreachable. In this + // case, we just use Undef as an argument. + arg_id = IsBlockSealed(pred_bb) + ? GetReachingDef(phi_candidate->var_id(), pred_bb) + : pass_->GetUndefVal(phi_candidate->var_id()); + } + } + + // This candidate is now completed. + phi_candidate->MarkComplete(); + + // If |phi_candidate| is not trivial, add it to the list of Phis to generate. + if (TryRemoveTrivialPhi(phi_candidate) == phi_candidate->result_id()) { + // If we could not remove |phi_candidate|, it means that it is complete + // and not trivial. Add it to the list of Phis to generate. + assert(!phi_candidate->copy_of() && "A completed Phi cannot be trivial."); + phis_to_generate_.push_back(phi_candidate); + } +} + +void SSARewriter::FinalizePhiCandidates() { +#if SSA_REWRITE_DEBUGGING_LEVEL > 1 + std::cerr << "Finalizing Phi candidates:\n\n"; + PrintPhiCandidates(); + std::cerr << "\n"; +#endif + + // Now, complete the collected candidates. + while (incomplete_phis_.size() > 0) { + PhiCandidate* phi_candidate = incomplete_phis_.front(); + incomplete_phis_.pop(); + FinalizePhiCandidate(phi_candidate); + } +} + +bool SSARewriter::RewriteFunctionIntoSSA(ir::Function* fp) { +#if SSA_REWRITE_DEBUGGING_LEVEL > 0 + std::cerr << "Function before SSA rewrite:\n" + << fp->PrettyPrint(0) << "\n\n\n"; +#endif + + // Collect variables that can be converted into SSA IDs. + pass_->CollectTargetVars(fp); + + // Generate all the SSA replacements and Phi candidates. This will + // generate incomplete and trivial Phis. + pass_->cfg()->ForEachBlockInReversePostOrder( + fp->entry().get(), + [this](ir::BasicBlock* bb) { GenerateSSAReplacements(bb); }); + + // Remove trivial Phis and add arguments to incomplete Phis. + FinalizePhiCandidates(); + + // Finally, apply all the replacements in the IR. + bool modified = ApplyReplacements(); + +#if SSA_REWRITE_DEBUGGING_LEVEL > 0 + std::cerr << "\n\n\nFunction after SSA rewrite:\n" + << fp->PrettyPrint(0) << "\n"; +#endif + + return modified; +} + +void SSARewritePass::Initialize(ir::IRContext* c) { InitializeProcessing(c); } + +Pass::Status SSARewritePass::Process(ir::IRContext* c) { + Initialize(c); + + bool modified = false; + for (auto& fn : *get_module()) { + modified |= SSARewriter(this).RewriteFunctionIntoSSA(&fn); + } + return modified ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..e58943635f72ce4404ae3694bcb5685e6601948d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/ssa_rewrite_pass.h @@ -0,0 +1,304 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_SSA_REWRITE_PASS_H_ +#define LIBSPIRV_OPT_SSA_REWRITE_PASS_H_ + +#include "basic_block.h" +#include "ir_context.h" +#include "mem_pass.h" + +#include + +namespace spvtools { +namespace opt { + +// Utility class for passes that need to rewrite a function into SSA. This +// converts load/store operations on function-local variables into SSA IDs, +// which allows them to be the target of optimizing transformations. +// +// Store and load operations to these variables are converted into +// operations on SSA IDs. Phi instructions are added when needed. See the +// SSA construction paper for algorithmic details +// (https://link.springer.com/chapter/10.1007/978-3-642-37051-9_6) +class SSARewriter { + public: + SSARewriter(MemPass* pass) + : pass_(pass), first_phi_id_(pass_->get_module()->IdBound()) {} + + // Rewrites SSA-target variables in function |fp| into SSA. This is the + // entry point for the SSA rewrite algorithm. SSA-target variables are + // locally defined variables that meet the criteria set by IsSSATargetVar. + // + // It returns true if function |fp| was modified. Otherwise, it returns + // false. + bool RewriteFunctionIntoSSA(ir::Function* fp); + + private: + class PhiCandidate { + public: + explicit PhiCandidate(uint32_t var, uint32_t result, ir::BasicBlock* block) + : var_id_(var), + result_id_(result), + bb_(block), + phi_args_(), + copy_of_(0), + is_complete_(false), + users_() {} + + uint32_t var_id() const { return var_id_; } + uint32_t result_id() const { return result_id_; } + ir::BasicBlock* bb() const { return bb_; } + std::vector& phi_args() { return phi_args_; } + const std::vector& phi_args() const { return phi_args_; } + uint32_t copy_of() const { return copy_of_; } + bool is_complete() const { return is_complete_; } + std::vector& users() { return users_; } + const std::vector& users() const { return users_; } + + // Marks this phi candidate as a trivial copy of |orig_id|. + void MarkCopyOf(uint32_t orig_id) { copy_of_ = orig_id; } + + // Marks this phi candidate as incomplete. + void MarkIncomplete() { is_complete_ = false; } + + // Marks this phi candidate as complete. + void MarkComplete() { is_complete_ = true; } + + // Returns true if this Phi candidate is ready to be emitted. + bool IsReady() const { return is_complete() && copy_of() == 0; } + + // Pretty prints this Phi candidate into a string and returns it. |cfg| is + // needed to lookup basic block predecessors. + std::string PrettyPrint(const ir::CFG* cfg) const; + + // Registers |operand_id| as a user of this Phi candidate. + void AddUser(uint32_t operand_id) { users_.push_back(operand_id); } + + private: + // Variable ID that this Phi is merging. + uint32_t var_id_; + + // SSA ID generated by this Phi (i.e., this is the result ID of the eventual + // Phi instruction). + uint32_t result_id_; + + // Basic block to hold this Phi. + ir::BasicBlock* bb_; + + // Vector of operands for every predecessor block of |bb|. This vector is + // organized so that the Ith slot contains the argument coming from the Ith + // predecessor of |bb|. + std::vector phi_args_; + + // If this Phi is a trivial copy of another Phi, this is the ID of the + // original. If this is 0, it means that this is not a trivial Phi. + uint32_t copy_of_; + + // False, if this Phi candidate has no arguments or at least one argument is + // %0. + bool is_complete_; + + // List of all users for this Phi instruction. Each element is the result ID + // of the load instruction replaced by this Phi, or the result ID of a Phi + // candidate that has this Phi in its list of operands. + std::vector users_; + }; + + // Type used to keep track of store operations in each basic block. + typedef std::unordered_map> + BlockDefsMap; + + // Generates all the SSA rewriting decisions for basic block |bb|. This + // populates the Phi candidate table (|phi_candidate_|) and the load + // replacement table (|load_replacement_). + void GenerateSSAReplacements(ir::BasicBlock* bb); + + // Seals block |bb|. Sealing a basic block means |bb| and all its + // predecessors of |bb| have been scanned for loads/stores. + void SealBlock(ir::BasicBlock* bb); + + // Returns true if |bb| has been sealed. + bool IsBlockSealed(ir::BasicBlock* bb) { + return sealed_blocks_.count(bb) != 0; + } + + // Returns the Phi candidate with result ID |id| if it exists in the table + // |phi_candidates_|. If no such Phi candidate exists, it returns nullptr. + PhiCandidate* GetPhiCandidate(uint32_t id) { + auto it = phi_candidates_.find(id); + return (it != phi_candidates_.end()) ? &it->second : nullptr; + } + + // Replaces all the users of Phi candidate |phi_cand| to be users of + // |repl_id|. + void ReplacePhiUsersWith(const PhiCandidate& phi_cand, uint32_t repl_id); + + // Returns the value ID that should replace the load ID in the given + // replacement pair |repl|. The replacement is a pair (|load_id|, |val_id|). + // If |val_id| is itself replaced by another value in the table, this function + // will look the replacement for |val_id| until it finds one that is not + // itself replaced. For instance, given: + // + // %34 = OpLoad %float %f1 + // OpStore %t %34 + // %36 = OpLoad %float %t + // + // Assume that %f1 is reached by a Phi candidate %42, the load + // replacement table will have the following entries: + // + // %34 -> %42 + // %36 -> %34 + // + // So, when looking for the replacement for %36, we should not use + // %34. Rather, we should use %42. To do this, the chain of + // replacements must be followed until we reach an element that has + // no replacement. + uint32_t GetReplacement(std::pair repl); + + // Returns the argument at index |ix| from |phi_candidate|. If argument |ix| + // comes from a trivial Phi, it follows the copy-of chain from that trivial + // Phi until it finds the original Phi candidate. + // + // This is only valid after all Phi candidates have been completed. It can + // only be called when generating the IR for these Phis. + uint32_t GetPhiArgument(const PhiCandidate* phi_candidate, uint32_t ix); + + // Applies all the SSA replacement decisions. This replaces loads/stores to + // SSA target variables with their corresponding SSA IDs, and inserts Phi + // instructions for them. + bool ApplyReplacements(); + + // Registers a definition for variable |var_id| in basic block |bb| with + // value |val_id|. + void WriteVariable(uint32_t var_id, ir::BasicBlock* bb, uint32_t val_id) { + defs_at_block_[bb][var_id] = val_id; + } + + // Processes the store operation |inst| in basic block |bb|. This extracts + // the variable ID being stored into, determines whether the variable is an + // SSA-target variable, and, if it is, it stores its value in the + // |defs_at_block_| map. + void ProcessStore(ir::Instruction* inst, ir::BasicBlock* bb); + + // Processes the load operation |inst| in basic block |bb|. This extracts + // the variable ID being stored into, determines whether the variable is an + // SSA-target variable, and, if it is, it reads its reaching definition by + // calling |GetReachingDef|. + void ProcessLoad(ir::Instruction* inst, ir::BasicBlock* bb); + + // Reads the current definition for variable |var_id| in basic block |bb|. + // If |var_id| is not defined in block |bb| it walks up the predecessors of + // |bb|, creating new Phi candidates along the way, if needed. + // + // It returns the value for |var_id| from the RHS of the current reaching + // definition for |var_id|. + uint32_t GetReachingDef(uint32_t var_id, ir::BasicBlock* bb); + + // Adds arguments to |phi_candidate| by getting the reaching definition of + // |phi_candidate|'s variable on each of the predecessors of its basic + // block. After populating the argument list, it determines whether all its + // arguments are the same. If so, it returns the ID of the argument that + // this Phi copies. + uint32_t AddPhiOperands(PhiCandidate* phi_candidate); + + // Creates a Phi candidate instruction for variable |var_id| in basic block + // |bb|. + // + // Since the rewriting algorithm may remove Phi candidates when it finds + // them to be trivial, we avoid the expense of creating actual Phi + // instructions by keeping a pool of Phi candidates (|phi_candidates_|) + // during rewriting. + // + // Once the candidate Phi is created, it returns its ID. + PhiCandidate& CreatePhiCandidate(uint32_t var_id, ir::BasicBlock* bb); + + // Attempts to remove a trivial Phi candidate |phi_cand|. Trivial Phis are + // those that only reference themselves and one other value |val| any number + // of times. This will try to remove any other Phis that become trivial + // after |phi_cand| is removed. + // + // If |phi_cand| is trivial, it returns the SSA ID for the value that should + // replace it. Otherwise, it returns the SSA ID for |phi_cand|. + uint32_t TryRemoveTrivialPhi(PhiCandidate* phi_cand); + + // Finalizes |phi_candidate| by replacing every argument that is still %0 + // with its reaching definition. + void FinalizePhiCandidate(PhiCandidate* phi_candidate); + + // Finalizes processing of Phi candidates. Once the whole function has been + // scanned for loads and stores, the CFG will still have some incomplete and + // trivial Phis. This will add missing arguments and remove trivial Phi + // candidates. + void FinalizePhiCandidates(); + + // Prints the table of Phi candidates to std::cerr. + void PrintPhiCandidates() const; + + // Prints the load replacement table to std::cerr. + void PrintReplacementTable() const; + + // Map holding the value of every SSA-target variable at every basic block + // where the variable is stored. defs_at_block_[block][var_id] = val_id + // means that there is a store or Phi instruction for variable |var_id| at + // basic block |block| with value |val_id|. + BlockDefsMap defs_at_block_; + + // Map, indexed by Phi ID, holding all the Phi candidates created during SSA + // rewriting. |phi_candidates_[id]| returns the Phi candidate whose result + // is |id|. + std::unordered_map phi_candidates_; + + // Queue of incomplete Phi candidates. These are Phi candidates created at + // unsealed blocks. They need to be completed before they are instantiated + // in ApplyReplacements. + std::queue incomplete_phis_; + + // List of completed Phi candidates. These are the only candidates that + // will become real Phi instructions. + std::vector phis_to_generate_; + + // SSA replacement table. This maps variable IDs, resulting from a load + // operation, to the value IDs that will replace them after SSA rewriting. + // After all the rewriting decisions are made, a final scan through the IR + // is done to replace all uses of the original load ID with the value ID. + std::unordered_map load_replacement_; + + // Set of blocks that have been sealed already. + std::unordered_set sealed_blocks_; + + // Memory pass requesting the SSA rewriter. + MemPass* pass_; + + // ID of the first Phi created by the SSA rewriter. During rewriting, any + // ID bigger than this corresponds to a Phi candidate. + uint32_t first_phi_id_; +}; + +class SSARewritePass : public MemPass { + public: + SSARewritePass() = default; + const char* name() const override { return "ssa-rewrite"; } + Status Process(ir::IRContext* c) override; + + private: + // Initializes the pass. + void Initialize(ir::IRContext* c); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_SSA_REWRITE_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.cpp index 58928c1795467c85237ebc2ea5eb03ebb4c98040..fd8ccf97c7cba43fb6fe1a2d3377e2458b4e681a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.cpp @@ -21,6 +21,7 @@ #include #include "def_use_manager.h" +#include "ir_context.h" #include "log.h" #include "reflect.h" @@ -52,39 +53,36 @@ bool IsPowerOf2(uint32_t val) { namespace spvtools { namespace opt { -Pass::Status StrengthReductionPass::Process(ir::Module* module) { +Pass::Status StrengthReductionPass::Process(ir::IRContext* c) { + InitializeProcessing(c); + // Initialize the member variables on a per module basis. bool modified = false; - def_use_mgr_.reset(new analysis::DefUseManager(consumer(), module)); int32_type_id_ = 0; uint32_type_id_ = 0; std::memset(constant_ids_, 0, sizeof(constant_ids_)); - next_id_ = module->IdBound(); - module_ = module; FindIntTypesAndConstants(); modified = ScanFunctions(); - // Have to reset the id bound. - module->SetIdBound(next_id_); return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); } bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( - ir::BasicBlock::iterator* instPtr) { - ir::BasicBlock::iterator& inst = *instPtr; - assert(inst->opcode() == SpvOp::SpvOpIMul && + ir::BasicBlock::iterator* inst) { + assert((*inst)->opcode() == SpvOp::SpvOpIMul && "Only works for multiplication of integers."); bool modified = false; // Currently only works on 32-bit integers. - if (inst->type_id() != int32_type_id_ && inst->type_id() != uint32_type_id_) { + if ((*inst)->type_id() != int32_type_id_ && + (*inst)->type_id() != uint32_type_id_) { return modified; } // Check the operands for a constant that is a power of 2. for (int i = 0; i < 2; i++) { - uint32_t opId = inst->GetSingleWordInOperand(i); - ir::Instruction* opInst = def_use_mgr_->GetDef(opId); + uint32_t opId = (*inst)->GetSingleWordInOperand(i); + ir::Instruction* opInst = get_def_use_mgr()->GetDef(opId); if (opInst->opcode() == SpvOp::SpvOpConstant) { // We found a constant operand. uint32_t constVal = opInst->GetSingleWordOperand(2); @@ -95,24 +93,26 @@ bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( uint32_t shiftConstResultId = GetConstantId(shiftAmount); // Create the new instruction. - uint32_t newResultId = next_id_++; + uint32_t newResultId = TakeNextId(); std::vector newOperands; - newOperands.push_back(inst->GetInOperand(1 - i)); + newOperands.push_back((*inst)->GetInOperand(1 - i)); ir::Operand shiftOperand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {shiftConstResultId}); newOperands.push_back(shiftOperand); std::unique_ptr newInstruction( - new ir::Instruction(SpvOp::SpvOpShiftLeftLogical, inst->type_id(), - newResultId, newOperands)); + new ir::Instruction(context(), SpvOp::SpvOpShiftLeftLogical, + (*inst)->type_id(), newResultId, newOperands)); // Insert the new instruction and update the data structures. - def_use_mgr_->AnalyzeInstDefUse(&*newInstruction); - inst = inst.InsertBefore(std::move(newInstruction)); - ++inst; - def_use_mgr_->ReplaceAllUsesWith(inst->result_id(), newResultId); + (*inst) = (*inst).InsertBefore(std::move(newInstruction)); + get_def_use_mgr()->AnalyzeInstDefUse(&*(*inst)); + ++(*inst); + context()->ReplaceAllUsesWith((*inst)->result_id(), newResultId); // Remove the old instruction. - def_use_mgr_->KillInst(&*inst); + ir::Instruction* inst_to_delete = &*(*inst); + --(*inst); + context()->KillInst(inst_to_delete); // We do not want to replace the instruction twice if both operands // are constants that are a power of 2. So we break here. @@ -125,18 +125,13 @@ bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( } void StrengthReductionPass::FindIntTypesAndConstants() { - for (auto iter = module_->types_values_begin(); - iter != module_->types_values_end(); ++iter) { + analysis::Integer int32(32, true); + int32_type_id_ = context()->get_type_mgr()->GetId(&int32); + analysis::Integer uint32(32, false); + uint32_type_id_ = context()->get_type_mgr()->GetId(&uint32); + for (auto iter = get_module()->types_values_begin(); + iter != get_module()->types_values_end(); ++iter) { switch (iter->opcode()) { - case SpvOp::SpvOpTypeInt: - if (iter->GetSingleWordOperand(1) == 32) { - if (iter->GetSingleWordOperand(2) == 1) { - int32_type_id_ = iter->result_id(); - } else { - uint32_type_id_ = iter->result_id(); - } - } - break; case SpvOp::SpvOpConstant: if (iter->type_id() == uint32_type_id_) { uint32_t value = iter->GetSingleWordOperand(2); @@ -155,16 +150,22 @@ uint32_t StrengthReductionPass::GetConstantId(uint32_t val) { if (constant_ids_[val] == 0) { if (uint32_type_id_ == 0) { - uint32_type_id_ = CreateUint32Type(); + analysis::Integer uint(32, false); + uint32_type_id_ = context()->get_type_mgr()->GetTypeInstruction(&uint); } // Construct the constant. - uint32_t resultId = next_id_++; + uint32_t resultId = TakeNextId(); ir::Operand constant(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {val}); - std::unique_ptr newConstant(new ir::Instruction( - SpvOp::SpvOpConstant, uint32_type_id_, resultId, {constant})); - module_->AddGlobalValue(std::move(newConstant)); + std::unique_ptr newConstant( + new ir::Instruction(context(), SpvOp::SpvOpConstant, uint32_type_id_, + resultId, {constant})); + get_module()->AddGlobalValue(std::move(newConstant)); + + // Notify the DefUseManager about this constant. + auto constantIter = --get_module()->types_values_end(); + get_def_use_mgr()->AnalyzeInstDef(&*constantIter); // Store the result id for next time. constant_ids_[val] = resultId; @@ -178,7 +179,7 @@ bool StrengthReductionPass::ScanFunctions() { // the instruction gets a pointer to the instruction. We cannot use that to // insert a new instruction. I want an iterator. bool modified = false; - for (auto& func : *module_) { + for (auto& func : *get_module()) { for (auto& bb : func) { for (auto inst = bb.begin(); inst != bb.end(); ++inst) { switch (inst->opcode()) { @@ -194,17 +195,5 @@ bool StrengthReductionPass::ScanFunctions() { return modified; } -uint32_t StrengthReductionPass::CreateUint32Type() { - uint32_t type_id = next_id_++; - ir::Operand widthOperand(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {32}); - ir::Operand signOperand(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {0}); - std::unique_ptr newType(new ir::Instruction( - SpvOp::SpvOpTypeInt, type_id, 0, {widthOperand, signOperand})); - module_->AddType(std::move(newType)); - return type_id; -} - } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.h index 3d39d458c85a5ae7c5f12718f0e433df8099295e..6c233e15159c9772df886182cc7de3741516ba58 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strength_reduction_pass.h @@ -16,6 +16,7 @@ #define LIBSPIRV_OPT_STRENGTH_REDUCTION_PASS_H_ #include "def_use_manager.h" +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -26,15 +27,17 @@ namespace opt { class StrengthReductionPass : public Pass { public: const char* name() const override { return "strength-reduction"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; private: // Replaces multiple by power of 2 with an equivalent bit shift. // Returns true if something changed. bool ReplaceMultiplyByPowerOf2(ir::BasicBlock::iterator*); - // Scan the types and constants in the module looking for the the integer types that we are - // interested in. The shift operation needs a small unsigned integer. We need to find + // Scan the types and constants in the module looking for the the integer + // types that we are + // interested in. The shift operation needs a small unsigned integer. We + // need to find // them or create them. We do not want duplicates. void FindIntTypesAndConstants(); @@ -46,13 +49,6 @@ class StrengthReductionPass : public Pass { // ones. Returns true if something changed. bool ScanFunctions(); - // Will create the type for an unsigned 32-bit integer and return the id. - // This functions assumes one does not already exist. - uint32_t CreateUint32Type(); - - // Def-Uses for the module we are processing - std::unique_ptr def_use_mgr_; - // Type ids for the types of interest, or 0 if they do not exist. uint32_t int32_type_id_; uint32_t uint32_type_id_; @@ -61,12 +57,6 @@ class StrengthReductionPass : public Pass { // We set the limit at 32 because a bit shift of a 32-bit integer does not // need a value larger than 32. uint32_t constant_ids_[33]; - - // Next unused ID - uint32_t next_id_; - - // The module that the pass is being applied to. - ir::Module* module_; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.cpp index 3b4b4431c85d809692d9b8047ce3c3f617b27391..ae35b1096f33d2dc071cf4e30256905eddde4320 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.cpp @@ -13,16 +13,18 @@ // limitations under the License. #include "strip_debug_info_pass.h" +#include "ir_context.h" namespace spvtools { namespace opt { -Pass::Status StripDebugInfoPass::Process(ir::Module* module) { - bool modified = !module->debugs1().empty() || !module->debugs2().empty() || - !module->debugs3().empty(); - module->debug_clear(); +Pass::Status StripDebugInfoPass::Process(ir::IRContext* irContext) { + bool modified = !irContext->debugs1().empty() || + !irContext->debugs2().empty() || + !irContext->debugs3().empty(); + irContext->debug_clear(); - module->ForEachInst([&modified](ir::Instruction* inst) { + irContext->module()->ForEachInst([&modified](ir::Instruction* inst) { modified |= !inst->dbg_line_insts().empty(); inst->dbg_line_insts().clear(); }); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.h index 626f9a8f5f33873f07cd5a13cb94bf73cdbb758e..52cbd680a999ffd73fb5fcd618470f34ff7ee2e0 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_debug_info_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_STRIP_DEBUG_INFO_PASS_H_ #define LIBSPIRV_OPT_STRIP_DEBUG_INFO_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class StripDebugInfoPass : public Pass { public: const char* name() const override { return "strip-debug"; } - Status Process(ir::Module* module) override; + Status Process(ir::IRContext* irContext) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d863e660049be2964efa15a5f7db10e757f79a81 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.cpp @@ -0,0 +1,75 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "strip_reflect_info_pass.h" + +#include + +#include "instruction.h" +#include "ir_context.h" + +namespace spvtools { +namespace opt { + +using spvtools::ir::Instruction; + +Pass::Status StripReflectInfoPass::Process(ir::IRContext* irContext) { + bool modified = false; + + std::vector to_remove; + + bool other_uses_for_decorate_string = false; + for (auto& inst : irContext->module()->annotations()) { + switch (inst.opcode()) { + case SpvOpDecorateStringGOOGLE: + if (inst.GetSingleWordInOperand(1) == SpvDecorationHlslSemanticGOOGLE) { + to_remove.push_back(&inst); + } else { + other_uses_for_decorate_string = true; + } + break; + + case SpvOpDecorateId: + if (inst.GetSingleWordInOperand(1) == + SpvDecorationHlslCounterBufferGOOGLE) { + to_remove.push_back(&inst); + } + break; + + default: + break; + } + } + + for (auto& inst : irContext->module()->extensions()) { + const char* ext_name = + reinterpret_cast(&inst.GetInOperand(0).words[0]); + if (0 == std::strcmp(ext_name, "SPV_GOOGLE_hlsl_functionality1")) { + to_remove.push_back(&inst); + } else if (!other_uses_for_decorate_string && + 0 == std::strcmp(ext_name, "SPV_GOOGLE_decorate_string")) { + to_remove.push_back(&inst); + } + } + + for (auto* inst : to_remove) { + modified = true; + irContext->KillInst(inst); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.h new file mode 100644 index 0000000000000000000000000000000000000000..b6e9f33fb953d9387aaa3e70238a67aa599944fd --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/strip_reflect_info_pass.h @@ -0,0 +1,44 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_STRIP_REFLECT_INFO_PASS_H_ +#define LIBSPIRV_OPT_STRIP_REFLECT_INFO_PASS_H_ + +#include "ir_context.h" +#include "module.h" +#include "pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class StripReflectInfoPass : public Pass { + public: + const char* name() const override { return "strip-reflect"; } + Status Process(ir::IRContext* irContext) override; + + // Return the mask of preserved Analyses. + ir::IRContext::Analysis GetPreservedAnalyses() override { + return ir::IRContext::kAnalysisInstrToBlockMapping | + ir::IRContext::kAnalysisCombinators | ir::IRContext::kAnalysisCFG | + ir::IRContext::kAnalysisDominatorAnalysis | + ir::IRContext::kAnalysisLoopAnalysis | + ir::IRContext::kAnalysisNameMap; + } +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_STRIP_REFLECT_INFO_PASS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/tree_iterator.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/tree_iterator.h new file mode 100644 index 0000000000000000000000000000000000000000..ba724dfa5472bea4d645d7d9b73ec4fe79efdb77 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/tree_iterator.h @@ -0,0 +1,246 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_TREE_ITERATOR_H_ +#define LIBSPIRV_OPT_TREE_ITERATOR_H_ + +#include +#include +#include + +namespace spvtools { +namespace opt { + +// Helper class to iterate over a tree in a depth first order. +// The class assumes the data structure is a tree, tree node type implements a +// forward iterator. +// At each step, the iterator holds the pointer to the current node and state of +// the walk. +// The state is recorded by stacking the iteration position of the node +// children. To move to the next node, the iterator: +// - Looks at the top of the stack; +// - Sets the node behind the iterator as the current node; +// - Increments the iterator if it has more children to visit, pops otherwise; +// - If the current node has children, the children iterator is pushed into the +// stack. +template +class TreeDFIterator { + static_assert(!std::is_pointer::value && + !std::is_reference::value, + "NodeTy should be a class"); + // Type alias to keep track of the const qualifier. + using NodeIterator = + typename std::conditional::value, + typename NodeTy::const_iterator, + typename NodeTy::iterator>::type; + + // Type alias to keep track of the const qualifier. + using NodePtr = NodeTy*; + + public: + // Standard iterator interface. + using reference = NodeTy&; + using value_type = NodeTy; + + explicit inline TreeDFIterator(NodePtr top_node) : current_(top_node) { + if (current_ && current_->begin() != current_->end()) + parent_iterators_.emplace(make_pair(current_, current_->begin())); + } + + // end() iterator. + inline TreeDFIterator() : TreeDFIterator(nullptr) {} + + bool operator==(const TreeDFIterator& x) const { + return current_ == x.current_; + } + + bool operator!=(const TreeDFIterator& x) const { return !(*this == x); } + + reference operator*() const { return *current_; } + + NodePtr operator->() const { return current_; } + + TreeDFIterator& operator++() { + MoveToNextNode(); + return *this; + } + + TreeDFIterator operator++(int) { + TreeDFIterator tmp = *this; + ++*this; + return tmp; + } + + private: + // Moves the iterator to the next node in the tree. + // If we are at the end, do nothing, otherwise + // if our current node has children, use the children iterator and push the + // current node into the stack. + // If we reach the end of the local iterator, pop it. + inline void MoveToNextNode() { + if (!current_) return; + if (parent_iterators_.empty()) { + current_ = nullptr; + return; + } + std::pair& next_it = parent_iterators_.top(); + // Set the new node. + current_ = *next_it.second; + // Update the iterator for the next child. + ++next_it.second; + // If we finished with node, pop it. + if (next_it.first->end() == next_it.second) parent_iterators_.pop(); + // If our current node is not a leaf, store the iteration state for later. + if (current_->begin() != current_->end()) + parent_iterators_.emplace(make_pair(current_, current_->begin())); + } + + // The current node of the tree. + NodePtr current_; + // State of the tree walk: each pair contains the parent node (which has been + // already visited) and the iterator of the next children to visit. + // When all the children has been visited, we pop the entry, get the next + // child and push back the pair if the children iterator is not end(). + std::stack> parent_iterators_; +}; + +// Helper class to iterate over a tree in a depth first post-order. +// The class assumes the data structure is a tree, tree node type implements a +// forward iterator. +// At each step, the iterator holds the pointer to the current node and state of +// the walk. +// The state is recorded by stacking the iteration position of the node +// children. To move to the next node, the iterator: +// - Looks at the top of the stack; +// - If the children iterator has reach the end, then the node become the +// current one and we pop the stack; +// - Otherwise, we save the child and increment the iterator; +// - We walk the child sub-tree until we find a leaf, stacking all non-leaves +// states (pair of node pointer and child iterator) as we walk it. +template +class PostOrderTreeDFIterator { + static_assert(!std::is_pointer::value && + !std::is_reference::value, + "NodeTy should be a class"); + // Type alias to keep track of the const qualifier. + using NodeIterator = + typename std::conditional::value, + typename NodeTy::const_iterator, + typename NodeTy::iterator>::type; + + // Type alias to keep track of the const qualifier. + using NodePtr = NodeTy*; + + public: + // Standard iterator interface. + using reference = NodeTy&; + using value_type = NodeTy; + + static inline PostOrderTreeDFIterator begin(NodePtr top_node) { + return PostOrderTreeDFIterator(top_node); + } + + static inline PostOrderTreeDFIterator end(NodePtr sentinel_node) { + return PostOrderTreeDFIterator(sentinel_node, false); + } + + bool operator==(const PostOrderTreeDFIterator& x) const { + return current_ == x.current_; + } + + bool operator!=(const PostOrderTreeDFIterator& x) const { + return !(*this == x); + } + + reference operator*() const { return *current_; } + + NodePtr operator->() const { return current_; } + + PostOrderTreeDFIterator& operator++() { + MoveToNextNode(); + return *this; + } + + PostOrderTreeDFIterator operator++(int) { + PostOrderTreeDFIterator tmp = *this; + ++*this; + return tmp; + } + + private: + explicit inline PostOrderTreeDFIterator(NodePtr top_node) + : current_(top_node) { + if (current_) WalkToLeaf(); + } + + // Constructor for the "end()" iterator. + // |end_sentinel| is the value that acts as end value (can be null). The bool + // parameters is to distinguish from the start() Ctor. + inline PostOrderTreeDFIterator(NodePtr sentinel_node, bool) + : current_(sentinel_node) {} + + // Moves the iterator to the next node in the tree. + // If we are at the end, do nothing, otherwise + // if our current node has children, use the children iterator and push the + // current node into the stack. + // If we reach the end of the local iterator, pop it. + inline void MoveToNextNode() { + if (!current_) return; + if (parent_iterators_.empty()) { + current_ = nullptr; + return; + } + std::pair& next_it = parent_iterators_.top(); + // If we visited all children, the current node is the top of the stack. + if (next_it.second == next_it.first->end()) { + // Set the new node. + current_ = next_it.first; + parent_iterators_.pop(); + return; + } + // We have more children to visit, set the current node to the first child + // and dive to leaf. + current_ = *next_it.second; + // Update the iterator for the next child (avoid unneeded pop). + ++next_it.second; + WalkToLeaf(); + } + + // Moves the iterator to the next node in the tree. + // If we are at the end, do nothing, otherwise + // if our current node has children, use the children iterator and push the + // current node into the stack. + // If we reach the end of the local iterator, pop it. + inline void WalkToLeaf() { + while (current_->begin() != current_->end()) { + NodeIterator next = ++current_->begin(); + parent_iterators_.emplace(make_pair(current_, next)); + // Set the first child as the new node. + current_ = *current_->begin(); + } + } + + // The current node of the tree. + NodePtr current_; + // State of the tree walk: each pair contains the parent node and the iterator + // of the next children to visit. + // When all the children has been visited, we pop the first entry and the + // parent node become the current node. + std::stack> parent_iterators_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_TREE_ITERATOR_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.cpp index 8a125278ee1f25aeccf213c797482478ed64482f..9e2cd8652983b2cb9d61eefabe7533f9730112ce 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.cpp @@ -14,21 +14,46 @@ #include "type_manager.h" +#include +#include #include +#include "ir_context.h" #include "log.h" +#include "make_unique.h" #include "reflect.h" +namespace { +const int kSpvTypePointerStorageClass = 1; +const int kSpvTypePointerTypeIdInIdx = 2; +} // namespace + namespace spvtools { namespace opt { namespace analysis { +TypeManager::TypeManager(const MessageConsumer& consumer, + spvtools::ir::IRContext* c) + : consumer_(consumer), context_(c) { + AnalyzeTypes(*c->module()); +} + Type* TypeManager::GetType(uint32_t id) const { auto iter = id_to_type_.find(id); - if (iter != id_to_type_.end()) return (*iter).second.get(); + if (iter != id_to_type_.end()) return (*iter).second; return nullptr; } +std::pair> TypeManager::GetTypeAndPointerType( + uint32_t id, SpvStorageClass sc) const { + Type* type = GetType(id); + if (type) { + return std::make_pair(type, MakeUnique(type, sc)); + } else { + return std::make_pair(type, std::unique_ptr()); + } +} + uint32_t TypeManager::GetId(const Type* type) const { auto iter = type_to_id_.find(type); if (iter != type_to_id_.end()) return (*iter).second; @@ -42,7 +67,433 @@ ForwardPointer* TypeManager::GetForwardPointer(uint32_t index) const { void TypeManager::AnalyzeTypes(const spvtools::ir::Module& module) { for (const auto* inst : module.GetTypes()) RecordIfTypeDefinition(*inst); - for (const auto& inst : module.annotations()) AttachIfTypeDecoration(inst); +} + +void TypeManager::RemoveId(uint32_t id) { + auto iter = id_to_type_.find(id); + if (iter == id_to_type_.end()) return; + + auto& type = iter->second; + if (!type->IsUniqueType(true)) { + auto tIter = type_to_id_.find(type); + if (tIter != type_to_id_.end() && tIter->second == id) { + // |type| currently maps to |id|. + // Search for an equivalent type to re-map. + bool found = false; + for (auto& pair : id_to_type_) { + if (pair.first != id && *pair.second == *type) { + // Equivalent ambiguous type, re-map type. + type_to_id_.erase(type); + type_to_id_[pair.second] = pair.first; + found = true; + break; + } + } + // No equivalent ambiguous type, remove mapping. + if (!found) type_to_id_.erase(tIter); + } + } else { + // Unique type, so just erase the entry. + type_to_id_.erase(type); + } + + // Erase the entry for |id|. + id_to_type_.erase(iter); +} + +uint32_t TypeManager::GetTypeInstruction(const Type* type) { + uint32_t id = GetId(type); + if (id != 0) return id; + + std::unique_ptr typeInst; + id = context()->TakeNextId(); + RegisterType(id, *type); + switch (type->kind()) { +#define DefineParameterlessCase(kind) \ + case Type::k##kind: \ + typeInst.reset(new ir::Instruction(context(), SpvOpType##kind, 0, id, \ + std::initializer_list{})); \ + break; + DefineParameterlessCase(Void); + DefineParameterlessCase(Bool); + DefineParameterlessCase(Sampler); + DefineParameterlessCase(Event); + DefineParameterlessCase(DeviceEvent); + DefineParameterlessCase(ReserveId); + DefineParameterlessCase(Queue); + DefineParameterlessCase(PipeStorage); + DefineParameterlessCase(NamedBarrier); +#undef DefineParameterlessCase + case Type::kInteger: + typeInst.reset(new ir::Instruction( + context(), SpvOpTypeInt, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {type->AsInteger()->width()}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, + {(type->AsInteger()->IsSigned() ? 1u : 0u)}}})); + break; + case Type::kFloat: + typeInst.reset(new ir::Instruction( + context(), SpvOpTypeFloat, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {type->AsFloat()->width()}}})); + break; + case Type::kVector: { + uint32_t subtype = GetTypeInstruction(type->AsVector()->element_type()); + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeVector, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, + {type->AsVector()->element_count()}}})); + break; + } + case Type::kMatrix: { + uint32_t subtype = GetTypeInstruction(type->AsMatrix()->element_type()); + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeMatrix, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, + {type->AsMatrix()->element_count()}}})); + break; + } + case Type::kImage: { + const Image* image = type->AsImage(); + uint32_t subtype = GetTypeInstruction(image->sampled_type()); + typeInst.reset(new ir::Instruction( + context(), SpvOpTypeImage, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}, + {SPV_OPERAND_TYPE_DIMENSIONALITY, + {static_cast(image->dim())}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {image->depth()}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, + {(image->is_arrayed() ? 1u : 0u)}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, + {(image->is_multisampled() ? 1u : 0u)}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {image->sampled()}}, + {SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT, + {static_cast(image->format())}}, + {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, + {static_cast(image->access_qualifier())}}})); + break; + } + case Type::kSampledImage: { + uint32_t subtype = + GetTypeInstruction(type->AsSampledImage()->image_type()); + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeSampledImage, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}})); + break; + } + case Type::kArray: { + uint32_t subtype = GetTypeInstruction(type->AsArray()->element_type()); + typeInst.reset(new ir::Instruction( + context(), SpvOpTypeArray, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}, + {SPV_OPERAND_TYPE_ID, {type->AsArray()->LengthId()}}})); + break; + } + case Type::kRuntimeArray: { + uint32_t subtype = + GetTypeInstruction(type->AsRuntimeArray()->element_type()); + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeRuntimeArray, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {subtype}}})); + break; + } + case Type::kStruct: { + std::vector ops; + const Struct* structTy = type->AsStruct(); + for (auto ty : structTy->element_types()) { + ops.push_back( + ir::Operand(SPV_OPERAND_TYPE_ID, {GetTypeInstruction(ty)})); + } + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeStruct, 0, id, ops)); + break; + } + case Type::kOpaque: { + const Opaque* opaque = type->AsOpaque(); + size_t size = opaque->name().size(); + // Convert to null-terminated packed UTF-8 string. + std::vector words(size / 4 + 1, 0); + char* dst = reinterpret_cast(words.data()); + strncpy(dst, opaque->name().c_str(), size); + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeOpaque, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_LITERAL_STRING, words}})); + break; + } + case Type::kPointer: { + const Pointer* pointer = type->AsPointer(); + uint32_t subtype = GetTypeInstruction(pointer->pointee_type()); + typeInst.reset(new ir::Instruction( + context(), SpvOpTypePointer, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, + {static_cast(pointer->storage_class())}}, + {SPV_OPERAND_TYPE_ID, {subtype}}})); + break; + } + case Type::kFunction: { + std::vector ops; + const Function* function = type->AsFunction(); + ops.push_back(ir::Operand(SPV_OPERAND_TYPE_ID, + {GetTypeInstruction(function->return_type())})); + for (auto ty : function->param_types()) { + ops.push_back( + ir::Operand(SPV_OPERAND_TYPE_ID, {GetTypeInstruction(ty)})); + } + typeInst.reset( + new ir::Instruction(context(), SpvOpTypeFunction, 0, id, ops)); + break; + } + case Type::kPipe: + typeInst.reset(new ir::Instruction( + context(), SpvOpTypePipe, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, + {static_cast(type->AsPipe()->access_qualifier())}}})); + break; + case Type::kForwardPointer: + typeInst.reset(new ir::Instruction( + context(), SpvOpTypeForwardPointer, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {type->AsForwardPointer()->target_id()}}, + {SPV_OPERAND_TYPE_STORAGE_CLASS, + {static_cast( + type->AsForwardPointer()->storage_class())}}})); + break; + default: + assert(false && "Unexpected type"); + break; + } + context()->AddType(std::move(typeInst)); + context()->AnalyzeDefUse(&*--context()->types_values_end()); + AttachDecorations(id, type); + return id; +} + +uint32_t TypeManager::FindPointerToType(uint32_t type_id, + SpvStorageClass storage_class) { + opt::analysis::Type* pointeeTy = context()->get_type_mgr()->GetType(type_id); + opt::analysis::Pointer pointerTy(pointeeTy, storage_class); + if (type_id == context()->get_type_mgr()->GetId(pointeeTy)) { + // Non-ambiguous type. Get the pointer type through the type manager. + return context()->get_type_mgr()->GetTypeInstruction(&pointerTy); + } + + // Ambiguous type, do a linear search. + ir::Module::inst_iterator type_itr = + context()->module()->types_values_begin(); + for (; type_itr != context()->module()->types_values_end(); ++type_itr) { + const ir::Instruction* type_inst = &*type_itr; + if (type_inst->opcode() == SpvOpTypePointer && + type_inst->GetSingleWordOperand(kSpvTypePointerTypeIdInIdx) == + type_id && + type_inst->GetSingleWordOperand(kSpvTypePointerStorageClass) == + storage_class) + return type_inst->result_id(); + } + + // Must create the pointer type. + uint32_t resultId = context()->TakeNextId(); + std::unique_ptr type_inst(new ir::Instruction( + context(), SpvOpTypePointer, 0, resultId, + {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, + {uint32_t(storage_class)}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {type_id}}})); + context()->AnalyzeDefUse(type_inst.get()); + context()->AddType(std::move(type_inst)); + context()->get_type_mgr()->RegisterType(resultId, pointerTy); + return resultId; +} + +void TypeManager::AttachDecorations(uint32_t id, const Type* type) { + for (auto vec : type->decorations()) { + CreateDecoration(id, vec); + } + if (const Struct* structTy = type->AsStruct()) { + for (auto pair : structTy->element_decorations()) { + uint32_t element = pair.first; + for (auto vec : pair.second) { + CreateDecoration(id, vec, element); + } + } + } +} + +void TypeManager::CreateDecoration(uint32_t target, + const std::vector& decoration, + uint32_t element) { + std::vector ops; + ops.push_back(ir::Operand(SPV_OPERAND_TYPE_ID, {target})); + if (element != 0) { + ops.push_back(ir::Operand(SPV_OPERAND_TYPE_LITERAL_INTEGER, {element})); + } + ops.push_back(ir::Operand(SPV_OPERAND_TYPE_DECORATION, {decoration[0]})); + for (size_t i = 1; i < decoration.size(); ++i) { + ops.push_back( + ir::Operand(SPV_OPERAND_TYPE_LITERAL_INTEGER, {decoration[i]})); + } + context()->AddAnnotationInst(MakeUnique( + context(), (element == 0 ? SpvOpDecorate : SpvOpMemberDecorate), 0, 0, + ops)); + ir::Instruction* inst = &*--context()->annotation_end(); + context()->get_def_use_mgr()->AnalyzeInstUse(inst); +} + +Type* TypeManager::RebuildType(const Type& type) { + // The comparison and hash on the type pool will avoid inserting the rebuilt + // type if an equivalent type already exists. The rebuilt type will be deleted + // when it goes out of scope at the end of the function in that case. Repeated + // insertions of the same Type will, at most, keep one corresponding object in + // the type pool. + std::unique_ptr rebuilt_ty; + switch (type.kind()) { +#define DefineNoSubtypeCase(kind) \ + case Type::k##kind: \ + rebuilt_ty.reset(type.Clone().release()); \ + break; + DefineNoSubtypeCase(Void); + DefineNoSubtypeCase(Bool); + DefineNoSubtypeCase(Integer); + DefineNoSubtypeCase(Float); + DefineNoSubtypeCase(Sampler); + DefineNoSubtypeCase(Opaque); + DefineNoSubtypeCase(Event); + DefineNoSubtypeCase(DeviceEvent); + DefineNoSubtypeCase(ReserveId); + DefineNoSubtypeCase(Queue); + DefineNoSubtypeCase(Pipe); + DefineNoSubtypeCase(PipeStorage); + DefineNoSubtypeCase(NamedBarrier); +#undef DefineNoSubtypeCase + case Type::kVector: { + const Vector* vec_ty = type.AsVector(); + const Type* ele_ty = vec_ty->element_type(); + rebuilt_ty.reset( + new Vector(RebuildType(*ele_ty), vec_ty->element_count())); + break; + } + case Type::kMatrix: { + const Matrix* mat_ty = type.AsMatrix(); + const Type* ele_ty = mat_ty->element_type(); + rebuilt_ty.reset( + new Matrix(RebuildType(*ele_ty), mat_ty->element_count())); + break; + } + case Type::kImage: { + const Image* image_ty = type.AsImage(); + const Type* ele_ty = image_ty->sampled_type(); + rebuilt_ty.reset(new Image(RebuildType(*ele_ty), image_ty->dim(), + image_ty->depth(), image_ty->is_arrayed(), + image_ty->is_multisampled(), + image_ty->sampled(), image_ty->format(), + image_ty->access_qualifier())); + break; + } + case Type::kSampledImage: { + const SampledImage* image_ty = type.AsSampledImage(); + const Type* ele_ty = image_ty->image_type(); + rebuilt_ty.reset( + + new SampledImage(RebuildType(*ele_ty))); + break; + } + case Type::kArray: { + const Array* array_ty = type.AsArray(); + const Type* ele_ty = array_ty->element_type(); + rebuilt_ty.reset(new Array(RebuildType(*ele_ty), array_ty->LengthId())); + break; + } + case Type::kRuntimeArray: { + const RuntimeArray* array_ty = type.AsRuntimeArray(); + const Type* ele_ty = array_ty->element_type(); + rebuilt_ty.reset(new RuntimeArray(RebuildType(*ele_ty))); + break; + } + case Type::kStruct: { + const Struct* struct_ty = type.AsStruct(); + std::vector subtypes; + subtypes.reserve(struct_ty->element_types().size()); + for (const auto* ele_ty : struct_ty->element_types()) { + subtypes.push_back(RebuildType(*ele_ty)); + } + rebuilt_ty.reset(new Struct(subtypes)); + Struct* rebuilt_struct = rebuilt_ty->AsStruct(); + for (auto pair : struct_ty->element_decorations()) { + uint32_t index = pair.first; + for (const auto& dec : pair.second) { + // Explicit copy intended. + std::vector copy(dec); + rebuilt_struct->AddMemberDecoration(index, std::move(copy)); + } + } + break; + } + case Type::kPointer: { + const Pointer* pointer_ty = type.AsPointer(); + const Type* ele_ty = pointer_ty->pointee_type(); + rebuilt_ty.reset( + new Pointer(RebuildType(*ele_ty), pointer_ty->storage_class())); + break; + } + case Type::kFunction: { + const Function* function_ty = type.AsFunction(); + const Type* ret_ty = function_ty->return_type(); + std::vector param_types; + param_types.reserve(function_ty->param_types().size()); + for (const auto* param_ty : function_ty->param_types()) { + param_types.push_back(RebuildType(*param_ty)); + } + rebuilt_ty.reset(new Function(RebuildType(*ret_ty), param_types)); + break; + } + case Type::kForwardPointer: { + const ForwardPointer* forward_ptr_ty = type.AsForwardPointer(); + rebuilt_ty.reset(new ForwardPointer(forward_ptr_ty->target_id(), + forward_ptr_ty->storage_class())); + const Pointer* target_ptr = forward_ptr_ty->target_pointer(); + if (target_ptr) { + rebuilt_ty->AsForwardPointer()->SetTargetPointer( + RebuildType(*target_ptr)->AsPointer()); + } + break; + } + default: + assert(false && "Unhandled type"); + return nullptr; + } + for (const auto& dec : type.decorations()) { + // Explicit copy intended. + std::vector copy(dec); + rebuilt_ty->AddDecoration(std::move(copy)); + } + + return type_pool_.insert(std::move(rebuilt_ty)).first->get(); +} + +void TypeManager::RegisterType(uint32_t id, const Type& type) { + // Rebuild |type| so it and all its constituent types are owned by the type + // pool. + Type* rebuilt = RebuildType(type); + assert(rebuilt->IsSame(&type)); + id_to_type_[id] = rebuilt; + if (GetId(rebuilt) == 0) { + type_to_id_[rebuilt] = id; + } +} + +Type* TypeManager::GetRegisteredType(const Type* type) { + uint32_t id = GetTypeInstruction(type); + return GetType(id); } Type* TypeManager::RecordIfTypeDefinition( @@ -80,8 +531,8 @@ Type* TypeManager::RecordIfTypeDefinition( type = new Image( GetType(inst.GetSingleWordInOperand(0)), static_cast(inst.GetSingleWordInOperand(1)), - inst.GetSingleWordInOperand(2), inst.GetSingleWordInOperand(3), - inst.GetSingleWordInOperand(4), inst.GetSingleWordInOperand(5), + inst.GetSingleWordInOperand(2), inst.GetSingleWordInOperand(3) == 1, + inst.GetSingleWordInOperand(4) == 1, inst.GetSingleWordInOperand(5), static_cast(inst.GetSingleWordInOperand(6)), access); } break; case SpvOpTypeSampler: @@ -173,20 +624,23 @@ Type* TypeManager::RecordIfTypeDefinition( } else { SPIRV_ASSERT(consumer_, type != nullptr, "type should not be nullptr at this point"); - id_to_type_[id].reset(type); - type_to_id_[type] = id; + std::vector decorations = + context()->get_decoration_mgr()->GetDecorationsFor(id, true); + for (auto dec : decorations) { + AttachDecoration(*dec, type); + } + std::unique_ptr unique(type); + auto pair = type_pool_.insert(std::move(unique)); + id_to_type_[id] = pair.first->get(); + type_to_id_[pair.first->get()] = id; } return type; } -void TypeManager::AttachIfTypeDecoration(const ir::Instruction& inst) { +void TypeManager::AttachDecoration(const ir::Instruction& inst, Type* type) { const SpvOp opcode = inst.opcode(); if (!ir::IsAnnotationInst(opcode)) return; - const uint32_t id = inst.GetSingleWordOperand(0); - // Do nothing if the id to be decorated is not for a known type. - if (!id_to_type_.count(id)) return; - Type* target_type = id_to_type_[id].get(); switch (opcode) { case SpvOpDecorate: { const auto count = inst.NumOperands(); @@ -194,7 +648,7 @@ void TypeManager::AttachIfTypeDecoration(const ir::Instruction& inst) { for (uint32_t i = 1; i < count; ++i) { data.push_back(inst.GetSingleWordOperand(i)); } - target_type->AddDecoration(std::move(data)); + type->AddDecoration(std::move(data)); } break; case SpvOpMemberDecorate: { const auto count = inst.NumOperands(); @@ -203,23 +657,39 @@ void TypeManager::AttachIfTypeDecoration(const ir::Instruction& inst) { for (uint32_t i = 2; i < count; ++i) { data.push_back(inst.GetSingleWordOperand(i)); } - if (Struct* st = target_type->AsStruct()) { + if (Struct* st = type->AsStruct()) { st->AddMemberDecoration(index, std::move(data)); } else { SPIRV_UNIMPLEMENTED(consumer_, "OpMemberDecorate non-struct type"); } } break; - case SpvOpDecorationGroup: - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: - SPIRV_UNIMPLEMENTED(consumer_, "unhandled decoration"); - break; default: SPIRV_UNREACHABLE(consumer_); break; } } +const Type* TypeManager::GetMemberType( + const Type* parent_type, const std::vector& access_chain) { + for (uint32_t element_index : access_chain) { + if (const analysis::Struct* struct_type = parent_type->AsStruct()) { + parent_type = struct_type->element_types()[element_index]; + } else if (const analysis::Array* array_type = parent_type->AsArray()) { + parent_type = array_type->element_type(); + } else if (const analysis::RuntimeArray* runtime_array_type = + parent_type->AsRuntimeArray()) { + parent_type = runtime_array_type->element_type(); + } else if (const analysis::Vector* vector_type = parent_type->AsVector()) { + parent_type = vector_type->element_type(); + } else if (const analysis::Matrix* matrix_type = parent_type->AsMatrix()) { + parent_type = matrix_type->element_type(); + } else { + assert(false && "Trying to get a member of a type without members."); + } + } + return parent_type; +} + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.h index 3fe67999a576450415a9d2b670534331f58dd97c..2020d8b9a19e476bb03cefae0b070a58d89c7ba8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/type_manager.h @@ -25,20 +25,57 @@ #include "types.h" namespace spvtools { +namespace ir { +class IRContext; +} // namespace ir namespace opt { namespace analysis { +// Hashing functor. +// +// All type pointers must be non-null. +struct HashTypePointer { + size_t operator()(const Type* type) const { + assert(type); + return type->HashValue(); + } +}; +struct HashTypeUniquePointer { + size_t operator()(const std::unique_ptr& type) const { + assert(type); + return type->HashValue(); + } +}; + +// Equality functor. +// +// Checks if two types pointers are the same type. +// +// All type pointers must be non-null. +struct CompareTypePointers { + bool operator()(const Type* lhs, const Type* rhs) const { + assert(lhs && rhs); + return lhs->IsSame(rhs); + } +}; +struct CompareTypeUniquePointers { + bool operator()(const std::unique_ptr& lhs, + const std::unique_ptr& rhs) const { + assert(lhs && rhs); + return lhs->IsSame(rhs.get()); + } +}; + // A class for managing the SPIR-V type hierarchy. class TypeManager { public: - using IdToTypeMap = std::unordered_map>; + using IdToTypeMap = std::unordered_map; // Constructs a type manager from the given |module|. All internal messages // will be communicated to the outside via the given message |consumer|. // This instance only keeps a reference to the |consumer|, so the |consumer| // should outlive this instance. - TypeManager(const MessageConsumer& consumer, - const spvtools::ir::Module& module); + TypeManager(const MessageConsumer& consumer, spvtools::ir::IRContext* c); TypeManager(const TypeManager&) = delete; TypeManager(TypeManager&&) = delete; @@ -62,35 +99,95 @@ class TypeManager { // Returns the number of forward pointer types hold in this manager. size_t NumForwardPointers() const { return forward_pointers_.size(); } + // Returns a pair of the type and pointer to the type in |sc|. + // + // |id| must be a registered type. + std::pair> GetTypeAndPointerType( + uint32_t id, SpvStorageClass sc) const; + + // Returns an id for a declaration representing |type|. + // + // If |type| is registered, then the registered id is returned. Otherwise, + // this function recursively adds type and annotation instructions as + // necessary to fully define |type|. + uint32_t GetTypeInstruction(const Type* type); + + // Find pointer to type and storage in module, return its resultId. If it is + // not found, a new type is created, and its id is returned. + uint32_t FindPointerToType(uint32_t type_id, SpvStorageClass storage_class); + + // Registers |id| to |type|. + // + // If GetId(|type|) already returns a non-zero id, that mapping will be + // unchanged. + void RegisterType(uint32_t id, const Type& type); + + Type* GetRegisteredType(const Type* type); + + // Removes knowledge of |id| from the manager. + // + // If |id| is an ambiguous type the multiple ids may be registered to |id|'s + // type (e.g. %struct1 and %struct1 might hash to the same type). In that + // case, calling GetId() with |id|'s type will return another suitable id + // defining that type. + void RemoveId(uint32_t id); + + // Returns the type of the member of |parent_type| that is identified by + // |access_chain|. The vector |access_chain| is a series of integers that are + // used to pick members as in the |OpCompositeExtract| instructions. If you + // want a member of an array, vector, or matrix that does not have a constant + // index, you can use 0 in that position. All elements have the same type. + const Type* GetMemberType(const Type* parent_type, + const std::vector& access_chain); + private: - using TypeToIdMap = std::unordered_map; + using TypeToIdMap = std::unordered_map; + using TypePool = + std::unordered_set, HashTypeUniquePointer, + CompareTypeUniquePointers>; using ForwardPointerVector = std::vector>; // Analyzes the types and decorations on types in the given |module|. void AnalyzeTypes(const spvtools::ir::Module& module); + spvtools::ir::IRContext* context() { return context_; } + + // Attachs the decorations on |type| to |id|. + void AttachDecorations(uint32_t id, const Type* type); + + // Create the annotation instruction. + // + // If |element| is zero, an OpDecorate is created, other an OpMemberDecorate + // is created. The annotation is registered with the DefUseManager and the + // DecorationManager. + void CreateDecoration(uint32_t id, const std::vector& decoration, + uint32_t element = 0); + // Creates and returns a type from the given SPIR-V |inst|. Returns nullptr if // the given instruction is not for defining a type. Type* RecordIfTypeDefinition(const spvtools::ir::Instruction& inst); - // Attaches the decoration encoded in |inst| to a type. Does nothing if the - // given instruction is not a decoration instruction or not decorating a type. - void AttachIfTypeDecoration(const spvtools::ir::Instruction& inst); + // Attaches the decoration encoded in |inst| to |type|. Does nothing if the + // given instruction is not a decoration instruction. Assumes the target is + // |type| (e.g. should be called in loop of |type|'s decorations). + void AttachDecoration(const spvtools::ir::Instruction& inst, Type* type); + + // Returns an equivalent pointer to |type| built in terms of pointers owned by + // |type_pool_|. For example, if |type| is a vec3 of bool, it will be rebuilt + // replacing the bool subtype with one owned by |type_pool_|. + Type* RebuildType(const Type& type); const MessageConsumer& consumer_; // Message consumer. + spvtools::ir::IRContext* context_; IdToTypeMap id_to_type_; // Mapping from ids to their type representations. TypeToIdMap type_to_id_; // Mapping from types to their defining ids. + TypePool type_pool_; // Memory owner of type pointers. ForwardPointerVector forward_pointers_; // All forward pointer declarations. // All unresolved forward pointer declarations. // Refers the contents in the above vector. std::unordered_set unresolved_forward_pointers_; }; -inline TypeManager::TypeManager(const spvtools::MessageConsumer& consumer, - const spvtools::ir::Module& module) - : consumer_(consumer) { - AnalyzeTypes(module); -} - } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.cpp index 1d8cad2411e6abb268c744591ed905aab55c5f16..4838f8e505f3b3b4a672d5db94554ef0b7ea7eaf 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include "types.h" @@ -42,10 +43,10 @@ bool CompareTwoVectors(const U32VecVec a, const U32VecVec b) { b_ptrs.push_back(&b[i]); } - const auto cmp = - [](const std::vector* m, const std::vector* n) { - return m->front() < n->front(); - }; + const auto cmp = [](const std::vector* m, + const std::vector* n) { + return m->front() < n->front(); + }; std::sort(a_ptrs.begin(), a_ptrs.end(), cmp); std::sort(b_ptrs.begin(), b_ptrs.end(), cmp); @@ -77,7 +78,154 @@ bool Type::HasSameDecorations(const Type* that) const { return CompareTwoVectors(decorations_, that->decorations_); } -bool Integer::IsSame(Type* that) const { +bool Type::IsUniqueType(bool allowVariablePointers) const { + switch (kind_) { + case kPointer: + return !allowVariablePointers; + case kStruct: + case kArray: + case kRuntimeArray: + return false; + default: + return true; + } +} + +std::unique_ptr Type::Clone() const { + std::unique_ptr type; + switch (kind_) { +#define DeclareKindCase(kind) \ + case k##kind: \ + type.reset(new kind(*this->As##kind())); \ + break; + DeclareKindCase(Void); + DeclareKindCase(Bool); + DeclareKindCase(Integer); + DeclareKindCase(Float); + DeclareKindCase(Vector); + DeclareKindCase(Matrix); + DeclareKindCase(Image); + DeclareKindCase(Sampler); + DeclareKindCase(SampledImage); + DeclareKindCase(Array); + DeclareKindCase(RuntimeArray); + DeclareKindCase(Struct); + DeclareKindCase(Opaque); + DeclareKindCase(Pointer); + DeclareKindCase(Function); + DeclareKindCase(Event); + DeclareKindCase(DeviceEvent); + DeclareKindCase(ReserveId); + DeclareKindCase(Queue); + DeclareKindCase(Pipe); + DeclareKindCase(ForwardPointer); + DeclareKindCase(PipeStorage); + DeclareKindCase(NamedBarrier); +#undef DeclareKindCase + default: + assert(false && "Unhandled type"); + } + return type; +} + +std::unique_ptr Type::RemoveDecorations() const { + std::unique_ptr type(Clone()); + type->ClearDecorations(); + return type; +} + +bool Type::operator==(const Type& other) const { + if (kind_ != other.kind_) return false; + + switch (kind_) { +#define DeclareKindCase(kind) \ + case k##kind: \ + return As##kind()->IsSame(&other); + DeclareKindCase(Void); + DeclareKindCase(Bool); + DeclareKindCase(Integer); + DeclareKindCase(Float); + DeclareKindCase(Vector); + DeclareKindCase(Matrix); + DeclareKindCase(Image); + DeclareKindCase(Sampler); + DeclareKindCase(SampledImage); + DeclareKindCase(Array); + DeclareKindCase(RuntimeArray); + DeclareKindCase(Struct); + DeclareKindCase(Opaque); + DeclareKindCase(Pointer); + DeclareKindCase(Function); + DeclareKindCase(Event); + DeclareKindCase(DeviceEvent); + DeclareKindCase(ReserveId); + DeclareKindCase(Queue); + DeclareKindCase(Pipe); + DeclareKindCase(ForwardPointer); + DeclareKindCase(PipeStorage); + DeclareKindCase(NamedBarrier); +#undef DeclareKindCase + default: + assert(false && "Unhandled type"); + return false; + } +} + +void Type::GetHashWords(std::vector* words) const { + words->push_back(kind_); + for (const auto& d : decorations_) { + for (auto w : d) { + words->push_back(w); + } + } + + switch (kind_) { +#define DeclareKindCase(type) \ + case k##type: \ + As##type()->GetExtraHashWords(words); \ + break; + DeclareKindCase(Void); + DeclareKindCase(Bool); + DeclareKindCase(Integer); + DeclareKindCase(Float); + DeclareKindCase(Vector); + DeclareKindCase(Matrix); + DeclareKindCase(Image); + DeclareKindCase(Sampler); + DeclareKindCase(SampledImage); + DeclareKindCase(Array); + DeclareKindCase(RuntimeArray); + DeclareKindCase(Struct); + DeclareKindCase(Opaque); + DeclareKindCase(Pointer); + DeclareKindCase(Function); + DeclareKindCase(Event); + DeclareKindCase(DeviceEvent); + DeclareKindCase(ReserveId); + DeclareKindCase(Queue); + DeclareKindCase(Pipe); + DeclareKindCase(ForwardPointer); + DeclareKindCase(PipeStorage); + DeclareKindCase(NamedBarrier); +#undef DeclareKindCase + default: + assert(false && "Unhandled type"); + break; + } +} + +size_t Type::HashValue() const { + std::u32string h; + std::vector words; + GetHashWords(&words); + for (auto w : words) { + h.push_back(w); + } + + return std::hash()(h); +} + +bool Integer::IsSame(const Type* that) const { const Integer* it = that->AsInteger(); return it && width_ == it->width_ && signed_ == it->signed_ && HasSameDecorations(that); @@ -89,7 +237,12 @@ std::string Integer::str() const { return oss.str(); } -bool Float::IsSame(Type* that) const { +void Integer::GetExtraHashWords(std::vector* words) const { + words->push_back(width_); + words->push_back(signed_); +} + +bool Float::IsSame(const Type* that) const { const Float* ft = that->AsFloat(); return ft && width_ == ft->width_ && HasSameDecorations(that); } @@ -100,12 +253,16 @@ std::string Float::str() const { return oss.str(); } +void Float::GetExtraHashWords(std::vector* words) const { + words->push_back(width_); +} + Vector::Vector(Type* type, uint32_t count) - : element_type_(type), count_(count) { + : Type(kVector), element_type_(type), count_(count) { assert(type->AsBool() || type->AsInteger() || type->AsFloat()); } -bool Vector::IsSame(Type* that) const { +bool Vector::IsSame(const Type* that) const { const Vector* vt = that->AsVector(); if (!vt) return false; return count_ == vt->count_ && element_type_->IsSame(vt->element_type_) && @@ -118,12 +275,17 @@ std::string Vector::str() const { return oss.str(); } +void Vector::GetExtraHashWords(std::vector* words) const { + element_type_->GetHashWords(words); + words->push_back(count_); +} + Matrix::Matrix(Type* type, uint32_t count) - : element_type_(type), count_(count) { + : Type(kMatrix), element_type_(type), count_(count) { assert(type->AsVector()); } -bool Matrix::IsSame(Type* that) const { +bool Matrix::IsSame(const Type* that) const { const Matrix* mt = that->AsMatrix(); if (!mt) return false; return count_ == mt->count_ && element_type_->IsSame(mt->element_type_) && @@ -136,21 +298,26 @@ std::string Matrix::str() const { return oss.str(); } -Image::Image(Type* sampled_type, SpvDim dim, uint32_t depth, uint32_t arrayed, - uint32_t ms, uint32_t sampled, SpvImageFormat format, - SpvAccessQualifier access_qualifier) - : sampled_type_(sampled_type), - dim_(dim), - depth_(depth), - arrayed_(arrayed), - ms_(ms), - sampled_(sampled), - format_(format), - access_qualifier_(access_qualifier) { +void Matrix::GetExtraHashWords(std::vector* words) const { + element_type_->GetHashWords(words); + words->push_back(count_); +} + +Image::Image(Type* type, SpvDim dimen, uint32_t d, bool array, bool multisample, + uint32_t sampling, SpvImageFormat f, SpvAccessQualifier qualifier) + : Type(kImage), + sampled_type_(type), + dim_(dimen), + depth_(d), + arrayed_(array), + ms_(multisample), + sampled_(sampling), + format_(f), + access_qualifier_(qualifier) { // TODO(antiagainst): check sampled_type } -bool Image::IsSame(Type* that) const { +bool Image::IsSame(const Type* that) const { const Image* it = that->AsImage(); if (!it) return false; return dim_ == it->dim_ && depth_ == it->depth_ && arrayed_ == it->arrayed_ && @@ -167,7 +334,18 @@ std::string Image::str() const { return oss.str(); } -bool SampledImage::IsSame(Type* that) const { +void Image::GetExtraHashWords(std::vector* words) const { + sampled_type_->GetHashWords(words); + words->push_back(dim_); + words->push_back(depth_); + words->push_back(arrayed_); + words->push_back(ms_); + words->push_back(sampled_); + words->push_back(format_); + words->push_back(access_qualifier_); +} + +bool SampledImage::IsSame(const Type* that) const { const SampledImage* sit = that->AsSampledImage(); if (!sit) return false; return image_type_->IsSame(sit->image_type_) && HasSameDecorations(that); @@ -179,12 +357,16 @@ std::string SampledImage::str() const { return oss.str(); } +void SampledImage::GetExtraHashWords(std::vector* words) const { + image_type_->GetHashWords(words); +} + Array::Array(Type* type, uint32_t length_id) - : element_type_(type), length_id_(length_id) { + : Type(kArray), element_type_(type), length_id_(length_id) { assert(!type->AsVoid()); } -bool Array::IsSame(Type* that) const { +bool Array::IsSame(const Type* that) const { const Array* at = that->AsArray(); if (!at) return false; return length_id_ == at->length_id_ && @@ -197,11 +379,17 @@ std::string Array::str() const { return oss.str(); } -RuntimeArray::RuntimeArray(Type* type) : element_type_(type) { +void Array::GetExtraHashWords(std::vector* words) const { + element_type_->GetHashWords(words); + words->push_back(length_id_); +} + +RuntimeArray::RuntimeArray(Type* type) + : Type(kRuntimeArray), element_type_(type) { assert(!type->AsVoid()); } -bool RuntimeArray::IsSame(Type* that) const { +bool RuntimeArray::IsSame(const Type* that) const { const RuntimeArray* rat = that->AsRuntimeArray(); if (!rat) return false; return element_type_->IsSame(rat->element_type_) && HasSameDecorations(that); @@ -213,8 +401,13 @@ std::string RuntimeArray::str() const { return oss.str(); } -Struct::Struct(const std::vector& types) : element_types_(types) { - for (auto* t : types) { +void RuntimeArray::GetExtraHashWords(std::vector* words) const { + element_type_->GetHashWords(words); +} + +Struct::Struct(const std::vector& types) + : Type(kStruct), element_types_(types) { + for (const auto* t : types) { (void)t; assert(!t->AsVoid()); } @@ -230,7 +423,7 @@ void Struct::AddMemberDecoration(uint32_t index, element_decorations_[index].push_back(std::move(decoration)); } -bool Struct::IsSame(Type* that) const { +bool Struct::IsSame(const Type* that) const { const Struct* st = that->AsStruct(); if (!st) return false; if (element_types_.size() != st->element_types_.size()) return false; @@ -261,7 +454,21 @@ std::string Struct::str() const { return oss.str(); } -bool Opaque::IsSame(Type* that) const { +void Struct::GetExtraHashWords(std::vector* words) const { + for (auto* t : element_types_) { + t->GetHashWords(words); + } + for (const auto& pair : element_decorations_) { + words->push_back(pair.first); + for (const auto& d : pair.second) { + for (auto w : d) { + words->push_back(w); + } + } + } +} + +bool Opaque::IsSame(const Type* that) const { const Opaque* ot = that->AsOpaque(); if (!ot) return false; return name_ == ot->name_ && HasSameDecorations(that); @@ -273,12 +480,16 @@ std::string Opaque::str() const { return oss.str(); } -Pointer::Pointer(Type* type, SpvStorageClass storage_class) - : pointee_type_(type), storage_class_(storage_class) { - assert(!type->AsVoid()); +void Opaque::GetExtraHashWords(std::vector* words) const { + for (auto c : name_) { + words->push_back(static_cast(c)); + } } -bool Pointer::IsSame(Type* that) const { +Pointer::Pointer(const Type* type, SpvStorageClass sc) + : Type(kPointer), pointee_type_(type), storage_class_(sc) {} + +bool Pointer::IsSame(const Type* that) const { const Pointer* pt = that->AsPointer(); if (!pt) return false; if (storage_class_ != pt->storage_class_) return false; @@ -288,15 +499,20 @@ bool Pointer::IsSame(Type* that) const { std::string Pointer::str() const { return pointee_type_->str() + "*"; } -Function::Function(Type* return_type, const std::vector& param_types) - : return_type_(return_type), param_types_(param_types) { - for (auto* t : param_types) { +void Pointer::GetExtraHashWords(std::vector* words) const { + pointee_type_->GetHashWords(words); + words->push_back(storage_class_); +} + +Function::Function(Type* ret_type, const std::vector& params) + : Type(kFunction), return_type_(ret_type), param_types_(params) { + for (auto* t : params) { (void)t; assert(!t->AsVoid()); } } -bool Function::IsSame(Type* that) const { +bool Function::IsSame(const Type* that) const { const Function* ft = that->AsFunction(); if (!ft) return false; if (!return_type_->IsSame(ft->return_type_)) return false; @@ -319,7 +535,14 @@ std::string Function::str() const { return oss.str(); } -bool Pipe::IsSame(Type* that) const { +void Function::GetExtraHashWords(std::vector* words) const { + return_type_->GetHashWords(words); + for (const auto* t : param_types_) { + t->GetHashWords(words); + } +} + +bool Pipe::IsSame(const Type* that) const { const Pipe* pt = that->AsPipe(); if (!pt) return false; return access_qualifier_ == pt->access_qualifier_ && HasSameDecorations(that); @@ -331,7 +554,11 @@ std::string Pipe::str() const { return oss.str(); } -bool ForwardPointer::IsSame(Type* that) const { +void Pipe::GetExtraHashWords(std::vector* words) const { + words->push_back(access_qualifier_); +} + +bool ForwardPointer::IsSame(const Type* that) const { const ForwardPointer* fpt = that->AsForwardPointer(); if (!fpt) return false; return target_id_ == fpt->target_id_ && @@ -350,6 +577,12 @@ std::string ForwardPointer::str() const { return oss.str(); } +void ForwardPointer::GetExtraHashWords(std::vector* words) const { + words->push_back(target_id_); + words->push_back(storage_class_); + if (pointer_) pointer_->GetHashWords(words); +} + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.h index b6b62c536fb6e725bc1e79c0028fb1be92012a2a..ee81b769b90b853d0e41a008cffe19da754dde0f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/types.h @@ -17,12 +17,14 @@ #ifndef LIBSPIRV_OPT_TYPES_H_ #define LIBSPIRV_OPT_TYPES_H_ +#include +#include #include #include #include +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" namespace spvtools { namespace opt { @@ -56,6 +58,37 @@ class NamedBarrier; // which is used as a way to probe the actual . class Type { public: + // Available subtypes. + // + // When adding a new derived class of Type, please add an entry to the enum. + enum Kind { + kVoid, + kBool, + kInteger, + kFloat, + kVector, + kMatrix, + kImage, + kSampler, + kSampledImage, + kArray, + kRuntimeArray, + kStruct, + kOpaque, + kPointer, + kFunction, + kEvent, + kDeviceEvent, + kReserveId, + kQueue, + kPipe, + kForwardPointer, + kPipeStorage, + kNamedBarrier, + }; + + Type(Kind k) : kind_(k) {} + virtual ~Type() {} // Attaches a decoration directly on this type. @@ -68,15 +101,33 @@ class Type { bool HasSameDecorations(const Type* that) const; // Returns true if this type is exactly the same as |that| type, including // decorations. - virtual bool IsSame(Type* that) const = 0; + virtual bool IsSame(const Type* that) const = 0; // Returns a human-readable string to represent this type. virtual std::string str() const = 0; + Kind kind() const { return kind_; } + const std::vector>& decorations() const { + return decorations_; + } + // Returns true if there is no decoration on this type. For struct types, // returns true only when there is no decoration for both the struct type // and the struct members. virtual bool decoration_empty() const { return decorations_.empty(); } + // Creates a clone of |this|. + std::unique_ptr Clone() const; + + // Returns a clone of |this| minus any decorations. + std::unique_ptr RemoveDecorations() const; + + // Returns true if this type must be unique. + // + // If variable pointers are allowed, then pointers are not required to be + // unique. + // TODO(alanbaker): Update this if variable pointers become a core feature. + bool IsUniqueType(bool allowVariablePointers = false) const; + // A bunch of methods for casting this type to a given type. Returns this if the // cast can be done, nullptr otherwise. #define DeclareCastMethod(target) \ @@ -107,19 +158,39 @@ class Type { DeclareCastMethod(NamedBarrier); #undef DeclareCastMethod + bool operator==(const Type& other) const; + + // Returns the hash value of this type. + size_t HashValue() const; + + // Adds the necessary words to compute a hash value of this type to |words|. + void GetHashWords(std::vector* words) const; + + // Adds necessary extra words for a subtype to calculate a hash value into + // |words|. + virtual void GetExtraHashWords(std::vector* words) const = 0; + protected: // Decorations attached to this type. Each decoration is encoded as a vector // of uint32_t numbers. The first uint32_t number is the decoration value, // and the rest are the parameters to the decoration (if exists). std::vector> decorations_; + + private: + // Removes decorations on this type. For struct types, also removes element + // decorations. + virtual void ClearDecorations() { decorations_.clear(); } + + Kind kind_; }; class Integer : public Type { public: - Integer(uint32_t w, bool is_signed) : width_(w), signed_(is_signed) {} + Integer(uint32_t w, bool is_signed) + : Type(kInteger), width_(w), signed_(is_signed) {} Integer(const Integer&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Integer* AsInteger() override { return this; } @@ -127,6 +198,8 @@ class Integer : public Type { uint32_t width() const { return width_; } bool IsSigned() const { return signed_; } + void GetExtraHashWords(std::vector* words) const override; + private: uint32_t width_; // bit width bool signed_; // true if this integer is signed @@ -134,16 +207,18 @@ class Integer : public Type { class Float : public Type { public: - Float(uint32_t w) : width_(w) {} + Float(uint32_t w) : Type(kFloat), width_(w) {} Float(const Float&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Float* AsFloat() override { return this; } const Float* AsFloat() const override { return this; } uint32_t width() const { return width_; } + void GetExtraHashWords(std::vector* words) const override; + private: uint32_t width_; // bit width }; @@ -153,7 +228,7 @@ class Vector : public Type { Vector(Type* element_type, uint32_t count); Vector(const Vector&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const Type* element_type() const { return element_type_; } uint32_t element_count() const { return count_; } @@ -161,6 +236,8 @@ class Vector : public Type { Vector* AsVector() override { return this; } const Vector* AsVector() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: Type* element_type_; uint32_t count_; @@ -171,7 +248,7 @@ class Matrix : public Type { Matrix(Type* element_type, uint32_t count); Matrix(const Matrix&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const Type* element_type() const { return element_type_; } uint32_t element_count() const { return count_; } @@ -179,6 +256,8 @@ class Matrix : public Type { Matrix* AsMatrix() override { return this; } const Matrix* AsMatrix() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: Type* element_type_; uint32_t count_; @@ -186,23 +265,34 @@ class Matrix : public Type { class Image : public Type { public: - Image(Type* sampled_type, SpvDim dim, uint32_t depth, uint32_t arrayed, - uint32_t ms, uint32_t sampled, SpvImageFormat format, - SpvAccessQualifier access_qualifier = SpvAccessQualifierReadOnly); + Image(Type* type, SpvDim dimen, uint32_t d, bool array, bool multisample, + uint32_t sampling, SpvImageFormat f, + SpvAccessQualifier qualifier = SpvAccessQualifierReadOnly); Image(const Image&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Image* AsImage() override { return this; } const Image* AsImage() const override { return this; } + const Type* sampled_type() const { return sampled_type_; } + SpvDim dim() const { return dim_; } + uint32_t depth() const { return depth_; } + bool is_arrayed() const { return arrayed_; } + bool is_multisampled() const { return ms_; } + uint32_t sampled() const { return sampled_; } + SpvImageFormat format() const { return format_; } + SpvAccessQualifier access_qualifier() const { return access_qualifier_; } + + void GetExtraHashWords(std::vector* words) const override; + private: Type* sampled_type_; SpvDim dim_; uint32_t depth_; - uint32_t arrayed_; - uint32_t ms_; + bool arrayed_; + bool ms_; uint32_t sampled_; SpvImageFormat format_; SpvAccessQualifier access_qualifier_; @@ -210,15 +300,19 @@ class Image : public Type { class SampledImage : public Type { public: - SampledImage(Type* image_type) : image_type_(image_type) {} + SampledImage(Type* image) : Type(kSampledImage), image_type_(image) {} SampledImage(const SampledImage&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; SampledImage* AsSampledImage() override { return this; } const SampledImage* AsSampledImage() const override { return this; } + const Type* image_type() const { return image_type_; } + + void GetExtraHashWords(std::vector* words) const override; + private: Type* image_type_; }; @@ -228,7 +322,7 @@ class Array : public Type { Array(Type* element_type, uint32_t length_id); Array(const Array&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const Type* element_type() const { return element_type_; } uint32_t LengthId() const { return length_id_; } @@ -236,6 +330,8 @@ class Array : public Type { Array* AsArray() override { return this; } const Array* AsArray() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: Type* element_type_; uint32_t length_id_; @@ -246,13 +342,15 @@ class RuntimeArray : public Type { RuntimeArray(Type* element_type); RuntimeArray(const RuntimeArray&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const Type* element_type() const { return element_type_; } RuntimeArray* AsRuntimeArray() override { return this; } const RuntimeArray* AsRuntimeArray() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: Type* element_type_; }; @@ -266,68 +364,93 @@ class Struct : public Type { // decoration enum, and the remaining words, if any, are its operands. void AddMemberDecoration(uint32_t index, std::vector&& decoration); - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const std::vector& element_types() const { return element_types_; } bool decoration_empty() const override { return decorations_.empty() && element_decorations_.empty(); } + const std::map>>& + element_decorations() const { + return element_decorations_; + } + Struct* AsStruct() override { return this; } const Struct* AsStruct() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: + void ClearDecorations() override { + decorations_.clear(); + element_decorations_.clear(); + } + std::vector element_types_; // We can attach decorations to struct members and that should not affect the // underlying element type. So we need an extra data structure here to keep - // track of element type decorations. - std::unordered_map>> - element_decorations_; + // track of element type decorations. They must be stored in an ordered map + // because |GetExtraHashWords| will traverse the structure. It must have a + // fixed order in order to hash to the same value every time. + std::map>> element_decorations_; }; class Opaque : public Type { public: - Opaque(std::string name) : name_(std::move(name)) {} + Opaque(std::string n) : Type(kOpaque), name_(std::move(n)) {} Opaque(const Opaque&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Opaque* AsOpaque() override { return this; } const Opaque* AsOpaque() const override { return this; } + const std::string& name() const { return name_; } + + void GetExtraHashWords(std::vector* words) const override; + private: std::string name_; }; class Pointer : public Type { public: - Pointer(Type* pointee_type, SpvStorageClass storage_class); + Pointer(const Type* pointee, SpvStorageClass sc); Pointer(const Pointer&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; const Type* pointee_type() const { return pointee_type_; } + SpvStorageClass storage_class() const { return storage_class_; } Pointer* AsPointer() override { return this; } const Pointer* AsPointer() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: - Type* pointee_type_; + const Type* pointee_type_; SpvStorageClass storage_class_; }; class Function : public Type { public: - Function(Type* return_type, const std::vector& param_types); + Function(Type* ret_type, const std::vector& params); Function(const Function&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Function* AsFunction() override { return this; } const Function* AsFunction() const override { return this; } + const Type* return_type() const { return return_type_; } + const std::vector& param_types() const { return param_types_; } + + void GetExtraHashWords(std::vector* words) const override; + private: Type* return_type_; std::vector param_types_; @@ -335,55 +458,68 @@ class Function : public Type { class Pipe : public Type { public: - Pipe(SpvAccessQualifier access_qualifier) - : access_qualifier_(access_qualifier) {} + Pipe(SpvAccessQualifier qualifier) + : Type(kPipe), access_qualifier_(qualifier) {} Pipe(const Pipe&) = default; - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; Pipe* AsPipe() override { return this; } const Pipe* AsPipe() const override { return this; } + SpvAccessQualifier access_qualifier() const { return access_qualifier_; } + + void GetExtraHashWords(std::vector* words) const override; + private: SpvAccessQualifier access_qualifier_; }; class ForwardPointer : public Type { public: - ForwardPointer(uint32_t id, SpvStorageClass storage_class) - : target_id_(id), storage_class_(storage_class), pointer_(nullptr) {} + ForwardPointer(uint32_t id, SpvStorageClass sc) + : Type(kForwardPointer), + target_id_(id), + storage_class_(sc), + pointer_(nullptr) {} ForwardPointer(const ForwardPointer&) = default; uint32_t target_id() const { return target_id_; } void SetTargetPointer(Pointer* pointer) { pointer_ = pointer; } + SpvStorageClass storage_class() const { return storage_class_; } + const Pointer* target_pointer() const { return pointer_; } - bool IsSame(Type* that) const override; + bool IsSame(const Type* that) const override; std::string str() const override; ForwardPointer* AsForwardPointer() override { return this; } const ForwardPointer* AsForwardPointer() const override { return this; } + void GetExtraHashWords(std::vector* words) const override; + private: uint32_t target_id_; SpvStorageClass storage_class_; Pointer* pointer_; }; -#define DefineParameterlessType(type, name) \ - class type : public Type { \ - public: \ - type() = default; \ - type(const type&) = default; \ - \ - bool IsSame(Type* that) const override { \ - return that->As##type() && HasSameDecorations(that); \ - } \ - std::string str() const override { return #name; } \ - \ - type* As##type() override { return this; } \ - const type* As##type() const override { return this; } \ - }; +#define DefineParameterlessType(type, name) \ + class type : public Type { \ + public: \ + type() : Type(k##type) {} \ + type(const type&) = default; \ + \ + bool IsSame(const Type* that) const override { \ + return that->As##type() && HasSameDecorations(that); \ + } \ + std::string str() const override { return #name; } \ + \ + type* As##type() override { return this; } \ + const type* As##type() const override { return this; } \ + \ + void GetExtraHashWords(std::vector*) const override {} \ + } DefineParameterlessType(Void, void); DefineParameterlessType(Bool, bool); DefineParameterlessType(Sampler, sampler); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.cpp index 1e4da3d5e5294506289db94b92988599dc9d5a02..266757339c10cdc988824b26820b9b8130fa9584 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.cpp @@ -18,6 +18,7 @@ #include #include "def_use_manager.h" +#include "ir_context.h" #include "make_unique.h" namespace spvtools { @@ -102,15 +103,17 @@ class ResultIdTrie { }; } // anonymous namespace -Pass::Status UnifyConstantPass::Process(ir::Module* module) { +Pass::Status UnifyConstantPass::Process(ir::IRContext* c) { + InitializeProcessing(c); bool modified = false; ResultIdTrie defined_constants; - analysis::DefUseManager def_use_mgr(consumer(), module); - for (ir::Instruction& inst : module->types_values()) { + for( ir::Instruction* next_instruction, *inst = &*(context()->types_values_begin()); inst; inst = next_instruction) { + next_instruction = inst->NextNode(); + // Do not handle the instruction when there are decorations upon the result // id. - if (def_use_mgr.GetAnnotations(inst.result_id()).size() != 0) { + if (get_def_use_mgr()->GetAnnotations(inst->result_id()).size() != 0) { continue; } @@ -132,7 +135,7 @@ Pass::Status UnifyConstantPass::Process(ir::Module* module) { // used in key arrays will be the ids of the unified constants, when // processing is up to a descendant. This makes comparing the key array // always valid for judging duplication. - switch (inst.opcode()) { + switch (inst->opcode()) { case SpvOp::SpvOpConstantTrue: case SpvOp::SpvOpConstantFalse: case SpvOp::SpvOpConstant: @@ -150,12 +153,12 @@ Pass::Status UnifyConstantPass::Process(ir::Module* module) { // same so are unifiable. case SpvOp::SpvOpSpecConstantOp: case SpvOp::SpvOpSpecConstantComposite: { - uint32_t id = defined_constants.LookupEquivalentResultFor(inst); - if (id != inst.result_id()) { + uint32_t id = defined_constants.LookupEquivalentResultFor(*inst); + if (id != inst->result_id()) { // The constant is a duplicated one, use the cached constant to // replace the uses of this duplicated one, then turn it to nop. - def_use_mgr.ReplaceAllUsesWith(inst.result_id(), id); - def_use_mgr.KillInst(&inst); + context()->ReplaceAllUsesWith(inst->result_id(), id); + context()->KillInst(inst); modified = true; } break; @@ -167,5 +170,5 @@ Pass::Status UnifyConstantPass::Process(ir::Module* module) { return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } -} // opt +} // namespace opt } // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.h index 4fd8c647928d1f7b9b5a3361fd84cd381140e4f6..64838176539c03425beb903efc16fb1f58ccec3b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/unify_const_pass.h @@ -15,6 +15,7 @@ #ifndef LIBSPIRV_OPT_UNIFY_CONSTANT_PASS_H_ #define LIBSPIRV_OPT_UNIFY_CONSTANT_PASS_H_ +#include "ir_context.h" #include "module.h" #include "pass.h" @@ -25,7 +26,7 @@ namespace opt { class UnifyConstantPass : public Pass { public: const char* name() const override { return "unify-const"; } - Status Process(ir::Module*) override; + Status Process(ir::IRContext*) override; }; } // namespace opt diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f5b7ce47d44627f5bd6f8c7c26373827e322dc8 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.cpp @@ -0,0 +1,224 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "value_number_table.h" + +#include + +#include "cfg.h" + +namespace spvtools { +namespace opt { + +uint32_t ValueNumberTable::GetValueNumber( + spvtools::ir::Instruction* inst) const { + assert(inst->result_id() != 0 && + "inst must have a result id to get a value number."); + + // Check if this instruction already has a value. + auto result_id_to_val = id_to_value_.find(inst->result_id()); + if (result_id_to_val != id_to_value_.end()) { + return result_id_to_val->second; + } + return 0; +} + +uint32_t ValueNumberTable::AssignValueNumber(ir::Instruction* inst) { + // If it already has a value return that. + uint32_t value = GetValueNumber(inst); + if (value != 0) { + return value; + } + + // If the instruction has other side effects, then it must + // have its own value number. + // OpSampledImage and OpImage must remain in the same basic block in which + // they are used, because of this we will assign each one it own value number. + if (!context()->IsCombinatorInstruction(inst)) { + value = TakeNextValueNumber(); + id_to_value_[inst->result_id()] = value; + return value; + } + + switch (inst->opcode()) { + case SpvOpSampledImage: + case SpvOpImage: + case SpvOpVariable: + value = TakeNextValueNumber(); + id_to_value_[inst->result_id()] = value; + return value; + default: + break; + } + + // If it is a load from memory that can be modified, we have to assume the + // memory has been modified, so we give it a new value number. + // + // Note that this test will also handle volatile loads because they are not + // read only. However, if this is ever relaxed because we analyze stores, we + // will have to add a new case for volatile loads. + if (inst->IsLoad() && !inst->IsReadOnlyLoad()) { + value = TakeNextValueNumber(); + id_to_value_[inst->result_id()] = value; + return value; + } + + // When we copy an object, the value numbers should be the same. + if (inst->opcode() == SpvOpCopyObject) { + value = GetValueNumber(inst->GetSingleWordInOperand(0)); + if (value != 0) { + id_to_value_[inst->result_id()] = value; + return value; + } + } + + // Phi nodes are a type of copy. If all of the inputs have the same value + // number, then we can assign the result of the phi the same value number. + if (inst->opcode() == SpvOpPhi) { + value = GetValueNumber(inst->GetSingleWordInOperand(0)); + if (value != 0) { + for (uint32_t op = 2; op < inst->NumInOperands(); op += 2) { + if (value != GetValueNumber(inst->GetSingleWordInOperand(op))) { + value = 0; + break; + } + } + if (value != 0) { + id_to_value_[inst->result_id()] = value; + return value; + } + } + } + + // Replace all of the operands by their value number. The sign bit will be + // set to distinguish between an id and a value number. + ir::Instruction value_ins(context(), inst->opcode(), inst->type_id(), + inst->result_id(), {}); + for (uint32_t o = 0; o < inst->NumInOperands(); ++o) { + const ir::Operand& op = inst->GetInOperand(o); + if (spvIsIdType(op.type)) { + uint32_t id_value = op.words[0]; + auto use_id_to_val = id_to_value_.find(id_value); + if (use_id_to_val != id_to_value_.end()) { + id_value = (1 << 31) | use_id_to_val->second; + } + value_ins.AddOperand(ir::Operand(op.type, {id_value})); + } else { + value_ins.AddOperand(ir::Operand(op.type, op.words)); + } + } + + // TODO: Implement a normal form for opcodes that commute like integer + // addition. This will let us know that a+b is the same value as b+a. + + // Otherwise, we check if this value has been computed before. + auto value_iterator = instruction_to_value_.find(value_ins); + if (value_iterator != instruction_to_value_.end()) { + value = id_to_value_[value_iterator->first.result_id()]; + id_to_value_[inst->result_id()] = value; + return value; + } + + // If not, assign it a new value number. + value = TakeNextValueNumber(); + id_to_value_[inst->result_id()] = value; + instruction_to_value_[value_ins] = value; + return value; +} + +void ValueNumberTable::BuildDominatorTreeValueNumberTable() { + // First value number the headers. + for (auto& inst : context()->annotations()) { + if (inst.result_id() != 0) { + AssignValueNumber(&inst); + } + } + + for (auto& inst : context()->capabilities()) { + if (inst.result_id() != 0) { + AssignValueNumber(&inst); + } + } + + for (auto& inst : context()->types_values()) { + if (inst.result_id() != 0) { + AssignValueNumber(&inst); + } + } + + for (auto& inst : context()->module()->ext_inst_imports()) { + if (inst.result_id() != 0) { + AssignValueNumber(&inst); + } + } + + for (ir::Function& func : *context()->module()) { + // For best results we want to traverse the code in reverse post order. + // This happens naturally because of the forward referencing rules. + for (ir::BasicBlock& block : func) { + for (ir::Instruction& inst : block) { + if (inst.result_id() != 0) { + AssignValueNumber(&inst); + } + } + } + } +} + +bool ComputeSameValue::operator()(const ir::Instruction& lhs, + const ir::Instruction& rhs) const { + if (lhs.result_id() == 0 || rhs.result_id() == 0) { + return false; + } + + if (lhs.opcode() != rhs.opcode()) { + return false; + } + + if (lhs.type_id() != rhs.type_id()) { + return false; + } + + if (lhs.NumInOperands() != rhs.NumInOperands()) { + return false; + } + + for (uint32_t i = 0; i < lhs.NumInOperands(); ++i) { + if (lhs.GetInOperand(i) != rhs.GetInOperand(i)) { + return false; + } + } + + return lhs.context()->get_decoration_mgr()->HaveTheSameDecorations( + lhs.result_id(), rhs.result_id()); +} + +std::size_t ValueTableHash::operator()( + const spvtools::ir::Instruction& inst) const { + // We hash the opcode and in-operands, not the result, because we want + // instructions that are the same except for the result to hash to the + // same value. + std::u32string h; + h.push_back(inst.opcode()); + h.push_back(inst.type_id()); + for (uint32_t i = 0; i < inst.NumInOperands(); ++i) { + const auto& opnd = inst.GetInOperand(i); + for (uint32_t word : opnd.words) { + h.push_back(word); + } + } + return std::hash()(h); +} +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.h new file mode 100644 index 0000000000000000000000000000000000000000..8ad20df3460a4f024318b945909b56df2bf3a19e --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/value_number_table.h @@ -0,0 +1,94 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_VALUE_NUMBER_TABLE_H_ +#define LIBSPIRV_OPT_VALUE_NUMBER_TABLE_H_ + +#include +#include +#include "instruction.h" +#include "ir_context.h" + +namespace spvtools { +namespace opt { + +// Returns true if the two instructions compute the same value. Used by the +// value number table to compare two instructions. +class ComputeSameValue { + public: + bool operator()(const ir::Instruction& lhs, const ir::Instruction& rhs) const; +}; + +// The hash function used in the value number table. +class ValueTableHash { + public: + std::size_t operator()(const spvtools::ir::Instruction& inst) const; +}; + +// This class implements the value number analysis. It is using a hash-based +// approach to value numbering. It is essentially doing dominator-tree value +// numbering described in +// +// Preston Briggs, Keith D. Cooper, and L. Taylor Simpson. 1997. Value +// numbering. Softw. Pract. Exper. 27, 6 (June 1997), 701-724. +// https://www.cs.rice.edu/~keith/Promo/CRPC-TR94517.pdf.gz +// +// The main difference is that because we do not perform redundancy elimination +// as we build the value number table, we do not have to deal with cleaning up +// the scope. +class ValueNumberTable { + public: + ValueNumberTable(ir::IRContext* ctx) : context_(ctx), next_value_number_(1) { + BuildDominatorTreeValueNumberTable(); + } + + // Returns the value number of the value computed by |inst|. |inst| must have + // a result id that will hold the computed value. If no value number has been + // assigned to the result id, then the return value is 0. + uint32_t GetValueNumber(spvtools::ir::Instruction* inst) const; + + // Returns the value number of the value contain in |id|. Returns 0 if it + // has not been assigned a value number. + inline uint32_t GetValueNumber(uint32_t id) const; + + ir::IRContext* context() const { return context_; } + + private: + // Assigns a value number to every result id in the module. + void BuildDominatorTreeValueNumberTable(); + + // Returns the new value number. + uint32_t TakeNextValueNumber() { return next_value_number_++; } + + // Assigns a new value number to the result of |inst| if it does not already + // have one. Return the value number for |inst|. |inst| must have a result + // id. + uint32_t AssignValueNumber(ir::Instruction* inst); + + std::unordered_map + instruction_to_value_; + std::unordered_map id_to_value_; + ir::IRContext* context_; + uint32_t next_value_number_; +}; + +uint32_t ValueNumberTable::GetValueNumber(uint32_t id) const { + return GetValueNumber(context()->get_def_use_mgr()->GetDef(id)); +} + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_VALUE_NUMBER_TABLE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae05848eab5cf14bcad54dee56464a1e62863501 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.cpp @@ -0,0 +1,68 @@ +// Copyright (c) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "workaround1209.h" + +#include +#include + +namespace spvtools { +namespace opt { + +Pass::Status Workaround1209::Process(ir::IRContext* c) { + InitializeProcessing(c); + bool modified = false; + modified = RemoveOpUnreachableInLoops(); + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +bool Workaround1209::RemoveOpUnreachableInLoops() { + bool modified = false; + for (auto& func : *get_module()) { + std::list structured_order; + cfg()->ComputeStructuredOrder(&func, &*func.begin(), &structured_order); + + // Keep track of the loop merges. The top of the stack will always be the + // loop merge for the loop that immediately contains the basic block being + // processed. + std::stack loop_merges; + for (ir::BasicBlock* bb : structured_order) { + if (!loop_merges.empty() && bb->id() == loop_merges.top()) { + loop_merges.pop(); + } + + if (bb->tail()->opcode() == SpvOpUnreachable) { + if (!loop_merges.empty()) { + // We found an OpUnreachable inside a loop. + // Replace it with an unconditional branch to the loop merge. + context()->KillInst(&*bb->tail()); + std::unique_ptr new_branch( + new ir::Instruction(context(), SpvOpBranch, 0, 0, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, + {loop_merges.top()}}})); + context()->AnalyzeDefUse(&*new_branch); + bb->AddInstruction(std::move(new_branch)); + modified = true; + } + } else { + if (bb->GetLoopMergeInst()) { + loop_merges.push(bb->MergeBlockIdIfAny()); + } + } + } + } + return modified; +} +} // namespace opt +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.h b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.h new file mode 100644 index 0000000000000000000000000000000000000000..2265ac3f943bcf4ee65a64d0ac3f08de08b8f069 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/opt/workaround1209.h @@ -0,0 +1,41 @@ +// Copyright (c) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_WORKAROUND1209_H_ +#define LIBSPIRV_OPT_WORKAROUND1209_H_ + +#include "pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class Workaround1209 : public Pass { + public: + const char* name() const override { return "workaround-1209"; } + Status Process(ir::IRContext*) override; + + private: + // There is at least one driver where an OpUnreachable found in a loop is not + // handled correctly. Workaround that by changing the OpUnreachable into a + // branch to the loop merge. + // + // Returns true if the code changed. + bool RemoveOpUnreachableInLoops(); +}; + +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_WORKAROUND1209_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/print.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/print.cpp index fc07b94557c1da41edb09c515ccca1b66e9d13e1..70d8f5965e7a75ccc7c0155e30daa66e7840d6df 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/print.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/print.cpp @@ -14,7 +14,8 @@ #include "print.h" -#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || defined(SPIRV_FREEBSD) +#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \ + defined(SPIRV_FREEBSD) namespace libspirv { clr::reset::operator const char*() { return "\x1b[0m"; } @@ -35,8 +36,7 @@ clr::blue::operator const char*() { return "\x1b[34m"; } namespace libspirv { -static void SetConsoleForegroundColorPrimary(HANDLE hConsole, WORD color) -{ +static void SetConsoleForegroundColorPrimary(HANDLE hConsole, WORD color) { // Get screen buffer information from console handle CONSOLE_SCREEN_BUFFER_INFO bufInfo; GetConsoleScreenBufferInfo(hConsole, &bufInfo); @@ -48,43 +48,61 @@ static void SetConsoleForegroundColorPrimary(HANDLE hConsole, WORD color) SetConsoleTextAttribute(hConsole, color); } -static void SetConsoleForegroundColor(WORD color) -{ +static void SetConsoleForegroundColor(WORD color) { SetConsoleForegroundColorPrimary(GetStdHandle(STD_OUTPUT_HANDLE), color); SetConsoleForegroundColorPrimary(GetStdHandle(STD_ERROR_HANDLE), color); } clr::reset::operator const char*() { - SetConsoleForegroundColor(0xf); - return ""; + if (isPrint) { + SetConsoleForegroundColor(0xf); + return ""; + } + return "\x1b[0m"; } clr::grey::operator const char*() { - SetConsoleForegroundColor(FOREGROUND_INTENSITY); - return ""; + if (isPrint) { + SetConsoleForegroundColor(FOREGROUND_INTENSITY); + return ""; + } + return "\x1b[1;30m"; } clr::red::operator const char*() { - SetConsoleForegroundColor(FOREGROUND_RED); - return ""; + if (isPrint) { + SetConsoleForegroundColor(FOREGROUND_RED); + return ""; + } + return "\x1b[31m"; } clr::green::operator const char*() { - SetConsoleForegroundColor(FOREGROUND_GREEN); - return ""; + if (isPrint) { + SetConsoleForegroundColor(FOREGROUND_GREEN); + return ""; + } + return "\x1b[32m"; } clr::yellow::operator const char*() { - SetConsoleForegroundColor(FOREGROUND_RED | FOREGROUND_GREEN); - return ""; + if (isPrint) { + SetConsoleForegroundColor(FOREGROUND_RED | FOREGROUND_GREEN); + return ""; + } + return "\x1b[33m"; } clr::blue::operator const char*() { // Blue all by itself is hard to see against a black background (the // default on command shell), or a medium blue background (the default // on PowerShell). So increase its intensity. - SetConsoleForegroundColor(FOREGROUND_BLUE | FOREGROUND_INTENSITY); - return ""; + + if (isPrint) { + SetConsoleForegroundColor(FOREGROUND_BLUE | FOREGROUND_INTENSITY); + return ""; + } + return "\x1b[94m"; } } // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/print.h b/sources/third_party/shaderc/third_party/spirv-tools/source/print.h index 061935a11bbc21148ab77f325f653a126a183427..76d7c40fc4322f6ae71a21365c6b4816ecc95f02 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/print.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/print.h @@ -41,26 +41,32 @@ namespace clr { // Resets console color. struct reset { operator const char*(); + bool isPrint; }; // Sets console color to grey. struct grey { operator const char*(); + bool isPrint; }; // Sets console color to red. struct red { operator const char*(); + bool isPrint; }; // Sets console color to green. struct green { operator const char*(); + bool isPrint; }; // Sets console color to yellow. struct yellow { operator const char*(); + bool isPrint; }; // Sets console color to blue. struct blue { operator const char*(); + bool isPrint; }; } // namespace clr diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/software_version.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/software_version.cpp index 04cf3dfba70dff92eec78acebafa729adae3f3c4..b258ebe90d4c8036a3bd5a2855a618cc09b89e4f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/software_version.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/software_version.cpp @@ -22,10 +22,6 @@ const char* kBuildVersions[] = { } // anonymous namespace -const char* spvSoftwareVersionString() { - return kBuildVersions[0]; -} +const char* spvSoftwareVersionString(void) { return kBuildVersions[0]; } -const char* spvSoftwareVersionDetailsString() { - return kBuildVersions[1]; -} +const char* spvSoftwareVersionDetailsString(void) { return kBuildVersions[1]; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_constant.h b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_constant.h index c70ade10390d1b2f286718dbfad0e6b2c2510304..8eb6572bc2602da3f74d5a1475aca163fa73a12a 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_constant.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_constant.h @@ -15,8 +15,8 @@ #ifndef LIBSPIRV_SPIRV_CONSTANT_H_ #define LIBSPIRV_SPIRV_CONSTANT_H_ +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" // Version number macros. @@ -29,9 +29,6 @@ // Returns the minor version extracted from a version header word. #define SPV_SPIRV_VERSION_MINOR_PART(WORD) ((uint32_t(WORD) >> 8) & 0xff) -// Returns the version number for the given SPIR-V target environment. -uint32_t spvVersionForTargetEnv(spv_target_env env); - // Header indices #define SPV_INDEX_MAGIC_NUMBER 0u diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_definition.h b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_definition.h index b82bda16d256cbb505650d130b3e1372c47bd2c5..9e22108fa34483153920fcfe1ec006fe737393c4 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_definition.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_definition.h @@ -17,7 +17,7 @@ #include -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" #define spvIsInBitfield(value, bitfield) ((value) == ((value)&bitfield)) diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.cpp index 34cab6d5b2c0ee44c94ebfefc0973a4c52d76119..ff4b3c67a993d52063a93311945df6163838fe75 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.cpp @@ -25,16 +25,16 @@ #include "diagnostic.h" #include "enum_string_mapping.h" #include "extensions.h" -#include "instruction.h" #include "id_descriptor.h" +#include "instruction.h" #include "opcode.h" #include "operand.h" #include "spirv-tools/libspirv.h" #include "spirv_endian.h" #include "spirv_validator_options.h" -#include "validate.h" #include "val/instruction.h" #include "val/validation_state.h" +#include "validate.h" using libspirv::IdDescriptorCollection; using libspirv::Instruction; @@ -54,10 +54,10 @@ class StatsAggregator { } // Collects header statistics and sets correct id_bound. - spv_result_t ProcessHeader( - spv_endianness_t /* endian */, uint32_t /* magic */, - uint32_t version, uint32_t generator, uint32_t id_bound, - uint32_t /* schema */) { + spv_result_t ProcessHeader(spv_endianness_t /* endian */, + uint32_t /* magic */, uint32_t version, + uint32_t generator, uint32_t id_bound, + uint32_t /* schema */) { vstate_->setIdBound(id_bound); ++stats_->version_hist[version]; ++stats_->generator_hist[generator]; @@ -68,9 +68,9 @@ class StatsAggregator { // then procession the instruction to collect stats. spv_result_t ProcessInstruction(const spv_parsed_instruction_t* inst) { const spv_result_t validation_result = - spvtools::ValidateInstructionAndUpdateValidationState(vstate_.get(), inst); - if (validation_result != SPV_SUCCESS) - return validation_result; + spvtools::ValidateInstructionAndUpdateValidationState(vstate_.get(), + inst); + if (validation_result != SPV_SUCCESS) return validation_result; ProcessOpcode(); ProcessCapability(); @@ -106,8 +106,9 @@ class StatsAggregator { id_descriptors_.GetDescriptor(inst.word(operand.offset)); if (descriptor) { ++stats_->id_descriptor_hist[descriptor]; - ++stats_->operand_slot_id_descriptor_hist[ - std::pair(inst.opcode(), index)][descriptor]; + ++stats_ + ->operand_slot_id_descriptor_hist[std::pair( + inst.opcode(), index)][descriptor]; } } ++index; @@ -168,8 +169,8 @@ class StatsAggregator { uint32_t index = 0; for (const auto& operand : inst.operands()) { if (operand.num_words == 1 && !spvIsIdType(operand.type)) { - ++stats_->operand_slot_non_id_words_hist[std::pair( - inst.opcode(), index)][inst.word(operand.offset)]; + ++stats_->operand_slot_non_id_words_hist[std::pair( + inst.opcode(), index)][inst.word(operand.offset)]; } ++index; } @@ -205,13 +206,14 @@ class StatsAggregator { if (inst_it != vstate_->ordered_instructions().rend()) { const SpvOp prev_opcode = inst_it->opcode(); - ++stats_->opcode_and_num_operands_markov_hist[prev_opcode][ - opcode_and_num_operands]; + ++stats_->opcode_and_num_operands_markov_hist[prev_opcode] + [opcode_and_num_operands]; } auto step_it = stats_->opcode_markov_hist.begin(); for (; inst_it != vstate_->ordered_instructions().rend() && - step_it != stats_->opcode_markov_hist.end(); ++inst_it, ++step_it) { + step_it != stats_->opcode_markov_hist.end(); + ++inst_it, ++step_it) { auto& hist = (*step_it)[inst_it->opcode()]; ++hist[opcode]; } @@ -260,9 +262,7 @@ class StatsAggregator { } } - SpirvStats* stats() { - return stats_; - } + SpirvStats* stats() { return stats_; } private: // Returns the current instruction (the one last processed by the validator). @@ -276,18 +276,17 @@ class StatsAggregator { IdDescriptorCollection id_descriptors_; }; -spv_result_t ProcessHeader( - void* user_data, spv_endianness_t endian, uint32_t magic, - uint32_t version, uint32_t generator, uint32_t id_bound, - uint32_t schema) { +spv_result_t ProcessHeader(void* user_data, spv_endianness_t endian, + uint32_t magic, uint32_t version, uint32_t generator, + uint32_t id_bound, uint32_t schema) { StatsAggregator* stats_aggregator = reinterpret_cast(user_data); - return stats_aggregator->ProcessHeader( - endian, magic, version, generator, id_bound, schema); + return stats_aggregator->ProcessHeader(endian, magic, version, generator, + id_bound, schema); } -spv_result_t ProcessInstruction( - void* user_data, const spv_parsed_instruction_t* inst) { +spv_result_t ProcessInstruction(void* user_data, + const spv_parsed_instruction_t* inst) { StatsAggregator* stats_aggregator = reinterpret_cast(user_data); return stats_aggregator->ProcessInstruction(inst); @@ -297,9 +296,9 @@ spv_result_t ProcessInstruction( namespace libspirv { -spv_result_t AggregateStats( - const spv_context_t& context, const uint32_t* words, const size_t num_words, - spv_diagnostic* pDiagnostic, SpirvStats* stats) { +spv_result_t AggregateStats(const spv_context_t& context, const uint32_t* words, + const size_t num_words, spv_diagnostic* pDiagnostic, + SpirvStats* stats) { spv_const_binary_t binary = {words, num_words}; spv_endianness_t endian; @@ -307,14 +306,14 @@ spv_result_t AggregateStats( if (spvBinaryEndianness(&binary, &endian)) { return libspirv::DiagnosticStream(position, context.consumer, SPV_ERROR_INVALID_BINARY) - << "Invalid SPIR-V magic number."; + << "Invalid SPIR-V magic number."; } spv_header_t header; if (spvBinaryHeaderGet(&binary, endian, &header)) { return libspirv::DiagnosticStream(position, context.consumer, SPV_ERROR_INVALID_BINARY) - << "Invalid SPIR-V header."; + << "Invalid SPIR-V header."; } StatsAggregator stats_aggregator(stats, &context); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.h b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.h index 541dd036152c3f385005726079eef9f8d6191368..cc6c239143bf39d9f91f02d91d27177bca7e7a19 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_stats.h @@ -69,15 +69,15 @@ struct SpirvStats { std::unordered_map f64_constant_hist; // Enum histogram, operand type -> operand value -> count. - std::unordered_map> enum_hist; + std::unordered_map> + enum_hist; // Histogram of all non-id single words. // pair -> value -> count. // This is a generalization of enum_hist, also includes literal integers and // masks. - std::map, - std::map> operand_slot_non_id_words_hist; + std::map, std::map> + operand_slot_non_id_words_hist; // Historgam of descriptors generated by IdDescriptorCollection. // Descriptor -> count. @@ -88,10 +88,11 @@ struct SpirvStats { // Historgam of descriptors generated by IdDescriptorCollection for every // operand slot. pair -> descriptor -> count. - std::map, - std::map> operand_slot_id_descriptor_hist; + std::map, std::map> + operand_slot_id_descriptor_hist; - // Histogram of literal strings, sharded by opcodes, opcode -> string -> count. + // Histogram of literal strings, sharded by opcodes, opcode -> string -> + // count. // This is suboptimal if an opcode has multiple literal string operands, // as it wouldn't differentiate between operands. std::unordered_map> @@ -114,14 +115,15 @@ struct SpirvStats { // The size of the outer std::vector also serves as an input parameter, // determining how many steps will be collected. // I.e. do opcode_markov_hist.resize(1) to collect data for one step only. - std::vector>> opcode_markov_hist; + std::vector< + std::unordered_map>> + opcode_markov_hist; }; // Aggregates existing |stats| with new stats extracted from |binary|. -spv_result_t AggregateStats( - const spv_context_t& context, const uint32_t* words, const size_t num_words, - spv_diagnostic* pDiagnostic, SpirvStats* stats); +spv_result_t AggregateStats(const spv_context_t& context, const uint32_t* words, + const size_t num_words, spv_diagnostic* pDiagnostic, + SpirvStats* stats); } // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.cpp index ed47f525e5eea326971a755a20a5513eec77c792..cc99228e297fa51c0022993b760fb0d8795edcd2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.cpp @@ -26,22 +26,38 @@ const char* spvTargetEnvDescription(spv_target_env env) { return "SPIR-V 1.0 (under Vulkan 1.0 semantics)"; case SPV_ENV_UNIVERSAL_1_1: return "SPIR-V 1.1"; + case SPV_ENV_OPENCL_1_2: + return "SPIR-V 1.0 (under OpenCL 1.2 Full Profile semantics)"; + case SPV_ENV_OPENCL_EMBEDDED_1_2: + return "SPIR-V 1.0 (under OpenCL 1.2 Embedded Profile semantics)"; + case SPV_ENV_OPENCL_2_0: + return "SPIR-V 1.0 (under OpenCL 2.0 Full Profile semantics)"; + case SPV_ENV_OPENCL_EMBEDDED_2_0: + return "SPIR-V 1.0 (under OpenCL 2.0 Embedded Profile semantics)"; case SPV_ENV_OPENCL_2_1: - return "SPIR-V 1.0 (under OpenCL 2.1 semantics)"; + return "SPIR-V 1.0 (under OpenCL 2.1 Full Profile semantics)"; + case SPV_ENV_OPENCL_EMBEDDED_2_1: + return "SPIR-V 1.0 (under OpenCL 2.1 Embedded Profile semantics)"; case SPV_ENV_OPENCL_2_2: - return "SPIR-V 1.1 (under OpenCL 2.2 semantics)"; + return "SPIR-V 1.2 (under OpenCL 2.2 Full Profile semantics)"; + case SPV_ENV_OPENCL_EMBEDDED_2_2: + return "SPIR-V 1.2 (under OpenCL 2.2 Embedded Profile semantics)"; case SPV_ENV_OPENGL_4_0: - return "SPIR-V 1.0 (under OpenCL 4.0 semantics)"; + return "SPIR-V 1.0 (under OpenGL 4.0 semantics)"; case SPV_ENV_OPENGL_4_1: - return "SPIR-V 1.0 (under OpenCL 4.1 semantics)"; + return "SPIR-V 1.0 (under OpenGL 4.1 semantics)"; case SPV_ENV_OPENGL_4_2: - return "SPIR-V 1.0 (under OpenCL 4.2 semantics)"; + return "SPIR-V 1.0 (under OpenGL 4.2 semantics)"; case SPV_ENV_OPENGL_4_3: - return "SPIR-V 1.0 (under OpenCL 4.3 semantics)"; + return "SPIR-V 1.0 (under OpenGL 4.3 semantics)"; case SPV_ENV_OPENGL_4_5: - return "SPIR-V 1.0 (under OpenCL 4.5 semantics)"; + return "SPIR-V 1.0 (under OpenGL 4.5 semantics)"; case SPV_ENV_UNIVERSAL_1_2: return "SPIR-V 1.2"; + case SPV_ENV_UNIVERSAL_1_3: + return "SPIR-V 1.3"; + case SPV_ENV_VULKAN_1_1: + return "SPIR-V 1.3 (under Vulkan 1.1 semantics)"; } assert(0 && "Unhandled SPIR-V target environment"); return ""; @@ -51,7 +67,12 @@ uint32_t spvVersionForTargetEnv(spv_target_env env) { switch (env) { case SPV_ENV_UNIVERSAL_1_0: case SPV_ENV_VULKAN_1_0: + case SPV_ENV_OPENCL_1_2: + case SPV_ENV_OPENCL_EMBEDDED_1_2: + case SPV_ENV_OPENCL_2_0: + case SPV_ENV_OPENCL_EMBEDDED_2_0: case SPV_ENV_OPENCL_2_1: + case SPV_ENV_OPENCL_EMBEDDED_2_1: case SPV_ENV_OPENGL_4_0: case SPV_ENV_OPENGL_4_1: case SPV_ENV_OPENGL_4_2: @@ -62,7 +83,11 @@ uint32_t spvVersionForTargetEnv(spv_target_env env) { return SPV_SPIRV_VERSION_WORD(1, 1); case SPV_ENV_UNIVERSAL_1_2: case SPV_ENV_OPENCL_2_2: + case SPV_ENV_OPENCL_EMBEDDED_2_2: return SPV_SPIRV_VERSION_WORD(1, 2); + case SPV_ENV_UNIVERSAL_1_3: + case SPV_ENV_VULKAN_1_1: + return SPV_SPIRV_VERSION_WORD(1, 3); } assert(0 && "Unhandled SPIR-V target environment"); return SPV_SPIRV_VERSION_WORD(0, 0); @@ -75,6 +100,9 @@ bool spvParseTargetEnv(const char* s, spv_target_env* env) { if (match("vulkan1.0")) { if (env) *env = SPV_ENV_VULKAN_1_0; return true; + } else if (match("vulkan1.1")) { + if (env) *env = SPV_ENV_VULKAN_1_1; + return true; } else if (match("spv1.0")) { if (env) *env = SPV_ENV_UNIVERSAL_1_0; return true; @@ -84,9 +112,30 @@ bool spvParseTargetEnv(const char* s, spv_target_env* env) { } else if (match("spv1.2")) { if (env) *env = SPV_ENV_UNIVERSAL_1_2; return true; + } else if (match("spv1.3")) { + if (env) *env = SPV_ENV_UNIVERSAL_1_3; + return true; + } else if (match("opencl1.2embedded")) { + if (env) *env = SPV_ENV_OPENCL_EMBEDDED_1_2; + return true; + } else if (match("opencl1.2")) { + if (env) *env = SPV_ENV_OPENCL_1_2; + return true; + } else if (match("opencl2.0embedded")) { + if (env) *env = SPV_ENV_OPENCL_EMBEDDED_2_0; + return true; + } else if (match("opencl2.0")) { + if (env) *env = SPV_ENV_OPENCL_2_0; + return true; + } else if (match("opencl2.1embedded")) { + if (env) *env = SPV_ENV_OPENCL_EMBEDDED_2_1; + return true; } else if (match("opencl2.1")) { if (env) *env = SPV_ENV_OPENCL_2_1; return true; + } else if (match("opencl2.2embedded")) { + if (env) *env = SPV_ENV_OPENCL_EMBEDDED_2_2; + return true; } else if (match("opencl2.2")) { if (env) *env = SPV_ENV_OPENCL_2_2; return true; @@ -110,3 +159,30 @@ bool spvParseTargetEnv(const char* s, spv_target_env* env) { return false; } } + +bool spvIsVulkanEnv(spv_target_env env) { + switch (env) { + case SPV_ENV_UNIVERSAL_1_0: + case SPV_ENV_OPENCL_1_2: + case SPV_ENV_OPENCL_EMBEDDED_1_2: + case SPV_ENV_OPENCL_2_0: + case SPV_ENV_OPENCL_EMBEDDED_2_0: + case SPV_ENV_OPENCL_2_1: + case SPV_ENV_OPENCL_EMBEDDED_2_1: + case SPV_ENV_OPENGL_4_0: + case SPV_ENV_OPENGL_4_1: + case SPV_ENV_OPENGL_4_2: + case SPV_ENV_OPENGL_4_3: + case SPV_ENV_OPENGL_4_5: + case SPV_ENV_UNIVERSAL_1_1: + case SPV_ENV_UNIVERSAL_1_2: + case SPV_ENV_OPENCL_2_2: + case SPV_ENV_OPENCL_EMBEDDED_2_2: + case SPV_ENV_UNIVERSAL_1_3: + return false; + case SPV_ENV_VULKAN_1_0: + case SPV_ENV_VULKAN_1_1: + return true; + } + return false; +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.h b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.h index 76134eaf6442e7c78e4c826ea469523811f83152..315dbbe91832584a15ff8197299de99b87953d84 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_target_env.h @@ -21,4 +21,10 @@ // false and sets *env to SPV_ENV_UNIVERSAL_1_0. bool spvParseTargetEnv(const char* s, spv_target_env* env); +// Returns true if |env| is a VULKAN environment, false otherwise. +bool spvIsVulkanEnv(spv_target_env env); + +// Returns the version number for the given SPIR-V target environment. +uint32_t spvVersionForTargetEnv(spv_target_env env); + #endif // LIBSPIRV_SPIRV_TARGET_ENV_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.cpp index 77e8dda72c224b8e99c3c0735bda8c4df6de0737..fe522da48234e0947643d809736d00c18eb41808 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.cpp @@ -46,7 +46,7 @@ bool spvParseUniversalLimitsOptions(const char* s, spv_validator_limit* type) { return true; } -spv_validator_options spvValidatorOptionsCreate() { +spv_validator_options spvValidatorOptionsCreate(void) { return new spv_validator_options_t; } @@ -58,20 +58,31 @@ void spvValidatorOptionsSetUniversalLimit(spv_validator_options options, spv_validator_limit limit_type, uint32_t limit) { assert(options && "Validator options object may not be Null"); - switch(limit_type) { + switch (limit_type) { #define LIMIT(TYPE, FIELD) \ - case TYPE: \ - options->universal_limits_.FIELD = limit; \ - break; - LIMIT(spv_validator_limit_max_struct_members, max_struct_members) - LIMIT(spv_validator_limit_max_struct_depth, max_struct_depth) - LIMIT(spv_validator_limit_max_local_variables, max_local_variables) - LIMIT(spv_validator_limit_max_global_variables, max_global_variables) - LIMIT(spv_validator_limit_max_switch_branches, max_switch_branches) - LIMIT(spv_validator_limit_max_function_args, max_function_args) - LIMIT(spv_validator_limit_max_control_flow_nesting_depth, - max_control_flow_nesting_depth) - LIMIT(spv_validator_limit_max_access_chain_indexes, max_access_chain_indexes) + case TYPE: \ + options->universal_limits_.FIELD = limit; \ + break; + LIMIT(spv_validator_limit_max_struct_members, max_struct_members) + LIMIT(spv_validator_limit_max_struct_depth, max_struct_depth) + LIMIT(spv_validator_limit_max_local_variables, max_local_variables) + LIMIT(spv_validator_limit_max_global_variables, max_global_variables) + LIMIT(spv_validator_limit_max_switch_branches, max_switch_branches) + LIMIT(spv_validator_limit_max_function_args, max_function_args) + LIMIT(spv_validator_limit_max_control_flow_nesting_depth, + max_control_flow_nesting_depth) + LIMIT(spv_validator_limit_max_access_chain_indexes, + max_access_chain_indexes) #undef LIMIT } } + +void spvValidatorOptionsSetRelaxStoreStruct(spv_validator_options options, + bool val) { + options->relax_struct_store = val; +} + +void spvValidatorOptionsSetRelaxLogicalPointer(spv_validator_options options, + bool val) { + options->relax_logcial_pointer = val; +} diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.h b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.h index 8edc48a2bbab8c59316417d295b6f308bcf1a5b4..d15b63bb0e907325fd1ac3257d440a469b9361b9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/spirv_validator_options.h @@ -38,10 +38,13 @@ struct validator_universal_limits_t { // members may be added for any new option. struct spv_validator_options_t { spv_validator_options_t() - : universal_limits_() {} + : universal_limits_(), + relax_struct_store(false), + relax_logcial_pointer(false) {} validator_universal_limits_t universal_limits_; + bool relax_struct_store; + bool relax_logcial_pointer; }; #endif // LIBSPIRV_SPIRV_VALIDATOR_OPTIONS_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/table.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/table.cpp index b8fb809c75186ebe743d9a9a622fbc92bb256a8b..1a40e27c6ce758b485108d2a4896f71845c6b439 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/table.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/table.cpp @@ -21,14 +21,22 @@ spv_context spvContextCreate(spv_target_env env) { case SPV_ENV_UNIVERSAL_1_0: case SPV_ENV_VULKAN_1_0: case SPV_ENV_UNIVERSAL_1_1: + case SPV_ENV_OPENCL_1_2: + case SPV_ENV_OPENCL_EMBEDDED_1_2: + case SPV_ENV_OPENCL_2_0: + case SPV_ENV_OPENCL_EMBEDDED_2_0: case SPV_ENV_OPENCL_2_1: + case SPV_ENV_OPENCL_EMBEDDED_2_1: case SPV_ENV_OPENCL_2_2: + case SPV_ENV_OPENCL_EMBEDDED_2_2: case SPV_ENV_OPENGL_4_0: case SPV_ENV_OPENGL_4_1: case SPV_ENV_OPENGL_4_2: case SPV_ENV_OPENGL_4_3: case SPV_ENV_OPENGL_4_5: case SPV_ENV_UNIVERSAL_1_2: + case SPV_ENV_UNIVERSAL_1_3: + case SPV_ENV_VULKAN_1_1: break; default: return nullptr; @@ -48,7 +56,7 @@ spv_context spvContextCreate(spv_target_env env) { void spvContextDestroy(spv_context context) { delete context; } -void SetContextMessageConsumer(spv_context context, - spvtools::MessageConsumer consumer) { +void libspirv::SetContextMessageConsumer(spv_context context, + spvtools::MessageConsumer consumer) { context->consumer = std::move(consumer); } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/table.h b/sources/third_party/shaderc/third_party/spirv-tools/source/table.h index a7dffaafb508905357136ed933ccc489606b85db..d4e58348cfb0f6f2caaed3716ae85c669dbe54d8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/table.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/table.h @@ -15,7 +15,7 @@ #ifndef LIBSPIRV_TABLE_H_ #define LIBSPIRV_TABLE_H_ -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" #include "extensions.h" #include "message.h" @@ -24,26 +24,43 @@ typedef struct spv_opcode_desc_t { const char* name; const SpvOp opcode; - const libspirv::CapabilitySet capabilities; + const uint32_t numCapabilities; + const SpvCapability* capabilities; // operandTypes[0..numTypes-1] describe logical operands for the instruction. // The operand types include result id and result-type id, followed by // the types of arguments. - uint16_t numTypes; + const uint16_t numTypes; spv_operand_type_t operandTypes[16]; // TODO: Smaller/larger? const bool hasResult; // Does the instruction have a result ID operand? const bool hasType; // Does the instruction have a type ID operand? + // A set of extensions that enable this feature. If empty then this operand + // value is in core and its availability is subject to minVersion. The + // assembler, binary parser, and disassembler ignore this rule, so you can + // freely process invalid modules. + const uint32_t numExtensions; + const libspirv::Extension* extensions; + // Minimal core SPIR-V version required for this feature, if without + // extensions. ~0u means reserved for future use. ~0u and non-empty extension + // lists means only available in extensions. + const uint32_t minVersion; } spv_opcode_desc_t; typedef struct spv_operand_desc_t { const char* name; const uint32_t value; - const libspirv::CapabilitySet capabilities; + const uint32_t numCapabilities; + const SpvCapability* capabilities; // A set of extensions that enable this feature. If empty then this operand - // value is always enabled, i.e. it's in core. The assembler, binary parser, - // and disassembler ignore this rule, so you can freely process invalid - // modules. - const libspirv::ExtensionSet extensions; + // value is in core and its availability is subject to minVersion. The + // assembler, binary parser, and disassembler ignore this rule, so you can + // freely process invalid modules. + const uint32_t numExtensions; + const libspirv::Extension* extensions; const spv_operand_type_t operandTypes[16]; // TODO: Smaller/larger? + // Minimal core SPIR-V version required for this feature, if without + // extensions. ~0u means reserved for future use. ~0u and non-empty extension + // lists means only available in extensions. + const uint32_t minVersion; } spv_operand_desc_t; typedef struct spv_operand_desc_group_t { @@ -55,7 +72,8 @@ typedef struct spv_operand_desc_group_t { typedef struct spv_ext_inst_desc_t { const char* name; const uint32_t ext_inst; - const libspirv::CapabilitySet capabilities; + const uint32_t numCapabilities; + const SpvCapability* capabilities; const spv_operand_type_t operandTypes[16]; // TODO: Smaller/larger? } spv_ext_inst_desc_t; @@ -96,10 +114,12 @@ struct spv_context_t { spvtools::MessageConsumer consumer; }; +namespace libspirv { // Sets the message consumer to |consumer| in the given |context|. The original // message consumer will be overwritten. void SetContextMessageConsumer(spv_context context, spvtools::MessageConsumer consumer); +} // namespace libspirv // Populates *table with entries for env. spv_result_t spvOpcodeTableGet(spv_opcode_table* table, spv_target_env env); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/text.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/text.cpp index 8c48814b056650a0dd31e80040ca099937986b3a..ac4f8a1f03f2272ac3d7a9168a54020f1373606d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/text.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/text.cpp @@ -36,6 +36,7 @@ #include "operand.h" #include "spirv-tools/libspirv.h" #include "spirv_constant.h" +#include "spirv_target_env.h" #include "table.h" #include "text_handler.h" #include "util/bitutils.h" @@ -241,8 +242,8 @@ spv_result_t spvTextEncodeOperand(const libspirv::AssemblyGrammar& grammar, // and emits its corresponding number. spv_ext_inst_desc extInst; if (grammar.lookupExtInst(pInst->extInstType, textValue, &extInst)) { - return context->diagnostic() << "Invalid extended instruction name '" - << textValue << "'."; + return context->diagnostic() + << "Invalid extended instruction name '" << textValue << "'."; } spvInstructionAddWord(pInst, extInst->ext_inst); @@ -366,13 +367,16 @@ spv_result_t spvTextEncodeOperand(const libspirv::AssemblyGrammar& grammar, if (context->binaryEncodeString(literal.str.c_str(), pInst)) return SPV_ERROR_INVALID_TEXT; } break; + + // Masks. case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE: case SPV_OPERAND_TYPE_FUNCTION_CONTROL: case SPV_OPERAND_TYPE_LOOP_CONTROL: case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS: - case SPV_OPERAND_TYPE_SELECTION_CONTROL: { + case SPV_OPERAND_TYPE_SELECTION_CONTROL: + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: { uint32_t value; if (grammar.parseMaskOperand(type, textValue, &value)) { return context->diagnostic() << "Invalid " << spvOperandTypeStr(type) @@ -522,8 +526,8 @@ spv_result_t spvTextEncodeOpcode(const libspirv::AssemblyGrammar& grammar, error = context->getWord(&opcodeName, &nextPosition); if (error) return context->diagnostic(error) << "Internal Error"; if (!context->startsWithOp()) { - return context->diagnostic() << "Invalid Opcode prefix '" << opcodeName - << "'."; + return context->diagnostic() + << "Invalid Opcode prefix '" << opcodeName << "'."; } } @@ -533,8 +537,8 @@ spv_result_t spvTextEncodeOpcode(const libspirv::AssemblyGrammar& grammar, spv_opcode_desc opcodeEntry; error = grammar.lookupOpcode(pInstName, &opcodeEntry); if (error) { - return context->diagnostic(error) << "Invalid Opcode name '" << opcodeName - << "'"; + return context->diagnostic(error) + << "Invalid Opcode name '" << opcodeName << "'"; } if (opcodeEntry->hasResult && result_id.empty()) { return context->diagnostic() @@ -556,7 +560,8 @@ spv_result_t spvTextEncodeOpcode(const libspirv::AssemblyGrammar& grammar, spv_operand_pattern_t expectedOperands; expectedOperands.reserve(opcodeEntry->numTypes); for (auto i = 0; i < opcodeEntry->numTypes; i++) - expectedOperands.push_back(opcodeEntry->operandTypes[opcodeEntry->numTypes - i - 1]); + expectedOperands.push_back( + opcodeEntry->operandTypes[opcodeEntry->numTypes - i - 1]); while (!expectedOperands.empty()) { const spv_operand_type_t type = expectedOperands.back(); @@ -694,10 +699,11 @@ spv_result_t GetNumericIds(const libspirv::AssemblyGrammar& grammar, // Translates a given assembly language module into binary form. // If a diagnostic is generated, it is not yet marked as being // for a text-based input. -spv_result_t spvTextToBinaryInternal( - const libspirv::AssemblyGrammar& grammar, - const spvtools::MessageConsumer& consumer, const spv_text text, - const uint32_t options, spv_binary* pBinary) { +spv_result_t spvTextToBinaryInternal(const libspirv::AssemblyGrammar& grammar, + const spvtools::MessageConsumer& consumer, + const spv_text text, + const uint32_t options, + spv_binary* pBinary) { // The ids in this set will have the same values both in source and binary. // All other ids will be generated by filling in the gaps. std::set ids_to_preserve; @@ -770,15 +776,17 @@ spv_result_t spvTextToBinary(const spv_const_context context, const char* input_text, const size_t input_text_size, spv_binary* pBinary, spv_diagnostic* pDiagnostic) { - return spvTextToBinaryWithOptions( - context, input_text, input_text_size, SPV_BINARY_TO_TEXT_OPTION_NONE, - pBinary, pDiagnostic); + return spvTextToBinaryWithOptions(context, input_text, input_text_size, + SPV_BINARY_TO_TEXT_OPTION_NONE, pBinary, + pDiagnostic); } -spv_result_t spvTextToBinaryWithOptions( - const spv_const_context context, const char* input_text, - const size_t input_text_size, const uint32_t options, spv_binary* pBinary, - spv_diagnostic* pDiagnostic) { +spv_result_t spvTextToBinaryWithOptions(const spv_const_context context, + const char* input_text, + const size_t input_text_size, + const uint32_t options, + spv_binary* pBinary, + spv_diagnostic* pDiagnostic) { spv_context_t hijack_context = *context; if (pDiagnostic) { *pDiagnostic = nullptr; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.cpp index 1806926ef3f0a6a615fa37f7887f2c3fd2a83c07..1a1b48d048c09d928b4b674bb2a6829efef9889f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.cpp @@ -389,8 +389,7 @@ std::set AssemblyContext::GetNumericIds() const { std::set ids; for (const auto& kv : named_ids_) { uint32_t id; - if (spvutils::ParseNumber(kv.first.c_str(), &id)) - ids.insert(id); + if (spvutils::ParseNumber(kv.first.c_str(), &id)) ids.insert(id); } return ids; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.h b/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.h index 1e17948defb791dccf422bbaaf0d42d736f4aa63..e49b51bbde0207a4114f40d913876837ce8e8216 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/text_handler.h @@ -119,8 +119,12 @@ class AssemblyContext { public: AssemblyContext(spv_text text, const spvtools::MessageConsumer& consumer, std::set&& ids_to_preserve = std::set()) - : current_position_({}), consumer_(consumer), text_(text), bound_(1), - next_id_(1), ids_to_preserve_(std::move(ids_to_preserve)) {} + : current_position_({}), + consumer_(consumer), + text_(text), + bound_(1), + next_id_(1), + ids_to_preserve_(std::move(ids_to_preserve)) {} // Assigns a new integer value to the given text ID, or returns the previously // assigned integer value if the ID has been seen before. @@ -251,5 +255,5 @@ class AssemblyContext { uint32_t next_id_; std::set ids_to_preserve_; }; -} +} // namespace libspirv #endif // _LIBSPIRV_TEXT_HANDLER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.cpp index d66f13dc96c58a0ee13cc9c9ad4ee9bd1b0a807b..77e2bc17d67ad9a3d8f6b99f8257c894e6388311 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.cpp @@ -121,15 +121,13 @@ bool ReadVariableWidthInternal(BitReaderInterface* reader, uint64_t* val, while (payload_read + chunk_length < max_payload) { uint64_t bits = 0; - if (reader->ReadBits(&bits, chunk_length) != chunk_length) - return false; + if (reader->ReadBits(&bits, chunk_length) != chunk_length) return false; *val |= bits << payload_read; payload_read += chunk_length; uint64_t more_to_come = 0; - if (reader->ReadBits(&more_to_come, 1) != 1) - return false; + if (reader->ReadBits(&more_to_come, 1) != 1) return false; if (!more_to_come) { return true; @@ -139,8 +137,7 @@ bool ReadVariableWidthInternal(BitReaderInterface* reader, uint64_t* val, // Need to read the last chunk which may be truncated. No signal bit follows. uint64_t bits = 0; const size_t left_to_read = max_payload - payload_read; - if (reader->ReadBits(&bits, left_to_read) != left_to_read) - return false; + if (reader->ReadBits(&bits, left_to_read) != left_to_read) return false; *val |= bits << payload_read; return true; @@ -255,26 +252,22 @@ void BitWriterInterface::WriteVariableWidthU8(uint8_t val, WriteVariableWidthUnsigned(this, val, chunk_length); } -void BitWriterInterface::WriteVariableWidthS64(int64_t val, - size_t chunk_length, +void BitWriterInterface::WriteVariableWidthS64(int64_t val, size_t chunk_length, size_t zigzag_exponent) { WriteVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -void BitWriterInterface::WriteVariableWidthS32(int32_t val, - size_t chunk_length, +void BitWriterInterface::WriteVariableWidthS32(int32_t val, size_t chunk_length, size_t zigzag_exponent) { WriteVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -void BitWriterInterface::WriteVariableWidthS16(int16_t val, - size_t chunk_length, +void BitWriterInterface::WriteVariableWidthS16(int16_t val, size_t chunk_length, size_t zigzag_exponent) { WriteVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -void BitWriterInterface::WriteVariableWidthS8(int8_t val, - size_t chunk_length, +void BitWriterInterface::WriteVariableWidthS8(int8_t val, size_t chunk_length, size_t zigzag_exponent) { WriteVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } @@ -352,26 +345,22 @@ bool BitReaderInterface::ReadVariableWidthU8(uint8_t* val, return ReadVariableWidthUnsigned(this, val, chunk_length); } -bool BitReaderInterface::ReadVariableWidthS64(int64_t* val, - size_t chunk_length, +bool BitReaderInterface::ReadVariableWidthS64(int64_t* val, size_t chunk_length, size_t zigzag_exponent) { return ReadVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -bool BitReaderInterface::ReadVariableWidthS32(int32_t* val, - size_t chunk_length, +bool BitReaderInterface::ReadVariableWidthS32(int32_t* val, size_t chunk_length, size_t zigzag_exponent) { return ReadVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -bool BitReaderInterface::ReadVariableWidthS16(int16_t* val, - size_t chunk_length, +bool BitReaderInterface::ReadVariableWidthS16(int16_t* val, size_t chunk_length, size_t zigzag_exponent) { return ReadVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } -bool BitReaderInterface::ReadVariableWidthS8(int8_t* val, - size_t chunk_length, +bool BitReaderInterface::ReadVariableWidthS8(int8_t* val, size_t chunk_length, size_t zigzag_exponent) { return ReadVariableWidthSigned(this, val, chunk_length, zigzag_exponent); } @@ -396,8 +385,7 @@ size_t BitReaderWord64::ReadBits(uint64_t* bits, size_t num_bits) { assert(is_little_endian && "Big-endian architecture support not implemented"); if (!is_little_endian) return 0; - if (ReachedEnd()) - return 0; + if (ReachedEnd()) return 0; // Index of the current word. const size_t index = pos_ / 64; @@ -431,17 +419,13 @@ size_t BitReaderWord64::ReadBits(uint64_t* bits, size_t num_bits) { return num_bits; } -bool BitReaderWord64::ReachedEnd() const { - return pos_ >= buffer_.size() * 64; -} +bool BitReaderWord64::ReachedEnd() const { return pos_ >= buffer_.size() * 64; } bool BitReaderWord64::OnlyZeroesLeft() const { - if (ReachedEnd()) - return true; + if (ReachedEnd()) return true; const size_t index = pos_ / 64; - if (index < buffer_.size() - 1) - return false; + if (index < buffer_.size() - 1) return false; assert(index == buffer_.size() - 1); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.h index f98b74bf8d40c21cd94198681281a7c00f423e36..247ae3545069489d1b7098f2b9f074abe11ec635 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_stream.h @@ -21,8 +21,8 @@ #include #include #include -#include #include +#include #include namespace spvutils { @@ -60,9 +60,7 @@ inline T GetLowerBits(T in, size_t num_bits) { // 2 -> 4 // Motivation: -1 is 0xFF...FF what doesn't work very well with // WriteVariableWidth which prefers to have as many 0 bits as possible. -inline uint64_t EncodeZigZag(int64_t val) { - return (val << 1) ^ (val >> 63); -} +inline uint64_t EncodeZigZag(int64_t val) { return (val << 1) ^ (val >> 63); } // Decodes signed integer encoded with EncodeZigZag. inline int64_t DecodeZigZag(uint64_t val) { @@ -92,7 +90,8 @@ inline int64_t DecodeZigZag(uint64_t val) { inline uint64_t EncodeZigZag(int64_t val, size_t block_exponent) { assert(block_exponent < 64); const uint64_t uval = static_cast(val >= 0 ? val : -val - 1); - const uint64_t block_num = ((uval >> block_exponent) << 1) + (val >= 0 ? 0 : 1); + const uint64_t block_num = + ((uval >> block_exponent) << 1) + (val >= 0 ? 0 : 1); const uint64_t pos = GetLowerBits(uval, block_exponent); return (block_num << block_exponent) + pos; } @@ -139,13 +138,13 @@ std::vector StreamToBuffer(std::string str) { std::vector buffer; buffer.reserve(NumBitsToNumWords(str.length())); for (int index = str_length - word_size; index >= 0; index -= word_size) { - buffer.push_back(static_cast(std::bitset( - str, index, word_size).to_ullong())); + buffer.push_back(static_cast( + std::bitset(str, index, word_size).to_ullong())); } const size_t suffix_length = str.length() % word_size; if (suffix_length != 0) { - buffer.push_back(static_cast(std::bitset( - str, 0, suffix_length).to_ullong())); + buffer.push_back(static_cast( + std::bitset(str, 0, suffix_length).to_ullong())); } return buffer; } @@ -154,8 +153,7 @@ std::vector StreamToBuffer(std::string str) { template inline std::string PadToWord(std::string&& str) { const size_t tail_length = str.size() % N; - if (tail_length != 0) - str += std::string(N - tail_length, '0'); + if (tail_length != 0) str += std::string(N - tail_length, '0'); return str; } @@ -174,7 +172,8 @@ inline std::bitset StreamToBitset(std::string str) { // Converts first |num_bits| of std::bitset to a left-to-right stream of bits. template -inline std::string BitsetToStream(const std::bitset& bits, size_t num_bits = N) { +inline std::string BitsetToStream(const std::bitset& bits, + size_t num_bits = N) { std::string str = bits.to_string().substr(N - num_bits); std::reverse(str.begin(), str.end()); return str; @@ -237,14 +236,14 @@ class BitWriterInterface { void WriteVariableWidthU32(uint32_t val, size_t chunk_length); void WriteVariableWidthU16(uint16_t val, size_t chunk_length); void WriteVariableWidthU8(uint8_t val, size_t chunk_length); - void WriteVariableWidthS64( - int64_t val, size_t chunk_length, size_t zigzag_exponent); - void WriteVariableWidthS32( - int32_t val, size_t chunk_length, size_t zigzag_exponent); - void WriteVariableWidthS16( - int16_t val, size_t chunk_length, size_t zigzag_exponent); - void WriteVariableWidthS8( - int8_t val, size_t chunk_length, size_t zigzag_exponent); + void WriteVariableWidthS64(int64_t val, size_t chunk_length, + size_t zigzag_exponent); + void WriteVariableWidthS32(int32_t val, size_t chunk_length, + size_t zigzag_exponent); + void WriteVariableWidthS16(int16_t val, size_t chunk_length, + size_t zigzag_exponent); + void WriteVariableWidthS8(int8_t val, size_t chunk_length, + size_t zigzag_exponent); // Writes |val| using fixed bit width. Bit width is determined by |max_val|: // max_val 0 -> bit width 1 @@ -262,14 +261,10 @@ class BitWriterInterface { virtual size_t GetNumBits() const = 0; // Provides direct access to the buffer data if implemented. - virtual const uint8_t* GetData() const { - return nullptr; - } + virtual const uint8_t* GetData() const { return nullptr; } // Returns buffer size in bytes. - size_t GetDataSizeBytes() const { - return NumBitsToNumWords<8>(GetNumBits()); - } + size_t GetDataSizeBytes() const { return NumBitsToNumWords<8>(GetNumBits()); } // Generates and returns byte array containing written bits. virtual std::vector GetDataCopy() const = 0; @@ -286,9 +281,7 @@ class BitWriterWord64 : public BitWriterInterface { void WriteBits(uint64_t bits, size_t num_bits) override; - size_t GetNumBits() const override { - return end_; - } + size_t GetNumBits() const override { return end_; } const uint8_t* GetData() const override { return reinterpret_cast(buffer_.data()); @@ -300,9 +293,7 @@ class BitWriterWord64 : public BitWriterInterface { // Returns written stream as std::string, padded with zeroes so that the // length is a multiple of 64. - std::string GetStreamPadded64() const { - return BufferToStream(buffer_); - } + std::string GetStreamPadded64() const { return BufferToStream(buffer_); } // Sets callback to emit bit sequences after every write. void SetCallback(std::function callback) { @@ -312,8 +303,7 @@ class BitWriterWord64 : public BitWriterInterface { protected: // Sends string generated from arguments to callback_ if defined. void EmitSequence(uint64_t bits, size_t num_bits) const { - if (callback_) - callback_(BitsToStream(bits, num_bits)); + if (callback_) callback_(BitsToStream(bits, num_bits)); } private: @@ -363,8 +353,7 @@ class BitReaderInterface { static_assert(sizeof(T) <= 64, "Type size too large"); uint64_t bits = 0; const size_t num_read = ReadBits(&bits, sizeof(T) * 8); - if (num_read != sizeof(T) * 8) - return false; + if (num_read != sizeof(T) * 8) return false; memcpy(val, &bits, sizeof(T)); return true; } @@ -384,9 +373,7 @@ class BitReaderInterface { // the buffer stream ends with padding zeroes, and would accept this as a // 'soft' EOF. Implementations of this class do not necessarily need to // implement this, default behavior can simply delegate to ReachedEnd(). - virtual bool OnlyZeroesLeft() const { - return ReachedEnd(); - } + virtual bool OnlyZeroesLeft() const { return ReachedEnd(); } // Reads value encoded with WriteVariableWidthXXX (see BitWriterInterface). // Reader and writer must use the same |chunk_length| and variable type. @@ -395,14 +382,14 @@ class BitReaderInterface { bool ReadVariableWidthU32(uint32_t* val, size_t chunk_length); bool ReadVariableWidthU16(uint16_t* val, size_t chunk_length); bool ReadVariableWidthU8(uint8_t* val, size_t chunk_length); - bool ReadVariableWidthS64( - int64_t* val, size_t chunk_length, size_t zigzag_exponent); - bool ReadVariableWidthS32( - int32_t* val, size_t chunk_length, size_t zigzag_exponent); - bool ReadVariableWidthS16( - int16_t* val, size_t chunk_length, size_t zigzag_exponent); - bool ReadVariableWidthS8( - int8_t* val, size_t chunk_length, size_t zigzag_exponent); + bool ReadVariableWidthS64(int64_t* val, size_t chunk_length, + size_t zigzag_exponent); + bool ReadVariableWidthS32(int32_t* val, size_t chunk_length, + size_t zigzag_exponent); + bool ReadVariableWidthS16(int16_t* val, size_t chunk_length, + size_t zigzag_exponent); + bool ReadVariableWidthS8(int8_t* val, size_t chunk_length, + size_t zigzag_exponent); // Reads value written by WriteFixedWidth (|max_val| needs to be the same). // Returns true on success, false if the bit stream ends prematurely. @@ -428,9 +415,7 @@ class BitReaderWord64 : public BitReaderInterface { size_t ReadBits(uint64_t* bits, size_t num_bits) override; - size_t GetNumReadBits() const override { - return pos_; - } + size_t GetNumReadBits() const override { return pos_; } bool ReachedEnd() const override; bool OnlyZeroesLeft() const override; @@ -445,8 +430,7 @@ class BitReaderWord64 : public BitReaderInterface { protected: // Sends string generated from arguments to callback_ if defined. void EmitSequence(uint64_t bits, size_t num_bits) const { - if (callback_) - callback_(BitsToStream(bits, num_bits)); + if (callback_) callback_(BitsToStream(bits, num_bits)); } private: diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80c0f0cbe3cd87eca57a131b16c0d71c528d05a5 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.cpp @@ -0,0 +1,40 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "bit_vector.h" + +#include + +namespace spvtools { +namespace utils { + +void BitVector::ReportDensity(std::ostream& out) { + uint32_t count = 0; + + for (BitContainer e : bits_) { + while (e != 0) { + if ((e & 1) != 0) { + ++count; + } + e = e >> 1; + } + } + + out << "count=" << count + << ", total size (bytes)=" << bits_.size() * sizeof(BitContainer) + << ", bytes per element=" + << (double)(bits_.size() * sizeof(BitContainer)) / (double)(count); +} +} // namespace utils +} // namespace spvtools diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.h new file mode 100644 index 0000000000000000000000000000000000000000..f8a654df3e4dc289aafa0a0f163d6bc8288410fb --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bit_vector.h @@ -0,0 +1,102 @@ +// Copyright (c) 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_UTILS_BIT_VECTOR_H_ +#define LIBSPIRV_UTILS_BIT_VECTOR_H_ + +#include +#include +#include + +namespace spvtools { +namespace utils { + +// Implements a bit vector class. +// +// All bits default to zero, and the upper bound is 2^32-1. +class BitVector { + private: + using BitContainer = uint64_t; + enum { kBitContainerSize = 64 }; + enum { kInitialNumBits = 1024 }; + + public: + // Creates a bit vector contianing 0s. + BitVector() : bits_(kInitialNumBits / kBitContainerSize, 0) {} + + // Sets the |i|th bit to 1. Returns the |i|th bit before it was set. + bool Set(uint32_t i) { + uint32_t element_index = i / kBitContainerSize; + uint32_t bit_in_element = i % kBitContainerSize; + + if (element_index >= bits_.size()) { + bits_.resize(element_index + 1, 0); + } + + BitContainer original = bits_[element_index]; + BitContainer ith_bit = static_cast(1) << bit_in_element; + + if ((original & ith_bit) != 0) { + return true; + } else { + bits_[element_index] = original | ith_bit; + return false; + } + } + + // Sets the |i|th bit to 0. Return the |i|th bit before it was cleared. + bool Clear(uint32_t i) { + uint32_t element_index = i / kBitContainerSize; + uint32_t bit_in_element = i % kBitContainerSize; + + if (element_index >= bits_.size()) { + return false; + } + + BitContainer original = bits_[element_index]; + BitContainer ith_bit = static_cast(1) << bit_in_element; + + if ((original & ith_bit) == 0) { + return false; + } else { + bits_[element_index] = original & (~ith_bit); + return true; + } + } + + // Returns the |i|th bit. + bool Get(uint32_t i) const { + uint32_t element_index = i / kBitContainerSize; + uint32_t bit_in_element = i % kBitContainerSize; + + if (element_index >= bits_.size()) { + return false; + } + + return (bits_[element_index] & + (static_cast(1) << bit_in_element)) != 0; + } + + // Print a report on the densicy of the bit vector, number of 1 bits, number + // of bytes, and average bytes for 1 bit, to |out|. + void ReportDensity(std::ostream& out); + + private: + std::vector bits_; +}; + +} // namespace utils +} // namespace spvtools + +#endif // LIBSPIRV_UTILS_BIT_VECTOR_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bitutils.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bitutils.h index 31288ab69d3d3ade46b05186cb1bba333666420d..9b53d3b2d7f519721c9f86184b0e8b7f311084bd 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/bitutils.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/bitutils.h @@ -76,6 +76,19 @@ static_assert(SetBits::get == uint64_t(0x0000000080000000LL), static_assert(SetBits::get == uint64_t(0x00000000FFFF0000LL), "SetBits failed"); +// Returns number of '1' bits in a word. +template +size_t CountSetBits(T word) { + static_assert(std::is_integral::value, + "CountSetBits requires integer type"); + size_t count = 0; + while (word) { + word &= word - 1; + ++count; + } + return count; +} + } // namespace spvutils #endif // LIBSPIRV_UTIL_BITUTILS_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/hex_float.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/hex_float.h index 83f397406f154a03ac4be86d3b1e9041f2842c06..de99cc356c216bee3dc036d3be3db1cb7692e99d 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/hex_float.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/hex_float.h @@ -22,6 +22,7 @@ #include #include #include +#include #include "bitutils.h" @@ -76,6 +77,14 @@ struct FloatProxyTraits { static float max() { return std::numeric_limits::max(); } // Returns the lowest normal value. static float lowest() { return std::numeric_limits::lowest(); } + // Returns the value as the native floating point format. + static float getAsFloat(const uint_type& t) { return BitwiseCast(t); } + // Returns the bits from the given floating pointer number. + static uint_type getBitsFromFloat(const float& t) { + return BitwiseCast(t); + } + // Returns the bitwidth. + static uint32_t width() { return 32u; } }; template <> @@ -88,6 +97,16 @@ struct FloatProxyTraits { static double max() { return std::numeric_limits::max(); } // Returns the lowest normal value. static double lowest() { return std::numeric_limits::lowest(); } + // Returns the value as the native floating point format. + static double getAsFloat(const uint_type& t) { + return BitwiseCast(t); + } + // Returns the bits from the given floating pointer number. + static uint_type getBitsFromFloat(const double& t) { + return BitwiseCast(t); + } + // Returns the bitwidth. + static uint32_t width() { return 64u; } }; template <> @@ -100,6 +119,12 @@ struct FloatProxyTraits { static Float16 max() { return Float16::max(); } // Returns the lowest normal value. static Float16 lowest() { return Float16::lowest(); } + // Returns the value as the native floating point format. + static Float16 getAsFloat(const uint_type& t) { return Float16(t); } + // Returns the bits from the given floating pointer number. + static uint_type getBitsFromFloat(const Float16& t) { return t.get_value(); } + // Returns the bitwidth. + static uint32_t width() { return 16u; } }; // Since copying a floating point number (especially if it is NaN) @@ -116,7 +141,7 @@ class FloatProxy { // Intentionally non-explicit. This is a proxy type so // implicit conversions allow us to use it more transparently. - FloatProxy(T val) { data_ = BitwiseCast(val); } + FloatProxy(T val) { data_ = FloatProxyTraits::getBitsFromFloat(val); } // Intentionally non-explicit. This is a proxy type so // implicit conversions allow us to use it more transparently. @@ -129,11 +154,24 @@ class FloatProxy { } // Returns the data as a floating point value. - T getAsFloat() const { return BitwiseCast(data_); } + T getAsFloat() const { return FloatProxyTraits::getAsFloat(data_); } // Returns the raw data. uint_type data() const { return data_; } + // Returns a vector of words suitable for use in an Operand. + std::vector GetWords() const { + std::vector words; + if (FloatProxyTraits::width() == 64) { + FloatProxyTraits::uint_type d = data(); + words.push_back(static_cast(d)); + words.push_back(static_cast(d >> 32)); + } else { + words.push_back(static_cast(data())); + } + return words; + } + // Returns true if the value represents any type of NaN. bool isNan() { return FloatProxyTraits::isNan(getAsFloat()); } // Returns true if the value represents any type of infinity. @@ -317,12 +355,11 @@ class HexFloat { static const int_type min_exponent = -static_cast(exponent_bias); // Returns the bits associated with the value. - uint_type getBits() const { return spvutils::BitwiseCast(value_); } + uint_type getBits() const { return value_.data(); } // Returns the bits associated with the value, without the leading sign bit. uint_type getUnsignedBits() const { - return static_cast(spvutils::BitwiseCast(value_) & - ~sign_mask); + return static_cast(value_.data() & ~sign_mask); } // Returns the bits associated with the exponent, shifted to start at the @@ -423,7 +460,7 @@ class HexFloat { exponent_mask); significand = static_cast(significand & fraction_encode_mask); new_value = static_cast(new_value | (exponent | significand)); - value_ = BitwiseCast(new_value); + value_ = T(new_value); } // Increments the significand of this number by the given amount. @@ -710,7 +747,7 @@ std::ostream& operator<<(std::ostream& os, const HexFloat& value) { static_assert(HF::num_fraction_bits != 0, "num_fractin_bits must be non-zero for a valid float"); - const uint_type bits = spvutils::BitwiseCast(value.value()); + const uint_type bits = value.value().data(); const char* const sign = (bits & HF::sign_mask) ? "-" : ""; const uint_type exponent = static_cast( (bits & HF::exponent_mask) >> HF::num_fraction_bits); @@ -1072,7 +1109,7 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { HF::exponent_mask); output_bits |= shifted_exponent; - T output_float = spvutils::BitwiseCast(output_bits); + T output_float(output_bits); value.set_value(output_float); return is; @@ -1089,7 +1126,7 @@ std::ostream& operator<<(std::ostream& os, const FloatProxy& value) { case FP_ZERO: case FP_NORMAL: { auto saved_precision = os.precision(); - os.precision(std::numeric_limits::digits10); + os.precision(std::numeric_limits::max_digits10); os << float_val; os.precision(saved_precision); } break; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/huffman_codec.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/huffman_codec.h index 2ccc3c98a41d707d35f3479f8f0c7f258ab7fc8c..c2f7b1a987689e9db578dcaf1cfe7aec116c778b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/huffman_codec.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/huffman_codec.h @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -74,10 +74,10 @@ class HuffmanCodec { std::vector queue_vector; queue_vector.reserve(hist.size()); std::priority_queue, - std::function> - queue(std::bind(&HuffmanCodec::LeftIsBigger, this, - std::placeholders::_1, std::placeholders::_2), - std::move(queue_vector)); + std::function> + queue(std::bind(&HuffmanCodec::LeftIsBigger, this, + std::placeholders::_1, std::placeholders::_2), + std::move(queue_vector)); // Put all leaves in the queue. for (const auto& pair : hist) { @@ -153,11 +153,9 @@ class HuffmanCodec { for (const Node& node : nodes_) { code << indent2 << "{"; - if (value_is_text) - code << "\""; + if (value_is_text) code << "\""; code << node.value; - if (value_is_text) - code << "\""; + if (value_is_text) code << "\""; code << ", " << node.left << ", " << node.right << "},\n"; } @@ -172,9 +170,7 @@ class HuffmanCodec { // Where w stands for the weight of the node. // Right tree branches appear above left branches. Taking the right path // adds 1 to the code, taking the left adds 0. - void PrintTree(std::ostream& out) const { - PrintTreeInternal(out, root_, 0); - } + void PrintTree(std::ostream& out) const { PrintTreeInternal(out, root_, 0); } // Traverses the tree and prints the Huffman table: value, code // and optionally node weight for every leaf. @@ -188,23 +184,20 @@ class HuffmanCodec { queue.pop(); if (!RightOf(node) && !LeftOf(node)) { out << ValueOf(node); - if (print_weights) - out << " " << WeightOf(node); + if (print_weights) out << " " << WeightOf(node); out << " " << code << std::endl; } else { - if (LeftOf(node)) - queue.emplace(LeftOf(node), code + "0"); + if (LeftOf(node)) queue.emplace(LeftOf(node), code + "0"); - if (RightOf(node)) - queue.emplace(RightOf(node), code + "1"); + if (RightOf(node)) queue.emplace(RightOf(node), code + "1"); } } } // Returns the Huffman table. The table was built at at construction time, // this function just returns a const reference. - const std::unordered_map>& - GetEncodingTable() const { + const std::unordered_map>& GetEncodingTable() + const { return encoding_table_; } @@ -212,8 +205,7 @@ class HuffmanCodec { // |bits|. Returns false of |val| is not in the Huffman table. bool Encode(const Val& val, uint64_t* bits, size_t* num_bits) const { auto it = encoding_table_.find(val); - if (it == encoding_table_.end()) - return false; + if (it == encoding_table_.end()) return false; *bits = it->second.first; *num_bits = it->second.second; return true; @@ -225,8 +217,8 @@ class HuffmanCodec { // |read_bit| has type bool func(bool* bit). When called, the next bit is // stored in |bit|. |read_bit| returns false if the stream terminates // prematurely. - bool DecodeFromStream( - const std::function& read_bit, Val* val) const { + bool DecodeFromStream(const std::function& read_bit, + Val* val) const { uint32_t node = root_; while (true) { assert(node); @@ -237,8 +229,7 @@ class HuffmanCodec { } bool go_right; - if (!read_bit(&go_right)) - return false; + if (!read_bit(&go_right)) return false; if (go_right) node = RightOf(node); @@ -246,35 +237,25 @@ class HuffmanCodec { node = LeftOf(node); } - assert (0); + assert(0); return false; } private: // Returns value of the node referenced by |handle|. - Val ValueOf(uint32_t node) const { - return nodes_.at(node).value; - } + Val ValueOf(uint32_t node) const { return nodes_.at(node).value; } // Returns left child of |node|. - uint32_t LeftOf(uint32_t node) const { - return nodes_.at(node).left; - } + uint32_t LeftOf(uint32_t node) const { return nodes_.at(node).left; } // Returns right child of |node|. - uint32_t RightOf(uint32_t node) const { - return nodes_.at(node).right; - } + uint32_t RightOf(uint32_t node) const { return nodes_.at(node).right; } // Returns weight of |node|. - uint32_t WeightOf(uint32_t node) const { - return nodes_.at(node).weight; - } + uint32_t WeightOf(uint32_t node) const { return nodes_.at(node).weight; } // Returns id of |node|. - uint32_t IdOf(uint32_t node) const { - return nodes_.at(node).id; - } + uint32_t IdOf(uint32_t node) const { return nodes_.at(node).id; } // Returns mutable reference to value of |node|. Val& MutableValueOf(uint32_t node) { @@ -295,20 +276,16 @@ class HuffmanCodec { } // Returns mutable reference to weight of |node|. - uint32_t& MutableWeightOf(uint32_t node) { - return nodes_.at(node).weight; - } + uint32_t& MutableWeightOf(uint32_t node) { return nodes_.at(node).weight; } // Returns mutable reference to id of |node|. - uint32_t& MutableIdOf(uint32_t node) { - return nodes_.at(node).id; - } + uint32_t& MutableIdOf(uint32_t node) { return nodes_.at(node).id; } // Returns true if |left| has bigger weight than |right|. Node ids are // used as tie-breaker. bool LeftIsBigger(uint32_t left, uint32_t right) const { if (WeightOf(left) == WeightOf(right)) { - assert (IdOf(left) != IdOf(right)); + assert(IdOf(left) != IdOf(right)); return IdOf(left) > IdOf(right); } return WeightOf(left) > WeightOf(right); @@ -316,8 +293,7 @@ class HuffmanCodec { // Prints subtree (helper function used by PrintTree). void PrintTreeInternal(std::ostream& out, uint32_t node, size_t depth) const { - if (!node) - return; + if (!node) return; const size_t kTextFieldWidth = 7; @@ -348,7 +324,7 @@ class HuffmanCodec { void CreateEncodingTable() { struct Context { Context(uint32_t in_node, uint64_t in_bits, size_t in_depth) - : node(in_node), bits(in_bits), depth(in_depth) {} + : node(in_node), bits(in_bits), depth(in_depth) {} uint32_t node; // Huffman tree depth cannot exceed 64 as histogramm counts are expected // to be positive and limited by numeric_limits::max(). @@ -373,8 +349,7 @@ class HuffmanCodec { assert(insertion_result.second); (void)insertion_result; } else { - if (LeftOf(node)) - queue.emplace(LeftOf(node), bits, depth + 1); + if (LeftOf(node)) queue.emplace(LeftOf(node), bits, depth + 1); if (RightOf(node)) queue.emplace(RightOf(node), bits | (1ULL << depth), depth + 1); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist.h index 68dc641bdf2bfff45869a27be271bc18b177ed70..c4287d248f916280b8f89b0c1b6847c7eee53906 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist.h @@ -122,6 +122,17 @@ class IntrusiveList { return iterator(first_node); } + // Define standard iterator types needs so this class can be + // used with . + using iterator_category = std::bidirectional_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = T; + using pointer = T*; + using const_pointer = const T*; + using reference = T&; + using const_reference = const T&; + using size_type = size_t; + protected: iterator_template() = delete; inline iterator_template(T* node) { node_ = node; } @@ -160,6 +171,9 @@ class IntrusiveList { // Returns true if the list is empty. bool empty() const; + // Makes the current list empty. + inline void clear(); + // Returns references to the first or last element in the list. It is an // error to call these functions on an empty list. NodeType& front(); @@ -167,6 +181,12 @@ class IntrusiveList { const NodeType& front() const; const NodeType& back() const; + // Transfers [|first|, |last|) from |other| into the list at |where|. + // + // If |other| is |this|, no change is made. + void Splice(iterator where, IntrusiveList* other, iterator first, + iterator last); + protected: // Doing a deep copy of the list does not make sense if the list does not own // the data. It is not clear who will own the newly created data. Making @@ -202,9 +222,7 @@ IntrusiveList::IntrusiveList(IntrusiveList&& list) : sentinel_() { template IntrusiveList::~IntrusiveList() { - while (!empty()) { - front().RemoveFromList(); - } + clear(); } template @@ -260,6 +278,13 @@ bool IntrusiveList::empty() const { return sentinel_.NextNode() == nullptr; } +template +void IntrusiveList::clear() { + while (!empty()) { + front().RemoveFromList(); + } +} + template NodeType& IntrusiveList::front() { NodeType* node = sentinel_.NextNode(); @@ -288,6 +313,29 @@ const NodeType& IntrusiveList::back() const { return *node; } +template +void IntrusiveList::Splice(iterator where, + IntrusiveList* other, + iterator first, iterator last) { + if (first == last) return; + if (other == this) return; + + NodeType* first_prev = first.node_->previous_node_; + NodeType* where_next = where.node_->next_node_; + + // Attach first. + where.node_->next_node_ = first.node_; + first.node_->previous_node_ = where.node_; + + // Attach last. + where_next->previous_node_ = last.node_->previous_node_; + last.node_->previous_node_->next_node_ = where_next; + + // Fixup other. + first_prev->next_node_ = last.node_; + last.node_->previous_node_ = first_prev; +} + template void IntrusiveList::Check(NodeType* start) { int sentinel_count = 0; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist_node.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist_node.h index 342fb1dca548c58368b29ce09e232d8730d0501e..76ea302d72e68bc8b69db67723de4383a786f97e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist_node.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/ilist_node.h @@ -110,7 +110,7 @@ template inline IntrusiveNodeBase::IntrusiveNodeBase() : next_node_(nullptr), previous_node_(nullptr), is_sentinel_(false) {} -template +template inline IntrusiveNodeBase::IntrusiveNodeBase( const IntrusiveNodeBase&) { next_node_ = nullptr; @@ -118,7 +118,7 @@ inline IntrusiveNodeBase::IntrusiveNodeBase( is_sentinel_ = false; } -template +template inline IntrusiveNodeBase& IntrusiveNodeBase::operator=( const IntrusiveNodeBase&) { assert(!is_sentinel_); @@ -128,7 +128,7 @@ inline IntrusiveNodeBase& IntrusiveNodeBase::operator=( return *this; } -template +template inline IntrusiveNodeBase::IntrusiveNodeBase(IntrusiveNodeBase&& that) : next_node_(nullptr), previous_node_(nullptr), @@ -140,19 +140,19 @@ inline IntrusiveNodeBase::IntrusiveNodeBase(IntrusiveNodeBase&& that) that.ReplaceWith(this); } -template +template IntrusiveNodeBase::~IntrusiveNodeBase() { assert(is_sentinel_ || !IsInAList()); } -template +template IntrusiveNodeBase& IntrusiveNodeBase::operator=( IntrusiveNodeBase&& that) { that.ReplaceWith(this); return *this; } -template +template inline bool IntrusiveNodeBase::IsInAList() const { return next_node_ != nullptr; } @@ -199,7 +199,7 @@ template inline void IntrusiveNodeBase::RemoveFromList() { assert(!this->is_sentinel_ && "Sentinel nodes cannot be moved around."); assert(this->IsInAList() && - "Cannot remove a node from a list if it is not in a list."); + "Cannot remove a node from a list if it is not in a list."); this->next_node_->previous_node_ = this->previous_node_; this->previous_node_->next_node_ = this->next_node_; @@ -207,16 +207,16 @@ inline void IntrusiveNodeBase::RemoveFromList() { this->previous_node_ = nullptr; } -template +template void IntrusiveNodeBase::ReplaceWith(NodeType* target) { if (this->is_sentinel_) { assert(target->IsEmptyList() && - "If target is not an empty list, the nodes in that list would not " - "be linked to a sentinel."); + "If target is not an empty list, the nodes in that list would not " + "be linked to a sentinel."); } else { assert(IsInAList() && "The node being replaced must be in a list."); assert(!target->is_sentinel_ && - "Cannot turn a sentinel node into one that is not."); + "Cannot turn a sentinel node into one that is not."); } if (!this->IsEmptyList()) { @@ -245,13 +245,13 @@ void IntrusiveNodeBase::ReplaceWith(NodeType* target) { } } -template +template bool IntrusiveNodeBase::IsEmptyList() { if (next_node_ == this) { assert(is_sentinel_ && - "None sentinel nodes should never point to themselves."); + "None sentinel nodes should never point to themselves."); assert(previous_node_ == this && - "Inconsistency with the previous and next nodes."); + "Inconsistency with the previous and next nodes."); return true; } return false; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/move_to_front.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/move_to_front.h index efa79a75e47a7025ead8ed67fe5f62ae8b131aa9..de405dde46691a3aa0437e55a0d8af8fe1b2a3be 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/move_to_front.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/move_to_front.h @@ -52,7 +52,7 @@ namespace spvutils { template class MoveToFront { public: - explicit MoveToFront(size_t reserve_capacity = 128) { + explicit MoveToFront(size_t reserve_capacity = 4) { nodes_.reserve(reserve_capacity); // Create NIL node. @@ -73,7 +73,7 @@ class MoveToFront { // Computes 1-indexed rank of value in the move-to-front sequence and moves // the value to the front. Example: // Before the call: 4 8 2 1 7 - // RankFromValue(8) returns 1 + // RankFromValue(8) returns 2 // After the call: 8 4 2 1 7 // Returns true iff the value was found in the sequence. bool RankFromValue(const Val& value, uint32_t* rank); @@ -81,7 +81,7 @@ class MoveToFront { // Returns value corresponding to a 1-indexed rank in the move-to-front // sequence and moves the value to the front. Example: // Before the call: 4 8 2 1 7 - // ValueFromRank(1) returns 8 + // ValueFromRank(2) returns 8 // After the call: 8 4 2 1 7 // Returns true iff the rank is within bounds [1, GetSize()]. bool ValueFromRank(uint32_t rank, Val* value); @@ -94,16 +94,16 @@ class MoveToFront { bool HasValue(const Val& value) const; // Returns the number of elements in the move-to-front sequence. - uint32_t GetSize() const { - return SizeOf(root_); - } + uint32_t GetSize() const { return SizeOf(root_); } protected: // Internal tree data structure uses handles instead of pointers. Leaves and // root parent reference a singleton under handle 0. Although dereferencing // a null pointer is not possible, inappropriate access to handle 0 would - // cause an assertion. Handles are not garbage collected if value was deprecated - // with DeprecateValue(). But handles are recycled when a node is repositioned. + // cause an assertion. Handles are not garbage collected if value was + // deprecated + // with DeprecateValue(). But handles are recycled when a node is + // repositioned. // Internal tree data structure node. struct Node { @@ -125,7 +125,8 @@ class MoveToFront { }; // Creates node and sets correct values. Non-NIL nodes should be created only - // through this function. If the node with this value has been created previously + // through this function. If the node with this value has been created + // previously // and since orphaned, reuses the old node instead of creating a new one. uint32_t CreateNode(uint32_t timestamp, const Val& value) { uint32_t handle = static_cast(nodes_.size()); @@ -137,7 +138,8 @@ class MoveToFront { node.timestamp = timestamp; node.value = value; node.size = 1; - // Non-NIL nodes start with height 1 because their NIL children are leaves. + // Non-NIL nodes start with height 1 because their NIL children are + // leaves. node.height = 1; } else { // Reuse old node. @@ -157,24 +159,16 @@ class MoveToFront { // ParentOf(LeftestDescendentOf(RightOf(node))) // Returns value of the node referenced by |handle|. - Val ValueOf(uint32_t node) const { - return nodes_.at(node).value; - } + Val ValueOf(uint32_t node) const { return nodes_.at(node).value; } // Returns left child of |node|. - uint32_t LeftOf(uint32_t node) const { - return nodes_.at(node).left; - } + uint32_t LeftOf(uint32_t node) const { return nodes_.at(node).left; } // Returns right child of |node|. - uint32_t RightOf(uint32_t node) const { - return nodes_.at(node).right; - } + uint32_t RightOf(uint32_t node) const { return nodes_.at(node).right; } // Returns parent of |node|. - uint32_t ParentOf(uint32_t node) const { - return nodes_.at(node).parent; - } + uint32_t ParentOf(uint32_t node) const { return nodes_.at(node).parent; } // Returns timestamp of |node|. uint32_t TimestampOf(uint32_t node) const { @@ -183,14 +177,10 @@ class MoveToFront { } // Returns size of |node|. - uint32_t SizeOf(uint32_t node) const { - return nodes_.at(node).size; - } + uint32_t SizeOf(uint32_t node) const { return nodes_.at(node).size; } // Returns height of |node|. - uint32_t HeightOf(uint32_t node) const { - return nodes_.at(node).height; - } + uint32_t HeightOf(uint32_t node) const { return nodes_.at(node).height; } // Returns mutable reference to value of |node|. Val& MutableValueOf(uint32_t node) { @@ -347,8 +337,7 @@ class MultiMoveToFront { // Removes |value| from all sequences which have it. void RemoveFromAll(const Val& value) { auto it = val_to_mtfs_.find(value); - if (it == val_to_mtfs_.end()) - return; + if (it == val_to_mtfs_.end()) return; auto& mtfs_containing_value = it->second; for (uint64_t mtf : mtfs_containing_value) { @@ -371,15 +360,12 @@ class MultiMoveToFront { } // Returns size of |mtf| sequence. - uint32_t GetSize(uint64_t mtf) { - return GetMtf(mtf).GetSize(); - } + uint32_t GetSize(uint64_t mtf) { return GetMtf(mtf).GetSize(); } // Promotes |value| in all sequences which have it. void Promote(const Val& value) { const auto it = val_to_mtfs_.find(value); - if (it == val_to_mtfs_.end()) - return; + if (it == val_to_mtfs_.end()) return; const auto& mtfs_containing_value = it->second; for (uint64_t mtf : mtfs_containing_value) { @@ -426,8 +412,7 @@ class MultiMoveToFront { template bool MoveToFront::Insert(const Val& value) { auto it = value_to_node_.find(value); - if (it != value_to_node_.end() && IsInTree(it->second)) - return false; + if (it != value_to_node_.end() && IsInTree(it->second)) return false; const uint32_t old_size = GetSize(); (void)old_size; @@ -445,14 +430,11 @@ bool MoveToFront::Insert(const Val& value) { template bool MoveToFront::Remove(const Val& value) { auto it = value_to_node_.find(value); - if (it == value_to_node_.end()) - return false; + if (it == value_to_node_.end()) return false; - if (!IsInTree(it->second)) - return false; + if (!IsInTree(it->second)) return false; - if (last_accessed_value_ == value) - last_accessed_value_valid_ = false; + if (last_accessed_value_ == value) last_accessed_value_valid_ = false; const uint32_t orphan = RemoveNode(it->second); (void)orphan; @@ -494,8 +476,7 @@ bool MoveToFront::RankFromValue(const Val& value, uint32_t* rank) { uint32_t node = target; *rank = 1 + SizeOf(LeftOf(node)); while (node) { - if (IsRightChild(node)) - *rank += 1 + SizeOf(LeftOf(ParentOf(node))); + if (IsRightChild(node)) *rank += 1 + SizeOf(LeftOf(ParentOf(node))); node = ParentOf(node); } @@ -532,8 +513,7 @@ bool MoveToFront::Promote(const Val& value) { } const uint32_t old_size = GetSize(); - if (old_size == 1) - return ValueOf(root_) == value; + if (old_size == 1) return ValueOf(root_) == value; const auto it = value_to_node_.find(value); if (it == value_to_node_.end()) { @@ -629,7 +609,7 @@ void MoveToFront::InsertNode(uint32_t node) { // Will determine if |node| will become the right or left child after // insertion (but before balancing). - bool right_child; + bool right_child = true; // Find the node which will become |node|'s parent after insertion // (but before balancing). @@ -663,8 +643,7 @@ void MoveToFront::InsertNode(uint32_t node) { // Added node to the right subtree. if (parent_balance > 1) { // Parent is right heavy, rotate left. - if (BalanceOf(node) < 0) - RotateRight(node); + if (BalanceOf(node) < 0) RotateRight(node); parent = RotateLeft(parent); } else if (parent_balance == 0 || parent_balance == -1) { // Parent is balanced or left heavy, no need to balance further. @@ -674,8 +653,7 @@ void MoveToFront::InsertNode(uint32_t node) { // Added node to the left subtree. if (parent_balance < -1) { // Parent is left heavy, rotate right. - if (BalanceOf(node) > 0) - RotateLeft(node); + if (BalanceOf(node) > 0) RotateLeft(node); parent = RotateRight(parent); } else if (parent_balance == 0 || parent_balance == 1) { // Parent is balanced or right heavy, no need to balance further. @@ -695,9 +673,11 @@ template uint32_t MoveToFront::RemoveNode(uint32_t node) { if (LeftOf(node) && RightOf(node)) { // If |node| has two children, then use another node as scapegoat and swap - // their contents. We pick the scapegoat on the side of the tree which has more nodes. - const uint32_t scapegoat = SizeOf(LeftOf(node)) >= SizeOf(RightOf(node)) ? - RightestDescendantOf(LeftOf(node)) : LeftestDescendantOf(RightOf(node)); + // their contents. We pick the scapegoat on the side of the tree which has + // more nodes. + const uint32_t scapegoat = SizeOf(LeftOf(node)) >= SizeOf(RightOf(node)) + ? RightestDescendantOf(LeftOf(node)) + : LeftestDescendantOf(RightOf(node)); assert(scapegoat); std::swap(MutableValueOf(node), MutableValueOf(scapegoat)); std::swap(MutableTimestampOf(node), MutableTimestampOf(scapegoat)); @@ -713,8 +693,7 @@ uint32_t MoveToFront::RemoveNode(uint32_t node) { uint32_t child = RightOf(node) ? RightOf(node) : LeftOf(node); // Orphan |node| and reconnect parent and child. - if (child) - MutableParentOf(child) = parent; + if (child) MutableParentOf(child) = parent; if (parent) { if (LeftOf(parent) == node) @@ -729,8 +708,7 @@ uint32_t MoveToFront::RemoveNode(uint32_t node) { UpdateNode(node); const uint32_t orphan = node; - if (root_ == node) - root_ = child; + if (root_ == node) root_ = child; // Removal is finished. Start the balancing process. bool needs_rebalancing = true; @@ -751,8 +729,7 @@ uint32_t MoveToFront::RemoveNode(uint32_t node) { if (parent_balance < -1) { // Parent is left heavy, rotate right. const uint32_t sibling = LeftOf(parent); - if (BalanceOf(sibling) > 0) - RotateLeft(sibling); + if (BalanceOf(sibling) > 0) RotateLeft(sibling); parent = RotateRight(parent); } } else { @@ -760,8 +737,7 @@ uint32_t MoveToFront::RemoveNode(uint32_t node) { if (parent_balance > 1) { // Parent is right heavy, rotate left. const uint32_t sibling = RightOf(parent); - if (BalanceOf(sibling) < 0) - RotateRight(sibling); + if (BalanceOf(sibling) < 0) RotateRight(sibling); parent = RotateLeft(parent); } } @@ -784,8 +760,7 @@ uint32_t MoveToFront::RotateLeft(const uint32_t node) { // LeftOf(pivot) gets attached to node in place of pivot. MutableRightOf(node) = LeftOf(pivot); - if (RightOf(node)) - MutableParentOf(RightOf(node)) = node; + if (RightOf(node)) MutableParentOf(RightOf(node)) = node; // Pivot gets attached to ParentOf(node) in place of node. MutableParentOf(pivot) = ParentOf(node); @@ -815,8 +790,7 @@ uint32_t MoveToFront::RotateRight(const uint32_t node) { // RightOf(pivot) gets attached to node in place of pivot. MutableLeftOf(node) = RightOf(pivot); - if (LeftOf(node)) - MutableParentOf(LeftOf(node)) = node; + if (LeftOf(node)) MutableParentOf(LeftOf(node)) = node; // Pivot gets attached to ParentOf(node) in place of node. MutableParentOf(pivot) = ParentOf(node); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.cpp index c71b31154bca80fa9772ce0ab48c4ebd6cdd5a03..bb87b3dad419c2a145e223cd852c33bb939b1079 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.cpp @@ -50,7 +50,7 @@ class ErrorMsgStream { // destructor is called. std::string* error_msg_sink_; }; -} +} // namespace EncodeNumberStatus ParseAndEncodeIntegerNumber( const char* text, const NumberType& type, @@ -68,8 +68,8 @@ EncodeNumberStatus ParseAndEncodeIntegerNumber( const uint32_t bit_width = AssumedBitWidth(type); if (bit_width > 64) { - ErrorMsgStream(error_msg) << "Unsupported " << bit_width - << "-bit integer literals"; + ErrorMsgStream(error_msg) + << "Unsupported " << bit_width << "-bit integer literals"; return EncodeNumberStatus::kUnsupported; } @@ -182,8 +182,8 @@ EncodeNumberStatus ParseAndEncodeFloatingPointNumber( default: break; } - ErrorMsgStream(error_msg) << "Unsupported " << bit_width - << "-bit float literals"; + ErrorMsgStream(error_msg) + << "Unsupported " << bit_width << "-bit float literals"; return EncodeNumberStatus::kUnsupported; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.h index 5b7922b893ea2e8c283173f889ba00808acc7e08..2a9bd6d466d6400a889d6caec03c9fca85296f1b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/parse_number.h @@ -171,7 +171,7 @@ bool ParseNumber(const char* text, T* value_pointer) { static_assert(sizeof(T) > 1, "Single-byte types are not supported in this parse method"); - if (!text) return false; + if (!text) return false; std::istringstream text_stream(text); // Allow both decimal and hex input for integers. // It also allows octal input, but we don't care about that case. diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..722bc6c41aef988b73abaab0896e0f20bcc0ae27 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.cpp @@ -0,0 +1,100 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "util/timer.h" + +#include +#include +#include +#include +#include + +namespace spvutils { + +#if defined(SPIRV_TIMER_ENABLED) + +void PrintTimerDescription(std::ostream* out, bool measure_mem_usage) { + if (out) { + *out << std::setw(30) << "PASS name" << std::setw(12) << "CPU time" + << std::setw(12) << "WALL time" << std::setw(12) << "USR time" + << std::setw(12) << "SYS time"; + if (measure_mem_usage) { + *out << std::setw(12) << "RSS delta" << std::setw(16) << "PGFault delta"; + } + *out << std::endl; + } +} + +// Do not change the order of invoking system calls. We want to make CPU/Wall +// time correct as much as possible. Calling functions to get CPU/Wall time must +// closely surround the target code of measuring. +void Timer::Start() { + if (report_stream_) { + if (getrusage(RUSAGE_SELF, &usage_before_) == -1) + usage_status_ |= kGetrusageFailed; + if (clock_gettime(CLOCK_MONOTONIC, &wall_before_) == -1) + usage_status_ |= kClockGettimeWalltimeFailed; + if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &cpu_before_) == -1) + usage_status_ |= kClockGettimeCPUtimeFailed; + } +} + +// The order of invoking system calls is important with the same reason as +// Timer::Start(). +void Timer::Stop() { + if (report_stream_ && usage_status_ == kSucceeded) { + if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &cpu_after_) == -1) + usage_status_ |= kClockGettimeCPUtimeFailed; + if (clock_gettime(CLOCK_MONOTONIC, &wall_after_) == -1) + usage_status_ |= kClockGettimeWalltimeFailed; + if (getrusage(RUSAGE_SELF, &usage_after_) == -1) + usage_status_ = kGetrusageFailed; + } +} + +void Timer::Report(const char* tag) { + if (!report_stream_) return; + + report_stream_->precision(2); + *report_stream_ << std::fixed << std::setw(30) << tag; + + if (usage_status_ & kClockGettimeCPUtimeFailed) + *report_stream_ << std::setw(12) << "Failed"; + else + *report_stream_ << std::setw(12) << CPUTime(); + + if (usage_status_ & kClockGettimeWalltimeFailed) + *report_stream_ << std::setw(12) << "Failed"; + else + *report_stream_ << std::setw(12) << WallTime(); + + if (usage_status_ & kGetrusageFailed) { + *report_stream_ << std::setw(12) << "Failed" << std::setw(12) << "Failed"; + if (measure_mem_usage_) { + *report_stream_ << std::setw(12) << "Failed" << std::setw(12) << "Failed"; + } + } else { + *report_stream_ << std::setw(12) << UserTime() << std::setw(12) + << SystemTime(); + if (measure_mem_usage_) { + *report_stream_ << std::fixed << std::setw(12) << RSS() << std::setw(16) + << PageFault(); + } + } + *report_stream_ << std::endl; +} + +#endif // defined(SPIRV_TIMER_ENABLED) + +} // namespace spvutils diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.h b/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.h new file mode 100644 index 0000000000000000000000000000000000000000..c6af24e7a053fa98235ea4fe442a68e81382711d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/util/timer.h @@ -0,0 +1,387 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Contains utils for getting resource utilization + +#ifndef LIBSPIRV_UTIL_TIMER_H_ +#define LIBSPIRV_UTIL_TIMER_H_ + +#if defined(SPIRV_TIMER_ENABLED) + +#include +#include +#include + +// A macro to call spvutils::PrintTimerDescription(std::ostream*, bool). The +// first argument must be given as std::ostream*. If it is NULL, the function +// does nothing. Otherwise, it prints resource types measured by Timer class. +// The second is optional and if it is true, the function also prints resource +// type fields related to memory. Otherwise, it does not print memory related +// fields. Its default is false. In usual, this must be placed before calling +// Timer::Report() to inform what those fields printed by Timer::Report() +// indicate (or spvutils::PrintTimerDescription() must be used instead). +#define SPIRV_TIMER_DESCRIPTION(...) \ + spvutils::PrintTimerDescription(__VA_ARGS__) + +// Creates an object of ScopedTimer to measure the resource utilization for the +// scope surrounding it as the following example: +// +// { // <-- beginning of this scope +// +// /* ... code out of interest ... */ +// +// SPIRV_TIMER_SCOPED(std::cout, tag); +// +// /* ... lines of code that we want to know its resource usage ... */ +// +// } // <-- end of this scope. The destructor of ScopedTimer prints tag and +// the resource utilization to std::cout. +#define SPIRV_TIMER_SCOPED(...) \ + spvutils::ScopedTimer timer##__LINE__(__VA_ARGS__) + +namespace spvutils { + +// Prints the description of resource types measured by Timer class. If |out| is +// NULL, it does nothing. Otherwise, it prints resource types. The second is +// optional and if it is true, the function also prints resource type fields +// related to memory. Its default is false. In usual, this must be placed before +// calling Timer::Report() to inform what those fields printed by +// Timer::Report() indicate. +void PrintTimerDescription(std::ostream*, bool = false); + +// Status of Timer. kGetrusageFailed means it failed in calling getrusage(). +// kClockGettimeWalltimeFailed means it failed in getting wall time when calling +// clock_gettime(). kClockGettimeCPUtimeFailed means it failed in getting CPU +// time when calling clock_gettime(). +enum UsageStatus { + kSucceeded = 0, + kGetrusageFailed = 1 << 0, + kClockGettimeWalltimeFailed = 1 << 1, + kClockGettimeCPUtimeFailed = 1 << 2, +}; + +// Timer measures the resource utilization for a range of code. The resource +// utilization consists of CPU time (i.e., process time), WALL time (elapsed +// time), USR time, SYS time, RSS delta, and the delta of the number of page +// faults. RSS delta and the delta of the number of page faults are measured +// only when |measure_mem_usage| given to the constructor is true. This class +// should be used as the following example: +// +// spvutils::Timer timer(std::cout); +// timer.Start(); // <-- set |usage_before_|, |wall_before_|, +// and |cpu_before_| +// +// /* ... lines of code that we want to know its resource usage ... */ +// +// timer.Stop(); // <-- set |cpu_after_|, |wall_after_|, and +// |usage_after_| +// timer.Report(tag); // <-- print tag and the resource utilization to +// std::cout. +class Timer { + public: + Timer(std::ostream* out, bool measure_mem_usage = false) + : report_stream_(out), + usage_status_(kSucceeded), + measure_mem_usage_(measure_mem_usage) {} + + // Sets |usage_before_|, |wall_before_|, and |cpu_before_| as results of + // getrusage(), clock_gettime() for the wall time, and clock_gettime() for the + // CPU time respectively. Note that this method erases all previous state of + // |usage_before_|, |wall_before_|, |cpu_before_|. + virtual void Start(); + + // Sets |cpu_after_|, |wall_after_|, and |usage_after_| as results of + // clock_gettime() for the wall time, and clock_gettime() for the CPU time, + // getrusage() respectively. Note that this method erases all previous state + // of |cpu_after_|, |wall_after_|, |usage_after_|. + virtual void Stop(); + + // If |report_stream_| is NULL, it does nothing. Otherwise, it prints the + // resource utilization (i.e., CPU/WALL/USR/SYS time, RSS delta) between the + // time of calling Timer::Start() and the time of calling Timer::Stop(). If we + // cannot get a resource usage because of failures, it prints "Failed" instead + // for the resource. + void Report(const char* tag); + + // Returns the measured CPU Time (i.e., process time) for a range of code + // execution. If kClockGettimeCPUtimeFailed is set by the failure of calling + // clock_gettime(), it returns -1. + virtual double CPUTime() { + if (usage_status_ & kClockGettimeCPUtimeFailed) return -1; + return TimeDifference(cpu_before_, cpu_after_); + } + + // Returns the measured Wall Time (i.e., elapsed time) for a range of code + // execution. If kClockGettimeWalltimeFailed is set by the failure of + // calling clock_gettime(), it returns -1. + virtual double WallTime() { + if (usage_status_ & kClockGettimeWalltimeFailed) return -1; + return TimeDifference(wall_before_, wall_after_); + } + + // Returns the measured USR Time for a range of code execution. If + // kGetrusageFailed is set because of the failure of calling getrusage(), it + // returns -1. + virtual double UserTime() { + if (usage_status_ & kGetrusageFailed) return -1; + return TimeDifference(usage_before_.ru_utime, usage_after_.ru_utime); + } + + // Returns the measured SYS Time for a range of code execution. If + // kGetrusageFailed is set because of the failure of calling getrusage(), it + // returns -1. + virtual double SystemTime() { + if (usage_status_ & kGetrusageFailed) return -1; + return TimeDifference(usage_before_.ru_stime, usage_after_.ru_stime); + } + + // Returns the measured RSS delta for a range of code execution. If + // kGetrusageFailed is set because of the failure of calling getrusage(), it + // returns -1. + virtual long RSS() const { + if (usage_status_ & kGetrusageFailed) return -1; + return usage_after_.ru_maxrss - usage_before_.ru_maxrss; + } + + // Returns the measured the delta of the number of page faults for a range of + // code execution. If kGetrusageFailed is set because of the failure of + // calling getrusage(), it returns -1. + virtual long PageFault() const { + if (usage_status_ & kGetrusageFailed) return -1; + return (usage_after_.ru_minflt - usage_before_.ru_minflt) + + (usage_after_.ru_majflt - usage_before_.ru_majflt); + } + + virtual ~Timer() {} + + private: + // Returns the time gap between |from| and |to| in seconds. + static double TimeDifference(const timeval& from, const timeval& to) { + assert((to.tv_sec > from.tv_sec) || + (to.tv_sec == from.tv_sec && to.tv_usec >= from.tv_usec)); + return static_cast(to.tv_sec - from.tv_sec) + + static_cast(to.tv_usec - from.tv_usec) * .000001; + } + + // Returns the time gap between |from| and |to| in seconds. + static double TimeDifference(const timespec& from, const timespec& to) { + assert((to.tv_sec > from.tv_sec) || + (to.tv_sec == from.tv_sec && to.tv_nsec >= from.tv_nsec)); + return static_cast(to.tv_sec - from.tv_sec) + + static_cast(to.tv_nsec - from.tv_nsec) * .000000001; + } + + // Output stream to print out the resource utilization. If it is NULL, + // Report() does nothing. + std::ostream* report_stream_; + + // Status to stop measurement if a system call returns an error. + unsigned usage_status_; + + // Variable to save the result of clock_gettime(CLOCK_PROCESS_CPUTIME_ID) when + // Timer::Start() is called. It is used as the base status of CPU time. + timespec cpu_before_; + + // Variable to save the result of clock_gettime(CLOCK_MONOTONIC) when + // Timer::Start() is called. It is used as the base status of WALL time. + timespec wall_before_; + + // Variable to save the result of getrusage() when Timer::Start() is called. + // It is used as the base status of USR time, SYS time, and RSS. + rusage usage_before_; + + // Variable to save the result of clock_gettime(CLOCK_PROCESS_CPUTIME_ID) when + // Timer::Stop() is called. It is used as the last status of CPU time. The + // resouce usage is measured by subtracting |cpu_before_| from it. + timespec cpu_after_; + + // Variable to save the result of clock_gettime(CLOCK_MONOTONIC) when + // Timer::Stop() is called. It is used as the last status of WALL time. The + // resouce usage is measured by subtracting |wall_before_| from it. + timespec wall_after_; + + // Variable to save the result of getrusage() when Timer::Stop() is called. It + // is used as the last status of USR time, SYS time, and RSS. Those resouce + // usages are measured by subtracting |usage_before_| from it. + rusage usage_after_; + + // If true, Timer reports the memory usage information too. Otherwise, Timer + // reports only USR time, WALL time, SYS time. + bool measure_mem_usage_; +}; + +// The purpose of ScopedTimer is to measure the resource utilization for a +// scope. Simply creating a local variable of ScopedTimer will call +// Timer::Start() and it calls Timer::Stop() and Timer::Report() at the end of +// the scope by its destructor. When we use this class, we must choose the +// proper Timer class (for class TimerType template) in advance. This class +// should be used as the following example: +// +// { // <-- beginning of this scope +// +// /* ... code out of interest ... */ +// +// spvutils::ScopedTimer scopedtimer(std::cout, tag); +// +// /* ... lines of code that we want to know its resource usage ... */ +// +// } // <-- end of this scope. The destructor of ScopedTimer prints tag and +// the resource utilization to std::cout. +// +// The template is used to choose a Timer class. Currently, +// only options for the Timer class are Timer and MockTimer in the unit test. +template +class ScopedTimer { + public: + ScopedTimer(std::ostream* out, const char* tag, + bool measure_mem_usage = false) + : timer(new TimerType(out, measure_mem_usage)), tag_(tag) { + timer->Start(); + } + + // At the end of the scope surrounding the instance of this class, this + // destructor saves the last status of resource usage and reports it. + virtual ~ScopedTimer() { + timer->Stop(); + timer->Report(tag_); + delete timer; + } + + private: + // Actual timer that measures the resource utilization. It must be an instance + // of Timer class if there is no special reason to use other class. + TimerType* timer; + + // A tag that will be printed in front of the trace reported by Timer class. + const char* tag_; +}; + +// CumulativeTimer is the same as Timer class, but it supports a cumulative +// measurement as the following example: +// +// CumulativeTimer *ctimer = new CumulativeTimer(std::cout); +// ctimer->Start(); +// +// /* ... lines of code that we want to know its resource usage ... */ +// +// ctimer->Stop(); +// +// /* ... code out of interest ... */ +// +// ctimer->Start(); +// +// /* ... lines of code that we want to know its resource usage ... */ +// +// ctimer->Stop(); +// ctimer->Report(tag); +// delete ctimer; +// +class CumulativeTimer : public Timer { + public: + CumulativeTimer(std::ostream* out, bool measure_mem_usage = false) + : Timer(out, measure_mem_usage), + cpu_time_(0), + wall_time_(0), + usr_time_(0), + sys_time_(0), + rss_(0), + pgfaults_(0) {} + + // If we cannot get a resource usage because of failures, it sets -1 for the + // resource usage. + void Stop() override { + Timer::Stop(); + + if (cpu_time_ >= 0 && Timer::CPUTime() >= 0) + cpu_time_ += Timer::CPUTime(); + else + cpu_time_ = -1; + + if (wall_time_ >= 0 && Timer::WallTime() >= 0) + wall_time_ += Timer::WallTime(); + else + wall_time_ = -1; + + if (usr_time_ >= 0 && Timer::UserTime() >= 0) + usr_time_ += Timer::UserTime(); + else + usr_time_ = -1; + + if (sys_time_ >= 0 && Timer::SystemTime() >= 0) + sys_time_ += Timer::SystemTime(); + else + sys_time_ = -1; + + if (rss_ >= 0 && Timer::RSS() >= 0) + rss_ += Timer::RSS(); + else + rss_ = -1; + + if (pgfaults_ >= 0 && Timer::PageFault() >= 0) + pgfaults_ += Timer::PageFault(); + else + pgfaults_ = -1; + } + + // Returns the cumulative CPU Time (i.e., process time) for a range of code + // execution. + double CPUTime() override { return cpu_time_; } + + // Returns the cumulative Wall Time (i.e., elapsed time) for a range of code + // execution. + double WallTime() override { return wall_time_; } + + // Returns the cumulative USR Time for a range of code execution. + double UserTime() override { return usr_time_; } + + // Returns the cumulative SYS Time for a range of code execution. + double SystemTime() override { return sys_time_; } + + // Returns the cumulative RSS delta for a range of code execution. + long RSS() const override { return rss_; } + + // Returns the cumulative delta of number of page faults for a range of code + // execution. + long PageFault() const override { return pgfaults_; } + + private: + // Variable to save the cumulative CPU time (i.e., process time). + double cpu_time_; + + // Variable to save the cumulative wall time (i.e., elapsed time). + double wall_time_; + + // Variable to save the cumulative user time. + double usr_time_; + + // Variable to save the cumulative system time. + double sys_time_; + + // Variable to save the cumulative RSS delta. + long rss_; + + // Variable to save the cumulative delta of the number of page faults. + long pgfaults_; +}; + +} // namespace spvutils + +#else // defined(SPIRV_TIMER_ENABLED) + +#define SPIRV_TIMER_DESCRIPTION(...) +#define SPIRV_TIMER_SCOPED(...) + +#endif // defined(SPIRV_TIMER_ENABLED) + +#endif // LIBSPIRV_UTIL_TIMER_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.cpp index 0bfc4f1295fccbe47896931ff712e276a099b4a9..a0b10fa71e16a48d1dd1f11ec4dee4575dbfe786 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.cpp @@ -118,7 +118,7 @@ const BasicBlock::DominatorIterator BasicBlock::pdom_begin() const { BasicBlock::DominatorIterator BasicBlock::pdom_begin() { return DominatorIterator( - this, [](const BasicBlock* b) { return b->immediate_post_dominator(); }); + this, [](const BasicBlock* b) { return b->immediate_post_dominator(); }); } const BasicBlock::DominatorIterator BasicBlock::pdom_end() const { diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.h index 81f0f6663a56cc77a82bbd18b47a40650ddede66..c2a5bb8fde3f3ff5f57a78de99642dda0e71b0a9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/basic_block.h @@ -15,7 +15,7 @@ #ifndef LIBSPIRV_VAL_BASICBLOCK_H_ #define LIBSPIRV_VAL_BASICBLOCK_H_ -#include "spirv/1.2/spirv.h" +#include "latest_version_spirv_header.h" #include @@ -108,7 +108,8 @@ class BasicBlock { void RegisterBranchInstruction(SpvOp branch_instruction); /// Adds @p next BasicBlocks as successors of this BasicBlock - void RegisterSuccessors(const std::vector& next = std::vector()); + void RegisterSuccessors( + const std::vector& next = std::vector()); /// Returns true if the id of the BasicBlock matches bool operator==(const BasicBlock& other) const { return other.id_ == id_; } @@ -220,6 +221,6 @@ bool operator==(const BasicBlock::DominatorIterator& lhs, bool operator!=(const BasicBlock::DominatorIterator& lhs, const BasicBlock::DominatorIterator& rhs); -} /// namespace libspirv +} // namespace libspirv #endif /// LIBSPIRV_VAL_BASICBLOCK_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.cpp index 4270063faca8b2f17318765482e335ff6246204c..c5f01dfb6b877267af144e80d4a34d3259dbfa27 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.cpp @@ -19,9 +19,8 @@ namespace libspirv { -Construct::Construct(ConstructType construct_type, - BasicBlock* entry, BasicBlock* exit, - std::vector constructs) +Construct::Construct(ConstructType construct_type, BasicBlock* entry, + BasicBlock* exit, std::vector constructs) : type_(construct_type), corresponding_constructs_(constructs), entry_block_(entry), @@ -38,11 +37,16 @@ std::vector& Construct::corresponding_constructs() { bool ValidateConstructSize(ConstructType type, size_t size) { switch (type) { - case ConstructType::kSelection: return size == 0; - case ConstructType::kContinue: return size == 1; - case ConstructType::kLoop: return size == 1; - case ConstructType::kCase: return size >= 1; - default: assert(1 == 0 && "Type not defined"); + case ConstructType::kSelection: + return size == 0; + case ConstructType::kContinue: + return size == 1; + case ConstructType::kLoop: + return size == 1; + case ConstructType::kCase: + return size >= 1; + default: + assert(1 == 0 && "Type not defined"); } return false; } @@ -60,4 +64,4 @@ const BasicBlock* Construct::exit_block() const { return exit_block_; } BasicBlock* Construct::exit_block() { return exit_block_; } void Construct::set_exit(BasicBlock* block) { exit_block_ = block; } -} /// namespace libspirv +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.h index bca87d6351927ec6f04748ddecd296766eaf78b2..594d8d14b6aed10ecc4f3ac35daea26e38a49f2c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/construct.h @@ -127,6 +127,6 @@ class Construct { BasicBlock* exit_block_; }; -} /// namespace libspirv +} // namespace libspirv #endif /// LIBSPIRV_VAL_CONSTRUCT_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/decoration.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/decoration.h index a6d7ff955e45af3d66046c3f2be4ff24c31c9473..8d2899157d0485644f103cd5c9eb1566e6c2b435 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/decoration.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/decoration.h @@ -15,9 +15,12 @@ #ifndef LIBSPIRV_VAL_DECORATION_H_ #define LIBSPIRV_VAL_DECORATION_H_ +#include #include #include +#include "latest_version_spirv_header.h" + namespace libspirv { // An object of this class represents a specific decoration including its @@ -60,9 +63,7 @@ class Decoration { : dec_type_(t), params_(parameters), struct_member_index_(member_index) {} void set_struct_member_index(uint32_t index) { struct_member_index_ = index; } - int struct_member_index() { return struct_member_index_; } int struct_member_index() const { return struct_member_index_; } - SpvDecoration dec_type() { return dec_type_; } SpvDecoration dec_type() const { return dec_type_; } std::vector& params() { return params_; } const std::vector& params() const { return params_; } @@ -84,4 +85,3 @@ class Decoration { } // namespace libspirv #endif /// LIBSPIRV_VAL_DECORATION_H_ - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.cpp index 42f7ec153d305841dab8a948d4a1783b6f009a44..7f49ad0c293a0f76827f3a6e2dcea1efa9aec987 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.cpp @@ -17,14 +17,15 @@ #include #include -#include +#include #include +#include #include +#include "cfa.h" #include "val/basic_block.h" #include "val/construct.h" #include "validate.h" -#include "cfa.h" using std::ignore; using std::list; @@ -275,14 +276,10 @@ void Function::ComputeAugmentedCFG() { auto succ_func = [](const BasicBlock* b) { return b->successors(); }; auto pred_func = [](const BasicBlock* b) { return b->predecessors(); }; spvtools::CFA::ComputeAugmentedCFG( - ordered_blocks_, - &pseudo_entry_block_, - &pseudo_exit_block_, - &augmented_successors_map_, - &augmented_predecessors_map_, - succ_func, - pred_func); -}; + ordered_blocks_, &pseudo_entry_block_, &pseudo_exit_block_, + &augmented_successors_map_, &augmented_predecessors_map_, succ_func, + pred_func); +} Construct& Function::AddConstruct(const Construct& new_construct) { cfg_constructs_.push_back(new_construct); @@ -352,4 +349,41 @@ int Function::GetBlockDepth(BasicBlock* bb) { return block_depth_[bb]; } -} /// namespace libspirv +void Function::RegisterExecutionModelLimitation(SpvExecutionModel model, + const std::string& message) { + execution_model_limitations_.push_back( + [model, message](SpvExecutionModel in_model, std::string* out_message) { + if (model != in_model) { + if (out_message) { + *out_message = message; + } + return false; + } + return true; + }); +} + +bool Function::IsCompatibleWithExecutionModel(SpvExecutionModel model, + std::string* reason) const { + bool return_value = true; + std::stringstream ss_reason; + + for (const auto& is_compatible : execution_model_limitations_) { + std::string message; + if (!is_compatible(model, &message)) { + if (!reason) return false; + return_value = false; + if (!message.empty()) { + ss_reason << message << "\n"; + } + } + } + + if (!return_value && reason) { + *reason = ss_reason.str(); + } + + return return_value; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.h index 8baeb33fe2dd5423b66f37a66cd307bf37df038b..1984654f0d8b6c4196ac69cd04478eb62c2547bf 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/function.h @@ -17,12 +17,14 @@ #include #include +#include +#include #include #include #include +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" #include "val/basic_block.h" #include "val/construct.h" @@ -183,7 +185,8 @@ class Function { GetBlocksFunction AugmentedCFGSuccessorsFunction() const; /// Like AugmentedCFGSuccessorsFunction, but also includes a forward edge from /// a loop header block to its continue target, if they are different blocks. - GetBlocksFunction AugmentedCFGSuccessorsFunctionIncludingHeaderToContinueEdge() const; + GetBlocksFunction + AugmentedCFGSuccessorsFunctionIncludingHeaderToContinueEdge() const; /// Returns the block predecessors function for the augmented CFG. GetBlocksFunction AugmentedCFGPredecessorsFunction() const; @@ -199,6 +202,33 @@ class Function { /// Prints a directed graph of the CFG of the current funciton void PrintBlocks() const; + /// Registers execution model limitation such as "Feature X is only available + /// with Execution Model Y". + void RegisterExecutionModelLimitation(SpvExecutionModel model, + const std::string& message); + + /// Registers execution model limitation with an |is_compatible| functor. + void RegisterExecutionModelLimitation( + std::function is_compatible) { + execution_model_limitations_.push_back(is_compatible); + } + + /// Returns true if the given execution model passes the limitations stored in + /// execution_model_limitations_. Returns false otherwise and fills optional + /// |reason| parameter. + bool IsCompatibleWithExecutionModel(SpvExecutionModel model, + std::string* reason = nullptr) const; + + // Inserts id to the set of functions called from this function. + void AddFunctionCallTarget(uint32_t call_target_id) { + function_call_targets_.insert(call_target_id); + } + + // Returns a set with ids of all functions called from this function. + const std::set function_call_targets() const { + return function_call_targets_; + } + private: // Computes the representation of the augmented CFG. // Populates augmented_successors_map_ and augmented_predecessors_map_. @@ -309,8 +339,18 @@ class Function { /// Stores the control flow nesting depth of a given basic block std::unordered_map block_depth_; + + /// Stores execution model limitations imposed by instructions used within the + /// function. The functor stored in the list return true if execution model + /// is compatible, false otherwise. If the functor returns false, it can also + /// optionally fill the string parameter with the reason for incompatibility. + std::list> + execution_model_limitations_; + + /// Stores ids of all functions called from this function. + std::set function_call_targets_; }; -} /// namespace libspirv +} // namespace libspirv #endif /// LIBSPIRV_VAL_FUNCTION_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/instruction.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/instruction.h index 31b463a67d98c564aa76aa87e7d9fb7058f89cda..96136320e4b6ef851b3d8eb2629d1842dec4cba2 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/instruction.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/instruction.h @@ -72,9 +72,7 @@ class Instruction { } /// Provides direct access to the stored C instruction object. - const spv_parsed_instruction_t& c_inst() const { - return inst_; - } + const spv_parsed_instruction_t& c_inst() const { return inst_; } // Casts the words belonging to the operand under |index| to |T| and returns. template @@ -123,6 +121,6 @@ struct hash { return hash()(inst.id()); } }; -} /// namespace std +} // namespace std #endif // LIBSPIRV_VAL_INSTRUCTION_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.cpp index 6374840944c77f463961722c5befdf0ca93c4877..c10c84edb397eecd0c08907bbf52ca25f7212d35 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.cpp @@ -15,6 +15,7 @@ #include "val/validation_state.h" #include +#include #include "opcode.h" #include "val/basic_block.h" @@ -73,6 +74,9 @@ bool IsInstructionInLayoutSection(ModuleLayoutSection layout, SpvOp op) { case SpvOpGroupDecorate: case SpvOpGroupMemberDecorate: case SpvOpDecorationGroup: + case SpvOpDecorateId: + case SpvOpDecorateStringGOOGLE: + case SpvOpMemberDecorateStringGOOGLE: out = true; break; default: break; @@ -215,15 +219,13 @@ bool ValidationState_t::IsDefinedId(uint32_t id) const { const Instruction* ValidationState_t::FindDef(uint32_t id) const { auto it = all_definitions_.find(id); - if (it == all_definitions_.end()) - return nullptr; + if (it == all_definitions_.end()) return nullptr; return it->second; } Instruction* ValidationState_t::FindDef(uint32_t id) { auto it = all_definitions_.find(id); - if (it == all_definitions_.end()) - return nullptr; + if (it == all_definitions_.end()) return nullptr; return it->second; } @@ -266,6 +268,12 @@ const Function& ValidationState_t::current_function() const { return module_functions_.back(); } +const Function* ValidationState_t::function(uint32_t id) const { + const auto it = id_to_function_.find(id); + if (it == id_to_function_.end()) return nullptr; + return it->second; +} + bool ValidationState_t::in_function_body() const { return in_function_; } bool ValidationState_t::in_block() const { @@ -283,11 +291,14 @@ void ValidationState_t::RegisterCapability(SpvCapability cap) { spv_operand_desc desc; if (SPV_SUCCESS == grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { - desc->capabilities.ForEach( - [this](SpvCapability c) { RegisterCapability(c); }); + CapabilitySet(desc->numCapabilities, desc->capabilities) + .ForEach([this](SpvCapability c) { RegisterCapability(c); }); } switch (cap) { + case SpvCapabilityKernel: + features_.group_ops_reduce_and_scans = true; + break; case SpvCapabilityInt16: features_.declare_int16_type = true; break; @@ -319,6 +330,23 @@ void ValidationState_t::RegisterExtension(Extension ext) { if (module_extensions_.Contains(ext)) return; module_extensions_.Add(ext); + + switch (ext) { + case kSPV_AMD_gpu_shader_half_float: + // SPV_AMD_gpu_shader_half_float enables float16 type. + // https://github.com/KhronosGroup/SPIRV-Tools/issues/1375 + features_.declare_float16_type = true; + break; + case kSPV_AMD_shader_ballot: + // The grammar doesn't encode the fact that SPV_AMD_shader_ballot + // enables the use of group operations Reduce, InclusiveScan, + // and ExclusiveScan. Enable it manually. + // https://github.com/KhronosGroup/SPIRV-Tools/issues/991 + features_.group_ops_reduce_and_scans = true; + break; + default: + break; + } } bool ValidationState_t::HasAnyOfCapabilities( @@ -354,6 +382,7 @@ spv_result_t ValidationState_t::RegisterFunction( in_function_ = true; module_functions_.emplace_back(id, ret_type_id, function_control, function_type_id); + id_to_function_.emplace(id, ¤t_function()); // TODO(umar): validate function type and type_id @@ -440,8 +469,12 @@ bool ValidationState_t::RegisterUniqueTypeDeclaration( uint32_t ValidationState_t::GetTypeId(uint32_t id) const { const Instruction* inst = FindDef(id); - assert(inst); - return inst->type_id(); + return inst ? inst->type_id() : 0; +} + +SpvOp ValidationState_t::GetIdOpcode(uint32_t id) const { + const Instruction* inst = FindDef(id); + return inst ? inst->opcode() : SpvOpNop; } uint32_t ValidationState_t::GetComponentType(uint32_t id) const { @@ -464,8 +497,7 @@ uint32_t ValidationState_t::GetComponentType(uint32_t id) const { break; } - if (inst->type_id()) - return GetComponentType(inst->type_id()); + if (inst->type_id()) return GetComponentType(inst->type_id()); assert(0); return 0; @@ -489,8 +521,7 @@ uint32_t ValidationState_t::GetDimension(uint32_t id) const { break; } - if (inst->type_id()) - return GetDimension(inst->type_id()); + if (inst->type_id()) return GetDimension(inst->type_id()); assert(0); return 0; @@ -504,8 +535,7 @@ uint32_t ValidationState_t::GetBitWidth(uint32_t id) const { if (inst->opcode() == SpvOpTypeFloat || inst->opcode() == SpvOpTypeInt) return inst->word(2); - if (inst->opcode() == SpvOpTypeBool) - return 1; + if (inst->opcode() == SpvOpTypeBool) return 1; assert(0); return 0; @@ -528,6 +558,21 @@ bool ValidationState_t::IsFloatVectorType(uint32_t id) const { return false; } +bool ValidationState_t::IsFloatScalarOrVectorType(uint32_t id) const { + const Instruction* inst = FindDef(id); + assert(inst); + + if (inst->opcode() == SpvOpTypeFloat) { + return true; + } + + if (inst->opcode() == SpvOpTypeVector) { + return IsFloatScalarType(GetComponentType(id)); + } + + return false; +} + bool ValidationState_t::IsIntScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); assert(inst); @@ -545,6 +590,21 @@ bool ValidationState_t::IsIntVectorType(uint32_t id) const { return false; } +bool ValidationState_t::IsIntScalarOrVectorType(uint32_t id) const { + const Instruction* inst = FindDef(id); + assert(inst); + + if (inst->opcode() == SpvOpTypeInt) { + return true; + } + + if (inst->opcode() == SpvOpTypeVector) { + return IsIntScalarType(GetComponentType(id)); + } + + return false; +} + bool ValidationState_t::IsUnsignedIntScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); assert(inst); @@ -596,6 +656,21 @@ bool ValidationState_t::IsBoolVectorType(uint32_t id) const { return false; } +bool ValidationState_t::IsBoolScalarOrVectorType(uint32_t id) const { + const Instruction* inst = FindDef(id); + assert(inst); + + if (inst->opcode() == SpvOpTypeBool) { + return true; + } + + if (inst->opcode() == SpvOpTypeVector) { + return IsBoolScalarType(GetComponentType(id)); + } + + return false; +} + bool ValidationState_t::IsFloatMatrixType(uint32_t id) const { const Instruction* inst = FindDef(id); assert(inst); @@ -607,16 +682,15 @@ bool ValidationState_t::IsFloatMatrixType(uint32_t id) const { return false; } -bool ValidationState_t::GetMatrixTypeInfo( - uint32_t id, uint32_t* num_rows, uint32_t* num_cols, - uint32_t* column_type, uint32_t* component_type) const { - if (!id) - return false; +bool ValidationState_t::GetMatrixTypeInfo(uint32_t id, uint32_t* num_rows, + uint32_t* num_cols, + uint32_t* column_type, + uint32_t* component_type) const { + if (!id) return false; const Instruction* mat_inst = FindDef(id); assert(mat_inst); - if (mat_inst->opcode() != SpvOpTypeMatrix) - return false; + if (mat_inst->opcode() != SpvOpTypeMatrix) return false; const uint32_t vec_type = mat_inst->word(2); const Instruction* vec_inst = FindDef(vec_type); @@ -638,19 +712,16 @@ bool ValidationState_t::GetMatrixTypeInfo( bool ValidationState_t::GetStructMemberTypes( uint32_t struct_type_id, std::vector* member_types) const { member_types->clear(); - if (!struct_type_id) - return false; + if (!struct_type_id) return false; const Instruction* inst = FindDef(struct_type_id); assert(inst); - if (inst->opcode() != SpvOpTypeStruct) - return false; + if (inst->opcode() != SpvOpTypeStruct) return false; - *member_types = std::vector(inst->words().cbegin() + 2, - inst->words().cend()); + *member_types = + std::vector(inst->words().cbegin() + 2, inst->words().cend()); - if (member_types->empty()) - return false; + if (member_types->empty()) return false; return true; } @@ -661,15 +732,13 @@ bool ValidationState_t::IsPointerType(uint32_t id) const { return inst->opcode() == SpvOpTypePointer; } -bool ValidationState_t::GetPointerTypeInfo( - uint32_t id, uint32_t* data_type, uint32_t* storage_class) const { - if (!id) - return false; +bool ValidationState_t::GetPointerTypeInfo(uint32_t id, uint32_t* data_type, + uint32_t* storage_class) const { + if (!id) return false; const Instruction* inst = FindDef(id); assert(inst); - if (inst->opcode() != SpvOpTypePointer) - return false; + if (inst->opcode() != SpvOpTypePointer) return false; *storage_class = inst->word(2); *data_type = inst->word(3); @@ -677,12 +746,84 @@ bool ValidationState_t::GetPointerTypeInfo( } uint32_t ValidationState_t::GetOperandTypeId( - const spv_parsed_instruction_t* inst, - size_t operand_index) const { + const spv_parsed_instruction_t* inst, size_t operand_index) const { assert(operand_index < inst->num_operands); const spv_parsed_operand_t& operand = inst->operands[operand_index]; assert(operand.num_words == 1); return GetTypeId(inst->words[operand.offset]); } -} /// namespace libspirv +bool ValidationState_t::GetConstantValUint64(uint32_t id, uint64_t* val) const { + const Instruction* inst = FindDef(id); + if (!inst) { + assert(0 && "Instruction not found"); + return false; + } + + if (inst->opcode() != SpvOpConstant && inst->opcode() != SpvOpSpecConstant) + return false; + + if (!IsIntScalarType(inst->type_id())) return false; + + if (inst->words().size() == 4) { + *val = inst->word(3); + } else { + assert(inst->words().size() == 5); + *val = inst->word(3); + *val |= uint64_t(inst->word(4)) << 32; + } + return true; +} + +std::tuple ValidationState_t::EvalInt32IfConst( + uint32_t id) { + const Instruction* const inst = FindDef(id); + assert(inst); + const uint32_t type = inst->type_id(); + + if (!IsIntScalarType(type) || GetBitWidth(type) != 32) { + return std::make_tuple(false, false, 0); + } + + if (inst->opcode() != SpvOpConstant && inst->opcode() != SpvOpSpecConstant) { + return std::make_tuple(true, false, 0); + } + + assert(inst->words().size() == 4); + return std::make_tuple(true, true, inst->word(3)); +} + +void ValidationState_t::ComputeFunctionToEntryPointMapping() { + for (const uint32_t entry_point : entry_points()) { + std::stack call_stack; + std::set visited; + call_stack.push(entry_point); + while (!call_stack.empty()) { + const uint32_t called_func_id = call_stack.top(); + call_stack.pop(); + if (!visited.insert(called_func_id).second) continue; + + function_to_entry_points_[called_func_id].push_back(entry_point); + + const Function* called_func = function(called_func_id); + if (called_func) { + // Other checks should error out on this invalid SPIR-V. + for (const uint32_t new_call : called_func->function_call_targets()) { + call_stack.push(new_call); + } + } + } + } +} + +const std::vector& ValidationState_t::FunctionEntryPoints( + uint32_t func) const { + auto iter = function_to_entry_points_.find(func); + if (iter == function_to_entry_points_.end()) { + return empty_ids_; + } else { + return iter->second; + } +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.h b/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.h index 7b11bc717b2cd1a74c8644d2479838ea9f1eaedd..ade5da1a4490430ca0cbff38f1fded3eab45a8bc 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/val/validation_state.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -26,8 +27,8 @@ #include "decoration.h" #include "diagnostic.h" #include "enum_set.h" +#include "latest_version_spirv_header.h" #include "spirv-tools/libspirv.h" -#include "spirv/1.2/spirv.h" #include "spirv_definition.h" #include "val/function.h" #include "val/instruction.h" @@ -69,6 +70,9 @@ class ValidationState_t { // Allow functionalities enabled by VariablePointersStorageBuffer // capability. bool variable_pointers_storage_buffer = false; + + // Permit group oerations Reduce, InclusiveScan, ExclusiveScan + bool group_ops_reduce_and_scans = false; }; ValidationState_t(const spv_const_context context, @@ -140,6 +144,9 @@ class ValidationState_t { Function& current_function(); const Function& current_function() const; + /// Returns function state with the given id, or nullptr if no such function. + const Function* function(uint32_t id) const; + /// Returns true if the called after a function instruction but before the /// function end instruction bool in_function_body() const; @@ -148,10 +155,12 @@ class ValidationState_t { /// instruction bool in_block() const; - /// Registers the given as an Entry Point. - void RegisterEntryPointId(const uint32_t id) { + /// Registers the given as an Entry Point with |execution_model|. + void RegisterEntryPointId(const uint32_t id, + SpvExecutionModel execution_model) { entry_points_.push_back(id); - entry_point_interfaces_.insert(std::make_pair(id, std::vector())); + entry_point_interfaces_.emplace(id, std::vector()); + entry_point_to_execution_models_[id].insert(execution_model); } /// Returns a list of entry point function ids @@ -163,6 +172,12 @@ class ValidationState_t { entry_point_interfaces_[entry_point].push_back(interface); } + /// Registers execution mode for the given entry point. + void RegisterExecutionModeForEntryPoint(uint32_t entry_point, + SpvExecutionMode execution_mode) { + entry_point_to_execution_modes_[entry_point].insert(execution_mode); + } + /// Returns the interfaces of a given entry point. If the given id is not a /// valid Entry Point id, std::out_of_range exception is thrown. const std::vector& entry_point_interfaces( @@ -170,9 +185,40 @@ class ValidationState_t { return entry_point_interfaces_.at(entry_point); } + /// Returns Execution Models for the given Entry Point. + /// Returns nullptr if none found (would trigger assertion). + const std::set* GetExecutionModels( + uint32_t entry_point) const { + const auto it = entry_point_to_execution_models_.find(entry_point); + if (it == entry_point_to_execution_models_.end()) { + assert(0); + return nullptr; + } + return &it->second; + } + + /// Returns Execution Modes for the given Entry Point. + /// Returns nullptr if none found. + const std::set* GetExecutionModes( + uint32_t entry_point) const { + const auto it = entry_point_to_execution_modes_.find(entry_point); + if (it == entry_point_to_execution_modes_.end()) { + return nullptr; + } + return &it->second; + } + + /// Traverses call tree and computes function_to_entry_points_. + /// Note: called after fully parsing the binary. + void ComputeFunctionToEntryPointMapping(); + + /// Returns all the entry points that can call |func|. + const std::vector& FunctionEntryPoints(uint32_t func) const; + /// Inserts an to the set of functions that are target of OpFunctionCall. void AddFunctionCallTarget(const uint32_t id) { function_call_targets_.insert(id); + current_function().AddFunctionCallTarget(id); } /// Returns whether or not a function is the target of OpFunctionCall. @@ -260,6 +306,16 @@ class ValidationState_t { std::vector& id_decorations(uint32_t id) { return id_decorations_[id]; } + const std::vector& id_decorations(uint32_t id) const { + // TODO: This would throw or generate SIGABRT if id has no + // decorations. Remove/refactor this function. + return id_decorations_.at(id); + } + + // Returns const pointer to the internal decoration container. + const std::map>& id_decorations() const { + return id_decorations_; + } /// Finds id's def, if it exists. If found, returns the definition otherwise /// nullptr @@ -355,34 +411,44 @@ class ValidationState_t { // Provides detailed information on matrix type. // Returns false iff |id| is not matrix type. - bool GetMatrixTypeInfo( - uint32_t id, uint32_t* num_rows, uint32_t* num_cols, - uint32_t* column_type, uint32_t* component_type) const; + bool GetMatrixTypeInfo(uint32_t id, uint32_t* num_rows, uint32_t* num_cols, + uint32_t* column_type, uint32_t* component_type) const; // Collects struct member types into |member_types|. // Returns false iff not struct type or has no members. // Deletes prior contents of |member_types|. - bool GetStructMemberTypes( - uint32_t struct_type_id, std::vector* member_types) const; + bool GetStructMemberTypes(uint32_t struct_type_id, + std::vector* member_types) const; // Returns true iff |id| is a type corresponding to the name of the function. // Only works for types not for objects. bool IsFloatScalarType(uint32_t id) const; bool IsFloatVectorType(uint32_t id) const; + bool IsFloatScalarOrVectorType(uint32_t id) const; bool IsFloatMatrixType(uint32_t id) const; bool IsIntScalarType(uint32_t id) const; bool IsIntVectorType(uint32_t id) const; + bool IsIntScalarOrVectorType(uint32_t id) const; bool IsUnsignedIntScalarType(uint32_t id) const; bool IsUnsignedIntVectorType(uint32_t id) const; bool IsSignedIntScalarType(uint32_t id) const; bool IsSignedIntVectorType(uint32_t id) const; bool IsBoolScalarType(uint32_t id) const; bool IsBoolVectorType(uint32_t id) const; + bool IsBoolScalarOrVectorType(uint32_t id) const; bool IsPointerType(uint32_t id) const; + // Gets value from OpConstant and OpSpecConstant as uint64. + // Returns false on failure (no instruction, wrong instruction, not int). + bool GetConstantValUint64(uint32_t id, uint64_t* val) const; + // Returns type_id if id has type or zero otherwise. uint32_t GetTypeId(uint32_t id) const; + // Returns opcode of the instruction which issued the id or OpNop if the + // instruction is not registered. + SpvOp GetIdOpcode(uint32_t id) const; + // Returns type_id for given id operand if it has a type or zero otherwise. // |operand_index| is expected to be pointing towards an operand which is an // id. @@ -390,8 +456,12 @@ class ValidationState_t { size_t operand_index) const; // Provides information on pointer type. Returns false iff not pointer type. - bool GetPointerTypeInfo( - uint32_t id, uint32_t* data_type, uint32_t* storage_class) const; + bool GetPointerTypeInfo(uint32_t id, uint32_t* data_type, + uint32_t* storage_class) const; + + // Tries to evaluate a 32-bit signed or unsigned scalar integer constant. + // Returns tuple . + std::tuple EvalInt32IfConst(uint32_t id); private: ValidationState_t(const ValidationState_t&); @@ -420,7 +490,9 @@ class ValidationState_t { /// The section of the code being processed ModuleLayoutSection current_layout_section_; - /// A list of functions in the module + /// A list of functions in the module. + /// Pointers to objects in this container are guaranteed to be stable and + /// valid until the end of lifetime of the validation state. std::deque module_functions_; /// Capabilities declared in the module @@ -430,6 +502,8 @@ class ValidationState_t { libspirv::ExtensionSet module_extensions_; /// List of all instructions in the order they appear in the binary + /// Pointers to objects in this container are guaranteed to be stable and + /// valid until the end of lifetime of the validation state. std::deque ordered_instructions_; /// Instructions that can be referenced by Ids @@ -460,7 +534,7 @@ class ValidationState_t { std::unordered_map struct_nesting_depth_; /// Stores the list of decorations for a given - std::unordered_map> id_decorations_; + std::map> id_decorations_; /// Stores type declarations which need to be unique (i.e. non-aggregates), /// in the form [opcode, operand words], result_id is not stored. @@ -476,11 +550,29 @@ class ValidationState_t { /// NOTE: See correspoding getter functions bool in_function_; - // The state of optional features. These are determined by capabilities - // declared by the module. + /// The state of optional features. These are determined by capabilities + /// declared by the module. Feature features_; + + /// Maps function ids to function stat objects. + std::unordered_map id_to_function_; + + /// Mapping entry point -> execution models. It is presumed that the same + /// function could theoretically be used as 'main' by multiple OpEntryPoint + /// instructions. + std::unordered_map> + entry_point_to_execution_models_; + + /// Mapping entry point -> execution modes. + std::unordered_map> + entry_point_to_execution_modes_; + + /// Mapping function -> array of entry points inside this + /// module which can (indirectly) call the function. + std::unordered_map> function_to_entry_points_; + const std::vector empty_ids_; }; -} /// namespace libspirv +} // namespace libspirv #endif /// LIBSPIRV_VAL_VALIDATIONSTATE_H_ diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate.cpp index 536f798ad46d0d3a9957b77fbdfd11b4a0eaf816..953aad1ed46630a7b785a83cdac7e7d3bfd8c14e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate.cpp @@ -35,6 +35,7 @@ #include "spirv-tools/libspirv.h" #include "spirv_constant.h" #include "spirv_endian.h" +#include "spirv_target_env.h" #include "spirv_validator_options.h" #include "val/construct.h" #include "val/function.h" @@ -42,31 +43,27 @@ using std::function; using std::ostream_iterator; -using std::placeholders::_1; using std::string; using std::stringstream; using std::transform; using std::vector; +using std::placeholders::_1; using libspirv::CfgPass; +using libspirv::DataRulesPass; using libspirv::Extension; +using libspirv::IdPass; using libspirv::InstructionPass; +using libspirv::LiteralsPass; using libspirv::ModuleLayoutPass; -using libspirv::DataRulesPass; -using libspirv::IdPass; using libspirv::ValidationState_t; spv_result_t spvValidateIDs(const spv_instruction_t* pInsts, const uint64_t count, - const spv_opcode_table opcodeTable, - const spv_operand_table operandTable, - const spv_ext_inst_table extInstTable, const ValidationState_t& state, spv_position position) { position->index = SPV_INDEX_INSTRUCTION; - if (auto error = - spvValidateInstructionIDs(pInsts, count, opcodeTable, operandTable, - extInstTable, state, position)) + if (auto error = spvValidateInstructionIDs(pInsts, count, state, position)) return error; return SPV_SUCCESS; } @@ -126,7 +123,7 @@ void RegisterExtension(ValidationState_t& _, const spv_parsed_instruction_t* inst) { const std::string extension_str = libspirv::GetExtensionString(inst); Extension extension; - if (!GetExtensionFromString(extension_str, &extension)) { + if (!GetExtensionFromString(extension_str.c_str(), &extension)) { // The error will be logged in the ProcessInstruction pass. return; } @@ -139,11 +136,10 @@ void RegisterExtension(ValidationState_t& _, // once an instruction which is not SpvOpCapability and SpvOpExtension is // encountered. According to the SPIR-V spec extensions are declared after // capabilities and before everything else. -spv_result_t ProcessExtensions( - void* user_data, const spv_parsed_instruction_t* inst) { +spv_result_t ProcessExtensions(void* user_data, + const spv_parsed_instruction_t* inst) { const SpvOp opcode = static_cast(inst->opcode); - if (opcode == SpvOpCapability) - return SPV_SUCCESS; + if (opcode == SpvOpCapability) return SPV_SUCCESS; if (opcode == SpvOpExtension) { ValidationState_t& _ = *(reinterpret_cast(user_data)); @@ -161,7 +157,8 @@ spv_result_t ProcessInstruction(void* user_data, _.increment_instruction_count(); if (static_cast(inst->opcode) == SpvOpEntryPoint) { const auto entry_point = inst->words[2]; - _.RegisterEntryPointId(entry_point); + const SpvExecutionModel execution_model = SpvExecutionModel(inst->words[1]); + _.RegisterEntryPointId(entry_point, execution_model); // Operand 3 and later are the of interfaces for the entry point. for (int i = 3; i < inst->num_operands; ++i) { _.RegisterInterfaceForEntryPoint(entry_point, @@ -181,9 +178,18 @@ spv_result_t ProcessInstruction(void* user_data, if (auto error = InstructionPass(_, inst)) return error; if (auto error = TypeUniquePass(_, inst)) return error; if (auto error = ArithmeticsPass(_, inst)) return error; + if (auto error = CompositesPass(_, inst)) return error; if (auto error = ConversionPass(_, inst)) return error; + if (auto error = DerivativesPass(_, inst)) return error; if (auto error = LogicalsPass(_, inst)) return error; if (auto error = BitwisePass(_, inst)) return error; + if (auto error = ExtInstPass(_, inst)) return error; + if (auto error = ImagePass(_, inst)) return error; + if (auto error = AtomicsPass(_, inst)) return error; + if (auto error = BarriersPass(_, inst)) return error; + if (auto error = PrimitivesPass(_, inst)) return error; + if (auto error = LiteralsPass(_, inst)) return error; + if (auto error = NonUniformPass(_, inst)) return error; return SPV_SUCCESS; } @@ -229,20 +235,12 @@ UNUSED(void PrintDotGraph(ValidationState_t& _, libspirv::Function func)) { printf("}\n"); } } -} // anonymous namespace - -spv_result_t spvValidate(const spv_const_context context, - const spv_const_binary binary, - spv_diagnostic* pDiagnostic) { - return spvValidateBinary(context, binary->code, binary->wordCount, - pDiagnostic); -} spv_result_t ValidateBinaryUsingContextAndValidationState( const spv_context_t& context, const uint32_t* words, const size_t num_words, spv_diagnostic* pDiagnostic, ValidationState_t* vstate) { auto binary = std::unique_ptr( - new spv_const_binary_t{words, num_words}); + new spv_const_binary_t{words, num_words}); spv_endianness_t endian; spv_position_t position = {}; @@ -259,6 +257,16 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( << "Invalid SPIR-V header."; } + if (header.version > spvVersionForTargetEnv(context.target_env)) { + return libspirv::DiagnosticStream(position, context.consumer, + SPV_ERROR_WRONG_VERSION) + << "Invalid SPIR-V binary version " + << SPV_SPIRV_VERSION_MAJOR_PART(header.version) << "." + << SPV_SPIRV_VERSION_MINOR_PART(header.version) + << " for target environment " + << spvTargetEnvDescription(context.target_env) << "."; + } + // Look for OpExtension instructions and register extensions. // Diagnostics if any will be produced in the next pass (ProcessInstruction). spvBinaryParse(&context, vstate, words, num_words, @@ -267,8 +275,8 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( // NOTE: Parse the module and perform inline validation checks. These // checks do not require the the knowledge of the whole module. - if (auto error = spvBinaryParse(&context, vstate, words, num_words, - setHeader, ProcessInstruction, pDiagnostic)) + if (auto error = spvBinaryParse(&context, vstate, words, num_words, setHeader, + ProcessInstruction, pDiagnostic)) return error; if (vstate->in_function_body()) @@ -291,12 +299,18 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( << id_str.substr(0, id_str.size() - 1); } + vstate->ComputeFunctionToEntryPointMapping(); + + // Validate the preconditions involving adjacent instructions. e.g. SpvOpPhi + // must only be preceeded by SpvOpLabel, SpvOpPhi, or SpvOpLine. + if (auto error = ValidateAdjacency(*vstate)) return error; + // CFG checks are performed after the binary has been parsed // and the CFGPass has collected information about the control flow if (auto error = PerformCfgChecks(*vstate)) return error; if (auto error = UpdateIdUse(*vstate)) return error; if (auto error = CheckIdDefinitionDominateUse(*vstate)) return error; - if (auto error = ValidateDecorations(*vstate)) return error; + if (auto error = ValidateDecorations(*vstate)) return error; // Entry point validation. Based on 2.16.1 (Universal Validation Rules) of the // SPIRV spec: @@ -337,10 +351,21 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( } position.index = SPV_INDEX_INSTRUCTION; - return spvValidateIDs(instructions.data(), instructions.size(), - context.opcode_table, - context.operand_table, - context.ext_inst_table, *vstate, &position); + if (auto error = spvValidateIDs(instructions.data(), instructions.size(), + *vstate, &position)) + return error; + + if (auto error = ValidateBuiltIns(*vstate)) return error; + + return SPV_SUCCESS; +} +} // anonymous namespace + +spv_result_t spvValidate(const spv_const_context context, + const spv_const_binary binary, + spv_diagnostic* pDiagnostic) { + return spvValidateBinary(context, binary->code, binary->wordCount, + pDiagnostic); } spv_result_t spvValidateBinary(const spv_const_context context, diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate.h b/sources/third_party/shaderc/third_party/spirv-tools/source/validate.h index 2e088d941e554300fee0d1410020efdea68dd6b0..983b30da3c8c07685882eec920e4ab3cd2083b5f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate.h +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate.h @@ -63,6 +63,18 @@ spv_result_t UpdateIdUse(ValidationState_t& _); /// @return SPV_SUCCESS if no errors are found. SPV_ERROR_INVALID_ID otherwise spv_result_t CheckIdDefinitionDominateUse(const ValidationState_t& _); +/// @brief This function checks for preconditions involving the adjacent +/// instructions. +/// +/// This function will iterate over all instructions and check for any required +/// predecessor and/or successor instructions. e.g. SpvOpPhi must only be +/// preceeded by SpvOpLabel, SpvOpPhi, or SpvOpLine. +/// +/// @param[in] _ the validation state of the module +/// +/// @return SPV_SUCCESS if no errors are found. SPV_ERROR_INVALID_DATA otherwise +spv_result_t ValidateAdjacency(ValidationState_t& _); + /// @brief Updates the immediate dominator for each of the block edges /// /// Updates the immediate dominator of the blocks for each of the edges @@ -105,6 +117,9 @@ spv_result_t InstructionPass(ValidationState_t& _, /// Performs decoration validation. spv_result_t ValidateDecorations(ValidationState_t& _); +/// Performs validation of built-in variables. +spv_result_t ValidateBuiltIns(const ValidationState_t& _); + /// Validates that type declarations are unique, unless multiple declarations /// of the same data type are allowed by the specification. /// (see section 2.8 Types and Variables) @@ -113,12 +128,20 @@ spv_result_t TypeUniquePass(ValidationState_t& _, /// Validates correctness of arithmetic instructions. spv_result_t ArithmeticsPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of composite instructions. +spv_result_t CompositesPass(ValidationState_t& _, const spv_parsed_instruction_t* inst); /// Validates correctness of conversion instructions. spv_result_t ConversionPass(ValidationState_t& _, const spv_parsed_instruction_t* inst); +/// Validates correctness of derivative instructions. +spv_result_t DerivativesPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + /// Validates correctness of logical instructions. spv_result_t LogicalsPass(ValidationState_t& _, const spv_parsed_instruction_t* inst); @@ -127,28 +150,51 @@ spv_result_t LogicalsPass(ValidationState_t& _, spv_result_t BitwisePass(ValidationState_t& _, const spv_parsed_instruction_t* inst); +/// Validates correctness of image instructions. +spv_result_t ImagePass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of atomic instructions. +spv_result_t AtomicsPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of barrier instructions. +spv_result_t BarriersPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of literal numbers. +spv_result_t LiteralsPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of ExtInst instructions. +spv_result_t ExtInstPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + +/// Validates correctness of non-uniform group instructions. +spv_result_t NonUniformPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + // Validates that capability declarations use operands allowed in the current // context. spv_result_t CapabilityPass(ValidationState_t& _, const spv_parsed_instruction_t* inst); +/// Validates correctness of primitive instructions. +spv_result_t PrimitivesPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst); + } // namespace libspirv /// @brief Validate the ID usage of the instruction stream /// /// @param[in] pInsts stream of instructions /// @param[in] instCount number of instructions -/// @param[in] opcodeTable table of specified Opcodes -/// @param[in] operandTable table of specified operands /// @param[in] usedefs use-def info from module parsing /// @param[in,out] position current position in the stream /// /// @return result code spv_result_t spvValidateInstructionIDs(const spv_instruction_t* pInsts, const uint64_t instCount, - const spv_opcode_table opcodeTable, - const spv_operand_table operandTable, - const spv_ext_inst_table extInstTable, const libspirv::ValidationState_t& state, spv_position position); @@ -157,17 +203,12 @@ spv_result_t spvValidateInstructionIDs(const spv_instruction_t* pInsts, /// @param[in] pInstructions array of instructions /// @param[in] count number of elements in instruction array /// @param[in] bound the binary header -/// @param[in] opcodeTable table of specified Opcodes -/// @param[in] operandTable table of specified operands /// @param[in,out] position current word in the binary /// @param[in] consumer message consumer callback /// /// @return result code spv_result_t spvValidateIDs(const spv_instruction_t* pInstructions, const uint64_t count, const uint32_t bound, - const spv_opcode_table opcodeTable, - const spv_operand_table operandTable, - const spv_ext_inst_table extInstTable, spv_position position, const spvtools::MessageConsumer& consumer); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_adjacency.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_adjacency.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75cea5294b9940756103b9662704fffe1f1c2f22 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_adjacency.cpp @@ -0,0 +1,84 @@ +// Copyright (c) 2018 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of the intra-block preconditions of SPIR-V +// instructions. + +#include "validate.h" + +#include + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +spv_result_t ValidateAdjacency(ValidationState_t& _) { + const auto& instructions = _.ordered_instructions(); + for (auto i = instructions.cbegin(); i != instructions.cend(); ++i) { + switch (i->opcode()) { + case SpvOpPhi: + if (i != instructions.cbegin()) { + switch (prev(i)->opcode()) { + case SpvOpLabel: + case SpvOpPhi: + case SpvOpLine: + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "OpPhi must appear before all non-OpPhi instructions " + << "(except for OpLine, which can be mixed with OpPhi)."; + } + } + break; + case SpvOpLoopMerge: + if (next(i) != instructions.cend()) { + switch (next(i)->opcode()) { + case SpvOpBranch: + case SpvOpBranchConditional: + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "OpLoopMerge must immediately precede either an " + << "OpBranch or OpBranchConditional instruction. " + << "OpLoopMerge must be the second-to-last instruction in " + << "its block."; + } + } + break; + case SpvOpSelectionMerge: + if (next(i) != instructions.cend()) { + switch (next(i)->opcode()) { + case SpvOpBranchConditional: + case SpvOpSwitch: + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "OpSelectionMerge must immediately precede either an " + << "OpBranchConditional or OpSwitch instruction. " + << "OpSelectionMerge must be the second-to-last " + << "instruction in its block."; + } + } + default: + break; + } + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_arithmetics.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_arithmetics.cpp index a2d3fbcec3d6292341b0801d221f2ccc2bbb4b87..783dbf4de70f67aef38d2ff37b7488f4e6788b6c 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_arithmetics.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_arithmetics.cpp @@ -38,16 +38,15 @@ inline uint32_t GetOperandWord(const spv_parsed_instruction_t* inst, // Returns the type id of instruction operand at |operand_index|. // The operand is expected to be an id. inline uint32_t GetOperandTypeId(ValidationState_t& _, - const spv_parsed_instruction_t* inst, - size_t operand_index) { + const spv_parsed_instruction_t* inst, + size_t operand_index) { return _.GetTypeId(GetOperandWord(inst, operand_index)); } - -} +} // namespace // Validates correctness of arithmetic instructions. spv_result_t ArithmeticsPass(ValidationState_t& _, - const spv_parsed_instruction_t* inst) { + const spv_parsed_instruction_t* inst) { const SpvOp opcode = static_cast(inst->opcode); const uint32_t result_type = inst->type_id; @@ -62,15 +61,16 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected floating scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected floating scalar or vector type as Result Type: " + << spvOpcodeString(opcode); for (size_t operand_index = 2; operand_index < inst->num_operands; ++operand_index) { if (GetOperandTypeId(_, inst, operand_index) != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected arithmetic operands to be of Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected arithmetic operands to be of Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; } break; } @@ -80,15 +80,16 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected unsigned int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected unsigned int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); for (size_t operand_index = 2; operand_index < inst->num_operands; ++operand_index) { if (GetOperandTypeId(_, inst, operand_index) != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected arithmetic operands to be of Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected arithmetic operands to be of Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; } break; } @@ -100,36 +101,35 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, case SpvOpSMod: case SpvOpSRem: case SpvOpSNegate: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t dimension = _.GetDimension(result_type); const uint32_t bit_width = _.GetBitWidth(result_type); for (size_t operand_index = 2; operand_index < inst->num_operands; ++operand_index) { - const uint32_t type_id = GetOperandTypeId(_, inst, operand_index); if (!type_id || (!_.IsIntScalarType(type_id) && !_.IsIntVectorType(type_id))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as operand: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected int scalar or vector type as operand: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; if (_.GetDimension(type_id) != dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected arithmetic operands to have the same dimension " - << "as Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected arithmetic operands to have the same dimension " + << "as Result Type: " << spvOpcodeString(opcode) + << " operand index " << operand_index; if (_.GetBitWidth(type_id) != bit_width) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected arithmetic operands to have the same bit width " - << "as Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected arithmetic operands to have the same bit width " + << "as Result Type: " << spvOpcodeString(opcode) + << " operand index " << operand_index; } break; } @@ -137,8 +137,8 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, case SpvOpDot: { if (!_.IsFloatScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float scalar type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float scalar type as Result Type: " + << spvOpcodeString(opcode); uint32_t first_vector_num_components = 0; @@ -148,23 +148,24 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!type_id || !_.IsFloatVectorType(type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector as operand: " - << spvOpcodeString(opcode) << " operand index " << operand_index; - + << "Expected float vector as operand: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; const uint32_t component_type = _.GetComponentType(type_id); if (component_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component type to be equal to Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected component type to be equal to Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; const uint32_t num_components = _.GetDimension(type_id); if (operand_index == 2) { first_vector_num_components = num_components; } else if (num_components != first_vector_num_components) { return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to have the same number of componenets: " - << spvOpcodeString(opcode); + << "Expected operands to have the same number of componenets: " + << spvOpcodeString(opcode); } } break; @@ -173,23 +174,22 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, case SpvOpVectorTimesScalar: { if (!_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t vector_type_id = GetOperandTypeId(_, inst, 2); if (result_type != vector_type_id) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector operand type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected vector operand type to be equal to Result Type: " + << spvOpcodeString(opcode); const uint32_t component_type = _.GetComponentType(vector_type_id); const uint32_t scalar_type_id = GetOperandTypeId(_, inst, 3); if (component_type != scalar_type_id) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected scalar operand type to be equal to the component " - << "type of the vector operand: " - << spvOpcodeString(opcode); + << "Expected scalar operand type to be equal to the component " + << "type of the vector operand: " << spvOpcodeString(opcode); break; } @@ -197,23 +197,22 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, case SpvOpMatrixTimesScalar: { if (!_.IsFloatMatrixType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float matrix type as Result Type: " + << spvOpcodeString(opcode); const uint32_t matrix_type_id = GetOperandTypeId(_, inst, 2); if (result_type != matrix_type_id) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected matrix operand type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected matrix operand type to be equal to Result Type: " + << spvOpcodeString(opcode); const uint32_t component_type = _.GetComponentType(matrix_type_id); const uint32_t scalar_type_id = GetOperandTypeId(_, inst, 3); if (component_type != scalar_type_id) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected scalar operand type to be equal to the component " - << "type of the matrix operand: " - << spvOpcodeString(opcode); + << "Expected scalar operand type to be equal to the component " + << "type of the matrix operand: " << spvOpcodeString(opcode); break; } @@ -224,20 +223,20 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t res_component_type = _.GetComponentType(result_type); if (!vector_type_id || !_.IsFloatVectorType(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as left operand: " - << spvOpcodeString(opcode); + << "Expected float vector type as left operand: " + << spvOpcodeString(opcode); if (res_component_type != _.GetComponentType(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component types of Result Type and vector to be " - << "equal: " << spvOpcodeString(opcode); + << "Expected component types of Result Type and vector to be " + << "equal: " << spvOpcodeString(opcode); uint32_t matrix_num_rows = 0; uint32_t matrix_num_cols = 0; @@ -247,23 +246,23 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, &matrix_num_cols, &matrix_col_type, &matrix_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as right operand: " - << spvOpcodeString(opcode); + << "Expected float matrix type as right operand: " + << spvOpcodeString(opcode); if (res_component_type != matrix_component_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component types of Result Type and matrix to be " - << "equal: " << spvOpcodeString(opcode); + << "Expected component types of Result Type and matrix to be " + << "equal: " << spvOpcodeString(opcode); if (matrix_num_cols != _.GetDimension(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of columns of the matrix to be equal to " - << "Result Type vector size: " << spvOpcodeString(opcode); + << "Expected number of columns of the matrix to be equal to " + << "Result Type vector size: " << spvOpcodeString(opcode); if (matrix_num_rows != _.GetDimension(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of rows of the matrix to be equal to the " - << "vector operand size: " << spvOpcodeString(opcode); + << "Expected number of rows of the matrix to be equal to the " + << "vector operand size: " << spvOpcodeString(opcode); break; } @@ -274,8 +273,8 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float vector type as Result Type: " + << spvOpcodeString(opcode); uint32_t matrix_num_rows = 0; uint32_t matrix_num_cols = 0; @@ -285,28 +284,29 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, &matrix_num_cols, &matrix_col_type, &matrix_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as left operand: " - << spvOpcodeString(opcode); + << "Expected float matrix type as left operand: " + << spvOpcodeString(opcode); if (result_type != matrix_col_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected column type of the matrix to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected column type of the matrix to be equal to Result " + "Type: " + << spvOpcodeString(opcode); if (!vector_type_id || !_.IsFloatVectorType(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as right operand: " - << spvOpcodeString(opcode); + << "Expected float vector type as right operand: " + << spvOpcodeString(opcode); if (matrix_component_type != _.GetComponentType(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component types of the operands to be equal: " - << spvOpcodeString(opcode); + << "Expected component types of the operands to be equal: " + << spvOpcodeString(opcode); if (matrix_num_cols != _.GetDimension(vector_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of columns of the matrix to be equal to the " - << "vector size: " << spvOpcodeString(opcode); + << "Expected number of columns of the matrix to be equal to the " + << "vector size: " << spvOpcodeString(opcode); break; } @@ -322,8 +322,8 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.GetMatrixTypeInfo(result_type, &res_num_rows, &res_num_cols, &res_col_type, &res_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float matrix type as Result Type: " + << spvOpcodeString(opcode); uint32_t left_num_rows = 0; uint32_t left_num_cols = 0; @@ -332,8 +332,8 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.GetMatrixTypeInfo(left_type_id, &left_num_rows, &left_num_cols, &left_col_type, &left_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as left operand: " - << spvOpcodeString(opcode); + << "Expected float matrix type as left operand: " + << spvOpcodeString(opcode); uint32_t right_num_rows = 0; uint32_t right_num_cols = 0; @@ -342,33 +342,36 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.GetMatrixTypeInfo(right_type_id, &right_num_rows, &right_num_cols, &right_col_type, &right_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as right operand: " - << spvOpcodeString(opcode); + << "Expected float matrix type as right operand: " + << spvOpcodeString(opcode); if (!_.IsFloatScalarType(res_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float matrix type as Result Type: " + << spvOpcodeString(opcode); if (res_col_type != left_col_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected column types of Result Type and left matrix to be " - << "equal: " << spvOpcodeString(opcode); + << "Expected column types of Result Type and left matrix to be " + << "equal: " << spvOpcodeString(opcode); if (res_component_type != right_component_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component types of Result Type and right matrix to be " - << "equal: " << spvOpcodeString(opcode); + << "Expected component types of Result Type and right matrix to " + "be " + << "equal: " << spvOpcodeString(opcode); if (res_num_cols != right_num_cols) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of columns of Result Type and right matrix to " - << "be equal: " << spvOpcodeString(opcode); + << "Expected number of columns of Result Type and right matrix " + "to " + << "be equal: " << spvOpcodeString(opcode); if (left_num_cols != right_num_rows) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of columns of left matrix and number of rows " - << "of right matrix to be equal: " << spvOpcodeString(opcode); + << "Expected number of columns of left matrix and number of " + "rows " + << "of right matrix to be equal: " << spvOpcodeString(opcode); assert(left_num_rows == res_num_rows); break; @@ -385,29 +388,29 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, if (!_.GetMatrixTypeInfo(result_type, &res_num_rows, &res_num_cols, &res_col_type, &res_component_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float matrix type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float matrix type as Result Type: " + << spvOpcodeString(opcode); if (left_type_id != res_col_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected column type of Result Type to be equal to the type " - << "of the left operand: " - << spvOpcodeString(opcode); + << "Expected column type of Result Type to be equal to the type " + << "of the left operand: " << spvOpcodeString(opcode); if (!right_type_id || !_.IsFloatVectorType(right_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float vector type as right operand: " - << spvOpcodeString(opcode); + << "Expected float vector type as right operand: " + << spvOpcodeString(opcode); if (res_component_type != _.GetComponentType(right_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected component types of the operands to be equal: " - << spvOpcodeString(opcode); + << "Expected component types of the operands to be equal: " + << spvOpcodeString(opcode); if (res_num_cols != _.GetDimension(right_type_id)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected number of columns of the matrix to be equal to the " - << "vector size of the right operand: " << spvOpcodeString(opcode); + << "Expected number of columns of the matrix to be equal to the " + << "vector size of the right operand: " + << spvOpcodeString(opcode); break; } @@ -419,40 +422,41 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, std::vector result_types; if (!_.GetStructMemberTypes(result_type, &result_types)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected a struct as Result Type: " - << spvOpcodeString(opcode); + << "Expected a struct as Result Type: " + << spvOpcodeString(opcode); if (result_types.size() != 2) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type struct to have two members: " - << spvOpcodeString(opcode); + << "Expected Result Type struct to have two members: " + << spvOpcodeString(opcode); if (opcode == SpvOpSMulExtended) { if (!_.IsIntScalarType(result_types[0]) && !_.IsIntVectorType(result_types[0])) - return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type struct member types to be integer scalar " - << "or vector: " << spvOpcodeString(opcode); + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type struct member types to be integer " + "scalar " + << "or vector: " << spvOpcodeString(opcode); } else { if (!_.IsUnsignedIntScalarType(result_types[0]) && !_.IsUnsignedIntVectorType(result_types[0])) - return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type struct member types to be unsigned " - << "integer scalar or vector: " << spvOpcodeString(opcode); + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type struct member types to be unsigned " + << "integer scalar or vector: " << spvOpcodeString(opcode); } if (result_types[0] != result_types[1]) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type struct member types to be identical: " - << spvOpcodeString(opcode); + << "Expected Result Type struct member types to be identical: " + << spvOpcodeString(opcode); const uint32_t left_type_id = GetOperandTypeId(_, inst, 2); const uint32_t right_type_id = GetOperandTypeId(_, inst, 3); if (left_type_id != result_types[0] || right_type_id != result_types[0]) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected both operands to be of Result Type member type: " - << spvOpcodeString(opcode); + << "Expected both operands to be of Result Type member type: " + << spvOpcodeString(opcode); break; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_atomics.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_atomics.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8c0c535f9901892bdb8fac8691373f361315ebce --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_atomics.cpp @@ -0,0 +1,321 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of atomic SPIR-V instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "spirv_target_env.h" +#include "util/bitutils.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +// Validates Memory Scope operand. +spv_result_t ValidateMemoryScope(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t id) { + const SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t value = 0; + std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(id); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) << ": expected Scope to be 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + +#if 0 + // TODO(atgoo@github.com): this check fails Vulkan CTS, reenable once fixed. + if (spvIsVulkanEnv(_.context()->target_env)) { + if (value != SpvScopeDevice && value != SpvScopeWorkgroup && + value != SpvScopeInvocation) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": in Vulkan environment memory scope is limited to Device, " + "Workgroup and Invocation"; + } + } +#endif + + // TODO(atgoo@github.com) Add checks for OpenCL and OpenGL environments. + + return SPV_SUCCESS; +} + +// Validates a Memory Semantics operand. +spv_result_t ValidateMemorySemantics(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t operand_index) { + const SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t flags = 0; + const uint32_t memory_semantics_id = + inst->words[inst->operands[operand_index].offset]; + std::tie(is_int32, is_const_int32, flags) = + _.EvalInt32IfConst(memory_semantics_id); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Memory Semantics to be 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + + if (spvutils::CountSetBits( + flags & + (SpvMemorySemanticsAcquireMask | SpvMemorySemanticsReleaseMask | + SpvMemorySemanticsAcquireReleaseMask | + SpvMemorySemanticsSequentiallyConsistentMask)) > 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": no more than one of the following Memory Semantics bits can " + "be set at the same time: Acquire, Release, AcquireRelease or " + "SequentiallyConsistent"; + } + + if (flags & SpvMemorySemanticsUniformMemoryMask && + !_.HasCapability(SpvCapabilityShader)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Memory Semantics UniformMemory requires capability Shader"; + } + + if (flags & SpvMemorySemanticsAtomicCounterMemoryMask && + !_.HasCapability(SpvCapabilityAtomicStorage)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Memory Semantics UniformMemory requires capability " + "AtomicStorage"; + } + + if (opcode == SpvOpAtomicFlagClear && + (flags & SpvMemorySemanticsAcquireMask || + flags & SpvMemorySemanticsAcquireReleaseMask)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Memory Semantics Acquire and AcquireRelease cannot be used with " + << spvOpcodeString(opcode); + } + + if (opcode == SpvOpAtomicCompareExchange && operand_index == 5 && + (flags & SpvMemorySemanticsReleaseMask || + flags & SpvMemorySemanticsAcquireReleaseMask)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Memory Semantics Release and AcquireRelease cannot be used " + "for operand Unequal"; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (opcode == SpvOpAtomicLoad && + (flags & SpvMemorySemanticsReleaseMask || + flags & SpvMemorySemanticsAcquireReleaseMask || + flags & SpvMemorySemanticsSequentiallyConsistentMask)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec disallows OpAtomicLoad with Memory Semantics " + "Release, AcquireRelease and SequentiallyConsistent"; + } + + if (opcode == SpvOpAtomicStore && + (flags & SpvMemorySemanticsAcquireMask || + flags & SpvMemorySemanticsAcquireReleaseMask || + flags & SpvMemorySemanticsSequentiallyConsistentMask)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec disallows OpAtomicStore with Memory Semantics " + "Acquire, AcquireRelease and SequentiallyConsistent"; + } + } + + // TODO(atgoo@github.com) Add checks for OpenCL and OpenGL environments. + + return SPV_SUCCESS; +} + +// Validates correctness of atomic instructions. +spv_result_t AtomicsPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + + switch (opcode) { + case SpvOpAtomicLoad: + case SpvOpAtomicStore: + case SpvOpAtomicExchange: + case SpvOpAtomicCompareExchange: + case SpvOpAtomicCompareExchangeWeak: + case SpvOpAtomicIIncrement: + case SpvOpAtomicIDecrement: + case SpvOpAtomicIAdd: + case SpvOpAtomicISub: + case SpvOpAtomicSMin: + case SpvOpAtomicUMin: + case SpvOpAtomicSMax: + case SpvOpAtomicUMax: + case SpvOpAtomicAnd: + case SpvOpAtomicOr: + case SpvOpAtomicXor: + case SpvOpAtomicFlagTestAndSet: + case SpvOpAtomicFlagClear: { + if (_.HasCapability(SpvCapabilityKernel) && + (opcode == SpvOpAtomicLoad || opcode == SpvOpAtomicExchange || + opcode == SpvOpAtomicCompareExchange)) { + if (!_.IsFloatScalarType(result_type) && + !_.IsIntScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be int or float scalar type"; + } + } else if (opcode == SpvOpAtomicFlagTestAndSet) { + if (!_.IsBoolScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be bool scalar type"; + } + } else if (opcode == SpvOpAtomicFlagClear || opcode == SpvOpAtomicStore) { + assert(result_type == 0); + } else { + if (!_.IsIntScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be int scalar type"; + } + if (spvIsVulkanEnv(_.context()->target_env) && + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": according to the Vulkan spec atomic Result Type needs " + "to be a 32-bit int scalar type"; + } + } + + uint32_t operand_index = + opcode == SpvOpAtomicFlagClear || opcode == SpvOpAtomicStore ? 0 : 2; + const uint32_t pointer_type = _.GetOperandTypeId(inst, operand_index++); + + uint32_t data_type = 0; + uint32_t storage_class = 0; + if (!_.GetPointerTypeInfo(pointer_type, &data_type, &storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Pointer to be of type OpTypePointer"; + } + + switch (storage_class) { + case SpvStorageClassUniform: + case SpvStorageClassWorkgroup: + case SpvStorageClassCrossWorkgroup: + case SpvStorageClassGeneric: + case SpvStorageClassAtomicCounter: + case SpvStorageClassImage: + case SpvStorageClassStorageBuffer: + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Pointer Storage Class to be Uniform, " + "Workgroup, CrossWorkgroup, Generic, AtomicCounter, Image " + "or StorageBuffer"; + } + + if (opcode == SpvOpAtomicFlagTestAndSet || + opcode == SpvOpAtomicFlagClear) { + if (!_.IsIntScalarType(data_type) || _.GetBitWidth(data_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Pointer to point to a value of 32-bit int type"; + } + } else if (opcode == SpvOpAtomicStore) { + if (!_.IsFloatScalarType(data_type) && !_.IsIntScalarType(data_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Pointer to be a pointer to int or float " + << "scalar type"; + } + } else { + if (data_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Pointer to point to a value of type Result " + "Type"; + } + } + + const uint32_t memory_scope = + inst->words[inst->operands[operand_index++].offset]; + if (auto error = ValidateMemoryScope(_, inst, memory_scope)) { + return error; + } + + if (auto error = ValidateMemorySemantics(_, inst, operand_index++)) + return error; + + if (opcode == SpvOpAtomicCompareExchange || + opcode == SpvOpAtomicCompareExchangeWeak) { + if (auto error = ValidateMemorySemantics(_, inst, operand_index++)) + return error; + } + + if (opcode == SpvOpAtomicStore) { + const uint32_t value_type = _.GetOperandTypeId(inst, 3); + if (value_type != data_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Value type and the type pointed to by Pointer " + "to" + << " be the same"; + } + } else if (opcode != SpvOpAtomicLoad && opcode != SpvOpAtomicIIncrement && + opcode != SpvOpAtomicIDecrement && + opcode != SpvOpAtomicFlagTestAndSet && + opcode != SpvOpAtomicFlagClear) { + const uint32_t value_type = _.GetOperandTypeId(inst, operand_index++); + if (value_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Value to be of type Result Type"; + } + } + + if (opcode == SpvOpAtomicCompareExchange || + opcode == SpvOpAtomicCompareExchangeWeak) { + const uint32_t comparator_type = + _.GetOperandTypeId(inst, operand_index++); + if (comparator_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Comparator to be of type Result Type"; + } + } + + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_barriers.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_barriers.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e89d67e84bd339d48329e4158d9e4553034e602c --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_barriers.cpp @@ -0,0 +1,299 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of barrier SPIR-V instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "spirv_constant.h" +#include "spirv_target_env.h" +#include "util/bitutils.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +// Validates Execution Scope operand. +spv_result_t ValidateExecutionScope(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t id) { + const SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t value = 0; + std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(id); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Execution Scope to be a 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (value != SpvScopeWorkgroup && value != SpvScopeSubgroup) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": in Vulkan environment Execution Scope is limited to " + "Workgroup and Subgroup"; + } + + if (_.context()->target_env != SPV_ENV_VULKAN_1_0 && + value != SpvScopeSubgroup) { + _.current_function().RegisterExecutionModelLimitation( + [](SpvExecutionModel model, std::string* message) { + if (model == SpvExecutionModelFragment || + model == SpvExecutionModelVertex || + model == SpvExecutionModelGeometry || + model == SpvExecutionModelTessellationEvaluation) { + if (message) { + *message = + "in Vulkan evironment, OpControlBarrier execution scope " + "must be Subgroup for Fragment, Vertex, Geometry and " + "TessellationEvaluation execution models"; + } + return false; + } + return true; + }); + } + } + + // TODO(atgoo@github.com) Add checks for OpenCL and OpenGL environments. + + return SPV_SUCCESS; +} + +// Validates Memory Scope operand. +spv_result_t ValidateMemoryScope(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t id) { + const SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t value = 0; + std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(id); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Memory Scope to be a 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (value == SpvScopeCrossDevice) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": in Vulkan environment, Memory Scope cannot be CrossDevice"; + } + if (_.context()->target_env == SPV_ENV_VULKAN_1_0 && + value != SpvScopeDevice && value != SpvScopeWorkgroup && + value != SpvScopeInvocation) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": in Vulkan 1.0 environment Memory Scope is limited to " + "Device, " + "Workgroup and Invocation"; + } + } + + // TODO(atgoo@github.com) Add checks for OpenCL and OpenGL environments. + + return SPV_SUCCESS; +} + +// Validates Memory Semantics operand. +spv_result_t ValidateMemorySemantics(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t id) { + const SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t value = 0; + std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(id); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Memory Semantics to be a 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + + const size_t num_memory_order_set_bits = spvutils::CountSetBits( + value & (SpvMemorySemanticsAcquireMask | SpvMemorySemanticsReleaseMask | + SpvMemorySemanticsAcquireReleaseMask | + SpvMemorySemanticsSequentiallyConsistentMask)); + + if (num_memory_order_set_bits > 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Memory Semantics can have at most one of the following bits " + "set: Acquire, Release, AcquireRelease or SequentiallyConsistent"; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + const bool includes_storage_class = + value & (SpvMemorySemanticsUniformMemoryMask | + SpvMemorySemanticsWorkgroupMemoryMask | + SpvMemorySemanticsImageMemoryMask); + + if (opcode == SpvOpMemoryBarrier && !num_memory_order_set_bits) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Vulkan specification requires Memory Semantics to have one " + "of the following bits set: Acquire, Release, AcquireRelease " + "or SequentiallyConsistent"; + } + + if (opcode == SpvOpMemoryBarrier && !includes_storage_class) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Memory Semantics to include a Vulkan-supported " + "storage class"; + } + +#if 0 + // TODO(atgoo@github.com): this check fails Vulkan CTS, reenable once fixed. + if (opcode == SpvOpControlBarrier && value && !includes_storage_class) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Memory Semantics to include a Vulkan-supported " + "storage class if Memory Semantics is not None"; + } +#endif + } + + // TODO(atgoo@github.com) Add checks for OpenCL and OpenGL environments. + + return SPV_SUCCESS; +} + +} // anonymous namespace + +// Validates correctness of barrier instructions. +spv_result_t BarriersPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + + switch (opcode) { + case SpvOpControlBarrier: { + if (spvVersionForTargetEnv(_.context()->target_env) < + SPV_SPIRV_VERSION_WORD(1, 3)) { + _.current_function().RegisterExecutionModelLimitation( + [](SpvExecutionModel model, std::string* message) { + if (model != SpvExecutionModelTessellationControl && + model != SpvExecutionModelGLCompute && + model != SpvExecutionModelKernel) { + if (message) { + *message = + "OpControlBarrier requires one of the following " + "Execution " + "Models: TessellationControl, GLCompute or Kernel"; + } + return false; + } + return true; + }); + } + + const uint32_t execution_scope = inst->words[1]; + const uint32_t memory_scope = inst->words[2]; + const uint32_t memory_semantics = inst->words[3]; + + if (auto error = ValidateExecutionScope(_, inst, execution_scope)) { + return error; + } + + if (auto error = ValidateMemoryScope(_, inst, memory_scope)) { + return error; + } + + if (auto error = ValidateMemorySemantics(_, inst, memory_semantics)) { + return error; + } + break; + } + + case SpvOpMemoryBarrier: { + const uint32_t memory_scope = inst->words[1]; + const uint32_t memory_semantics = inst->words[2]; + + if (auto error = ValidateMemoryScope(_, inst, memory_scope)) { + return error; + } + + if (auto error = ValidateMemorySemantics(_, inst, memory_semantics)) { + return error; + } + break; + } + + case SpvOpNamedBarrierInitialize: { + if (_.GetIdOpcode(result_type) != SpvOpTypeNamedBarrier) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be OpTypeNamedBarrier"; + } + + const uint32_t subgroup_count_type = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarType(subgroup_count_type) || + _.GetBitWidth(subgroup_count_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Subgroup Count to be a 32-bit int"; + } + break; + } + + case SpvOpMemoryNamedBarrier: { + const uint32_t named_barrier_type = _.GetOperandTypeId(inst, 0); + if (_.GetIdOpcode(named_barrier_type) != SpvOpTypeNamedBarrier) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Named Barrier to be of type OpTypeNamedBarrier"; + } + + const uint32_t memory_scope = inst->words[2]; + const uint32_t memory_semantics = inst->words[3]; + + if (auto error = ValidateMemoryScope(_, inst, memory_scope)) { + return error; + } + + if (auto error = ValidateMemorySemantics(_, inst, memory_semantics)) { + return error; + } + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_bitwise.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_bitwise.cpp index c175ea64af66891cc83f3f2846bcb7a2790dcf94..94978d93f06f1fa5763243f9891120252147791f 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_bitwise.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_bitwise.cpp @@ -38,12 +38,11 @@ inline uint32_t GetOperandWord(const spv_parsed_instruction_t* inst, // Returns the type id of instruction operand at |operand_index|. // The operand is expected to be an id. inline uint32_t GetOperandTypeId(ValidationState_t& _, - const spv_parsed_instruction_t* inst, - size_t operand_index) { + const spv_parsed_instruction_t* inst, + size_t operand_index) { return _.GetTypeId(GetOperandWord(inst, operand_index)); } - -} +} // namespace // Validates correctness of bitwise instructions. spv_result_t BitwisePass(ValidationState_t& _, @@ -55,11 +54,10 @@ spv_result_t BitwisePass(ValidationState_t& _, case SpvOpShiftRightLogical: case SpvOpShiftRightArithmetic: case SpvOpShiftLeftLogical: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t result_dimension = _.GetDimension(result_type); const uint32_t base_type = GetOperandTypeId(_, inst, 2); @@ -68,32 +66,29 @@ spv_result_t BitwisePass(ValidationState_t& _, if (!base_type || (!_.IsIntScalarType(base_type) && !_.IsIntVectorType(base_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base to be int scalar or vector: " - << spvOpcodeString(opcode); + << "Expected Base to be int scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(base_type) != result_dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base to have the same dimension " - << "as Result Type: " - << spvOpcodeString(opcode); + << "Expected Base to have the same dimension " + << "as Result Type: " << spvOpcodeString(opcode); if (_.GetBitWidth(base_type) != _.GetBitWidth(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base to have the same bit width " - << "as Result Type: " - << spvOpcodeString(opcode); + << "Expected Base to have the same bit width " + << "as Result Type: " << spvOpcodeString(opcode); if (!shift_type || (!_.IsIntScalarType(shift_type) && !_.IsIntVectorType(shift_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Shift to be int scalar or vector: " - << spvOpcodeString(opcode); + << "Expected Shift to be int scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(shift_type) != result_dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Shift to have the same dimension " - << "as Result Type: " - << spvOpcodeString(opcode); + << "Expected Shift to have the same dimension " + << "as Result Type: " << spvOpcodeString(opcode); break; } @@ -101,46 +96,44 @@ spv_result_t BitwisePass(ValidationState_t& _, case SpvOpBitwiseXor: case SpvOpBitwiseAnd: case SpvOpNot: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t result_dimension = _.GetDimension(result_type); const uint32_t result_bit_width = _.GetBitWidth(result_type); for (size_t operand_index = 2; operand_index < inst->num_operands; ++operand_index) { - const uint32_t type_id = GetOperandTypeId(_, inst, operand_index); if (!type_id || (!_.IsIntScalarType(type_id) && !_.IsIntVectorType(type_id))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector as operand: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected int scalar or vector as operand: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; if (_.GetDimension(type_id) != result_dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to have the same dimension " - << "as Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected operands to have the same dimension " + << "as Result Type: " << spvOpcodeString(opcode) + << " operand index " << operand_index; if (_.GetBitWidth(type_id) != result_bit_width) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to have the same bit width " - << "as Result Type: " - << spvOpcodeString(opcode) << " operand index " << operand_index; + << "Expected operands to have the same bit width " + << "as Result Type: " << spvOpcodeString(opcode) + << " operand index " << operand_index; } break; } case SpvOpBitFieldInsert: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t base_type = GetOperandTypeId(_, inst, 2); const uint32_t insert_type = GetOperandTypeId(_, inst, 3); @@ -149,33 +142,32 @@ spv_result_t BitwisePass(ValidationState_t& _, if (base_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected Base Type to be equal to Result Type: " + << spvOpcodeString(opcode); if (insert_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Insert Type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected Insert Type to be equal to Result Type: " + << spvOpcodeString(opcode); if (!offset_type || !_.IsIntScalarType(offset_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Offset Type to be int scalar: " - << spvOpcodeString(opcode); + << "Expected Offset Type to be int scalar: " + << spvOpcodeString(opcode); if (!count_type || !_.IsIntScalarType(count_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Count Type to be int scalar: " - << spvOpcodeString(opcode); + << "Expected Count Type to be int scalar: " + << spvOpcodeString(opcode); break; } case SpvOpBitFieldSExtract: case SpvOpBitFieldUExtract: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t base_type = GetOperandTypeId(_, inst, 2); const uint32_t offset_type = GetOperandTypeId(_, inst, 3); @@ -183,43 +175,41 @@ spv_result_t BitwisePass(ValidationState_t& _, if (base_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected Base Type to be equal to Result Type: " + << spvOpcodeString(opcode); if (!offset_type || !_.IsIntScalarType(offset_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Offset Type to be int scalar: " - << spvOpcodeString(opcode); + << "Expected Offset Type to be int scalar: " + << spvOpcodeString(opcode); if (!count_type || !_.IsIntScalarType(count_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Count Type to be int scalar: " - << spvOpcodeString(opcode); + << "Expected Count Type to be int scalar: " + << spvOpcodeString(opcode); break; } case SpvOpBitReverse: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t base_type = GetOperandTypeId(_, inst, 2); if (base_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected Base Type to be equal to Result Type: " + << spvOpcodeString(opcode); break; } case SpvOpBitCount: { - if (!_.IsIntScalarType(result_type) && - !_.IsIntVectorType(result_type)) + if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t base_type = GetOperandTypeId(_, inst, 2); if (!base_type || @@ -233,8 +223,9 @@ spv_result_t BitwisePass(ValidationState_t& _, if (base_dimension != result_dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Base dimension to be equal to Result Type dimension: " - << spvOpcodeString(opcode); + << "Expected Base dimension to be equal to Result Type " + "dimension: " + << spvOpcodeString(opcode); break; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_builtins.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_builtins.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f1d19ec7a6b2cb3b576b4d08febb229db241bd59 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_builtins.cpp @@ -0,0 +1,2543 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of built-in variables. + +#include "validate.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "diagnostic.h" +#include "opcode.h" +#include "spirv_target_env.h" +#include "util/bitutils.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +// Returns a short textual description of the id defined by the given +// instruction. +std::string GetIdDesc(const Instruction& inst) { + std::ostringstream ss; + ss << "ID <" << inst.id() << "> (Op" << spvOpcodeString(inst.opcode()) << ")"; + return ss.str(); +} + +// Gets underlying data type which is +// - member type if instruction is OpTypeStruct +// (member index is taken from decoration). +// - data type if id creates a pointer. +// - type of the constant if instruction is OpConst or OpSpecConst. +// +// Fails in any other case. The function is based on built-ins allowed by +// the Vulkan spec. +// TODO: If non-Vulkan validation rules are added then it might need +// to be refactored. +spv_result_t GetUnderlyingType(const ValidationState_t& _, + const Decoration& decoration, + const Instruction& inst, + uint32_t* underlying_type) { + if (decoration.struct_member_index() != Decoration::kInvalidMember) { + assert(inst.opcode() == SpvOpTypeStruct); + *underlying_type = inst.word(decoration.struct_member_index() + 2); + return SPV_SUCCESS; + } + + assert(inst.opcode() != SpvOpTypeStruct); + + if (spvOpcodeIsConstant(inst.opcode())) { + *underlying_type = inst.type_id(); + return SPV_SUCCESS; + } + + uint32_t storage_class = 0; + if (!_.GetPointerTypeInfo(inst.type_id(), underlying_type, &storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << GetIdDesc(inst) + << " is decorated with BuiltIn. BuiltIn decoration should only be " + "applied to struct types, variables and constants."; + } + return SPV_SUCCESS; +} + +// Returns Storage Class used by the instruction if applicable. +// Returns SpvStorageClassMax if not. +SpvStorageClass GetStorageClass(const Instruction& inst) { + switch (inst.opcode()) { + case SpvOpTypePointer: + case SpvOpTypeForwardPointer: { + return SpvStorageClass(inst.word(2)); + } + case SpvOpVariable: { + return SpvStorageClass(inst.word(3)); + } + case SpvOpGenericCastToPtrExplicit: { + return SpvStorageClass(inst.word(4)); + } + default: { break; } + } + return SpvStorageClassMax; +} + +// Helper class managing validation of built-ins. +// TODO: Generic functionality of this class can be moved into +// ValidationState_t to be made available to other users. +class BuiltInsValidator { + public: + BuiltInsValidator(const ValidationState_t& vstate) : _(vstate) {} + + // Run validation. + spv_result_t Run(); + + private: + // Goes through all decorations in the module, if decoration is BuiltIn + // calls ValidateSingleBuiltInAtDefinition(). + spv_result_t ValidateBuiltInsAtDefinition(); + + // Validates the instruction defining an id with built-in decoration. + // Can be called multiple times for the same id, if multiple built-ins are + // specified. Seeds id_to_at_reference_checks_ with decorated ids if needed. + spv_result_t ValidateSingleBuiltInAtDefinition(const Decoration& decoration, + const Instruction& inst); + + // The following section contains functions which are called when id defined + // by |inst| is decorated with BuiltIn |decoration|. + // Most functions are specific to a single built-in and have naming scheme: + // ValidateXYZAtDefinition. Some functions are common to multiple kinds of + // BuiltIn. + spv_result_t ValidateClipOrCullDistanceAtDefinition( + const Decoration& decoration, const Instruction& inst); + spv_result_t ValidateFragCoordAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateFragDepthAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateFrontFacingAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateHelperInvocationAtDefinition( + const Decoration& decoration, const Instruction& inst); + spv_result_t ValidateInvocationIdAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateInstanceIndexAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateLayerOrViewportIndexAtDefinition( + const Decoration& decoration, const Instruction& inst); + spv_result_t ValidatePatchVerticesAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidatePointCoordAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidatePointSizeAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidatePositionAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidatePrimitiveIdAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateSampleIdAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateSampleMaskAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateSamplePositionAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateTessCoordAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateTessLevelOuterAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateTessLevelInnerAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateVertexIndexAtDefinition(const Decoration& decoration, + const Instruction& inst); + spv_result_t ValidateWorkgroupSizeAtDefinition(const Decoration& decoration, + const Instruction& inst); + // Used for GlobalInvocationId, LocalInvocationId, NumWorkgroups, WorkgroupId. + spv_result_t ValidateComputeShaderI32Vec3InputAtDefinition( + const Decoration& decoration, const Instruction& inst); + + // The following section contains functions which are called when id defined + // by |referenced_inst| is + // 1. referenced by |referenced_from_inst| + // 2. dependent on |built_in_inst| which is decorated with BuiltIn + // |decoration|. Most functions are specific to a single built-in and have + // naming scheme: ValidateXYZAtReference. Some functions are common to + // multiple kinds of BuiltIn. + spv_result_t ValidateFragCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateFragDepthAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateFrontFacingAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateHelperInvocationAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateInvocationIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateInstanceIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidatePatchVerticesAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidatePointCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidatePointSizeAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidatePositionAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidatePrimitiveIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateSampleIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateSampleMaskAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateSamplePositionAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateTessCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateTessLevelAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateVertexIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateLayerOrViewportIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateWorkgroupSizeAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + spv_result_t ValidateClipOrCullDistanceAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + // Used for GlobalInvocationId, LocalInvocationId, NumWorkgroups, WorkgroupId. + spv_result_t ValidateComputeShaderI32Vec3InputAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + // Validates that |built_in_inst| is not (even indirectly) referenced from + // within a function which can be called with |execution_model|. + // + // |comment| - text explaining why the restriction was imposed. + // |decoration| - BuiltIn decoration which causes the restriction. + // |referenced_inst| - instruction which is dependent on |built_in_inst| and + // defines the id which was referenced. + // |referenced_from_inst| - instruction which references id defined by + // |referenced_inst| from within a function. + spv_result_t ValidateNotCalledWithExecutionModel( + const char* comment, SpvExecutionModel execution_model, + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + + // The following section contains functions which check that the decorated + // variable has the type specified in the function name. |diag| would be + // called with a corresponding error message, if validation is not successful. + spv_result_t ValidateBool( + const Decoration& decoration, const Instruction& inst, + const std::function& diag); + spv_result_t ValidateI32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag); + spv_result_t ValidateI32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); + spv_result_t ValidateI32Arr( + const Decoration& decoration, const Instruction& inst, + const std::function& diag); + spv_result_t ValidateF32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag); + spv_result_t ValidateOptionalArrayedF32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag); + spv_result_t ValidateF32Helper( + const Decoration& decoration, const Instruction& inst, + const std::function& diag, + uint32_t underlying_type); + spv_result_t ValidateF32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); + spv_result_t ValidateOptionalArrayedF32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); + spv_result_t ValidateF32VecHelper( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag, + uint32_t underlying_type); + // If |num_components| is zero, the number of components is not checked. + spv_result_t ValidateF32Arr( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); + spv_result_t ValidateOptionalArrayedF32Arr( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); + spv_result_t ValidateF32ArrHelper( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag, + uint32_t underlying_type); + + // Generates strings like "Member #0 of struct ID <2>". + std::string GetDefinitionDesc(const Decoration& decoration, + const Instruction& inst) const; + + // Generates strings like "ID <51> (OpTypePointer) is referencing ID <2> + // (OpTypeStruct) which is decorated with BuiltIn Position". + std::string GetReferenceDesc( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst, + SpvExecutionModel execution_model = SpvExecutionModelMax) const; + + // Generates strings like "ID <51> (OpTypePointer) uses storage class + // UniformConstant". + std::string GetStorageClassDesc(const Instruction& inst) const; + + // Updates inner working of the class. Is called sequentially for every + // instruction. + void Update(const Instruction& inst); + + const ValidationState_t& _; + + // Mapping id -> list of rules which validate instruction referencing the + // id. Rules can create new rules and add them to this container. + // Using std::map, and not std::unordered_map to avoid iterator invalidation + // during rehashing. + std::map>> + id_to_at_reference_checks_; + + // Id of the function we are currently inside. 0 if not inside a function. + uint32_t function_id_ = 0; + + // Entry points which can (indirectly) call the current function. + // The pointer either points to a vector inside to function_to_entry_points_ + // or to no_entry_points_. The pointer is guaranteed to never be null. + const std::vector no_entry_points; + const std::vector* entry_points_ = &no_entry_points; + + // Execution models with which the current function can be called. + std::set execution_models_; +}; + +void BuiltInsValidator::Update(const Instruction& inst) { + const SpvOp opcode = inst.opcode(); + if (opcode == SpvOpFunction) { + // Entering a function. + assert(function_id_ == 0); + function_id_ = inst.id(); + execution_models_.clear(); + entry_points_ = &_.FunctionEntryPoints(function_id_); + // Collect execution models from all entry points from which the current + // function can be called. + for (const uint32_t entry_point : *entry_points_) { + if (const auto* models = _.GetExecutionModels(entry_point)) { + execution_models_.insert(models->begin(), models->end()); + } + } + } + + if (opcode == SpvOpFunctionEnd) { + // Exiting a function. + assert(function_id_ != 0); + function_id_ = 0; + entry_points_ = &no_entry_points; + execution_models_.clear(); + } +} + +std::string BuiltInsValidator::GetDefinitionDesc( + const Decoration& decoration, const Instruction& inst) const { + std::ostringstream ss; + if (decoration.struct_member_index() != Decoration::kInvalidMember) { + assert(inst.opcode() == SpvOpTypeStruct); + ss << "Member #" << decoration.struct_member_index(); + ss << " of struct ID <" << inst.id() << ">"; + } else { + ss << GetIdDesc(inst); + } + return ss.str(); +} + +std::string BuiltInsValidator::GetReferenceDesc( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, const Instruction& referenced_from_inst, + SpvExecutionModel execution_model) const { + std::ostringstream ss; + ss << GetIdDesc(referenced_from_inst) << " is referencing " + << GetIdDesc(referenced_inst); + if (built_in_inst.id() != referenced_inst.id()) { + ss << " which is dependent on " << GetIdDesc(built_in_inst); + } + + ss << " which is decorated with BuiltIn "; + ss << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]); + if (function_id_) { + ss << " in function <" << function_id_ << ">"; + if (execution_model != SpvExecutionModelMax) { + ss << " called with execution model "; + ss << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_EXECUTION_MODEL, + execution_model); + } + } + ss << "."; + return ss.str(); +} + +std::string BuiltInsValidator::GetStorageClassDesc( + const Instruction& inst) const { + std::ostringstream ss; + ss << GetIdDesc(inst) << " uses storage class "; + ss << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_STORAGE_CLASS, + GetStorageClass(inst)); + ss << "."; + return ss.str(); +} + +spv_result_t BuiltInsValidator::ValidateBool( + const Decoration& decoration, const Instruction& inst, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + if (!_.IsBoolScalarType(underlying_type)) { + return diag(GetDefinitionDesc(decoration, inst) + " is not a bool scalar."); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateI32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + if (!_.IsIntScalarType(underlying_type)) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an int scalar."); + } + + const uint32_t bit_width = _.GetBitWidth(underlying_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has bit width " << bit_width + << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + // Strip the array, if present. + if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + underlying_type = _.FindDef(underlying_type)->word(2u); + } + + return ValidateF32Helper(decoration, inst, diag, underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateF32( + const Decoration& decoration, const Instruction& inst, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + return ValidateF32Helper(decoration, inst, diag, underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateF32Helper( + const Decoration& decoration, const Instruction& inst, + const std::function& diag, + uint32_t underlying_type) { + if (!_.IsFloatScalarType(underlying_type)) { + return diag(GetDefinitionDesc(decoration, inst) + + " is not a float scalar."); + } + + const uint32_t bit_width = _.GetBitWidth(underlying_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has bit width " << bit_width + << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateI32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + if (!_.IsIntVectorType(underlying_type)) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an int vector."); + } + + const uint32_t actual_num_components = _.GetDimension(underlying_type); + if (_.GetDimension(underlying_type) != num_components) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has " + << actual_num_components << " components."; + return diag(ss.str()); + } + + const uint32_t bit_width = _.GetBitWidth(underlying_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) + << " has components with bit width " << bit_width << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + // Strip the array, if present. + if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + underlying_type = _.FindDef(underlying_type)->word(2u); + } + + return ValidateF32VecHelper(decoration, inst, num_components, diag, + underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateF32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + return ValidateF32VecHelper(decoration, inst, num_components, diag, + underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateF32VecHelper( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag, + uint32_t underlying_type) { + if (!_.IsFloatVectorType(underlying_type)) { + return diag(GetDefinitionDesc(decoration, inst) + + " is not a float vector."); + } + + const uint32_t actual_num_components = _.GetDimension(underlying_type); + if (_.GetDimension(underlying_type) != num_components) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has " + << actual_num_components << " components."; + return diag(ss.str()); + } + + const uint32_t bit_width = _.GetBitWidth(underlying_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) + << " has components with bit width " << bit_width << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateI32Arr( + const Decoration& decoration, const Instruction& inst, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + const Instruction* const type_inst = _.FindDef(underlying_type); + if (type_inst->opcode() != SpvOpTypeArray) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an array."); + } + + const uint32_t component_type = type_inst->word(2); + if (!_.IsIntScalarType(component_type)) { + return diag(GetDefinitionDesc(decoration, inst) + + " components are not int scalar."); + } + + const uint32_t bit_width = _.GetBitWidth(component_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) + << " has components with bit width " << bit_width << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateF32Arr( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + return ValidateF32ArrHelper(decoration, inst, num_components, diag, + underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32Arr( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + // Strip an extra layer of arraying if present. + if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + uint32_t subtype = _.FindDef(underlying_type)->word(2u); + if (_.GetIdOpcode(subtype) == SpvOpTypeArray) { + underlying_type = subtype; + } + } + + return ValidateF32ArrHelper(decoration, inst, num_components, diag, + underlying_type); +} + +spv_result_t BuiltInsValidator::ValidateF32ArrHelper( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag, + uint32_t underlying_type) { + const Instruction* const type_inst = _.FindDef(underlying_type); + if (type_inst->opcode() != SpvOpTypeArray) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an array."); + } + + const uint32_t component_type = type_inst->word(2); + if (!_.IsFloatScalarType(component_type)) { + return diag(GetDefinitionDesc(decoration, inst) + + " components are not float scalar."); + } + + const uint32_t bit_width = _.GetBitWidth(component_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) + << " has components with bit width " << bit_width << "."; + return diag(ss.str()); + } + + if (num_components != 0) { + uint64_t actual_num_components = 0; + if (!_.GetConstantValUint64(type_inst->word(3), &actual_num_components)) { + assert(0 && "Array type definition is corrupt"); + } + if (actual_num_components != num_components) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has " + << actual_num_components << " components."; + return diag(ss.str()); + } + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateNotCalledWithExecutionModel( + const char* comment, SpvExecutionModel execution_model, + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (function_id_) { + if (execution_models_.count(execution_model)) { + const char* execution_model_str = _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_EXECUTION_MODEL, execution_model); + const char* built_in_str = _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]); + return _.diag(SPV_ERROR_INVALID_DATA) + << comment << " " << GetIdDesc(referenced_inst) << " depends on " + << GetIdDesc(built_in_inst) << " which is decorated with BuiltIn " + << built_in_str << "." + << " Id <" << referenced_inst.id() << "> is later referenced by " + << GetIdDesc(referenced_from_inst) << " in function <" + << function_id_ << "> which is called with execution model " + << execution_model_str << "."; + } + } else { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back( + std::bind(&BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + comment, execution_model, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtDefinition( + const Decoration& decoration, const Instruction& inst) { + // Seed at reference checks with this built-in. + return ValidateClipOrCullDistanceAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be only used for variables with Input or Output storage " + "class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassInput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " + "used for variables with Input storage class if execution model is " + "Vertex.", + SpvExecutionModelVertex, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + if (storage_class == SpvStorageClassOutput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " + "used for variables with Output storage class if execution model is " + "Fragment.", + SpvExecutionModelFragment, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelFragment: + case SpvExecutionModelVertex: { + if (spv_result_t error = ValidateF32Arr( + decoration, built_in_inst, /* Any number of components */ 0, + [this, + &decoration](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " variable needs to be a 32-bit float array. " + << message; + })) { + return error; + } + break; + } + case SpvExecutionModelTessellationControl: + case SpvExecutionModelTessellationEvaluation: + case SpvExecutionModelGeometry: { + if (decoration.struct_member_index() != Decoration::kInvalidMember) { + // The outer level of array is applied on the variable. + if (spv_result_t error = ValidateF32Arr( + decoration, built_in_inst, /* Any number of components */ 0, + [this, + &decoration](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " variable needs to be a 32-bit float array. " + << message; + })) { + return error; + } + } else { + if (spv_result_t error = ValidateOptionalArrayedF32Arr( + decoration, built_in_inst, /* Any number of components */ 0, + [this, + &decoration](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " variable needs to be a 32-bit float array. " + << message; + })) { + return error; + } + } + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be used only with Fragment, Vertex, " + "TessellationControl, TessellationEvaluation or Geometry " + "execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back( + std::bind(&BuiltInsValidator::ValidateClipOrCullDistanceAtReference, + this, decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateFragCoordAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Vec( + decoration, inst, 4, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn FragCoord " + "variable needs to be a 4-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateFragCoordAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateFragCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FragCoord to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FragCoord to be used only with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateFragCoordAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateFragDepthAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn FragDepth " + "variable needs to be a 32-bit float scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateFragDepthAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateFragDepthAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FragDepth to be only used for " + "variables with Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FragDepth to be used only with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + + for (const uint32_t entry_point : *entry_points_) { + // Every entry point from which this function is called needs to have + // Execution Mode DepthReplacing. + const auto* modes = _.GetExecutionModes(entry_point); + if (!modes || !modes->count(SpvExecutionModeDepthReplacing)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec requires DepthReplacing execution mode to be " + "declared when using BuiltIn FragDepth. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateFragDepthAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateFrontFacingAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateBool( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn FrontFacing " + "variable needs to be a bool scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateFrontFacingAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateFrontFacingAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FrontFacing to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn FrontFacing to be used only with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateFrontFacingAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateHelperInvocationAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateBool( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn HelperInvocation " + "variable needs to be a bool scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateHelperInvocationAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateHelperInvocationAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn HelperInvocation to be only used " + "for variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn HelperInvocation to be used only " + "with Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back( + std::bind(&BuiltInsValidator::ValidateHelperInvocationAtReference, this, + decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateInvocationIdAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn InvocationId " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateInvocationIdAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateInvocationIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn InvocationId to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelTessellationControl && + execution_model != SpvExecutionModelGeometry) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn InvocationId to be used only " + "with TessellationControl or Geometry execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateInvocationIdAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateInstanceIndexAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn InstanceIndex " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateInstanceIndexAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateInstanceIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn InstanceIndex to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelVertex) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn InstanceIndex to be used only " + "with Vertex execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateInstanceIndexAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidatePatchVerticesAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn PatchVertices " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidatePatchVerticesAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidatePatchVerticesAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PatchVertices to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelTessellationControl && + execution_model != SpvExecutionModelTessellationEvaluation) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PatchVertices to be used only " + "with TessellationControl or TessellationEvaluation " + "execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidatePatchVerticesAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidatePointCoordAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Vec( + decoration, inst, 2, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn PointCoord " + "variable needs to be a 2-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidatePointCoordAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidatePointCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PointCoord to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PointCoord to be used only with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidatePointCoordAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidatePointSizeAtDefinition( + const Decoration& decoration, const Instruction& inst) { + // Seed at reference checks with this built-in. + return ValidatePointSizeAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidatePointSizeAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PointSize to be only used for " + "variables with Input or Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassInput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn PointSize to be used for " + "variables with Input storage class if execution model is Vertex.", + SpvExecutionModelVertex, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelVertex: { + if (spv_result_t error = ValidateF32( + decoration, built_in_inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn PointSize " + "variable needs to be a 32-bit float scalar. " + << message; + })) { + return error; + } + break; + } + case SpvExecutionModelTessellationControl: + case SpvExecutionModelTessellationEvaluation: + case SpvExecutionModelGeometry: { + // PointSize can be a per-vertex variable for tessellation control, + // tessellation evaluation and geometry shader stages. In such cases + // variables will have an array of 32-bit floats. + if (decoration.struct_member_index() != Decoration::kInvalidMember) { + // The array is on the variable, so this must be a 32-bit float. + if (spv_result_t error = ValidateF32( + decoration, built_in_inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + "PointSize " + "variable needs to be a 32-bit float scalar. " + << message; + })) { + return error; + } + } else { + if (spv_result_t error = ValidateOptionalArrayedF32( + decoration, built_in_inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + "PointSize " + "variable needs to be a 32-bit float scalar. " + << message; + })) { + return error; + } + } + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PointSize to be used only with " + "Vertex, TessellationControl, TessellationEvaluation or " + "Geometry execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidatePointSizeAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidatePositionAtDefinition( + const Decoration& decoration, const Instruction& inst) { + // Seed at reference checks with this built-in. + return ValidatePositionAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidatePositionAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn Position to be only used for " + "variables with Input or Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassInput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn Position to be used for variables " + "with Input storage class if execution model is Vertex.", + SpvExecutionModelVertex, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelVertex: { + if (spv_result_t error = ValidateF32Vec( + decoration, built_in_inst, 4, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn Position " + "variable needs to be a 4-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + break; + } + case SpvExecutionModelGeometry: + case SpvExecutionModelTessellationControl: + case SpvExecutionModelTessellationEvaluation: { + // Position can be a per-vertex variable for tessellation control, + // tessellation evaluation and geometry shader stages. In such cases + // variables will have an array of 4-component 32-bit float vectors. + if (decoration.struct_member_index() != Decoration::kInvalidMember) { + // The array is on the variable, so this must be a 4-component + // 32-bit float vector. + if (spv_result_t error = ValidateF32Vec( + decoration, built_in_inst, 4, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn Position " + "variable needs to be a 4-component 32-bit " + "float vector. " + << message; + })) { + return error; + } + } else { + if (spv_result_t error = ValidateOptionalArrayedF32Vec( + decoration, built_in_inst, 4, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn Position " + "variable needs to be a 4-component 32-bit " + "float vector. " + << message; + })) { + return error; + } + } + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn Position to be used only " + "with Vertex, TessellationControl, TessellationEvaluation" + " or Geometry execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidatePositionAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidatePrimitiveIdAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn PrimitiveId " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidatePrimitiveIdAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidatePrimitiveIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PrimitiveId to be only used for " + "variables with Input or Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassOutput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " + "variables with Output storage class if execution model is " + "TessellationControl.", + SpvExecutionModelTessellationControl, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " + "variables with Output storage class if execution model is " + "TessellationEvaluation.", + SpvExecutionModelTessellationEvaluation, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " + "variables with Output storage class if execution model is " + "Fragment.", + SpvExecutionModelFragment, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelFragment: + case SpvExecutionModelTessellationControl: + case SpvExecutionModelTessellationEvaluation: + case SpvExecutionModelGeometry: { + // Ok. + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn PrimitiveId to be used only " + "with Fragment, TessellationControl, " + "TessellationEvaluation or Geometry execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidatePrimitiveIdAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateSampleIdAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn SampleId " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateSampleIdAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateSampleIdAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SampleId to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SampleId to be used only with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateSampleIdAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateSampleMaskAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32Arr( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn SampleMask " + "variable needs to be a 32-bit int array. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateSampleMaskAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateSampleMaskAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SampleMask to be only used for " + "variables with Input or Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SampleMask to be used only " + "with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateSampleMaskAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateSamplePositionAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Vec( + decoration, inst, 2, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn SamplePosition " + "variable needs to be a 2-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateSamplePositionAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateSamplePositionAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SamplePosition to be only used " + "for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelFragment) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn SamplePosition to be used only " + "with " + "Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateSamplePositionAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateTessCoordAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Vec( + decoration, inst, 3, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn TessCoord " + "variable needs to be a 3-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateTessCoordAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateTessCoordAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn TessCoord to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelTessellationEvaluation) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn TessCoord to be used only with " + "TessellationEvaluation execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateTessCoordAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateTessLevelOuterAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Arr( + decoration, inst, 4, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn TessLevelOuter " + "variable needs to be a 4-component 32-bit float " + "array. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateTessLevelAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateTessLevelInnerAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateF32Arr( + decoration, inst, 2, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn TessLevelOuter " + "variable needs to be a 2-component 32-bit float " + "array. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateTessLevelAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateTessLevelAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be only used for variables with Input or Output storage " + "class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassInput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be " + "used " + "for variables with Input storage class if execution model is " + "TessellationControl.", + SpvExecutionModelTessellationControl, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + if (storage_class == SpvStorageClassOutput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be " + "used " + "for variables with Output storage class if execution model is " + "TessellationEvaluation.", + SpvExecutionModelTessellationEvaluation, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelTessellationControl: + case SpvExecutionModelTessellationEvaluation: { + // Ok. + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be used only with TessellationControl or " + "TessellationEvaluation execution models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateTessLevelAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateVertexIndexAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn VertexIndex " + "variable needs to be a 32-bit int scalar. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateVertexIndexAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateVertexIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn VertexIndex to be only used for " + "variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelVertex) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn VertexIndex to be used only " + "with " + "Vertex execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateVertexIndexAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32( + decoration, inst, + [this, &decoration](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << "variable needs to be a 32-bit int scalar. " << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateLayerOrViewportIndexAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput && + storage_class != SpvStorageClassOutput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be only used for variables with Input or Output storage " + "class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + if (storage_class == SpvStorageClassInput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn Layer and " + "ViewportIndex to be " + "used for variables with Input storage class if " + "execution model is " + "Geometry.", + SpvExecutionModelGeometry, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + if (storage_class == SpvStorageClassOutput) { + assert(function_id_ == 0); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, + "Vulkan spec doesn't allow BuiltIn Layer and " + "ViewportIndex to be " + "used for variables with Output storage class if " + "execution model is " + "Fragment.", + SpvExecutionModelFragment, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + switch (execution_model) { + case SpvExecutionModelGeometry: + case SpvExecutionModelFragment: { + // Ok. + break; + } + + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be used only with Fragment or Geometry execution " + "models. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back( + std::bind(&BuiltInsValidator::ValidateLayerOrViewportIndexAtReference, + this, decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (spv_result_t error = ValidateI32Vec( + decoration, inst, 3, + [this, &decoration](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " variable needs to be a 3-component 32-bit int " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateComputeShaderI32Vec3InputAtReference(decoration, inst, inst, + inst); +} + +spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != SpvStorageClassMax && + storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be only used for variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelGLCompute) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be used only with GLCompute execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtReference, this, + decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateWorkgroupSizeAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + if (!spvOpcodeIsConstant(inst.opcode())) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec requires BuiltIn WorkgroupSize to be a " + "constant. " + << GetIdDesc(inst) << " is not a constant."; + } + + if (spv_result_t error = ValidateI32Vec( + decoration, inst, 3, + [this](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA) + << "According to the Vulkan spec BuiltIn WorkgroupSize " + "variable " + "needs to be a 3-component 32-bit int vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateWorkgroupSizeAtReference(decoration, inst, inst, inst); +} + +spv_result_t BuiltInsValidator::ValidateWorkgroupSizeAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + for (const SpvExecutionModel execution_model : execution_models_) { + if (execution_model != SpvExecutionModelGLCompute) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Vulkan spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + decoration.params()[0]) + << " to be used only with GLCompute execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateWorkgroupSizeAtReference, this, decoration, + built_in_inst, referenced_from_inst, std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateSingleBuiltInAtDefinition( + const Decoration& decoration, const Instruction& inst) { + const SpvBuiltIn label = SpvBuiltIn(decoration.params()[0]); + // If you are adding a new BuiltIn enum, please register it here. + // If the newly added enum has validation rules associated with it + // consider leaving a TODO and/or creating an issue. + switch (label) { + case SpvBuiltInClipDistance: + case SpvBuiltInCullDistance: { + return ValidateClipOrCullDistanceAtDefinition(decoration, inst); + } + case SpvBuiltInFragCoord: { + return ValidateFragCoordAtDefinition(decoration, inst); + } + case SpvBuiltInFragDepth: { + return ValidateFragDepthAtDefinition(decoration, inst); + } + case SpvBuiltInFrontFacing: { + return ValidateFrontFacingAtDefinition(decoration, inst); + } + case SpvBuiltInGlobalInvocationId: + case SpvBuiltInLocalInvocationId: + case SpvBuiltInNumWorkgroups: + case SpvBuiltInWorkgroupId: { + return ValidateComputeShaderI32Vec3InputAtDefinition(decoration, inst); + } + case SpvBuiltInHelperInvocation: { + return ValidateHelperInvocationAtDefinition(decoration, inst); + } + case SpvBuiltInInvocationId: { + return ValidateInvocationIdAtDefinition(decoration, inst); + } + case SpvBuiltInInstanceIndex: { + return ValidateInstanceIndexAtDefinition(decoration, inst); + } + case SpvBuiltInLayer: + case SpvBuiltInViewportIndex: { + return ValidateLayerOrViewportIndexAtDefinition(decoration, inst); + } + case SpvBuiltInPatchVertices: { + return ValidatePatchVerticesAtDefinition(decoration, inst); + } + case SpvBuiltInPointCoord: { + return ValidatePointCoordAtDefinition(decoration, inst); + } + case SpvBuiltInPointSize: { + return ValidatePointSizeAtDefinition(decoration, inst); + } + case SpvBuiltInPosition: { + return ValidatePositionAtDefinition(decoration, inst); + } + case SpvBuiltInPrimitiveId: { + return ValidatePrimitiveIdAtDefinition(decoration, inst); + } + case SpvBuiltInSampleId: { + return ValidateSampleIdAtDefinition(decoration, inst); + } + case SpvBuiltInSampleMask: { + return ValidateSampleMaskAtDefinition(decoration, inst); + } + case SpvBuiltInSamplePosition: { + return ValidateSamplePositionAtDefinition(decoration, inst); + } + case SpvBuiltInTessCoord: { + return ValidateTessCoordAtDefinition(decoration, inst); + } + case SpvBuiltInTessLevelOuter: { + return ValidateTessLevelOuterAtDefinition(decoration, inst); + } + case SpvBuiltInTessLevelInner: { + return ValidateTessLevelInnerAtDefinition(decoration, inst); + } + case SpvBuiltInVertexIndex: { + return ValidateVertexIndexAtDefinition(decoration, inst); + } + case SpvBuiltInWorkgroupSize: { + return ValidateWorkgroupSizeAtDefinition(decoration, inst); + } + case SpvBuiltInVertexId: + case SpvBuiltInInstanceId: + case SpvBuiltInLocalInvocationIndex: + case SpvBuiltInWorkDim: + case SpvBuiltInGlobalSize: + case SpvBuiltInEnqueuedWorkgroupSize: + case SpvBuiltInGlobalOffset: + case SpvBuiltInGlobalLinearId: + case SpvBuiltInSubgroupSize: + case SpvBuiltInSubgroupMaxSize: + case SpvBuiltInNumSubgroups: + case SpvBuiltInNumEnqueuedSubgroups: + case SpvBuiltInSubgroupId: + case SpvBuiltInSubgroupLocalInvocationId: + case SpvBuiltInSubgroupEqMaskKHR: + case SpvBuiltInSubgroupGeMaskKHR: + case SpvBuiltInSubgroupGtMaskKHR: + case SpvBuiltInSubgroupLeMaskKHR: + case SpvBuiltInSubgroupLtMaskKHR: + case SpvBuiltInBaseVertex: + case SpvBuiltInBaseInstance: + case SpvBuiltInDrawIndex: + case SpvBuiltInDeviceIndex: + case SpvBuiltInViewIndex: + case SpvBuiltInBaryCoordNoPerspAMD: + case SpvBuiltInBaryCoordNoPerspCentroidAMD: + case SpvBuiltInBaryCoordNoPerspSampleAMD: + case SpvBuiltInBaryCoordSmoothAMD: + case SpvBuiltInBaryCoordSmoothCentroidAMD: + case SpvBuiltInBaryCoordSmoothSampleAMD: + case SpvBuiltInBaryCoordPullModelAMD: + case SpvBuiltInFragStencilRefEXT: + case SpvBuiltInViewportMaskNV: + case SpvBuiltInSecondaryPositionNV: + case SpvBuiltInSecondaryViewportMaskNV: + case SpvBuiltInPositionPerViewNV: + case SpvBuiltInViewportMaskPerViewNV: + case SpvBuiltInFullyCoveredEXT: + case SpvBuiltInMax: { + // No validation rules (for the moment). + break; + } + } + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::ValidateBuiltInsAtDefinition() { + for (const auto& kv : _.id_decorations()) { + const uint32_t id = kv.first; + const auto& decorations = kv.second; + if (decorations.empty()) { + continue; + } + + const Instruction* inst = _.FindDef(id); + assert(inst); + + for (const auto& decoration : kv.second) { + if (decoration.dec_type() != SpvDecorationBuiltIn) { + continue; + } + + if (spv_result_t error = + ValidateSingleBuiltInAtDefinition(decoration, *inst)) { + return error; + } + } + } + + return SPV_SUCCESS; +} + +spv_result_t BuiltInsValidator::Run() { + // First pass: validate all built-ins at definition and seed + // id_to_at_reference_checks_ with built-ins. + if (auto error = ValidateBuiltInsAtDefinition()) { + return error; + } + + if (id_to_at_reference_checks_.empty()) { + // No validation tasks were seeded. Nothing else to do. + return SPV_SUCCESS; + } + + // Second pass: validate every id reference in the module using + // rules in id_to_at_reference_checks_. + for (const Instruction& inst : _.ordered_instructions()) { + Update(inst); + + std::set already_checked; + + for (const auto& operand : inst.operands()) { + if (!spvIsIdType(operand.type)) { + // Not id. + continue; + } + + const uint32_t id = inst.word(operand.offset); + if (id == inst.id()) { + // No need to check result id. + continue; + } + + if (!already_checked.insert(id).second) { + // The instruction has already referenced this id. + continue; + } + + // Instruction references the id. Run all checks associated with the id + // on the instruction. id_to_at_reference_checks_ can be modified in the + // process, iterators are safe because it's a tree-based map. + const auto it = id_to_at_reference_checks_.find(id); + if (it != id_to_at_reference_checks_.end()) { + for (const auto& check : it->second) { + if (spv_result_t error = check(inst)) { + return error; + } + } + } + } + } + + return SPV_SUCCESS; +} + +} // anonymous namespace + +// Validates correctness of built-in variables. +spv_result_t ValidateBuiltIns(const ValidationState_t& _) { + if (!spvIsVulkanEnv(_.context()->target_env)) { + // Early return. All currently implemented rules are based on Vulkan spec. + // + // TODO: If you are adding validation rules for environments other than + // Vulkan (or general rules which are not environment independent), then you + // need to modify or remove this condition. Consider also adding early + // returns into BuiltIn-specific rules, so that the system doesn't spawn new + // rules which don't do anything. + return SPV_SUCCESS; + } + + BuiltInsValidator validator(_); + return validator.Run(); +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_capability.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_capability.cpp index cd6855288e3d64271a3bfa76c501db67edd9c80c..1a47ebc5e73a3ed93d4acb7366cc67bc6224d9c9 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_capability.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_capability.cpp @@ -77,20 +77,105 @@ bool IsSupportOptionalVulkan_1_0(uint32_t capability) { return false; } +bool IsSupportGuaranteedOpenCL_1_2(uint32_t capability, bool embedded_profile) { + switch (capability) { + case SpvCapabilityAddresses: + case SpvCapabilityFloat16Buffer: + case SpvCapabilityGroups: + case SpvCapabilityInt16: + case SpvCapabilityInt8: + case SpvCapabilityKernel: + case SpvCapabilityLinkage: + case SpvCapabilityVector16: + return true; + case SpvCapabilityInt64: + return !embedded_profile; + case SpvCapabilityPipes: + return embedded_profile; + } + return false; +} + +bool IsSupportGuaranteedOpenCL_2_0(uint32_t capability, bool embedded_profile) { + if (IsSupportGuaranteedOpenCL_1_2(capability, embedded_profile)) return true; + + switch (capability) { + case SpvCapabilityDeviceEnqueue: + case SpvCapabilityGenericPointer: + case SpvCapabilityPipes: + return true; + } + return false; +} + +bool IsSupportGuaranteedOpenCL_2_2(uint32_t capability, bool embedded_profile) { + if (IsSupportGuaranteedOpenCL_2_0(capability, embedded_profile)) return true; + + switch (capability) { + case SpvCapabilitySubgroupDispatch: + case SpvCapabilityPipeStorage: + return true; + } + return false; +} + +bool IsSupportOptionalOpenCL_1_2(uint32_t capability) { + switch (capability) { + case SpvCapabilityImageBasic: + case SpvCapabilityFloat64: + return true; + } + return false; +} + // Checks if |capability| was enabled by extension. bool IsEnabledByExtension(ValidationState_t& _, uint32_t capability) { spv_operand_desc operand_desc = nullptr; - _.grammar().lookupOperand( - SPV_OPERAND_TYPE_CAPABILITY, capability, &operand_desc); + _.grammar().lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, capability, + &operand_desc); // operand_desc is expected to be not null, otherwise validator would have // failed at an earlier stage. This 'assert' is 'just in case'. assert(operand_desc); - if (operand_desc->extensions.IsEmpty()) + ExtensionSet operand_exts(operand_desc->numExtensions, + operand_desc->extensions); + if (operand_exts.IsEmpty()) return false; + + return _.HasAnyOfExtensions(operand_exts); +} + +bool IsEnabledByCapabilityOpenCL_1_2(ValidationState_t& _, + uint32_t capability) { + if (_.HasCapability(SpvCapabilityImageBasic)) { + switch (capability) { + case SpvCapabilityLiteralSampler: + case SpvCapabilitySampled1D: + case SpvCapabilityImage1D: + case SpvCapabilitySampledBuffer: + case SpvCapabilityImageBuffer: + return true; + } return false; + } + return false; +} - return _.HasAnyOfExtensions(operand_desc->extensions); +bool IsEnabledByCapabilityOpenCL_2_0(ValidationState_t& _, + uint32_t capability) { + if (_.HasCapability(SpvCapabilityImageBasic)) { + switch (capability) { + case SpvCapabilityImageReadWrite: + case SpvCapabilityLiteralSampler: + case SpvCapabilitySampled1D: + case SpvCapabilityImage1D: + case SpvCapabilitySampledBuffer: + case SpvCapabilityImageBuffer: + return true; + } + return false; + } + return false; } } // namespace @@ -100,8 +185,7 @@ bool IsEnabledByExtension(ValidationState_t& _, uint32_t capability) { spv_result_t CapabilityPass(ValidationState_t& _, const spv_parsed_instruction_t* inst) { const SpvOp opcode = static_cast(inst->opcode); - if (opcode != SpvOpCapability) - return SPV_SUCCESS; + if (opcode != SpvOpCapability) return SPV_SUCCESS; assert(inst->num_operands == 1); @@ -111,16 +195,64 @@ spv_result_t CapabilityPass(ValidationState_t& _, assert(operand.offset < inst->num_words); const uint32_t capability = inst->words[operand.offset]; + const auto capability_str = [&_, capability]() { + spv_operand_desc desc = nullptr; + if (_.grammar().lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, capability, + &desc) != SPV_SUCCESS || + !desc) { + return std::string("Unknown"); + } + return std::string(desc->name); + }; const auto env = _.context()->target_env; + const bool opencl_embedded = env == SPV_ENV_OPENCL_EMBEDDED_1_2 || + env == SPV_ENV_OPENCL_EMBEDDED_2_0 || + env == SPV_ENV_OPENCL_EMBEDDED_2_1 || + env == SPV_ENV_OPENCL_EMBEDDED_2_2; + const std::string opencl_profile = opencl_embedded ? "Embedded" : "Full"; if (env == SPV_ENV_VULKAN_1_0) { if (!IsSupportGuaranteedVulkan_1_0(capability) && !IsSupportOptionalVulkan_1_0(capability) && !IsEnabledByExtension(_, capability)) { return _.diag(SPV_ERROR_INVALID_CAPABILITY) - << "Capability value " << capability - << " is not allowed by Vulkan 1.0 specification" - << " (or requires extension)"; + << "Capability " << capability_str() + << " is not allowed by Vulkan 1.0 specification" + << " (or requires extension)"; + } + } else if (env == SPV_ENV_OPENCL_1_2 || env == SPV_ENV_OPENCL_EMBEDDED_1_2) { + if (!IsSupportGuaranteedOpenCL_1_2(capability, opencl_embedded) && + !IsSupportOptionalOpenCL_1_2(capability) && + !IsEnabledByExtension(_, capability) && + !IsEnabledByCapabilityOpenCL_1_2(_, capability)) { + return _.diag(SPV_ERROR_INVALID_CAPABILITY) + << "Capability " << capability_str() + << " is not allowed by OpenCL 1.2 " << opencl_profile + << " Profile specification" + << " (or requires extension or capability)"; + } + } else if (env == SPV_ENV_OPENCL_2_0 || env == SPV_ENV_OPENCL_EMBEDDED_2_0 || + env == SPV_ENV_OPENCL_2_1 || env == SPV_ENV_OPENCL_EMBEDDED_2_1) { + if (!IsSupportGuaranteedOpenCL_2_0(capability, opencl_embedded) && + !IsSupportOptionalOpenCL_1_2(capability) && + !IsEnabledByExtension(_, capability) && + !IsEnabledByCapabilityOpenCL_2_0(_, capability)) { + return _.diag(SPV_ERROR_INVALID_CAPABILITY) + << "Capability " << capability_str() + << " is not allowed by OpenCL 2.0/2.1 " << opencl_profile + << " Profile specification" + << " (or requires extension or capability)"; + } + } else if (env == SPV_ENV_OPENCL_2_2 || env == SPV_ENV_OPENCL_EMBEDDED_2_2) { + if (!IsSupportGuaranteedOpenCL_2_2(capability, opencl_embedded) && + !IsSupportOptionalOpenCL_1_2(capability) && + !IsEnabledByExtension(_, capability) && + !IsEnabledByCapabilityOpenCL_2_0(_, capability)) { + return _.diag(SPV_ERROR_INVALID_CAPABILITY) + << "Capability " << capability_str() + << " is not allowed by OpenCL 2.2 " << opencl_profile + << " Profile specification" + << " (or requires extension or capability)"; } } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_cfg.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_cfg.cpp index f237a0fd609a2a20ee9815bfbdb4185b2539d6c7..15b569835c6670e7103c6a830e3bb017770b2cc5 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_cfg.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_cfg.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "validate.h" #include "cfa.h" +#include "validate.h" #include #include @@ -261,11 +261,16 @@ spv_result_t PerformCfgChecks(ValidationState_t& _) { // Check all referenced blocks are defined within a function if (function.undefined_block_count() != 0) { string undef_blocks("{"); + bool first = true; for (auto undefined_block : function.undefined_blocks()) { - undef_blocks += _.getIdName(undefined_block) + " "; + undef_blocks += _.getIdName(undefined_block); + if (!first) { + undef_blocks += " "; + } + first = false; } return _.diag(SPV_ERROR_INVALID_CFG) - << "Block(s) " << undef_blocks << "\b}" + << "Block(s) " << undef_blocks << "}" << " are referenced but not defined in function " << _.getIdName(function.id()); } @@ -298,8 +303,9 @@ spv_result_t PerformCfgChecks(ValidationState_t& _) { function.pseudo_exit_block(), function.AugmentedCFGPredecessorsFunction(), ignore_block, [&](cbb_ptr b) { postdom_postorder.push_back(b); }, ignore_edge); - auto postdom_edges = spvtools::CFA::CalculateDominators( - postdom_postorder, function.AugmentedCFGSuccessorsFunction()); + auto postdom_edges = + spvtools::CFA::CalculateDominators( + postdom_postorder, function.AugmentedCFGSuccessorsFunction()); for (auto edge : postdom_edges) { edge.first->SetImmediatePostDominator(edge.second); } @@ -407,14 +413,19 @@ spv_result_t CfgPass(ValidationState_t& _, assert(return_type_inst); if (return_type_inst->opcode() != SpvOpTypeVoid) return _.diag(SPV_ERROR_INVALID_CFG) - << "OpReturn can only be called from a function with void " - << "return type."; + << "OpReturn can only be called from a function with void " + << "return type."; } // Fallthrough. case SpvOpKill: case SpvOpReturnValue: case SpvOpUnreachable: _.current_function().RegisterBlockEnd(vector(), opcode); + if (opcode == SpvOpKill) { + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + "OpKill requires Fragment execution model"); + } break; default: break; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_composites.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_composites.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c163786e531a95c61a51c18790e2b5d6988cfb4b --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_composites.cpp @@ -0,0 +1,481 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of composite SPIR-V instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +// Returns the type of the value accessed by OpCompositeExtract or +// OpCompositeInsert instruction. The function traverses the hierarchy of +// nested data structures (structs, arrays, vectors, matrices) as directed by +// the sequence of indices in the instruction. May return error if traversal +// fails (encountered non-composite, out of bounds, nesting too deep). +// Returns the type of Composite operand if the instruction has no indices. +spv_result_t GetExtractInsertValueType(ValidationState_t& _, + const spv_parsed_instruction_t& inst, + uint32_t* member_type) { + const SpvOp opcode = static_cast(inst.opcode); + assert(opcode == SpvOpCompositeExtract || opcode == SpvOpCompositeInsert); + uint32_t word_index = opcode == SpvOpCompositeExtract ? 4 : 5; + const uint32_t num_words = static_cast(inst.num_words); + const uint32_t composite_id_index = word_index - 1; + + const uint32_t num_indices = num_words - word_index; + const uint32_t kCompositeExtractInsertMaxNumIndices = 255; + if (num_indices > kCompositeExtractInsertMaxNumIndices) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "The number of indexes in Op" << spvOpcodeString(opcode) + << " may not exceed " << kCompositeExtractInsertMaxNumIndices + << ". Found " << num_indices << " indexes."; + } + + *member_type = _.GetTypeId(inst.words[composite_id_index]); + if (*member_type == 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Composite to be an object of composite type"; + } + + for (; word_index < num_words; ++word_index) { + const uint32_t component_index = inst.words[word_index]; + const Instruction* const type_inst = _.FindDef(*member_type); + assert(type_inst); + switch (type_inst->opcode()) { + case SpvOpTypeVector: { + *member_type = type_inst->word(2); + const uint32_t vector_size = type_inst->word(3); + if (component_index >= vector_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": vector access is out of bounds, vector size is " + << vector_size << ", but access index is " << component_index; + } + break; + } + case SpvOpTypeMatrix: { + *member_type = type_inst->word(2); + const uint32_t num_cols = type_inst->word(3); + if (component_index >= num_cols) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": matrix access is out of bounds, matrix has " << num_cols + << " columns, but access index is " << component_index; + } + break; + } + case SpvOpTypeArray: { + uint64_t array_size = 0; + auto size = _.FindDef(type_inst->word(3)); + *member_type = type_inst->word(2); + if (spvOpcodeIsSpecConstant(size->opcode())) { + // Cannot verify against the size of this array. + break; + } + + if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { + assert(0 && "Array type definition is corrupt"); + } + if (component_index >= array_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": array access is out of bounds, array size is " + << array_size << ", but access index is " << component_index; + } + break; + } + case SpvOpTypeRuntimeArray: { + *member_type = type_inst->word(2); + // Array size is unknown. + break; + } + case SpvOpTypeStruct: { + const size_t num_struct_members = type_inst->words().size() - 2; + if (component_index >= num_struct_members) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Index is out of bounds: Op" << spvOpcodeString(opcode) + << " can not find index " << component_index + << " into the structure '" << type_inst->id() + << "'. This structure has " << num_struct_members + << " members. Largest valid index is " + << num_struct_members - 1 << "."; + } + *member_type = type_inst->word(component_index + 2); + break; + } + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "Op" << spvOpcodeString(opcode) + << " reached non-composite type while indexes still remain to " + "be traversed."; + } + } + + return SPV_SUCCESS; +} + +} // anonymous namespace + +// Validates correctness of composite instructions. +spv_result_t CompositesPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + const uint32_t num_operands = static_cast(inst->num_operands); + + switch (opcode) { + case SpvOpVectorExtractDynamic: { + const SpvOp result_opcode = _.GetIdOpcode(result_type); + if (!spvOpcodeIsScalarType(result_opcode)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be a scalar type"; + } + + const uint32_t vector_type = _.GetOperandTypeId(inst, 2); + const SpvOp vector_opcode = _.GetIdOpcode(vector_type); + if (vector_opcode != SpvOpTypeVector) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Vector type to be OpTypeVector"; + } + + if (_.GetComponentType(vector_type) != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Vector component type to be equal to Result Type"; + } + + const uint32_t index_type = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarType(index_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Index to be int scalar"; + } + + break; + } + + case SpvOpVectorInsertDynamic: { + const SpvOp result_opcode = _.GetIdOpcode(result_type); + if (result_opcode != SpvOpTypeVector) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be OpTypeVector"; + } + + const uint32_t vector_type = _.GetOperandTypeId(inst, 2); + if (vector_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Vector type to be equal to Result Type"; + } + + const uint32_t component_type = _.GetOperandTypeId(inst, 3); + if (_.GetComponentType(result_type) != component_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Component type to be equal to Result Type " + << "component type"; + } + + const uint32_t index_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarType(index_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Index to be int scalar"; + } + + break; + } + + case SpvOpVectorShuffle: { + // Handled in validate_id.cpp. + // TODO(atgoo@github.com) Consider moving it here. + break; + } + + case SpvOpCompositeConstruct: { + const SpvOp result_opcode = _.GetIdOpcode(result_type); + switch (result_opcode) { + case SpvOpTypeVector: { + const uint32_t num_result_components = _.GetDimension(result_type); + const uint32_t result_component_type = + _.GetComponentType(result_type); + uint32_t given_component_count = 0; + + if (num_operands <= 3) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected number of constituents to be at least 2"; + } + + for (uint32_t operand_index = 2; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = + _.GetOperandTypeId(inst, operand_index); + if (operand_type == result_component_type) { + ++given_component_count; + } else { + if (_.GetIdOpcode(operand_type) != SpvOpTypeVector || + _.GetComponentType(operand_type) != result_component_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Constituents to be scalars or vectors of " + << "the same type as Result Type components"; + } + + given_component_count += _.GetDimension(operand_type); + } + } + + if (num_result_components != given_component_count) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected total number of given components to be equal " + << "to the size of Result Type vector"; + } + + break; + } + case SpvOpTypeMatrix: { + uint32_t result_num_rows = 0; + uint32_t result_num_cols = 0; + uint32_t result_col_type = 0; + uint32_t result_component_type = 0; + if (!_.GetMatrixTypeInfo(result_type, &result_num_rows, + &result_num_cols, &result_col_type, + &result_component_type)) { + assert(0); + } + + if (result_num_cols + 2 != num_operands) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected total number of Constituents to be equal " + << "to the number of columns of Result Type matrix"; + } + + for (uint32_t operand_index = 2; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = + _.GetOperandTypeId(inst, operand_index); + if (operand_type != result_col_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Constituent type to be equal to the column " + << "type Result Type matrix"; + } + } + + break; + } + case SpvOpTypeArray: { + const Instruction* const array_inst = _.FindDef(result_type); + assert(array_inst); + assert(array_inst->opcode() == SpvOpTypeArray); + + auto size = _.FindDef(array_inst->word(3)); + if (spvOpcodeIsSpecConstant(size->opcode())) { + // Cannot verify against the size of this array. + break; + } + + uint64_t array_size = 0; + if (!_.GetConstantValUint64(array_inst->word(3), &array_size)) { + assert(0 && "Array type definition is corrupt"); + } + + if (array_size + 2 != num_operands) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected total number of Constituents to be equal " + << "to the number of elements of Result Type array"; + } + + const uint32_t result_component_type = array_inst->word(2); + for (uint32_t operand_index = 2; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = + _.GetOperandTypeId(inst, operand_index); + if (operand_type != result_component_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Constituent type to be equal to the column " + << "type Result Type array"; + } + } + + break; + } + case SpvOpTypeStruct: { + const Instruction* const struct_inst = _.FindDef(result_type); + assert(struct_inst); + assert(struct_inst->opcode() == SpvOpTypeStruct); + + if (struct_inst->operands().size() + 1 != num_operands) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected total number of Constituents to be equal " + << "to the number of members of Result Type struct"; + } + + for (uint32_t operand_index = 2; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = + _.GetOperandTypeId(inst, operand_index); + const uint32_t member_type = struct_inst->word(operand_index); + if (operand_type != member_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Constituent type to be equal to the " + << "corresponding member type of Result Type struct"; + } + } + + break; + } + default: { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be a composite type"; + } + } + + break; + } + + case SpvOpCompositeExtract: { + uint32_t member_type = 0; + if (spv_result_t error = + GetExtractInsertValueType(_, *inst, &member_type)) { + return error; + } + + if (result_type != member_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Op" << spvOpcodeString(opcode) << " result type (Op" + << spvOpcodeString(_.GetIdOpcode(result_type)) + << ") does not match the type that results from indexing into " + "the " + "composite (Op" + << spvOpcodeString(_.GetIdOpcode(member_type)) << ")."; + } + break; + } + + case SpvOpCompositeInsert: { + const uint32_t object_type = _.GetOperandTypeId(inst, 2); + const uint32_t composite_type = _.GetOperandTypeId(inst, 3); + + if (result_type != composite_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "The Result Type must be the same as Composite type in Op" + << spvOpcodeString(opcode) << " yielding Result Id " + << result_type << "."; + } + + uint32_t member_type = 0; + if (spv_result_t error = + GetExtractInsertValueType(_, *inst, &member_type)) { + return error; + } + + if (object_type != member_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "The Object type (Op" + << spvOpcodeString(_.GetIdOpcode(object_type)) << ") in Op" + << spvOpcodeString(opcode) + << " does not match the type that results from indexing into " + "the Composite (Op" + << spvOpcodeString(_.GetIdOpcode(member_type)) << ")."; + } + break; + } + + case SpvOpCopyObject: { + if (!spvOpcodeGeneratesType(_.GetIdOpcode(result_type))) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be a type"; + } + + const uint32_t operand_type = _.GetOperandTypeId(inst, 2); + if (operand_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type and Operand type to be the same"; + } + + break; + } + + case SpvOpTranspose: { + uint32_t result_num_rows = 0; + uint32_t result_num_cols = 0; + uint32_t result_col_type = 0; + uint32_t result_component_type = 0; + if (!_.GetMatrixTypeInfo(result_type, &result_num_rows, &result_num_cols, + &result_col_type, &result_component_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be a matrix type"; + } + + const uint32_t matrix_type = _.GetOperandTypeId(inst, 2); + uint32_t matrix_num_rows = 0; + uint32_t matrix_num_cols = 0; + uint32_t matrix_col_type = 0; + uint32_t matrix_component_type = 0; + if (!_.GetMatrixTypeInfo(matrix_type, &matrix_num_rows, &matrix_num_cols, + &matrix_col_type, &matrix_component_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Matrix to be of type OpTypeMatrix"; + } + + if (result_component_type != matrix_component_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected component types of Matrix and Result Type to be " + << "identical"; + } + + if (result_num_rows != matrix_num_cols || + result_num_cols != matrix_num_rows) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected number of columns and the column size of Matrix " + << "to be the reverse of those of Result Type"; + } + + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_conversion.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_conversion.cpp index 222796e7816b2317024547a8518862e75106a566..75ff6a2e18797f44510ecbbb35be96616953b62e 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_conversion.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_conversion.cpp @@ -34,20 +34,20 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected unsigned int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected unsigned int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!input_type || (!_.IsFloatScalarType(input_type) && !_.IsFloatVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be float scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be float scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); break; } @@ -55,20 +55,20 @@ spv_result_t ConversionPass(ValidationState_t& _, case SpvOpConvertFToS: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!input_type || (!_.IsFloatScalarType(input_type) && !_.IsFloatVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be float scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be float scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); break; } @@ -78,75 +78,74 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - if (!input_type || (!_.IsIntScalarType(input_type) && - !_.IsIntVectorType(input_type))) + if (!input_type || + (!_.IsIntScalarType(input_type) && !_.IsIntVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be int scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be int scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); break; } -#if 0 - // TODO(atgoo@github.com) Reenable this once VulkanCTS can pass this test. case SpvOpUConvert: { if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected unsigned int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected unsigned int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - if (!input_type || (!_.IsIntScalarType(input_type) && - !_.IsIntVectorType(input_type))) + if (!input_type || + (!_.IsIntScalarType(input_type) && !_.IsIntVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be int scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be int scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); if (_.GetBitWidth(result_type) == _.GetBitWidth(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have different bit width from Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have different bit width from Result " + "Type: " + << spvOpcodeString(opcode); break; } -#endif case SpvOpSConvert: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - if (!input_type || (!_.IsIntScalarType(input_type) && - !_.IsIntVectorType(input_type))) + if (!input_type || + (!_.IsIntScalarType(input_type) && !_.IsIntVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be int scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be int scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); if (_.GetBitWidth(result_type) == _.GetBitWidth(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have different bit width from Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have different bit width from Result " + "Type: " + << spvOpcodeString(opcode); break; } @@ -154,54 +153,55 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected float scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected float scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!input_type || (!_.IsFloatScalarType(input_type) && !_.IsFloatVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be float scalar or vector: " - << spvOpcodeString(opcode); + << "Expected input to be float scalar or vector: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); if (_.GetBitWidth(result_type) == _.GetBitWidth(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have different bit width from Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have different bit width from Result " + "Type: " + << spvOpcodeString(opcode); break; } case SpvOpQuantizeToF16: { if ((!_.IsFloatScalarType(result_type) && - !_.IsFloatVectorType(result_type)) || + !_.IsFloatVectorType(result_type)) || _.GetBitWidth(result_type) != 32) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected 32-bit float scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected 32-bit float scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (input_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input type to be equal to Result Type: " - << spvOpcodeString(opcode); + << "Expected input type to be equal to Result Type: " + << spvOpcodeString(opcode); break; } case SpvOpConvertPtrToU: { if (!_.IsUnsignedIntScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected unsigned int scalar type as Result Type: " - << spvOpcodeString(opcode); + << "Expected unsigned int scalar type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!_.IsPointerType(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer: " << spvOpcodeString(opcode); + << "Expected input to be a pointer: " << spvOpcodeString(opcode); break; } @@ -209,33 +209,33 @@ spv_result_t ConversionPass(ValidationState_t& _, case SpvOpSatConvertUToS: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - if (!input_type || (!_.IsIntScalarType(input_type) && - !_.IsIntVectorType(input_type))) + if (!input_type || + (!_.IsIntScalarType(input_type) && !_.IsIntVectorType(input_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar or vector as input: " - << spvOpcodeString(opcode); + << "Expected int scalar or vector as input: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same dimension as Result Type: " - << spvOpcodeString(opcode); + << "Expected input to have the same dimension as Result Type: " + << spvOpcodeString(opcode); break; } case SpvOpConvertUToPtr: { if (!_.IsPointerType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be a pointer: " - << spvOpcodeString(opcode); + << "Expected Result Type to be a pointer: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!_.IsIntScalarType(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected int scalar as input: " << spvOpcodeString(opcode); + << "Expected int scalar as input: " << spvOpcodeString(opcode); break; } @@ -245,13 +245,13 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be a pointer: " - << spvOpcodeString(opcode); + << "Expected Result Type to be a pointer: " + << spvOpcodeString(opcode); if (result_storage_class != SpvStorageClassGeneric) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to have storage class Generic: " - << spvOpcodeString(opcode); + << "Expected Result Type to have storage class Generic: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); uint32_t input_storage_class = 0; @@ -259,21 +259,19 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer: " - << spvOpcodeString(opcode); + << "Expected input to be a pointer: " << spvOpcodeString(opcode); if (input_storage_class != SpvStorageClassWorkgroup && input_storage_class != SpvStorageClassCrossWorkgroup && input_storage_class != SpvStorageClassFunction) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have storage class Workgroup, " - << "CrossWorkgroup or Function: " - << spvOpcodeString(opcode); + << "Expected input to have storage class Workgroup, " + << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); if (result_data_type != input_data_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input and Result Type to point to the same type: " - << spvOpcodeString(opcode); + << "Expected input and Result Type to point to the same type: " + << spvOpcodeString(opcode); break; } @@ -283,16 +281,15 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be a pointer: " - << spvOpcodeString(opcode); + << "Expected Result Type to be a pointer: " + << spvOpcodeString(opcode); if (result_storage_class != SpvStorageClassWorkgroup && result_storage_class != SpvStorageClassCrossWorkgroup && result_storage_class != SpvStorageClassFunction) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to have storage class Workgroup, " - << "CrossWorkgroup or Function: " - << spvOpcodeString(opcode); + << "Expected Result Type to have storage class Workgroup, " + << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); uint32_t input_storage_class = 0; @@ -300,18 +297,17 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer: " - << spvOpcodeString(opcode); + << "Expected input to be a pointer: " << spvOpcodeString(opcode); if (input_storage_class != SpvStorageClassGeneric) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have storage class Generic: " - << spvOpcodeString(opcode); + << "Expected input to have storage class Generic: " + << spvOpcodeString(opcode); if (result_data_type != input_data_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input and Result Type to point to the same type: " - << spvOpcodeString(opcode); + << "Expected input and Result Type to point to the same type: " + << spvOpcodeString(opcode); break; } @@ -321,14 +317,14 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be a pointer: " - << spvOpcodeString(opcode); + << "Expected Result Type to be a pointer: " + << spvOpcodeString(opcode); const uint32_t target_storage_class = inst->words[4]; if (result_storage_class != target_storage_class) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be of target storage class: " - << spvOpcodeString(opcode); + << "Expected Result Type to be of target storage class: " + << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); uint32_t input_storage_class = 0; @@ -336,26 +332,24 @@ spv_result_t ConversionPass(ValidationState_t& _, if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer: " - << spvOpcodeString(opcode); + << "Expected input to be a pointer: " << spvOpcodeString(opcode); if (input_storage_class != SpvStorageClassGeneric) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have storage class Generic: " - << spvOpcodeString(opcode); + << "Expected input to have storage class Generic: " + << spvOpcodeString(opcode); if (result_data_type != input_data_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input and Result Type to point to the same type: " - << spvOpcodeString(opcode); + << "Expected input and Result Type to point to the same type: " + << spvOpcodeString(opcode); if (target_storage_class != SpvStorageClassWorkgroup && target_storage_class != SpvStorageClassCrossWorkgroup && target_storage_class != SpvStorageClassFunction) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected target storage class to be Workgroup, " - << "CrossWorkgroup or Function: " - << spvOpcodeString(opcode); + << "Expected target storage class to be Workgroup, " + << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); break; } @@ -363,7 +357,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!input_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have a type: " << spvOpcodeString(opcode); + << "Expected input to have a type: " << spvOpcodeString(opcode); const bool result_is_pointer = _.IsPointerType(result_type); const bool result_is_int_scalar = _.IsIntScalarType(result_type); @@ -375,26 +369,25 @@ spv_result_t ConversionPass(ValidationState_t& _, !_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected Result Type to be a pointer or int or float vector " - << "or scalar type: " << spvOpcodeString(opcode); + << "Expected Result Type to be a pointer or int or float vector " + << "or scalar type: " << spvOpcodeString(opcode); if (!input_is_pointer && !input_is_int_scalar && - !_.IsIntVectorType(input_type) && - !_.IsFloatScalarType(input_type) && + !_.IsIntVectorType(input_type) && !_.IsFloatScalarType(input_type) && !_.IsFloatVectorType(input_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer or int or float vector " - << "or scalar: " << spvOpcodeString(opcode); + << "Expected input to be a pointer or int or float vector " + << "or scalar: " << spvOpcodeString(opcode); if (result_is_pointer && !input_is_pointer && !input_is_int_scalar) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to be a pointer or int scalar if Result Type " - << "is pointer: " << spvOpcodeString(opcode); + << "Expected input to be a pointer or int scalar if Result Type " + << "is pointer: " << spvOpcodeString(opcode); if (input_is_pointer && !result_is_pointer && !result_is_int_scalar) return _.diag(SPV_ERROR_INVALID_DATA) - << "Pointer can only be converted to another pointer or int " - << "scalar: " << spvOpcodeString(opcode); + << "Pointer can only be converted to another pointer or int " + << "scalar: " << spvOpcodeString(opcode); if (!result_is_pointer && !input_is_pointer) { const uint32_t result_size = @@ -403,8 +396,8 @@ spv_result_t ConversionPass(ValidationState_t& _, _.GetBitWidth(input_type) * _.GetDimension(input_type); if (result_size != input_size) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected input to have the same total bit width as " - << "Result Type: " << spvOpcodeString(opcode); + << "Expected input to have the same total bit width as " + << "Result Type: " << spvOpcodeString(opcode); } break; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_datarules.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_datarules.cpp index 5a11e68601b1c2cf7b7a7f85d6d3fe78edc650ac..7d51ecaba17334e047952bf597064398b7200aca 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_datarules.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_datarules.cpp @@ -122,8 +122,8 @@ spv_result_t ValidateIntSize(ValidationState_t& _, return _.diag(SPV_ERROR_INVALID_DATA) << "Using a 64-bit integer type requires the Int64 capability."; } - return _.diag(SPV_ERROR_INVALID_DATA) << "Invalid number of bits (" - << num_bits << ") used for OpTypeInt."; + return _.diag(SPV_ERROR_INVALID_DATA) + << "Invalid number of bits (" << num_bits << ") used for OpTypeInt."; } // Validates that the matrix is parameterized with floating-point types. diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_decorations.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_decorations.cpp index e2b7dfba53be0b0c7d601ccbc66dc20b2f642450..11d3ebca9ccb2e87aca53c87a53a4ce28b3b74e8 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_decorations.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_decorations.cpp @@ -19,6 +19,7 @@ #include "diagnostic.h" #include "opcode.h" +#include "spirv_target_env.h" #include "val/validation_state.h" using libspirv::Decoration; @@ -28,6 +29,14 @@ using libspirv::ValidationState_t; namespace { +// Returns whether the given variable has a BuiltIn decoration. +bool isBuiltInVar(uint32_t var_id, ValidationState_t& vstate) { + const auto& decorations = vstate.id_decorations(var_id); + return std::any_of( + decorations.begin(), decorations.end(), + [](const Decoration& d) { return SpvDecorationBuiltIn == d.dec_type(); }); +} + // Returns whether the given structure type has any members with BuiltIn // decoration. bool isBuiltInStruct(uint32_t struct_id, ValidationState_t& vstate) { @@ -91,6 +100,22 @@ spv_result_t CheckImportedVariableInitialization(ValidationState_t& vstate) { return SPV_SUCCESS; } +// Checks whether a builtin variable is valid. +spv_result_t CheckBuiltInVariable(uint32_t var_id, ValidationState_t& vstate) { + const auto& decorations = vstate.id_decorations(var_id); + for (const auto& d : decorations) { + if (spvIsVulkanEnv(vstate.context()->target_env)) { + if (d.dec_type() == SpvDecorationLocation || + d.dec_type() == SpvDecorationComponent) { + return vstate.diag(SPV_ERROR_INVALID_ID) + << "A BuiltIn variable (id " << var_id + << ") cannot have any Location or Component decorations"; + } + } + } + return SPV_SUCCESS; +} + // Checks whether proper decorations have been appied to the entry points. spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { for (uint32_t entry_point : vstate.entry_points()) { @@ -126,6 +151,9 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { if (storage_class == SpvStorageClassInput) ++num_builtin_inputs; if (storage_class == SpvStorageClassOutput) ++num_builtin_outputs; if (num_builtin_inputs > 1 || num_builtin_outputs > 1) break; + if (auto error = CheckBuiltInVariable(interface, vstate)) return error; + } else if (isBuiltInVar(interface, vstate)) { + if (auto error = CheckBuiltInVariable(interface, vstate)) return error; } } if (num_builtin_inputs > 1 || num_builtin_outputs > 1) { @@ -165,4 +193,3 @@ spv_result_t ValidateDecorations(ValidationState_t& vstate) { } } // namespace libspirv - diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_derivatives.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_derivatives.cpp new file mode 100644 index 0000000000000000000000000000000000000000..299f027f85cca2c3359e6fd0c9831f096798dc10 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_derivatives.cpp @@ -0,0 +1,69 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of derivative SPIR-V instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +// Validates correctness of derivative instructions. +spv_result_t DerivativesPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + + switch (opcode) { + case SpvOpDPdx: + case SpvOpDPdy: + case SpvOpFwidth: + case SpvOpDPdxFine: + case SpvOpDPdyFine: + case SpvOpFwidthFine: + case SpvOpDPdxCoarse: + case SpvOpDPdyCoarse: + case SpvOpFwidthCoarse: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be float scalar or vector type: " + << spvOpcodeString(opcode); + } + + const uint32_t p_type = _.GetOperandTypeId(inst, 2); + if (p_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected P type and Result Type to be the same: " + << spvOpcodeString(opcode); + } + + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, std::string( + "Derivative instructions require Fragment execution model: ") + + spvOpcodeString(opcode)); + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_ext_inst.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_ext_inst.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cc05f39dcbe3959e0345d6c26f75b78be7fdcd77 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_ext_inst.cpp @@ -0,0 +1,1990 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of ExtInst SPIR-V instructions. + +#include "validate.h" + +#include + +#include "latest_version_glsl_std_450_header.h" +#include "latest_version_opencl_std_header.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +uint32_t GetSizeTBitWidth(const ValidationState_t& _) { + if (_.addressing_model() == SpvAddressingModelPhysical32) return 32; + + if (_.addressing_model() == SpvAddressingModelPhysical64) return 64; + + return 0; +} + +} // anonymous namespace + +// Validates correctness of ExtInst instructions. +spv_result_t ExtInstPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + const uint32_t num_operands = inst->num_operands; + + if (opcode != SpvOpExtInst) return SPV_SUCCESS; + + const uint32_t ext_inst_set = inst->words[3]; + const uint32_t ext_inst_index = inst->words[4]; + const spv_ext_inst_type_t ext_inst_type = + spv_ext_inst_type_t(inst->ext_inst_type); + + auto ext_inst_name = [&_, ext_inst_set, ext_inst_type, ext_inst_index]() { + spv_ext_inst_desc desc = nullptr; + if (_.grammar().lookupExtInst(ext_inst_type, ext_inst_index, &desc) != + SPV_SUCCESS || + !desc) { + return std::string("Unknown ExtInst"); + } + + auto* import_inst = _.FindDef(ext_inst_set); + assert(import_inst); + + std::ostringstream ss; + ss << reinterpret_cast(import_inst->words().data() + 2); + ss << " "; + ss << desc->name; + + return ss.str(); + }; + + if (ext_inst_type == SPV_EXT_INST_TYPE_GLSL_STD_450) { + const GLSLstd450 ext_inst_key = GLSLstd450(ext_inst_index); + switch (ext_inst_key) { + case GLSLstd450Round: + case GLSLstd450RoundEven: + case GLSLstd450FAbs: + case GLSLstd450Trunc: + case GLSLstd450FSign: + case GLSLstd450Floor: + case GLSLstd450Ceil: + case GLSLstd450Fract: + case GLSLstd450Sqrt: + case GLSLstd450InverseSqrt: + case GLSLstd450FMin: + case GLSLstd450FMax: + case GLSLstd450FClamp: + case GLSLstd450FMix: + case GLSLstd450Step: + case GLSLstd450SmoothStep: + case GLSLstd450Fma: + case GLSLstd450Normalize: + case GLSLstd450FaceForward: + case GLSLstd450Reflect: + case GLSLstd450NMin: + case GLSLstd450NMax: + case GLSLstd450NClamp: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case GLSLstd450SAbs: + case GLSLstd450SSign: + case GLSLstd450UMin: + case GLSLstd450SMin: + case GLSLstd450UMax: + case GLSLstd450SMax: + case GLSLstd450UClamp: + case GLSLstd450SClamp: + case GLSLstd450FindILsb: + case GLSLstd450FindUMsb: + case GLSLstd450FindSMsb: { + if (!_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int scalar or vector type"; + } + + const uint32_t result_type_bit_width = _.GetBitWidth(result_type); + const uint32_t result_type_dimension = _.GetDimension(result_type); + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (!_.IsIntScalarOrVectorType(operand_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected all operands to be int scalars or vectors"; + } + + if (result_type_dimension != _.GetDimension(operand_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected all operands to have the same dimension as " + << "Result Type"; + } + + if (result_type_bit_width != _.GetBitWidth(operand_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected all operands to have the same bit width as " + << "Result Type"; + } + + if (ext_inst_key == GLSLstd450FindUMsb || + ext_inst_key == GLSLstd450FindSMsb) { + if (result_type_bit_width != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "this instruction is currently limited to 32-bit width " + << "components"; + } + } + } + break; + } + + case GLSLstd450Radians: + case GLSLstd450Degrees: + case GLSLstd450Sin: + case GLSLstd450Cos: + case GLSLstd450Tan: + case GLSLstd450Asin: + case GLSLstd450Acos: + case GLSLstd450Atan: + case GLSLstd450Sinh: + case GLSLstd450Cosh: + case GLSLstd450Tanh: + case GLSLstd450Asinh: + case GLSLstd450Acosh: + case GLSLstd450Atanh: + case GLSLstd450Exp: + case GLSLstd450Exp2: + case GLSLstd450Log: + case GLSLstd450Log2: + case GLSLstd450Atan2: + case GLSLstd450Pow: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 16 or 32-bit scalar or " + "vector float type"; + } + + const uint32_t result_type_bit_width = _.GetBitWidth(result_type); + if (result_type_bit_width != 16 && result_type_bit_width != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 16 or 32-bit scalar or " + "vector float type"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case GLSLstd450Determinant: { + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + uint32_t num_rows = 0; + uint32_t num_cols = 0; + uint32_t col_type = 0; + uint32_t component_type = 0; + if (!_.GetMatrixTypeInfo(x_type, &num_rows, &num_cols, &col_type, + &component_type) || + num_rows != num_cols) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to be a square matrix"; + } + + if (result_type != component_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X component type to be equal to " + << "Result Type"; + } + break; + } + + case GLSLstd450MatrixInverse: { + uint32_t num_rows = 0; + uint32_t num_cols = 0; + uint32_t col_type = 0; + uint32_t component_type = 0; + if (!_.GetMatrixTypeInfo(result_type, &num_rows, &num_cols, &col_type, + &component_type) || + num_rows != num_cols) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a square matrix"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (result_type != x_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + break; + } + + case GLSLstd450Modf: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or vector float type"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + const uint32_t i_type = _.GetOperandTypeId(inst, 5); + + if (x_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + + uint32_t i_storage_class = 0; + uint32_t i_data_type = 0; + if (!_.GetPointerTypeInfo(i_type, &i_data_type, &i_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand I to be a pointer"; + } + + if (i_data_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand I data type to be equal to Result Type"; + } + + break; + } + + case GLSLstd450ModfStruct: { + std::vector result_types; + if (!_.GetStructMemberTypes(result_type, &result_types) || + result_types.size() != 2 || + !_.IsFloatScalarOrVectorType(result_types[0]) || + result_types[1] != result_types[0]) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a struct with two identical " + << "scalar or vector float type members"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (x_type != result_types[0]) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to members of " + << "Result Type struct"; + } + break; + } + + case GLSLstd450Frexp: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or vector float type"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + const uint32_t exp_type = _.GetOperandTypeId(inst, 5); + + if (x_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + + uint32_t exp_storage_class = 0; + uint32_t exp_data_type = 0; + if (!_.GetPointerTypeInfo(exp_type, &exp_data_type, + &exp_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Exp to be a pointer"; + } + + if (!_.IsIntScalarOrVectorType(exp_data_type) || + (!_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) && + _.GetBitWidth(exp_data_type) != 32) || + (_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) && + _.GetBitWidth(exp_data_type) != 16 && + _.GetBitWidth(exp_data_type) != 32)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Exp data type to be a " + << (_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) + ? "16-bit or 32-bit " + : "32-bit ") + << "int scalar or vector type"; + } + + if (_.GetDimension(result_type) != _.GetDimension(exp_data_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Exp data type to have the same component " + << "number as Result Type"; + } + + break; + } + + case GLSLstd450Ldexp: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or vector float type"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + const uint32_t exp_type = _.GetOperandTypeId(inst, 5); + + if (x_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + + if (!_.IsIntScalarOrVectorType(exp_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Exp to be a 32-bit int scalar " + << "or vector type"; + } + + if (_.GetDimension(result_type) != _.GetDimension(exp_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Exp to have the same component " + << "number as Result Type"; + } + + break; + } + + case GLSLstd450FrexpStruct: { + std::vector result_types; + if (!_.GetStructMemberTypes(result_type, &result_types) || + result_types.size() != 2 || + !_.IsFloatScalarOrVectorType(result_types[0]) || + !_.IsIntScalarOrVectorType(result_types[1]) || + (!_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) && + _.GetBitWidth(result_types[1]) != 32) || + (_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) && + _.GetBitWidth(result_types[1]) != 16 && + _.GetBitWidth(result_types[1]) != 32) || + _.GetDimension(result_types[0]) != + _.GetDimension(result_types[1])) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a struct with two members, " + << "first member a float scalar or vector, second member a " + << (_.HasExtension(libspirv::kSPV_AMD_gpu_shader_int16) + ? "16-bit or 32-bit " + : "32-bit ") + << "int scalar or vector with the same number of " + << "components as the first member"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (x_type != result_types[0]) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to the first member " + << "of Result Type struct"; + } + break; + } + + case GLSLstd450PackSnorm4x8: + case GLSLstd450PackUnorm4x8: { + if (!_.IsIntScalarType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be 32-bit int scalar type"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatVectorType(v_type) || _.GetDimension(v_type) != 4 || + _.GetBitWidth(v_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand V to be a 32-bit float vector of size 4"; + } + break; + } + + case GLSLstd450PackSnorm2x16: + case GLSLstd450PackUnorm2x16: + case GLSLstd450PackHalf2x16: { + if (!_.IsIntScalarType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be 32-bit int scalar type"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatVectorType(v_type) || _.GetDimension(v_type) != 2 || + _.GetBitWidth(v_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand V to be a 32-bit float vector of size 2"; + } + break; + } + + case GLSLstd450PackDouble2x32: { + if (!_.IsFloatScalarType(result_type) || + _.GetBitWidth(result_type) != 64) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be 64-bit float scalar type"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntVectorType(v_type) || _.GetDimension(v_type) != 2 || + _.GetBitWidth(v_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand V to be a 32-bit int vector of size 2"; + } + break; + } + + case GLSLstd450UnpackSnorm4x8: + case GLSLstd450UnpackUnorm4x8: { + if (!_.IsFloatVectorType(result_type) || + _.GetDimension(result_type) != 4 || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit float vector of size " + "4"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarType(v_type) || _.GetBitWidth(v_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a 32-bit int scalar"; + } + break; + } + + case GLSLstd450UnpackSnorm2x16: + case GLSLstd450UnpackUnorm2x16: + case GLSLstd450UnpackHalf2x16: { + if (!_.IsFloatVectorType(result_type) || + _.GetDimension(result_type) != 2 || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit float vector of size " + "2"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarType(v_type) || _.GetBitWidth(v_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a 32-bit int scalar"; + } + break; + } + + case GLSLstd450UnpackDouble2x32: { + if (!_.IsIntVectorType(result_type) || + _.GetDimension(result_type) != 2 || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit int vector of size " + "2"; + } + + const uint32_t v_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarType(v_type) || _.GetBitWidth(v_type) != 64) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand V to be a 64-bit float scalar"; + } + break; + } + + case GLSLstd450Length: { + if (!_.IsFloatScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar type"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarOrVectorType(x_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to be of float scalar or vector type"; + } + + if (result_type != _.GetComponentType(x_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X component type to be equal to Result " + "Type"; + } + break; + } + + case GLSLstd450Distance: { + if (!_.IsFloatScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar type"; + } + + const uint32_t p0_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarOrVectorType(p0_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P0 to be of float scalar or vector type"; + } + + if (result_type != _.GetComponentType(p0_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P0 component type to be equal to " + << "Result Type"; + } + + const uint32_t p1_type = _.GetOperandTypeId(inst, 5); + if (!_.IsFloatScalarOrVectorType(p1_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P1 to be of float scalar or vector type"; + } + + if (result_type != _.GetComponentType(p1_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P1 component type to be equal to " + << "Result Type"; + } + + if (_.GetDimension(p0_type) != _.GetDimension(p1_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operands P0 and P1 to have the same number of " + << "components"; + } + break; + } + + case GLSLstd450Cross: { + if (!_.IsFloatVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float vector type"; + } + + if (_.GetDimension(result_type) != 3) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have 3 components"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + const uint32_t y_type = _.GetOperandTypeId(inst, 5); + + if (x_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + + if (y_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Y type to be equal to Result Type"; + } + break; + } + + case GLSLstd450Refract: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t i_type = _.GetOperandTypeId(inst, 4); + const uint32_t n_type = _.GetOperandTypeId(inst, 5); + const uint32_t eta_type = _.GetOperandTypeId(inst, 6); + + if (result_type != i_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand I to be of type equal to Result Type"; + } + + if (result_type != n_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand N to be of type equal to Result Type"; + } + + const uint32_t eta_type_bit_width = _.GetBitWidth(eta_type); + if (!_.IsFloatScalarType(eta_type) || + (eta_type_bit_width != 16 && eta_type_bit_width != 32)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Eta to be a 16 or 32-bit float scalar"; + } + break; + } + + case GLSLstd450InterpolateAtCentroid: + case GLSLstd450InterpolateAtSample: + case GLSLstd450InterpolateAtOffset: { + if (!_.HasCapability(SpvCapabilityInterpolationFunction)) { + return _.diag(SPV_ERROR_INVALID_CAPABILITY) + << ext_inst_name() + << " requires capability InterpolationFunction"; + } + + if (!_.IsFloatScalarOrVectorType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit float scalar " + << "or vector type"; + } + + const uint32_t interpolant_type = _.GetOperandTypeId(inst, 4); + uint32_t interpolant_storage_class = 0; + uint32_t interpolant_data_type = 0; + if (!_.GetPointerTypeInfo(interpolant_type, &interpolant_data_type, + &interpolant_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Interpolant to be a pointer"; + } + + if (result_type != interpolant_data_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Interpolant data type to be equal to Result Type"; + } + + if (interpolant_storage_class != SpvStorageClassInput) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Interpolant storage class to be Input"; + } + + if (ext_inst_key == GLSLstd450InterpolateAtSample) { + const uint32_t sample_type = _.GetOperandTypeId(inst, 5); + if (!_.IsIntScalarType(sample_type) || + _.GetBitWidth(sample_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Sample to be 32-bit integer"; + } + } + + if (ext_inst_key == GLSLstd450InterpolateAtOffset) { + const uint32_t offset_type = _.GetOperandTypeId(inst, 5); + if (!_.IsFloatVectorType(offset_type) || + _.GetDimension(offset_type) != 2 || + _.GetBitWidth(offset_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Offset to be a vector of 2 32-bit floats"; + } + } + + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + ext_inst_name() + + std::string(" requires Fragment execution model")); + break; + } + + case GLSLstd450IMix: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Extended instruction GLSLstd450IMix is not supported"; + } + + case GLSLstd450Bad: { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Encountered extended instruction GLSLstd450Bad"; + } + + case GLSLstd450Count: { + assert(0); + break; + } + } + } else if (ext_inst_type == SPV_EXT_INST_TYPE_OPENCL_STD) { + const OpenCLLIB::Entrypoints ext_inst_key = + OpenCLLIB::Entrypoints(ext_inst_index); + switch (ext_inst_key) { + case OpenCLLIB::Acos: + case OpenCLLIB::Acosh: + case OpenCLLIB::Acospi: + case OpenCLLIB::Asin: + case OpenCLLIB::Asinh: + case OpenCLLIB::Asinpi: + case OpenCLLIB::Atan: + case OpenCLLIB::Atan2: + case OpenCLLIB::Atanh: + case OpenCLLIB::Atanpi: + case OpenCLLIB::Atan2pi: + case OpenCLLIB::Cbrt: + case OpenCLLIB::Ceil: + case OpenCLLIB::Copysign: + case OpenCLLIB::Cos: + case OpenCLLIB::Cosh: + case OpenCLLIB::Cospi: + case OpenCLLIB::Erfc: + case OpenCLLIB::Erf: + case OpenCLLIB::Exp: + case OpenCLLIB::Exp2: + case OpenCLLIB::Exp10: + case OpenCLLIB::Expm1: + case OpenCLLIB::Fabs: + case OpenCLLIB::Fdim: + case OpenCLLIB::Floor: + case OpenCLLIB::Fma: + case OpenCLLIB::Fmax: + case OpenCLLIB::Fmin: + case OpenCLLIB::Fmod: + case OpenCLLIB::Hypot: + case OpenCLLIB::Lgamma: + case OpenCLLIB::Log: + case OpenCLLIB::Log2: + case OpenCLLIB::Log10: + case OpenCLLIB::Log1p: + case OpenCLLIB::Logb: + case OpenCLLIB::Mad: + case OpenCLLIB::Maxmag: + case OpenCLLIB::Minmag: + case OpenCLLIB::Nextafter: + case OpenCLLIB::Pow: + case OpenCLLIB::Powr: + case OpenCLLIB::Remainder: + case OpenCLLIB::Rint: + case OpenCLLIB::Round: + case OpenCLLIB::Rsqrt: + case OpenCLLIB::Sin: + case OpenCLLIB::Sinh: + case OpenCLLIB::Sinpi: + case OpenCLLIB::Sqrt: + case OpenCLLIB::Tan: + case OpenCLLIB::Tanh: + case OpenCLLIB::Tanpi: + case OpenCLLIB::Tgamma: + case OpenCLLIB::Trunc: + case OpenCLLIB::Half_cos: + case OpenCLLIB::Half_divide: + case OpenCLLIB::Half_exp: + case OpenCLLIB::Half_exp2: + case OpenCLLIB::Half_exp10: + case OpenCLLIB::Half_log: + case OpenCLLIB::Half_log2: + case OpenCLLIB::Half_log10: + case OpenCLLIB::Half_powr: + case OpenCLLIB::Half_recip: + case OpenCLLIB::Half_rsqrt: + case OpenCLLIB::Half_sin: + case OpenCLLIB::Half_sqrt: + case OpenCLLIB::Half_tan: + case OpenCLLIB::Native_cos: + case OpenCLLIB::Native_divide: + case OpenCLLIB::Native_exp: + case OpenCLLIB::Native_exp2: + case OpenCLLIB::Native_exp10: + case OpenCLLIB::Native_log: + case OpenCLLIB::Native_log2: + case OpenCLLIB::Native_log10: + case OpenCLLIB::Native_powr: + case OpenCLLIB::Native_recip: + case OpenCLLIB::Native_rsqrt: + case OpenCLLIB::Native_sin: + case OpenCLLIB::Native_sqrt: + case OpenCLLIB::Native_tan: + case OpenCLLIB::FClamp: + case OpenCLLIB::Degrees: + case OpenCLLIB::FMax_common: + case OpenCLLIB::FMin_common: + case OpenCLLIB::Mix: + case OpenCLLIB::Radians: + case OpenCLLIB::Step: + case OpenCLLIB::Smoothstep: + case OpenCLLIB::Sign: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case OpenCLLIB::Fract: + case OpenCLLIB::Modf: + case OpenCLLIB::Sincos: + case OpenCLLIB::Remquo: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + uint32_t operand_index = 4; + const uint32_t x_type = _.GetOperandTypeId(inst, operand_index++); + if (result_type != x_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected type of operand X to be equal to Result Type"; + } + + if (ext_inst_key == OpenCLLIB::Remquo) { + const uint32_t y_type = _.GetOperandTypeId(inst, operand_index++); + if (result_type != y_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected type of operand Y to be equal to Result Type"; + } + } + + const uint32_t p_type = _.GetOperandTypeId(inst, operand_index++); + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected the last operand to be a pointer"; + } + + if (p_storage_class != SpvStorageClassGeneric && + p_storage_class != SpvStorageClassCrossWorkgroup && + p_storage_class != SpvStorageClassWorkgroup && + p_storage_class != SpvStorageClassFunction) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected storage class of the pointer to be Generic, " + "CrossWorkgroup, Workgroup or Function"; + } + + if (result_type != p_data_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected data type of the pointer to be equal to Result " + "Type"; + } + break; + } + + case OpenCLLIB::Frexp: + case OpenCLLIB::Lgamma_r: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (result_type != x_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected type of operand X to be equal to Result Type"; + } + + const uint32_t p_type = _.GetOperandTypeId(inst, 5); + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected the last operand to be a pointer"; + } + + if (p_storage_class != SpvStorageClassGeneric && + p_storage_class != SpvStorageClassCrossWorkgroup && + p_storage_class != SpvStorageClassWorkgroup && + p_storage_class != SpvStorageClassFunction) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected storage class of the pointer to be Generic, " + "CrossWorkgroup, Workgroup or Function"; + } + + if (!_.IsIntScalarOrVectorType(p_data_type) || + _.GetBitWidth(p_data_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected data type of the pointer to be a 32-bit int " + "scalar or vector type"; + } + + if (_.GetDimension(p_data_type) != num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected data type of the pointer to have the same number " + "of components as Result Type"; + } + break; + } + + case OpenCLLIB::Ilogb: { + if (!_.IsIntScalarOrVectorType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit int scalar or vector " + "type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarOrVectorType(x_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to be a float scalar or vector"; + } + + if (_.GetDimension(x_type) != num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to have the same number of components " + "as Result Type"; + } + break; + } + + case OpenCLLIB::Ldexp: + case OpenCLLIB::Pown: + case OpenCLLIB::Rootn: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + if (result_type != x_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected type of operand X to be equal to Result Type"; + } + + const uint32_t exp_type = _.GetOperandTypeId(inst, 5); + if (!_.IsIntScalarOrVectorType(exp_type) || + _.GetBitWidth(exp_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected the exponent to be a 32-bit int scalar or vector"; + } + + if (_.GetDimension(exp_type) != num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected the exponent to have the same number of " + "components as Result Type"; + } + break; + } + + case OpenCLLIB::Nan: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t nancode_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarOrVectorType(nancode_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Nancode to be an int scalar or vector type"; + } + + if (_.GetDimension(nancode_type) != num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Nancode to have the same number of components as " + "Result Type"; + } + + if (_.GetBitWidth(result_type) != _.GetBitWidth(nancode_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Nancode to have the same bit width as Result " + "Type"; + } + break; + } + + case OpenCLLIB::SAbs: + case OpenCLLIB::SAbs_diff: + case OpenCLLIB::SAdd_sat: + case OpenCLLIB::UAdd_sat: + case OpenCLLIB::SHadd: + case OpenCLLIB::UHadd: + case OpenCLLIB::SRhadd: + case OpenCLLIB::URhadd: + case OpenCLLIB::SClamp: + case OpenCLLIB::UClamp: + case OpenCLLIB::Clz: + case OpenCLLIB::Ctz: + case OpenCLLIB::SMad_hi: + case OpenCLLIB::UMad_sat: + case OpenCLLIB::SMad_sat: + case OpenCLLIB::SMax: + case OpenCLLIB::UMax: + case OpenCLLIB::SMin: + case OpenCLLIB::UMin: + case OpenCLLIB::SMul_hi: + case OpenCLLIB::Rotate: + case OpenCLLIB::SSub_sat: + case OpenCLLIB::USub_sat: + case OpenCLLIB::Popcount: + case OpenCLLIB::UAbs: + case OpenCLLIB::UAbs_diff: + case OpenCLLIB::UMul_hi: + case OpenCLLIB::UMad_hi: { + if (!_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case OpenCLLIB::U_Upsample: + case OpenCLLIB::S_Upsample: { + if (!_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int scalar or vector " + "type"; + } + + const uint32_t result_num_components = _.GetDimension(result_type); + if (result_num_components > 4 && result_num_components != 8 && + result_num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t result_bit_width = _.GetBitWidth(result_type); + if (result_bit_width != 16 && result_bit_width != 32 && + result_bit_width != 64) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected bit width of Result Type components to be 16, 32 " + "or 64"; + } + + const uint32_t hi_type = _.GetOperandTypeId(inst, 4); + const uint32_t lo_type = _.GetOperandTypeId(inst, 5); + + if (hi_type != lo_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Hi and Lo operands to have the same type"; + } + + if (result_num_components != _.GetDimension(hi_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Hi and Lo operands to have the same number of " + "components as Result Type"; + } + + if (result_bit_width != 2 * _.GetBitWidth(hi_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected bit width of components of Hi and Lo operands to " + "be half of the bit width of components of Result Type"; + } + break; + } + + case OpenCLLIB::SMad24: + case OpenCLLIB::UMad24: + case OpenCLLIB::SMul24: + case OpenCLLIB::UMul24: { + if (!_.IsIntScalarOrVectorType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit int scalar or vector " + "type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case OpenCLLIB::Cross: { + if (!_.IsFloatVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components != 3 && num_components != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have 3 or 4 components"; + } + + const uint32_t x_type = _.GetOperandTypeId(inst, 4); + const uint32_t y_type = _.GetOperandTypeId(inst, 5); + + if (x_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X type to be equal to Result Type"; + } + + if (y_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Y type to be equal to Result Type"; + } + break; + } + + case OpenCLLIB::Distance: + case OpenCLLIB::Fast_distance: { + if (!_.IsFloatScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar type"; + } + + const uint32_t p0_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarOrVectorType(p0_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P0 to be of float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(p0_type); + if (num_components > 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P0 to have no more than 4 components"; + } + + if (result_type != _.GetComponentType(p0_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P0 component type to be equal to " + << "Result Type"; + } + + const uint32_t p1_type = _.GetOperandTypeId(inst, 5); + if (p0_type != p1_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operands P0 and P1 to be of the same type"; + } + break; + } + + case OpenCLLIB::Length: + case OpenCLLIB::Fast_length: { + if (!_.IsFloatScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar type"; + } + + const uint32_t p_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarOrVectorType(p_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a float scalar or vector"; + } + + const uint32_t num_components = _.GetDimension(p_type); + if (num_components > 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to have no more than 4 components"; + } + + if (result_type != _.GetComponentType(p_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P component type to be equal to Result " + "Type"; + } + break; + } + + case OpenCLLIB::Normalize: + case OpenCLLIB::Fast_normalize: { + if (!_.IsFloatScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar or vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have no more than 4 components"; + } + + const uint32_t p_type = _.GetOperandTypeId(inst, 4); + if (p_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P type to be equal to Result Type"; + } + break; + } + + case OpenCLLIB::Bitselect: { + if (!_.IsFloatScalarOrVectorType(result_type) && + !_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int or float scalar or " + "vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + for (uint32_t operand_index = 4; operand_index < num_operands; + ++operand_index) { + const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); + if (result_type != operand_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected types of all operands to be equal to Result " + "Type"; + } + } + break; + } + + case OpenCLLIB::Select: { + if (!_.IsFloatScalarOrVectorType(result_type) && + !_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int or float scalar or " + "vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t a_type = _.GetOperandTypeId(inst, 4); + const uint32_t b_type = _.GetOperandTypeId(inst, 5); + const uint32_t c_type = _.GetOperandTypeId(inst, 6); + + if (result_type != a_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand A type to be equal to Result Type"; + } + + if (result_type != b_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand B type to be equal to Result Type"; + } + + if (!_.IsIntScalarOrVectorType(c_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand C to be an int scalar or vector"; + } + + if (num_components != _.GetDimension(c_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand C to have the same number of components " + "as Result Type"; + } + + if (_.GetBitWidth(result_type) != _.GetBitWidth(c_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand C to have the same bit width as Result " + "Type"; + } + break; + } + + case OpenCLLIB::Vloadn: { + if (!_.IsFloatVectorType(result_type) && + !_.IsIntVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int or float vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have 2, 3, 4, 8 or 16 components"; + } + + const uint32_t offset_type = _.GetOperandTypeId(inst, 4); + const uint32_t p_type = _.GetOperandTypeId(inst, 5); + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(offset_type) || + _.GetBitWidth(offset_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Offset to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a pointer"; + } + + if (p_storage_class != SpvStorageClassUniformConstant && + p_storage_class != SpvStorageClassGeneric) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P storage class to be UniformConstant or " + "Generic"; + } + + if (_.GetComponentType(result_type) != p_data_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P data type to be equal to component " + "type of Result Type"; + } + + const uint32_t n_value = inst->words[7]; + if (num_components != n_value) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected literal N to be equal to the number of " + "components of Result Type"; + } + break; + } + + case OpenCLLIB::Vstoren: { + if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": expected Result Type to be void"; + } + + const uint32_t data_type = _.GetOperandTypeId(inst, 4); + const uint32_t offset_type = _.GetOperandTypeId(inst, 5); + const uint32_t p_type = _.GetOperandTypeId(inst, 6); + + if (!_.IsFloatVectorType(data_type) && !_.IsIntVectorType(data_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Data to be an int or float vector"; + } + + const uint32_t num_components = _.GetDimension(data_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Data to have 2, 3, 4, 8 or 16 components"; + } + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(offset_type) || + _.GetBitWidth(offset_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Offset to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a pointer"; + } + + if (p_storage_class != SpvStorageClassGeneric) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P storage class to be Generic"; + } + + if (_.GetComponentType(data_type) != p_data_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P data type to be equal to the type of " + "operand Data components"; + } + break; + } + + case OpenCLLIB::Vload_half: { + if (!_.IsFloatScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float scalar type"; + } + + const uint32_t offset_type = _.GetOperandTypeId(inst, 4); + const uint32_t p_type = _.GetOperandTypeId(inst, 5); + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(offset_type) || + _.GetBitWidth(offset_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Offset to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a pointer"; + } + + if (p_storage_class != SpvStorageClassUniformConstant && + p_storage_class != SpvStorageClassGeneric && + p_storage_class != SpvStorageClassCrossWorkgroup && + p_storage_class != SpvStorageClassWorkgroup && + p_storage_class != SpvStorageClassFunction) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P storage class to be UniformConstant, " + "Generic, CrossWorkgroup, Workgroup or Function"; + } + + if (!_.IsFloatScalarType(p_data_type) || + _.GetBitWidth(p_data_type) != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P data type to be 16-bit float scalar"; + } + break; + } + + case OpenCLLIB::Vload_halfn: + case OpenCLLIB::Vloada_halfn: { + if (!_.IsFloatVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a float vector type"; + } + + const uint32_t num_components = _.GetDimension(result_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have 2, 3, 4, 8 or 16 components"; + } + + const uint32_t offset_type = _.GetOperandTypeId(inst, 4); + const uint32_t p_type = _.GetOperandTypeId(inst, 5); + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(offset_type) || + _.GetBitWidth(offset_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Offset to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a pointer"; + } + + if (p_storage_class != SpvStorageClassUniformConstant && + p_storage_class != SpvStorageClassGeneric && + p_storage_class != SpvStorageClassCrossWorkgroup && + p_storage_class != SpvStorageClassWorkgroup && + p_storage_class != SpvStorageClassFunction) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P storage class to be UniformConstant, " + "Generic, CrossWorkgroup, Workgroup or Function"; + } + + if (!_.IsFloatScalarType(p_data_type) || + _.GetBitWidth(p_data_type) != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P data type to be 16-bit float scalar"; + } + + const uint32_t n_value = inst->words[7]; + if (num_components != n_value) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected literal N to be equal to the number of " + "components of Result Type"; + } + break; + } + + case OpenCLLIB::Vstore_half: + case OpenCLLIB::Vstore_half_r: + case OpenCLLIB::Vstore_halfn: + case OpenCLLIB::Vstore_halfn_r: + case OpenCLLIB::Vstorea_halfn: + case OpenCLLIB::Vstorea_halfn_r: { + if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": expected Result Type to be void"; + } + + const uint32_t data_type = _.GetOperandTypeId(inst, 4); + const uint32_t offset_type = _.GetOperandTypeId(inst, 5); + const uint32_t p_type = _.GetOperandTypeId(inst, 6); + const uint32_t data_type_bit_width = _.GetBitWidth(data_type); + + if (ext_inst_key == OpenCLLIB::Vstore_half || + ext_inst_key == OpenCLLIB::Vstore_half_r) { + if (!_.IsFloatScalarType(data_type) || + (data_type_bit_width != 32 && data_type_bit_width != 64)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Data to be a 32 or 64-bit float scalar"; + } + } else { + if (!_.IsFloatVectorType(data_type) || + (data_type_bit_width != 32 && data_type_bit_width != 64)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Data to be a 32 or 64-bit float vector"; + } + + const uint32_t num_components = _.GetDimension(data_type); + if (num_components > 4 && num_components != 8 && + num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Data to have 2, 3, 4, 8 or 16 components"; + } + } + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(offset_type) || + _.GetBitWidth(offset_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Offset to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P to be a pointer"; + } + + if (p_storage_class != SpvStorageClassGeneric && + p_storage_class != SpvStorageClassCrossWorkgroup && + p_storage_class != SpvStorageClassWorkgroup && + p_storage_class != SpvStorageClassFunction) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P storage class to be Generic, " + "CrossWorkgroup, Workgroup or Function"; + } + + if (!_.IsFloatScalarType(p_data_type) || + _.GetBitWidth(p_data_type) != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand P data type to be 16-bit float scalar"; + } + + // Rounding mode enum is checked by assembler. + break; + } + + case OpenCLLIB::Shuffle: + case OpenCLLIB::Shuffle2: { + if (!_.IsFloatVectorType(result_type) && + !_.IsIntVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be an int or float vector type"; + } + + const uint32_t result_num_components = _.GetDimension(result_type); + if (result_num_components != 2 && result_num_components != 4 && + result_num_components != 8 && result_num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to have 2, 4, 8 or 16 components"; + } + + uint32_t operand_index = 4; + const uint32_t x_type = _.GetOperandTypeId(inst, operand_index++); + + if (ext_inst_key == OpenCLLIB::Shuffle2) { + const uint32_t y_type = _.GetOperandTypeId(inst, operand_index++); + if (x_type != y_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operands X and Y to be of the same type"; + } + } + + const uint32_t shuffle_mask_type = + _.GetOperandTypeId(inst, operand_index++); + + if (!_.IsFloatVectorType(x_type) && !_.IsIntVectorType(x_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to be an int or float vector"; + } + + const uint32_t x_num_components = _.GetDimension(x_type); + if (x_num_components != 2 && x_num_components != 4 && + x_num_components != 8 && x_num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X to have 2, 4, 8 or 16 components"; + } + + const uint32_t result_component_type = _.GetComponentType(result_type); + + if (result_component_type != _.GetComponentType(x_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand X and Result Type to have equal " + "component types"; + } + + if (!_.IsIntVectorType(shuffle_mask_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Shuffle Mask to be an int vector"; + } + + if (result_num_components != _.GetDimension(shuffle_mask_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Shuffle Mask to have the same number of " + "components as Result Type"; + } + + if (_.GetBitWidth(result_component_type) != + _.GetBitWidth(shuffle_mask_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Shuffle Mask components to have the same " + "bit width as Result Type components"; + } + break; + } + + case OpenCLLIB::Printf: { + if (!_.IsIntScalarType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a 32-bit int type"; + } + + const uint32_t format_type = _.GetOperandTypeId(inst, 4); + uint32_t format_storage_class = 0; + uint32_t format_data_type = 0; + if (!_.GetPointerTypeInfo(format_type, &format_data_type, + &format_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Format to be a pointer"; + } + + if (format_storage_class != SpvStorageClassUniformConstant) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Format storage class to be UniformConstant"; + } + + if (!_.IsIntScalarType(format_data_type) || + _.GetBitWidth(format_data_type) != 8) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Format data type to be 8-bit int"; + } + break; + } + + case OpenCLLIB::Prefetch: { + if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": expected Result Type to be void"; + } + + const uint32_t p_type = _.GetOperandTypeId(inst, 4); + const uint32_t num_elements_type = _.GetOperandTypeId(inst, 5); + + uint32_t p_storage_class = 0; + uint32_t p_data_type = 0; + if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Ptr to be a pointer"; + } + + if (p_storage_class != SpvStorageClassCrossWorkgroup) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Ptr storage class to be CrossWorkgroup"; + } + + if (!_.IsFloatScalarOrVectorType(p_data_type) && + !_.IsIntScalarOrVectorType(p_data_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Ptr data type to be int or float scalar or " + "vector"; + } + + const uint32_t num_components = _.GetDimension(p_data_type); + if (num_components > 4 && num_components != 8 && num_components != 16) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected Result Type to be a scalar or a vector with 2, " + "3, 4, 8 or 16 components"; + } + + const uint32_t size_t_bit_width = GetSizeTBitWidth(_); + if (!size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() + << " can only be used with physical addressing models"; + } + + if (!_.IsIntScalarType(num_elements_type) || + _.GetBitWidth(num_elements_type) != size_t_bit_width) { + return _.diag(SPV_ERROR_INVALID_DATA) + << ext_inst_name() << ": " + << "expected operand Num Elements to be of type size_t (" + << size_t_bit_width + << "-bit integer for the addressing model used in the module)"; + } + break; + } + } + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_id.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_id.cpp index e898b2319a4a1e0ab4e23447bc806d71ad8a36d9..5f5cc56765f0b9a48a94083e3926b718f4aad874 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_id.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_id.cpp @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include @@ -27,13 +29,14 @@ #include "message.h" #include "opcode.h" #include "operand.h" -#include "spirv_validator_options.h" #include "spirv-tools/libspirv.h" +#include "spirv_validator_options.h" #include "val/function.h" #include "val/validation_state.h" -using libspirv::ValidationState_t; using libspirv::Decoration; +using libspirv::Function; +using libspirv::ValidationState_t; using std::function; using std::ignore; using std::make_pair; @@ -45,17 +48,15 @@ namespace { class idUsage { public: - idUsage(const spv_opcode_table opcodeTableArg, - const spv_operand_table operandTableArg, - const spv_ext_inst_table extInstTableArg, - const spv_instruction_t* pInsts, const uint64_t instCountArg, - const SpvMemoryModel memoryModelArg, + idUsage(spv_const_context context, const spv_instruction_t* pInsts, + const uint64_t instCountArg, const SpvMemoryModel memoryModelArg, const SpvAddressingModel addressingModelArg, const ValidationState_t& module, const vector& entry_points, spv_position positionArg, const spvtools::MessageConsumer& consumer) - : opcodeTable(opcodeTableArg), - operandTable(operandTableArg), - extInstTable(extInstTableArg), + : targetEnv(context->target_env), + opcodeTable(context->opcode_table), + operandTable(context->operand_table), + extInstTable(context->ext_inst_table), firstInst(pInsts), instCount(instCountArg), memoryModel(memoryModelArg), @@ -71,6 +72,7 @@ class idUsage { bool isValid(const spv_instruction_t* inst, const spv_opcode_desc); private: + const spv_target_env targetEnv; const spv_opcode_table opcodeTable; const spv_operand_table operandTable; const spv_ext_inst_table extInstTable; @@ -82,6 +84,26 @@ class idUsage { const spvtools::MessageConsumer& consumer_; const ValidationState_t& module_; vector entry_points_; + + // Returns true if the two instructions represent structs that, as far as the + // validator can tell, have the exact same data layout. + bool AreLayoutCompatibleStructs(const libspirv::Instruction* type1, + const libspirv::Instruction* type2); + + // Returns true if the operands to the OpTypeStruct instruction defining the + // types are the same or are layout compatible types. |type1| and |type2| must + // be OpTypeStruct instructions. + bool HaveLayoutCompatibleMembers(const libspirv::Instruction* type1, + const libspirv::Instruction* type2); + + // Returns true if all decorations that affect the data layout of the struct + // (like Offset), are the same for the two types. |type1| and |type2| must be + // OpTypeStruct instructions. + bool HaveSameLayoutDecorations(const libspirv::Instruction* type1, + const libspirv::Instruction* type2); + bool HasConflictingMemberOffsets( + const vector& type1_decorations, + const vector& type2_decorations) const; }; #define DIAG(INDEX) \ @@ -182,22 +204,21 @@ bool idUsage::isValid(const spv_instruction_t* inst, template <> bool idUsage::isValid(const spv_instruction_t* inst, - const spv_opcode_desc) { + const spv_opcode_desc) { auto decorationGroupIndex = 1; auto decorationGroup = module_.FindDef(inst->words[decorationGroupIndex]); for (auto pair : decorationGroup->uses()) { auto use = pair.first; - if (use->opcode() != SpvOpDecorate && - use->opcode() != SpvOpGroupDecorate && + if (use->opcode() != SpvOpDecorate && use->opcode() != SpvOpGroupDecorate && use->opcode() != SpvOpGroupMemberDecorate && - use->opcode() != SpvOpName ) { + use->opcode() != SpvOpName) { DIAG(decorationGroupIndex) << "Result id of OpDecorationGroup can only " << "be targeted by OpName, OpGroupDecorate, " << "OpDecorate, and OpGroupMemberDecorate"; return false; } - } + } return true; } @@ -207,17 +228,17 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto decorationGroupIndex = 1; auto decorationGroup = module_.FindDef(inst->words[decorationGroupIndex]); if (!decorationGroup || SpvOpDecorationGroup != decorationGroup->opcode()) { - DIAG(decorationGroupIndex) << "OpGroupDecorate Decoration group '" - << inst->words[decorationGroupIndex] - << "' is not a decoration group."; + DIAG(decorationGroupIndex) + << "OpGroupDecorate Decoration group '" + << inst->words[decorationGroupIndex] << "' is not a decoration group."; return false; } return true; } template <> -bool idUsage::isValid( - const spv_instruction_t* inst, const spv_opcode_desc) { +bool idUsage::isValid(const spv_instruction_t* inst, + const spv_opcode_desc) { auto decorationGroupIndex = 1; auto decorationGroup = module_.FindDef(inst->words[decorationGroupIndex]); if (!decorationGroup || SpvOpDecorationGroup != decorationGroup->opcode()) { @@ -269,18 +290,19 @@ bool idUsage::isValid(const spv_instruction_t* inst, return false; } // don't check kernel function signatures - auto executionModel = inst->words[1]; + const SpvExecutionModel executionModel = SpvExecutionModel(inst->words[1]); if (executionModel != SpvExecutionModelKernel) { // TODO: Check the entry point signature is void main(void), may be subject // to change auto entryPointType = module_.FindDef(entryPoint->words()[4]); if (!entryPointType || 3 != entryPointType->words().size()) { - DIAG(entryPointIndex) << "OpEntryPoint Entry Point '" - << inst->words[entryPointIndex] - << "'s function parameter count is not zero."; + DIAG(entryPointIndex) + << "OpEntryPoint Entry Point '" << inst->words[entryPointIndex] + << "'s function parameter count is not zero."; return false; } } + auto returnType = module_.FindDef(entryPoint->type_id()); if (!returnType || SpvOpTypeVoid != returnType->opcode()) { DIAG(entryPointIndex) << "OpEntryPoint Entry Point '" @@ -436,9 +458,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto memberTypeId = inst->words[memberTypeIndex]; auto memberType = module_.FindDef(memberTypeId); if (!memberType || !spvOpcodeGeneratesType(memberType->opcode())) { - DIAG(memberTypeIndex) << "OpTypeStruct Member Type '" - << inst->words[memberTypeIndex] - << "' is not a type."; + DIAG(memberTypeIndex) + << "OpTypeStruct Member Type '" << inst->words[memberTypeIndex] + << "' is not a type."; return false; } if (SpvOpTypeStruct == memberType->opcode() && @@ -617,11 +639,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto constituentResultType = module_.FindDef(constituent->type_id()); if (!constituentResultType || componentType->opcode() != constituentResultType->opcode()) { - DIAG(constituentIndex) << "OpConstantComposite Constituent '" - << inst->words[constituentIndex] - << "'s type does not match Result Type '" - << resultType->id() - << "'s vector element type."; + DIAG(constituentIndex) + << "OpConstantComposite Constituent '" + << inst->words[constituentIndex] + << "'s type does not match Result Type '" << resultType->id() + << "'s vector element type."; return false; } } @@ -646,9 +668,8 @@ bool idUsage::isValid(const spv_instruction_t* inst, for (size_t constituentIndex = 3; constituentIndex < inst->words.size(); constituentIndex++) { auto constituent = module_.FindDef(inst->words[constituentIndex]); - if (!constituent || - !(SpvOpConstantComposite == constituent->opcode() || - SpvOpUndef == constituent->opcode())) { + if (!constituent || !(SpvOpConstantComposite == constituent->opcode() || + SpvOpUndef == constituent->opcode())) { // The message says "... or undef" because the spec does not say // undef is a constant. DIAG(constituentIndex) << "OpConstantComposite Constituent '" @@ -659,11 +680,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto vector = module_.FindDef(constituent->type_id()); assert(vector); if (columnType->opcode() != vector->opcode()) { - DIAG(constituentIndex) << "OpConstantComposite Constituent '" - << inst->words[constituentIndex] - << "' type does not match Result Type '" - << resultType->id() - << "'s matrix column type."; + DIAG(constituentIndex) + << "OpConstantComposite Constituent '" + << inst->words[constituentIndex] + << "' type does not match Result Type '" << resultType->id() + << "'s matrix column type."; return false; } auto vectorComponentType = module_.FindDef(vector->words()[2]); @@ -711,11 +732,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto constituentType = module_.FindDef(constituent->type_id()); assert(constituentType); if (elementType->id() != constituentType->id()) { - DIAG(constituentIndex) << "OpConstantComposite Constituent '" - << inst->words[constituentIndex] - << "'s type does not match Result Type '" - << resultType->id() - << "'s array element type."; + DIAG(constituentIndex) + << "OpConstantComposite Constituent '" + << inst->words[constituentIndex] + << "'s type does not match Result Type '" << resultType->id() + << "'s array element type."; return false; } } @@ -876,8 +897,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, << "All OpSampledImage instructions must be in the same block in " "which their Result are consumed. OpSampledImage Result " "Type '" - << resultID << "' has a consumer in a different basic " - "block. The consumer instruction is '" + << resultID + << "' has a consumer in a different basic " + "block. The consumer instruction is '" << consumer_id << "'."; return false; } @@ -945,11 +967,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto constituentResultType = module_.FindDef(constituent->type_id()); if (!constituentResultType || componentType->opcode() != constituentResultType->opcode()) { - DIAG(constituentIndex) << "OpSpecConstantComposite Constituent '" - << inst->words[constituentIndex] - << "'s type does not match Result Type '" - << resultType->id() - << "'s vector element type."; + DIAG(constituentIndex) + << "OpSpecConstantComposite Constituent '" + << inst->words[constituentIndex] + << "'s type does not match Result Type '" << resultType->id() + << "'s vector element type."; return false; } } @@ -975,10 +997,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, constituentIndex++) { auto constituent = module_.FindDef(inst->words[constituentIndex]); auto constituentOpCode = constituent->opcode(); - if (!constituent || - !(SpvOpSpecConstantComposite == constituentOpCode || - SpvOpConstantComposite == constituentOpCode || - SpvOpUndef == constituentOpCode)) { + if (!constituent || !(SpvOpSpecConstantComposite == constituentOpCode || + SpvOpConstantComposite == constituentOpCode || + SpvOpUndef == constituentOpCode)) { // The message says "... or undef" because the spec does not say // undef is a constant. DIAG(constituentIndex) << "OpSpecConstantComposite Constituent '" @@ -989,11 +1010,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto vector = module_.FindDef(constituent->type_id()); assert(vector); if (columnType->opcode() != vector->opcode()) { - DIAG(constituentIndex) << "OpSpecConstantComposite Constituent '" - << inst->words[constituentIndex] - << "' type does not match Result Type '" - << resultType->id() - << "'s matrix column type."; + DIAG(constituentIndex) + << "OpSpecConstantComposite Constituent '" + << inst->words[constituentIndex] + << "' type does not match Result Type '" << resultType->id() + << "'s matrix column type."; return false; } auto vectorComponentType = module_.FindDef(vector->words()[2]); @@ -1042,11 +1063,11 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto constituentType = module_.FindDef(constituent->type_id()); assert(constituentType); if (elementType->id() != constituentType->id()) { - DIAG(constituentIndex) << "OpSpecConstantComposite Constituent '" - << inst->words[constituentIndex] - << "'s type does not match Result Type '" - << resultType->id() - << "'s array element type."; + DIAG(constituentIndex) + << "OpSpecConstantComposite Constituent '" + << inst->words[constituentIndex] + << "'s type does not match Result Type '" << resultType->id() + << "'s array element type."; return false; } } @@ -1119,9 +1140,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, const auto is_constant = initialiser && spvOpcodeIsConstant(initialiser->opcode()); if (!initialiser || !(is_constant || is_module_scope_var)) { - DIAG(initialiserIndex) << "OpVariable Initializer '" - << inst->words[initialiserIndex] - << "' is not a constant or module-scope variable."; + DIAG(initialiserIndex) + << "OpVariable Initializer '" << inst->words[initialiserIndex] + << "' is not a constant or module-scope variable."; return false; } } @@ -1204,6 +1225,28 @@ bool idUsage::isValid(const spv_instruction_t* inst, return false; } + // validate storage class + { + uint32_t dataType; + uint32_t storageClass; + if (!module_.GetPointerTypeInfo(pointerType->id(), &dataType, + &storageClass)) { + DIAG(pointerIndex) << "OpStore Pointer '" + << inst->words[pointerIndex] + << "' is not pointer type"; + return false; + } + + if (storageClass == SpvStorageClassUniformConstant || + storageClass == SpvStorageClassInput || + storageClass == SpvStorageClassPushConstant) { + DIAG(pointerIndex) << "OpStore Pointer '" + << inst->words[pointerIndex] + << "' storage class is read-only"; + return false; + } + } + auto objectIndex = 2; auto object = module_.FindDef(inst->words[objectIndex]); if (!object || !object->type_id()) { @@ -1220,10 +1263,24 @@ bool idUsage::isValid(const spv_instruction_t* inst, } if (type->id() != objectType->id()) { - DIAG(pointerIndex) << "OpStore Pointer '" << inst->words[pointerIndex] - << "'s type does not match Object '" - << objectType->id() << "'s type."; - return false; + if (!module_.options()->relax_struct_store || + type->opcode() != SpvOpTypeStruct || + objectType->opcode() != SpvOpTypeStruct) { + DIAG(pointerIndex) << "OpStore Pointer '" + << inst->words[pointerIndex] + << "'s type does not match Object '" + << object->id() << "'s type."; + return false; + } + + // TODO: Check for layout compatible matricies and arrays as well. + if (!AreLayoutCompatibleStructs(type, objectType)) { + DIAG(pointerIndex) << "OpStore Pointer '" + << inst->words[pointerIndex] + << "'s layout does not match Object '" + << object->id() << "'s layout."; + return false; + } } return true; } @@ -1440,8 +1497,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, } default: { // Give an error. reached non-composite type while indexes still remain. - DIAG(i) << instr_name << " reached non-composite type while indexes " - "still remain to be traversed."; + DIAG(i) << instr_name + << " reached non-composite type while indexes " + "still remain to be traversed."; return false; } } @@ -1510,15 +1568,38 @@ bool idUsage::isValid( template <> bool idUsage::isValid(const spv_instruction_t* inst, const spv_opcode_desc) { + const auto* thisInst = module_.FindDef(inst->words[2u]); + if (!thisInst) return false; + + for (uint32_t entryId : module_.FunctionEntryPoints(thisInst->id())) { + const Function* thisFunc = module_.function(thisInst->id()); + assert(thisFunc); + const auto* models = module_.GetExecutionModels(entryId); + if (models) { + assert(models->size()); + for (auto model : *models) { + std::string reason; + if (!thisFunc->IsCompatibleWithExecutionModel(model, &reason)) { + DIAG(2) + << "OpEntryPoint Entry Point '" << entryId + << "'s callgraph contains function " << thisInst->id() + << ", which cannot be used with the current execution model:\n" + << reason; + return false; + } + } + } + } + auto resultTypeIndex = 1; auto resultType = module_.FindDef(inst->words[resultTypeIndex]); if (!resultType) return false; auto functionTypeIndex = 4; auto functionType = module_.FindDef(inst->words[functionTypeIndex]); if (!functionType || SpvOpTypeFunction != functionType->opcode()) { - DIAG(functionTypeIndex) << "OpFunction Function Type '" - << inst->words[functionTypeIndex] - << "' is not a function type."; + DIAG(functionTypeIndex) + << "OpFunction Function Type '" << inst->words[functionTypeIndex] + << "' is not a function type."; return false; } auto returnType = module_.FindDef(functionType->words()[2]); @@ -1620,18 +1701,6 @@ bool idUsage::isValid(const spv_instruction_t* inst, return true; } -#if 0 -template <> -bool idUsage::isValid( - const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid( - const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} -#endif - template <> bool idUsage::isValid(const spv_instruction_t* inst, const spv_opcode_desc) { @@ -1660,8 +1729,9 @@ bool idUsage::isValid(const spv_instruction_t* inst, auto resultVectorDimension = resultType->words()[vectorComponentCountIndex]; if (componentCount != resultVectorDimension) { DIAG(inst->words.size() - 1) - << instr_name() << " component literals count does not match " - "Result Type '" + << instr_name() + << " component literals count does not match " + "Result Type '" << resultType->id() << "'s vector component count."; return false; } @@ -1714,199 +1784,72 @@ bool idUsage::isValid(const spv_instruction_t* inst, return true; } -#if 0 -template <> -bool idUsage::isValid( - const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} -#endif - -// Walks the composite type hierarchy starting from the base. -// At each step, the iterator is dereferenced to get the next literal index. -// Indexes walk the type hierarchy to the desired depth, potentially down to -// scalar granularity. The first index in Indexes will select the top-level -// member/element/component/element of the base composite. All composite -// constituents use zero-based numbering, as described by their OpType... -// instruction. The second index will apply similarly to that result, and so -// on. Once any non-composite type is reached, there must be no remaining -// (unused) indexes. -// Returns true on success and false otherwise. -// If successful, the final type reached by indexing is returned by reference. -// If an error occurs, the error string is returned by reference. -bool walkCompositeTypeHierarchy( - const ValidationState_t& module, - std::vector::const_iterator word_iter, - std::vector::const_iterator word_iter_end, - const libspirv::Instruction* base, - const libspirv::Instruction** result_type_instr, - std::function instr_name, std::ostream* error) { - auto cur_type = base; - for (; word_iter != word_iter_end; ++word_iter) { - switch (cur_type->opcode()) { - case SpvOpTypeMatrix: - case SpvOpTypeVector: - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: { - // In OpTypeMatrix, OpTypeVector, OpTypeArray, and OpTypeRuntimeArray, - // word 2 is the Element Type. - cur_type = module.FindDef(cur_type->word(2)); - break; - } - case SpvOpTypeStruct: { - // Get the index into the structure. - const uint32_t cur_index = *word_iter; - // The index points to the struct member we want, therefore, the index - // should be less than the number of struct members. - const uint32_t num_struct_members = - static_cast(cur_type->words().size() - 2); - if (cur_index >= num_struct_members) { - *error << "Index is out of bounds: " << instr_name() - << " can not find index " << cur_index - << " into the structure '" << cur_type->id() - << "'. This structure has " << num_struct_members - << " members. Largest valid index is " - << num_struct_members - 1 << "."; - return false; - } - // Struct members IDs start at word 2 of OpTypeStruct. - auto structMemberId = cur_type->word(cur_index + 2); - cur_type = module.FindDef(structMemberId); - break; - } - default: { - // Give an error. reached non-composite type while indexes still remain. - *error << instr_name() << " reached non-composite type while indexes " - "still remain to be traversed."; - return false; - } - } - } - *result_type_instr = cur_type; - return true; -} - template <> -bool idUsage::isValid(const spv_instruction_t* inst, - const spv_opcode_desc) { - auto instr_name = [&inst]() { - std::string name = - "Op" + std::string(spvOpcodeString(static_cast(inst->opcode))); - return name; - }; - - // Remember the result type. Result Type is at word 1. - // This will be used to make sure the indexing results in the same type. - const size_t resultTypeIndex = 1; - auto resultTypeInstr = module_.FindDef(inst->words[resultTypeIndex]); - - // The Composite is at word 3. ID definition checks ensure this id is - // already defined. - auto baseInstr = module_.FindDef(inst->words[3]); - auto curTypeInstr = module_.FindDef(baseInstr->type_id()); - - // Check Universal Limit (SPIR-V Spec. Section 2.17). - // The number of indexes passed to OpCompositeExtract may not exceed 255. - // The instruction includes 4 words + N words (for N indexes) - const size_t num_indexes = inst->words.size() - 4; - const size_t num_indexes_limit = 255; - if (num_indexes > num_indexes_limit) { - DIAG(resultTypeIndex) << "The number of indexes in " << instr_name() - << " may not exceed " << num_indexes_limit - << ". Found " << num_indexes << " indexes."; +bool idUsage::isValid(const spv_instruction_t* inst, + const spv_opcode_desc /*opcodeEntry*/) { + auto thisInst = module_.FindDef(inst->words[2]); + SpvOp typeOp = module_.GetIdOpcode(thisInst->type_id()); + if (!spvOpcodeGeneratesType(typeOp)) { + DIAG(0) << "OpPhi's type " << module_.getIdName(thisInst->type_id()) + << " is not a type instruction."; return false; } - // Walk down the composite type structure. Indexes start at word 4. - const libspirv::Instruction* indexedTypeInstr = nullptr; - std::ostringstream error; - bool success = walkCompositeTypeHierarchy( - module_, inst->words.begin() + 4, inst->words.end(), curTypeInstr, - &indexedTypeInstr, instr_name, &error); - if (!success) { - DIAG(resultTypeIndex) << error.str(); - return success; - } - - // At this point, we have fully walked down from the base using the indexes. - // The type being pointed to should be the same as the result type. - if (indexedTypeInstr->id() != resultTypeInstr->id()) { - DIAG(resultTypeIndex) - << instr_name() << " result type (Op" - << spvOpcodeString(static_cast(resultTypeInstr->opcode())) - << ") does not match the type that results from indexing into the " - "composite (Op" - << spvOpcodeString(static_cast(indexedTypeInstr->opcode())) - << ")."; + auto block = thisInst->block(); + size_t numInOps = inst->words.size() - 3; + if (numInOps % 2 != 0) { + DIAG(0) << "OpPhi does not have an equal number of incoming values and " + "basic blocks."; return false; } - return true; -} + // Create a uniqued vector of predecessor ids for comparison against + // incoming values. OpBranchConditional %cond %label %label produces two + // predecessors in the CFG. + std::vector predIds; + std::transform(block->predecessors()->begin(), block->predecessors()->end(), + std::back_inserter(predIds), + [](const libspirv::BasicBlock* b) { return b->id(); }); + std::sort(predIds.begin(), predIds.end()); + predIds.erase(std::unique(predIds.begin(), predIds.end()), predIds.end()); -template <> -bool idUsage::isValid(const spv_instruction_t* inst, - const spv_opcode_desc) { - auto instr_name = [&inst]() { - std::string name = - "Op" + std::string(spvOpcodeString(static_cast(inst->opcode))); - return name; - }; - - // Result Type must be the same as Composite type. Result Type is the - // word at index 1. Composite is at word 4. - // The grammar guarantees that the instruction has at least 5 words. - // ID definition checks ensure these IDs are already defined. - const size_t resultTypeIndex = 1; - const size_t resultIdIndex = 2; - const size_t compositeIndex = 4; - auto resultTypeInstr = module_.FindDef(inst->words[resultTypeIndex]); - auto compositeInstr = module_.FindDef(inst->words[compositeIndex]); - auto compositeTypeInstr = module_.FindDef(compositeInstr->type_id()); - if (resultTypeInstr != compositeTypeInstr) { - DIAG(resultTypeIndex) - << "The Result Type must be the same as Composite type in " - << instr_name() << " yielding Result Id " << inst->words[resultIdIndex] - << "."; + size_t numEdges = numInOps / 2; + if (numEdges != predIds.size()) { + DIAG(0) << "OpPhi's number of incoming blocks (" << numEdges + << ") does not match block's predecessor count (" + << block->predecessors()->size() << ")."; return false; } - // Check Universal Limit (SPIR-V Spec. Section 2.17). - // The number of indexes passed to OpCompositeInsert may not exceed 255. - // The instruction includes 5 words + N words (for N indexes) - const size_t num_indexes = inst->words.size() - 5; - const size_t num_indexes_limit = 255; - if (num_indexes > num_indexes_limit) { - DIAG(resultTypeIndex) << "The number of indexes in " << instr_name() - << " may not exceed " << num_indexes_limit - << ". Found " << num_indexes << " indexes."; - return false; - } - - // Walk the composite type structure. Indexes start at word 5. - const libspirv::Instruction* indexedTypeInstr = nullptr; - std::ostringstream error; - bool success = walkCompositeTypeHierarchy( - module_, inst->words.begin() + 5, inst->words.end(), compositeTypeInstr, - &indexedTypeInstr, instr_name, &error); - if (!success) { - DIAG(resultTypeIndex) << error.str(); - return success; - } + for (size_t i = 3; i < inst->words.size(); ++i) { + auto incId = inst->words[i]; + if (i % 2 == 1) { + // Incoming value type must match the phi result type. + auto incTypeId = module_.GetTypeId(incId); + if (thisInst->type_id() != incTypeId) { + DIAG(i) << "OpPhi's result type " + << module_.getIdName(thisInst->type_id()) + << " does not match incoming value " + << module_.getIdName(incId) << " type " + << module_.getIdName(incTypeId) << "."; + return false; + } + } else { + if (module_.GetIdOpcode(incId) != SpvOpLabel) { + DIAG(i) << "OpPhi's incoming basic block " + << module_.getIdName(incId) << " is not an OpLabel."; + return false; + } - // At this point, we have fully walked down from the base using the indexes. - // The type being pointed to should be the same as the object type that is - // about to be inserted. - auto objectIdIndex = 3; - auto objectInstr = module_.FindDef(inst->words[objectIdIndex]); - auto objectTypeInstr = module_.FindDef(objectInstr->type_id()); - if (indexedTypeInstr->id() != objectTypeInstr->id()) { - DIAG(objectIdIndex) - << "The Object type (Op" - << spvOpcodeString(static_cast(objectTypeInstr->opcode())) - << ") in " << instr_name() << " does not match the type that results " - "from indexing into the Composite (Op" - << spvOpcodeString(static_cast(indexedTypeInstr->opcode())) - << ")."; - return false; + // Incoming basic block must be an immediate predecessor of the phi's + // block. + if (!std::binary_search(predIds.begin(), predIds.end(), incId)) { + DIAG(i) << "OpPhi's incoming basic block " + << module_.getIdName(incId) << " is not a predecessor of " + << module_.getIdName(block->id()) << "."; + return false; + } + } } return true; @@ -1914,99 +1857,61 @@ bool idUsage::isValid(const spv_instruction_t* inst, #if 0 template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, +bool idUsage::isValid(const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} #endif #if 0 template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif - -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} +bool idUsage::isValid( + const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} #endif -#if 0 template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif +bool idUsage::isValid(const spv_instruction_t* inst, + const spv_opcode_desc) { + const size_t numOperands = inst->words.size() - 1; + const size_t condOperandIndex = 1; + const size_t targetTrueIndex = 2; + const size_t targetFalseIndex = 3; -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif + // num_operands is either 3 or 5 --- if 5, the last two need to be literal + // integers + if (numOperands != 3 && numOperands != 5) { + DIAG(0) << "OpBranchConditional requires either 3 or 5 parameters"; + return false; + } -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif + bool ret = true; -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif + // grab the condition operand and check that it is a bool + const auto condOp = module_.FindDef(inst->words[condOperandIndex]); + if (!condOp || !module_.IsBoolScalarType(condOp->type_id())) { + DIAG(0) + << "Condition operand for OpBranchConditional must be of boolean type"; + ret = false; + } -#if 0 -template <> -bool idUsage::isValid( - const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} -#endif + // target operands must be OpLabel + // note that we don't need to check that the target labels are in the same + // function, + // PerformCfgChecks already checks for that + const auto targetOpTrue = module_.FindDef(inst->words[targetTrueIndex]); + if (!targetOpTrue || SpvOpLabel != targetOpTrue->opcode()) { + DIAG(0) << "The 'True Label' operand for OpBranchConditional must be the " + "ID of an OpLabel instruction"; + ret = false; + } -#if 0 -template <> -bool idUsage::isValid(const spv_instruction_t *inst, - const spv_opcode_desc opcodeEntry) {} -#endif + const auto targetOpFalse = module_.FindDef(inst->words[targetFalseIndex]); + if (!targetOpFalse || SpvOpLabel != targetOpFalse->opcode()) { + DIAG(0) << "The 'False Label' operand for OpBranchConditional must be the " + "ID of an OpLabel instruction"; + ret = false; + } -#if 0 -template <> -bool idUsage::isValid( - const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {} -#endif + return ret; +} #if 0 template <> @@ -2030,16 +1935,20 @@ bool idUsage::isValid(const spv_instruction_t* inst, << "' is missing or void."; return false; } + const bool uses_variable_pointer = module_.features().variable_pointers || module_.features().variable_pointers_storage_buffer; + if (addressingModel == SpvAddressingModelLogical && - SpvOpTypePointer == valueType->opcode() && !uses_variable_pointer) { + SpvOpTypePointer == valueType->opcode() && !uses_variable_pointer && + !module_.options()->relax_logcial_pointer) { DIAG(valueIndex) << "OpReturnValue value's type '" << value->type_id() << "' is a pointer, which is invalid in the Logical addressing model."; return false; } + // NOTE: Find OpFunction const spv_instruction_t* function = inst - 1; while (firstInst != function) { @@ -2444,7 +2353,8 @@ bool idUsage::isValid( bool idUsage::isValid(const spv_instruction_t* inst) { spv_opcode_desc opcodeEntry = nullptr; - if (spvOpcodeTableValueLookup(opcodeTable, inst->opcode, &opcodeEntry)) + if (spvOpcodeTableValueLookup(targetEnv, opcodeTable, inst->opcode, + &opcodeEntry)) return false; #define CASE(OpCode) \ case Spv##OpCode: \ @@ -2498,31 +2408,18 @@ bool idUsage::isValid(const spv_instruction_t* inst) { CASE(OpFunctionParameter) CASE(OpFunctionCall) // Conversion opcodes are validated in validate_conversion.cpp. - TODO(OpVectorExtractDynamic) - TODO(OpVectorInsertDynamic) CASE(OpVectorShuffle) - TODO(OpCompositeConstruct) - CASE(OpCompositeExtract) - CASE(OpCompositeInsert) - TODO(OpCopyObject) - TODO(OpTranspose) + // Other composite opcodes are validated in validate_composites.cpp. // Arithmetic opcodes are validated in validate_arithmetics.cpp. // Bitwise opcodes are validated in validate_bitwise.cpp. // Logical opcodes are validated in validate_logicals.cpp. - TODO(OpDPdx) - TODO(OpDPdy) - TODO(OpFwidth) - TODO(OpDPdxFine) - TODO(OpDPdyFine) - TODO(OpFwidthFine) - TODO(OpDPdxCoarse) - TODO(OpDPdyCoarse) - TODO(OpFwidthCoarse) - TODO(OpPhi) + // Derivative opcodes are validated in validate_derivatives.cpp. + CASE(OpPhi) TODO(OpLoopMerge) TODO(OpSelectionMerge) - TODO(OpBranch) - TODO(OpBranchConditional) + // OpBranch is validated in validate_cfg.cpp. + // See tests in test/val/val_cfg_test.cpp. + CASE(OpBranchConditional) TODO(OpSwitch) CASE(OpReturnValue) TODO(OpLifetimeStart) @@ -2592,6 +2489,102 @@ bool idUsage::isValid(const spv_instruction_t* inst) { #undef TODO #undef CASE } + +bool idUsage::AreLayoutCompatibleStructs(const libspirv::Instruction* type1, + const libspirv::Instruction* type2) { + if (type1->opcode() != SpvOpTypeStruct) { + return false; + } + if (type2->opcode() != SpvOpTypeStruct) { + return false; + } + + if (!HaveLayoutCompatibleMembers(type1, type2)) return false; + + return HaveSameLayoutDecorations(type1, type2); +} + +bool idUsage::HaveLayoutCompatibleMembers(const libspirv::Instruction* type1, + const libspirv::Instruction* type2) { + assert(type1->opcode() == SpvOpTypeStruct && + "type1 must be and OpTypeStruct instruction."); + assert(type2->opcode() == SpvOpTypeStruct && + "type2 must be and OpTypeStruct instruction."); + const auto& type1_operands = type1->operands(); + const auto& type2_operands = type2->operands(); + if (type1_operands.size() != type2_operands.size()) { + return false; + } + + for (size_t operand = 2; operand < type1_operands.size(); ++operand) { + if (type1->word(operand) != type2->word(operand)) { + auto def1 = module_.FindDef(type1->word(operand)); + auto def2 = module_.FindDef(type2->word(operand)); + if (!AreLayoutCompatibleStructs(def1, def2)) { + return false; + } + } + } + return true; +} + +bool idUsage::HaveSameLayoutDecorations(const libspirv::Instruction* type1, + const libspirv::Instruction* type2) { + assert(type1->opcode() == SpvOpTypeStruct && + "type1 must be and OpTypeStruct instruction."); + assert(type2->opcode() == SpvOpTypeStruct && + "type2 must be and OpTypeStruct instruction."); + const std::vector& type1_decorations = + module_.id_decorations(type1->id()); + const std::vector& type2_decorations = + module_.id_decorations(type2->id()); + + // TODO: Will have to add other check for arrays an matricies if we want to + // handle them. + if (HasConflictingMemberOffsets(type1_decorations, type2_decorations)) { + return false; + } + + return true; +} + +bool idUsage::HasConflictingMemberOffsets( + const vector& type1_decorations, + const vector& type2_decorations) const { + { + // We are interested in conflicting decoration. If a decoration is in one + // list but not the other, then we will assume the code is correct. We are + // looking for things we know to be wrong. + // + // We do not have to traverse type2_decoration because, after traversing + // type1_decorations, anything new will not be found in + // type1_decoration. Therefore, it cannot lead to a conflict. + for (const Decoration& decoration : type1_decorations) { + switch (decoration.dec_type()) { + case SpvDecorationOffset: { + // Since these affect the layout of the struct, they must be present + // in both structs. + auto compare = [&decoration](const Decoration& rhs) { + if (rhs.dec_type() != SpvDecorationOffset) return false; + return decoration.struct_member_index() == + rhs.struct_member_index(); + }; + auto i = find_if(type2_decorations.begin(), type2_decorations.end(), + compare); + if (i != type2_decorations.end() && + decoration.params().front() != i->params().front()) { + return true; + } + } break; + default: + // This decoration does not affect the layout of the structure, so + // just moving on. + break; + } + } + } + return false; +} } // anonymous namespace namespace libspirv { @@ -2671,7 +2664,8 @@ spv_result_t CheckIdDefinitionDominateUse(const ValidationState_t& _) { const Instruction* variable = _.FindDef(phi->word(i)); const BasicBlock* parent = phi->function()->GetBlock(phi->word(i + 1)).first; - if (variable->block() && !variable->block()->dominates(*parent)) { + if (variable->block() && parent->reachable() && + !variable->block()->dominates(*parent)) { return _.diag(SPV_ERROR_INVALID_ID) << "In OpPhi instruction " << _.getIdName(phi->id()) << ", ID " << _.getIdName(variable->id()) @@ -2729,9 +2723,9 @@ spv_result_t IdPass(ValidationState_t& _, } else if (can_have_forward_declared_ids(i)) { ret = _.ForwardDeclareId(operand_word); } else { - ret = _.diag(SPV_ERROR_INVALID_ID) << "ID " - << _.getIdName(operand_word) - << " has not been defined"; + ret = _.diag(SPV_ERROR_INVALID_ID) + << "ID " << _.getIdName(operand_word) + << " has not been defined"; } break; default: @@ -2752,14 +2746,11 @@ spv_result_t IdPass(ValidationState_t& _, spv_result_t spvValidateInstructionIDs(const spv_instruction_t* pInsts, const uint64_t instCount, - const spv_opcode_table opcodeTable, - const spv_operand_table operandTable, - const spv_ext_inst_table extInstTable, const libspirv::ValidationState_t& state, spv_position position) { - idUsage idUsage(opcodeTable, operandTable, extInstTable, pInsts, instCount, - state.memory_model(), state.addressing_model(), state, - state.entry_points(), position, state.context()->consumer); + idUsage idUsage(state.context(), pInsts, instCount, state.memory_model(), + state.addressing_model(), state, state.entry_points(), + position, state.context()->consumer); for (uint64_t instIndex = 0; instIndex < instCount; ++instIndex) { if (!idUsage.isValid(&pInsts[instIndex])) return SPV_ERROR_INVALID_ID; position->index += pInsts[instIndex].words.size(); diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_image.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_image.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d671b95413ad10176b517968c8c12449730015f --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_image.cpp @@ -0,0 +1,1670 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of image instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "spirv_target_env.h" +#include "util/bitutils.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +// Performs compile time check that all SpvImageOperandsXXX cases are handled in +// this module. If SpvImageOperandsXXX list changes, this function will fail the +// build. +// For all other purposes this is a dummy function. +bool CheckAllImageOperandsHandled() { + SpvImageOperandsMask enum_val = SpvImageOperandsBiasMask; + + // Some improvised code to prevent the compiler from considering enum_val + // constant and optimizing the switch away. + uint32_t stack_var = 0; + if (reinterpret_cast(&stack_var) % 256) + enum_val = SpvImageOperandsLodMask; + + switch (enum_val) { + // Please update the validation rules in this module if you are changing + // the list of image operands, and add new enum values to this switch. + case SpvImageOperandsMaskNone: + return false; + case SpvImageOperandsBiasMask: + case SpvImageOperandsLodMask: + case SpvImageOperandsGradMask: + case SpvImageOperandsConstOffsetMask: + case SpvImageOperandsOffsetMask: + case SpvImageOperandsConstOffsetsMask: + case SpvImageOperandsSampleMask: + case SpvImageOperandsMinLodMask: + return true; + } + return false; +} + +// Used by GetImageTypeInfo. See OpTypeImage spec for more information. +struct ImageTypeInfo { + uint32_t sampled_type = 0; + SpvDim dim = SpvDimMax; + uint32_t depth = 0; + uint32_t arrayed = 0; + uint32_t multisampled = 0; + uint32_t sampled = 0; + SpvImageFormat format = SpvImageFormatMax; + SpvAccessQualifier access_qualifier = SpvAccessQualifierMax; +}; + +// Provides information on image type. |id| should be object of either +// OpTypeImage or OpTypeSampledImage type. Returns false in case of failure +// (not a valid id, failed to parse the instruction, etc). +bool GetImageTypeInfo(const ValidationState_t& _, uint32_t id, + ImageTypeInfo* info) { + if (!id || !info) return false; + + const Instruction* inst = _.FindDef(id); + assert(inst); + + if (inst->opcode() == SpvOpTypeSampledImage) { + inst = _.FindDef(inst->word(2)); + assert(inst); + } + + if (inst->opcode() != SpvOpTypeImage) return false; + + const size_t num_words = inst->words().size(); + if (num_words != 9 && num_words != 10) return false; + + info->sampled_type = inst->word(2); + info->dim = static_cast(inst->word(3)); + info->depth = inst->word(4); + info->arrayed = inst->word(5); + info->multisampled = inst->word(6); + info->sampled = inst->word(7); + info->format = static_cast(inst->word(8)); + info->access_qualifier = num_words < 10 + ? SpvAccessQualifierMax + : static_cast(inst->word(9)); + return true; +} + +bool IsImplicitLod(SpvOp opcode) { + switch (opcode) { + case SpvOpImageSampleImplicitLod: + case SpvOpImageSampleDrefImplicitLod: + case SpvOpImageSampleProjImplicitLod: + case SpvOpImageSampleProjDrefImplicitLod: + case SpvOpImageSparseSampleImplicitLod: + case SpvOpImageSparseSampleDrefImplicitLod: + case SpvOpImageSparseSampleProjImplicitLod: + case SpvOpImageSparseSampleProjDrefImplicitLod: + return true; + default: + break; + }; + return false; +} + +bool IsExplicitLod(SpvOp opcode) { + switch (opcode) { + case SpvOpImageSampleExplicitLod: + case SpvOpImageSampleDrefExplicitLod: + case SpvOpImageSampleProjExplicitLod: + case SpvOpImageSampleProjDrefExplicitLod: + case SpvOpImageSparseSampleExplicitLod: + case SpvOpImageSparseSampleDrefExplicitLod: + case SpvOpImageSparseSampleProjExplicitLod: + case SpvOpImageSparseSampleProjDrefExplicitLod: + return true; + default: + break; + }; + return false; +} + +// Returns true if the opcode is a Image instruction which applies +// homogenous projection to the coordinates. +bool IsProj(SpvOp opcode) { + switch (opcode) { + case SpvOpImageSampleProjImplicitLod: + case SpvOpImageSampleProjDrefImplicitLod: + case SpvOpImageSparseSampleProjImplicitLod: + case SpvOpImageSparseSampleProjDrefImplicitLod: + case SpvOpImageSampleProjExplicitLod: + case SpvOpImageSampleProjDrefExplicitLod: + case SpvOpImageSparseSampleProjExplicitLod: + case SpvOpImageSparseSampleProjDrefExplicitLod: + return true; + default: + break; + }; + return false; +} + +// Returns the number of components in a coordinate used to access a texel in +// a single plane of an image with the given parameters. +uint32_t GetPlaneCoordSize(const ImageTypeInfo& info) { + uint32_t plane_size = 0; + // If this switch breaks your build, please add new values below. + switch (info.dim) { + case SpvDim1D: + case SpvDimBuffer: + plane_size = 1; + break; + case SpvDim2D: + case SpvDimRect: + case SpvDimSubpassData: + plane_size = 2; + break; + case SpvDim3D: + case SpvDimCube: + // For Cube direction vector is used instead of UV. + plane_size = 3; + break; + case SpvDimMax: + assert(0); + break; + } + + return plane_size; +} + +// Returns minimal number of coordinates based on image dim, arrayed and whether +// the instruction uses projection coordinates. +uint32_t GetMinCoordSize(SpvOp opcode, const ImageTypeInfo& info) { + if (info.dim == SpvDimCube && + (opcode == SpvOpImageRead || opcode == SpvOpImageWrite || + opcode == SpvOpImageSparseRead)) { + // These opcodes use UV for Cube, not direction vector. + return 3; + } + + return GetPlaneCoordSize(info) + info.arrayed + (IsProj(opcode) ? 1 : 0); +} + +// Checks ImageOperand bitfield and respective operands. +spv_result_t ValidateImageOperands(ValidationState_t& _, + const spv_parsed_instruction_t& inst, + const ImageTypeInfo& info, uint32_t mask, + uint32_t word_index) { + static const bool kAllImageOperandsHandled = CheckAllImageOperandsHandled(); + (void)kAllImageOperandsHandled; + + const SpvOp opcode = static_cast(inst.opcode); + const uint32_t num_words = inst.num_words; + + size_t expected_num_image_operand_words = spvutils::CountSetBits(mask); + if (mask & SpvImageOperandsGradMask) { + // Grad uses two words. + ++expected_num_image_operand_words; + } + + if (expected_num_image_operand_words != num_words - word_index) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Number of image operand ids doesn't correspond to the bit mask: " + << spvOpcodeString(opcode); + } + + if (spvutils::CountSetBits(mask & (SpvImageOperandsOffsetMask | + SpvImageOperandsConstOffsetMask | + SpvImageOperandsConstOffsetsMask)) > 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operands Offset, ConstOffset, ConstOffsets cannot be used " + << "together: " << spvOpcodeString(opcode); + }; + + const bool is_implicit_lod = IsImplicitLod(opcode); + const bool is_explicit_lod = IsExplicitLod(opcode); + + // The checks should be done in the order of definition of OperandImage. + + if (mask & SpvImageOperandsBiasMask) { + if (!is_implicit_lod) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Bias can only be used with ImplicitLod opcodes: " + << spvOpcodeString(opcode); + }; + + const uint32_t type_id = _.GetTypeId(inst.words[word_index++]); + if (!_.IsFloatScalarType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Bias to be float scalar: " + << spvOpcodeString(opcode); + } + + if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && + info.dim != SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Bias requires 'Dim' parameter to be 1D, 2D, 3D " + "or " + << "Cube: " << spvOpcodeString(opcode); + } + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Bias requires 'MS' parameter to be 0: " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsLodMask) { + if (!is_explicit_lod && opcode != SpvOpImageFetch && + opcode != SpvOpImageSparseFetch) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Lod can only be used with ExplicitLod opcodes " + << "and OpImageFetch: " << spvOpcodeString(opcode); + }; + + if (mask & SpvImageOperandsGradMask) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand bits Lod and Grad cannot be set at the same " + "time: " + << spvOpcodeString(opcode); + } + + const uint32_t type_id = _.GetTypeId(inst.words[word_index++]); + if (is_explicit_lod) { + if (!_.IsFloatScalarType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Lod to be float scalar when used " + << "with ExplicitLod: " << spvOpcodeString(opcode); + } + } else { + if (!_.IsIntScalarType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Lod to be int scalar when used with " + << "OpImageFetch"; + } + } + + if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && + info.dim != SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Lod requires 'Dim' parameter to be 1D, 2D, 3D " + "or " + << "Cube: " << spvOpcodeString(opcode); + } + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Lod requires 'MS' parameter to be 0: " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsGradMask) { + if (!is_explicit_lod) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Grad can only be used with ExplicitLod opcodes: " + << spvOpcodeString(opcode); + }; + + const uint32_t dx_type_id = _.GetTypeId(inst.words[word_index++]); + const uint32_t dy_type_id = _.GetTypeId(inst.words[word_index++]); + if (!_.IsFloatScalarOrVectorType(dx_type_id) || + !_.IsFloatScalarOrVectorType(dy_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected both Image Operand Grad ids to be float scalars or " + << "vectors: " << spvOpcodeString(opcode); + } + + const uint32_t plane_size = GetPlaneCoordSize(info); + const uint32_t dx_size = _.GetDimension(dx_type_id); + const uint32_t dy_size = _.GetDimension(dy_type_id); + if (plane_size != dx_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Grad dx to have " << plane_size + << " components, but given " << dx_size << ": " + << spvOpcodeString(opcode); + } + + if (plane_size != dy_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Grad dy to have " << plane_size + << " components, but given " << dy_size << ": " + << spvOpcodeString(opcode); + } + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Grad requires 'MS' parameter to be 0: " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsConstOffsetMask) { + if (info.dim == SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand ConstOffset cannot be used with Cube Image " + "'Dim': " + << spvOpcodeString(opcode); + } + + const uint32_t id = inst.words[word_index++]; + const uint32_t type_id = _.GetTypeId(id); + if (!_.IsIntScalarOrVectorType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffset to be int scalar or " + << "vector: " << spvOpcodeString(opcode); + } + + if (!spvOpcodeIsConstant(_.GetIdOpcode(id))) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffset to be a const object: " + << spvOpcodeString(opcode); + } + + const uint32_t plane_size = GetPlaneCoordSize(info); + const uint32_t offset_size = _.GetDimension(type_id); + if (plane_size != offset_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffset to have " << plane_size + << " components, but given " << offset_size << ": " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsOffsetMask) { + if (info.dim == SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Offset cannot be used with Cube Image 'Dim': " + << spvOpcodeString(opcode); + } + + const uint32_t id = inst.words[word_index++]; + const uint32_t type_id = _.GetTypeId(id); + if (!_.IsIntScalarOrVectorType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Offset to be int scalar or " + << "vector: " << spvOpcodeString(opcode); + } + + const uint32_t plane_size = GetPlaneCoordSize(info); + const uint32_t offset_size = _.GetDimension(type_id); + if (plane_size != offset_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Offset to have " << plane_size + << " components, but given " << offset_size << ": " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsConstOffsetsMask) { + if (opcode != SpvOpImageGather && opcode != SpvOpImageDrefGather && + opcode != SpvOpImageSparseGather && + opcode != SpvOpImageSparseDrefGather) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand ConstOffsets can only be used with " + "OpImageGather " + << "and OpImageDrefGather: " << spvOpcodeString(opcode); + } + + if (info.dim == SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand ConstOffsets cannot be used with Cube Image " + "'Dim': " + << spvOpcodeString(opcode); + } + + const uint32_t id = inst.words[word_index++]; + const uint32_t type_id = _.GetTypeId(id); + const Instruction* type_inst = _.FindDef(type_id); + assert(type_inst); + + if (type_inst->opcode() != SpvOpTypeArray) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffsets to be an array of size 4: " + << spvOpcodeString(opcode); + } + + uint64_t array_size = 0; + if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { + assert(0 && "Array type definition is corrupt"); + } + + if (array_size != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffsets to be an array of size 4: " + << spvOpcodeString(opcode); + } + + const uint32_t component_type = type_inst->word(2); + if (!_.IsIntVectorType(component_type) || + _.GetDimension(component_type) != 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffsets array componenets to be " + "int " + << "vectors of size 2: " << spvOpcodeString(opcode); + } + + if (!spvOpcodeIsConstant(_.GetIdOpcode(id))) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand ConstOffsets to be a const object: " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsSampleMask) { + if (opcode != SpvOpImageFetch && opcode != SpvOpImageRead && + opcode != SpvOpImageWrite && opcode != SpvOpImageSparseFetch && + opcode != SpvOpImageSparseRead) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Sample can only be used with OpImageFetch, " + << "OpImageRead, OpImageWrite, OpImageSparseFetch and " + << "OpImageSparseRead: " << spvOpcodeString(opcode); + } + + if (info.multisampled == 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand Sample requires non-zero 'MS' parameter: " + << spvOpcodeString(opcode); + } + + const uint32_t type_id = _.GetTypeId(inst.words[word_index++]); + if (!_.IsIntScalarType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand Sample to be int scalar: " + << spvOpcodeString(opcode); + } + } + + if (mask & SpvImageOperandsMinLodMask) { + if (!is_implicit_lod && !(mask & SpvImageOperandsGradMask)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand MinLod can only be used with ImplicitLod " + << "opcodes or together with Image Operand Grad: " + << spvOpcodeString(opcode); + }; + + const uint32_t type_id = _.GetTypeId(inst.words[word_index++]); + if (!_.IsFloatScalarType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image Operand MinLod to be float scalar: " + << spvOpcodeString(opcode); + } + + if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && + info.dim != SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand MinLod requires 'Dim' parameter to be 1D, 2D, " + "3D " + << "or Cube: " << spvOpcodeString(opcode); + } + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Operand MinLod requires 'MS' parameter to be 0: " + << spvOpcodeString(opcode); + } + } + + return SPV_SUCCESS; +} + +// Checks some of the validation rules which are common to multiple opcodes. +spv_result_t ValidateImageCommon(ValidationState_t& _, + const spv_parsed_instruction_t& inst, + const ImageTypeInfo& info) { + const SpvOp opcode = static_cast(inst.opcode); + if (IsProj(opcode)) { + if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && + info.dim != SpvDimRect) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Dim' parameter to be 1D, 2D, 3D or Rect: " + << spvOpcodeString(opcode); + } + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Image 'MS' parameter to be 0: " + << spvOpcodeString(opcode); + } + + if (info.arrayed != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Image 'arrayed' parameter to be 0: " + << spvOpcodeString(opcode); + } + } + + if (opcode == SpvOpImageRead || opcode == SpvOpImageSparseRead || + opcode == SpvOpImageWrite) { + if (info.sampled == 0) { + } else if (info.sampled == 2) { + if (info.dim == SpvDim1D && !_.HasCapability(SpvCapabilityImage1D)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability Image1D is required to access storage image: " + << spvOpcodeString(opcode); + } else if (info.dim == SpvDimRect && + !_.HasCapability(SpvCapabilityImageRect)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability ImageRect is required to access storage image: " + << spvOpcodeString(opcode); + } else if (info.dim == SpvDimBuffer && + !_.HasCapability(SpvCapabilityImageBuffer)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability ImageBuffer is required to access storage image: " + << spvOpcodeString(opcode); + } else if (info.dim == SpvDimCube && info.arrayed == 1 && + !_.HasCapability(SpvCapabilityImageCubeArray)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability ImageCubeArray is required to access storage " + << "image: " << spvOpcodeString(opcode); + } + + if (info.multisampled == 1 && + !_.HasCapability(SpvCapabilityImageMSArray)) { +#if 0 + // TODO(atgoo@github.com) The description of this rule in the spec + // is unclear and Glslang doesn't declare ImageMSArray. Need to clarify + // and reenable. + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability ImageMSArray is required to access storage " + << "image: " << spvOpcodeString(opcode); +#endif + } + } else { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled' parameter to be 0 or 2: " + << spvOpcodeString(opcode); + } + } + + return SPV_SUCCESS; +} + +// Returns true if opcode is *ImageSparse*, false otherwise. +bool IsSparse(SpvOp opcode) { + switch (opcode) { + case SpvOpImageSparseSampleImplicitLod: + case SpvOpImageSparseSampleExplicitLod: + case SpvOpImageSparseSampleDrefImplicitLod: + case SpvOpImageSparseSampleDrefExplicitLod: + case SpvOpImageSparseSampleProjImplicitLod: + case SpvOpImageSparseSampleProjExplicitLod: + case SpvOpImageSparseSampleProjDrefImplicitLod: + case SpvOpImageSparseSampleProjDrefExplicitLod: + case SpvOpImageSparseFetch: + case SpvOpImageSparseGather: + case SpvOpImageSparseDrefGather: + case SpvOpImageSparseTexelsResident: + case SpvOpImageSparseRead: { + return true; + } + + default: { return false; } + } + + return false; +} + +// Checks sparse image opcode result type and returns the second struct member. +// Returns inst.type_id for non-sparse image opcodes. +// Not valid for sparse image opcodes which do not return a struct. +spv_result_t GetActualResultType(ValidationState_t& _, + const spv_parsed_instruction_t& inst, + uint32_t* actual_result_type) { + const SpvOp opcode = static_cast(inst.opcode); + + if (IsSparse(opcode)) { + const Instruction* const type_inst = _.FindDef(inst.type_id); + assert(type_inst); + + if (!type_inst || type_inst->opcode() != SpvOpTypeStruct) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be OpTypeStruct"; + } + + if (type_inst->words().size() != 4 || + !_.IsIntScalarType(type_inst->word(2))) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be a struct containing an int " + "scalar " + << "and a texel"; + } + + *actual_result_type = type_inst->word(3); + } else { + *actual_result_type = inst.type_id; + } + + return SPV_SUCCESS; +} + +// Returns a string describing actual result type of an opcode. +// Not valid for sparse image opcodes which do not return a struct. +const char* GetActualResultTypeStr(SpvOp opcode) { + if (IsSparse(opcode)) return "Result Type's second member"; + return "Result Type"; +} + +} // namespace + +// Validates correctness of image instructions. +spv_result_t ImagePass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + const uint32_t result_type = inst->type_id; + + if (IsImplicitLod(opcode)) { + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + "ImplicitLod instructions require Fragment execution model"); + } + + switch (opcode) { + case SpvOpTypeImage: { + assert(result_type == 0); + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, inst->words[1], &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "OpTypeImage: corrupt definition"; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if ((!_.IsFloatScalarType(info.sampled_type) && + !_.IsIntScalarType(info.sampled_type)) || + 32 != _.GetBitWidth(info.sampled_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Sampled Type to be a 32-bit int or float " + "scalar type for Vulkan environment"; + } + } else { + const SpvOp sampled_type_opcode = _.GetIdOpcode(info.sampled_type); + if (sampled_type_opcode != SpvOpTypeVoid && + sampled_type_opcode != SpvOpTypeInt && + sampled_type_opcode != SpvOpTypeFloat) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Sampled Type to be either void or numerical " + << "scalar type"; + } + } + + // Dim is checked elsewhere. + + if (info.depth > 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) << ": invalid Depth " << info.depth + << " (must be 0, 1 or 2)"; + } + + if (info.arrayed > 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) << ": invalid Arrayed " + << info.arrayed << " (must be 0 or 1)"; + } + + if (info.multisampled > 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) << ": invalid MS " + << info.multisampled << " (must be 0 or 1)"; + } + + if (info.sampled > 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) << ": invalid Sampled " + << info.sampled << " (must be 0, 1 or 2)"; + } + + if (info.dim == SpvDimSubpassData) { + if (info.sampled != 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Dim SubpassData requires Sampled to be 2"; + } + + if (info.format != SpvImageFormatUnknown) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Dim SubpassData requires format Unknown"; + } + } + + // Format and Access Qualifier are checked elsewhere. + + break; + } + + case SpvOpTypeSampledImage: { + const uint32_t image_type = inst->words[2]; + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Image to be of type OpTypeImage"; + } + + break; + } + + case SpvOpSampledImage: { + if (_.GetIdOpcode(result_type) != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be OpTypeSampledImage: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + // TODO(atgoo@github.com) Check compatibility of result type and received + // image. + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (info.sampled != 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled' parameter to be 1 for Vulkan " + "environment: " + << spvOpcodeString(opcode); + } + } else { + if (info.sampled != 0 && info.sampled != 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled' parameter to be 0 or 1: " + << spvOpcodeString(opcode); + } + } + + if (info.dim == SpvDimSubpassData) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Dim' parameter to be not SubpassData: " + << spvOpcodeString(opcode); + } + + if (_.GetIdOpcode(_.GetOperandTypeId(inst, 3)) != SpvOpTypeSampler) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sampler to be of type OpTypeSampler: " + << spvOpcodeString(opcode); + } + + break; + } + + case SpvOpImageSampleImplicitLod: + case SpvOpImageSampleExplicitLod: + case SpvOpImageSampleProjImplicitLod: + case SpvOpImageSampleProjExplicitLod: + case SpvOpImageSparseSampleImplicitLod: + case SpvOpImageSparseSampleExplicitLod: { + uint32_t actual_result_type = 0; + if (spv_result_t error = + GetActualResultType(_, *inst, &actual_result_type)) { + return error; + } + + if (!_.IsIntVectorType(actual_result_type) && + !_.IsFloatVectorType(actual_result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to be int or float vector type: " + << spvOpcodeString(opcode); + } + + if (_.GetDimension(actual_result_type) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to have 4 components: " << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sampled Image to be of type OpTypeSampledImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (spv_result_t result = ValidateImageCommon(_, *inst, info)) + return result; + + if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + const uint32_t texel_component_type = + _.GetComponentType(actual_result_type); + if (texel_component_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as " + << GetActualResultTypeStr(opcode) + << " components: " << spvOpcodeString(opcode); + } + } + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if ((opcode == SpvOpImageSampleExplicitLod || + opcode == SpvOpImageSparseSampleExplicitLod) && + _.HasCapability(SpvCapabilityKernel)) { + if (!_.IsFloatScalarOrVectorType(coord_type) && + !_.IsIntScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be int or float scalar or vector: " + << spvOpcodeString(opcode); + } + } else { + if (!_.IsFloatScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be float scalar or vector: " + << spvOpcodeString(opcode); + } + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + if (inst->num_words <= 5) { + assert(IsImplicitLod(opcode)); + break; + } + + const uint32_t mask = inst->words[5]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 6)) + return result; + + break; + } + + case SpvOpImageSampleDrefImplicitLod: + case SpvOpImageSampleDrefExplicitLod: + case SpvOpImageSampleProjDrefImplicitLod: + case SpvOpImageSampleProjDrefExplicitLod: + case SpvOpImageSparseSampleDrefImplicitLod: + case SpvOpImageSparseSampleDrefExplicitLod: { + uint32_t actual_result_type = 0; + if (spv_result_t error = + GetActualResultType(_, *inst, &actual_result_type)) { + return error; + } + + if (!_.IsIntScalarType(actual_result_type) && + !_.IsFloatScalarType(actual_result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to be int or float scalar type: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sampled Image to be of type OpTypeSampledImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (spv_result_t result = ValidateImageCommon(_, *inst, info)) + return result; + + if (actual_result_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as " + << GetActualResultTypeStr(opcode) << ": " + << spvOpcodeString(opcode); + } + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if (!_.IsFloatScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be float scalar or vector: " + << spvOpcodeString(opcode); + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + const uint32_t dref_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarType(dref_type) || _.GetBitWidth(dref_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Expected Dref to be of 32-bit float type"; + } + + if (inst->num_words <= 6) { + assert(IsImplicitLod(opcode)); + break; + } + + const uint32_t mask = inst->words[6]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 7)) + return result; + + break; + } + + case SpvOpImageFetch: + case SpvOpImageSparseFetch: { + uint32_t actual_result_type = 0; + if (spv_result_t error = + GetActualResultType(_, *inst, &actual_result_type)) { + return error; + } + + if (!_.IsIntVectorType(actual_result_type) && + !_.IsFloatVectorType(actual_result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to be int or float vector type: " + << spvOpcodeString(opcode); + } + + if (_.GetDimension(actual_result_type) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to have 4 components: " << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + const uint32_t result_component_type = + _.GetComponentType(actual_result_type); + if (result_component_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as " + << GetActualResultTypeStr(opcode) + << " components: " << spvOpcodeString(opcode); + } + } + + if (info.dim == SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' cannot be Cube: " << spvOpcodeString(opcode); + } + + if (info.sampled != 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled' parameter to be 1: " + << spvOpcodeString(opcode); + } + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be int scalar or vector: " + << spvOpcodeString(opcode); + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + if (inst->num_words <= 5) break; + + const uint32_t mask = inst->words[5]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 6)) + return result; + + break; + } + + case SpvOpImageGather: + case SpvOpImageDrefGather: + case SpvOpImageSparseGather: + case SpvOpImageSparseDrefGather: { + uint32_t actual_result_type = 0; + if (spv_result_t error = + GetActualResultType(_, *inst, &actual_result_type)) { + return error; + } + + if (!_.IsIntVectorType(actual_result_type) && + !_.IsFloatVectorType(actual_result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to be int or float vector type: " + << spvOpcodeString(opcode); + } + + if (_.GetDimension(actual_result_type) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to have 4 components: " << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sampled Image to be of type OpTypeSampledImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (opcode == SpvOpImageDrefGather || + opcode == SpvOpImageSparseDrefGather || + _.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + const uint32_t result_component_type = + _.GetComponentType(actual_result_type); + if (result_component_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as " + << GetActualResultTypeStr(opcode) + << " components: " << spvOpcodeString(opcode); + } + } + + if (info.dim != SpvDim2D && info.dim != SpvDimCube && + info.dim != SpvDimRect) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Dim' cannot be Cube: " + << spvOpcodeString(opcode); + } + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if (!_.IsFloatScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be float scalar or vector: " + << spvOpcodeString(opcode); + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + if (opcode == SpvOpImageGather || opcode == SpvOpImageSparseGather) { + const uint32_t component_index_type = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarType(component_index_type) || + _.GetBitWidth(component_index_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Component to be 32-bit int scalar: " + << spvOpcodeString(opcode); + } + } else { + assert(opcode == SpvOpImageDrefGather || + opcode == SpvOpImageSparseDrefGather); + const uint32_t dref_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarType(dref_type) || _.GetBitWidth(dref_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": Expected Dref to be of 32-bit float type"; + } + } + + if (inst->num_words <= 6) break; + + const uint32_t mask = inst->words[6]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 7)) + return result; + + break; + } + + case SpvOpImageRead: + case SpvOpImageSparseRead: { + uint32_t actual_result_type = 0; + if (spv_result_t error = + GetActualResultType(_, *inst, &actual_result_type)) { + return error; + } + + if (!_.IsIntScalarOrVectorType(actual_result_type) && + !_.IsFloatScalarOrVectorType(actual_result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to be int or float scalar or vector type: " + << spvOpcodeString(opcode); + } + +#if 0 + // TODO(atgoo@github.com) Disabled until the spec is clarified. + if (_.GetDimension(actual_result_type) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected " << GetActualResultTypeStr(opcode) + << " to have 4 components: " << spvOpcodeString(opcode); + } +#endif + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (info.dim == SpvDimSubpassData) { + if (opcode == SpvOpImageSparseRead) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image Dim SubpassData cannot be used with " + << spvOpcodeString(opcode); + } + + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + std::string("Dim SubpassData requires Fragment execution model: ") + + spvOpcodeString(opcode)); + } + + if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + const uint32_t result_component_type = + _.GetComponentType(actual_result_type); + if (result_component_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as " + << GetActualResultTypeStr(opcode) + << " components: " << spvOpcodeString(opcode); + } + } + + if (spv_result_t result = ValidateImageCommon(_, *inst, info)) + return result; + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be int scalar or vector: " + << spvOpcodeString(opcode); + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + if (info.format == SpvImageFormatUnknown && + info.dim != SpvDimSubpassData && + !_.HasCapability(SpvCapabilityStorageImageReadWithoutFormat)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability StorageImageReadWithoutFormat is required to " + << "read storage image: " << spvOpcodeString(opcode); + } + + if (inst->num_words <= 5) break; + + const uint32_t mask = inst->words[5]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 6)) + return result; + + break; + } + + case SpvOpImageWrite: { + const uint32_t image_type = _.GetOperandTypeId(inst, 0); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (info.dim == SpvDimSubpassData) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' cannot be SubpassData: " + << spvOpcodeString(opcode); + } + + if (spv_result_t result = ValidateImageCommon(_, *inst, info)) + return result; + + const uint32_t coord_type = _.GetOperandTypeId(inst, 1); + if (!_.IsIntScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be int scalar or vector: " + << spvOpcodeString(opcode); + } + + const uint32_t min_coord_size = GetMinCoordSize(opcode, info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + + // TODO(atgoo@github.com) The spec doesn't explicitely say what the type + // of texel should be. + const uint32_t texel_type = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarOrVectorType(texel_type) && + !_.IsFloatScalarOrVectorType(texel_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Texel to be int or float vector or scalar: " + << spvOpcodeString(opcode); + } + +#if 0 + // TODO: See above. + if (_.GetDimension(texel_type) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Texel to have 4 components: " + << spvOpcodeString(opcode); + } +#endif + + if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + const uint32_t texel_component_type = _.GetComponentType(texel_type); + if (texel_component_type != info.sampled_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image 'Sampled Type' to be the same as Texel " + << "components: " << spvOpcodeString(opcode); + } + } + + if (info.format == SpvImageFormatUnknown && + info.dim != SpvDimSubpassData && + !_.HasCapability(SpvCapabilityStorageImageWriteWithoutFormat)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Capability StorageImageWriteWithoutFormat is required to " + "write " + << "to storage image: " << spvOpcodeString(opcode); + } + + if (inst->num_words <= 4) break; + + const uint32_t mask = inst->words[4]; + if (spv_result_t result = + ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 5)) + return result; + + break; + } + + case SpvOpImage: { + if (_.GetIdOpcode(result_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be OpTypeImage: " + << spvOpcodeString(opcode); + } + + const uint32_t sampled_image_type = _.GetOperandTypeId(inst, 2); + const Instruction* sampled_image_type_inst = + _.FindDef(sampled_image_type); + assert(sampled_image_type_inst); + + if (sampled_image_type_inst->opcode() != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sample Image to be of type OpTypeSampleImage: " + << spvOpcodeString(opcode); + } + + if (sampled_image_type_inst->word(2) != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Sample Image image type to be equal to Result " + "Type: " + << spvOpcodeString(opcode); + } + + break; + } + + case SpvOpImageQueryFormat: + case SpvOpImageQueryOrder: { + if (!_.IsIntScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be int scalar type: " + << spvOpcodeString(opcode); + } + + if (_.GetIdOpcode(_.GetOperandTypeId(inst, 2)) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected operand to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + break; + } + + case SpvOpImageQuerySizeLod: { + if (!_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be int scalar or vector type: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + uint32_t expected_num_components = info.arrayed; + switch (info.dim) { + case SpvDim1D: + expected_num_components += 1; + break; + case SpvDim2D: + case SpvDimCube: + expected_num_components += 2; + break; + case SpvDim3D: + expected_num_components += 3; + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' must be 1D, 2D, 3D or Cube: " + << spvOpcodeString(opcode); + }; + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'MS' must be 0: " << spvOpcodeString(opcode); + } + + uint32_t result_num_components = _.GetDimension(result_type); + if (result_num_components != expected_num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Result Type has " << result_num_components << " components, " + << "but " << expected_num_components + << " expected: " << spvOpcodeString(opcode); + } + + const uint32_t lod_type = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarType(lod_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Level of Detail to be int scalar: " + << spvOpcodeString(opcode); + } + + break; + } + + case SpvOpImageQuerySize: { + if (!_.IsIntScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be int scalar or vector type: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + +#if 0 + // TODO(atgoo@github.com) The spec doesn't whitelist all Dims supported by + // GLSL. Need to verify if there is an error and reenable. + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + uint32_t expected_num_components = info.arrayed; + switch (info.dim) { + case SpvDimBuffer: + expected_num_components += 1; + break; + case SpvDim2D: + if (info.multisampled != 1 && info.sampled != 0 && + info.sampled != 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected either 'MS'=1 or 'Sampled'=0 or 'Sampled'=2 " + << "for 2D dim: " << spvOpcodeString(opcode); + } + case SpvDimRect: + expected_num_components += 2; + break; + case SpvDim3D: + expected_num_components += 3; + if (info.sampled != 0 && + info.sampled != 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected either 'Sampled'=0 or 'Sampled'=2 " + << "for 3D dim: " << spvOpcodeString(opcode); + } + break; + default: + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' must be Buffer, 2D, 3D or Rect: " + << spvOpcodeString(opcode); + }; + + + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'MS' must be 0: " << spvOpcodeString(opcode); + } + + uint32_t result_num_components = _.GetDimension(result_type); + if (result_num_components != expected_num_components) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Result Type has " << result_num_components << " components, " + << "but " << expected_num_components << " expected: " + << spvOpcodeString(opcode); + } +#endif + break; + } + + case SpvOpImageQueryLod: { + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + "OpImageQueryLod requires Fragment execution model"); + + if (!_.IsFloatVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be float vector type: " + << spvOpcodeString(opcode); + } + + if (_.GetDimension(result_type) != 2) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to have 2 components: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image operand to be of type OpTypeSampledImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (info.dim != SpvDim1D && info.dim != SpvDim2D && + info.dim != SpvDim3D && info.dim != SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' must be 1D, 2D, 3D or Cube: " + << spvOpcodeString(opcode); + } + + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); + if (_.HasCapability(SpvCapabilityKernel)) { + if (!_.IsFloatScalarOrVectorType(coord_type) && + !_.IsIntScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be int or float scalar or vector: " + << spvOpcodeString(opcode); + } + } else { + if (!_.IsFloatScalarOrVectorType(coord_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to be float scalar or vector: " + << spvOpcodeString(opcode); + } + } + + const uint32_t min_coord_size = GetPlaneCoordSize(info); + const uint32_t actual_coord_size = _.GetDimension(coord_type); + if (min_coord_size > actual_coord_size) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Coordinate to have at least " << min_coord_size + << " components, but given only " << actual_coord_size << ": " + << spvOpcodeString(opcode); + } + break; + } + + case SpvOpImageQueryLevels: + case SpvOpImageQuerySamples: { + if (!_.IsIntScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Result Type to be int scalar type: " + << spvOpcodeString(opcode); + } + + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Expected Image to be of type OpTypeImage: " + << spvOpcodeString(opcode); + } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Corrupt image type definition"; + } + + if (opcode == SpvOpImageQueryLevels) { + if (info.dim != SpvDim1D && info.dim != SpvDim2D && + info.dim != SpvDim3D && info.dim != SpvDimCube) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' must be 1D, 2D, 3D or Cube: " + << spvOpcodeString(opcode); + } + } else { + assert(opcode == SpvOpImageQuerySamples); + if (info.dim != SpvDim2D) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'Dim' must be 2D: " << spvOpcodeString(opcode); + } + + if (info.multisampled != 1) { + return _.diag(SPV_ERROR_INVALID_DATA) + << "Image 'MS' must be 1: " << spvOpcodeString(opcode); + } + } + + break; + } + + case SpvOpImageSparseSampleProjImplicitLod: + case SpvOpImageSparseSampleProjExplicitLod: + case SpvOpImageSparseSampleProjDrefImplicitLod: + case SpvOpImageSparseSampleProjDrefExplicitLod: { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": instruction reserved for future use, " + << "use of this instruction is invalid"; + } + + case SpvOpImageSparseTexelsResident: { + if (!_.IsBoolScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Result Type to be bool scalar type"; + } + + const uint32_t resident_code_type = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarType(resident_code_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Resident Code to be int scalar"; + } + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_instruction.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_instruction.cpp index aafb7b0432d2738f6e6d69875d0777d426e0d3aa..a50e0ea8947e26bce9682cd7c22f919ffc09eca7 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_instruction.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_instruction.cpp @@ -29,7 +29,9 @@ #include "extensions.h" #include "opcode.h" #include "operand.h" +#include "spirv_constant.h" #include "spirv_definition.h" +#include "spirv_target_env.h" #include "spirv_validator_options.h" #include "util/string_utils.h" #include "val/function.h" @@ -67,6 +69,38 @@ spv_result_t CapabilityError(ValidationState_t& _, int which_operand, << " requires one of these capabilities: " << required_capabilities; } +// Returns capabilities that enable an opcode. An empty result is interpreted +// as no prohibition of use of the opcode. If the result is non-empty, then +// the opcode may only be used if at least one of the capabilities is specified +// by the module. +CapabilitySet EnablingCapabilitiesForOp(const ValidationState_t& state, + SpvOp opcode) { + // Exceptions for SPV_AMD_shader_ballot + switch (opcode) { + // Normally these would require Group capability + case SpvOpGroupIAddNonUniformAMD: + case SpvOpGroupFAddNonUniformAMD: + case SpvOpGroupFMinNonUniformAMD: + case SpvOpGroupUMinNonUniformAMD: + case SpvOpGroupSMinNonUniformAMD: + case SpvOpGroupFMaxNonUniformAMD: + case SpvOpGroupUMaxNonUniformAMD: + case SpvOpGroupSMaxNonUniformAMD: + if (state.HasExtension(libspirv::kSPV_AMD_shader_ballot)) + return CapabilitySet(); + break; + default: + break; + } + // Look it up in the grammar + spv_opcode_desc opcode_desc = {}; + if (SPV_SUCCESS == state.grammar().lookupOpcode(opcode, &opcode_desc)) { + return state.grammar().filterCapsAgainstTargetEnv( + opcode_desc->capabilities, opcode_desc->numCapabilities); + } + return CapabilitySet(); +} + // Returns an operand's required capabilities. CapabilitySet RequiredCapabilities(const ValidationState_t& state, spv_operand_type_t type, uint32_t operand) { @@ -94,15 +128,30 @@ CapabilitySet RequiredCapabilities(const ValidationState_t& state, spv_operand_desc operand_desc; const auto ret = state.grammar().lookupOperand(type, operand, &operand_desc); if (ret == SPV_SUCCESS) { - CapabilitySet result = operand_desc->capabilities; - - // Allow FPRoundingMode decoration if requested - if (state.features().free_fp_rounding_mode && - type == SPV_OPERAND_TYPE_DECORATION && + // Allow FPRoundingMode decoration if requested. + if (type == SPV_OPERAND_TYPE_DECORATION && operand_desc->value == SpvDecorationFPRoundingMode) { + if (state.features().free_fp_rounding_mode) return CapabilitySet(); + + // Vulkan API requires more capabilities on rounding mode. + if (spvIsVulkanEnv(state.context()->target_env)) { + CapabilitySet cap_set; + cap_set.Add(SpvCapabilityStorageUniformBufferBlock16); + cap_set.Add(SpvCapabilityStorageUniform16); + cap_set.Add(SpvCapabilityStoragePushConstant16); + cap_set.Add(SpvCapabilityStorageInputOutput16); + return cap_set; + } + } + // Allow certain group operations if requested. + if (state.features().group_ops_reduce_and_scans && + type == SPV_OPERAND_TYPE_GROUP_OPERATION && + (operand <= uint32_t(SpvGroupOperationExclusiveScan))) { return CapabilitySet(); } - return result; + + return state.grammar().filterCapsAgainstTargetEnv( + operand_desc->capabilities, operand_desc->numCapabilities); } return CapabilitySet(); @@ -115,10 +164,15 @@ ExtensionSet RequiredExtensions(const ValidationState_t& state, if (state.grammar().lookupOperand(type, operand, &operand_desc) == SPV_SUCCESS) { assert(operand_desc); - return operand_desc->extensions; + // If this operand is incorporated into core SPIR-V before or in the current + // target environment, we don't require extensions anymore. + if (spvVersionForTargetEnv(state.grammar().target_env()) >= + operand_desc->minVersion) + return {}; + return {operand_desc->numExtensions, operand_desc->extensions}; } - return ExtensionSet(); + return {}; } } // namespace @@ -127,14 +181,14 @@ namespace libspirv { spv_result_t CapabilityCheck(ValidationState_t& _, const spv_parsed_instruction_t* inst) { - spv_opcode_desc opcode_desc; const SpvOp opcode = static_cast(inst->opcode); - if (SPV_SUCCESS == _.grammar().lookupOpcode(opcode, &opcode_desc) && - !_.HasAnyOfCapabilities(opcode_desc->capabilities)) + CapabilitySet opcode_caps = EnablingCapabilitiesForOp(_, opcode); + if (!_.HasAnyOfCapabilities(opcode_caps)) { return _.diag(SPV_ERROR_INVALID_CAPABILITY) << "Opcode " << spvOpcodeString(opcode) << " requires one of these capabilities: " - << ToString(opcode_desc->capabilities, _.grammar()); + << ToString(opcode_caps, _.grammar()); + } for (int i = 0; i < inst->num_operands; ++i) { const auto& operand = inst->operands[i]; const auto word = inst->words[operand.offset]; @@ -164,7 +218,8 @@ spv_result_t CapabilityCheck(ValidationState_t& _, return SPV_SUCCESS; } -// Checks that all required extensions were declared in the module. +// Checks that all extensions required by the given instruction's operands were +// declared in the module. spv_result_t ExtensionCheck(ValidationState_t& _, const spv_parsed_instruction_t* inst) { const SpvOp opcode = static_cast(inst->opcode); @@ -176,29 +231,63 @@ spv_result_t ExtensionCheck(ValidationState_t& _, RequiredExtensions(_, operand.type, word); if (!_.HasAnyOfExtensions(required_extensions)) { return _.diag(SPV_ERROR_MISSING_EXTENSION) - << spvutils::CardinalToOrdinal(operand_index + 1) << " operand of " - << spvOpcodeString(opcode) << ": operand " << word - << " requires one of these extensions: " - << ExtensionSetToString(required_extensions); + << spvutils::CardinalToOrdinal(operand_index + 1) << " operand of " + << spvOpcodeString(opcode) << ": operand " << word + << " requires one of these extensions: " + << ExtensionSetToString(required_extensions); } } return SPV_SUCCESS; } -// Checks that the instruction is not reserved for future use. -spv_result_t ReservedCheck(ValidationState_t& _, - const spv_parsed_instruction_t* inst) { - const SpvOp opcode = static_cast(inst->opcode); - switch (opcode) { - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: - return _.diag(SPV_ERROR_INVALID_VALUE) << spvOpcodeString(opcode) - << " is reserved for future use."; - default: - return SPV_SUCCESS; +// Checks that the instruction can be used in this target environment. +spv_result_t VersionCheck(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const auto opcode = static_cast(inst->opcode); + spv_opcode_desc inst_desc; + const bool r = _.grammar().lookupOpcode(opcode, &inst_desc); + assert(r == SPV_SUCCESS); + (void)r; + + const auto min_version = inst_desc->minVersion; + + ExtensionSet exts(inst_desc->numExtensions, inst_desc->extensions); + if (exts.IsEmpty()) { + // If no extensions can enable this instruction, then emit error messages + // only concerning core SPIR-V versions if errors happen. + if (min_version == ~0u) { + return _.diag(SPV_ERROR_WRONG_VERSION) + << spvOpcodeString(opcode) << " is reserved for future use."; + } + + if (spvVersionForTargetEnv(_.grammar().target_env()) < min_version) { + return _.diag(SPV_ERROR_WRONG_VERSION) + << spvOpcodeString(opcode) << " requires " + << spvTargetEnvDescription( + static_cast(min_version)) + << " at minimum."; + } } + // Otherwise, we only error out when no enabling extensions are registered. + else if (!_.HasAnyOfExtensions(exts)) { + if (min_version == ~0u) { + return _.diag(SPV_ERROR_MISSING_EXTENSION) + << spvOpcodeString(opcode) + << " requires one of the following extensions: " + << ExtensionSetToString(exts); + } + + if (static_cast(_.grammar().target_env()) < min_version) { + return _.diag(SPV_ERROR_WRONG_VERSION) + << spvOpcodeString(opcode) << " requires " + << spvTargetEnvDescription( + static_cast(min_version)) + << " at minimum or one of the following extensions: " + << ExtensionSetToString(exts); + } + } + + return SPV_SUCCESS; } // Checks that the Resuld is within the valid bound. @@ -384,7 +473,7 @@ void CheckIfKnownExtension(ValidationState_t& _, const spv_parsed_instruction_t* inst) { const std::string extension_str = GetExtensionString(inst); Extension extension; - if (!GetExtensionFromString(extension_str, &extension)) { + if (!GetExtensionFromString(extension_str.c_str(), &extension)) { _.diag(SPV_SUCCESS) << "Found unrecognized extension " << extension_str; return; } @@ -393,19 +482,21 @@ void CheckIfKnownExtension(ValidationState_t& _, spv_result_t InstructionPass(ValidationState_t& _, const spv_parsed_instruction_t* inst) { const SpvOp opcode = static_cast(inst->opcode); - if (opcode == SpvOpExtension) + if (opcode == SpvOpExtension) { CheckIfKnownExtension(_, inst); - if (opcode == SpvOpCapability) { + } else if (opcode == SpvOpCapability) { _.RegisterCapability( static_cast(inst->words[inst->operands[0].offset])); - } - if (opcode == SpvOpMemoryModel) { + } else if (opcode == SpvOpMemoryModel) { _.set_addressing_model( static_cast(inst->words[inst->operands[0].offset])); _.set_memory_model( static_cast(inst->words[inst->operands[1].offset])); - } - if (opcode == SpvOpVariable) { + } else if (opcode == SpvOpExecutionMode) { + const uint32_t entry_point = inst->words[1]; + _.RegisterExecutionModeForEntryPoint(entry_point, + SpvExecutionMode(inst->words[2])); + } else if (opcode == SpvOpVariable) { const auto storage_class = static_cast(inst->words[inst->operands[2].offset]); if (auto error = LimitCheckNumVars(_, inst->result_id, storage_class)) { @@ -453,7 +544,7 @@ spv_result_t InstructionPass(ValidationState_t& _, if (auto error = LimitCheckIdBound(_, inst)) return error; if (auto error = LimitCheckStruct(_, inst)) return error; if (auto error = LimitCheckSwitch(_, inst)) return error; - if (auto error = ReservedCheck(_, inst)) return error; + if (auto error = VersionCheck(_, inst)) return error; // All instruction checks have passed. return SPV_SUCCESS; diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_layout.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_layout.cpp index 4718b912f105741b1d55b7c2fa4c9ccd10353050..37c49be55eef6915b4b5cbb8dd44613e3cd6a762 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_layout.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_layout.cpp @@ -25,11 +25,11 @@ #include "val/function.h" #include "val/validation_state.h" -using libspirv::ValidationState_t; -using libspirv::kLayoutMemoryModel; +using libspirv::FunctionDecl; using libspirv::kLayoutFunctionDeclarations; using libspirv::kLayoutFunctionDefinitions; -using libspirv::FunctionDecl; +using libspirv::kLayoutMemoryModel; +using libspirv::ValidationState_t; namespace { // Module scoped instructions are processed by determining if the opcode @@ -170,7 +170,7 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, } return SPV_SUCCESS; } -} /// namespace +} // namespace namespace libspirv { // TODO(umar): Check linkage capabilities for function declarations @@ -204,4 +204,4 @@ spv_result_t ModuleLayoutPass(ValidationState_t& _, } return SPV_SUCCESS; } -} /// namespace libspirv +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_literals.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_literals.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5ced89ef53bb08c250807edb7b5d9d3e946c445d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_literals.cpp @@ -0,0 +1,99 @@ +// Copyright (c) 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates literal numbers. + +#include "validate.h" + +#include + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +// Returns true if the operand holds a literal number +bool IsLiteralNumber(const spv_parsed_operand_t* operand) { + switch (operand->number_kind) { + case SPV_NUMBER_SIGNED_INT: + case SPV_NUMBER_UNSIGNED_INT: + case SPV_NUMBER_FLOATING: + return true; + default: + return false; + } +} + +// Verifies that the upper bits of the given upper |word| with given +// lower |width| are zero- or sign-extended when |signed_int| is true +bool VerifyUpperBits(uint32_t word, uint32_t width, bool signed_int) { + assert(width < 32); + assert(0 < width); + const uint32_t upper_mask = 0xFFFFFFFFu << width; + const uint32_t upper_bits = word & upper_mask; + + bool result = false; + if (signed_int) { + const uint32_t sign_bit = word & (1u << (width - 1)); + if (sign_bit) { + result = upper_bits == upper_mask; + } else { + result = upper_bits == 0; + } + } else { + result = upper_bits == 0; + } + return result; +} + +} // namespace + +// Validates that literal numbers are represented according to the spec +spv_result_t LiteralsPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + // For every operand that is a literal number + for (uint16_t i = 0; i < inst->num_operands; i++) { + const spv_parsed_operand_t* operand = inst->operands + i; + if (!IsLiteralNumber(operand)) continue; + + // The upper bits are always in the last word (little-endian) + int last_index = operand->offset + operand->num_words - 1; + const uint32_t upper_word = inst->words[last_index]; + + // TODO(jcaraban): is the |word size| defined in some header? + const uint32_t word_size = 32; + uint32_t bit_width = operand->number_bit_width; + + // Bit widths that are a multiple of the word size have no upper bits + const auto remaining_value_bits = bit_width % word_size; + if (remaining_value_bits == 0) continue; + + const bool signedness = operand->number_kind == SPV_NUMBER_SIGNED_INT; + + if (!VerifyUpperBits(upper_word, remaining_value_bits, signedness)) { + return _.diag(SPV_ERROR_INVALID_VALUE) + << "The high-order bits of a literal number in instruction " + << inst->result_id << " must be 0 for a floating-point type, " + << "or 0 for an integer type with Signedness of 0, " + << "or sign extended when Signedness is 1"; + } + } + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_logicals.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_logicals.cpp index 1a3fb1482e8b77ba761a28071ec3e6d3b58d0f01..5a6c034f0722b861d83481bda9a3f3aa2fe3543b 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_logicals.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_logicals.cpp @@ -38,12 +38,11 @@ inline uint32_t GetOperandWord(const spv_parsed_instruction_t* inst, // Returns the type id of instruction operand at |operand_index|. // The operand is expected to be an id. inline uint32_t GetOperandTypeId(ValidationState_t& _, - const spv_parsed_instruction_t* inst, - size_t operand_index) { + const spv_parsed_instruction_t* inst, + size_t operand_index) { return _.GetTypeId(GetOperandWord(inst, operand_index)); } - -} +} // namespace // Validates correctness of logical instructions. spv_result_t LogicalsPass(ValidationState_t& _, @@ -56,14 +55,14 @@ spv_result_t LogicalsPass(ValidationState_t& _, case SpvOpAll: { if (!_.IsBoolScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar type as Result Type: " + << spvOpcodeString(opcode); const uint32_t vector_type = GetOperandTypeId(_, inst, 2); if (!vector_type || !_.IsBoolVectorType(vector_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operand to be vector bool: " - << spvOpcodeString(opcode); + << "Expected operand to be vector bool: " + << spvOpcodeString(opcode); break; } @@ -73,28 +72,27 @@ spv_result_t LogicalsPass(ValidationState_t& _, case SpvOpIsFinite: case SpvOpIsNormal: case SpvOpSignBitSet: { - if (!_.IsBoolScalarType(result_type) && - !_.IsBoolVectorType(result_type)) + if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t operand_type = GetOperandTypeId(_, inst, 2); if (!operand_type || (!_.IsFloatScalarType(operand_type) && - !_.IsFloatVectorType(operand_type))) + !_.IsFloatVectorType(operand_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operand to be scalar or vector float: " - << spvOpcodeString(opcode); + << "Expected operand to be scalar or vector float: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(operand_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector sizes of Result Type and the operand to be equal: " - << spvOpcodeString(opcode); + << "Expected vector sizes of Result Type and the operand to be " + "equal: " + << spvOpcodeString(opcode); break; } - case SpvOpFOrdEqual: case SpvOpFUnordEqual: case SpvOpFOrdNotEqual: @@ -110,28 +108,28 @@ spv_result_t LogicalsPass(ValidationState_t& _, case SpvOpLessOrGreater: case SpvOpOrdered: case SpvOpUnordered: { - if (!_.IsBoolScalarType(result_type) && - !_.IsBoolVectorType(result_type)) + if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t left_operand_type = GetOperandTypeId(_, inst, 2); if (!left_operand_type || (!_.IsFloatScalarType(left_operand_type) && !_.IsFloatVectorType(left_operand_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to be scalar or vector float: " - << spvOpcodeString(opcode); + << "Expected operands to be scalar or vector float: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(left_operand_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector sizes of Result Type and the operands to be equal: " - << spvOpcodeString(opcode); + << "Expected vector sizes of Result Type and the operands to be " + "equal: " + << spvOpcodeString(opcode); if (left_operand_type != GetOperandTypeId(_, inst, 3)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected left and right operands to have the same type: " - << spvOpcodeString(opcode); + << "Expected left and right operands to have the same type: " + << spvOpcodeString(opcode); break; } @@ -140,32 +138,30 @@ spv_result_t LogicalsPass(ValidationState_t& _, case SpvOpLogicalNotEqual: case SpvOpLogicalOr: case SpvOpLogicalAnd: { - if (!_.IsBoolScalarType(result_type) && - !_.IsBoolVectorType(result_type)) + if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as Result Type: " + << spvOpcodeString(opcode); if (result_type != GetOperandTypeId(_, inst, 2) || result_type != GetOperandTypeId(_, inst, 3)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected both operands to be of Result Type: " - << spvOpcodeString(opcode); + << "Expected both operands to be of Result Type: " + << spvOpcodeString(opcode); break; } case SpvOpLogicalNot: { - if (!_.IsBoolScalarType(result_type) && - !_.IsBoolVectorType(result_type)) + if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as Result Type: " + << spvOpcodeString(opcode); if (result_type != GetOperandTypeId(_, inst, 2)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operand to be of Result Type: " - << spvOpcodeString(opcode); + << "Expected operand to be of Result Type: " + << spvOpcodeString(opcode); break; } @@ -182,8 +178,8 @@ spv_result_t LogicalsPass(ValidationState_t& _, if (!_.features().variable_pointers && !_.features().variable_pointers_storage_buffer) return _.diag(SPV_ERROR_INVALID_DATA) - << "Using pointers with OpSelect requires capability " - << "VariablePointers or VariablePointersStorageBuffer"; + << "Using pointers with OpSelect requires capability " + << "VariablePointers or VariablePointersStorageBuffer"; break; } @@ -200,8 +196,8 @@ spv_result_t LogicalsPass(ValidationState_t& _, default: { return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected scalar or vector type as Result Type: " + << spvOpcodeString(opcode); } } } @@ -213,18 +209,18 @@ spv_result_t LogicalsPass(ValidationState_t& _, if (!condition_type || (!_.IsBoolScalarType(condition_type) && !_.IsBoolVectorType(condition_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as condition: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as condition: " + << spvOpcodeString(opcode); if (_.GetDimension(condition_type) != dimension) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector sizes of Result Type and the condition to be" - << " equal: " << spvOpcodeString(opcode); + << "Expected vector sizes of Result Type and the condition to be" + << " equal: " << spvOpcodeString(opcode); if (result_type != left_type || result_type != right_type) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected both objects to be of Result Type: " - << spvOpcodeString(opcode); + << "Expected both objects to be of Result Type: " + << spvOpcodeString(opcode); break; } @@ -239,41 +235,41 @@ spv_result_t LogicalsPass(ValidationState_t& _, case SpvOpSGreaterThanEqual: case SpvOpSLessThan: case SpvOpSLessThanEqual: { - if (!_.IsBoolScalarType(result_type) && - !_.IsBoolVectorType(result_type)) + if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected bool scalar or vector type as Result Type: " - << spvOpcodeString(opcode); + << "Expected bool scalar or vector type as Result Type: " + << spvOpcodeString(opcode); const uint32_t left_type = GetOperandTypeId(_, inst, 2); const uint32_t right_type = GetOperandTypeId(_, inst, 3); - if (!left_type || (!_.IsIntScalarType(left_type) && - !_.IsIntVectorType(left_type))) + if (!left_type || + (!_.IsIntScalarType(left_type) && !_.IsIntVectorType(left_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to be scalar or vector int: " - << spvOpcodeString(opcode); + << "Expected operands to be scalar or vector int: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(left_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector sizes of Result Type and the operands to be" - << " equal: " << spvOpcodeString(opcode); + << "Expected vector sizes of Result Type and the operands to be" + << " equal: " << spvOpcodeString(opcode); - if (!right_type || (!_.IsIntScalarType(right_type) && - !_.IsIntVectorType(right_type))) + if (!right_type || + (!_.IsIntScalarType(right_type) && !_.IsIntVectorType(right_type))) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected operands to be scalar or vector int: " - << spvOpcodeString(opcode); + << "Expected operands to be scalar or vector int: " + << spvOpcodeString(opcode); if (_.GetDimension(result_type) != _.GetDimension(right_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected vector sizes of Result Type and the operands to be" - << " equal: " << spvOpcodeString(opcode); + << "Expected vector sizes of Result Type and the operands to be" + << " equal: " << spvOpcodeString(opcode); if (_.GetBitWidth(left_type) != _.GetBitWidth(right_type)) return _.diag(SPV_ERROR_INVALID_DATA) - << "Expected both operands to have the same component bit width: " - << spvOpcodeString(opcode); + << "Expected both operands to have the same component bit " + "width: " + << spvOpcodeString(opcode); break; } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_non_uniform.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_non_uniform.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66c2b4286ea5270cf5e32450d08cb62d818f6d8b --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_non_uniform.cpp @@ -0,0 +1,84 @@ +// Copyright (c) 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of barrier SPIR-V instructions. + +#include "validate.h" + +#include "diagnostic.h" +#include "opcode.h" +#include "spirv_constant.h" +#include "spirv_target_env.h" +#include "util/bitutils.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +namespace { + +spv_result_t ValidateExecutionScope(ValidationState_t& _, + const spv_parsed_instruction_t* inst, + uint32_t scope) { + SpvOp opcode = static_cast(inst->opcode); + bool is_int32 = false, is_const_int32 = false; + uint32_t value = 0; + std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); + + if (!is_int32) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Execution Scope to be a 32-bit int"; + } + + if (!is_const_int32) { + return SPV_SUCCESS; + } + + if (spvIsVulkanEnv(_.context()->target_env) && + _.context()->target_env != SPV_ENV_VULKAN_1_0 && + value != SpvScopeSubgroup) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": in Vulkan environment Execution scope is limited to " + "Subgroup"; + } + + if (value != SpvScopeSubgroup && value != SpvScopeWorkgroup) { + return _.diag(SPV_ERROR_INVALID_DATA) << spvOpcodeString(opcode) + << ": Execution scope is limited to " + "Subgroup or Workgroup"; + } + + return SPV_SUCCESS; +} + +} // namespace + +// Validates correctness of non-uniform group instructions. +spv_result_t NonUniformPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + + if (spvOpcodeIsNonUniformGroupOperation(opcode)) { + const uint32_t execution_scope = inst->words[3]; + if (auto error = ValidateExecutionScope(_, inst, execution_scope)) { + return error; + } + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_primitives.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_primitives.cpp new file mode 100644 index 0000000000000000000000000000000000000000..de5bc2c3066d213b91b4a8d22540ee217761f839 --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_primitives.cpp @@ -0,0 +1,73 @@ +// Copyright (c) 2017 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates correctness of primitive SPIR-V instructions. + +#include "validate.h" + +#include + +#include "diagnostic.h" +#include "opcode.h" +#include "val/instruction.h" +#include "val/validation_state.h" + +namespace libspirv { + +// Validates correctness of primitive instructions. +spv_result_t PrimitivesPass(ValidationState_t& _, + const spv_parsed_instruction_t* inst) { + const SpvOp opcode = static_cast(inst->opcode); + + switch (opcode) { + case SpvOpEmitVertex: + case SpvOpEndPrimitive: + case SpvOpEmitStreamVertex: + case SpvOpEndStreamPrimitive: + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelGeometry, + std::string(spvOpcodeString(opcode)) + + " instructions require Geometry execution model"); + break; + default: + break; + } + + switch (opcode) { + case SpvOpEmitStreamVertex: + case SpvOpEndStreamPrimitive: { + const uint32_t stream_id = inst->words[1]; + const uint32_t stream_type = _.GetTypeId(stream_id); + if (!_.IsIntScalarType(stream_type)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Stream to be int scalar"; + } + + const SpvOp stream_opcode = _.GetIdOpcode(stream_id); + if (!spvOpcodeIsConstant(stream_opcode)) { + return _.diag(SPV_ERROR_INVALID_DATA) + << spvOpcodeString(opcode) + << ": expected Stream to be constant instruction"; + } + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace libspirv diff --git a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_type_unique.cpp b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_type_unique.cpp index 7b54200c638db57861c3b49bab1b49dda3200148..b7f77ed6c4e1d7d3f5fc629966444aee8f7f1811 100644 --- a/sources/third_party/shaderc/third_party/spirv-tools/source/validate_type_unique.cpp +++ b/sources/third_party/shaderc/third_party/spirv-tools/source/validate_type_unique.cpp @@ -50,9 +50,9 @@ spv_result_t TypeUniquePass(ValidationState_t& _, if (!_.RegisterUniqueTypeDeclaration(*inst)) { return _.diag(SPV_ERROR_INVALID_DATA) - << "Duplicate non-aggregate type declarations are not allowed." - << " Opcode: " << spvOpcodeString(SpvOp(inst->opcode)) - << " id: " << inst->result_id; + << "Duplicate non-aggregate type declarations are not allowed." + << " Opcode: " << spvOpcodeString(SpvOp(inst->opcode)) + << " id: " << inst->result_id; } } diff --git a/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_grammar_tables.py b/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_grammar_tables.py index e58d57b2717fb14ef0df6dda8f6304e7a99bee28..ae948d3886e542e7bd08120a61c9fdd07ab8d6f7 100755 --- a/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_grammar_tables.py +++ b/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_grammar_tables.py @@ -24,39 +24,17 @@ import re # Prefix for all C variables generated by this script. PYGEN_VARIABLE_PREFIX = 'pygen_variable' -# Extensions to recognize, but which don't necessarily come from the SPIRV-V -# core grammar. Get this list from the SPIR-V registery web page. -EXTENSIONS_FROM_SPIRV_REGISTRY = """ -SPV_AMD_shader_explicit_vertex_parameter -SPV_AMD_shader_trinary_minmax +# Extensions to recognize, but which don't necessarily come from the SPIR-V +# core or KHR grammar files. Get this list from the SPIR-V registery web page. +# NOTE: Only put things on this list if it is not in those grammar files. +EXTENSIONS_FROM_SPIRV_REGISTRY_AND_NOT_FROM_GRAMMARS = """ SPV_AMD_gcn_shader -SPV_KHR_shader_ballot -SPV_AMD_shader_ballot SPV_AMD_gpu_shader_half_float -SPV_KHR_shader_draw_parameters -SPV_KHR_subgroup_vote -SPV_KHR_16bit_storage -SPV_KHR_device_group -SPV_KHR_multiview -SPV_NVX_multiview_per_view_attributes -SPV_NV_viewport_array2 -SPV_NV_stereo_view_rendering -SPV_NV_sample_mask_override_coverage -SPV_NV_geometry_shader_passthrough -SPV_AMD_texture_gather_bias_lod -SPV_KHR_storage_buffer_storage_class -SPV_KHR_variable_pointers SPV_AMD_gpu_shader_int16 -SPV_KHR_post_depth_coverage -SPV_KHR_shader_atomic_counter_ops -SPV_EXT_shader_stencil_export -SPV_EXT_shader_viewport_index_layer -SPV_AMD_shader_image_load_store_lod -SPV_AMD_shader_fragment_mask +SPV_AMD_shader_trinary_minmax """ - def make_path_to_file(f): """Makes all ancestor directories to the given file, if they don't yet exist. @@ -74,6 +52,16 @@ def make_path_to_file(f): raise +def convert_min_required_version(version): + """Converts the minimal required SPIR-V version encoded in the + grammar to the symbol in SPIRV-Tools""" + if version is None: + return 'SPV_SPIRV_VERSION_WORD(1, 0)' + if version == 'None': + return '0xffffffffu' + return 'SPV_SPIRV_VERSION_WORD({})'.format(version.replace('.', ',')) + + def compose_capability_list(caps): """Returns a string containing a braced list of capabilities as enums. @@ -86,6 +74,31 @@ def compose_capability_list(caps): return "{" + ", ".join(['SpvCapability{}'.format(c) for c in caps]) + "}" +def get_capability_array_name(caps): + """Returns the name of the array containing all the given capabilities. + + Args: + - caps: a sequence of capability names + """ + if not caps: + return 'nullptr' + return '{}_caps_{}'.format(PYGEN_VARIABLE_PREFIX, ''.join(caps)) + + +def generate_capability_arrays(caps): + """Returns the arrays of capabilities. + + Arguments: + - caps: a sequence of sequence of capability names + """ + caps = sorted(set([tuple(c) for c in caps if c])) + arrays = [ + 'static const SpvCapability {}[] = {};'.format( + get_capability_array_name(c), compose_capability_list(c)) + for c in caps] + return '\n'.join(arrays) + + def compose_extension_list(exts): """Returns a string containing a braced list of extensions as enums. @@ -99,6 +112,33 @@ def compose_extension_list(exts): ['libspirv::Extension::k{}'.format(e) for e in exts]) + "}" +def get_extension_array_name(extensions): + """Returns the name of the array containing all the given extensions. + + Args: + - extensions: a sequence of extension names + """ + if not extensions: + return 'nullptr' + else: + return '{}_exts_{}'.format( + PYGEN_VARIABLE_PREFIX, ''.join(extensions)) + + +def generate_extension_arrays(extensions): + """Returns the arrays of extensions. + + Arguments: + - caps: a sequence of sequence of extension names + """ + extensions = sorted(set([tuple(e) for e in extensions if e])) + arrays = [ + 'static const libspirv::Extension {}[] = {};'.format( + get_extension_array_name(e), compose_extension_list(e)) + for e in extensions] + return '\n'.join(arrays) + + def convert_operand_kind(operand_tuple): """Returns the corresponding operand type used in spirv-tools for the given operand kind and quantifier used in the JSON grammar. @@ -166,17 +206,23 @@ class InstInitializer(object): """Instances holds a SPIR-V instruction suitable for printing as the initializer for spv_opcode_desc_t.""" - def __init__(self, opname, caps, operands): + def __init__(self, opname, caps, exts, operands, version): """Initialization. Arguments: - opname: opcode name (with the 'Op' prefix) - caps: a sequence of capability names required by this opcode + - exts: a sequence of names of extensions enabling this enumerant - operands: a sequence of (operand-kind, operand-quantifier) tuples + - version: minimal SPIR-V version required for this opcode """ + assert opname.startswith('Op') self.opname = opname[2:] # Remove the "Op" prefix. - self.caps_mask = compose_capability_list(caps) + self.num_caps = len(caps) + self.caps_mask = get_capability_array_name(caps) + self.num_exts = len(exts) + self.exts = get_extension_array_name(exts) self.operands = [convert_operand_kind(o) for o in operands] self.fix_syntax() @@ -185,6 +231,8 @@ class InstInitializer(object): self.ref_type_id = 'IdResultType' in operands self.def_result_id = 'IdResult' in operands + self.version = convert_min_required_version(version) + def fix_syntax(self): """Fix an instruction's syntax, adjusting for differences between the officially released grammar and how SPIRV-Tools uses the grammar. @@ -198,16 +246,23 @@ class InstInitializer(object): self.operands.pop() def __str__(self): - template = ['{{"{opname}"', 'SpvOp{opname}', '{caps_mask}', + template = ['{{"{opname}"', 'SpvOp{opname}', + '{num_caps}', '{caps_mask}', '{num_operands}', '{{{operands}}}', - '{def_result_id}', '{ref_type_id}}}'] + '{def_result_id}', '{ref_type_id}', + '{num_exts}', '{exts}', + '{min_version}}}'] return ', '.join(template).format( opname=self.opname, + num_caps=self.num_caps, caps_mask=self.caps_mask, num_operands=len(self.operands), operands=', '.join(self.operands), def_result_id=(1 if self.def_result_id else 0), - ref_type_id=(1 if self.ref_type_id else 0)) + ref_type_id=(1 if self.ref_type_id else 0), + num_exts=self.num_exts, + exts=self.exts, + min_version=self.version) class ExtInstInitializer(object): @@ -225,16 +280,18 @@ class ExtInstInitializer(object): """ self.opname = opname self.opcode = opcode - self.caps_mask = compose_capability_list(caps) + self.num_caps = len(caps) + self.caps_mask = get_capability_array_name(caps) self.operands = [convert_operand_kind(o) for o in operands] self.operands.append('SPV_OPERAND_TYPE_NONE') def __str__(self): - template = ['{{"{opname}"', '{opcode}', '{caps_mask}', + template = ['{{"{opname}"', '{opcode}', '{num_caps}', '{caps_mask}', '{{{operands}}}}}'] return ', '.join(template).format( opname=self.opname, opcode=self.opcode, + num_caps=self.num_caps, caps_mask=self.caps_mask, operands=', '.join(self.operands)) @@ -254,33 +311,66 @@ def generate_instruction(inst, is_ext_inst): opname = inst.get('opname') opcode = inst.get('opcode') caps = inst.get('capabilities', []) + exts = inst.get('extensions', []) operands = inst.get('operands', {}) operands = [(o['kind'], o.get('quantifier', '')) for o in operands] + min_version = inst.get('version', None) assert opname is not None if is_ext_inst: return str(ExtInstInitializer(opname, opcode, caps, operands)) else: - return str(InstInitializer(opname, caps, operands)) + return str(InstInitializer(opname, caps, exts, operands, min_version)) + +def generate_instruction_table(inst_table): + """Returns the info table containing all SPIR-V instructions, + sorted by opcode, and prefixed by capability arrays. -def generate_instruction_table(inst_table, is_ext_inst): - """Returns the info table containing all SPIR-V instructions. + Note: + - the built-in sorted() function is guaranteed to be stable. + https://docs.python.org/3/library/functions.html#sorted Arguments: - - inst_table: a dict containing all SPIR-V instructions. - - is_ext_inst: a bool indicating whether |inst_table| is for - an extended instruction set. + - inst_table: a list containing all SPIR-V instructions. """ - return ',\n'.join([generate_instruction(inst, is_ext_inst) - for inst in inst_table]) + inst_table = sorted(inst_table, key=lambda k: (k['opcode'], k['opname'])) + + caps_arrays = generate_capability_arrays( + [inst.get('capabilities', []) for inst in inst_table]) + exts_arrays = generate_extension_arrays( + [inst.get('extensions', []) for inst in inst_table]) + + insts = [generate_instruction(inst, False) for inst in inst_table] + insts = ['static const spv_opcode_desc_t kOpcodeTableEntries[] = {{\n' + ' {}\n}};'.format(',\n '.join(insts))] + + return '{}\n\n{}\n\n{}'.format(caps_arrays, exts_arrays, '\n'.join(insts)) + + +def generate_extended_instruction_table(inst_table, set_name): + """Returns the info table containing all SPIR-V extended instructions, + sorted by opcode, and prefixed by capability arrays. + + Arguments: + - inst_table: a list containing all SPIR-V instructions. + - set_name: the name of the extended instruction set. + """ + inst_table = sorted(inst_table, key=lambda k: k['opcode']) + caps = [inst.get('capabilities', []) for inst in inst_table] + caps_arrays = generate_capability_arrays(caps) + insts = [generate_instruction(inst, True) for inst in inst_table] + insts = ['static const spv_ext_inst_desc_t {}_entries[] = {{\n' + ' {}\n}};'.format(set_name, ',\n '.join(insts))] + + return '{}\n\n{}'.format(caps_arrays, '\n'.join(insts)) class EnumerantInitializer(object): """Prints an enumerant as the initializer for spv_operand_desc_t.""" - def __init__(self, enumerant, value, caps, exts, parameters): + def __init__(self, enumerant, value, caps, exts, parameters, version): """Initialization. Arguments: @@ -289,22 +379,30 @@ class EnumerantInitializer(object): - caps: a sequence of capability names required by this enumerant - exts: a sequence of names of extensions enabling this enumerant - parameters: a sequence of (operand-kind, operand-quantifier) tuples + - version: minimal SPIR-V version required for this opcode """ self.enumerant = enumerant self.value = value - self.caps = compose_capability_list(caps) - self.exts = compose_extension_list(exts) + self.num_caps = len(caps) + self.caps = get_capability_array_name(caps) + self.num_exts = len(exts) + self.exts = get_extension_array_name(exts) self.parameters = [convert_operand_kind(p) for p in parameters] + self.version = convert_min_required_version(version) def __str__(self): - template = ['{{"{enumerant}"', '{value}', - '{caps}', '{exts}', '{{{parameters}}}}}'] + template = ['{{"{enumerant}"', '{value}', '{num_caps}', + '{caps}', '{num_exts}', '{exts}', + '{{{parameters}}}', '{min_version}}}'] return ', '.join(template).format( enumerant=self.enumerant, value=self.value, + num_caps=self.num_caps, caps=self.caps, + num_exts=self.num_exts, exts=self.exts, - parameters=', '.join(self.parameters)) + parameters=', '.join(self.parameters), + min_version=self.version) def generate_enum_operand_kind_entry(entry): @@ -323,21 +421,32 @@ def generate_enum_operand_kind_entry(entry): params = entry.get('parameters', []) params = [p.get('kind') for p in params] params = zip(params, [''] * len(params)) + version = entry.get('version', None) assert enumerant is not None assert value is not None - return str(EnumerantInitializer(enumerant, value, caps, exts, params)) + return str(EnumerantInitializer( + enumerant, value, caps, exts, params, version)) -def generate_enum_operand_kind(enum, version): +def generate_enum_operand_kind(enum): """Returns the C definition for the given operand kind.""" kind = enum.get('kind') assert kind is not None - name = '{}_{}Entries_{}'.format(PYGEN_VARIABLE_PREFIX, kind, version) + # Sort all enumerants first according to their values and then + # their names so that the symbols with the same values are + # grouped together. + if enum.get('category') == 'ValueEnum': + functor = lambda k: (k['value'], k['enumerant']) + else: + functor = lambda k: (int(k['value'], 16), k['enumerant']) + entries = sorted(enum.get('enumerants', []), key=functor) + + name = '{}_{}Entries'.format(PYGEN_VARIABLE_PREFIX, kind) entries = [' {}'.format(generate_enum_operand_kind_entry(e)) - for e in enum.get('enumerants', [])] + for e in entries] template = ['static const spv_operand_desc_t {name}[] = {{', '{entries}', '}};'] @@ -348,12 +457,22 @@ def generate_enum_operand_kind(enum, version): return kind, name, entries -def generate_operand_kind_table(enums, version): +def generate_operand_kind_table(enums): """Returns the info table containing all SPIR-V operand kinds.""" # We only need to output info tables for those operand kinds that are enums. - enums = [generate_enum_operand_kind(e, version) - for e in enums - if e.get('category') in ['ValueEnum', 'BitEnum']] + enums = [e for e in enums if e.get('category') in ['ValueEnum', 'BitEnum']] + + caps = [entry.get('capabilities', []) + for enum in enums + for entry in enum.get('enumerants', [])] + caps_arrays = generate_capability_arrays(caps) + + exts = [entry.get('extensions', []) + for enum in enums + for entry in enum.get('enumerants', [])] + exts_arrays = generate_extension_arrays(exts) + + enums = [generate_enum_operand_kind(e) for e in enums] # We have three operand kinds that requires their optional counterpart to # exist in the operand info table. three_optional_enums = ['ImageOperands', 'AccessQualifier', 'MemoryAccess'] @@ -372,23 +491,33 @@ def generate_operand_kind_table(enums, version): for e in table_entries] template = [ - 'static const spv_operand_desc_group_t {p}_OperandInfoTable_{v}[] = {{', + 'static const spv_operand_desc_group_t {p}_OperandInfoTable[] = {{', '{enums}', '}};'] table = '\n'.join(template).format( - p=PYGEN_VARIABLE_PREFIX, v=version, enums=',\n'.join(table_entries)) + p=PYGEN_VARIABLE_PREFIX, enums=',\n'.join(table_entries)) - return '\n\n'.join(enum_entries + (table,)) + return '\n\n'.join((caps_arrays,) + (exts_arrays,) + enum_entries + (table,)) -def get_extension_list(operands): +def get_extension_list(instructions, operand_kinds): """Returns extensions as an alphabetically sorted list of strings.""" - enumerants = sum([item.get('enumerants', []) for item in operands - if item.get('category') in ['ValueEnum']], []) - extensions = sum([item.get('extensions', []) for item in enumerants + things_with_an_extensions_field = [item for item in instructions] + + enumerants = sum([item.get('enumerants', []) for item in operand_kinds], []) + + things_with_an_extensions_field.extend(enumerants) + + extensions = sum([item.get('extensions', []) + for item in things_with_an_extensions_field if item.get('extensions')], []) - extensions.extend(EXTENSIONS_FROM_SPIRV_REGISTRY.split()) + for item in EXTENSIONS_FROM_SPIRV_REGISTRY_AND_NOT_FROM_GRAMMARS.split(): + # If it's already listed in a grammar, then don't put it in the + # special exceptions list. + assert item not in extensions, "Extension %s is already in a grammar file" % item + + extensions.extend(EXTENSIONS_FROM_SPIRV_REGISTRY_AND_NOT_FROM_GRAMMARS.split()) # Validator would ignore type declaration unique check. Should only be used # for legacy autogenerated test files containing multiple instances of the @@ -399,56 +528,23 @@ def get_extension_list(operands): return sorted(set(extensions)) -def get_capabilities(operands): +def get_capabilities(operand_kinds): """Returns capabilities as a list of JSON objects, in order of appearance. """ - enumerants = sum([item.get('enumerants', []) for item in operands + enumerants = sum([item.get('enumerants', []) for item in operand_kinds if item.get('kind') in ['Capability']], []) return enumerants -def generate_extension_enum(operands): +def generate_extension_enum(extensions): """Returns enumeration containing extensions declared in the grammar.""" - extensions = get_extension_list(operands) return ',\n'.join(['k' + extension for extension in extensions]) -def generate_extension_to_string_table(operands): - """Returns extension to string mapping table.""" - extensions = get_extension_list(operands) - entry_template = ' {{Extension::k{extension},\n "{extension}"}}' - table_entries = [entry_template.format(extension=extension) - for extension in extensions] - table_template = '{{\n{enums}\n}}' - return table_template.format(enums=',\n'.join(table_entries)) - - -def generate_string_to_extension_table(operands): - """Returns string to extension mapping table.""" - extensions = get_extension_list(operands) - entry_template = ' {{"{extension}",\n Extension::k{extension}}}' - table_entries = [entry_template.format(extension=extension) - for extension in extensions] - table_template = '{{\n{enums}\n}}' - return table_template.format(enums=',\n'.join(table_entries)) - - -def generate_capability_to_string_table(operands): - """Returns capability to string mapping table.""" - capabilities = [item.get('enumerant') - for item in get_capabilities(operands)] - entry_template = ' {{SpvCapability{capability},\n "{capability}"}}' - table_entries = [entry_template.format(capability=capability) - for capability in capabilities] - table_template = '{{\n{enums}\n}}' - return table_template.format(enums=',\n'.join(table_entries)) - - -def generate_extension_to_string_mapping(operands): +def generate_extension_to_string_mapping(extensions): """Returns mapping function from extensions to corresponding strings.""" - extensions = get_extension_list(operands) - function = 'std::string ExtensionToString(Extension extension) {\n' + function = 'const char* ExtensionToString(Extension extension) {\n' function += ' switch (extension) {\n' template = ' case Extension::k{extension}:\n' \ ' return "{extension}";\n' @@ -458,29 +554,40 @@ def generate_extension_to_string_mapping(operands): return function -def generate_string_to_extension_mapping(operands): +def generate_string_to_extension_mapping(extensions): """Returns mapping function from strings to corresponding extensions.""" - function = 'bool GetExtensionFromString(' \ - 'const std::string& str, Extension* extension) {\n ' \ - 'static const std::unordered_map mapping =\n' - function += generate_string_to_extension_table(operands) - function += ';\n\n' - function += ' const auto it = mapping.find(str);\n\n' \ - ' if (it == mapping.end()) return false;\n\n' \ - ' *extension = it->second;\n return true;\n}' + + function = ''' + bool GetExtensionFromString(const char* str, Extension* extension) {{ + static const char* known_ext_strs[] = {{ {strs} }}; + static const Extension known_ext_ids[] = {{ {ids} }}; + const auto b = std::begin(known_ext_strs); + const auto e = std::end(known_ext_strs); + const auto found = std::equal_range( + b, e, str, [](const char* str1, const char* str2) {{ + return std::strcmp(str1, str2) < 0; + }}); + if (found.first == e || found.first == found.second) return false; + + *extension = known_ext_ids[found.first - b]; + return true; + }} + '''.format(strs=', '.join(['"{}"'.format(e) for e in extensions]), + ids=', '.join(['Extension::k{}'.format(e) for e in extensions])) + return function -def generate_capability_to_string_mapping(operands): +def generate_capability_to_string_mapping(operand_kinds): """Returns mapping function from capabilities to corresponding strings. We take care to avoid emitting duplicate values. """ - function = 'std::string CapabilityToString(SpvCapability capability) {\n' + function = 'const char* CapabilityToString(SpvCapability capability) {\n' function += ' switch (capability) {\n' template = ' case SpvCapability{capability}:\n' \ ' return "{capability}";\n' emitted = set() # The values of capabilities we already have emitted - for capability in get_capabilities(operands): + for capability in get_capabilities(operand_kinds): value = capability.get('value') if value not in emitted: emitted.add(value) @@ -492,12 +599,12 @@ def generate_capability_to_string_mapping(operands): return function -def generate_all_string_enum_mappings(operands): +def generate_all_string_enum_mappings(extensions, operand_kinds): """Returns all string-to-enum / enum-to-string mapping tables.""" tables = [] - tables.append(generate_extension_to_string_mapping(operands)) - tables.append(generate_string_to_extension_mapping(operands)) - tables.append(generate_capability_to_string_mapping(operands)) + tables.append(generate_extension_to_string_mapping(extensions)) + tables.append(generate_string_to_extension_mapping(extensions)) + tables.append(generate_capability_to_string_mapping(operand_kinds)) return '\n\n'.join(tables) @@ -509,6 +616,10 @@ def main(): type=str, required=False, help='input JSON grammar file for core SPIR-V ' 'instructions') + parser.add_argument('--extinst-debuginfo-grammar', metavar='', + type=str, required=False, default=None, + help='input JSON grammar file for DebugInfo extended ' + 'instruction set') parser.add_argument('--extinst-glsl-grammar', metavar='', type=str, required=False, default=None, help='input JSON grammar file for GLSL extended ' @@ -547,9 +658,13 @@ def main(): if (args.core_insts_output is None) != \ (args.operand_kinds_output is None): - print('error: --core-insts-output and --operand_kinds_output ' + print('error: --core-insts-output and --operand-kinds-output ' 'should be specified together.') exit(1) + if args.operand_kinds_output and not (args.spirv_core_grammar and args.extinst_debuginfo_grammar): + print('error: --operand-kinds-output requires --spirv-core-grammar ' + 'and --exinst-debuginfo-grammar') + exit(1) if (args.glsl_insts_output is None) != \ (args.extinst_glsl_grammar is None): print('error: --glsl-insts-output and --extinst-glsl-grammar ' @@ -576,47 +691,57 @@ def main(): if args.spirv_core_grammar is not None: with open(args.spirv_core_grammar) as json_file: - grammar = json.loads(json_file.read()) - if args.core_insts_output is not None: - make_path_to_file(args.core_insts_output) - make_path_to_file(args.operand_kinds_output) - print(generate_instruction_table( - grammar['instructions'], False), - file=open(args.core_insts_output, 'w')) - version = '{}_{}'.format(grammar['major_version'], - grammar['minor_version']) - print(generate_operand_kind_table( - grammar['operand_kinds'], version), - file=open(args.operand_kinds_output, 'w')) - if args.extension_enum_output is not None: - make_path_to_file(args.extension_enum_output) - print(generate_extension_enum(grammar['operand_kinds']), - file=open(args.extension_enum_output, 'w')) - if args.enum_string_mapping_output is not None: - make_path_to_file(args.enum_string_mapping_output) - print(generate_all_string_enum_mappings( - grammar['operand_kinds']), - file=open(args.enum_string_mapping_output, 'w')) + core_grammar = json.loads(json_file.read()) + with open(args.extinst_debuginfo_grammar) as debuginfo_json_file: + debuginfo_grammar = json.loads(debuginfo_json_file.read()) + instructions = [] + instructions.extend(core_grammar['instructions']) + instructions.extend(debuginfo_grammar['instructions']) + operand_kinds = [] + operand_kinds.extend(core_grammar['operand_kinds']) + operand_kinds.extend(debuginfo_grammar['operand_kinds']) + extensions = get_extension_list(instructions, operand_kinds) + if args.core_insts_output is not None: + make_path_to_file(args.core_insts_output) + make_path_to_file(args.operand_kinds_output) + print(generate_instruction_table(core_grammar['instructions']), + file=open(args.core_insts_output, 'w')) + print(generate_operand_kind_table(operand_kinds), + file=open(args.operand_kinds_output, 'w')) + if args.extension_enum_output is not None: + make_path_to_file(args.extension_enum_output) + print(generate_extension_enum(extensions), + file=open(args.extension_enum_output, 'w')) + if args.enum_string_mapping_output is not None: + make_path_to_file(args.enum_string_mapping_output) + print(generate_all_string_enum_mappings(extensions, operand_kinds), + file=open(args.enum_string_mapping_output, 'w')) if args.extinst_glsl_grammar is not None: with open(args.extinst_glsl_grammar) as json_file: grammar = json.loads(json_file.read()) make_path_to_file(args.glsl_insts_output) - print(generate_instruction_table(grammar['instructions'], True), + print(generate_extended_instruction_table( + grammar['instructions'], "glsl"), file=open(args.glsl_insts_output, 'w')) if args.extinst_opencl_grammar is not None: with open(args.extinst_opencl_grammar) as json_file: grammar = json.loads(json_file.read()) make_path_to_file(args.opencl_insts_output) - print(generate_instruction_table(grammar['instructions'], True), + print(generate_extended_instruction_table( + grammar['instructions'], "opencl"), file=open(args.opencl_insts_output, 'w')) if args.extinst_vendor_grammar is not None: with open(args.extinst_vendor_grammar) as json_file: grammar = json.loads(json_file.read()) make_path_to_file(args.vendor_insts_output) - print(generate_instruction_table(grammar['instructions'], True), + name = args.extinst_vendor_grammar + start = name.find("extinst.") + len("extinst.") + name = name[start:-len(".grammar.json")].replace("-", "_") + print(generate_extended_instruction_table( + grammar['instructions'], name), file=open(args.vendor_insts_output, 'w')) diff --git a/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_language_headers.py b/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_language_headers.py new file mode 100755 index 0000000000000000000000000000000000000000..1886bf4f38a539a47825d29428814471118d9c8d --- /dev/null +++ b/sources/third_party/shaderc/third_party/spirv-tools/utils/generate_language_headers.py @@ -0,0 +1,188 @@ +#!/usr/bin/env python +# Copyright (c) 2017 Google Inc. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Generates language headers from a JSON grammar file""" + +from __future__ import print_function + +import errno +import json +import os.path +import re + + +def make_path_to_file(f): + """Makes all ancestor directories to the given file, if they + don't yet exist. + + Arguments: + f: The file whose ancestor directories are to be created. + """ + dir = os.path.dirname(os.path.abspath(f)) + try: + os.makedirs(dir) + except OSError as e: + if e.errno == errno.EEXIST and os.path.isdir(dir): + pass + else: + raise + +class ExtInstGrammar: + """The grammar for an extended instruction set""" + + def __init__(self, name, copyright, instructions, operand_kinds, version = None, revision = None): + self.name = name + self.copyright = copyright + self.instructions = instructions + self.operand_kinds = operand_kinds + self.version = version + self.revision = revision + + +class LangGenerator: + """A language-specific generator""" + + def __init__(self): + self.upper_case_initial = re.compile('^[A-Z]') + pass + + def comment_prefix(self): + return "" + + def namespace_prefix(self): + return "" + + def uses_guards(self): + return False + + def cpp_guard_preamble(self): + return "" + + def cpp_guard_postamble(self): + return "" + + def enum_value(self, prefix, name, value): + if self.upper_case_initial.match(name): + use_name = name + else: + use_name = '_' + name + + return " {}{} = {},".format(prefix, use_name, value) + + def generate(self, grammar): + """Returns a string that is the language-specific header for the given grammar""" + + parts = [] + if grammar.copyright: + parts.extend(["{}{}".format(self.comment_prefix(), f) for f in grammar.copyright]) + parts.append('') + + guard = 'SPIRV_EXTINST_{}_H_'.format(grammar.name) + if self.uses_guards: + parts.append('#ifndef {}'.format(guard)) + parts.append('#define {}'.format(guard)) + parts.append('') + + parts.append(self.cpp_guard_preamble()) + + if grammar.version: + parts.append(self.const_definition(grammar.name, 'Version', grammar.version)) + + if grammar.revision is not None: + parts.append(self.const_definition(grammar.name, 'Revision', grammar.revision)) + + parts.append('') + + if grammar.instructions: + parts.append(self.enum_prefix(grammar.name, 'Instructions')) + for inst in grammar.instructions: + parts.append(self.enum_value(grammar.name, inst['opname'], inst['opcode'])) + parts.append(self.enum_end(grammar.name, 'Instructions')) + parts.append('') + + if grammar.operand_kinds: + for kind in grammar.operand_kinds: + parts.append(self.enum_prefix(grammar.name, kind['kind'])) + for e in kind['enumerants']: + parts.append(self.enum_value(grammar.name, e['enumerant'], e['value'])) + parts.append(self.enum_end(grammar.name, kind['kind'])) + parts.append('') + + parts.append(self.cpp_guard_postamble()) + + if self.uses_guards: + parts.append('#endif // {}'.format(guard)) + + return '\n'.join(parts) + + +class CLikeGenerator(LangGenerator): + def uses_guards(self): + return True + + def comment_prefix(self): + return "// " + + def const_definition(self, prefix, var, value): + # Use an anonymous enum. Don't use a static const int variable because + # that can bloat binary size. + return 'enum {0} {1}{2} = {3}, {1}{2}_BitWidthPadding = 0x7fffffff {4};'.format( + '{', prefix, var, value, '}') + + def enum_prefix(self, prefix, name): + return 'enum {}{} {}'.format(prefix, name, '{') + + def enum_end(self, prefix, enum): + return ' {}{}Max = 0x7ffffff\n{};\n'.format(prefix, enum, '}') + + def cpp_guard_preamble(self): + return '#ifdef __cplusplus\nextern "C" {\n#endif\n' + + def cpp_guard_postamble(self): + return '#ifdef __cplusplus\n}\n#endif\n' + + +class CGenerator(CLikeGenerator): + pass + + +def main(): + import argparse + parser = argparse.ArgumentParser(description='Generate language headers from a JSON grammar') + + parser.add_argument('--extinst-name', + type=str, required=True, + help='The name to use in tokens') + parser.add_argument('--extinst-grammar', metavar='', + type=str, required=True, + help='input JSON grammar file for extended instruction set') + parser.add_argument('--extinst-output-base', metavar='', + type=str, required=True, + help='Basename of the language-specific output file.') + args = parser.parse_args() + + with open(args.extinst_grammar) as json_file: + grammar_json = json.loads(json_file.read()) + grammar = ExtInstGrammar(name = args.extinst_name, + copyright = grammar_json['copyright'], + instructions = grammar_json['instructions'], + operand_kinds = grammar_json['operand_kinds'], + version = grammar_json['version'], + revision = grammar_json['revision']) + make_path_to_file(args.extinst_output_base) + print(CGenerator().generate(grammar), file=open(args.extinst_output_base + '.h', 'w')) + + +if __name__ == '__main__': + main() diff --git a/sources/third_party/vulkan/repo.prop b/sources/third_party/vulkan/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sources/third_party/vulkan/repo.prop +++ b/sources/third_party/vulkan/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sources/third_party/vulkan/src/build-android/android-generate.bat b/sources/third_party/vulkan/src/build-android/android-generate.bat index 8f4bab9ea7af879f0e9dfb6db20d557e8b05fd2e..b9891ab24addcd0773cba9ce4c7c726ef96d417a 100644 --- a/sources/third_party/vulkan/src/build-android/android-generate.bat +++ b/sources/third_party/vulkan/src/build-android/android-generate.bat @@ -1,37 +1,66 @@ -@echo off -REM # Copyright 2015 The Android Open Source Project -REM # Copyright (C) 2015 Valve Corporation -REM -REM # Licensed under the Apache License, Version 2.0 (the "License"); -REM # you may not use this file except in compliance with the License. -REM # You may obtain a copy of the License at -REM -REM # http://www.apache.org/licenses/LICENSE-2.0 -REM -REM # Unless required by applicable law or agreed to in writing, software -REM # distributed under the License is distributed on an "AS IS" BASIS, -REM # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM # See the License for the specific language governing permissions and -REM # limitations under the License. - -if exist generated ( - rmdir /s /q generated -) -mkdir generated\include generated\common - -cd generated/include -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_safe_struct.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_safe_struct.cpp -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_struct_size_helper.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_struct_size_helper.c -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_enum_string_helper.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_object_types.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_dispatch_table_helper.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml thread_check.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml parameter_validation.cpp -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml unique_objects_wrappers.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_layer_dispatch_table.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_extension_helper.h -py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml object_tracker.cpp -cd ../.. - +@echo off +REM # Copyright 2015 The Android Open Source Project +REM # Copyright (C) 2015 Valve Corporation +REM +REM # Licensed under the Apache License, Version 2.0 (the "License"); +REM # you may not use this file except in compliance with the License. +REM # You may obtain a copy of the License at +REM +REM # http://www.apache.org/licenses/LICENSE-2.0 +REM +REM # Unless required by applicable law or agreed to in writing, software +REM # distributed under the License is distributed on an "AS IS" BASIS, +REM # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM # See the License for the specific language governing permissions and +REM # limitations under the License. + +if exist generated ( + rmdir /s /q generated +) +mkdir generated\include generated\common + +cd generated/include +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_safe_struct.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_safe_struct.cpp +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_struct_size_helper.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_struct_size_helper.c +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_enum_string_helper.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_object_types.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_dispatch_table_helper.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml thread_check.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml parameter_validation.cpp +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml unique_objects_wrappers.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_layer_dispatch_table.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_extension_helper.h +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml object_tracker.cpp +py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_typemap_helper.h + +set SPIRV_TOOLS_PATH=../../third_party/shaderc/third_party/spirv-tools +set SPIRV_TOOLS_UUID=spirv_tools_uuid.txt + +if exist %SPIRV_TOOLS_PATH% ( + + echo Found spirv-tools, using git_dir for external_revision_generator.py + py -3 ../../../scripts/external_revision_generator.py ^ + --git_dir %SPIRV_TOOLS_PATH% ^ + -s SPIRV_TOOLS_COMMIT_ID ^ + -o spirv_tools_commit_id.h + +) else ( + + echo No spirv-tools git_dir found, generating UUID for external_revision_generator.py + + REM Ensure uuidgen is installed, this should error if not found + uuidgen.exe -v + + uuidgen.exe > %SPIRV_TOOLS_UUID% + type %SPIRV_TOOLS_UUID% + py -3 ../../../scripts/external_revision_generator.py ^ + --rev_file %SPIRV_TOOLS_UUID% ^ + -s SPIRV_TOOLS_COMMIT_ID ^ + -o spirv_tools_commit_id.h + +) + +cd ../.. + diff --git a/sources/third_party/vulkan/src/build-android/android-generate.sh b/sources/third_party/vulkan/src/build-android/android-generate.sh index 9b1d94b832774b9c093d5a24ec991a779ea92209..4fa5a5c5c87a73238d5091fdf94227e292d8403c 100755 --- a/sources/third_party/vulkan/src/build-android/android-generate.sh +++ b/sources/third_party/vulkan/src/build-android/android-generate.sh @@ -36,5 +36,40 @@ mkdir -p generated/include generated/common ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_layer_dispatch_table.h ) ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_extension_helper.h ) ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml object_tracker.cpp ) +( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_typemap_helper.h ) + +SPIRV_TOOLS_PATH=../../third_party/shaderc/third_party/spirv-tools +SPIRV_TOOLS_UUID=spirv_tools_uuid.txt + +set -e + +( cd generated/include; + + if [[ -d $SPIRV_TOOLS_PATH ]]; then + + echo Found spirv-tools, using git_dir for external_revision_generator.py + + python3 ../../../scripts/external_revision_generator.py \ + --git_dir $SPIRV_TOOLS_PATH \ + -s SPIRV_TOOLS_COMMIT_ID \ + -o spirv_tools_commit_id.h + + else + + echo No spirv-tools git_dir found, generating UUID for external_revision_generator.py + + # Ensure uuidgen is installed, this should error if not found + type uuidgen + + uuidgen > $SPIRV_TOOLS_UUID; + cat $SPIRV_TOOLS_UUID; + python3 ../../../scripts/external_revision_generator.py \ + --rev_file $SPIRV_TOOLS_UUID \ + -s SPIRV_TOOLS_COMMIT_ID \ + -o spirv_tools_commit_id.h + + fi +) + exit 0 diff --git a/sources/third_party/vulkan/src/build-android/build.py b/sources/third_party/vulkan/src/build-android/build.py index 5ae764500e7f87308722466637f3beb082b60523..05af0058098fd8de353ebaee77617e094e9a229b 100755 --- a/sources/third_party/vulkan/src/build-android/build.py +++ b/sources/third_party/vulkan/src/build-android/build.py @@ -150,7 +150,7 @@ def main(): print('platforms_root: %s' % platforms_root) compiler = 'clang' - stl = 'gnustl_static' + stl = 'c++_static' obj_out = os.path.join(THIS_DIR, stl, 'obj') lib_out = os.path.join(THIS_DIR, 'jniLibs') @@ -182,6 +182,7 @@ def main(): 'dest_dir': 'third_party/shaderc/third_party/spirv-tools', 'files': [ 'utils/generate_grammar_tables.py', + 'utils/generate_language_headers.py', 'utils/generate_registry_tables.py', 'utils/update_build_version.py', 'Android.mk', diff --git a/sources/third_party/vulkan/src/build-android/build_all.sh b/sources/third_party/vulkan/src/build-android/build_all.sh index e1cada878261dcf53d7f8dedab09605a71146a3b..b2f48c0cc96c80fa62d5f9caeffd66034c59cc24 100755 --- a/sources/third_party/vulkan/src/build-android/build_all.sh +++ b/sources/third_party/vulkan/src/build-android/build_all.sh @@ -59,7 +59,7 @@ function create_APK() { # # build layers # -./update_external_sources_android.sh +./update_external_sources_android.sh --no-build ./android-generate.sh ndk-build -j $cores diff --git a/sources/third_party/vulkan/src/build-android/cmake/README.md b/sources/third_party/vulkan/src/build-android/cmake/README.md index 70f68cd7b7b837392cef319a6976a0fb3b191b7b..149966cd70e316089c4dca256f99d838107c0b92 100644 --- a/sources/third_party/vulkan/src/build-android/cmake/README.md +++ b/sources/third_party/vulkan/src/build-android/cmake/README.md @@ -1,7 +1,9 @@ -Build Validation Layers with Android CMake -========================================= -Gradle's CMake library project in this directory builds layers into AAR; -the project could be directly added into application's gradle projects +Build Validation Layers with Android CMake Plugin +================================================= +Gradle project in this directory builds layers into AAR. +The project could be directly added into application's gradle projects. +[Android Studio 3.0.0+](https://developer.android.com/studio/index.html) +IS required: earlier versions only publish release libs by default. Pre-requirements ---------------- @@ -14,21 +16,21 @@ Build ShaderC binary Extra Steps if building from NDK's source tree ``` cd ${your ANDROID_NDK_ROOT}/sources/third_party/shaderc - ndk-build APP_ABI=armeabi-v7a APP_STL=gnustl_static NDK_TOOLCHAIN_VERSION=clang NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk libshaderc_combined + ndk-build APP_ABI=all APP_STL=c++_static NDK_TOOLCHAIN_VERSION=clang NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk libshaderc_combined ``` Adding layer module into Android Studio application project -------------------------------------------------------- 1. app's settings.gradle, add -```java +``` include ':layerLib' project(':layerLib').projectDir = new File('/path/to/cmake/layerlib') ``` 2. app's build.gradle: -```java +``` dependencies { - // force debug layer lib for packing - compile project(path: ':layerlib', configuration: 'debug') + // Android Studio 3.0.0+ is required + implementation project(':layerLib') } ``` BUILD_IN_NDK variable in layerlib/CMakeLists.txt could detect whether the source is @@ -36,5 +38,6 @@ from NDK or github repo clone, and would configure the file paths accordingly Tested ----- - Build on Mac OS, Nexus 5X test phone. Equvilaent build scripts for Windows OS are at the same directory. +Build on Mac OS, tested on Google Pixel XL with Android Oreo. +Equvilaent build scripts for Windows OS are at the same directory. diff --git a/sources/third_party/vulkan/src/build-android/cmake/layerlib/build.gradle b/sources/third_party/vulkan/src/build-android/cmake/layerlib/build.gradle index efa8472113ebbaf4ac097200ef1f614e39a1adac..889d23262b0e7cfd5eed9b0d8cf20a10404d12c7 100644 --- a/sources/third_party/vulkan/src/build-android/cmake/layerlib/build.gradle +++ b/sources/third_party/vulkan/src/build-android/cmake/layerlib/build.gradle @@ -2,16 +2,9 @@ apply plugin: 'com.android.library' android { /* - * we are interested in only the debug version of layers, so ONLY publish debug version - * library, which will enforce building ONLY debug version, and packing only the debug - * version of layers. The document is at: - * https://developer.android.com/studio/build/build-variants.html - * http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication + * Required: Android Studio 3.0.0+! */ - publishNonDefault true - compileSdkVersion 25 - buildToolsVersion "25.0.2" defaultConfig { minSdkVersion 24 @@ -21,7 +14,7 @@ android { ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' externalNativeBuild { cmake.arguments '-DANDROID_TOOLCHAIN=clang', - '-DANDROID_STL=gnustl_static', + '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-24' } } diff --git a/sources/third_party/vulkan/src/build-android/generated/include/object_tracker.cpp b/sources/third_party/vulkan/src/build-android/generated/include/object_tracker.cpp index 6b259b74a623a8196c9501cd9fbe74f979f84cf4..f6377fd010245e24bd57dd4250cc328ab4da2cdf 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/object_tracker.cpp +++ b/sources/third_party/vulkan/src/build-android/generated/include/object_tracker.cpp @@ -1306,36 +1306,12 @@ VKAPI_ATTR void VKAPI_CALL DestroySampler( } +// Declare only VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkDescriptorSetLayout* pSetLayout) -{ - bool skip = false; - { - std::lock_guard lock(global_lock); - skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_1f805601, VALIDATION_ERROR_UNDEFINED); - if (pCreateInfo) { - if (pCreateInfo->pBindings) { - for (uint32_t index1 = 0; index1 < pCreateInfo->bindingCount; ++index1) { - if (pCreateInfo->pBindings[index1].pImmutableSamplers) { - for (uint32_t index2 = 0; index2 < pCreateInfo->pBindings[index1].descriptorCount; ++index2) { - skip |= ValidateObject(device, pCreateInfo->pBindings[index1].pImmutableSamplers[index2], kVulkanObjectTypeSampler, true, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); - } - } - } - } - } - } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - VkResult result = get_dispatch_table(ot_device_table_map, device)->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); - if (VK_SUCCESS == result) { - std::lock_guard lock(global_lock); - CreateObject(device, *pSetLayout, kVulkanObjectTypeDescriptorSetLayout, pAllocator); - } - return result; -} + VkDescriptorSetLayout* pSetLayout); VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout( VkDevice device, @@ -2778,7 +2754,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR( std::lock_guard lock(global_lock); skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2f627a01, VALIDATION_ERROR_UNDEFINED); } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + if (skip) return VK_FALSE; VkBool32 result = get_dispatch_table(ot_instance_table_map, physicalDevice)->GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); return result; @@ -2821,7 +2797,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR( std::lock_guard lock(global_lock); skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2f427a01, VALIDATION_ERROR_UNDEFINED); } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + if (skip) return VK_FALSE; VkBool32 result = get_dispatch_table(ot_instance_table_map, physicalDevice)->GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); return result; @@ -2863,7 +2839,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR( std::lock_guard lock(global_lock); skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2f027a01, VALIDATION_ERROR_UNDEFINED); } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + if (skip) return VK_FALSE; VkBool32 result = get_dispatch_table(ot_instance_table_map, physicalDevice)->GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); return result; @@ -2905,7 +2881,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceMirPresentationSupportKHR( std::lock_guard lock(global_lock); skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2d227a01, VALIDATION_ERROR_UNDEFINED); } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + if (skip) return VK_FALSE; VkBool32 result = get_dispatch_table(ot_instance_table_map, physicalDevice)->GetPhysicalDeviceMirPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection); return result; @@ -2969,7 +2945,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR( std::lock_guard lock(global_lock); skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2f227a01, VALIDATION_ERROR_UNDEFINED); } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + if (skip) return VK_FALSE; VkBool32 result = get_dispatch_table(ot_instance_table_map, physicalDevice)->GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); return result; @@ -3777,6 +3753,26 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( } +VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo) +{ + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_40e05601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, pipeline, kVulkanObjectTypePipeline, false, VALIDATION_ERROR_40e27c01, VALIDATION_ERROR_40e27c07); + } + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + VkResult result = get_dispatch_table(ot_device_table_map, device)->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + + return result; +} + VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, @@ -4543,6 +4539,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( return result; } + +VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) +{ + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_41805601, VALIDATION_ERROR_UNDEFINED); + } + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + VkResult result = get_dispatch_table(ot_device_table_map, device)->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); + + return result; +} + +VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker) +{ + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_41e02401, VALIDATION_ERROR_41e00009); + skip |= ValidateObject(commandBuffer, dstBuffer, kVulkanObjectTypeBuffer, false, VALIDATION_ERROR_41e06c01, VALIDATION_ERROR_41e00009); + } + if (skip) return; + get_dispatch_table(ot_device_table_map, commandBuffer)->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + +} // Map of all APIs to be intercepted by this layer const std::unordered_map name_to_funcptr_map = { {"vkCreateInstance", (void *)CreateInstance}, @@ -4617,7 +4648,7 @@ const std::unordered_map name_to_funcptr_map = { {"vkDestroyPipelineLayout", (void*)DestroyPipelineLayout}, {"vkCreateSampler", (void*)CreateSampler}, {"vkDestroySampler", (void*)DestroySampler}, - {"vkCreateDescriptorSetLayout", (void*)CreateDescriptorSetLayout}, + {"vkCreateDescriptorSetLayout", (void *)CreateDescriptorSetLayout}, {"vkDestroyDescriptorSetLayout", (void*)DestroyDescriptorSetLayout}, {"vkCreateDescriptorPool", (void*)CreateDescriptorPool}, {"vkDestroyDescriptorPool", (void *)DestroyDescriptorPool}, @@ -4793,6 +4824,7 @@ const std::unordered_map name_to_funcptr_map = { {"vkCmdDebugMarkerInsertEXT", (void*)CmdDebugMarkerInsertEXT}, {"vkCmdDrawIndirectCountAMD", (void*)CmdDrawIndirectCountAMD}, {"vkCmdDrawIndexedIndirectCountAMD", (void*)CmdDrawIndexedIndirectCountAMD}, + {"vkGetShaderInfoAMD", (void*)GetShaderInfoAMD}, {"vkGetPhysicalDeviceExternalImageFormatPropertiesNV", (void*)GetPhysicalDeviceExternalImageFormatPropertiesNV}, #ifdef VK_USE_PLATFORM_WIN32_KHR {"vkGetMemoryWin32HandleNV", (void*)GetMemoryWin32HandleNV}, @@ -4846,6 +4878,8 @@ const std::unordered_map name_to_funcptr_map = { {"vkDestroyValidationCacheEXT", (void*)DestroyValidationCacheEXT}, {"vkMergeValidationCachesEXT", (void*)MergeValidationCachesEXT}, {"vkGetValidationCacheDataEXT", (void*)GetValidationCacheDataEXT}, + {"vkGetMemoryHostPointerPropertiesEXT", (void*)GetMemoryHostPointerPropertiesEXT}, + {"vkCmdWriteBufferMarkerAMD", (void*)CmdWriteBufferMarkerAMD}, }; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/parameter_validation.cpp b/sources/third_party/vulkan/src/build-android/generated/include/parameter_validation.cpp index 56b93b21d461fe734d9437ae3531e4928c456ed9..7f55c768dcf49626c216c67412ee5439e9324ae4 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/parameter_validation.cpp +++ b/sources/third_party/vulkan/src/build-android/generated/include/parameter_validation.cpp @@ -39,7 +39,7 @@ extern std::mutex global_lock; extern std::unordered_map layer_data_map; extern std::unordered_map instance_layer_data_map; -const uint32_t GeneratedHeaderVersion = 62; +const uint32_t GeneratedHeaderVersion = 69; const VkAccessFlags AllVkAccessFlagBits = VK_ACCESS_INDIRECT_COMMAND_READ_BIT|VK_ACCESS_INDEX_READ_BIT|VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT|VK_ACCESS_UNIFORM_READ_BIT|VK_ACCESS_INPUT_ATTACHMENT_READ_BIT|VK_ACCESS_SHADER_READ_BIT|VK_ACCESS_SHADER_WRITE_BIT|VK_ACCESS_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT|VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT|VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT|VK_ACCESS_TRANSFER_READ_BIT|VK_ACCESS_TRANSFER_WRITE_BIT|VK_ACCESS_HOST_READ_BIT|VK_ACCESS_HOST_WRITE_BIT|VK_ACCESS_MEMORY_READ_BIT|VK_ACCESS_MEMORY_WRITE_BIT|VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX|VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX|VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT; const VkAttachmentDescriptionFlags AllVkAttachmentDescriptionFlagBits = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT; @@ -78,7 +78,7 @@ const VkSurfaceTransformFlagsKHR AllVkSurfaceTransformFlagBitsKHR = VK_SURFACE_T const VkSwapchainCreateFlagsKHR AllVkSwapchainCreateFlagBitsKHR = VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX; const VkDisplayPlaneAlphaFlagsKHR AllVkDisplayPlaneAlphaFlagBitsKHR = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR|VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR|VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR|VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR; const VkExternalMemoryFeatureFlagsKHR AllVkExternalMemoryFeatureFlagBitsKHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR|VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR|VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR; -const VkExternalMemoryHandleTypeFlagsKHR AllVkExternalMemoryHandleTypeFlagBitsKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR; +const VkExternalMemoryHandleTypeFlagsKHR AllVkExternalMemoryHandleTypeFlagBitsKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR|VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT|VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT|VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT; const VkExternalSemaphoreFeatureFlagsKHR AllVkExternalSemaphoreFeatureFlagBitsKHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR|VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR; const VkExternalSemaphoreHandleTypeFlagsKHR AllVkExternalSemaphoreHandleTypeFlagBitsKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR|VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR|VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR|VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR|VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR; const VkSemaphoreImportFlagsKHR AllVkSemaphoreImportFlagBitsKHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR; @@ -96,7 +96,7 @@ const VkObjectEntryUsageFlagsNVX AllVkObjectEntryUsageFlagBitsNVX = VK_OBJECT_EN const VkSurfaceCounterFlagsEXT AllVkSurfaceCounterFlagBitsEXT = VK_SURFACE_COUNTER_VBLANK_EXT; const std::vector AllVkPipelineCacheHeaderVersionEnums = {VK_PIPELINE_CACHE_HEADER_VERSION_ONE, }; -const std::vector AllVkResultEnums = {VK_SUCCESS, VK_NOT_READY, VK_TIMEOUT, VK_EVENT_SET, VK_EVENT_RESET, VK_INCOMPLETE, VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INITIALIZATION_FAILED, VK_ERROR_DEVICE_LOST, VK_ERROR_MEMORY_MAP_FAILED, VK_ERROR_LAYER_NOT_PRESENT, VK_ERROR_EXTENSION_NOT_PRESENT, VK_ERROR_FEATURE_NOT_PRESENT, VK_ERROR_INCOMPATIBLE_DRIVER, VK_ERROR_TOO_MANY_OBJECTS, VK_ERROR_FORMAT_NOT_SUPPORTED, VK_ERROR_FRAGMENTED_POOL, VK_ERROR_SURFACE_LOST_KHR, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, VK_SUBOPTIMAL_KHR, VK_ERROR_OUT_OF_DATE_KHR, VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, VK_ERROR_VALIDATION_FAILED_EXT, VK_ERROR_INVALID_SHADER_NV, VK_ERROR_OUT_OF_POOL_MEMORY_KHR, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, }; +const std::vector AllVkResultEnums = {VK_SUCCESS, VK_NOT_READY, VK_TIMEOUT, VK_EVENT_SET, VK_EVENT_RESET, VK_INCOMPLETE, VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INITIALIZATION_FAILED, VK_ERROR_DEVICE_LOST, VK_ERROR_MEMORY_MAP_FAILED, VK_ERROR_LAYER_NOT_PRESENT, VK_ERROR_EXTENSION_NOT_PRESENT, VK_ERROR_FEATURE_NOT_PRESENT, VK_ERROR_INCOMPATIBLE_DRIVER, VK_ERROR_TOO_MANY_OBJECTS, VK_ERROR_FORMAT_NOT_SUPPORTED, VK_ERROR_FRAGMENTED_POOL, VK_ERROR_SURFACE_LOST_KHR, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, VK_SUBOPTIMAL_KHR, VK_ERROR_OUT_OF_DATE_KHR, VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, VK_ERROR_VALIDATION_FAILED_EXT, VK_ERROR_INVALID_SHADER_NV, VK_ERROR_OUT_OF_POOL_MEMORY_KHR, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, VK_ERROR_NOT_PERMITTED_EXT, }; const std::vector AllVkSystemAllocationScopeEnums = {VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, VK_SYSTEM_ALLOCATION_SCOPE_CACHE, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE, }; const std::vector AllVkInternalAllocationTypeEnums = {VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE, }; const std::vector AllVkFormatEnums = {VK_FORMAT_UNDEFINED, VK_FORMAT_R4G4_UNORM_PACK8, VK_FORMAT_R4G4B4A4_UNORM_PACK16, VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_B5G6R5_UNORM_PACK16, VK_FORMAT_R5G5B5A1_UNORM_PACK16, VK_FORMAT_B5G5R5A1_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_SNORM, VK_FORMAT_R8_USCALED, VK_FORMAT_R8_SSCALED, VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R8_SRGB, VK_FORMAT_R8G8_UNORM, VK_FORMAT_R8G8_SNORM, VK_FORMAT_R8G8_USCALED, VK_FORMAT_R8G8_SSCALED, VK_FORMAT_R8G8_UINT, VK_FORMAT_R8G8_SINT, VK_FORMAT_R8G8_SRGB, VK_FORMAT_R8G8B8_UNORM, VK_FORMAT_R8G8B8_SNORM, VK_FORMAT_R8G8B8_USCALED, VK_FORMAT_R8G8B8_SSCALED, VK_FORMAT_R8G8B8_UINT, VK_FORMAT_R8G8B8_SINT, VK_FORMAT_R8G8B8_SRGB, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_B8G8R8_SNORM, VK_FORMAT_B8G8R8_USCALED, VK_FORMAT_B8G8R8_SSCALED, VK_FORMAT_B8G8R8_UINT, VK_FORMAT_B8G8R8_SINT, VK_FORMAT_B8G8R8_SRGB, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_USCALED, VK_FORMAT_R8G8B8A8_SSCALED, VK_FORMAT_R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_SINT, VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SNORM, VK_FORMAT_B8G8R8A8_USCALED, VK_FORMAT_B8G8R8A8_SSCALED, VK_FORMAT_B8G8R8A8_UINT, VK_FORMAT_B8G8R8A8_SINT, VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_A8B8G8R8_UNORM_PACK32, VK_FORMAT_A8B8G8R8_SNORM_PACK32, VK_FORMAT_A8B8G8R8_USCALED_PACK32, VK_FORMAT_A8B8G8R8_SSCALED_PACK32, VK_FORMAT_A8B8G8R8_UINT_PACK32, VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_FORMAT_A2R10G10B10_SNORM_PACK32, VK_FORMAT_A2R10G10B10_USCALED_PACK32, VK_FORMAT_A2R10G10B10_SSCALED_PACK32, VK_FORMAT_A2R10G10B10_UINT_PACK32, VK_FORMAT_A2R10G10B10_SINT_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_SNORM_PACK32, VK_FORMAT_A2B10G10R10_USCALED_PACK32, VK_FORMAT_A2B10G10R10_SSCALED_PACK32, VK_FORMAT_A2B10G10R10_UINT_PACK32, VK_FORMAT_A2B10G10R10_SINT_PACK32, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_SNORM, VK_FORMAT_R16_USCALED, VK_FORMAT_R16_SSCALED, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R16_SFLOAT, VK_FORMAT_R16G16_UNORM, VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_USCALED, VK_FORMAT_R16G16_SSCALED, VK_FORMAT_R16G16_UINT, VK_FORMAT_R16G16_SINT, VK_FORMAT_R16G16_SFLOAT, VK_FORMAT_R16G16B16_UNORM, VK_FORMAT_R16G16B16_SNORM, VK_FORMAT_R16G16B16_USCALED, VK_FORMAT_R16G16B16_SSCALED, VK_FORMAT_R16G16B16_UINT, VK_FORMAT_R16G16B16_SINT, VK_FORMAT_R16G16B16_SFLOAT, VK_FORMAT_R16G16B16A16_UNORM, VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_USCALED, VK_FORMAT_R16G16B16A16_SSCALED, VK_FORMAT_R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SFLOAT, VK_FORMAT_R32_UINT, VK_FORMAT_R32_SINT, VK_FORMAT_R32_SFLOAT, VK_FORMAT_R32G32_UINT, VK_FORMAT_R32G32_SINT, VK_FORMAT_R32G32_SFLOAT, VK_FORMAT_R32G32B32_UINT, VK_FORMAT_R32G32B32_SINT, VK_FORMAT_R32G32B32_SFLOAT, VK_FORMAT_R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SFLOAT, VK_FORMAT_R64_UINT, VK_FORMAT_R64_SINT, VK_FORMAT_R64_SFLOAT, VK_FORMAT_R64G64_UINT, VK_FORMAT_R64G64_SINT, VK_FORMAT_R64G64_SFLOAT, VK_FORMAT_R64G64B64_UINT, VK_FORMAT_R64G64B64_SINT, VK_FORMAT_R64G64B64_SFLOAT, VK_FORMAT_R64G64B64A64_UINT, VK_FORMAT_R64G64B64A64_SINT, VK_FORMAT_R64G64B64A64_SFLOAT, VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, VK_FORMAT_D16_UNORM, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D32_SFLOAT, VK_FORMAT_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_BC1_RGB_UNORM_BLOCK, VK_FORMAT_BC1_RGB_SRGB_BLOCK, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK, VK_FORMAT_BC2_UNORM_BLOCK, VK_FORMAT_BC2_SRGB_BLOCK, VK_FORMAT_BC3_UNORM_BLOCK, VK_FORMAT_BC3_SRGB_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK, VK_FORMAT_BC5_UNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK, VK_FORMAT_BC6H_UFLOAT_BLOCK, VK_FORMAT_BC6H_SFLOAT_BLOCK, VK_FORMAT_BC7_UNORM_BLOCK, VK_FORMAT_BC7_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, VK_FORMAT_EAC_R11_UNORM_BLOCK, VK_FORMAT_EAC_R11_SNORM_BLOCK, VK_FORMAT_EAC_R11G11_UNORM_BLOCK, VK_FORMAT_EAC_R11G11_SNORM_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x4_UNORM_BLOCK, VK_FORMAT_ASTC_5x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_UNORM_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x5_UNORM_BLOCK, VK_FORMAT_ASTC_8x5_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_UNORM_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x8_UNORM_BLOCK, VK_FORMAT_ASTC_8x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x5_UNORM_BLOCK, VK_FORMAT_ASTC_10x5_SRGB_BLOCK, VK_FORMAT_ASTC_10x6_UNORM_BLOCK, VK_FORMAT_ASTC_10x6_SRGB_BLOCK, VK_FORMAT_ASTC_10x8_UNORM_BLOCK, VK_FORMAT_ASTC_10x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x10_UNORM_BLOCK, VK_FORMAT_ASTC_10x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x10_UNORM_BLOCK, VK_FORMAT_ASTC_12x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_UNORM_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK, VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, VK_FORMAT_G8B8G8R8_422_UNORM_KHR, VK_FORMAT_B8G8R8G8_422_UNORM_KHR, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR, VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR, VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR, VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR, VK_FORMAT_R10X6_UNORM_PACK16_KHR, VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR, VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR, VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR, VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR, VK_FORMAT_R12X4_UNORM_PACK16_KHR, VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR, VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR, VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR, VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR, VK_FORMAT_G16B16G16R16_422_UNORM_KHR, VK_FORMAT_B16G16R16G16_422_UNORM_KHR, VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR, VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR, VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR, VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR, VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR, }; @@ -138,8 +138,9 @@ const std::vector AllVkTessellationDomainOriginKH const std::vector AllVkSamplerYcbcrModelConversionKHREnums = {VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR, }; const std::vector AllVkSamplerYcbcrRangeKHREnums = {VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR, VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR, }; const std::vector AllVkChromaLocationKHREnums = {VK_CHROMA_LOCATION_COSITED_EVEN_KHR, VK_CHROMA_LOCATION_MIDPOINT_KHR, }; -const std::vector AllVkDebugReportObjectTypeEXTEnums = {VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT, }; +const std::vector AllVkDebugReportObjectTypeEXTEnums = {VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT, }; const std::vector AllVkRasterizationOrderAMDEnums = {VK_RASTERIZATION_ORDER_STRICT_AMD, VK_RASTERIZATION_ORDER_RELAXED_AMD, }; +const std::vector AllVkShaderInfoTypeAMDEnums = {VK_SHADER_INFO_TYPE_STATISTICS_AMD, VK_SHADER_INFO_TYPE_BINARY_AMD, VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD, }; const std::vector AllVkValidationCheckEXTEnums = {VK_VALIDATION_CHECK_ALL_EXT, VK_VALIDATION_CHECK_SHADERS_EXT, }; const std::vector AllVkIndirectCommandsTokenTypeNVXEnums = {VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX, }; const std::vector AllVkObjectEntryTypeNVXEnums = {VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX, VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX, VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX, VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX, VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX, }; @@ -148,10 +149,12 @@ const std::vector AllVkDeviceEventTypeEXTEnums = {VK_DEVIC const std::vector AllVkDisplayEventTypeEXTEnums = {VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT, }; const std::vector AllVkViewportCoordinateSwizzleNVEnums = {VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV, }; const std::vector AllVkDiscardRectangleModeEXTEnums = {VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT, }; +const std::vector AllVkConservativeRasterizationModeEXTEnums = {VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT, }; const std::vector AllVkSamplerReductionModeEXTEnums = {VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT, VK_SAMPLER_REDUCTION_MODE_MIN_EXT, VK_SAMPLER_REDUCTION_MODE_MAX_EXT, }; const std::vector AllVkBlendOverlapEXTEnums = {VK_BLEND_OVERLAP_UNCORRELATED_EXT, VK_BLEND_OVERLAP_DISJOINT_EXT, VK_BLEND_OVERLAP_CONJOINT_EXT, }; const std::vector AllVkCoverageModulationModeNVEnums = {VK_COVERAGE_MODULATION_MODE_NONE_NV, VK_COVERAGE_MODULATION_MODE_RGB_NV, VK_COVERAGE_MODULATION_MODE_ALPHA_NV, VK_COVERAGE_MODULATION_MODE_RGBA_NV, }; const std::vector AllVkValidationCacheHeaderVersionEXTEnums = {VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, }; +const std::vector AllVkQueueGlobalPriorityEXTEnums = {VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT, VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT, VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT, }; typedef bool (*PFN_manual_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); @@ -225,8 +228,6 @@ typedef bool (*PFN_manual_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPoo typedef bool (*PFN_manual_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); typedef bool (*PFN_manual_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); typedef bool (*PFN_manual_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); -typedef bool (*PFN_manual_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); -typedef bool (*PFN_manual_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); typedef bool (*PFN_manual_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); typedef bool (*PFN_manual_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); typedef bool (*PFN_manual_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); @@ -387,6 +388,7 @@ typedef bool (*PFN_manual_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffe typedef bool (*PFN_manual_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); typedef bool (*PFN_manual_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef bool (*PFN_manual_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +typedef bool (*PFN_manual_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); typedef bool (*PFN_manual_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #ifdef VK_USE_PLATFORM_WIN32_KHR typedef bool (*PFN_manual_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); @@ -440,6 +442,8 @@ typedef bool (*PFN_manual_vkCreateValidationCacheEXT)(VkDevice device, const VkV typedef bool (*PFN_manual_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); typedef bool (*PFN_manual_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); typedef bool (*PFN_manual_vkGetValidationCacheDataEXT)(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); +typedef bool (*PFN_manual_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); +typedef bool (*PFN_manual_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); std::unordered_map custom_functions = { @@ -514,8 +518,6 @@ std::unordered_map custom_functions = { {"vkUpdateDescriptorSets", nullptr}, {"vkCreateFramebuffer", nullptr}, {"vkDestroyFramebuffer", nullptr}, - {"vkCreateRenderPass", nullptr}, - {"vkDestroyRenderPass", nullptr}, {"vkGetRenderAreaGranularity", nullptr}, {"vkDestroyCommandPool", nullptr}, {"vkResetCommandPool", nullptr}, @@ -676,6 +678,7 @@ std::unordered_map custom_functions = { {"vkCmdDebugMarkerInsertEXT", nullptr}, {"vkCmdDrawIndirectCountAMD", nullptr}, {"vkCmdDrawIndexedIndirectCountAMD", nullptr}, + {"vkGetShaderInfoAMD", nullptr}, {"vkGetPhysicalDeviceExternalImageFormatPropertiesNV", nullptr}, #ifdef VK_USE_PLATFORM_WIN32_KHR {"vkGetMemoryWin32HandleNV", nullptr}, @@ -729,6 +732,8 @@ std::unordered_map custom_functions = { {"vkDestroyValidationCacheEXT", nullptr}, {"vkMergeValidationCachesEXT", nullptr}, {"vkGetValidationCacheDataEXT", nullptr}, + {"vkGetMemoryHostPointerPropertiesEXT", nullptr}, + {"vkCmdWriteBufferMarkerAMD", nullptr}, }; @@ -1010,7 +1015,9 @@ bool parameter_validation_vkCreateDevice( { for (uint32_t queueCreateInfoIndex = 0; queueCreateInfoIndex < pCreateInfo->queueCreateInfoCount; ++queueCreateInfoIndex) { - skip |= validate_struct_pnext(local_data->report_data, "vkCreateDevice", ParameterName("pCreateInfo->pQueueCreateInfos[%i].pNext", ParameterName::IndexVector{ queueCreateInfoIndex }), NULL, pCreateInfo->pQueueCreateInfos[queueCreateInfoIndex].pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_06c1c40d); + const VkStructureType allowed_structs_VkDeviceQueueCreateInfo[] = { VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT }; + + skip |= validate_struct_pnext(local_data->report_data, "vkCreateDevice", ParameterName("pCreateInfo->pQueueCreateInfos[%i].pNext", ParameterName::IndexVector{ queueCreateInfoIndex }), "VkDeviceQueueGlobalPriorityCreateInfoEXT", pCreateInfo->pQueueCreateInfos[queueCreateInfoIndex].pNext, ARRAY_SIZE(allowed_structs_VkDeviceQueueCreateInfo), allowed_structs_VkDeviceQueueCreateInfo, GeneratedHeaderVersion, VALIDATION_ERROR_06c1c40d); skip |= validate_reserved_flags(local_data->report_data, "vkCreateDevice", ParameterName("pCreateInfo->pQueueCreateInfos[%i].flags", ParameterName::IndexVector{ queueCreateInfoIndex }), pCreateInfo->pQueueCreateInfos[queueCreateInfoIndex].flags, VALIDATION_ERROR_06c09005); @@ -1299,9 +1306,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory( if (pAllocateInfo != NULL) { - const VkStructureType allowed_structs_VkMemoryAllocateInfo[] = { VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR }; + const VkStructureType allowed_structs_VkMemoryAllocateInfo[] = { VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR }; - skip |= validate_struct_pnext(local_data->report_data, "vkAllocateMemory", "pAllocateInfo->pNext", "VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfoKHR, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportMemoryFdInfoKHR, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfoKHX, VkMemoryDedicatedAllocateInfoKHR", pAllocateInfo->pNext, ARRAY_SIZE(allowed_structs_VkMemoryAllocateInfo), allowed_structs_VkMemoryAllocateInfo, GeneratedHeaderVersion, VALIDATION_ERROR_0c61c40d); + skip |= validate_struct_pnext(local_data->report_data, "vkAllocateMemory", "pAllocateInfo->pNext", "VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfoKHR, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfoKHX, VkMemoryDedicatedAllocateInfoKHR", pAllocateInfo->pNext, ARRAY_SIZE(allowed_structs_VkMemoryAllocateInfo), allowed_structs_VkMemoryAllocateInfo, GeneratedHeaderVersion, VALIDATION_ERROR_0c61c40d); } if (pAllocator != NULL) @@ -1373,8 +1380,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory( skip |= validate_reserved_flags(local_data->report_data, "vkMapMemory", "flags", flags, VALIDATION_ERROR_31209005); - skip |= validate_required_pointer(local_data->report_data, "vkMapMemory", "ppData", ppData, VALIDATION_ERROR_31228c01); - PFN_manual_vkMapMemory custom_func = (PFN_manual_vkMapMemory)custom_functions["vkMapMemory"]; if (custom_func != nullptr) { skip |= custom_func(device, memory, offset, size, flags, ppData); @@ -2900,9 +2905,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines( if (pCreateInfos[createInfoIndex].pRasterizationState != NULL) { - const VkStructureType allowed_structs_VkPipelineRasterizationStateCreateInfo[] = { VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD }; + const VkStructureType allowed_structs_VkPipelineRasterizationStateCreateInfo[] = { VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD }; - skip |= validate_struct_pnext(local_data->report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pRasterizationState->pNext", ParameterName::IndexVector{ createInfoIndex }), "VkPipelineRasterizationStateRasterizationOrderAMD", pCreateInfos[createInfoIndex].pRasterizationState->pNext, ARRAY_SIZE(allowed_structs_VkPipelineRasterizationStateCreateInfo), allowed_structs_VkPipelineRasterizationStateCreateInfo, GeneratedHeaderVersion, VALIDATION_ERROR_1021c40d); + skip |= validate_struct_pnext(local_data->report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pRasterizationState->pNext", ParameterName::IndexVector{ createInfoIndex }), "VkPipelineRasterizationConservativeStateCreateInfoEXT, VkPipelineRasterizationStateRasterizationOrderAMD", pCreateInfos[createInfoIndex].pRasterizationState->pNext, ARRAY_SIZE(allowed_structs_VkPipelineRasterizationStateCreateInfo), allowed_structs_VkPipelineRasterizationStateCreateInfo, GeneratedHeaderVersion, VALIDATION_ERROR_1021c40d); skip |= validate_reserved_flags(local_data->report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pRasterizationState->flags", ParameterName::IndexVector{ createInfoIndex }), pCreateInfos[createInfoIndex].pRasterizationState->flags, VALIDATION_ERROR_10209005); @@ -3607,7 +3612,14 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer( } } -VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( +// Generated function handles validation only -- API definition is in non-generated source +extern VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( + VkDevice device, + const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); + +bool parameter_validation_vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, @@ -3615,8 +3627,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( { layer_data *local_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip = false; - VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - std::unique_lock lock(global_lock); skip |= validate_struct_type(local_data->report_data, "vkCreateRenderPass", "pCreateInfo", "VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO", pCreateInfo, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, true, VALIDATION_ERROR_1222b00b); @@ -3731,26 +3741,22 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( skip |= validate_required_pointer(local_data->report_data, "vkCreateRenderPass", "pRenderPass", pRenderPass, VALIDATION_ERROR_22021601); - PFN_manual_vkCreateRenderPass custom_func = (PFN_manual_vkCreateRenderPass)custom_functions["vkCreateRenderPass"]; - if (custom_func != nullptr) { - skip |= custom_func(device, pCreateInfo, pAllocator, pRenderPass); - } - - lock.unlock(); - if (!skip) { - result = local_data->dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); - } - return result; + return skip; } -VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( +// Generated function handles validation only -- API definition is in non-generated source +extern VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( + VkDevice device, + VkRenderPass renderPass, + const VkAllocationCallbacks* pAllocator); + +bool parameter_validation_vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { layer_data *local_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool skip = false; - std::unique_lock lock(global_lock); if (pAllocator != NULL) { @@ -3761,15 +3767,7 @@ VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( skip |= validate_required_pointer(local_data->report_data, "vkDestroyRenderPass", "pAllocator->pfnFree", reinterpret_cast(pAllocator->pfnFree), VALIDATION_ERROR_002004f4); } - PFN_manual_vkDestroyRenderPass custom_func = (PFN_manual_vkDestroyRenderPass)custom_functions["vkDestroyRenderPass"]; - if (custom_func != nullptr) { - skip |= custom_func(device, renderPass, pAllocator); - } - - lock.unlock(); - if (!skip) { - local_data->dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); - } + return skip; } VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity( @@ -4061,7 +4059,15 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport( bool skip = false; std::unique_lock lock(global_lock); - // No xml-driven validation + skip |= validate_array(local_data->report_data, "vkCmdSetViewport", "viewportCount", "pViewports", viewportCount, pViewports, true, true, VALIDATION_ERROR_1e030a1b, VALIDATION_ERROR_1e03fa01); + + if (pViewports != NULL) + { + for (uint32_t viewportIndex = 0; viewportIndex < viewportCount; ++viewportIndex) + { + // No xml-driven validation + } + } PFN_manual_vkCmdSetViewport custom_func = (PFN_manual_vkCmdSetViewport)custom_functions["vkCmdSetViewport"]; if (custom_func != nullptr) { @@ -6171,7 +6177,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( { instance_layer_data *local_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); bool skip = false; - VkBool32 result = VK_ERROR_VALIDATION_FAILED_EXT; + VkBool32 result = VK_FALSE; std::unique_lock lock(global_lock); if (!local_data->extensions.vk_khr_surface) skip |= OutputExtensionError(local_data, "vkGetPhysicalDeviceXlibPresentationSupportKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -6251,7 +6257,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( { instance_layer_data *local_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); bool skip = false; - VkBool32 result = VK_ERROR_VALIDATION_FAILED_EXT; + VkBool32 result = VK_FALSE; std::unique_lock lock(global_lock); if (!local_data->extensions.vk_khr_surface) skip |= OutputExtensionError(local_data, "vkGetPhysicalDeviceXcbPresentationSupportKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -6330,7 +6336,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( { instance_layer_data *local_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); bool skip = false; - VkBool32 result = VK_ERROR_VALIDATION_FAILED_EXT; + VkBool32 result = VK_FALSE; std::unique_lock lock(global_lock); if (!local_data->extensions.vk_khr_surface) skip |= OutputExtensionError(local_data, "vkGetPhysicalDeviceWaylandPresentationSupportKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -6409,7 +6415,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR( { instance_layer_data *local_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); bool skip = false; - VkBool32 result = VK_ERROR_VALIDATION_FAILED_EXT; + VkBool32 result = VK_FALSE; std::unique_lock lock(global_lock); if (!local_data->extensions.vk_khr_surface) skip |= OutputExtensionError(local_data, "vkGetPhysicalDeviceMirPresentationSupportKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -6538,7 +6544,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( { instance_layer_data *local_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); bool skip = false; - VkBool32 result = VK_ERROR_VALIDATION_FAILED_EXT; + VkBool32 result = VK_FALSE; std::unique_lock lock(global_lock); if (!local_data->extensions.vk_khr_surface) skip |= OutputExtensionError(local_data, "vkGetPhysicalDeviceWin32PresentationSupportKHR", VK_KHR_SURFACE_EXTENSION_NAME); @@ -7348,8 +7354,6 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( skip |= validate_required_handle(local_data->report_data, "vkUpdateDescriptorSetWithTemplateKHR", "descriptorUpdateTemplate", descriptorUpdateTemplate); - skip |= validate_required_pointer(local_data->report_data, "vkUpdateDescriptorSetWithTemplateKHR", "pData", pData, VALIDATION_ERROR_33a12201); - PFN_manual_vkUpdateDescriptorSetWithTemplateKHR custom_func = (PFN_manual_vkUpdateDescriptorSetWithTemplateKHR)custom_functions["vkUpdateDescriptorSetWithTemplateKHR"]; if (custom_func != nullptr) { skip |= custom_func(device, descriptorSet, descriptorUpdateTemplate, pData); @@ -7378,8 +7382,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( skip |= validate_required_handle(local_data->report_data, "vkCmdPushDescriptorSetWithTemplateKHR", "layout", layout); - skip |= validate_required_pointer(local_data->report_data, "vkCmdPushDescriptorSetWithTemplateKHR", "pData", pData, VALIDATION_ERROR_1c012201); - PFN_manual_vkCmdPushDescriptorSetWithTemplateKHR custom_func = (PFN_manual_vkCmdPushDescriptorSetWithTemplateKHR)custom_functions["vkCmdPushDescriptorSetWithTemplateKHR"]; if (custom_func != nullptr) { skip |= custom_func(commandBuffer, descriptorUpdateTemplate, layout, set, pData); @@ -8346,6 +8348,43 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( +VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo) +{ + layer_data *local_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + std::unique_lock lock(global_lock); + + if (!local_data->extensions.vk_amd_shader_info) skip |= OutputExtensionError(local_data, "vkGetShaderInfoAMD", VK_AMD_SHADER_INFO_EXTENSION_NAME); + + skip |= validate_required_handle(local_data->report_data, "vkGetShaderInfoAMD", "pipeline", pipeline); + + skip |= validate_flags(local_data->report_data, "vkGetShaderInfoAMD", "shaderStage", "VkShaderStageFlagBits", AllVkShaderStageFlagBits, shaderStage, true, true, VALIDATION_ERROR_40e3ec01); + + skip |= validate_ranged_enum(local_data->report_data, "vkGetShaderInfoAMD", "infoType", "VkShaderInfoTypeAMD", AllVkShaderInfoTypeAMDEnums, infoType, VALIDATION_ERROR_40e3ee01); + + skip |= validate_array(local_data->report_data, "vkGetShaderInfoAMD", "pInfoSize", "pInfo", pInfoSize, pInfo, true, false, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_40e39c01); + + PFN_manual_vkGetShaderInfoAMD custom_func = (PFN_manual_vkGetShaderInfoAMD)custom_functions["vkGetShaderInfoAMD"]; + if (custom_func != nullptr) { + skip |= custom_func(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + } + + lock.unlock(); + if (!skip) { + result = local_data->dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + } + return result; +} + + + @@ -8455,7 +8494,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHX( if (!local_data->extensions.vk_khx_device_group) skip |= OutputExtensionError(local_data, "vkGetDeviceGroupPeerMemoryFeaturesKHX", VK_KHX_DEVICE_GROUP_EXTENSION_NAME); - skip |= validate_required_pointer(local_data->report_data, "vkGetDeviceGroupPeerMemoryFeaturesKHX", "pPeerMemoryFeatures", pPeerMemoryFeatures, VALIDATION_ERROR_28c1d401); + // No xml-driven validation PFN_manual_vkGetDeviceGroupPeerMemoryFeaturesKHX custom_func = (PFN_manual_vkGetDeviceGroupPeerMemoryFeaturesKHX)custom_functions["vkGetDeviceGroupPeerMemoryFeaturesKHX"]; if (custom_func != nullptr) { @@ -8570,8 +8609,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX( skip |= validate_required_handle(local_data->report_data, "vkGetDeviceGroupSurfacePresentModesKHX", "surface", surface); - skip |= validate_required_pointer(local_data->report_data, "vkGetDeviceGroupSurfacePresentModesKHX", "pModes", pModes, VALIDATION_ERROR_2901be01); - PFN_manual_vkGetDeviceGroupSurfacePresentModesKHX custom_func = (PFN_manual_vkGetDeviceGroupSurfacePresentModesKHX)custom_functions["vkGetDeviceGroupSurfacePresentModesKHX"]; if (custom_func != nullptr) { skip |= custom_func(device, surface, pModes); @@ -8678,8 +8715,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( skip |= validate_struct_pnext(local_data->report_data, "vkCreateViSurfaceNN", "pCreateInfo->pNext", NULL, pCreateInfo->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_14e1c40d); skip |= validate_reserved_flags(local_data->report_data, "vkCreateViSurfaceNN", "pCreateInfo->flags", pCreateInfo->flags, VALIDATION_ERROR_14e09005); - - skip |= validate_required_pointer(local_data->report_data, "vkCreateViSurfaceNN", "pCreateInfo->window", pCreateInfo->window, VALIDATION_ERROR_14e30e01); } if (pAllocator != NULL) @@ -9099,7 +9134,15 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV( if (!local_data->extensions.vk_nv_clip_space_w_scaling) skip |= OutputExtensionError(local_data, "vkCmdSetViewportWScalingNV", VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME); - // No xml-driven validation + skip |= validate_array(local_data->report_data, "vkCmdSetViewportWScalingNV", "viewportCount", "pViewportWScalings", viewportCount, pViewportWScalings, true, true, VALIDATION_ERROR_1e230a1b, VALIDATION_ERROR_1e23fc01); + + if (pViewportWScalings != NULL) + { + for (uint32_t viewportIndex = 0; viewportIndex < viewportCount; ++viewportIndex) + { + // No xml-driven validation + } + } PFN_manual_vkCmdSetViewportWScalingNV custom_func = (PFN_manual_vkCmdSetViewportWScalingNV)custom_functions["vkCmdSetViewportWScalingNV"]; if (custom_func != nullptr) { @@ -9531,6 +9574,8 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( + + VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, @@ -9602,8 +9647,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( skip |= validate_struct_pnext(local_data->report_data, "vkCreateIOSSurfaceMVK", "pCreateInfo->pNext", NULL, pCreateInfo->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_0981c40d); skip |= validate_reserved_flags(local_data->report_data, "vkCreateIOSSurfaceMVK", "pCreateInfo->flags", pCreateInfo->flags, VALIDATION_ERROR_09809005); - - skip |= validate_required_pointer(local_data->report_data, "vkCreateIOSSurfaceMVK", "pCreateInfo->pView", pCreateInfo->pView, VALIDATION_ERROR_09826a01); } if (pAllocator != NULL) @@ -9655,8 +9698,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( skip |= validate_struct_pnext(local_data->report_data, "vkCreateMacOSSurfaceMVK", "pCreateInfo->pNext", NULL, pCreateInfo->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_0c01c40d); skip |= validate_reserved_flags(local_data->report_data, "vkCreateMacOSSurfaceMVK", "pCreateInfo->flags", pCreateInfo->flags, VALIDATION_ERROR_0c009005); - - skip |= validate_required_pointer(local_data->report_data, "vkCreateMacOSSurfaceMVK", "pCreateInfo->pView", pCreateInfo->pView, VALIDATION_ERROR_0c026a01); } if (pAllocator != NULL) @@ -9694,6 +9735,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( + + + + VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) @@ -9913,6 +9958,73 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( + +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) +{ + layer_data *local_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + std::unique_lock lock(global_lock); + + if (!local_data->extensions.vk_khr_external_memory) skip |= OutputExtensionError(local_data, "vkGetMemoryHostPointerPropertiesEXT", VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME); + + if (!local_data->extensions.vk_ext_external_memory_host) skip |= OutputExtensionError(local_data, "vkGetMemoryHostPointerPropertiesEXT", VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME); + + skip |= validate_flags(local_data->report_data, "vkGetMemoryHostPointerPropertiesEXT", "handleType", "VkExternalMemoryHandleTypeFlagBitsKHR", AllVkExternalMemoryHandleTypeFlagBitsKHR, handleType, true, true, VALIDATION_ERROR_41809c01); + + skip |= validate_required_pointer(local_data->report_data, "vkGetMemoryHostPointerPropertiesEXT", "pHostPointer", pHostPointer, VALIDATION_ERROR_UNDEFINED); + + skip |= validate_struct_type(local_data->report_data, "vkGetMemoryHostPointerPropertiesEXT", "pMemoryHostPointerProperties", "VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT", pMemoryHostPointerProperties, VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, true, VALIDATION_ERROR_4142b00b); + + PFN_manual_vkGetMemoryHostPointerPropertiesEXT custom_func = (PFN_manual_vkGetMemoryHostPointerPropertiesEXT)custom_functions["vkGetMemoryHostPointerPropertiesEXT"]; + if (custom_func != nullptr) { + skip |= custom_func(device, handleType, pHostPointer, pMemoryHostPointerProperties); + } + + lock.unlock(); + if (!skip) { + result = local_data->dispatch_table.GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); + } + return result; +} + + + +VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker) +{ + layer_data *local_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + bool skip = false; + std::unique_lock lock(global_lock); + + if (!local_data->extensions.vk_amd_buffer_marker) skip |= OutputExtensionError(local_data, "vkCmdWriteBufferMarkerAMD", VK_AMD_BUFFER_MARKER_EXTENSION_NAME); + + skip |= validate_flags(local_data->report_data, "vkCmdWriteBufferMarkerAMD", "pipelineStage", "VkPipelineStageFlagBits", AllVkPipelineStageFlagBits, pipelineStage, true, true, VALIDATION_ERROR_41e28401); + + skip |= validate_required_handle(local_data->report_data, "vkCmdWriteBufferMarkerAMD", "dstBuffer", dstBuffer); + + PFN_manual_vkCmdWriteBufferMarkerAMD custom_func = (PFN_manual_vkCmdWriteBufferMarkerAMD)custom_functions["vkCmdWriteBufferMarkerAMD"]; + if (custom_func != nullptr) { + skip |= custom_func(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + } + + lock.unlock(); + if (!skip) { + local_data->dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + } +} + + + + // Declarations VKAPI_ATTR VkResult VKAPI_CALL CreateInstance( const VkInstanceCreateInfo* pCreateInfo, @@ -10927,6 +11039,13 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo); VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, @@ -11131,6 +11250,17 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); +VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); +VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker); // Map of all APIs to be intercepted by this layer const std::unordered_map name_to_funcptr_map = { {"vkCreateInstance", (void*)vkCreateInstance}, @@ -11374,6 +11504,7 @@ const std::unordered_map name_to_funcptr_map = { {"vkCmdDebugMarkerInsertEXT", (void*)vkCmdDebugMarkerInsertEXT}, {"vkCmdDrawIndirectCountAMD", (void*)vkCmdDrawIndirectCountAMD}, {"vkCmdDrawIndexedIndirectCountAMD", (void*)vkCmdDrawIndexedIndirectCountAMD}, + {"vkGetShaderInfoAMD", (void*)vkGetShaderInfoAMD}, {"vkGetPhysicalDeviceExternalImageFormatPropertiesNV", (void*)vkGetPhysicalDeviceExternalImageFormatPropertiesNV}, #ifdef VK_USE_PLATFORM_WIN32_KHR {"vkGetMemoryWin32HandleNV", (void*)vkGetMemoryWin32HandleNV}, @@ -11427,6 +11558,8 @@ const std::unordered_map name_to_funcptr_map = { {"vkDestroyValidationCacheEXT", (void*)vkDestroyValidationCacheEXT}, {"vkMergeValidationCachesEXT", (void*)vkMergeValidationCachesEXT}, {"vkGetValidationCacheDataEXT", (void*)vkGetValidationCacheDataEXT}, + {"vkGetMemoryHostPointerPropertiesEXT", (void*)vkGetMemoryHostPointerPropertiesEXT}, + {"vkCmdWriteBufferMarkerAMD", (void*)vkCmdWriteBufferMarkerAMD}, }; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_commit_id.h b/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_commit_id.h new file mode 100644 index 0000000000000000000000000000000000000000..b6b89f9f845b3e93a25aecef1078af5aed00a01f --- /dev/null +++ b/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_commit_id.h @@ -0,0 +1,29 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See external_revision_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2017 The Khronos Group Inc. + * Copyright (c) 2015-2017 Valve Corporation + * Copyright (c) 2015-2017 LunarG, Inc. + * Copyright (c) 2015-2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Chris Forbes + * Author: Cort Stratton + * + ****************************************************************************/ +#pragma once + +#define SPIRV_TOOLS_COMMIT_ID "f20c968e344bac08463b8b8e1e0d84ac2da1e6ea" diff --git a/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_uuid.txt b/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_uuid.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f411a236db5442c7dbb9bc8035aab1cfef0e26f --- /dev/null +++ b/sources/third_party/vulkan/src/build-android/generated/include/spirv_tools_uuid.txt @@ -0,0 +1 @@ +e79ee3e3-a68d-4d92-ac78-2455684d4953 diff --git a/sources/third_party/vulkan/src/build-android/generated/include/thread_check.h b/sources/third_party/vulkan/src/build-android/generated/include/thread_check.h index 62794114e8ccf70b7581e7e5be3076242f0e91b0..ff92d82eaf5c3a458e39c66936f22a8c99af48bd 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/thread_check.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/thread_check.h @@ -4356,6 +4356,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( +VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo) +{ + dispatch_key key = get_dispatch_key(device); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); + VkLayerDispatchTable *pTable = my_data->device_dispatch_table; + VkResult result; + bool threadChecks = startMultiThread(); + if (threadChecks) { + startReadObject(my_data, device); + startReadObject(my_data, pipeline); + } + result = pTable->GetShaderInfoAMD(device,pipeline,shaderStage,infoType,pInfoSize,pInfo); + if (threadChecks) { + finishReadObject(my_data, device); + finishReadObject(my_data, pipeline); + } else { + finishMultiThread(); + } + return result; +} + + @@ -5076,6 +5104,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT( + VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, @@ -5161,6 +5190,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( + + VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) @@ -5294,6 +5325,58 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( } + + +VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) +{ + dispatch_key key = get_dispatch_key(device); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); + VkLayerDispatchTable *pTable = my_data->device_dispatch_table; + VkResult result; + bool threadChecks = startMultiThread(); + if (threadChecks) { + startReadObject(my_data, device); + } + result = pTable->GetMemoryHostPointerPropertiesEXT(device,handleType,pHostPointer,pMemoryHostPointerProperties); + if (threadChecks) { + finishReadObject(my_data, device); + } else { + finishMultiThread(); + } + return result; +} + + +VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker) +{ + dispatch_key key = get_dispatch_key(commandBuffer); + layer_data *my_data = GetLayerDataPtr(key, layer_data_map); + VkLayerDispatchTable *pTable = my_data->device_dispatch_table; + bool threadChecks = startMultiThread(); + if (threadChecks) { + startWriteObject(my_data, commandBuffer); + startReadObject(my_data, dstBuffer); + // Host access to commandBuffer must be externally synchronized + } + pTable->CmdWriteBufferMarkerAMD(commandBuffer,pipelineStage,dstBuffer,dstOffset,marker); + if (threadChecks) { + finishWriteObject(my_data, commandBuffer); + finishReadObject(my_data, dstBuffer); + // Host access to commandBuffer must be externally synchronized + } else { + finishMultiThread(); + } +} + // Map of all APIs to be intercepted by this layer static const std::unordered_map name_to_funcptr_map = { {"vkCreateInstance", (void*)CreateInstance}, @@ -5502,6 +5585,7 @@ static const std::unordered_map name_to_funcptr_map = { {"vkDebugReportMessageEXT", (void*)DebugReportMessageEXT}, {"vkCmdDrawIndirectCountAMD", (void*)CmdDrawIndirectCountAMD}, {"vkCmdDrawIndexedIndirectCountAMD", (void*)CmdDrawIndexedIndirectCountAMD}, + {"vkGetShaderInfoAMD", (void*)GetShaderInfoAMD}, #ifdef VK_USE_PLATFORM_WIN32_KHR {"vkGetMemoryWin32HandleNV", (void*)GetMemoryWin32HandleNV}, #endif @@ -5549,6 +5633,8 @@ static const std::unordered_map name_to_funcptr_map = { {"vkDestroyValidationCacheEXT", (void*)DestroyValidationCacheEXT}, {"vkMergeValidationCachesEXT", (void*)MergeValidationCachesEXT}, {"vkGetValidationCacheDataEXT", (void*)GetValidationCacheDataEXT}, + {"vkGetMemoryHostPointerPropertiesEXT", (void*)GetMemoryHostPointerPropertiesEXT}, + {"vkCmdWriteBufferMarkerAMD", (void*)CmdWriteBufferMarkerAMD}, }; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/unique_objects_wrappers.h b/sources/third_party/vulkan/src/build-android/generated/include/unique_objects_wrappers.h index 8af7eaf1ed9c327a345799824e8969df760b3d4d..af4b9b71425a227d56a3ade76596ea9bbd7e9177 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/unique_objects_wrappers.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/unique_objects_wrappers.h @@ -23,7 +23,7 @@ namespace unique_objects { // Unique Objects pNext extension handling function -void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { +void *CreateUnwrappedExtensionStructs(const void *pNext) { void *cur_pnext = const_cast(pNext); void *head_pnext = NULL; void *prev_ext_struct = NULL; @@ -53,12 +53,12 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->pAcquireSyncs) { for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { - safe_struct->pAcquireSyncs[index0] = Unwrap(dev_data, safe_struct->pAcquireSyncs[index0]); + safe_struct->pAcquireSyncs[index0] = Unwrap(safe_struct->pAcquireSyncs[index0]); } } if (safe_struct->pReleaseSyncs) { for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { - safe_struct->pReleaseSyncs[index0] = Unwrap(dev_data, safe_struct->pReleaseSyncs[index0]); + safe_struct->pReleaseSyncs[index0] = Unwrap(safe_struct->pReleaseSyncs[index0]); } } cur_ext_struct = reinterpret_cast(safe_struct); @@ -71,12 +71,12 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->pAcquireSyncs) { for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { - safe_struct->pAcquireSyncs[index0] = Unwrap(dev_data, safe_struct->pAcquireSyncs[index0]); + safe_struct->pAcquireSyncs[index0] = Unwrap(safe_struct->pAcquireSyncs[index0]); } } if (safe_struct->pReleaseSyncs) { for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { - safe_struct->pReleaseSyncs[index0] = Unwrap(dev_data, safe_struct->pReleaseSyncs[index0]); + safe_struct->pReleaseSyncs[index0] = Unwrap(safe_struct->pReleaseSyncs[index0]); } } cur_ext_struct = reinterpret_cast(safe_struct); @@ -87,10 +87,10 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkDedicatedAllocationMemoryAllocateInfoNV *safe_struct = new safe_VkDedicatedAllocationMemoryAllocateInfoNV; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->image) { - safe_struct->image = Unwrap(dev_data, safe_struct->image); + safe_struct->image = Unwrap(safe_struct->image); } if (safe_struct->buffer) { - safe_struct->buffer = Unwrap(dev_data, safe_struct->buffer); + safe_struct->buffer = Unwrap(safe_struct->buffer); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -129,6 +129,12 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { cur_ext_struct = reinterpret_cast(safe_struct); } break; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: { + safe_VkImportMemoryHostPointerInfoEXT *safe_struct = new safe_VkImportMemoryHostPointerInfoEXT; + safe_struct->initialize(reinterpret_cast(cur_pnext)); + cur_ext_struct = reinterpret_cast(safe_struct); + } break; + #ifdef VK_USE_PLATFORM_WIN32_KHR case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: { safe_VkImportMemoryWin32HandleInfoKHR *safe_struct = new safe_VkImportMemoryWin32HandleInfoKHR; @@ -155,10 +161,10 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkMemoryDedicatedAllocateInfoKHR *safe_struct = new safe_VkMemoryDedicatedAllocateInfoKHR; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->image) { - safe_struct->image = Unwrap(dev_data, safe_struct->image); + safe_struct->image = Unwrap(safe_struct->image); } if (safe_struct->buffer) { - safe_struct->buffer = Unwrap(dev_data, safe_struct->buffer); + safe_struct->buffer = Unwrap(safe_struct->buffer); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -191,7 +197,7 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkImageSwapchainCreateInfoKHX *safe_struct = new safe_VkImageSwapchainCreateInfoKHX; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->swapchain) { - safe_struct->swapchain = Unwrap(dev_data, safe_struct->swapchain); + safe_struct->swapchain = Unwrap(safe_struct->swapchain); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -206,7 +212,7 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkSamplerYcbcrConversionInfoKHR *safe_struct = new safe_VkSamplerYcbcrConversionInfoKHR; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->conversion) { - safe_struct->conversion = Unwrap(dev_data, safe_struct->conversion); + safe_struct->conversion = Unwrap(safe_struct->conversion); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -215,7 +221,7 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkShaderModuleValidationCacheCreateInfoEXT *safe_struct = new safe_VkShaderModuleValidationCacheCreateInfoEXT; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->validationCache) { - safe_struct->validationCache = Unwrap(dev_data, safe_struct->validationCache); + safe_struct->validationCache = Unwrap(safe_struct->validationCache); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -236,7 +242,7 @@ void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) { safe_VkBindImageMemorySwapchainInfoKHX *safe_struct = new safe_VkBindImageMemorySwapchainInfoKHX; safe_struct->initialize(reinterpret_cast(cur_pnext)); if (safe_struct->swapchain) { - safe_struct->swapchain = Unwrap(dev_data, safe_struct->swapchain); + safe_struct->swapchain = Unwrap(safe_struct->swapchain); } cur_ext_struct = reinterpret_cast(safe_struct); } break; @@ -343,20 +349,20 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit( local_pSubmits = new safe_VkSubmitInfo[submitCount]; for (uint32_t index0 = 0; index0 < submitCount; ++index0) { local_pSubmits[index0].initialize(&pSubmits[index0]); - local_pSubmits[index0].pNext = CreateUnwrappedExtensionStructs(dev_data, local_pSubmits[index0].pNext); + local_pSubmits[index0].pNext = CreateUnwrappedExtensionStructs(local_pSubmits[index0].pNext); if (local_pSubmits[index0].pWaitSemaphores) { for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreCount; ++index1) { - local_pSubmits[index0].pWaitSemaphores[index1] = Unwrap(dev_data, local_pSubmits[index0].pWaitSemaphores[index1]); + local_pSubmits[index0].pWaitSemaphores[index1] = Unwrap(local_pSubmits[index0].pWaitSemaphores[index1]); } } if (local_pSubmits[index0].pSignalSemaphores) { for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreCount; ++index1) { - local_pSubmits[index0].pSignalSemaphores[index1] = Unwrap(dev_data, local_pSubmits[index0].pSignalSemaphores[index1]); + local_pSubmits[index0].pSignalSemaphores[index1] = Unwrap(local_pSubmits[index0].pSignalSemaphores[index1]); } } } } - fence = Unwrap(dev_data, fence); + fence = Unwrap(fence); } VkResult result = dev_data->dispatch_table.QueueSubmit(queue, submitCount, (const VkSubmitInfo*)local_pSubmits, fence); if (local_pSubmits) { @@ -380,7 +386,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory( std::lock_guard lock(global_lock); if (pAllocateInfo) { local_pAllocateInfo = new safe_VkMemoryAllocateInfo(pAllocateInfo); - local_pAllocateInfo->pNext = CreateUnwrappedExtensionStructs(dev_data, local_pAllocateInfo->pNext); + local_pAllocateInfo->pNext = CreateUnwrappedExtensionStructs(local_pAllocateInfo->pNext); } } VkResult result = dev_data->dispatch_table.AllocateMemory(device, (const VkMemoryAllocateInfo*)local_pAllocateInfo, pAllocator, pMemory); @@ -390,7 +396,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pMemory = WrapNew(dev_data, *pMemory); + *pMemory = WrapNew(*pMemory); } return result; } @@ -403,8 +409,8 @@ VKAPI_ATTR void VKAPI_CALL FreeMemory( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t memory_id = reinterpret_cast(memory); - memory = (VkDeviceMemory)dev_data->unique_id_mapping[memory_id]; - dev_data->unique_id_mapping.erase(memory_id); + memory = (VkDeviceMemory)unique_id_mapping[memory_id]; + unique_id_mapping.erase(memory_id); lock.unlock(); dev_data->dispatch_table.FreeMemory(device, memory, pAllocator); @@ -421,7 +427,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - memory = Unwrap(dev_data, memory); + memory = Unwrap(memory); } VkResult result = dev_data->dispatch_table.MapMemory(device, memory, offset, size, flags, ppData); @@ -435,7 +441,7 @@ VKAPI_ATTR void VKAPI_CALL UnmapMemory( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - memory = Unwrap(dev_data, memory); + memory = Unwrap(memory); } dev_data->dispatch_table.UnmapMemory(device, memory); @@ -455,7 +461,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges( for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); if (pMemoryRanges[index0].memory) { - local_pMemoryRanges[index0].memory = Unwrap(dev_data, pMemoryRanges[index0].memory); + local_pMemoryRanges[index0].memory = Unwrap(pMemoryRanges[index0].memory); } } } @@ -481,7 +487,7 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges( for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); if (pMemoryRanges[index0].memory) { - local_pMemoryRanges[index0].memory = Unwrap(dev_data, pMemoryRanges[index0].memory); + local_pMemoryRanges[index0].memory = Unwrap(pMemoryRanges[index0].memory); } } } @@ -501,7 +507,7 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - memory = Unwrap(dev_data, memory); + memory = Unwrap(memory); } dev_data->dispatch_table.GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); @@ -516,8 +522,8 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); - memory = Unwrap(dev_data, memory); + buffer = Unwrap(buffer); + memory = Unwrap(memory); } VkResult result = dev_data->dispatch_table.BindBufferMemory(device, buffer, memory, memoryOffset); @@ -533,8 +539,8 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); - memory = Unwrap(dev_data, memory); + image = Unwrap(image); + memory = Unwrap(memory); } VkResult result = dev_data->dispatch_table.BindImageMemory(device, image, memory, memoryOffset); @@ -549,7 +555,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); + buffer = Unwrap(buffer); } dev_data->dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); @@ -563,7 +569,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); + image = Unwrap(image); } dev_data->dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); @@ -578,7 +584,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); + image = Unwrap(image); } dev_data->dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); @@ -600,18 +606,18 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( local_pBindInfo[index0].initialize(&pBindInfo[index0]); if (local_pBindInfo[index0].pWaitSemaphores) { for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].waitSemaphoreCount; ++index1) { - local_pBindInfo[index0].pWaitSemaphores[index1] = Unwrap(dev_data, local_pBindInfo[index0].pWaitSemaphores[index1]); + local_pBindInfo[index0].pWaitSemaphores[index1] = Unwrap(local_pBindInfo[index0].pWaitSemaphores[index1]); } } if (local_pBindInfo[index0].pBufferBinds) { for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].bufferBindCount; ++index1) { if (pBindInfo[index0].pBufferBinds[index1].buffer) { - local_pBindInfo[index0].pBufferBinds[index1].buffer = Unwrap(dev_data, pBindInfo[index0].pBufferBinds[index1].buffer); + local_pBindInfo[index0].pBufferBinds[index1].buffer = Unwrap(pBindInfo[index0].pBufferBinds[index1].buffer); } if (local_pBindInfo[index0].pBufferBinds[index1].pBinds) { for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pBufferBinds[index1].bindCount; ++index2) { if (pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory = Unwrap(dev_data, pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory); + local_pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory = Unwrap(pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory); } } } @@ -620,12 +626,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( if (local_pBindInfo[index0].pImageOpaqueBinds) { for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageOpaqueBindCount; ++index1) { if (pBindInfo[index0].pImageOpaqueBinds[index1].image) { - local_pBindInfo[index0].pImageOpaqueBinds[index1].image = Unwrap(dev_data, pBindInfo[index0].pImageOpaqueBinds[index1].image); + local_pBindInfo[index0].pImageOpaqueBinds[index1].image = Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].image); } if (local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds) { for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageOpaqueBinds[index1].bindCount; ++index2) { if (pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory = Unwrap(dev_data, pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory); + local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory = Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory); } } } @@ -634,12 +640,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( if (local_pBindInfo[index0].pImageBinds) { for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageBindCount; ++index1) { if (pBindInfo[index0].pImageBinds[index1].image) { - local_pBindInfo[index0].pImageBinds[index1].image = Unwrap(dev_data, pBindInfo[index0].pImageBinds[index1].image); + local_pBindInfo[index0].pImageBinds[index1].image = Unwrap(pBindInfo[index0].pImageBinds[index1].image); } if (local_pBindInfo[index0].pImageBinds[index1].pBinds) { for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageBinds[index1].bindCount; ++index2) { if (pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory = Unwrap(dev_data, pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory); + local_pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory = Unwrap(pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory); } } } @@ -647,12 +653,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse( } if (local_pBindInfo[index0].pSignalSemaphores) { for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].signalSemaphoreCount; ++index1) { - local_pBindInfo[index0].pSignalSemaphores[index1] = Unwrap(dev_data, local_pBindInfo[index0].pSignalSemaphores[index1]); + local_pBindInfo[index0].pSignalSemaphores[index1] = Unwrap(local_pBindInfo[index0].pSignalSemaphores[index1]); } } } } - fence = Unwrap(dev_data, fence); + fence = Unwrap(fence); } VkResult result = dev_data->dispatch_table.QueueBindSparse(queue, bindInfoCount, (const VkBindSparseInfo*)local_pBindInfo, fence); if (local_pBindInfo) { @@ -671,7 +677,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence( VkResult result = dev_data->dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pFence = WrapNew(dev_data, *pFence); + *pFence = WrapNew(*pFence); } return result; } @@ -684,8 +690,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t fence_id = reinterpret_cast(fence); - fence = (VkFence)dev_data->unique_id_mapping[fence_id]; - dev_data->unique_id_mapping.erase(fence_id); + fence = (VkFence)unique_id_mapping[fence_id]; + unique_id_mapping.erase(fence_id); lock.unlock(); dev_data->dispatch_table.DestroyFence(device, fence, pAllocator); @@ -703,7 +709,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences( if (pFences) { local_pFences = new VkFence[fenceCount]; for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { - local_pFences[index0] = Unwrap(dev_data, pFences[index0]); + local_pFences[index0] = Unwrap(pFences[index0]); } } } @@ -720,7 +726,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - fence = Unwrap(dev_data, fence); + fence = Unwrap(fence); } VkResult result = dev_data->dispatch_table.GetFenceStatus(device, fence); @@ -741,7 +747,7 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForFences( if (pFences) { local_pFences = new VkFence[fenceCount]; for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { - local_pFences[index0] = Unwrap(dev_data, pFences[index0]); + local_pFences[index0] = Unwrap(pFences[index0]); } } } @@ -761,7 +767,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore( VkResult result = dev_data->dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSemaphore = WrapNew(dev_data, *pSemaphore); + *pSemaphore = WrapNew(*pSemaphore); } return result; } @@ -774,8 +780,8 @@ VKAPI_ATTR void VKAPI_CALL DestroySemaphore( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t semaphore_id = reinterpret_cast(semaphore); - semaphore = (VkSemaphore)dev_data->unique_id_mapping[semaphore_id]; - dev_data->unique_id_mapping.erase(semaphore_id); + semaphore = (VkSemaphore)unique_id_mapping[semaphore_id]; + unique_id_mapping.erase(semaphore_id); lock.unlock(); dev_data->dispatch_table.DestroySemaphore(device, semaphore, pAllocator); @@ -791,7 +797,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent( VkResult result = dev_data->dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pEvent = WrapNew(dev_data, *pEvent); + *pEvent = WrapNew(*pEvent); } return result; } @@ -804,8 +810,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t event_id = reinterpret_cast(event); - event = (VkEvent)dev_data->unique_id_mapping[event_id]; - dev_data->unique_id_mapping.erase(event_id); + event = (VkEvent)unique_id_mapping[event_id]; + unique_id_mapping.erase(event_id); lock.unlock(); dev_data->dispatch_table.DestroyEvent(device, event, pAllocator); @@ -818,7 +824,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - event = Unwrap(dev_data, event); + event = Unwrap(event); } VkResult result = dev_data->dispatch_table.GetEventStatus(device, event); @@ -832,7 +838,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - event = Unwrap(dev_data, event); + event = Unwrap(event); } VkResult result = dev_data->dispatch_table.SetEvent(device, event); @@ -846,7 +852,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetEvent( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - event = Unwrap(dev_data, event); + event = Unwrap(event); } VkResult result = dev_data->dispatch_table.ResetEvent(device, event); @@ -863,7 +869,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool( VkResult result = dev_data->dispatch_table.CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pQueryPool = WrapNew(dev_data, *pQueryPool); + *pQueryPool = WrapNew(*pQueryPool); } return result; } @@ -876,8 +882,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyQueryPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t queryPool_id = reinterpret_cast(queryPool); - queryPool = (VkQueryPool)dev_data->unique_id_mapping[queryPool_id]; - dev_data->unique_id_mapping.erase(queryPool_id); + queryPool = (VkQueryPool)unique_id_mapping[queryPool_id]; + unique_id_mapping.erase(queryPool_id); lock.unlock(); dev_data->dispatch_table.DestroyQueryPool(device, queryPool, pAllocator); @@ -896,7 +902,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); + queryPool = Unwrap(queryPool); } VkResult result = dev_data->dispatch_table.GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); @@ -913,7 +919,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer( VkResult result = dev_data->dispatch_table.CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pBuffer = WrapNew(dev_data, *pBuffer); + *pBuffer = WrapNew(*pBuffer); } return result; } @@ -926,8 +932,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t buffer_id = reinterpret_cast(buffer); - buffer = (VkBuffer)dev_data->unique_id_mapping[buffer_id]; - dev_data->unique_id_mapping.erase(buffer_id); + buffer = (VkBuffer)unique_id_mapping[buffer_id]; + unique_id_mapping.erase(buffer_id); lock.unlock(); dev_data->dispatch_table.DestroyBuffer(device, buffer, pAllocator); @@ -946,7 +952,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView( if (pCreateInfo) { local_pCreateInfo = new safe_VkBufferViewCreateInfo(pCreateInfo); if (pCreateInfo->buffer) { - local_pCreateInfo->buffer = Unwrap(dev_data, pCreateInfo->buffer); + local_pCreateInfo->buffer = Unwrap(pCreateInfo->buffer); } } } @@ -956,7 +962,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pView = WrapNew(dev_data, *pView); + *pView = WrapNew(*pView); } return result; } @@ -969,8 +975,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyBufferView( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t bufferView_id = reinterpret_cast(bufferView); - bufferView = (VkBufferView)dev_data->unique_id_mapping[bufferView_id]; - dev_data->unique_id_mapping.erase(bufferView_id); + bufferView = (VkBufferView)unique_id_mapping[bufferView_id]; + unique_id_mapping.erase(bufferView_id); lock.unlock(); dev_data->dispatch_table.DestroyBufferView(device, bufferView, pAllocator); @@ -988,7 +994,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage( std::lock_guard lock(global_lock); if (pCreateInfo) { local_pCreateInfo = new safe_VkImageCreateInfo(pCreateInfo); - local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(dev_data, local_pCreateInfo->pNext); + local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(local_pCreateInfo->pNext); } } VkResult result = dev_data->dispatch_table.CreateImage(device, (const VkImageCreateInfo*)local_pCreateInfo, pAllocator, pImage); @@ -998,7 +1004,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pImage = WrapNew(dev_data, *pImage); + *pImage = WrapNew(*pImage); } return result; } @@ -1011,8 +1017,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t image_id = reinterpret_cast(image); - image = (VkImage)dev_data->unique_id_mapping[image_id]; - dev_data->unique_id_mapping.erase(image_id); + image = (VkImage)unique_id_mapping[image_id]; + unique_id_mapping.erase(image_id); lock.unlock(); dev_data->dispatch_table.DestroyImage(device, image, pAllocator); @@ -1027,7 +1033,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); + image = Unwrap(image); } dev_data->dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); @@ -1046,9 +1052,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView( if (pCreateInfo) { local_pCreateInfo = new safe_VkImageViewCreateInfo(pCreateInfo); if (pCreateInfo->image) { - local_pCreateInfo->image = Unwrap(dev_data, pCreateInfo->image); + local_pCreateInfo->image = Unwrap(pCreateInfo->image); } - local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(dev_data, local_pCreateInfo->pNext); + local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(local_pCreateInfo->pNext); } } VkResult result = dev_data->dispatch_table.CreateImageView(device, (const VkImageViewCreateInfo*)local_pCreateInfo, pAllocator, pView); @@ -1058,7 +1064,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pView = WrapNew(dev_data, *pView); + *pView = WrapNew(*pView); } return result; } @@ -1071,8 +1077,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyImageView( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t imageView_id = reinterpret_cast(imageView); - imageView = (VkImageView)dev_data->unique_id_mapping[imageView_id]; - dev_data->unique_id_mapping.erase(imageView_id); + imageView = (VkImageView)unique_id_mapping[imageView_id]; + unique_id_mapping.erase(imageView_id); lock.unlock(); dev_data->dispatch_table.DestroyImageView(device, imageView, pAllocator); @@ -1090,7 +1096,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule( std::lock_guard lock(global_lock); if (pCreateInfo) { local_pCreateInfo = new safe_VkShaderModuleCreateInfo(pCreateInfo); - local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(dev_data, local_pCreateInfo->pNext); + local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(local_pCreateInfo->pNext); } } VkResult result = dev_data->dispatch_table.CreateShaderModule(device, (const VkShaderModuleCreateInfo*)local_pCreateInfo, pAllocator, pShaderModule); @@ -1100,7 +1106,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pShaderModule = WrapNew(dev_data, *pShaderModule); + *pShaderModule = WrapNew(*pShaderModule); } return result; } @@ -1113,8 +1119,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderModule( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t shaderModule_id = reinterpret_cast(shaderModule); - shaderModule = (VkShaderModule)dev_data->unique_id_mapping[shaderModule_id]; - dev_data->unique_id_mapping.erase(shaderModule_id); + shaderModule = (VkShaderModule)unique_id_mapping[shaderModule_id]; + unique_id_mapping.erase(shaderModule_id); lock.unlock(); dev_data->dispatch_table.DestroyShaderModule(device, shaderModule, pAllocator); @@ -1130,7 +1136,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache( VkResult result = dev_data->dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pPipelineCache = WrapNew(dev_data, *pPipelineCache); + *pPipelineCache = WrapNew(*pPipelineCache); } return result; } @@ -1143,8 +1149,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t pipelineCache_id = reinterpret_cast(pipelineCache); - pipelineCache = (VkPipelineCache)dev_data->unique_id_mapping[pipelineCache_id]; - dev_data->unique_id_mapping.erase(pipelineCache_id); + pipelineCache = (VkPipelineCache)unique_id_mapping[pipelineCache_id]; + unique_id_mapping.erase(pipelineCache_id); lock.unlock(); dev_data->dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); @@ -1159,7 +1165,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - pipelineCache = Unwrap(dev_data, pipelineCache); + pipelineCache = Unwrap(pipelineCache); } VkResult result = dev_data->dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); @@ -1176,11 +1182,11 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches( VkPipelineCache *local_pSrcCaches = NULL; { std::lock_guard lock(global_lock); - dstCache = Unwrap(dev_data, dstCache); + dstCache = Unwrap(dstCache); if (pSrcCaches) { local_pSrcCaches = new VkPipelineCache[srcCacheCount]; for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { - local_pSrcCaches[index0] = Unwrap(dev_data, pSrcCaches[index0]); + local_pSrcCaches[index0] = Unwrap(pSrcCaches[index0]); } } } @@ -1216,8 +1222,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipeline( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t pipeline_id = reinterpret_cast(pipeline); - pipeline = (VkPipeline)dev_data->unique_id_mapping[pipeline_id]; - dev_data->unique_id_mapping.erase(pipeline_id); + pipeline = (VkPipeline)unique_id_mapping[pipeline_id]; + unique_id_mapping.erase(pipeline_id); lock.unlock(); dev_data->dispatch_table.DestroyPipeline(device, pipeline, pAllocator); @@ -1237,7 +1243,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout( local_pCreateInfo = new safe_VkPipelineLayoutCreateInfo(pCreateInfo); if (local_pCreateInfo->pSetLayouts) { for (uint32_t index1 = 0; index1 < local_pCreateInfo->setLayoutCount; ++index1) { - local_pCreateInfo->pSetLayouts[index1] = Unwrap(dev_data, local_pCreateInfo->pSetLayouts[index1]); + local_pCreateInfo->pSetLayouts[index1] = Unwrap(local_pCreateInfo->pSetLayouts[index1]); } } } @@ -1248,7 +1254,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pPipelineLayout = WrapNew(dev_data, *pPipelineLayout); + *pPipelineLayout = WrapNew(*pPipelineLayout); } return result; } @@ -1261,8 +1267,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t pipelineLayout_id = reinterpret_cast(pipelineLayout); - pipelineLayout = (VkPipelineLayout)dev_data->unique_id_mapping[pipelineLayout_id]; - dev_data->unique_id_mapping.erase(pipelineLayout_id); + pipelineLayout = (VkPipelineLayout)unique_id_mapping[pipelineLayout_id]; + unique_id_mapping.erase(pipelineLayout_id); lock.unlock(); dev_data->dispatch_table.DestroyPipelineLayout(device, pipelineLayout, pAllocator); @@ -1280,7 +1286,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler( std::lock_guard lock(global_lock); if (pCreateInfo) { local_pCreateInfo = new safe_VkSamplerCreateInfo(pCreateInfo); - local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(dev_data, local_pCreateInfo->pNext); + local_pCreateInfo->pNext = CreateUnwrappedExtensionStructs(local_pCreateInfo->pNext); } } VkResult result = dev_data->dispatch_table.CreateSampler(device, (const VkSamplerCreateInfo*)local_pCreateInfo, pAllocator, pSampler); @@ -1290,7 +1296,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSampler = WrapNew(dev_data, *pSampler); + *pSampler = WrapNew(*pSampler); } return result; } @@ -1303,8 +1309,8 @@ VKAPI_ATTR void VKAPI_CALL DestroySampler( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t sampler_id = reinterpret_cast(sampler); - sampler = (VkSampler)dev_data->unique_id_mapping[sampler_id]; - dev_data->unique_id_mapping.erase(sampler_id); + sampler = (VkSampler)unique_id_mapping[sampler_id]; + unique_id_mapping.erase(sampler_id); lock.unlock(); dev_data->dispatch_table.DestroySampler(device, sampler, pAllocator); @@ -1326,7 +1332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { - local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = Unwrap(dev_data, local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); + local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); } } } @@ -1339,7 +1345,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSetLayout = WrapNew(dev_data, *pSetLayout); + *pSetLayout = WrapNew(*pSetLayout); } return result; } @@ -1352,8 +1358,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t descriptorSetLayout_id = reinterpret_cast(descriptorSetLayout); - descriptorSetLayout = (VkDescriptorSetLayout)dev_data->unique_id_mapping[descriptorSetLayout_id]; - dev_data->unique_id_mapping.erase(descriptorSetLayout_id); + descriptorSetLayout = (VkDescriptorSetLayout)unique_id_mapping[descriptorSetLayout_id]; + unique_id_mapping.erase(descriptorSetLayout_id); lock.unlock(); dev_data->dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); @@ -1369,7 +1375,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool( VkResult result = dev_data->dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pDescriptorPool = WrapNew(dev_data, *pDescriptorPool); + *pDescriptorPool = WrapNew(*pDescriptorPool); } return result; } @@ -1382,8 +1388,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t descriptorPool_id = reinterpret_cast(descriptorPool); - descriptorPool = (VkDescriptorPool)dev_data->unique_id_mapping[descriptorPool_id]; - dev_data->unique_id_mapping.erase(descriptorPool_id); + descriptorPool = (VkDescriptorPool)unique_id_mapping[descriptorPool_id]; + unique_id_mapping.erase(descriptorPool_id); lock.unlock(); dev_data->dispatch_table.DestroyDescriptorPool(device, descriptorPool, pAllocator); @@ -1397,7 +1403,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - descriptorPool = Unwrap(dev_data, descriptorPool); + descriptorPool = Unwrap(descriptorPool); } VkResult result = dev_data->dispatch_table.ResetDescriptorPool(device, descriptorPool, flags); @@ -1416,11 +1422,11 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets( if (pAllocateInfo) { local_pAllocateInfo = new safe_VkDescriptorSetAllocateInfo(pAllocateInfo); if (pAllocateInfo->descriptorPool) { - local_pAllocateInfo->descriptorPool = Unwrap(dev_data, pAllocateInfo->descriptorPool); + local_pAllocateInfo->descriptorPool = Unwrap(pAllocateInfo->descriptorPool); } if (local_pAllocateInfo->pSetLayouts) { for (uint32_t index1 = 0; index1 < local_pAllocateInfo->descriptorSetCount; ++index1) { - local_pAllocateInfo->pSetLayouts[index1] = Unwrap(dev_data, local_pAllocateInfo->pSetLayouts[index1]); + local_pAllocateInfo->pSetLayouts[index1] = Unwrap(local_pAllocateInfo->pSetLayouts[index1]); } } } @@ -1432,7 +1438,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets( if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); for (uint32_t index0 = 0; index0 < pAllocateInfo->descriptorSetCount; index0++) { - pDescriptorSets[index0] = WrapNew(dev_data, pDescriptorSets[index0]); + pDescriptorSets[index0] = WrapNew(pDescriptorSets[index0]); } } return result; @@ -1448,11 +1454,11 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets( VkDescriptorSet *local_pDescriptorSets = NULL; { std::lock_guard lock(global_lock); - descriptorPool = Unwrap(dev_data, descriptorPool); + descriptorPool = Unwrap(descriptorPool); if (pDescriptorSets) { local_pDescriptorSets = new VkDescriptorSet[descriptorSetCount]; for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { - local_pDescriptorSets[index0] = Unwrap(dev_data, pDescriptorSets[index0]); + local_pDescriptorSets[index0] = Unwrap(pDescriptorSets[index0]); } } } @@ -1464,7 +1470,7 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets( for (uint32_t index0 = 0; index0 < descriptorSetCount; index0++) { VkDescriptorSet handle = pDescriptorSets[index0]; uint64_t unique_id = reinterpret_cast(handle); - dev_data->unique_id_mapping.erase(unique_id); + unique_id_mapping.erase(unique_id); } } return result; @@ -1487,28 +1493,28 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets( for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); if (pDescriptorWrites[index0].dstSet) { - local_pDescriptorWrites[index0].dstSet = Unwrap(dev_data, pDescriptorWrites[index0].dstSet); + local_pDescriptorWrites[index0].dstSet = Unwrap(pDescriptorWrites[index0].dstSet); } if (local_pDescriptorWrites[index0].pImageInfo) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { - local_pDescriptorWrites[index0].pImageInfo[index1].sampler = Unwrap(dev_data, pDescriptorWrites[index0].pImageInfo[index1].sampler); + local_pDescriptorWrites[index0].pImageInfo[index1].sampler = Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); } if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { - local_pDescriptorWrites[index0].pImageInfo[index1].imageView = Unwrap(dev_data, pDescriptorWrites[index0].pImageInfo[index1].imageView); + local_pDescriptorWrites[index0].pImageInfo[index1].imageView = Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); } } } if (local_pDescriptorWrites[index0].pBufferInfo) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { - local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = Unwrap(dev_data, pDescriptorWrites[index0].pBufferInfo[index1].buffer); + local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); } } } if (local_pDescriptorWrites[index0].pTexelBufferView) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - local_pDescriptorWrites[index0].pTexelBufferView[index1] = Unwrap(dev_data, local_pDescriptorWrites[index0].pTexelBufferView[index1]); + local_pDescriptorWrites[index0].pTexelBufferView[index1] = Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); } } } @@ -1518,10 +1524,10 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets( for (uint32_t index0 = 0; index0 < descriptorCopyCount; ++index0) { local_pDescriptorCopies[index0].initialize(&pDescriptorCopies[index0]); if (pDescriptorCopies[index0].srcSet) { - local_pDescriptorCopies[index0].srcSet = Unwrap(dev_data, pDescriptorCopies[index0].srcSet); + local_pDescriptorCopies[index0].srcSet = Unwrap(pDescriptorCopies[index0].srcSet); } if (pDescriptorCopies[index0].dstSet) { - local_pDescriptorCopies[index0].dstSet = Unwrap(dev_data, pDescriptorCopies[index0].dstSet); + local_pDescriptorCopies[index0].dstSet = Unwrap(pDescriptorCopies[index0].dstSet); } } } @@ -1548,11 +1554,11 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer( if (pCreateInfo) { local_pCreateInfo = new safe_VkFramebufferCreateInfo(pCreateInfo); if (pCreateInfo->renderPass) { - local_pCreateInfo->renderPass = Unwrap(dev_data, pCreateInfo->renderPass); + local_pCreateInfo->renderPass = Unwrap(pCreateInfo->renderPass); } if (local_pCreateInfo->pAttachments) { for (uint32_t index1 = 0; index1 < local_pCreateInfo->attachmentCount; ++index1) { - local_pCreateInfo->pAttachments[index1] = Unwrap(dev_data, local_pCreateInfo->pAttachments[index1]); + local_pCreateInfo->pAttachments[index1] = Unwrap(local_pCreateInfo->pAttachments[index1]); } } } @@ -1563,7 +1569,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pFramebuffer = WrapNew(dev_data, *pFramebuffer); + *pFramebuffer = WrapNew(*pFramebuffer); } return result; } @@ -1576,42 +1582,25 @@ VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t framebuffer_id = reinterpret_cast(framebuffer); - framebuffer = (VkFramebuffer)dev_data->unique_id_mapping[framebuffer_id]; - dev_data->unique_id_mapping.erase(framebuffer_id); + framebuffer = (VkFramebuffer)unique_id_mapping[framebuffer_id]; + unique_id_mapping.erase(framebuffer_id); lock.unlock(); dev_data->dispatch_table.DestroyFramebuffer(device, framebuffer, pAllocator); } +// Declare only VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkRenderPass* pRenderPass) -{ - layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - VkResult result = dev_data->dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); - if (VK_SUCCESS == result) { - std::lock_guard lock(global_lock); - *pRenderPass = WrapNew(dev_data, *pRenderPass); - } - return result; -} + VkRenderPass* pRenderPass); +// Declare only VKAPI_ATTR void VKAPI_CALL DestroyRenderPass( VkDevice device, VkRenderPass renderPass, - const VkAllocationCallbacks* pAllocator) -{ - layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - std::unique_lock lock(global_lock); - uint64_t renderPass_id = reinterpret_cast(renderPass); - renderPass = (VkRenderPass)dev_data->unique_id_mapping[renderPass_id]; - dev_data->unique_id_mapping.erase(renderPass_id); - lock.unlock(); - dev_data->dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); - -} + const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity( VkDevice device, @@ -1621,7 +1610,7 @@ VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - renderPass = Unwrap(dev_data, renderPass); + renderPass = Unwrap(renderPass); } dev_data->dispatch_table.GetRenderAreaGranularity(device, renderPass, pGranularity); @@ -1637,7 +1626,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool( VkResult result = dev_data->dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pCommandPool = WrapNew(dev_data, *pCommandPool); + *pCommandPool = WrapNew(*pCommandPool); } return result; } @@ -1650,8 +1639,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t commandPool_id = reinterpret_cast(commandPool); - commandPool = (VkCommandPool)dev_data->unique_id_mapping[commandPool_id]; - dev_data->unique_id_mapping.erase(commandPool_id); + commandPool = (VkCommandPool)unique_id_mapping[commandPool_id]; + unique_id_mapping.erase(commandPool_id); lock.unlock(); dev_data->dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); @@ -1665,7 +1654,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - commandPool = Unwrap(dev_data, commandPool); + commandPool = Unwrap(commandPool); } VkResult result = dev_data->dispatch_table.ResetCommandPool(device, commandPool, flags); @@ -1684,7 +1673,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers( if (pAllocateInfo) { local_pAllocateInfo = new safe_VkCommandBufferAllocateInfo(pAllocateInfo); if (pAllocateInfo->commandPool) { - local_pAllocateInfo->commandPool = Unwrap(dev_data, pAllocateInfo->commandPool); + local_pAllocateInfo->commandPool = Unwrap(pAllocateInfo->commandPool); } } } @@ -1704,7 +1693,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - commandPool = Unwrap(dev_data, commandPool); + commandPool = Unwrap(commandPool); } dev_data->dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); @@ -1722,10 +1711,10 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer( local_pBeginInfo = new safe_VkCommandBufferBeginInfo(pBeginInfo); if (local_pBeginInfo->pInheritanceInfo) { if (pBeginInfo->pInheritanceInfo->renderPass) { - local_pBeginInfo->pInheritanceInfo->renderPass = Unwrap(dev_data, pBeginInfo->pInheritanceInfo->renderPass); + local_pBeginInfo->pInheritanceInfo->renderPass = Unwrap(pBeginInfo->pInheritanceInfo->renderPass); } if (pBeginInfo->pInheritanceInfo->framebuffer) { - local_pBeginInfo->pInheritanceInfo->framebuffer = Unwrap(dev_data, pBeginInfo->pInheritanceInfo->framebuffer); + local_pBeginInfo->pInheritanceInfo->framebuffer = Unwrap(pBeginInfo->pInheritanceInfo->framebuffer); } } } @@ -1745,7 +1734,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - pipeline = Unwrap(dev_data, pipeline); + pipeline = Unwrap(pipeline); } dev_data->dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); @@ -1765,11 +1754,11 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets( VkDescriptorSet *local_pDescriptorSets = NULL; { std::lock_guard lock(global_lock); - layout = Unwrap(dev_data, layout); + layout = Unwrap(layout); if (pDescriptorSets) { local_pDescriptorSets = new VkDescriptorSet[descriptorSetCount]; for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { - local_pDescriptorSets[index0] = Unwrap(dev_data, pDescriptorSets[index0]); + local_pDescriptorSets[index0] = Unwrap(pDescriptorSets[index0]); } } } @@ -1787,7 +1776,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); + buffer = Unwrap(buffer); } dev_data->dispatch_table.CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); @@ -1807,7 +1796,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers( if (pBuffers) { local_pBuffers = new VkBuffer[bindingCount]; for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { - local_pBuffers[index0] = Unwrap(dev_data, pBuffers[index0]); + local_pBuffers[index0] = Unwrap(pBuffers[index0]); } } } @@ -1826,7 +1815,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); + buffer = Unwrap(buffer); } dev_data->dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); @@ -1842,7 +1831,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); + buffer = Unwrap(buffer); } dev_data->dispatch_table.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); @@ -1856,7 +1845,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); + buffer = Unwrap(buffer); } dev_data->dispatch_table.CmdDispatchIndirect(commandBuffer, buffer, offset); @@ -1872,8 +1861,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcBuffer = Unwrap(dev_data, srcBuffer); - dstBuffer = Unwrap(dev_data, dstBuffer); + srcBuffer = Unwrap(srcBuffer); + dstBuffer = Unwrap(dstBuffer); } dev_data->dispatch_table.CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); @@ -1891,8 +1880,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcImage = Unwrap(dev_data, srcImage); - dstImage = Unwrap(dev_data, dstImage); + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); } dev_data->dispatch_table.CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); @@ -1911,8 +1900,8 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcImage = Unwrap(dev_data, srcImage); - dstImage = Unwrap(dev_data, dstImage); + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); } dev_data->dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); @@ -1929,8 +1918,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcBuffer = Unwrap(dev_data, srcBuffer); - dstImage = Unwrap(dev_data, dstImage); + srcBuffer = Unwrap(srcBuffer); + dstImage = Unwrap(dstImage); } dev_data->dispatch_table.CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); @@ -1947,8 +1936,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcImage = Unwrap(dev_data, srcImage); - dstBuffer = Unwrap(dev_data, dstBuffer); + srcImage = Unwrap(srcImage); + dstBuffer = Unwrap(dstBuffer); } dev_data->dispatch_table.CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); @@ -1964,7 +1953,7 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - dstBuffer = Unwrap(dev_data, dstBuffer); + dstBuffer = Unwrap(dstBuffer); } dev_data->dispatch_table.CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); @@ -1980,7 +1969,7 @@ VKAPI_ATTR void VKAPI_CALL CmdFillBuffer( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - dstBuffer = Unwrap(dev_data, dstBuffer); + dstBuffer = Unwrap(dstBuffer); } dev_data->dispatch_table.CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); @@ -1997,7 +1986,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); + image = Unwrap(image); } dev_data->dispatch_table.CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); @@ -2014,7 +2003,7 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - image = Unwrap(dev_data, image); + image = Unwrap(image); } dev_data->dispatch_table.CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); @@ -2032,8 +2021,8 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - srcImage = Unwrap(dev_data, srcImage); - dstImage = Unwrap(dev_data, dstImage); + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); } dev_data->dispatch_table.CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); @@ -2047,7 +2036,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - event = Unwrap(dev_data, event); + event = Unwrap(event); } dev_data->dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); @@ -2061,7 +2050,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - event = Unwrap(dev_data, event); + event = Unwrap(event); } dev_data->dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); @@ -2089,7 +2078,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( if (pEvents) { local_pEvents = new VkEvent[eventCount]; for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pEvents[index0] = Unwrap(dev_data, pEvents[index0]); + local_pEvents[index0] = Unwrap(pEvents[index0]); } } if (pBufferMemoryBarriers) { @@ -2097,7 +2086,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); if (pBufferMemoryBarriers[index0].buffer) { - local_pBufferMemoryBarriers[index0].buffer = Unwrap(dev_data, pBufferMemoryBarriers[index0].buffer); + local_pBufferMemoryBarriers[index0].buffer = Unwrap(pBufferMemoryBarriers[index0].buffer); } } } @@ -2106,7 +2095,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents( for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); if (pImageMemoryBarriers[index0].image) { - local_pImageMemoryBarriers[index0].image = Unwrap(dev_data, pImageMemoryBarriers[index0].image); + local_pImageMemoryBarriers[index0].image = Unwrap(pImageMemoryBarriers[index0].image); } } } @@ -2144,7 +2133,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier( for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); if (pBufferMemoryBarriers[index0].buffer) { - local_pBufferMemoryBarriers[index0].buffer = Unwrap(dev_data, pBufferMemoryBarriers[index0].buffer); + local_pBufferMemoryBarriers[index0].buffer = Unwrap(pBufferMemoryBarriers[index0].buffer); } } } @@ -2153,7 +2142,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier( for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); if (pImageMemoryBarriers[index0].image) { - local_pImageMemoryBarriers[index0].image = Unwrap(dev_data, pImageMemoryBarriers[index0].image); + local_pImageMemoryBarriers[index0].image = Unwrap(pImageMemoryBarriers[index0].image); } } } @@ -2176,7 +2165,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); + queryPool = Unwrap(queryPool); } dev_data->dispatch_table.CmdBeginQuery(commandBuffer, queryPool, query, flags); @@ -2190,7 +2179,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); + queryPool = Unwrap(queryPool); } dev_data->dispatch_table.CmdEndQuery(commandBuffer, queryPool, query); @@ -2205,7 +2194,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); + queryPool = Unwrap(queryPool); } dev_data->dispatch_table.CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); @@ -2220,7 +2209,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); + queryPool = Unwrap(queryPool); } dev_data->dispatch_table.CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); @@ -2239,8 +2228,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - queryPool = Unwrap(dev_data, queryPool); - dstBuffer = Unwrap(dev_data, dstBuffer); + queryPool = Unwrap(queryPool); + dstBuffer = Unwrap(dstBuffer); } dev_data->dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); @@ -2257,7 +2246,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - layout = Unwrap(dev_data, layout); + layout = Unwrap(layout); } dev_data->dispatch_table.CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); @@ -2275,10 +2264,10 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass( if (pRenderPassBegin) { local_pRenderPassBegin = new safe_VkRenderPassBeginInfo(pRenderPassBegin); if (pRenderPassBegin->renderPass) { - local_pRenderPassBegin->renderPass = Unwrap(dev_data, pRenderPassBegin->renderPass); + local_pRenderPassBegin->renderPass = Unwrap(pRenderPassBegin->renderPass); } if (pRenderPassBegin->framebuffer) { - local_pRenderPassBegin->framebuffer = Unwrap(dev_data, pRenderPassBegin->framebuffer); + local_pRenderPassBegin->framebuffer = Unwrap(pRenderPassBegin->framebuffer); } } } @@ -2296,8 +2285,8 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); std::unique_lock lock(global_lock); uint64_t surface_id = reinterpret_cast(surface); - surface = (VkSurfaceKHR)dev_data->unique_id_mapping[surface_id]; - dev_data->unique_id_mapping.erase(surface_id); + surface = (VkSurfaceKHR)unique_id_mapping[surface_id]; + unique_id_mapping.erase(surface_id); lock.unlock(); dev_data->dispatch_table.DestroySurfaceKHR(instance, surface, pAllocator); @@ -2312,7 +2301,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); @@ -2327,7 +2316,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); @@ -2343,7 +2332,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); @@ -2359,7 +2348,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); @@ -2373,20 +2362,11 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR( const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); +// Declare only VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, - const VkAllocationCallbacks* pAllocator) -{ - layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - std::unique_lock lock(global_lock); - uint64_t swapchain_id = reinterpret_cast(swapchain); - swapchain = (VkSwapchainKHR)dev_data->unique_id_mapping[swapchain_id]; - dev_data->unique_id_mapping.erase(swapchain_id); - lock.unlock(); - dev_data->dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); - -} + const VkAllocationCallbacks* pAllocator); // Declare only VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR( @@ -2406,9 +2386,9 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - swapchain = Unwrap(dev_data, swapchain); - semaphore = Unwrap(dev_data, semaphore); - fence = Unwrap(dev_data, fence); + swapchain = Unwrap(swapchain); + semaphore = Unwrap(semaphore); + fence = Unwrap(fence); } VkResult result = dev_data->dispatch_table.AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); @@ -2431,7 +2411,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR( VkResult result = dev_data->dispatch_table.CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pMode = WrapNew(dev_data, *pMode); + *pMode = WrapNew(*pMode); } return result; } @@ -2449,7 +2429,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR( if (pCreateInfo) { local_pCreateInfo = new safe_VkDisplaySurfaceCreateInfoKHR(pCreateInfo); if (pCreateInfo->displayMode) { - local_pCreateInfo->displayMode = Unwrap(dev_data, pCreateInfo->displayMode); + local_pCreateInfo->displayMode = Unwrap(pCreateInfo->displayMode); } } } @@ -2459,7 +2439,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR( } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2484,7 +2464,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR( VkResult result = dev_data->dispatch_table.CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2502,7 +2482,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR( VkResult result = dev_data->dispatch_table.CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2520,7 +2500,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR( VkResult result = dev_data->dispatch_table.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2538,7 +2518,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMirSurfaceKHR( VkResult result = dev_data->dispatch_table.CreateMirSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2556,7 +2536,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR( VkResult result = dev_data->dispatch_table.CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2574,7 +2554,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR( VkResult result = dev_data->dispatch_table.CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -2588,7 +2568,7 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - commandPool = Unwrap(dev_data, commandPool); + commandPool = Unwrap(commandPool); } dev_data->dispatch_table.TrimCommandPoolKHR(device, commandPool, flags); @@ -2608,7 +2588,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR( if (pGetWin32HandleInfo) { local_pGetWin32HandleInfo = new safe_VkMemoryGetWin32HandleInfoKHR(pGetWin32HandleInfo); if (pGetWin32HandleInfo->memory) { - local_pGetWin32HandleInfo->memory = Unwrap(dev_data, pGetWin32HandleInfo->memory); + local_pGetWin32HandleInfo->memory = Unwrap(pGetWin32HandleInfo->memory); } } } @@ -2632,7 +2612,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR( if (pGetFdInfo) { local_pGetFdInfo = new safe_VkMemoryGetFdInfoKHR(pGetFdInfo); if (pGetFdInfo->memory) { - local_pGetFdInfo->memory = Unwrap(dev_data, pGetFdInfo->memory); + local_pGetFdInfo->memory = Unwrap(pGetFdInfo->memory); } } } @@ -2656,7 +2636,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR( if (pImportSemaphoreWin32HandleInfo) { local_pImportSemaphoreWin32HandleInfo = new safe_VkImportSemaphoreWin32HandleInfoKHR(pImportSemaphoreWin32HandleInfo); if (pImportSemaphoreWin32HandleInfo->semaphore) { - local_pImportSemaphoreWin32HandleInfo->semaphore = Unwrap(dev_data, pImportSemaphoreWin32HandleInfo->semaphore); + local_pImportSemaphoreWin32HandleInfo->semaphore = Unwrap(pImportSemaphoreWin32HandleInfo->semaphore); } } } @@ -2682,7 +2662,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR( if (pGetWin32HandleInfo) { local_pGetWin32HandleInfo = new safe_VkSemaphoreGetWin32HandleInfoKHR(pGetWin32HandleInfo); if (pGetWin32HandleInfo->semaphore) { - local_pGetWin32HandleInfo->semaphore = Unwrap(dev_data, pGetWin32HandleInfo->semaphore); + local_pGetWin32HandleInfo->semaphore = Unwrap(pGetWin32HandleInfo->semaphore); } } } @@ -2705,7 +2685,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR( if (pImportSemaphoreFdInfo) { local_pImportSemaphoreFdInfo = new safe_VkImportSemaphoreFdInfoKHR(pImportSemaphoreFdInfo); if (pImportSemaphoreFdInfo->semaphore) { - local_pImportSemaphoreFdInfo->semaphore = Unwrap(dev_data, pImportSemaphoreFdInfo->semaphore); + local_pImportSemaphoreFdInfo->semaphore = Unwrap(pImportSemaphoreFdInfo->semaphore); } } } @@ -2728,7 +2708,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR( if (pGetFdInfo) { local_pGetFdInfo = new safe_VkSemaphoreGetFdInfoKHR(pGetFdInfo); if (pGetFdInfo->semaphore) { - local_pGetFdInfo->semaphore = Unwrap(dev_data, pGetFdInfo->semaphore); + local_pGetFdInfo->semaphore = Unwrap(pGetFdInfo->semaphore); } } } @@ -2751,34 +2731,34 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR( safe_VkWriteDescriptorSet *local_pDescriptorWrites = NULL; { std::lock_guard lock(global_lock); - layout = Unwrap(dev_data, layout); + layout = Unwrap(layout); if (pDescriptorWrites) { local_pDescriptorWrites = new safe_VkWriteDescriptorSet[descriptorWriteCount]; for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); if (pDescriptorWrites[index0].dstSet) { - local_pDescriptorWrites[index0].dstSet = Unwrap(dev_data, pDescriptorWrites[index0].dstSet); + local_pDescriptorWrites[index0].dstSet = Unwrap(pDescriptorWrites[index0].dstSet); } if (local_pDescriptorWrites[index0].pImageInfo) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { - local_pDescriptorWrites[index0].pImageInfo[index1].sampler = Unwrap(dev_data, pDescriptorWrites[index0].pImageInfo[index1].sampler); + local_pDescriptorWrites[index0].pImageInfo[index1].sampler = Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); } if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { - local_pDescriptorWrites[index0].pImageInfo[index1].imageView = Unwrap(dev_data, pDescriptorWrites[index0].pImageInfo[index1].imageView); + local_pDescriptorWrites[index0].pImageInfo[index1].imageView = Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); } } } if (local_pDescriptorWrites[index0].pBufferInfo) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { - local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = Unwrap(dev_data, pDescriptorWrites[index0].pBufferInfo[index1].buffer); + local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); } } } if (local_pDescriptorWrites[index0].pTexelBufferView) { for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - local_pDescriptorWrites[index0].pTexelBufferView[index1] = Unwrap(dev_data, local_pDescriptorWrites[index0].pTexelBufferView[index1]); + local_pDescriptorWrites[index0].pTexelBufferView[index1] = Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); } } } @@ -2825,7 +2805,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - swapchain = Unwrap(dev_data, swapchain); + swapchain = Unwrap(swapchain); } VkResult result = dev_data->dispatch_table.GetSwapchainStatusKHR(device, swapchain); @@ -2845,7 +2825,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR( if (pImportFenceWin32HandleInfo) { local_pImportFenceWin32HandleInfo = new safe_VkImportFenceWin32HandleInfoKHR(pImportFenceWin32HandleInfo); if (pImportFenceWin32HandleInfo->fence) { - local_pImportFenceWin32HandleInfo->fence = Unwrap(dev_data, pImportFenceWin32HandleInfo->fence); + local_pImportFenceWin32HandleInfo->fence = Unwrap(pImportFenceWin32HandleInfo->fence); } } } @@ -2871,7 +2851,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR( if (pGetWin32HandleInfo) { local_pGetWin32HandleInfo = new safe_VkFenceGetWin32HandleInfoKHR(pGetWin32HandleInfo); if (pGetWin32HandleInfo->fence) { - local_pGetWin32HandleInfo->fence = Unwrap(dev_data, pGetWin32HandleInfo->fence); + local_pGetWin32HandleInfo->fence = Unwrap(pGetWin32HandleInfo->fence); } } } @@ -2894,7 +2874,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR( if (pImportFenceFdInfo) { local_pImportFenceFdInfo = new safe_VkImportFenceFdInfoKHR(pImportFenceFdInfo); if (pImportFenceFdInfo->fence) { - local_pImportFenceFdInfo->fence = Unwrap(dev_data, pImportFenceFdInfo->fence); + local_pImportFenceFdInfo->fence = Unwrap(pImportFenceFdInfo->fence); } } } @@ -2917,7 +2897,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR( if (pGetFdInfo) { local_pGetFdInfo = new safe_VkFenceGetFdInfoKHR(pGetFdInfo); if (pGetFdInfo->fence) { - local_pGetFdInfo->fence = Unwrap(dev_data, pGetFdInfo->fence); + local_pGetFdInfo->fence = Unwrap(pGetFdInfo->fence); } } } @@ -2940,7 +2920,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR( if (pSurfaceInfo) { local_pSurfaceInfo = new safe_VkPhysicalDeviceSurfaceInfo2KHR(pSurfaceInfo); if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = Unwrap(dev_data, pSurfaceInfo->surface); + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); } } } @@ -2964,7 +2944,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR( if (pSurfaceInfo) { local_pSurfaceInfo = new safe_VkPhysicalDeviceSurfaceInfo2KHR(pSurfaceInfo); if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = Unwrap(dev_data, pSurfaceInfo->surface); + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); } } } @@ -2987,7 +2967,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR( if (pInfo) { local_pInfo = new safe_VkImageMemoryRequirementsInfo2KHR(pInfo); if (pInfo->image) { - local_pInfo->image = Unwrap(dev_data, pInfo->image); + local_pInfo->image = Unwrap(pInfo->image); } } } @@ -3009,7 +2989,7 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR( if (pInfo) { local_pInfo = new safe_VkBufferMemoryRequirementsInfo2KHR(pInfo); if (pInfo->buffer) { - local_pInfo->buffer = Unwrap(dev_data, pInfo->buffer); + local_pInfo->buffer = Unwrap(pInfo->buffer); } } } @@ -3032,7 +3012,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR( if (pInfo) { local_pInfo = new safe_VkImageSparseMemoryRequirementsInfo2KHR(pInfo); if (pInfo->image) { - local_pInfo->image = Unwrap(dev_data, pInfo->image); + local_pInfo->image = Unwrap(pInfo->image); } } } @@ -3052,7 +3032,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR( VkResult result = dev_data->dispatch_table.CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pYcbcrConversion = WrapNew(dev_data, *pYcbcrConversion); + *pYcbcrConversion = WrapNew(*pYcbcrConversion); } return result; } @@ -3065,8 +3045,8 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t ycbcrConversion_id = reinterpret_cast(ycbcrConversion); - ycbcrConversion = (VkSamplerYcbcrConversionKHR)dev_data->unique_id_mapping[ycbcrConversion_id]; - dev_data->unique_id_mapping.erase(ycbcrConversion_id); + ycbcrConversion = (VkSamplerYcbcrConversionKHR)unique_id_mapping[ycbcrConversion_id]; + unique_id_mapping.erase(ycbcrConversion_id); lock.unlock(); dev_data->dispatch_table.DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); @@ -3086,10 +3066,10 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR( for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { local_pBindInfos[index0].initialize(&pBindInfos[index0]); if (pBindInfos[index0].buffer) { - local_pBindInfos[index0].buffer = Unwrap(dev_data, pBindInfos[index0].buffer); + local_pBindInfos[index0].buffer = Unwrap(pBindInfos[index0].buffer); } if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = Unwrap(dev_data, pBindInfos[index0].memory); + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); } } } @@ -3114,12 +3094,12 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR( local_pBindInfos = new safe_VkBindImageMemoryInfoKHR[bindInfoCount]; for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { local_pBindInfos[index0].initialize(&pBindInfos[index0]); - local_pBindInfos[index0].pNext = CreateUnwrappedExtensionStructs(dev_data, local_pBindInfos[index0].pNext); + local_pBindInfos[index0].pNext = CreateUnwrappedExtensionStructs(local_pBindInfos[index0].pNext); if (pBindInfos[index0].image) { - local_pBindInfos[index0].image = Unwrap(dev_data, pBindInfos[index0].image); + local_pBindInfos[index0].image = Unwrap(pBindInfos[index0].image); } if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = Unwrap(dev_data, pBindInfos[index0].memory); + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); } } } @@ -3156,8 +3136,8 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); - countBuffer = Unwrap(dev_data, countBuffer); + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); } dev_data->dispatch_table.CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); @@ -3175,13 +3155,31 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); { std::lock_guard lock(global_lock); - buffer = Unwrap(dev_data, buffer); - countBuffer = Unwrap(dev_data, countBuffer); + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); } dev_data->dispatch_table.CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } +VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo) +{ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + { + std::lock_guard lock(global_lock); + pipeline = Unwrap(pipeline); + } + VkResult result = dev_data->dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + + return result; +} + #ifdef VK_USE_PLATFORM_WIN32_KHR VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV( @@ -3193,7 +3191,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - memory = Unwrap(dev_data, memory); + memory = Unwrap(memory); } VkResult result = dev_data->dispatch_table.GetMemoryWin32HandleNV(device, memory, handleType, pHandle); @@ -3209,7 +3207,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHX( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetDeviceGroupSurfacePresentModesKHX(device, surface, pModes); @@ -3225,7 +3223,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHX( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDevicePresentRectanglesKHX(physicalDevice, surface, pRectCount, pRects); @@ -3244,13 +3242,13 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHX( if (pAcquireInfo) { local_pAcquireInfo = new safe_VkAcquireNextImageInfoKHX(pAcquireInfo); if (pAcquireInfo->swapchain) { - local_pAcquireInfo->swapchain = Unwrap(dev_data, pAcquireInfo->swapchain); + local_pAcquireInfo->swapchain = Unwrap(pAcquireInfo->swapchain); } if (pAcquireInfo->semaphore) { - local_pAcquireInfo->semaphore = Unwrap(dev_data, pAcquireInfo->semaphore); + local_pAcquireInfo->semaphore = Unwrap(pAcquireInfo->semaphore); } if (pAcquireInfo->fence) { - local_pAcquireInfo->fence = Unwrap(dev_data, pAcquireInfo->fence); + local_pAcquireInfo->fence = Unwrap(pAcquireInfo->fence); } } } @@ -3273,7 +3271,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN( VkResult result = dev_data->dispatch_table.CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -3290,23 +3288,23 @@ VKAPI_ATTR void VKAPI_CALL CmdProcessCommandsNVX( if (pProcessCommandsInfo) { local_pProcessCommandsInfo = new safe_VkCmdProcessCommandsInfoNVX(pProcessCommandsInfo); if (pProcessCommandsInfo->objectTable) { - local_pProcessCommandsInfo->objectTable = Unwrap(dev_data, pProcessCommandsInfo->objectTable); + local_pProcessCommandsInfo->objectTable = Unwrap(pProcessCommandsInfo->objectTable); } if (pProcessCommandsInfo->indirectCommandsLayout) { - local_pProcessCommandsInfo->indirectCommandsLayout = Unwrap(dev_data, pProcessCommandsInfo->indirectCommandsLayout); + local_pProcessCommandsInfo->indirectCommandsLayout = Unwrap(pProcessCommandsInfo->indirectCommandsLayout); } if (local_pProcessCommandsInfo->pIndirectCommandsTokens) { for (uint32_t index1 = 0; index1 < local_pProcessCommandsInfo->indirectCommandsTokenCount; ++index1) { if (pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer) { - local_pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer = Unwrap(dev_data, pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer); + local_pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer = Unwrap(pProcessCommandsInfo->pIndirectCommandsTokens[index1].buffer); } } } if (pProcessCommandsInfo->sequencesCountBuffer) { - local_pProcessCommandsInfo->sequencesCountBuffer = Unwrap(dev_data, pProcessCommandsInfo->sequencesCountBuffer); + local_pProcessCommandsInfo->sequencesCountBuffer = Unwrap(pProcessCommandsInfo->sequencesCountBuffer); } if (pProcessCommandsInfo->sequencesIndexBuffer) { - local_pProcessCommandsInfo->sequencesIndexBuffer = Unwrap(dev_data, pProcessCommandsInfo->sequencesIndexBuffer); + local_pProcessCommandsInfo->sequencesIndexBuffer = Unwrap(pProcessCommandsInfo->sequencesIndexBuffer); } } } @@ -3327,10 +3325,10 @@ VKAPI_ATTR void VKAPI_CALL CmdReserveSpaceForCommandsNVX( if (pReserveSpaceInfo) { local_pReserveSpaceInfo = new safe_VkCmdReserveSpaceForCommandsInfoNVX(pReserveSpaceInfo); if (pReserveSpaceInfo->objectTable) { - local_pReserveSpaceInfo->objectTable = Unwrap(dev_data, pReserveSpaceInfo->objectTable); + local_pReserveSpaceInfo->objectTable = Unwrap(pReserveSpaceInfo->objectTable); } if (pReserveSpaceInfo->indirectCommandsLayout) { - local_pReserveSpaceInfo->indirectCommandsLayout = Unwrap(dev_data, pReserveSpaceInfo->indirectCommandsLayout); + local_pReserveSpaceInfo->indirectCommandsLayout = Unwrap(pReserveSpaceInfo->indirectCommandsLayout); } } } @@ -3350,7 +3348,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNVX( VkResult result = dev_data->dispatch_table.CreateIndirectCommandsLayoutNVX(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pIndirectCommandsLayout = WrapNew(dev_data, *pIndirectCommandsLayout); + *pIndirectCommandsLayout = WrapNew(*pIndirectCommandsLayout); } return result; } @@ -3363,8 +3361,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNVX( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t indirectCommandsLayout_id = reinterpret_cast(indirectCommandsLayout); - indirectCommandsLayout = (VkIndirectCommandsLayoutNVX)dev_data->unique_id_mapping[indirectCommandsLayout_id]; - dev_data->unique_id_mapping.erase(indirectCommandsLayout_id); + indirectCommandsLayout = (VkIndirectCommandsLayoutNVX)unique_id_mapping[indirectCommandsLayout_id]; + unique_id_mapping.erase(indirectCommandsLayout_id); lock.unlock(); dev_data->dispatch_table.DestroyIndirectCommandsLayoutNVX(device, indirectCommandsLayout, pAllocator); @@ -3380,7 +3378,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateObjectTableNVX( VkResult result = dev_data->dispatch_table.CreateObjectTableNVX(device, pCreateInfo, pAllocator, pObjectTable); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pObjectTable = WrapNew(dev_data, *pObjectTable); + *pObjectTable = WrapNew(*pObjectTable); } return result; } @@ -3393,8 +3391,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyObjectTableNVX( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t objectTable_id = reinterpret_cast(objectTable); - objectTable = (VkObjectTableNVX)dev_data->unique_id_mapping[objectTable_id]; - dev_data->unique_id_mapping.erase(objectTable_id); + objectTable = (VkObjectTableNVX)unique_id_mapping[objectTable_id]; + unique_id_mapping.erase(objectTable_id); lock.unlock(); dev_data->dispatch_table.DestroyObjectTableNVX(device, objectTable, pAllocator); @@ -3410,7 +3408,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterObjectsNVX( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - objectTable = Unwrap(dev_data, objectTable); + objectTable = Unwrap(objectTable); } VkResult result = dev_data->dispatch_table.RegisterObjectsNVX(device, objectTable, objectCount, ppObjectTableEntries, pObjectIndices); @@ -3427,7 +3425,7 @@ VKAPI_ATTR VkResult VKAPI_CALL UnregisterObjectsNVX( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - objectTable = Unwrap(dev_data, objectTable); + objectTable = Unwrap(objectTable); } VkResult result = dev_data->dispatch_table.UnregisterObjectsNVX(device, objectTable, objectCount, pObjectEntryTypes, pObjectIndices); @@ -3441,7 +3439,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - display = Unwrap(dev_data, display); + display = Unwrap(display); } VkResult result = dev_data->dispatch_table.ReleaseDisplayEXT(physicalDevice, display); @@ -3458,7 +3456,7 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - display = Unwrap(dev_data, display); + display = Unwrap(display); } VkResult result = dev_data->dispatch_table.AcquireXlibDisplayEXT(physicalDevice, dpy, display); @@ -3478,7 +3476,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT( VkResult result = dev_data->dispatch_table.GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pDisplay = WrapNew(dev_data, *pDisplay); + *pDisplay = WrapNew(*pDisplay); } return result; } @@ -3492,7 +3490,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT( instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - surface = Unwrap(dev_data, surface); + surface = Unwrap(surface); } VkResult result = dev_data->dispatch_table.GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); @@ -3507,7 +3505,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - display = Unwrap(dev_data, display); + display = Unwrap(display); } VkResult result = dev_data->dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); @@ -3524,7 +3522,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT( VkResult result = dev_data->dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pFence = WrapNew(dev_data, *pFence); + *pFence = WrapNew(*pFence); } return result; } @@ -3540,7 +3538,7 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT( VkResult result = dev_data->dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pFence = WrapNew(dev_data, *pFence); + *pFence = WrapNew(*pFence); } return result; } @@ -3554,7 +3552,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - swapchain = Unwrap(dev_data, swapchain); + swapchain = Unwrap(swapchain); } VkResult result = dev_data->dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); @@ -3569,7 +3567,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - swapchain = Unwrap(dev_data, swapchain); + swapchain = Unwrap(swapchain); } VkResult result = dev_data->dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); @@ -3585,7 +3583,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - swapchain = Unwrap(dev_data, swapchain); + swapchain = Unwrap(swapchain); } VkResult result = dev_data->dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); @@ -3605,7 +3603,7 @@ VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( if (pSwapchains) { local_pSwapchains = new VkSwapchainKHR[swapchainCount]; for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { - local_pSwapchains[index0] = Unwrap(dev_data, pSwapchains[index0]); + local_pSwapchains[index0] = Unwrap(pSwapchains[index0]); } } } @@ -3626,7 +3624,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK( VkResult result = dev_data->dispatch_table.CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -3644,7 +3642,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( VkResult result = dev_data->dispatch_table.CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSurface = WrapNew(dev_data, *pSurface); + *pSurface = WrapNew(*pSurface); } return result; } @@ -3660,7 +3658,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT( VkResult result = dev_data->dispatch_table.CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pValidationCache = WrapNew(dev_data, *pValidationCache); + *pValidationCache = WrapNew(*pValidationCache); } return result; } @@ -3673,8 +3671,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); std::unique_lock lock(global_lock); uint64_t validationCache_id = reinterpret_cast(validationCache); - validationCache = (VkValidationCacheEXT)dev_data->unique_id_mapping[validationCache_id]; - dev_data->unique_id_mapping.erase(validationCache_id); + validationCache = (VkValidationCacheEXT)unique_id_mapping[validationCache_id]; + unique_id_mapping.erase(validationCache_id); lock.unlock(); dev_data->dispatch_table.DestroyValidationCacheEXT(device, validationCache, pAllocator); @@ -3690,11 +3688,11 @@ VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT( VkValidationCacheEXT *local_pSrcCaches = NULL; { std::lock_guard lock(global_lock); - dstCache = Unwrap(dev_data, dstCache); + dstCache = Unwrap(dstCache); if (pSrcCaches) { local_pSrcCaches = new VkValidationCacheEXT[srcCacheCount]; for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { - local_pSrcCaches[index0] = Unwrap(dev_data, pSrcCaches[index0]); + local_pSrcCaches[index0] = Unwrap(pSrcCaches[index0]); } } } @@ -3713,155 +3711,28 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); { std::lock_guard lock(global_lock); - validationCache = Unwrap(dev_data, validationCache); + validationCache = Unwrap(validationCache); } VkResult result = dev_data->dispatch_table.GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); return result; } -// Layer Device Extension Whitelist -static const char *kUniqueObjectsSupportedDeviceExtensions = -"VK_KHR_swapchain" -"VK_KHR_display_swapchain" -"VK_KHR_sampler_mirror_clamp_to_edge" -"VK_KHR_shader_draw_parameters" -"VK_KHR_maintenance1" -"VK_KHR_external_memory" -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_KHR_external_memory_win32" -#endif -"VK_KHR_external_memory_fd" -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_KHR_win32_keyed_mutex" -#endif -"VK_KHR_external_semaphore" -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_KHR_external_semaphore_win32" -#endif -"VK_KHR_external_semaphore_fd" -"VK_KHR_push_descriptor" -"VK_KHR_16bit_storage" -"VK_KHR_incremental_present" -"VK_KHR_descriptor_update_template" -"VK_KHR_shared_presentable_image" -"VK_KHR_external_fence" -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_KHR_external_fence_win32" -#endif -"VK_KHR_external_fence_fd" -"VK_KHR_maintenance2" -"VK_KHR_variable_pointers" -"VK_KHR_dedicated_allocation" -"VK_KHR_storage_buffer_storage_class" -"VK_KHR_relaxed_block_layout" -"VK_KHR_get_memory_requirements2" -"VK_KHR_image_format_list" -"VK_KHR_sampler_ycbcr_conversion" -"VK_KHR_bind_memory2" -"VK_NV_glsl_shader" -"VK_EXT_depth_range_unrestricted" -"VK_IMG_filter_cubic" -"VK_AMD_rasterization_order" -"VK_AMD_shader_trinary_minmax" -"VK_AMD_shader_explicit_vertex_parameter" -"VK_EXT_debug_marker" -"VK_AMD_gcn_shader" -"VK_NV_dedicated_allocation" -"VK_AMD_draw_indirect_count" -"VK_AMD_negative_viewport_height" -"VK_AMD_gpu_shader_half_float" -"VK_AMD_shader_ballot" -"VK_AMD_texture_gather_bias_lod" -"VK_AMD_shader_image_load_store_lod" -"VK_KHX_multiview" -"VK_IMG_format_pvrtc" -"VK_NV_external_memory" -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_NV_external_memory_win32" -#endif -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_NV_win32_keyed_mutex" -#endif -"VK_KHX_device_group" -"VK_EXT_shader_subgroup_ballot" -"VK_EXT_shader_subgroup_vote" -"VK_NVX_device_generated_commands" -"VK_NV_clip_space_w_scaling" -"VK_EXT_display_control" -"VK_GOOGLE_display_timing" -"VK_NV_sample_mask_override_coverage" -"VK_NV_geometry_shader_passthrough" -"VK_NV_viewport_array2" -"VK_NVX_multiview_per_view_attributes" -"VK_NV_viewport_swizzle" -"VK_EXT_discard_rectangles" -"VK_EXT_hdr_metadata" -"VK_EXT_sampler_filter_minmax" -"VK_AMD_gpu_shader_int16" -"VK_AMD_mixed_attachment_samples" -"VK_AMD_shader_fragment_mask" -"VK_EXT_shader_stencil_export" -"VK_EXT_sample_locations" -"VK_EXT_blend_operation_advanced" -"VK_NV_fragment_coverage_to_color" -"VK_NV_framebuffer_mixed_samples" -"VK_NV_fill_rectangle" -"VK_EXT_post_depth_coverage" -"VK_EXT_validation_cache" -"VK_EXT_shader_viewport_index_layer" -; - - -// Layer Instance Extension Whitelist -static const char *kUniqueObjectsSupportedInstanceExtensions = -"VK_KHR_surface" -"VK_KHR_display" -#ifdef VK_USE_PLATFORM_XLIB_KHR -"VK_KHR_xlib_surface" -#endif -#ifdef VK_USE_PLATFORM_XCB_KHR -"VK_KHR_xcb_surface" -#endif -#ifdef VK_USE_PLATFORM_WAYLAND_KHR -"VK_KHR_wayland_surface" -#endif -#ifdef VK_USE_PLATFORM_MIR_KHR -"VK_KHR_mir_surface" -#endif -#ifdef VK_USE_PLATFORM_ANDROID_KHR -"VK_KHR_android_surface" -#endif -#ifdef VK_USE_PLATFORM_WIN32_KHR -"VK_KHR_win32_surface" -#endif -"VK_KHR_get_physical_device_properties2" -"VK_KHR_external_memory_capabilities" -"VK_KHR_external_semaphore_capabilities" -"VK_KHR_external_fence_capabilities" -"VK_KHR_get_surface_capabilities2" -"VK_EXT_debug_report" -"VK_NV_external_memory_capabilities" -"VK_EXT_validation_flags" -#ifdef VK_USE_PLATFORM_VI_NN -"VK_NN_vi_surface" -#endif -"VK_KHX_device_group_creation" -"VK_EXT_direct_mode_display" -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT -"VK_EXT_acquire_xlib_display" -#endif -"VK_EXT_display_surface_counter" -"VK_EXT_swapchain_colorspace" -#ifdef VK_USE_PLATFORM_IOS_MVK -"VK_MVK_ios_surface" -#endif -#ifdef VK_USE_PLATFORM_MACOS_MVK -"VK_MVK_macos_surface" -#endif -; - +VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker) +{ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + { + std::lock_guard lock(global_lock); + dstBuffer = Unwrap(dstBuffer); + } + dev_data->dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); +} // Map of all APIs to be intercepted by this layer static const std::unordered_map name_to_funcptr_map = { {"vkCreateInstance", (void *)CreateInstance}, @@ -3934,8 +3805,8 @@ static const std::unordered_map name_to_funcptr_map = { {"vkUpdateDescriptorSets", (void*)UpdateDescriptorSets}, {"vkCreateFramebuffer", (void*)CreateFramebuffer}, {"vkDestroyFramebuffer", (void*)DestroyFramebuffer}, - {"vkCreateRenderPass", (void*)CreateRenderPass}, - {"vkDestroyRenderPass", (void*)DestroyRenderPass}, + {"vkCreateRenderPass", (void *)CreateRenderPass}, + {"vkDestroyRenderPass", (void *)DestroyRenderPass}, {"vkGetRenderAreaGranularity", (void*)GetRenderAreaGranularity}, {"vkCreateCommandPool", (void*)CreateCommandPool}, {"vkDestroyCommandPool", (void*)DestroyCommandPool}, @@ -3977,7 +3848,7 @@ static const std::unordered_map name_to_funcptr_map = { {"vkGetPhysicalDeviceSurfaceFormatsKHR", (void*)GetPhysicalDeviceSurfaceFormatsKHR}, {"vkGetPhysicalDeviceSurfacePresentModesKHR", (void*)GetPhysicalDeviceSurfacePresentModesKHR}, {"vkCreateSwapchainKHR", (void *)CreateSwapchainKHR}, - {"vkDestroySwapchainKHR", (void*)DestroySwapchainKHR}, + {"vkDestroySwapchainKHR", (void *)DestroySwapchainKHR}, {"vkGetSwapchainImagesKHR", (void *)GetSwapchainImagesKHR}, {"vkAcquireNextImageKHR", (void*)AcquireNextImageKHR}, {"vkQueuePresentKHR", (void *)QueuePresentKHR}, @@ -4042,6 +3913,7 @@ static const std::unordered_map name_to_funcptr_map = { {"vkDebugMarkerSetObjectNameEXT", (void *)DebugMarkerSetObjectNameEXT}, {"vkCmdDrawIndirectCountAMD", (void*)CmdDrawIndirectCountAMD}, {"vkCmdDrawIndexedIndirectCountAMD", (void*)CmdDrawIndexedIndirectCountAMD}, + {"vkGetShaderInfoAMD", (void*)GetShaderInfoAMD}, #ifdef VK_USE_PLATFORM_WIN32_KHR {"vkGetMemoryWin32HandleNV", (void*)GetMemoryWin32HandleNV}, #endif @@ -4084,6 +3956,7 @@ static const std::unordered_map name_to_funcptr_map = { {"vkDestroyValidationCacheEXT", (void*)DestroyValidationCacheEXT}, {"vkMergeValidationCachesEXT", (void*)MergeValidationCachesEXT}, {"vkGetValidationCacheDataEXT", (void*)GetValidationCacheDataEXT}, + {"vkCmdWriteBufferMarkerAMD", (void*)CmdWriteBufferMarkerAMD}, }; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_dispatch_table_helper.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_dispatch_table_helper.h index 7f1cfdc37d050ce82154268e22b228a89767b654..d7bb4446b094d3db027be377302643c666e7778f 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_dispatch_table_helper.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_dispatch_table_helper.h @@ -205,6 +205,7 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp table->CmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT) gpa(device, "vkCmdDebugMarkerInsertEXT"); table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD) gpa(device, "vkCmdDrawIndirectCountAMD"); table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD) gpa(device, "vkCmdDrawIndexedIndirectCountAMD"); + table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD) gpa(device, "vkGetShaderInfoAMD"); #ifdef VK_USE_PLATFORM_WIN32_KHR table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV) gpa(device, "vkGetMemoryWin32HandleNV"); #endif // VK_USE_PLATFORM_WIN32_KHR @@ -236,6 +237,8 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT) gpa(device, "vkDestroyValidationCacheEXT"); table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT) gpa(device, "vkMergeValidationCachesEXT"); table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT) gpa(device, "vkGetValidationCacheDataEXT"); + table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT) gpa(device, "vkGetMemoryHostPointerPropertiesEXT"); + table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD) gpa(device, "vkCmdWriteBufferMarkerAMD"); } diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_enum_string_helper.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_enum_string_helper.h index b80a0f2bfdb179b444507a9c3ff5f381980e50d7..c6e3c84b4aa070e295ba7e4376b193f266cf4da4 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_enum_string_helper.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_enum_string_helper.h @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -106,6 +107,8 @@ static inline const char* string_VkResult(VkResult input_value) return "VK_ERROR_OUT_OF_POOL_MEMORY_KHR"; case VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR: return "VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR"; + case VK_ERROR_NOT_PERMITTED_EXT: + return "VK_ERROR_NOT_PERMITTED_EXT"; default: return "Unhandled VkResult"; } @@ -413,6 +416,10 @@ static inline const char* string_VkStructureType(VkStructureType input_value) return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"; case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: return "VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT"; case VK_STRUCTURE_TYPE_HDR_METADATA_EXT: return "VK_STRUCTURE_TYPE_HDR_METADATA_EXT"; case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: @@ -513,6 +520,14 @@ static inline const char* string_VkStructureType(VkStructureType input_value) return "VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT"; case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: return "VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: + return "VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT"; + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: + return "VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT"; + case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT"; default: return "Unhandled VkStructureType"; } @@ -2579,6 +2594,12 @@ static inline const char* string_VkExternalMemoryHandleTypeFlagBitsKHR(VkExterna return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR"; case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR: return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT"; + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT: + return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT"; default: return "Unhandled VkExternalMemoryHandleTypeFlagBitsKHR"; } @@ -2837,8 +2858,8 @@ static inline const char* string_VkDebugReportObjectTypeEXT(VkDebugReportObjectT return "VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT"; case VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT: return "VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT"; - case VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT: - return "VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT"; + case VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT: + return "VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT"; case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT: return "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT"; case VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT: @@ -2880,6 +2901,21 @@ static inline const char* string_VkRasterizationOrderAMD(VkRasterizationOrderAMD } } +static inline const char* string_VkShaderInfoTypeAMD(VkShaderInfoTypeAMD input_value) +{ + switch ((VkShaderInfoTypeAMD)input_value) + { + case VK_SHADER_INFO_TYPE_STATISTICS_AMD: + return "VK_SHADER_INFO_TYPE_STATISTICS_AMD"; + case VK_SHADER_INFO_TYPE_BINARY_AMD: + return "VK_SHADER_INFO_TYPE_BINARY_AMD"; + case VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD: + return "VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD"; + default: + return "Unhandled VkShaderInfoTypeAMD"; + } +} + static inline const char* string_VkExternalMemoryHandleTypeFlagBitsNV(VkExternalMemoryHandleTypeFlagBitsNV input_value) { switch ((VkExternalMemoryHandleTypeFlagBitsNV)input_value) @@ -3130,6 +3166,21 @@ static inline const char* string_VkDiscardRectangleModeEXT(VkDiscardRectangleMod } } +static inline const char* string_VkConservativeRasterizationModeEXT(VkConservativeRasterizationModeEXT input_value) +{ + switch ((VkConservativeRasterizationModeEXT)input_value) + { + case VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT"; + case VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT"; + case VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT: + return "VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT"; + default: + return "Unhandled VkConservativeRasterizationModeEXT"; + } +} + static inline const char* string_VkSamplerReductionModeEXT(VkSamplerReductionModeEXT input_value) { switch ((VkSamplerReductionModeEXT)input_value) @@ -3188,6 +3239,23 @@ static inline const char* string_VkValidationCacheHeaderVersionEXT(VkValidationC } } +static inline const char* string_VkQueueGlobalPriorityEXT(VkQueueGlobalPriorityEXT input_value) +{ + switch ((VkQueueGlobalPriorityEXT)input_value) + { + case VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT"; + case VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT: + return "VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT"; + default: + return "Unhandled VkQueueGlobalPriorityEXT"; + } +} + static const char * GetPhysDevFeatureString(uint32_t index) { const char * IndexToPhysDevFeatureString[] = { "robustBufferAccess", diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_extension_helper.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_extension_helper.h index 88050cfb47a44ee3588d7b3cb8c630a1da879946..5a9a8cfd3e083e5b6e9b0a1803102204e8eaee1e 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_extension_helper.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_extension_helper.h @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -37,78 +38,78 @@ struct InstanceExtensions { - bool vk_khr_mir_surface{false}; - bool vk_ext_swapchain_color_space{false}; - bool vk_khr_get_physical_device_properties_2{false}; + bool vk_nn_vi_surface{false}; + bool vk_khr_xcb_surface{false}; + bool vk_khr_external_memory_capabilities{false}; + bool vk_khr_wayland_surface{false}; bool vk_khr_get_surface_capabilities_2{false}; + bool vk_khx_device_group_creation{false}; bool vk_mvk_macos_surface{false}; - bool vk_khr_wayland_surface{false}; - bool vk_nn_vi_surface{false}; - bool vk_khr_win32_surface{false}; - bool vk_khr_display{false}; - bool vk_ext_debug_report{false}; - bool vk_khr_xlib_surface{false}; + bool vk_ext_acquire_xlib_display{false}; bool vk_ext_direct_mode_display{false}; + bool vk_khr_win32_surface{false}; bool vk_khr_android_surface{false}; - bool vk_khr_external_fence_capabilities{false}; - bool vk_khr_xcb_surface{false}; + bool vk_khr_mir_surface{false}; bool vk_khr_surface{false}; - bool vk_ext_validation_flags{false}; bool vk_ext_display_surface_counter{false}; - bool vk_khr_external_memory_capabilities{false}; + bool vk_ext_validation_flags{false}; + bool vk_khr_external_fence_capabilities{false}; + bool vk_khr_get_physical_device_properties_2{false}; + bool vk_ext_debug_report{false}; bool vk_nv_external_memory_capabilities{false}; - bool vk_ext_acquire_xlib_display{false}; - bool vk_mvk_ios_surface{false}; + bool vk_khr_xlib_surface{false}; bool vk_khr_external_semaphore_capabilities{false}; - bool vk_khx_device_group_creation{false}; + bool vk_ext_swapchain_color_space{false}; + bool vk_mvk_ios_surface{false}; + bool vk_khr_display{false}; void InitFromInstanceCreateInfo(const VkInstanceCreateInfo *pCreateInfo) { static const std::pair known_extensions[]{ -#ifdef VK_USE_PLATFORM_MIR_KHR - {VK_KHR_MIR_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_mir_surface}, +#ifdef VK_USE_PLATFORM_VI_NN + {VK_NN_VI_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_nn_vi_surface}, #endif - {VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME, &InstanceExtensions::vk_ext_swapchain_color_space}, - {VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, &InstanceExtensions::vk_khr_get_physical_device_properties_2}, - {VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME, &InstanceExtensions::vk_khr_get_surface_capabilities_2}, -#ifdef VK_USE_PLATFORM_MACOS_MVK - {VK_MVK_MACOS_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_mvk_macos_surface}, +#ifdef VK_USE_PLATFORM_XCB_KHR + {VK_KHR_XCB_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_xcb_surface}, #endif + {VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_memory_capabilities}, #ifdef VK_USE_PLATFORM_WAYLAND_KHR {VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_wayland_surface}, #endif -#ifdef VK_USE_PLATFORM_VI_NN - {VK_NN_VI_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_nn_vi_surface}, + {VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME, &InstanceExtensions::vk_khr_get_surface_capabilities_2}, + {VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME, &InstanceExtensions::vk_khx_device_group_creation}, +#ifdef VK_USE_PLATFORM_MACOS_MVK + {VK_MVK_MACOS_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_mvk_macos_surface}, #endif +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + {VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_ext_acquire_xlib_display}, +#endif + {VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_ext_direct_mode_display}, #ifdef VK_USE_PLATFORM_WIN32_KHR {VK_KHR_WIN32_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_win32_surface}, #endif - {VK_KHR_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_khr_display}, - {VK_EXT_DEBUG_REPORT_EXTENSION_NAME, &InstanceExtensions::vk_ext_debug_report}, -#ifdef VK_USE_PLATFORM_XLIB_KHR - {VK_KHR_XLIB_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_xlib_surface}, -#endif - {VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_ext_direct_mode_display}, #ifdef VK_USE_PLATFORM_ANDROID_KHR {VK_KHR_ANDROID_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_android_surface}, #endif - {VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_fence_capabilities}, -#ifdef VK_USE_PLATFORM_XCB_KHR - {VK_KHR_XCB_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_xcb_surface}, +#ifdef VK_USE_PLATFORM_MIR_KHR + {VK_KHR_MIR_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_mir_surface}, #endif {VK_KHR_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_surface}, - {VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME, &InstanceExtensions::vk_ext_validation_flags}, {VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME, &InstanceExtensions::vk_ext_display_surface_counter}, - {VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_memory_capabilities}, + {VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME, &InstanceExtensions::vk_ext_validation_flags}, + {VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_fence_capabilities}, + {VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, &InstanceExtensions::vk_khr_get_physical_device_properties_2}, + {VK_EXT_DEBUG_REPORT_EXTENSION_NAME, &InstanceExtensions::vk_ext_debug_report}, {VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_nv_external_memory_capabilities}, -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - {VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_ext_acquire_xlib_display}, +#ifdef VK_USE_PLATFORM_XLIB_KHR + {VK_KHR_XLIB_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_khr_xlib_surface}, #endif + {VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_semaphore_capabilities}, + {VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME, &InstanceExtensions::vk_ext_swapchain_color_space}, #ifdef VK_USE_PLATFORM_IOS_MVK {VK_MVK_IOS_SURFACE_EXTENSION_NAME, &InstanceExtensions::vk_mvk_ios_surface}, #endif - {VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME, &InstanceExtensions::vk_khr_external_semaphore_capabilities}, - {VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME, &InstanceExtensions::vk_khx_device_group_creation}, + {VK_KHR_DISPLAY_EXTENSION_NAME, &InstanceExtensions::vk_khr_display}, }; // Initialize struct data @@ -124,202 +125,263 @@ struct InstanceExtensions { } }; +static const char * const kInstanceExtensionNames = +#ifdef VK_USE_PLATFORM_VI_NN + VK_NN_VI_SURFACE_EXTENSION_NAME +#endif +#ifdef VK_USE_PLATFORM_XCB_KHR + VK_KHR_XCB_SURFACE_EXTENSION_NAME +#endif + VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME +#endif + VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME + VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_MACOS_MVK + VK_MVK_MACOS_SURFACE_EXTENSION_NAME +#endif +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME +#endif + VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_KHR_WIN32_SURFACE_EXTENSION_NAME +#endif +#ifdef VK_USE_PLATFORM_ANDROID_KHR + VK_KHR_ANDROID_SURFACE_EXTENSION_NAME +#endif +#ifdef VK_USE_PLATFORM_MIR_KHR + VK_KHR_MIR_SURFACE_EXTENSION_NAME +#endif + VK_KHR_SURFACE_EXTENSION_NAME + VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME + VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME + VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME + VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME + VK_EXT_DEBUG_REPORT_EXTENSION_NAME + VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_XLIB_KHR + VK_KHR_XLIB_SURFACE_EXTENSION_NAME +#endif + VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME + VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_IOS_MVK + VK_MVK_IOS_SURFACE_EXTENSION_NAME +#endif + VK_KHR_DISPLAY_EXTENSION_NAME +; + struct DeviceExtensions : public InstanceExtensions { - bool vk_nv_geometry_shader_passthrough{false}; - bool vk_ext_shader_stencil_export{false}; - bool vk_khx_multiview{false}; - bool vk_khr_variable_pointers{false}; - bool vk_khx_device_group{false}; - bool vk_ext_hdr_metadata{false}; - bool vk_khr_display_swapchain{false}; - bool vk_nv_sample_mask_override_coverage{false}; - bool vk_khr_sampler_ycbcr_conversion{false}; - bool vk_khr_shader_draw_parameters{false}; - bool vk_nv_clip_space_w_scaling{false}; - bool vk_nv_win32_keyed_mutex{false}; - bool vk_nv_framebuffer_mixed_samples{false}; - bool vk_khr_external_semaphore{false}; + bool vk_khr_relaxed_block_layout{false}; + bool vk_ext_validation_cache{false}; + bool vk_nv_external_memory{false}; + bool vk_khr_push_descriptor{false}; + bool vk_amd_mixed_attachment_samples{false}; + bool vk_khr_maintenance1{false}; + bool vk_khr_dedicated_allocation{false}; + bool vk_ext_global_priority{false}; + bool vk_khr_incremental_present{false}; bool vk_nv_fragment_coverage_to_color{false}; - bool vk_nv_external_memory_win32{false}; bool vk_khr_16bit_storage{false}; - bool vk_ext_blend_operation_advanced{false}; - bool vk_ext_shader_subgroup_ballot{false}; - bool vk_img_format_pvrtc{false}; - bool vk_amd_shader_fragment_mask{false}; - bool vk_amd_shader_image_load_store_lod{false}; - bool vk_ext_shader_viewport_index_layer{false}; - bool vk_khr_external_fence_win32{false}; - bool vk_ext_sample_locations{false}; - bool vk_amd_negative_viewport_height{false}; - bool vk_khr_relaxed_block_layout{false}; - bool vk_nvx_multiview_per_view_attributes{false}; - bool vk_khr_maintenance2{false}; - bool vk_ext_display_control{false}; - bool vk_nvx_device_generated_commands{false}; + bool vk_ext_debug_marker{false}; + bool vk_nv_framebuffer_mixed_samples{false}; + bool vk_khr_get_memory_requirements_2{false}; + bool vk_khr_win32_keyed_mutex{false}; + bool vk_amd_shader_ballot{false}; bool vk_amd_texture_gather_bias_lod{false}; - bool vk_ext_validation_cache{false}; + bool vk_khr_shader_draw_parameters{false}; bool vk_ext_depth_range_unrestricted{false}; - bool vk_ext_debug_marker{false}; - bool vk_nv_glsl_shader{false}; - bool vk_nv_fill_rectangle{false}; - bool vk_amd_rasterization_order{false}; + bool vk_amd_shader_explicit_vertex_parameter{false}; + bool vk_nv_clip_space_w_scaling{false}; + bool vk_nv_sample_mask_override_coverage{false}; + bool vk_khx_device_group{false}; + bool vk_nv_viewport_swizzle{false}; + bool vk_nv_external_memory_win32{false}; bool vk_khr_external_memory{false}; - bool vk_khr_win32_keyed_mutex{false}; - bool vk_amd_draw_indirect_count{false}; - bool vk_khr_swapchain{false}; - bool vk_amd_gcn_shader{false}; - bool vk_amd_gpu_shader_half_float{false}; - bool vk_khr_external_fence_fd{false}; - bool vk_khr_maintenance1{false}; - bool vk_khr_external_semaphore_fd{false}; + bool vk_khr_display_swapchain{false}; + bool vk_amd_shader_fragment_mask{false}; + bool vk_ext_discard_rectangles{false}; + bool vk_ext_shader_subgroup_vote{false}; + bool vk_ext_external_memory_host{false}; bool vk_ext_sampler_filter_minmax{false}; - bool vk_amd_mixed_attachment_samples{false}; - bool vk_khr_get_memory_requirements_2{false}; - bool vk_khr_incremental_present{false}; - bool vk_nv_viewport_swizzle{false}; - bool vk_khr_external_semaphore_win32{false}; - bool vk_khr_push_descriptor{false}; - bool vk_khr_sampler_mirror_clamp_to_edge{false}; - bool vk_khr_external_memory_fd{false}; bool vk_khr_descriptor_update_template{false}; - bool vk_amd_shader_explicit_vertex_parameter{false}; - bool vk_amd_shader_ballot{false}; - bool vk_amd_gpu_shader_int16{false}; - bool vk_khr_external_memory_win32{false}; - bool vk_nv_external_memory{false}; + bool vk_img_filter_cubic{false}; + bool vk_ext_shader_viewport_index_layer{false}; bool vk_khr_storage_buffer_storage_class{false}; bool vk_ext_post_depth_coverage{false}; - bool vk_img_filter_cubic{false}; + bool vk_nv_dedicated_allocation{false}; + bool vk_ext_conservative_rasterization{false}; + bool vk_nv_glsl_shader{false}; + bool vk_khr_external_fence_win32{false}; bool vk_khr_shared_presentable_image{false}; - bool vk_khr_dedicated_allocation{false}; - bool vk_khr_bind_memory_2{false}; + bool vk_khr_external_semaphore_fd{false}; + bool vk_ext_blend_operation_advanced{false}; + bool vk_amd_shader_image_load_store_lod{false}; + bool vk_amd_gpu_shader_half_float{false}; + bool vk_khr_external_fence_fd{false}; + bool vk_ext_sample_locations{false}; + bool vk_nv_geometry_shader_passthrough{false}; + bool vk_ext_queue_family_foreign{false}; + bool vk_khr_external_semaphore{false}; bool vk_google_display_timing{false}; + bool vk_nv_fill_rectangle{false}; + bool vk_khr_sampler_mirror_clamp_to_edge{false}; bool vk_khr_external_fence{false}; + bool vk_khx_multiview{false}; + bool vk_img_format_pvrtc{false}; + bool vk_nvx_device_generated_commands{false}; + bool vk_khr_sampler_ycbcr_conversion{false}; + bool vk_ext_external_memory_dma_buf{false}; + bool vk_khr_external_memory_fd{false}; + bool vk_khr_external_memory_win32{false}; + bool vk_ext_shader_stencil_export{false}; + bool vk_nvx_multiview_per_view_attributes{false}; + bool vk_khr_image_format_list{false}; + bool vk_ext_shader_subgroup_ballot{false}; + bool vk_amd_gcn_shader{false}; + bool vk_ext_display_control{false}; + bool vk_khr_external_semaphore_win32{false}; bool vk_amd_shader_trinary_minmax{false}; - bool vk_ext_discard_rectangles{false}; + bool vk_amd_shader_info{false}; + bool vk_ext_hdr_metadata{false}; + bool vk_amd_draw_indirect_count{false}; + bool vk_khr_variable_pointers{false}; + bool vk_amd_rasterization_order{false}; bool vk_nv_viewport_array2{false}; - bool vk_khr_image_format_list{false}; - bool vk_nv_dedicated_allocation{false}; - bool vk_ext_shader_subgroup_vote{false}; + bool vk_nv_win32_keyed_mutex{false}; + bool vk_amd_negative_viewport_height{false}; + bool vk_khr_bind_memory_2{false}; + bool vk_amd_buffer_marker{false}; + bool vk_khr_maintenance2{false}; + bool vk_khr_swapchain{false}; + bool vk_amd_gpu_shader_int16{false}; void InitFromDeviceCreateInfo(const InstanceExtensions *instance_extensions, const VkDeviceCreateInfo *pCreateInfo) { static const std::pair known_extensions[]{ - {VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, &DeviceExtensions::vk_nv_geometry_shader_passthrough}, - {VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_stencil_export}, - {VK_KHX_MULTIVIEW_EXTENSION_NAME, &DeviceExtensions::vk_khx_multiview}, - {VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, &DeviceExtensions::vk_khr_variable_pointers}, - {VK_KHX_DEVICE_GROUP_EXTENSION_NAME, &DeviceExtensions::vk_khx_device_group}, - {VK_EXT_HDR_METADATA_EXTENSION_NAME, &DeviceExtensions::vk_ext_hdr_metadata}, - {VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, &DeviceExtensions::vk_khr_display_swapchain}, - {VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, &DeviceExtensions::vk_nv_sample_mask_override_coverage}, - {VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, &DeviceExtensions::vk_khr_sampler_ycbcr_conversion}, - {VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, &DeviceExtensions::vk_khr_shader_draw_parameters}, - {VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME, &DeviceExtensions::vk_nv_clip_space_w_scaling}, + {VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, &DeviceExtensions::vk_khr_relaxed_block_layout}, + {VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, &DeviceExtensions::vk_ext_validation_cache}, + {VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME, &DeviceExtensions::vk_nv_external_memory}, + {VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, &DeviceExtensions::vk_khr_push_descriptor}, + {VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME, &DeviceExtensions::vk_amd_mixed_attachment_samples}, + {VK_KHR_MAINTENANCE1_EXTENSION_NAME, &DeviceExtensions::vk_khr_maintenance1}, + {VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, &DeviceExtensions::vk_khr_dedicated_allocation}, + {VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME, &DeviceExtensions::vk_ext_global_priority}, + {VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, &DeviceExtensions::vk_khr_incremental_present}, + {VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME, &DeviceExtensions::vk_nv_fragment_coverage_to_color}, + {VK_KHR_16BIT_STORAGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_16bit_storage}, + {VK_EXT_DEBUG_MARKER_EXTENSION_NAME, &DeviceExtensions::vk_ext_debug_marker}, + {VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME, &DeviceExtensions::vk_nv_framebuffer_mixed_samples}, + {VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, &DeviceExtensions::vk_khr_get_memory_requirements_2}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME, &DeviceExtensions::vk_nv_win32_keyed_mutex}, + {VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME, &DeviceExtensions::vk_khr_win32_keyed_mutex}, #endif - {VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME, &DeviceExtensions::vk_nv_framebuffer_mixed_samples}, - {VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_semaphore}, - {VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME, &DeviceExtensions::vk_nv_fragment_coverage_to_color}, + {VK_AMD_SHADER_BALLOT_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_ballot}, + {VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME, &DeviceExtensions::vk_amd_texture_gather_bias_lod}, + {VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, &DeviceExtensions::vk_khr_shader_draw_parameters}, + {VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, &DeviceExtensions::vk_ext_depth_range_unrestricted}, + {VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_explicit_vertex_parameter}, + {VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME, &DeviceExtensions::vk_nv_clip_space_w_scaling}, + {VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, &DeviceExtensions::vk_nv_sample_mask_override_coverage}, + {VK_KHX_DEVICE_GROUP_EXTENSION_NAME, &DeviceExtensions::vk_khx_device_group}, + {VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME, &DeviceExtensions::vk_nv_viewport_swizzle}, #ifdef VK_USE_PLATFORM_WIN32_KHR {VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, &DeviceExtensions::vk_nv_external_memory_win32}, #endif - {VK_KHR_16BIT_STORAGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_16bit_storage}, - {VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, &DeviceExtensions::vk_ext_blend_operation_advanced}, - {VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_subgroup_ballot}, - {VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, &DeviceExtensions::vk_img_format_pvrtc}, + {VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory}, + {VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, &DeviceExtensions::vk_khr_display_swapchain}, {VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_fragment_mask}, - {VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_image_load_store_lod}, + {VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, &DeviceExtensions::vk_ext_discard_rectangles}, + {VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_subgroup_vote}, + {VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME, &DeviceExtensions::vk_ext_external_memory_host}, + {VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, &DeviceExtensions::vk_ext_sampler_filter_minmax}, + {VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, &DeviceExtensions::vk_khr_descriptor_update_template}, + {VK_IMG_FILTER_CUBIC_EXTENSION_NAME, &DeviceExtensions::vk_img_filter_cubic}, {VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_viewport_index_layer}, + {VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, &DeviceExtensions::vk_khr_storage_buffer_storage_class}, + {VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME, &DeviceExtensions::vk_ext_post_depth_coverage}, + {VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, &DeviceExtensions::vk_nv_dedicated_allocation}, + {VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME, &DeviceExtensions::vk_ext_conservative_rasterization}, + {VK_NV_GLSL_SHADER_EXTENSION_NAME, &DeviceExtensions::vk_nv_glsl_shader}, #ifdef VK_USE_PLATFORM_WIN32_KHR {VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_fence_win32}, #endif + {VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_shared_presentable_image}, + {VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_semaphore_fd}, + {VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, &DeviceExtensions::vk_ext_blend_operation_advanced}, + {VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_image_load_store_lod}, + {VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME, &DeviceExtensions::vk_amd_gpu_shader_half_float}, + {VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_fence_fd}, {VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, &DeviceExtensions::vk_ext_sample_locations}, - {VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME, &DeviceExtensions::vk_amd_negative_viewport_height}, - {VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, &DeviceExtensions::vk_khr_relaxed_block_layout}, - {VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME, &DeviceExtensions::vk_nvx_multiview_per_view_attributes}, - {VK_KHR_MAINTENANCE2_EXTENSION_NAME, &DeviceExtensions::vk_khr_maintenance2}, - {VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME, &DeviceExtensions::vk_ext_display_control}, - {VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME, &DeviceExtensions::vk_nvx_device_generated_commands}, - {VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME, &DeviceExtensions::vk_amd_texture_gather_bias_lod}, - {VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, &DeviceExtensions::vk_ext_validation_cache}, - {VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME, &DeviceExtensions::vk_ext_depth_range_unrestricted}, - {VK_EXT_DEBUG_MARKER_EXTENSION_NAME, &DeviceExtensions::vk_ext_debug_marker}, - {VK_NV_GLSL_SHADER_EXTENSION_NAME, &DeviceExtensions::vk_nv_glsl_shader}, + {VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, &DeviceExtensions::vk_nv_geometry_shader_passthrough}, + {VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, &DeviceExtensions::vk_ext_queue_family_foreign}, + {VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_semaphore}, + {VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, &DeviceExtensions::vk_google_display_timing}, {VK_NV_FILL_RECTANGLE_EXTENSION_NAME, &DeviceExtensions::vk_nv_fill_rectangle}, - {VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME, &DeviceExtensions::vk_amd_rasterization_order}, - {VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory}, + {VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_sampler_mirror_clamp_to_edge}, + {VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_fence}, + {VK_KHX_MULTIVIEW_EXTENSION_NAME, &DeviceExtensions::vk_khx_multiview}, + {VK_IMG_FORMAT_PVRTC_EXTENSION_NAME, &DeviceExtensions::vk_img_format_pvrtc}, + {VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME, &DeviceExtensions::vk_nvx_device_generated_commands}, + {VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, &DeviceExtensions::vk_khr_sampler_ycbcr_conversion}, + {VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, &DeviceExtensions::vk_ext_external_memory_dma_buf}, + {VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory_fd}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME, &DeviceExtensions::vk_khr_win32_keyed_mutex}, + {VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory_win32}, #endif - {VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME, &DeviceExtensions::vk_amd_draw_indirect_count}, - {VK_KHR_SWAPCHAIN_EXTENSION_NAME, &DeviceExtensions::vk_khr_swapchain}, + {VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_stencil_export}, + {VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME, &DeviceExtensions::vk_nvx_multiview_per_view_attributes}, + {VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, &DeviceExtensions::vk_khr_image_format_list}, + {VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_subgroup_ballot}, {VK_AMD_GCN_SHADER_EXTENSION_NAME, &DeviceExtensions::vk_amd_gcn_shader}, - {VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME, &DeviceExtensions::vk_amd_gpu_shader_half_float}, - {VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_fence_fd}, - {VK_KHR_MAINTENANCE1_EXTENSION_NAME, &DeviceExtensions::vk_khr_maintenance1}, - {VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_semaphore_fd}, - {VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, &DeviceExtensions::vk_ext_sampler_filter_minmax}, - {VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME, &DeviceExtensions::vk_amd_mixed_attachment_samples}, - {VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, &DeviceExtensions::vk_khr_get_memory_requirements_2}, - {VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, &DeviceExtensions::vk_khr_incremental_present}, - {VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME, &DeviceExtensions::vk_nv_viewport_swizzle}, + {VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME, &DeviceExtensions::vk_ext_display_control}, #ifdef VK_USE_PLATFORM_WIN32_KHR {VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_semaphore_win32}, #endif - {VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, &DeviceExtensions::vk_khr_push_descriptor}, - {VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_sampler_mirror_clamp_to_edge}, - {VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory_fd}, - {VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, &DeviceExtensions::vk_khr_descriptor_update_template}, - {VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_explicit_vertex_parameter}, - {VK_AMD_SHADER_BALLOT_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_ballot}, - {VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME, &DeviceExtensions::vk_amd_gpu_shader_int16}, + {VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_trinary_minmax}, + {VK_AMD_SHADER_INFO_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_info}, + {VK_EXT_HDR_METADATA_EXTENSION_NAME, &DeviceExtensions::vk_ext_hdr_metadata}, + {VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME, &DeviceExtensions::vk_amd_draw_indirect_count}, + {VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, &DeviceExtensions::vk_khr_variable_pointers}, + {VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME, &DeviceExtensions::vk_amd_rasterization_order}, + {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, &DeviceExtensions::vk_nv_viewport_array2}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_memory_win32}, + {VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME, &DeviceExtensions::vk_nv_win32_keyed_mutex}, #endif - {VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME, &DeviceExtensions::vk_nv_external_memory}, - {VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, &DeviceExtensions::vk_khr_storage_buffer_storage_class}, - {VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME, &DeviceExtensions::vk_ext_post_depth_coverage}, - {VK_IMG_FILTER_CUBIC_EXTENSION_NAME, &DeviceExtensions::vk_img_filter_cubic}, - {VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, &DeviceExtensions::vk_khr_shared_presentable_image}, - {VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, &DeviceExtensions::vk_khr_dedicated_allocation}, + {VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME, &DeviceExtensions::vk_amd_negative_viewport_height}, {VK_KHR_BIND_MEMORY_2_EXTENSION_NAME, &DeviceExtensions::vk_khr_bind_memory_2}, - {VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, &DeviceExtensions::vk_google_display_timing}, - {VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME, &DeviceExtensions::vk_khr_external_fence}, - {VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME, &DeviceExtensions::vk_amd_shader_trinary_minmax}, - {VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, &DeviceExtensions::vk_ext_discard_rectangles}, - {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, &DeviceExtensions::vk_nv_viewport_array2}, - {VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME, &DeviceExtensions::vk_khr_image_format_list}, - {VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, &DeviceExtensions::vk_nv_dedicated_allocation}, - {VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, &DeviceExtensions::vk_ext_shader_subgroup_vote}, + {VK_AMD_BUFFER_MARKER_EXTENSION_NAME, &DeviceExtensions::vk_amd_buffer_marker}, + {VK_KHR_MAINTENANCE2_EXTENSION_NAME, &DeviceExtensions::vk_khr_maintenance2}, + {VK_KHR_SWAPCHAIN_EXTENSION_NAME, &DeviceExtensions::vk_khr_swapchain}, + {VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME, &DeviceExtensions::vk_amd_gpu_shader_int16}, }; // Initialize struct data - vk_khr_mir_surface = instance_extensions->vk_khr_mir_surface; - vk_ext_swapchain_color_space = instance_extensions->vk_ext_swapchain_color_space; - vk_khr_get_physical_device_properties_2 = instance_extensions->vk_khr_get_physical_device_properties_2; + vk_nn_vi_surface = instance_extensions->vk_nn_vi_surface; + vk_khr_xcb_surface = instance_extensions->vk_khr_xcb_surface; + vk_khr_external_memory_capabilities = instance_extensions->vk_khr_external_memory_capabilities; + vk_khr_wayland_surface = instance_extensions->vk_khr_wayland_surface; vk_khr_get_surface_capabilities_2 = instance_extensions->vk_khr_get_surface_capabilities_2; + vk_khx_device_group_creation = instance_extensions->vk_khx_device_group_creation; vk_mvk_macos_surface = instance_extensions->vk_mvk_macos_surface; - vk_khr_wayland_surface = instance_extensions->vk_khr_wayland_surface; - vk_nn_vi_surface = instance_extensions->vk_nn_vi_surface; - vk_khr_win32_surface = instance_extensions->vk_khr_win32_surface; - vk_khr_display = instance_extensions->vk_khr_display; - vk_ext_debug_report = instance_extensions->vk_ext_debug_report; - vk_khr_xlib_surface = instance_extensions->vk_khr_xlib_surface; + vk_ext_acquire_xlib_display = instance_extensions->vk_ext_acquire_xlib_display; vk_ext_direct_mode_display = instance_extensions->vk_ext_direct_mode_display; + vk_khr_win32_surface = instance_extensions->vk_khr_win32_surface; vk_khr_android_surface = instance_extensions->vk_khr_android_surface; - vk_khr_external_fence_capabilities = instance_extensions->vk_khr_external_fence_capabilities; - vk_khr_xcb_surface = instance_extensions->vk_khr_xcb_surface; + vk_khr_mir_surface = instance_extensions->vk_khr_mir_surface; vk_khr_surface = instance_extensions->vk_khr_surface; - vk_ext_validation_flags = instance_extensions->vk_ext_validation_flags; vk_ext_display_surface_counter = instance_extensions->vk_ext_display_surface_counter; - vk_khr_external_memory_capabilities = instance_extensions->vk_khr_external_memory_capabilities; + vk_ext_validation_flags = instance_extensions->vk_ext_validation_flags; + vk_khr_external_fence_capabilities = instance_extensions->vk_khr_external_fence_capabilities; + vk_khr_get_physical_device_properties_2 = instance_extensions->vk_khr_get_physical_device_properties_2; + vk_ext_debug_report = instance_extensions->vk_ext_debug_report; vk_nv_external_memory_capabilities = instance_extensions->vk_nv_external_memory_capabilities; - vk_ext_acquire_xlib_display = instance_extensions->vk_ext_acquire_xlib_display; - vk_mvk_ios_surface = instance_extensions->vk_mvk_ios_surface; + vk_khr_xlib_surface = instance_extensions->vk_khr_xlib_surface; vk_khr_external_semaphore_capabilities = instance_extensions->vk_khr_external_semaphore_capabilities; - vk_khx_device_group_creation = instance_extensions->vk_khx_device_group_creation; + vk_ext_swapchain_color_space = instance_extensions->vk_ext_swapchain_color_space; + vk_mvk_ios_surface = instance_extensions->vk_mvk_ios_surface; + vk_khr_display = instance_extensions->vk_khr_display; for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { for (auto ext : known_extensions) { @@ -332,5 +394,103 @@ struct DeviceExtensions : public InstanceExtensions { } }; +static const char * const kDeviceExtensionNames = + VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME + VK_EXT_VALIDATION_CACHE_EXTENSION_NAME + VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME + VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME + VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME + VK_KHR_MAINTENANCE1_EXTENSION_NAME + VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME + VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME + VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME + VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME + VK_KHR_16BIT_STORAGE_EXTENSION_NAME + VK_EXT_DEBUG_MARKER_EXTENSION_NAME + VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME + VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME +#endif + VK_AMD_SHADER_BALLOT_EXTENSION_NAME + VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME + VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME + VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME + VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME + VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME + VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME + VK_KHX_DEVICE_GROUP_EXTENSION_NAME + VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME +#endif + VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME + VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME + VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME + VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME + VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME + VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME + VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME + VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME + VK_IMG_FILTER_CUBIC_EXTENSION_NAME + VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME + VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME + VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME + VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME + VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME + VK_NV_GLSL_SHADER_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME +#endif + VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME + VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME + VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME + VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME + VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME + VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME + VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME + VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME + VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME + VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME + VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME + VK_NV_FILL_RECTANGLE_EXTENSION_NAME + VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME + VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME + VK_KHX_MULTIVIEW_EXTENSION_NAME + VK_IMG_FORMAT_PVRTC_EXTENSION_NAME + VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME + VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME + VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME + VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME +#endif + VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME + VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME + VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME + VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME + VK_AMD_GCN_SHADER_EXTENSION_NAME + VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME +#endif + VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME + VK_AMD_SHADER_INFO_EXTENSION_NAME + VK_EXT_HDR_METADATA_EXTENSION_NAME + VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME + VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME + VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME + VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME +#ifdef VK_USE_PLATFORM_WIN32_KHR + VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME +#endif + VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME + VK_KHR_BIND_MEMORY_2_EXTENSION_NAME + VK_AMD_BUFFER_MARKER_EXTENSION_NAME + VK_KHR_MAINTENANCE2_EXTENSION_NAME + VK_KHR_SWAPCHAIN_EXTENSION_NAME + VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME +; + #endif // VK_EXTENSION_HELPER_H_ diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_layer_dispatch_table.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_layer_dispatch_table.h index dd5c85650e22e8e92bf3b6726d885ee09d4a2aed..d46b7d7b77e26c1c760999db74919283d87e4094 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_layer_dispatch_table.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_layer_dispatch_table.h @@ -393,6 +393,9 @@ typedef struct VkLayerDispatchTable_ { PFN_vkCmdDrawIndirectCountAMD CmdDrawIndirectCountAMD; PFN_vkCmdDrawIndexedIndirectCountAMD CmdDrawIndexedIndirectCountAMD; + // ---- VK_AMD_shader_info extension commands + PFN_vkGetShaderInfoAMD GetShaderInfoAMD; + // ---- VK_NV_external_memory_win32 extension commands #ifdef VK_USE_PLATFORM_WIN32_KHR PFN_vkGetMemoryWin32HandleNV GetMemoryWin32HandleNV; @@ -443,6 +446,12 @@ typedef struct VkLayerDispatchTable_ { PFN_vkDestroyValidationCacheEXT DestroyValidationCacheEXT; PFN_vkMergeValidationCachesEXT MergeValidationCachesEXT; PFN_vkGetValidationCacheDataEXT GetValidationCacheDataEXT; + + // ---- VK_EXT_external_memory_host extension commands + PFN_vkGetMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT; + + // ---- VK_AMD_buffer_marker extension commands + PFN_vkCmdWriteBufferMarkerAMD CmdWriteBufferMarkerAMD; } VkLayerDispatchTable; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.c b/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.c index a28bbbcedf00f756d3a2bfefcea6c61272c77ea9..a62270eb3525fd605a378e5d646dbd400199d893 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.c +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.c @@ -443,6 +443,9 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)gpa(dev, "vkCmdDrawIndirectCountAMD"); table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)gpa(dev, "vkCmdDrawIndexedIndirectCountAMD"); + // ---- VK_AMD_shader_info extension commands + table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)gpa(dev, "vkGetShaderInfoAMD"); + // ---- VK_NV_external_memory_win32 extension commands #ifdef VK_USE_PLATFORM_WIN32_KHR table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)gpa(dev, "vkGetMemoryWin32HandleNV"); @@ -493,6 +496,12 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)gpa(dev, "vkDestroyValidationCacheEXT"); table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)gpa(dev, "vkMergeValidationCachesEXT"); table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)gpa(dev, "vkGetValidationCacheDataEXT"); + + // ---- VK_EXT_external_memory_host extension commands + table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)gpa(dev, "vkGetMemoryHostPointerPropertiesEXT"); + + // ---- VK_AMD_buffer_marker extension commands + table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)gpa(dev, "vkCmdWriteBufferMarkerAMD"); } // Init Instance function pointer dispatch table with core commands @@ -865,6 +874,9 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis if (!strcmp(name, "CmdDrawIndirectCountAMD")) return (void *)table->CmdDrawIndirectCountAMD; if (!strcmp(name, "CmdDrawIndexedIndirectCountAMD")) return (void *)table->CmdDrawIndexedIndirectCountAMD; + // ---- VK_AMD_shader_info extension commands + if (!strcmp(name, "GetShaderInfoAMD")) return (void *)table->GetShaderInfoAMD; + // ---- VK_NV_external_memory_win32 extension commands #ifdef VK_USE_PLATFORM_WIN32_KHR if (!strcmp(name, "GetMemoryWin32HandleNV")) return (void *)table->GetMemoryWin32HandleNV; @@ -916,6 +928,12 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis if (!strcmp(name, "MergeValidationCachesEXT")) return (void *)table->MergeValidationCachesEXT; if (!strcmp(name, "GetValidationCacheDataEXT")) return (void *)table->GetValidationCacheDataEXT; + // ---- VK_EXT_external_memory_host extension commands + if (!strcmp(name, "GetMemoryHostPointerPropertiesEXT")) return (void *)table->GetMemoryHostPointerPropertiesEXT; + + // ---- VK_AMD_buffer_marker extension commands + if (!strcmp(name, "CmdWriteBufferMarkerAMD")) return (void *)table->CmdWriteBufferMarkerAMD; + return NULL; } @@ -1480,6 +1498,20 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD( } +// ---- VK_AMD_shader_info extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); +} + + // ---- VK_NV_external_memory_win32 extension trampoline/terminators #ifdef VK_USE_PLATFORM_WIN32_KHR @@ -1807,50 +1839,6 @@ VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT( } -// ---- VK_MVK_ios_surface extension trampoline/terminators - -#ifdef VK_USE_PLATFORM_IOS_MVK -VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK( - VkInstance instance, - const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) { -#error("Not implemented. Likely needs to be manually generated!"); - return disp->CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); -} - -VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateIOSSurfaceMVK( - VkInstance instance, - const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) { -#error("Not implemented. Likely needs to be manually generated!"); -} - -#endif // VK_USE_PLATFORM_IOS_MVK - -// ---- VK_MVK_macos_surface extension trampoline/terminators - -#ifdef VK_USE_PLATFORM_MACOS_MVK -VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK( - VkInstance instance, - const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) { -#error("Not implemented. Likely needs to be manually generated!"); - return disp->CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); -} - -VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMacOSSurfaceMVK( - VkInstance instance, - const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) { -#error("Not implemented. Likely needs to be manually generated!"); -} - -#endif // VK_USE_PLATFORM_MACOS_MVK - // ---- VK_EXT_sample_locations extension trampoline/terminators VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( @@ -1921,6 +1909,31 @@ VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( return disp->GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); } + +// ---- VK_EXT_external_memory_host extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); +} + + +// ---- VK_AMD_buffer_marker extension trampoline/terminators + +VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker) { + const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); + disp->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); +} + // GPA helpers for extensions bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *name, void **addr) { *addr = NULL; @@ -2182,6 +2195,12 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na return true; } + // ---- VK_AMD_shader_info extension commands + if (!strcmp("vkGetShaderInfoAMD", name)) { + *addr = (void *)GetShaderInfoAMD; + return true; + } + // ---- VK_NV_external_memory_capabilities extension commands if (!strcmp("vkGetPhysicalDeviceExternalImageFormatPropertiesNV", name)) { *addr = (ptr_instance->enabled_known_extensions.nv_external_memory_capabilities == 1) @@ -2364,26 +2383,6 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na return true; } - // ---- VK_MVK_ios_surface extension commands -#ifdef VK_USE_PLATFORM_IOS_MVK - if (!strcmp("vkCreateIOSSurfaceMVK", name)) { - *addr = (ptr_instance->enabled_known_extensions.mvk_ios_surface == 1) - ? (void *)CreateIOSSurfaceMVK - : NULL; - return true; - } -#endif // VK_USE_PLATFORM_IOS_MVK - - // ---- VK_MVK_macos_surface extension commands -#ifdef VK_USE_PLATFORM_MACOS_MVK - if (!strcmp("vkCreateMacOSSurfaceMVK", name)) { - *addr = (ptr_instance->enabled_known_extensions.mvk_macos_surface == 1) - ? (void *)CreateMacOSSurfaceMVK - : NULL; - return true; - } -#endif // VK_USE_PLATFORM_MACOS_MVK - // ---- VK_EXT_sample_locations extension commands if (!strcmp("vkCmdSetSampleLocationsEXT", name)) { *addr = (void *)CmdSetSampleLocationsEXT; @@ -2411,6 +2410,18 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na *addr = (void *)GetValidationCacheDataEXT; return true; } + + // ---- VK_EXT_external_memory_host extension commands + if (!strcmp("vkGetMemoryHostPointerPropertiesEXT", name)) { + *addr = (void *)GetMemoryHostPointerPropertiesEXT; + return true; + } + + // ---- VK_AMD_buffer_marker extension commands + if (!strcmp("vkCmdWriteBufferMarkerAMD", name)) { + *addr = (void *)CmdWriteBufferMarkerAMD; + return true; + } return false; } @@ -2465,18 +2476,6 @@ void extensions_create_instance(struct loader_instance *ptr_instance, const VkIn // ---- VK_EXT_display_surface_counter extension commands } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) { ptr_instance->enabled_known_extensions.ext_display_surface_counter = 1; - - // ---- VK_MVK_ios_surface extension commands -#ifdef VK_USE_PLATFORM_IOS_MVK - } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_MVK_IOS_SURFACE_EXTENSION_NAME)) { - ptr_instance->enabled_known_extensions.mvk_ios_surface = 1; -#endif // VK_USE_PLATFORM_IOS_MVK - - // ---- VK_MVK_macos_surface extension commands -#ifdef VK_USE_PLATFORM_MACOS_MVK - } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_MVK_MACOS_SURFACE_EXTENSION_NAME)) { - ptr_instance->enabled_known_extensions.mvk_macos_surface = 1; -#endif // VK_USE_PLATFORM_MACOS_MVK } } } diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.h index 626ab86503d9b680b612d9ce6cde4e99e9d5ff60..5f43c1afdbf0bc405f1147c313f3604f0b2b1aed 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_loader_extensions.h @@ -128,6 +128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice( const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateInstanceExtensionProperties( + const VkEnumerateInstanceExtensionPropertiesChain* chain, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); @@ -137,6 +138,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateDeviceExtensionProperties( uint32_t* pPropertyCount, VkExtensionProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateInstanceLayerProperties( + const VkEnumerateInstanceLayerPropertiesChain* chain, uint32_t* pPropertyCount, VkLayerProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateDeviceLayerProperties( @@ -331,8 +333,6 @@ union loader_instance_extension_enables { uint8_t ext_direct_mode_display : 1; uint8_t ext_acquire_xlib_display : 1; uint8_t ext_display_surface_counter : 1; - uint8_t mvk_ios_surface : 1; - uint8_t mvk_macos_surface : 1; }; uint64_t padding[4]; }; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_object_types.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_object_types.h index 6a766d97f1c0a10ca226ef4e4cc46ce46ab48458..2545c9ea84eac43d9fdc6e6731cb62553c689969 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_object_types.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_object_types.h @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -116,6 +117,7 @@ static const char * const object_string[kVulkanObjectTypeMax] = { // Helper array to get Vulkan VK_EXT_debug_report object type enum from the internal layers version const VkDebugReportObjectTypeEXT get_debug_report_enum[] = { + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, // No Match VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, // kVulkanObjectTypeInstance VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, // kVulkanObjectTypePhysicalDevice VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, // kVulkanObjectTypeDevice @@ -150,11 +152,12 @@ const VkDebugReportObjectTypeEXT get_debug_report_enum[] = { VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, // kVulkanObjectTypeDebugReportCallbackEXT VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT, // kVulkanObjectTypeObjectTableNVX VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, // kVulkanObjectTypeIndirectCommandsLayoutNVX - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, // No Match + VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, // kVulkanObjectTypeValidationCacheEXT }; // Helper array to get Official Vulkan VkObjectType enum from the internal layers version const VkObjectType get_object_type_enum[] = { + VK_OBJECT_TYPE_UNKNOWN, // No Match VK_OBJECT_TYPE_INSTANCE, // kVulkanObjectTypeInstance VK_OBJECT_TYPE_PHYSICAL_DEVICE, // kVulkanObjectTypePhysicalDevice VK_OBJECT_TYPE_DEVICE, // kVulkanObjectTypeDevice diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.cpp b/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.cpp index cb3a3c206675d1d31e3dc9afd0e917b23efb1ca5..76c32ee752094de09bc84dccf26f76f4cce5e425 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.cpp +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.cpp @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -2395,7 +2396,7 @@ void safe_VkPipelineTessellationStateCreateInfo::initialize(const safe_VkPipelin patchControlPoints = src->patchControlPoints; } -safe_VkPipelineViewportStateCreateInfo::safe_VkPipelineViewportStateCreateInfo(const VkPipelineViewportStateCreateInfo* in_struct) : +safe_VkPipelineViewportStateCreateInfo::safe_VkPipelineViewportStateCreateInfo(const VkPipelineViewportStateCreateInfo* in_struct, const bool is_dynamic_viewports, const bool is_dynamic_scissors) : sType(in_struct->sType), pNext(in_struct->pNext), flags(in_struct->flags), @@ -2404,14 +2405,18 @@ safe_VkPipelineViewportStateCreateInfo::safe_VkPipelineViewportStateCreateInfo(c scissorCount(in_struct->scissorCount), pScissors(nullptr) { - if (in_struct->pViewports) { + if (in_struct->pViewports && !is_dynamic_viewports) { pViewports = new VkViewport[in_struct->viewportCount]; memcpy ((void *)pViewports, (void *)in_struct->pViewports, sizeof(VkViewport)*in_struct->viewportCount); } - if (in_struct->pScissors) { + else + pViewports = NULL; + if (in_struct->pScissors && !is_dynamic_scissors) { pScissors = new VkRect2D[in_struct->scissorCount]; memcpy ((void *)pScissors, (void *)in_struct->pScissors, sizeof(VkRect2D)*in_struct->scissorCount); } + else + pScissors = NULL; } safe_VkPipelineViewportStateCreateInfo::safe_VkPipelineViewportStateCreateInfo() : @@ -2432,10 +2437,14 @@ safe_VkPipelineViewportStateCreateInfo::safe_VkPipelineViewportStateCreateInfo(c pViewports = new VkViewport[src.viewportCount]; memcpy ((void *)pViewports, (void *)src.pViewports, sizeof(VkViewport)*src.viewportCount); } + else + pViewports = NULL; if (src.pScissors) { pScissors = new VkRect2D[src.scissorCount]; memcpy ((void *)pScissors, (void *)src.pScissors, sizeof(VkRect2D)*src.scissorCount); } + else + pScissors = NULL; } safe_VkPipelineViewportStateCreateInfo& safe_VkPipelineViewportStateCreateInfo::operator=(const safe_VkPipelineViewportStateCreateInfo& src) @@ -2458,10 +2467,14 @@ safe_VkPipelineViewportStateCreateInfo& safe_VkPipelineViewportStateCreateInfo:: pViewports = new VkViewport[src.viewportCount]; memcpy ((void *)pViewports, (void *)src.pViewports, sizeof(VkViewport)*src.viewportCount); } + else + pViewports = NULL; if (src.pScissors) { pScissors = new VkRect2D[src.scissorCount]; memcpy ((void *)pScissors, (void *)src.pScissors, sizeof(VkRect2D)*src.scissorCount); } + else + pScissors = NULL; return *this; } @@ -2474,7 +2487,7 @@ safe_VkPipelineViewportStateCreateInfo::~safe_VkPipelineViewportStateCreateInfo( delete[] pScissors; } -void safe_VkPipelineViewportStateCreateInfo::initialize(const VkPipelineViewportStateCreateInfo* in_struct) +void safe_VkPipelineViewportStateCreateInfo::initialize(const VkPipelineViewportStateCreateInfo* in_struct, const bool is_dynamic_viewports, const bool is_dynamic_scissors) { sType = in_struct->sType; pNext = in_struct->pNext; @@ -2483,14 +2496,18 @@ void safe_VkPipelineViewportStateCreateInfo::initialize(const VkPipelineViewport pViewports = nullptr; scissorCount = in_struct->scissorCount; pScissors = nullptr; - if (in_struct->pViewports) { + if (in_struct->pViewports && !is_dynamic_viewports) { pViewports = new VkViewport[in_struct->viewportCount]; memcpy ((void *)pViewports, (void *)in_struct->pViewports, sizeof(VkViewport)*in_struct->viewportCount); } - if (in_struct->pScissors) { + else + pViewports = NULL; + if (in_struct->pScissors && !is_dynamic_scissors) { pScissors = new VkRect2D[in_struct->scissorCount]; memcpy ((void *)pScissors, (void *)in_struct->pScissors, sizeof(VkRect2D)*in_struct->scissorCount); } + else + pScissors = NULL; } void safe_VkPipelineViewportStateCreateInfo::initialize(const safe_VkPipelineViewportStateCreateInfo* src) @@ -2506,10 +2523,14 @@ void safe_VkPipelineViewportStateCreateInfo::initialize(const safe_VkPipelineVie pViewports = new VkViewport[src->viewportCount]; memcpy ((void *)pViewports, (void *)src->pViewports, sizeof(VkViewport)*src->viewportCount); } + else + pViewports = NULL; if (src->pScissors) { pScissors = new VkRect2D[src->scissorCount]; memcpy ((void *)pScissors, (void *)src->pScissors, sizeof(VkRect2D)*src->scissorCount); } + else + pScissors = NULL; } safe_VkPipelineRasterizationStateCreateInfo::safe_VkPipelineRasterizationStateCreateInfo(const VkPipelineRasterizationStateCreateInfo* in_struct) : @@ -2987,7 +3008,7 @@ void safe_VkPipelineDynamicStateCreateInfo::initialize(const safe_VkPipelineDyna } } -safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const VkGraphicsPipelineCreateInfo* in_struct) : +safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const VkGraphicsPipelineCreateInfo* in_struct, const bool uses_color_attachment, const bool uses_depthstencil_attachment) : sType(in_struct->sType), pNext(in_struct->pNext), flags(in_struct->flags), @@ -3013,30 +3034,48 @@ safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const VkGra pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(in_struct->pInputAssemblyState); else pInputAssemblyState = NULL; - if (in_struct->pTessellationState) + bool has_tessellation_stage = false; + if (stageCount && pStages) + for (uint32_t i=0; ipTessellationState && has_tessellation_stage) pTessellationState = new safe_VkPipelineTessellationStateCreateInfo(in_struct->pTessellationState); else - pTessellationState = NULL; - if (in_struct->pViewportState) - pViewportState = new safe_VkPipelineViewportStateCreateInfo(in_struct->pViewportState); - else - pViewportState = NULL; + pTessellationState = NULL; // original pTessellationState pointer ignored + bool has_rasterization = in_struct->pRasterizationState ? !in_struct->pRasterizationState->rasterizerDiscardEnable : false; + if (in_struct->pViewportState && has_rasterization) { + bool is_dynamic_viewports = false; + bool is_dynamic_scissors = false; + if (in_struct->pDynamicState && in_struct->pDynamicState->pDynamicStates) { + for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_viewports; ++i) + if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_VIEWPORT) + is_dynamic_viewports = true; + for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_scissors; ++i) + if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_SCISSOR) + is_dynamic_scissors = true; + } + pViewportState = new safe_VkPipelineViewportStateCreateInfo(in_struct->pViewportState, is_dynamic_viewports, is_dynamic_scissors); + } else + pViewportState = NULL; // original pViewportState pointer ignored if (in_struct->pRasterizationState) pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(in_struct->pRasterizationState); else pRasterizationState = NULL; - if (in_struct->pMultisampleState) + if (in_struct->pMultisampleState && has_rasterization) pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(in_struct->pMultisampleState); else - pMultisampleState = NULL; - if (in_struct->pDepthStencilState) + pMultisampleState = NULL; // original pMultisampleState pointer ignored + // needs a tracked subpass state uses_depthstencil_attachment + if (in_struct->pDepthStencilState && has_rasterization && uses_depthstencil_attachment) pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(in_struct->pDepthStencilState); else - pDepthStencilState = NULL; - if (in_struct->pColorBlendState) + pDepthStencilState = NULL; // original pDepthStencilState pointer ignored + // needs a tracked subpass state usesColorAttachment + if (in_struct->pColorBlendState && has_rasterization && uses_color_attachment) pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(in_struct->pColorBlendState); else - pColorBlendState = NULL; + pColorBlendState = NULL; // original pColorBlendState pointer ignored if (in_struct->pDynamicState) pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(in_struct->pDynamicState); else @@ -3073,30 +3112,36 @@ safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const safe_ pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(*src.pInputAssemblyState); else pInputAssemblyState = NULL; - if (src.pTessellationState) + bool has_tessellation_stage = false; + if (stageCount && pStages) + for (uint32_t i=0; irasterizerDiscardEnable : false; + if (src.pViewportState && has_rasterization) { pViewportState = new safe_VkPipelineViewportStateCreateInfo(*src.pViewportState); - else - pViewportState = NULL; + } else + pViewportState = NULL; // original pViewportState pointer ignored if (src.pRasterizationState) pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(*src.pRasterizationState); else pRasterizationState = NULL; - if (src.pMultisampleState) + if (src.pMultisampleState && has_rasterization) pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(*src.pMultisampleState); else - pMultisampleState = NULL; - if (src.pDepthStencilState) + pMultisampleState = NULL; // original pMultisampleState pointer ignored + if (src.pDepthStencilState && has_rasterization) pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(*src.pDepthStencilState); else - pDepthStencilState = NULL; - if (src.pColorBlendState) + pDepthStencilState = NULL; // original pDepthStencilState pointer ignored + if (src.pColorBlendState && has_rasterization) pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(*src.pColorBlendState); else - pColorBlendState = NULL; + pColorBlendState = NULL; // original pColorBlendState pointer ignored if (src.pDynamicState) pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(*src.pDynamicState); else @@ -3152,30 +3197,36 @@ safe_VkGraphicsPipelineCreateInfo& safe_VkGraphicsPipelineCreateInfo::operator=( pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(*src.pInputAssemblyState); else pInputAssemblyState = NULL; - if (src.pTessellationState) + bool has_tessellation_stage = false; + if (stageCount && pStages) + for (uint32_t i=0; irasterizerDiscardEnable : false; + if (src.pViewportState && has_rasterization) { pViewportState = new safe_VkPipelineViewportStateCreateInfo(*src.pViewportState); - else - pViewportState = NULL; + } else + pViewportState = NULL; // original pViewportState pointer ignored if (src.pRasterizationState) pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(*src.pRasterizationState); else pRasterizationState = NULL; - if (src.pMultisampleState) + if (src.pMultisampleState && has_rasterization) pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(*src.pMultisampleState); else - pMultisampleState = NULL; - if (src.pDepthStencilState) + pMultisampleState = NULL; // original pMultisampleState pointer ignored + if (src.pDepthStencilState && has_rasterization) pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(*src.pDepthStencilState); else - pDepthStencilState = NULL; - if (src.pColorBlendState) + pDepthStencilState = NULL; // original pDepthStencilState pointer ignored + if (src.pColorBlendState && has_rasterization) pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(*src.pColorBlendState); else - pColorBlendState = NULL; + pColorBlendState = NULL; // original pColorBlendState pointer ignored if (src.pDynamicState) pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(*src.pDynamicState); else @@ -3208,7 +3259,7 @@ safe_VkGraphicsPipelineCreateInfo::~safe_VkGraphicsPipelineCreateInfo() delete pDynamicState; } -void safe_VkGraphicsPipelineCreateInfo::initialize(const VkGraphicsPipelineCreateInfo* in_struct) +void safe_VkGraphicsPipelineCreateInfo::initialize(const VkGraphicsPipelineCreateInfo* in_struct, const bool uses_color_attachment, const bool uses_depthstencil_attachment) { sType = in_struct->sType; pNext = in_struct->pNext; @@ -3234,30 +3285,48 @@ void safe_VkGraphicsPipelineCreateInfo::initialize(const VkGraphicsPipelineCreat pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(in_struct->pInputAssemblyState); else pInputAssemblyState = NULL; - if (in_struct->pTessellationState) + bool has_tessellation_stage = false; + if (stageCount && pStages) + for (uint32_t i=0; ipTessellationState && has_tessellation_stage) pTessellationState = new safe_VkPipelineTessellationStateCreateInfo(in_struct->pTessellationState); else - pTessellationState = NULL; - if (in_struct->pViewportState) - pViewportState = new safe_VkPipelineViewportStateCreateInfo(in_struct->pViewportState); - else - pViewportState = NULL; + pTessellationState = NULL; // original pTessellationState pointer ignored + bool has_rasterization = in_struct->pRasterizationState ? !in_struct->pRasterizationState->rasterizerDiscardEnable : false; + if (in_struct->pViewportState && has_rasterization) { + bool is_dynamic_viewports = false; + bool is_dynamic_scissors = false; + if (in_struct->pDynamicState && in_struct->pDynamicState->pDynamicStates) { + for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_viewports; ++i) + if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_VIEWPORT) + is_dynamic_viewports = true; + for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_scissors; ++i) + if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_SCISSOR) + is_dynamic_scissors = true; + } + pViewportState = new safe_VkPipelineViewportStateCreateInfo(in_struct->pViewportState, is_dynamic_viewports, is_dynamic_scissors); + } else + pViewportState = NULL; // original pViewportState pointer ignored if (in_struct->pRasterizationState) pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(in_struct->pRasterizationState); else pRasterizationState = NULL; - if (in_struct->pMultisampleState) + if (in_struct->pMultisampleState && has_rasterization) pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(in_struct->pMultisampleState); else - pMultisampleState = NULL; - if (in_struct->pDepthStencilState) + pMultisampleState = NULL; // original pMultisampleState pointer ignored + // needs a tracked subpass state uses_depthstencil_attachment + if (in_struct->pDepthStencilState && has_rasterization && uses_depthstencil_attachment) pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(in_struct->pDepthStencilState); else - pDepthStencilState = NULL; - if (in_struct->pColorBlendState) + pDepthStencilState = NULL; // original pDepthStencilState pointer ignored + // needs a tracked subpass state usesColorAttachment + if (in_struct->pColorBlendState && has_rasterization && uses_color_attachment) pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(in_struct->pColorBlendState); else - pColorBlendState = NULL; + pColorBlendState = NULL; // original pColorBlendState pointer ignored if (in_struct->pDynamicState) pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(in_struct->pDynamicState); else @@ -3290,30 +3359,36 @@ void safe_VkGraphicsPipelineCreateInfo::initialize(const safe_VkGraphicsPipeline pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(*src->pInputAssemblyState); else pInputAssemblyState = NULL; - if (src->pTessellationState) + bool has_tessellation_stage = false; + if (stageCount && pStages) + for (uint32_t i=0; ipTessellationState && has_tessellation_stage) pTessellationState = new safe_VkPipelineTessellationStateCreateInfo(*src->pTessellationState); else - pTessellationState = NULL; - if (src->pViewportState) + pTessellationState = NULL; // original pTessellationState pointer ignored + bool has_rasterization = src->pRasterizationState ? !src->pRasterizationState->rasterizerDiscardEnable : false; + if (src->pViewportState && has_rasterization) { pViewportState = new safe_VkPipelineViewportStateCreateInfo(*src->pViewportState); - else - pViewportState = NULL; + } else + pViewportState = NULL; // original pViewportState pointer ignored if (src->pRasterizationState) pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(*src->pRasterizationState); else pRasterizationState = NULL; - if (src->pMultisampleState) + if (src->pMultisampleState && has_rasterization) pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(*src->pMultisampleState); else - pMultisampleState = NULL; - if (src->pDepthStencilState) + pMultisampleState = NULL; // original pMultisampleState pointer ignored + if (src->pDepthStencilState && has_rasterization) pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(*src->pDepthStencilState); else - pDepthStencilState = NULL; - if (src->pColorBlendState) + pDepthStencilState = NULL; // original pDepthStencilState pointer ignored + if (src->pColorBlendState && has_rasterization) pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(*src->pColorBlendState); else - pColorBlendState = NULL; + pColorBlendState = NULL; // original pColorBlendState pointer ignored if (src->pDynamicState) pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(*src->pDynamicState); else @@ -3643,7 +3718,8 @@ safe_VkDescriptorSetLayoutBinding::safe_VkDescriptorSetLayoutBinding(const VkDes stageFlags(in_struct->stageFlags), pImmutableSamplers(nullptr) { - if (descriptorCount && in_struct->pImmutableSamplers) { + const bool sampler_type = in_struct->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || in_struct->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + if (descriptorCount && in_struct->pImmutableSamplers && sampler_type) { pImmutableSamplers = new VkSampler[descriptorCount]; for (uint32_t i=0; ipImmutableSamplers[i]; @@ -3662,7 +3738,8 @@ safe_VkDescriptorSetLayoutBinding::safe_VkDescriptorSetLayoutBinding(const safe_ descriptorCount = src.descriptorCount; stageFlags = src.stageFlags; pImmutableSamplers = nullptr; - if (descriptorCount && src.pImmutableSamplers) { + const bool sampler_type = src.descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || src.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + if (descriptorCount && src.pImmutableSamplers && sampler_type) { pImmutableSamplers = new VkSampler[descriptorCount]; for (uint32_t i=0; idescriptorCount; stageFlags = in_struct->stageFlags; pImmutableSamplers = nullptr; - if (descriptorCount && in_struct->pImmutableSamplers) { + const bool sampler_type = in_struct->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || in_struct->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + if (descriptorCount && in_struct->pImmutableSamplers && sampler_type) { pImmutableSamplers = new VkSampler[descriptorCount]; for (uint32_t i=0; ipImmutableSamplers[i]; @@ -3720,7 +3799,8 @@ void safe_VkDescriptorSetLayoutBinding::initialize(const safe_VkDescriptorSetLay descriptorCount = src->descriptorCount; stageFlags = src->stageFlags; pImmutableSamplers = nullptr; - if (descriptorCount && src->pImmutableSamplers) { + const bool sampler_type = src->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || src->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + if (descriptorCount && src->pImmutableSamplers && sampler_type) { pImmutableSamplers = new VkSampler[descriptorCount]; for (uint32_t i=0; ipImmutableSamplers[i]; @@ -13891,6 +13971,150 @@ void safe_VkPipelineDiscardRectangleStateCreateInfoEXT::initialize(const safe_Vk } } +safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + primitiveOverestimationSize(in_struct->primitiveOverestimationSize), + maxExtraPrimitiveOverestimationSize(in_struct->maxExtraPrimitiveOverestimationSize), + extraPrimitiveOverestimationSizeGranularity(in_struct->extraPrimitiveOverestimationSizeGranularity), + primitiveUnderestimation(in_struct->primitiveUnderestimation), + conservativePointAndLineRasterization(in_struct->conservativePointAndLineRasterization), + degenerateTrianglesRasterized(in_struct->degenerateTrianglesRasterized), + degenerateLinesRasterized(in_struct->degenerateLinesRasterized), + fullyCoveredFragmentShaderInputVariable(in_struct->fullyCoveredFragmentShaderInputVariable), + conservativeRasterizationPostDepthCoverage(in_struct->conservativeRasterizationPostDepthCoverage) +{ +} + +safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT() +{} + +safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + primitiveOverestimationSize = src.primitiveOverestimationSize; + maxExtraPrimitiveOverestimationSize = src.maxExtraPrimitiveOverestimationSize; + extraPrimitiveOverestimationSizeGranularity = src.extraPrimitiveOverestimationSizeGranularity; + primitiveUnderestimation = src.primitiveUnderestimation; + conservativePointAndLineRasterization = src.conservativePointAndLineRasterization; + degenerateTrianglesRasterized = src.degenerateTrianglesRasterized; + degenerateLinesRasterized = src.degenerateLinesRasterized; + fullyCoveredFragmentShaderInputVariable = src.fullyCoveredFragmentShaderInputVariable; + conservativeRasterizationPostDepthCoverage = src.conservativeRasterizationPostDepthCoverage; +} + +safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::operator=(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + primitiveOverestimationSize = src.primitiveOverestimationSize; + maxExtraPrimitiveOverestimationSize = src.maxExtraPrimitiveOverestimationSize; + extraPrimitiveOverestimationSizeGranularity = src.extraPrimitiveOverestimationSizeGranularity; + primitiveUnderestimation = src.primitiveUnderestimation; + conservativePointAndLineRasterization = src.conservativePointAndLineRasterization; + degenerateTrianglesRasterized = src.degenerateTrianglesRasterized; + degenerateLinesRasterized = src.degenerateLinesRasterized; + fullyCoveredFragmentShaderInputVariable = src.fullyCoveredFragmentShaderInputVariable; + conservativeRasterizationPostDepthCoverage = src.conservativeRasterizationPostDepthCoverage; + + return *this; +} + +safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::~safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT() +{ +} + +void safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::initialize(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + primitiveOverestimationSize = in_struct->primitiveOverestimationSize; + maxExtraPrimitiveOverestimationSize = in_struct->maxExtraPrimitiveOverestimationSize; + extraPrimitiveOverestimationSizeGranularity = in_struct->extraPrimitiveOverestimationSizeGranularity; + primitiveUnderestimation = in_struct->primitiveUnderestimation; + conservativePointAndLineRasterization = in_struct->conservativePointAndLineRasterization; + degenerateTrianglesRasterized = in_struct->degenerateTrianglesRasterized; + degenerateLinesRasterized = in_struct->degenerateLinesRasterized; + fullyCoveredFragmentShaderInputVariable = in_struct->fullyCoveredFragmentShaderInputVariable; + conservativeRasterizationPostDepthCoverage = in_struct->conservativeRasterizationPostDepthCoverage; +} + +void safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT::initialize(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + primitiveOverestimationSize = src->primitiveOverestimationSize; + maxExtraPrimitiveOverestimationSize = src->maxExtraPrimitiveOverestimationSize; + extraPrimitiveOverestimationSizeGranularity = src->extraPrimitiveOverestimationSizeGranularity; + primitiveUnderestimation = src->primitiveUnderestimation; + conservativePointAndLineRasterization = src->conservativePointAndLineRasterization; + degenerateTrianglesRasterized = src->degenerateTrianglesRasterized; + degenerateLinesRasterized = src->degenerateLinesRasterized; + fullyCoveredFragmentShaderInputVariable = src->fullyCoveredFragmentShaderInputVariable; + conservativeRasterizationPostDepthCoverage = src->conservativeRasterizationPostDepthCoverage; +} + +safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(const VkPipelineRasterizationConservativeStateCreateInfoEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + flags(in_struct->flags), + conservativeRasterizationMode(in_struct->conservativeRasterizationMode), + extraPrimitiveOverestimationSize(in_struct->extraPrimitiveOverestimationSize) +{ +} + +safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::safe_VkPipelineRasterizationConservativeStateCreateInfoEXT() +{} + +safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + flags = src.flags; + conservativeRasterizationMode = src.conservativeRasterizationMode; + extraPrimitiveOverestimationSize = src.extraPrimitiveOverestimationSize; +} + +safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::operator=(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + flags = src.flags; + conservativeRasterizationMode = src.conservativeRasterizationMode; + extraPrimitiveOverestimationSize = src.extraPrimitiveOverestimationSize; + + return *this; +} + +safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::~safe_VkPipelineRasterizationConservativeStateCreateInfoEXT() +{ +} + +void safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::initialize(const VkPipelineRasterizationConservativeStateCreateInfoEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + flags = in_struct->flags; + conservativeRasterizationMode = in_struct->conservativeRasterizationMode; + extraPrimitiveOverestimationSize = in_struct->extraPrimitiveOverestimationSize; +} + +void safe_VkPipelineRasterizationConservativeStateCreateInfoEXT::initialize(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + flags = src->flags; + conservativeRasterizationMode = src->conservativeRasterizationMode; + extraPrimitiveOverestimationSize = src->extraPrimitiveOverestimationSize; +} + safe_VkHdrMetadataEXT::safe_VkHdrMetadataEXT(const VkHdrMetadataEXT* in_struct) : sType(in_struct->sType), pNext(in_struct->pNext), @@ -14987,3 +15211,196 @@ void safe_VkShaderModuleValidationCacheCreateInfoEXT::initialize(const safe_VkSh pNext = src->pNext; validationCache = src->validationCache; } + +safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(const VkDeviceQueueGlobalPriorityCreateInfoEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + globalPriority(in_struct->globalPriority) +{ +} + +safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::safe_VkDeviceQueueGlobalPriorityCreateInfoEXT() +{} + +safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + globalPriority = src.globalPriority; +} + +safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::operator=(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + globalPriority = src.globalPriority; + + return *this; +} + +safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::~safe_VkDeviceQueueGlobalPriorityCreateInfoEXT() +{ +} + +void safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::initialize(const VkDeviceQueueGlobalPriorityCreateInfoEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + globalPriority = in_struct->globalPriority; +} + +void safe_VkDeviceQueueGlobalPriorityCreateInfoEXT::initialize(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + globalPriority = src->globalPriority; +} + +safe_VkImportMemoryHostPointerInfoEXT::safe_VkImportMemoryHostPointerInfoEXT(const VkImportMemoryHostPointerInfoEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + handleType(in_struct->handleType), + pHostPointer(in_struct->pHostPointer) +{ +} + +safe_VkImportMemoryHostPointerInfoEXT::safe_VkImportMemoryHostPointerInfoEXT() +{} + +safe_VkImportMemoryHostPointerInfoEXT::safe_VkImportMemoryHostPointerInfoEXT(const safe_VkImportMemoryHostPointerInfoEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + handleType = src.handleType; + pHostPointer = src.pHostPointer; +} + +safe_VkImportMemoryHostPointerInfoEXT& safe_VkImportMemoryHostPointerInfoEXT::operator=(const safe_VkImportMemoryHostPointerInfoEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + handleType = src.handleType; + pHostPointer = src.pHostPointer; + + return *this; +} + +safe_VkImportMemoryHostPointerInfoEXT::~safe_VkImportMemoryHostPointerInfoEXT() +{ +} + +void safe_VkImportMemoryHostPointerInfoEXT::initialize(const VkImportMemoryHostPointerInfoEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + handleType = in_struct->handleType; + pHostPointer = in_struct->pHostPointer; +} + +void safe_VkImportMemoryHostPointerInfoEXT::initialize(const safe_VkImportMemoryHostPointerInfoEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + handleType = src->handleType; + pHostPointer = src->pHostPointer; +} + +safe_VkMemoryHostPointerPropertiesEXT::safe_VkMemoryHostPointerPropertiesEXT(const VkMemoryHostPointerPropertiesEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + memoryTypeBits(in_struct->memoryTypeBits) +{ +} + +safe_VkMemoryHostPointerPropertiesEXT::safe_VkMemoryHostPointerPropertiesEXT() +{} + +safe_VkMemoryHostPointerPropertiesEXT::safe_VkMemoryHostPointerPropertiesEXT(const safe_VkMemoryHostPointerPropertiesEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + memoryTypeBits = src.memoryTypeBits; +} + +safe_VkMemoryHostPointerPropertiesEXT& safe_VkMemoryHostPointerPropertiesEXT::operator=(const safe_VkMemoryHostPointerPropertiesEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + memoryTypeBits = src.memoryTypeBits; + + return *this; +} + +safe_VkMemoryHostPointerPropertiesEXT::~safe_VkMemoryHostPointerPropertiesEXT() +{ +} + +void safe_VkMemoryHostPointerPropertiesEXT::initialize(const VkMemoryHostPointerPropertiesEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + memoryTypeBits = in_struct->memoryTypeBits; +} + +void safe_VkMemoryHostPointerPropertiesEXT::initialize(const safe_VkMemoryHostPointerPropertiesEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + memoryTypeBits = src->memoryTypeBits; +} + +safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* in_struct) : + sType(in_struct->sType), + pNext(in_struct->pNext), + minImportedHostPointerAlignment(in_struct->minImportedHostPointerAlignment) +{ +} + +safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT() +{} + +safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& src) +{ + sType = src.sType; + pNext = src.pNext; + minImportedHostPointerAlignment = src.minImportedHostPointerAlignment; +} + +safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::operator=(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& src) +{ + if (&src == this) return *this; + + + sType = src.sType; + pNext = src.pNext; + minImportedHostPointerAlignment = src.minImportedHostPointerAlignment; + + return *this; +} + +safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::~safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT() +{ +} + +void safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::initialize(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* in_struct) +{ + sType = in_struct->sType; + pNext = in_struct->pNext; + minImportedHostPointerAlignment = in_struct->minImportedHostPointerAlignment; +} + +void safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT::initialize(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT* src) +{ + sType = src->sType; + pNext = src->pNext; + minImportedHostPointerAlignment = src->minImportedHostPointerAlignment; +} diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.h index abf04ebf1e99f9a4ac96852c8a9ea84d75707365..9ad0de21ccad9da4e742f92fee4d947b2d7e1261 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_safe_struct.h @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -531,12 +532,12 @@ struct safe_VkPipelineViewportStateCreateInfo { const VkViewport* pViewports; uint32_t scissorCount; const VkRect2D* pScissors; - safe_VkPipelineViewportStateCreateInfo(const VkPipelineViewportStateCreateInfo* in_struct); + safe_VkPipelineViewportStateCreateInfo(const VkPipelineViewportStateCreateInfo* in_struct, const bool is_dynamic_viewports, const bool is_dynamic_scissors); safe_VkPipelineViewportStateCreateInfo(const safe_VkPipelineViewportStateCreateInfo& src); safe_VkPipelineViewportStateCreateInfo& operator=(const safe_VkPipelineViewportStateCreateInfo& src); safe_VkPipelineViewportStateCreateInfo(); ~safe_VkPipelineViewportStateCreateInfo(); - void initialize(const VkPipelineViewportStateCreateInfo* in_struct); + void initialize(const VkPipelineViewportStateCreateInfo* in_struct, const bool is_dynamic_viewports, const bool is_dynamic_scissors); void initialize(const safe_VkPipelineViewportStateCreateInfo* src); VkPipelineViewportStateCreateInfo *ptr() { return reinterpret_cast(this); } VkPipelineViewportStateCreateInfo const *ptr() const { return reinterpret_cast(this); } @@ -669,12 +670,12 @@ struct safe_VkGraphicsPipelineCreateInfo { uint32_t subpass; VkPipeline basePipelineHandle; int32_t basePipelineIndex; - safe_VkGraphicsPipelineCreateInfo(const VkGraphicsPipelineCreateInfo* in_struct); + safe_VkGraphicsPipelineCreateInfo(const VkGraphicsPipelineCreateInfo* in_struct, const bool uses_color_attachment, const bool uses_depthstencil_attachment); safe_VkGraphicsPipelineCreateInfo(const safe_VkGraphicsPipelineCreateInfo& src); safe_VkGraphicsPipelineCreateInfo& operator=(const safe_VkGraphicsPipelineCreateInfo& src); safe_VkGraphicsPipelineCreateInfo(); ~safe_VkGraphicsPipelineCreateInfo(); - void initialize(const VkGraphicsPipelineCreateInfo* in_struct); + void initialize(const VkGraphicsPipelineCreateInfo* in_struct, const bool uses_color_attachment, const bool uses_depthstencil_attachment); void initialize(const safe_VkGraphicsPipelineCreateInfo* src); VkGraphicsPipelineCreateInfo *ptr() { return reinterpret_cast(this); } VkGraphicsPipelineCreateInfo const *ptr() const { return reinterpret_cast(this); } @@ -3363,6 +3364,46 @@ struct safe_VkPipelineDiscardRectangleStateCreateInfoEXT { VkPipelineDiscardRectangleStateCreateInfoEXT const *ptr() const { return reinterpret_cast(this); } }; +struct safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT { + VkStructureType sType; + void* pNext; + float primitiveOverestimationSize; + float maxExtraPrimitiveOverestimationSize; + float extraPrimitiveOverestimationSizeGranularity; + VkBool32 primitiveUnderestimation; + VkBool32 conservativePointAndLineRasterization; + VkBool32 degenerateTrianglesRasterized; + VkBool32 degenerateLinesRasterized; + VkBool32 fullyCoveredFragmentShaderInputVariable; + VkBool32 conservativeRasterizationPostDepthCoverage; + safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* in_struct); + safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& src); + safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& operator=(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT& src); + safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(); + ~safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(); + void initialize(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* in_struct); + void initialize(const safe_VkPhysicalDeviceConservativeRasterizationPropertiesEXT* src); + VkPhysicalDeviceConservativeRasterizationPropertiesEXT *ptr() { return reinterpret_cast(this); } + VkPhysicalDeviceConservativeRasterizationPropertiesEXT const *ptr() const { return reinterpret_cast(this); } +}; + +struct safe_VkPipelineRasterizationConservativeStateCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; + VkConservativeRasterizationModeEXT conservativeRasterizationMode; + float extraPrimitiveOverestimationSize; + safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(const VkPipelineRasterizationConservativeStateCreateInfoEXT* in_struct); + safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& src); + safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& operator=(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT& src); + safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(); + ~safe_VkPipelineRasterizationConservativeStateCreateInfoEXT(); + void initialize(const VkPipelineRasterizationConservativeStateCreateInfoEXT* in_struct); + void initialize(const safe_VkPipelineRasterizationConservativeStateCreateInfoEXT* src); + VkPipelineRasterizationConservativeStateCreateInfoEXT *ptr() { return reinterpret_cast(this); } + VkPipelineRasterizationConservativeStateCreateInfoEXT const *ptr() const { return reinterpret_cast(this); } +}; + struct safe_VkHdrMetadataEXT { VkStructureType sType; const void* pNext; @@ -3657,3 +3698,64 @@ struct safe_VkShaderModuleValidationCacheCreateInfoEXT { VkShaderModuleValidationCacheCreateInfoEXT *ptr() { return reinterpret_cast(this); } VkShaderModuleValidationCacheCreateInfoEXT const *ptr() const { return reinterpret_cast(this); } }; + +struct safe_VkDeviceQueueGlobalPriorityCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkQueueGlobalPriorityEXT globalPriority; + safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(const VkDeviceQueueGlobalPriorityCreateInfoEXT* in_struct); + safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& src); + safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& operator=(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT& src); + safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(); + ~safe_VkDeviceQueueGlobalPriorityCreateInfoEXT(); + void initialize(const VkDeviceQueueGlobalPriorityCreateInfoEXT* in_struct); + void initialize(const safe_VkDeviceQueueGlobalPriorityCreateInfoEXT* src); + VkDeviceQueueGlobalPriorityCreateInfoEXT *ptr() { return reinterpret_cast(this); } + VkDeviceQueueGlobalPriorityCreateInfoEXT const *ptr() const { return reinterpret_cast(this); } +}; + +struct safe_VkImportMemoryHostPointerInfoEXT { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHR handleType; + void* pHostPointer; + safe_VkImportMemoryHostPointerInfoEXT(const VkImportMemoryHostPointerInfoEXT* in_struct); + safe_VkImportMemoryHostPointerInfoEXT(const safe_VkImportMemoryHostPointerInfoEXT& src); + safe_VkImportMemoryHostPointerInfoEXT& operator=(const safe_VkImportMemoryHostPointerInfoEXT& src); + safe_VkImportMemoryHostPointerInfoEXT(); + ~safe_VkImportMemoryHostPointerInfoEXT(); + void initialize(const VkImportMemoryHostPointerInfoEXT* in_struct); + void initialize(const safe_VkImportMemoryHostPointerInfoEXT* src); + VkImportMemoryHostPointerInfoEXT *ptr() { return reinterpret_cast(this); } + VkImportMemoryHostPointerInfoEXT const *ptr() const { return reinterpret_cast(this); } +}; + +struct safe_VkMemoryHostPointerPropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; + safe_VkMemoryHostPointerPropertiesEXT(const VkMemoryHostPointerPropertiesEXT* in_struct); + safe_VkMemoryHostPointerPropertiesEXT(const safe_VkMemoryHostPointerPropertiesEXT& src); + safe_VkMemoryHostPointerPropertiesEXT& operator=(const safe_VkMemoryHostPointerPropertiesEXT& src); + safe_VkMemoryHostPointerPropertiesEXT(); + ~safe_VkMemoryHostPointerPropertiesEXT(); + void initialize(const VkMemoryHostPointerPropertiesEXT* in_struct); + void initialize(const safe_VkMemoryHostPointerPropertiesEXT* src); + VkMemoryHostPointerPropertiesEXT *ptr() { return reinterpret_cast(this); } + VkMemoryHostPointerPropertiesEXT const *ptr() const { return reinterpret_cast(this); } +}; + +struct safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT { + VkStructureType sType; + void* pNext; + VkDeviceSize minImportedHostPointerAlignment; + safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* in_struct); + safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& src); + safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& operator=(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT& src); + safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(); + ~safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(); + void initialize(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* in_struct); + void initialize(const safe_VkPhysicalDeviceExternalMemoryHostPropertiesEXT* src); + VkPhysicalDeviceExternalMemoryHostPropertiesEXT *ptr() { return reinterpret_cast(this); } + VkPhysicalDeviceExternalMemoryHostPropertiesEXT const *ptr() const { return reinterpret_cast(this); } +}; diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.c b/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.c index 4e293075a53644f60af552219c31097128147e7d..52aacf15aa67899c8637d5c364cebfee67d07561 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.c +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.c @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -1929,6 +1930,22 @@ size_t vk_size_vktexturelodgatherformatpropertiesamd(const VkTextureLODGatherFor return struct_size; } +size_t vk_size_vkshaderresourceusageamd(const VkShaderResourceUsageAMD* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkShaderResourceUsageAMD); + } + return struct_size; +} + +size_t vk_size_vkshaderstatisticsinfoamd(const VkShaderStatisticsInfoAMD* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkShaderStatisticsInfoAMD); + } + return struct_size; +} + size_t vk_size_vkrenderpassmultiviewcreateinfokhx(const VkRenderPassMultiviewCreateInfoKHX* struct_ptr) { size_t struct_size = 0; if (struct_ptr) { @@ -2436,6 +2453,22 @@ size_t vk_size_vkpipelinediscardrectanglestatecreateinfoext(const VkPipelineDisc return struct_size; } +size_t vk_size_vkphysicaldeviceconservativerasterizationpropertiesext(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); + } + return struct_size; +} + +size_t vk_size_vkpipelinerasterizationconservativestatecreateinfoext(const VkPipelineRasterizationConservativeStateCreateInfoEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkPipelineRasterizationConservativeStateCreateInfoEXT); + } + return struct_size; +} + size_t vk_size_vkxycolorext(const VkXYColorEXT* struct_ptr) { size_t struct_size = 0; if (struct_ptr) { @@ -2621,6 +2654,38 @@ size_t vk_size_vkshadermodulevalidationcachecreateinfoext(const VkShaderModuleVa return struct_size; } +size_t vk_size_vkdevicequeueglobalprioritycreateinfoext(const VkDeviceQueueGlobalPriorityCreateInfoEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkDeviceQueueGlobalPriorityCreateInfoEXT); + } + return struct_size; +} + +size_t vk_size_vkimportmemoryhostpointerinfoext(const VkImportMemoryHostPointerInfoEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkImportMemoryHostPointerInfoEXT); + } + return struct_size; +} + +size_t vk_size_vkmemoryhostpointerpropertiesext(const VkMemoryHostPointerPropertiesEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkMemoryHostPointerPropertiesEXT); + } + return struct_size; +} + +size_t vk_size_vkphysicaldeviceexternalmemoryhostpropertiesext(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* struct_ptr) { + size_t struct_size = 0; + if (struct_ptr) { + struct_size = sizeof(VkPhysicalDeviceExternalMemoryHostPropertiesEXT); + } + return struct_size; +} + size_t get_struct_chain_size(const void* struct_ptr) { // Use VkApplicationInfo as struct until actual type is resolved VkApplicationInfo* pNext = (VkApplicationInfo*)struct_ptr; @@ -3391,6 +3456,14 @@ size_t get_struct_chain_size(const void* struct_ptr) { struct_size += vk_size_vkpipelinediscardrectanglestatecreateinfoext((VkPipelineDiscardRectangleStateCreateInfoEXT*)pNext); break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: { + struct_size += vk_size_vkphysicaldeviceconservativerasterizationpropertiesext((VkPhysicalDeviceConservativeRasterizationPropertiesEXT*)pNext); + break; + } + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: { + struct_size += vk_size_vkpipelinerasterizationconservativestatecreateinfoext((VkPipelineRasterizationConservativeStateCreateInfoEXT*)pNext); + break; + } case VK_STRUCTURE_TYPE_HDR_METADATA_EXT: { struct_size += vk_size_vkhdrmetadataext((VkHdrMetadataEXT*)pNext); break; @@ -3463,10 +3536,25 @@ size_t get_struct_chain_size(const void* struct_ptr) { struct_size += vk_size_vkshadermodulevalidationcachecreateinfoext((VkShaderModuleValidationCacheCreateInfoEXT*)pNext); break; } + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: { + struct_size += vk_size_vkdevicequeueglobalprioritycreateinfoext((VkDeviceQueueGlobalPriorityCreateInfoEXT*)pNext); + break; + } + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: { + struct_size += vk_size_vkimportmemoryhostpointerinfoext((VkImportMemoryHostPointerInfoEXT*)pNext); + break; + } + case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT: { + struct_size += vk_size_vkmemoryhostpointerpropertiesext((VkMemoryHostPointerPropertiesEXT*)pNext); + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: { + struct_size += vk_size_vkphysicaldeviceexternalmemoryhostpropertiesext((VkPhysicalDeviceExternalMemoryHostPropertiesEXT*)pNext); + break; + } default: - assert(0); struct_size += 0; - } + break; } pNext = (VkApplicationInfo*)pNext->pNext; } return struct_size; @@ -3878,6 +3966,10 @@ size_t get_struct_size(const void* struct_ptr) { return vk_size_vkphysicaldevicediscardrectanglepropertiesext((VkPhysicalDeviceDiscardRectanglePropertiesEXT*)struct_ptr); case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: return vk_size_vkpipelinediscardrectanglestatecreateinfoext((VkPipelineDiscardRectangleStateCreateInfoEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: + return vk_size_vkphysicaldeviceconservativerasterizationpropertiesext((VkPhysicalDeviceConservativeRasterizationPropertiesEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: + return vk_size_vkpipelinerasterizationconservativestatecreateinfoext((VkPipelineRasterizationConservativeStateCreateInfoEXT*)struct_ptr); case VK_STRUCTURE_TYPE_HDR_METADATA_EXT: return vk_size_vkhdrmetadataext((VkHdrMetadataEXT*)struct_ptr); #ifdef VK_USE_PLATFORM_IOS_MVK @@ -3916,8 +4008,15 @@ size_t get_struct_size(const void* struct_ptr) { return vk_size_vkvalidationcachecreateinfoext((VkValidationCacheCreateInfoEXT*)struct_ptr); case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: return vk_size_vkshadermodulevalidationcachecreateinfoext((VkShaderModuleValidationCacheCreateInfoEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: + return vk_size_vkdevicequeueglobalprioritycreateinfoext((VkDeviceQueueGlobalPriorityCreateInfoEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: + return vk_size_vkimportmemoryhostpointerinfoext((VkImportMemoryHostPointerInfoEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT: + return vk_size_vkmemoryhostpointerpropertiesext((VkMemoryHostPointerPropertiesEXT*)struct_ptr); + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: + return vk_size_vkphysicaldeviceexternalmemoryhostpropertiesext((VkPhysicalDeviceExternalMemoryHostPropertiesEXT*)struct_ptr); default: - assert(0); return(0); } } diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.h index 151f2b1c67e63e4d7b48ebdf127568ffcf2f309f..2cb356fd42a0bcc2bba7fbbbd61c4bbff8fd1173 100644 --- a/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.h +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_struct_size_helper.h @@ -25,6 +25,7 @@ * Author: Courtney Goeltzenleuchter * Author: Tobin Ehlis * Author: Chris Forbes + * Author: John Zulauf * ****************************************************************************/ @@ -286,6 +287,8 @@ size_t vk_size_vkdedicatedallocationimagecreateinfonv(const VkDedicatedAllocatio size_t vk_size_vkdedicatedallocationbuffercreateinfonv(const VkDedicatedAllocationBufferCreateInfoNV* struct_ptr); size_t vk_size_vkdedicatedallocationmemoryallocateinfonv(const VkDedicatedAllocationMemoryAllocateInfoNV* struct_ptr); size_t vk_size_vktexturelodgatherformatpropertiesamd(const VkTextureLODGatherFormatPropertiesAMD* struct_ptr); +size_t vk_size_vkshaderresourceusageamd(const VkShaderResourceUsageAMD* struct_ptr); +size_t vk_size_vkshaderstatisticsinfoamd(const VkShaderStatisticsInfoAMD* struct_ptr); size_t vk_size_vkrenderpassmultiviewcreateinfokhx(const VkRenderPassMultiviewCreateInfoKHX* struct_ptr); size_t vk_size_vkphysicaldevicemultiviewfeatureskhx(const VkPhysicalDeviceMultiviewFeaturesKHX* struct_ptr); size_t vk_size_vkphysicaldevicemultiviewpropertieskhx(const VkPhysicalDeviceMultiviewPropertiesKHX* struct_ptr); @@ -350,6 +353,8 @@ size_t vk_size_vkviewportswizzlenv(const VkViewportSwizzleNV* struct_ptr); size_t vk_size_vkpipelineviewportswizzlestatecreateinfonv(const VkPipelineViewportSwizzleStateCreateInfoNV* struct_ptr); size_t vk_size_vkphysicaldevicediscardrectanglepropertiesext(const VkPhysicalDeviceDiscardRectanglePropertiesEXT* struct_ptr); size_t vk_size_vkpipelinediscardrectanglestatecreateinfoext(const VkPipelineDiscardRectangleStateCreateInfoEXT* struct_ptr); +size_t vk_size_vkphysicaldeviceconservativerasterizationpropertiesext(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* struct_ptr); +size_t vk_size_vkpipelinerasterizationconservativestatecreateinfoext(const VkPipelineRasterizationConservativeStateCreateInfoEXT* struct_ptr); size_t vk_size_vkxycolorext(const VkXYColorEXT* struct_ptr); size_t vk_size_vkhdrmetadataext(const VkHdrMetadataEXT* struct_ptr); #ifdef VK_USE_PLATFORM_IOS_MVK @@ -375,6 +380,10 @@ size_t vk_size_vkpipelinecoveragetocolorstatecreateinfonv(const VkPipelineCovera size_t vk_size_vkpipelinecoveragemodulationstatecreateinfonv(const VkPipelineCoverageModulationStateCreateInfoNV* struct_ptr); size_t vk_size_vkvalidationcachecreateinfoext(const VkValidationCacheCreateInfoEXT* struct_ptr); size_t vk_size_vkshadermodulevalidationcachecreateinfoext(const VkShaderModuleValidationCacheCreateInfoEXT* struct_ptr); +size_t vk_size_vkdevicequeueglobalprioritycreateinfoext(const VkDeviceQueueGlobalPriorityCreateInfoEXT* struct_ptr); +size_t vk_size_vkimportmemoryhostpointerinfoext(const VkImportMemoryHostPointerInfoEXT* struct_ptr); +size_t vk_size_vkmemoryhostpointerpropertiesext(const VkMemoryHostPointerPropertiesEXT* struct_ptr); +size_t vk_size_vkphysicaldeviceexternalmemoryhostpropertiesext(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* struct_ptr); #ifdef __cplusplus } #endif diff --git a/sources/third_party/vulkan/src/build-android/generated/include/vk_typemap_helper.h b/sources/third_party/vulkan/src/build-android/generated/include/vk_typemap_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..3628b60fe2688c601cd13ab1e2c91c77ad463bf4 --- /dev/null +++ b/sources/third_party/vulkan/src/build-android/generated/include/vk_typemap_helper.h @@ -0,0 +1,1952 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See helper_file_generator.py for modifications + + +/*************************************************************************** + * + * Copyright (c) 2015-2017 The Khronos Group Inc. + * Copyright (c) 2015-2017 Valve Corporation + * Copyright (c) 2015-2017 LunarG, Inc. + * Copyright (c) 2015-2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Mark Lobodzinski + * Author: Courtney Goeltzenleuchter + * Author: Tobin Ehlis + * Author: Chris Forbes + * Author: John Zulauf + * + ****************************************************************************/ + +#pragma once +#include + +// These empty generic templates are specialized for each type with sType +// members and for each sType -- providing a two way map between structure +// types and sTypes + +template struct LvlSTypeMap {}; +template struct LvlTypeMap {}; + +// Map type VkApplicationInfo to id VK_STRUCTURE_TYPE_APPLICATION_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_APPLICATION_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkApplicationInfo Type; +}; + +// Map type VkInstanceCreateInfo to id VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkInstanceCreateInfo Type; +}; + +// Map type VkDeviceQueueCreateInfo to id VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceQueueCreateInfo Type; +}; + +// Map type VkDeviceCreateInfo to id VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceCreateInfo Type; +}; + +// Map type VkSubmitInfo to id VK_STRUCTURE_TYPE_SUBMIT_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SUBMIT_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkSubmitInfo Type; +}; + +// Map type VkMemoryAllocateInfo to id VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryAllocateInfo Type; +}; + +// Map type VkMappedMemoryRange to id VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; +}; + +template <> struct LvlSTypeMap { + typedef VkMappedMemoryRange Type; +}; + +// Map type VkBindSparseInfo to id VK_STRUCTURE_TYPE_BIND_SPARSE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_SPARSE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkBindSparseInfo Type; +}; + +// Map type VkFenceCreateInfo to id VK_STRUCTURE_TYPE_FENCE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkFenceCreateInfo Type; +}; + +// Map type VkSemaphoreCreateInfo to id VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkSemaphoreCreateInfo Type; +}; + +// Map type VkEventCreateInfo to id VK_STRUCTURE_TYPE_EVENT_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkEventCreateInfo Type; +}; + +// Map type VkQueryPoolCreateInfo to id VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkQueryPoolCreateInfo Type; +}; + +// Map type VkBufferCreateInfo to id VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkBufferCreateInfo Type; +}; + +// Map type VkBufferViewCreateInfo to id VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkBufferViewCreateInfo Type; +}; + +// Map type VkImageCreateInfo to id VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkImageCreateInfo Type; +}; + +// Map type VkImageViewCreateInfo to id VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkImageViewCreateInfo Type; +}; + +// Map type VkShaderModuleCreateInfo to id VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkShaderModuleCreateInfo Type; +}; + +// Map type VkPipelineCacheCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineCacheCreateInfo Type; +}; + +// Map type VkPipelineShaderStageCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineShaderStageCreateInfo Type; +}; + +// Map type VkPipelineVertexInputStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineVertexInputStateCreateInfo Type; +}; + +// Map type VkPipelineInputAssemblyStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineInputAssemblyStateCreateInfo Type; +}; + +// Map type VkPipelineTessellationStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineTessellationStateCreateInfo Type; +}; + +// Map type VkPipelineViewportStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineViewportStateCreateInfo Type; +}; + +// Map type VkPipelineRasterizationStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineRasterizationStateCreateInfo Type; +}; + +// Map type VkPipelineMultisampleStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineMultisampleStateCreateInfo Type; +}; + +// Map type VkPipelineDepthStencilStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineDepthStencilStateCreateInfo Type; +}; + +// Map type VkPipelineColorBlendStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineColorBlendStateCreateInfo Type; +}; + +// Map type VkPipelineDynamicStateCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineDynamicStateCreateInfo Type; +}; + +// Map type VkGraphicsPipelineCreateInfo to id VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkGraphicsPipelineCreateInfo Type; +}; + +// Map type VkComputePipelineCreateInfo to id VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkComputePipelineCreateInfo Type; +}; + +// Map type VkPipelineLayoutCreateInfo to id VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineLayoutCreateInfo Type; +}; + +// Map type VkSamplerCreateInfo to id VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerCreateInfo Type; +}; + +// Map type VkDescriptorSetLayoutCreateInfo to id VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkDescriptorSetLayoutCreateInfo Type; +}; + +// Map type VkDescriptorPoolCreateInfo to id VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkDescriptorPoolCreateInfo Type; +}; + +// Map type VkDescriptorSetAllocateInfo to id VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkDescriptorSetAllocateInfo Type; +}; + +// Map type VkWriteDescriptorSet to id VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; +}; + +template <> struct LvlSTypeMap { + typedef VkWriteDescriptorSet Type; +}; + +// Map type VkCopyDescriptorSet to id VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET; +}; + +template <> struct LvlSTypeMap { + typedef VkCopyDescriptorSet Type; +}; + +// Map type VkFramebufferCreateInfo to id VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkFramebufferCreateInfo Type; +}; + +// Map type VkRenderPassCreateInfo to id VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkRenderPassCreateInfo Type; +}; + +// Map type VkCommandPoolCreateInfo to id VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkCommandPoolCreateInfo Type; +}; + +// Map type VkCommandBufferAllocateInfo to id VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkCommandBufferAllocateInfo Type; +}; + +// Map type VkCommandBufferInheritanceInfo to id VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkCommandBufferInheritanceInfo Type; +}; + +// Map type VkCommandBufferBeginInfo to id VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkCommandBufferBeginInfo Type; +}; + +// Map type VkMemoryBarrier to id VK_STRUCTURE_TYPE_MEMORY_BARRIER +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryBarrier Type; +}; + +// Map type VkBufferMemoryBarrier to id VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; +}; + +template <> struct LvlSTypeMap { + typedef VkBufferMemoryBarrier Type; +}; + +// Map type VkImageMemoryBarrier to id VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; +}; + +template <> struct LvlSTypeMap { + typedef VkImageMemoryBarrier Type; +}; + +// Map type VkRenderPassBeginInfo to id VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; +}; + +template <> struct LvlSTypeMap { + typedef VkRenderPassBeginInfo Type; +}; + +// Map type VkSwapchainCreateInfoKHR to id VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSwapchainCreateInfoKHR Type; +}; + +// Map type VkPresentInfoKHR to id VK_STRUCTURE_TYPE_PRESENT_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPresentInfoKHR Type; +}; + +// Map type VkDisplayModeCreateInfoKHR to id VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkDisplayModeCreateInfoKHR Type; +}; + +// Map type VkDisplaySurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkDisplaySurfaceCreateInfoKHR Type; +}; + +// Map type VkDisplayPresentInfoKHR to id VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkDisplayPresentInfoKHR Type; +}; + +#ifdef VK_USE_PLATFORM_XLIB_KHR +// Map type VkXlibSurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkXlibSurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR +// Map type VkXcbSurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkXcbSurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR +// Map type VkWaylandSurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkWaylandSurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_MIR_KHR +// Map type VkMirSurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMirSurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_MIR_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR +// Map type VkAndroidSurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkAndroidSurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkWin32SurfaceCreateInfoKHR to id VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkWin32SurfaceCreateInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkPhysicalDeviceFeatures2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceFeatures2KHR Type; +}; + +// Map type VkPhysicalDeviceProperties2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceProperties2KHR Type; +}; + +// Map type VkFormatProperties2KHR to id VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkFormatProperties2KHR Type; +}; + +// Map type VkImageFormatProperties2KHR to id VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImageFormatProperties2KHR Type; +}; + +// Map type VkPhysicalDeviceImageFormatInfo2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceImageFormatInfo2KHR Type; +}; + +// Map type VkQueueFamilyProperties2KHR to id VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkQueueFamilyProperties2KHR Type; +}; + +// Map type VkPhysicalDeviceMemoryProperties2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceMemoryProperties2KHR Type; +}; + +// Map type VkSparseImageFormatProperties2KHR to id VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSparseImageFormatProperties2KHR Type; +}; + +// Map type VkPhysicalDeviceSparseImageFormatInfo2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceSparseImageFormatInfo2KHR Type; +}; + +// Map type VkPhysicalDeviceExternalImageFormatInfoKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceExternalImageFormatInfoKHR Type; +}; + +// Map type VkExternalImageFormatPropertiesKHR to id VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalImageFormatPropertiesKHR Type; +}; + +// Map type VkPhysicalDeviceExternalBufferInfoKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceExternalBufferInfoKHR Type; +}; + +// Map type VkExternalBufferPropertiesKHR to id VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalBufferPropertiesKHR Type; +}; + +// Map type VkPhysicalDeviceIDPropertiesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceIDPropertiesKHR Type; +}; + +// Map type VkExternalMemoryImageCreateInfoKHR to id VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalMemoryImageCreateInfoKHR Type; +}; + +// Map type VkExternalMemoryBufferCreateInfoKHR to id VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalMemoryBufferCreateInfoKHR Type; +}; + +// Map type VkExportMemoryAllocateInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportMemoryAllocateInfoKHR Type; +}; + +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportMemoryWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportMemoryWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkExportMemoryWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportMemoryWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkMemoryWin32HandlePropertiesKHR to id VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryWin32HandlePropertiesKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkMemoryGetWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryGetWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportMemoryFdInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportMemoryFdInfoKHR Type; +}; + +// Map type VkMemoryFdPropertiesKHR to id VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryFdPropertiesKHR Type; +}; + +// Map type VkMemoryGetFdInfoKHR to id VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryGetFdInfoKHR Type; +}; + +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkWin32KeyedMutexAcquireReleaseInfoKHR to id VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkWin32KeyedMutexAcquireReleaseInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkPhysicalDeviceExternalSemaphoreInfoKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceExternalSemaphoreInfoKHR Type; +}; + +// Map type VkExternalSemaphorePropertiesKHR to id VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalSemaphorePropertiesKHR Type; +}; + +// Map type VkExportSemaphoreCreateInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportSemaphoreCreateInfoKHR Type; +}; + +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportSemaphoreWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportSemaphoreWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkExportSemaphoreWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportSemaphoreWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkD3D12FenceSubmitInfoKHR to id VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkD3D12FenceSubmitInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkSemaphoreGetWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSemaphoreGetWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportSemaphoreFdInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportSemaphoreFdInfoKHR Type; +}; + +// Map type VkSemaphoreGetFdInfoKHR to id VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSemaphoreGetFdInfoKHR Type; +}; + +// Map type VkPhysicalDevicePushDescriptorPropertiesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDevicePushDescriptorPropertiesKHR Type; +}; + +// Map type VkPhysicalDevice16BitStorageFeaturesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDevice16BitStorageFeaturesKHR Type; +}; + +// Map type VkPresentRegionsKHR to id VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPresentRegionsKHR Type; +}; + +// Map type VkDescriptorUpdateTemplateCreateInfoKHR to id VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkDescriptorUpdateTemplateCreateInfoKHR Type; +}; + +// Map type VkSharedPresentSurfaceCapabilitiesKHR to id VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSharedPresentSurfaceCapabilitiesKHR Type; +}; + +// Map type VkPhysicalDeviceExternalFenceInfoKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceExternalFenceInfoKHR Type; +}; + +// Map type VkExternalFencePropertiesKHR to id VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalFencePropertiesKHR Type; +}; + +// Map type VkExportFenceCreateInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportFenceCreateInfoKHR Type; +}; + +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportFenceWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportFenceWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkExportFenceWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkExportFenceWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkFenceGetWin32HandleInfoKHR to id VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkFenceGetWin32HandleInfoKHR Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportFenceFdInfoKHR to id VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImportFenceFdInfoKHR Type; +}; + +// Map type VkFenceGetFdInfoKHR to id VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkFenceGetFdInfoKHR Type; +}; + +// Map type VkPhysicalDevicePointClippingPropertiesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDevicePointClippingPropertiesKHR Type; +}; + +// Map type VkRenderPassInputAttachmentAspectCreateInfoKHR to id VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkRenderPassInputAttachmentAspectCreateInfoKHR Type; +}; + +// Map type VkImageViewUsageCreateInfoKHR to id VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImageViewUsageCreateInfoKHR Type; +}; + +// Map type VkPipelineTessellationDomainOriginStateCreateInfoKHR to id VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineTessellationDomainOriginStateCreateInfoKHR Type; +}; + +// Map type VkPhysicalDeviceSurfaceInfo2KHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceSurfaceInfo2KHR Type; +}; + +// Map type VkSurfaceCapabilities2KHR to id VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSurfaceCapabilities2KHR Type; +}; + +// Map type VkSurfaceFormat2KHR to id VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSurfaceFormat2KHR Type; +}; + +// Map type VkPhysicalDeviceVariablePointerFeaturesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceVariablePointerFeaturesKHR Type; +}; + +// Map type VkMemoryDedicatedRequirementsKHR to id VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryDedicatedRequirementsKHR Type; +}; + +// Map type VkMemoryDedicatedAllocateInfoKHR to id VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryDedicatedAllocateInfoKHR Type; +}; + +// Map type VkBufferMemoryRequirementsInfo2KHR to id VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkBufferMemoryRequirementsInfo2KHR Type; +}; + +// Map type VkImageMemoryRequirementsInfo2KHR to id VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImageMemoryRequirementsInfo2KHR Type; +}; + +// Map type VkImageSparseMemoryRequirementsInfo2KHR to id VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImageSparseMemoryRequirementsInfo2KHR Type; +}; + +// Map type VkMemoryRequirements2KHR to id VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryRequirements2KHR Type; +}; + +// Map type VkSparseImageMemoryRequirements2KHR to id VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSparseImageMemoryRequirements2KHR Type; +}; + +// Map type VkImageFormatListCreateInfoKHR to id VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImageFormatListCreateInfoKHR Type; +}; + +// Map type VkSamplerYcbcrConversionCreateInfoKHR to id VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerYcbcrConversionCreateInfoKHR Type; +}; + +// Map type VkSamplerYcbcrConversionInfoKHR to id VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerYcbcrConversionInfoKHR Type; +}; + +// Map type VkBindImagePlaneMemoryInfoKHR to id VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkBindImagePlaneMemoryInfoKHR Type; +}; + +// Map type VkImagePlaneMemoryRequirementsInfoKHR to id VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkImagePlaneMemoryRequirementsInfoKHR Type; +}; + +// Map type VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR Type; +}; + +// Map type VkSamplerYcbcrConversionImageFormatPropertiesKHR to id VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerYcbcrConversionImageFormatPropertiesKHR Type; +}; + +// Map type VkBindBufferMemoryInfoKHR to id VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkBindBufferMemoryInfoKHR Type; +}; + +// Map type VkBindImageMemoryInfoKHR to id VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR; +}; + +template <> struct LvlSTypeMap { + typedef VkBindImageMemoryInfoKHR Type; +}; + +// Map type VkDebugReportCallbackCreateInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugReportCallbackCreateInfoEXT Type; +}; + +// Map type VkPipelineRasterizationStateRasterizationOrderAMD to id VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineRasterizationStateRasterizationOrderAMD Type; +}; + +// Map type VkDebugMarkerObjectNameInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugMarkerObjectNameInfoEXT Type; +}; + +// Map type VkDebugMarkerObjectTagInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugMarkerObjectTagInfoEXT Type; +}; + +// Map type VkDebugMarkerMarkerInfoEXT to id VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDebugMarkerMarkerInfoEXT Type; +}; + +// Map type VkDedicatedAllocationImageCreateInfoNV to id VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkDedicatedAllocationImageCreateInfoNV Type; +}; + +// Map type VkDedicatedAllocationBufferCreateInfoNV to id VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkDedicatedAllocationBufferCreateInfoNV Type; +}; + +// Map type VkDedicatedAllocationMemoryAllocateInfoNV to id VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkDedicatedAllocationMemoryAllocateInfoNV Type; +}; + +// Map type VkTextureLODGatherFormatPropertiesAMD to id VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD; +}; + +template <> struct LvlSTypeMap { + typedef VkTextureLODGatherFormatPropertiesAMD Type; +}; + +// Map type VkRenderPassMultiviewCreateInfoKHX to id VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkRenderPassMultiviewCreateInfoKHX Type; +}; + +// Map type VkPhysicalDeviceMultiviewFeaturesKHX to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceMultiviewFeaturesKHX Type; +}; + +// Map type VkPhysicalDeviceMultiviewPropertiesKHX to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceMultiviewPropertiesKHX Type; +}; + +// Map type VkExternalMemoryImageCreateInfoNV to id VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkExternalMemoryImageCreateInfoNV Type; +}; + +// Map type VkExportMemoryAllocateInfoNV to id VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkExportMemoryAllocateInfoNV Type; +}; + +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkImportMemoryWin32HandleInfoNV to id VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkImportMemoryWin32HandleInfoNV Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkExportMemoryWin32HandleInfoNV to id VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkExportMemoryWin32HandleInfoNV Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +// Map type VkWin32KeyedMutexAcquireReleaseInfoNV to id VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkWin32KeyedMutexAcquireReleaseInfoNV Type; +}; + +#endif // VK_USE_PLATFORM_WIN32_KHR +// Map type VkMemoryAllocateFlagsInfoKHX to id VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryAllocateFlagsInfoKHX Type; +}; + +// Map type VkDeviceGroupRenderPassBeginInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupRenderPassBeginInfoKHX Type; +}; + +// Map type VkDeviceGroupCommandBufferBeginInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupCommandBufferBeginInfoKHX Type; +}; + +// Map type VkDeviceGroupSubmitInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupSubmitInfoKHX Type; +}; + +// Map type VkDeviceGroupBindSparseInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupBindSparseInfoKHX Type; +}; + +// Map type VkBindBufferMemoryDeviceGroupInfoKHX to id VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkBindBufferMemoryDeviceGroupInfoKHX Type; +}; + +// Map type VkBindImageMemoryDeviceGroupInfoKHX to id VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkBindImageMemoryDeviceGroupInfoKHX Type; +}; + +// Map type VkDeviceGroupPresentCapabilitiesKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupPresentCapabilitiesKHX Type; +}; + +// Map type VkImageSwapchainCreateInfoKHX to id VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkImageSwapchainCreateInfoKHX Type; +}; + +// Map type VkBindImageMemorySwapchainInfoKHX to id VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkBindImageMemorySwapchainInfoKHX Type; +}; + +// Map type VkAcquireNextImageInfoKHX to id VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkAcquireNextImageInfoKHX Type; +}; + +// Map type VkDeviceGroupPresentInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupPresentInfoKHX Type; +}; + +// Map type VkDeviceGroupSwapchainCreateInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupSwapchainCreateInfoKHX Type; +}; + +// Map type VkValidationFlagsEXT to id VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkValidationFlagsEXT Type; +}; + +#ifdef VK_USE_PLATFORM_VI_NN +// Map type VkViSurfaceCreateInfoNN to id VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN; +}; + +template <> struct LvlSTypeMap { + typedef VkViSurfaceCreateInfoNN Type; +}; + +#endif // VK_USE_PLATFORM_VI_NN +// Map type VkPhysicalDeviceGroupPropertiesKHX to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceGroupPropertiesKHX Type; +}; + +// Map type VkDeviceGroupDeviceCreateInfoKHX to id VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGroupDeviceCreateInfoKHX Type; +}; + +// Map type VkDeviceGeneratedCommandsFeaturesNVX to id VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGeneratedCommandsFeaturesNVX Type; +}; + +// Map type VkDeviceGeneratedCommandsLimitsNVX to id VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceGeneratedCommandsLimitsNVX Type; +}; + +// Map type VkIndirectCommandsLayoutCreateInfoNVX to id VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkIndirectCommandsLayoutCreateInfoNVX Type; +}; + +// Map type VkCmdProcessCommandsInfoNVX to id VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkCmdProcessCommandsInfoNVX Type; +}; + +// Map type VkCmdReserveSpaceForCommandsInfoNVX to id VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkCmdReserveSpaceForCommandsInfoNVX Type; +}; + +// Map type VkObjectTableCreateInfoNVX to id VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkObjectTableCreateInfoNVX Type; +}; + +// Map type VkPipelineViewportWScalingStateCreateInfoNV to id VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineViewportWScalingStateCreateInfoNV Type; +}; + +// Map type VkSurfaceCapabilities2EXT to id VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkSurfaceCapabilities2EXT Type; +}; + +// Map type VkDisplayPowerInfoEXT to id VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDisplayPowerInfoEXT Type; +}; + +// Map type VkDeviceEventInfoEXT to id VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceEventInfoEXT Type; +}; + +// Map type VkDisplayEventInfoEXT to id VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDisplayEventInfoEXT Type; +}; + +// Map type VkSwapchainCounterCreateInfoEXT to id VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkSwapchainCounterCreateInfoEXT Type; +}; + +// Map type VkPresentTimesInfoGOOGLE to id VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE; +}; + +template <> struct LvlSTypeMap { + typedef VkPresentTimesInfoGOOGLE Type; +}; + +// Map type VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Type; +}; + +// Map type VkPipelineViewportSwizzleStateCreateInfoNV to id VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineViewportSwizzleStateCreateInfoNV Type; +}; + +// Map type VkPhysicalDeviceDiscardRectanglePropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceDiscardRectanglePropertiesEXT Type; +}; + +// Map type VkPipelineDiscardRectangleStateCreateInfoEXT to id VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineDiscardRectangleStateCreateInfoEXT Type; +}; + +// Map type VkPhysicalDeviceConservativeRasterizationPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceConservativeRasterizationPropertiesEXT Type; +}; + +// Map type VkPipelineRasterizationConservativeStateCreateInfoEXT to id VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineRasterizationConservativeStateCreateInfoEXT Type; +}; + +// Map type VkHdrMetadataEXT to id VK_STRUCTURE_TYPE_HDR_METADATA_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_HDR_METADATA_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkHdrMetadataEXT Type; +}; + +#ifdef VK_USE_PLATFORM_IOS_MVK +// Map type VkIOSSurfaceCreateInfoMVK to id VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK; +}; + +template <> struct LvlSTypeMap { + typedef VkIOSSurfaceCreateInfoMVK Type; +}; + +#endif // VK_USE_PLATFORM_IOS_MVK +#ifdef VK_USE_PLATFORM_MACOS_MVK +// Map type VkMacOSSurfaceCreateInfoMVK to id VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; +}; + +template <> struct LvlSTypeMap { + typedef VkMacOSSurfaceCreateInfoMVK Type; +}; + +#endif // VK_USE_PLATFORM_MACOS_MVK +// Map type VkSamplerReductionModeCreateInfoEXT to id VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkSamplerReductionModeCreateInfoEXT Type; +}; + +// Map type VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT Type; +}; + +// Map type VkSampleLocationsInfoEXT to id VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkSampleLocationsInfoEXT Type; +}; + +// Map type VkRenderPassSampleLocationsBeginInfoEXT to id VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkRenderPassSampleLocationsBeginInfoEXT Type; +}; + +// Map type VkPipelineSampleLocationsStateCreateInfoEXT to id VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineSampleLocationsStateCreateInfoEXT Type; +}; + +// Map type VkPhysicalDeviceSampleLocationsPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceSampleLocationsPropertiesEXT Type; +}; + +// Map type VkMultisamplePropertiesEXT to id VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkMultisamplePropertiesEXT Type; +}; + +// Map type VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT Type; +}; + +// Map type VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT Type; +}; + +// Map type VkPipelineColorBlendAdvancedStateCreateInfoEXT to id VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineColorBlendAdvancedStateCreateInfoEXT Type; +}; + +// Map type VkPipelineCoverageToColorStateCreateInfoNV to id VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineCoverageToColorStateCreateInfoNV Type; +}; + +// Map type VkPipelineCoverageModulationStateCreateInfoNV to id VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV; +}; + +template <> struct LvlSTypeMap { + typedef VkPipelineCoverageModulationStateCreateInfoNV Type; +}; + +// Map type VkValidationCacheCreateInfoEXT to id VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkValidationCacheCreateInfoEXT Type; +}; + +// Map type VkShaderModuleValidationCacheCreateInfoEXT to id VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkShaderModuleValidationCacheCreateInfoEXT Type; +}; + +// Map type VkDeviceQueueGlobalPriorityCreateInfoEXT to id VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkDeviceQueueGlobalPriorityCreateInfoEXT Type; +}; + +// Map type VkImportMemoryHostPointerInfoEXT to id VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkImportMemoryHostPointerInfoEXT Type; +}; + +// Map type VkMemoryHostPointerPropertiesEXT to id VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkMemoryHostPointerPropertiesEXT Type; +}; + +// Map type VkPhysicalDeviceExternalMemoryHostPropertiesEXT to id VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT +template <> struct LvlTypeMap { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT; +}; + +template <> struct LvlSTypeMap { + typedef VkPhysicalDeviceExternalMemoryHostPropertiesEXT Type; +}; + +// Header "base class" for pNext chain traversal +struct LvlGenericHeader { + VkStructureType sType; + const LvlGenericHeader *pNext; +}; + +// Find an entry of the given type in the pNext chain +template const T *lvl_find_in_chain(const void *next) { + const LvlGenericHeader *current = reinterpret_cast(next); + const T *found = nullptr; + while (current) { + if (LvlTypeMap::kSType == current->sType) { + found = reinterpret_cast(current); + current = nullptr; + } else { + current = current->pNext; + } + } + return found; +} + +// Init the header of an sType struct with pNext +template T lvl_init_struct(void *p_next) { + T out = {}; + out.sType = LvlTypeMap::kSType; + out.pNext = p_next; + return out; +} + +// Init the header of an sType struct +template T lvl_init_struct() { + T out = {}; + out.sType = LvlTypeMap::kSType; + return out; +} + diff --git a/sources/third_party/vulkan/src/build-android/glslang_revision_android b/sources/third_party/vulkan/src/build-android/glslang_revision_android index dfc978c0a7630be5c736c6cbb7f8de58f578c847..8843893c58a8fb0edda1a8b4e41cff45e8cca730 100644 --- a/sources/third_party/vulkan/src/build-android/glslang_revision_android +++ b/sources/third_party/vulkan/src/build-android/glslang_revision_android @@ -1 +1 @@ -3a21c880500eac21cdf79bef5b80f970a55ac6af +23ea3db3e5ea16b4964e9e3b5fee88bfc267fc57 diff --git a/sources/third_party/vulkan/src/build-android/jni/Android.mk b/sources/third_party/vulkan/src/build-android/jni/Android.mk index 11b47592b008b7844fc6d57f7eff4db03fb819b9..cbdc8c10064dc0da8adc5c7b90e1bf4fe57944ea 100644 --- a/sources/third_party/vulkan/src/build-android/jni/Android.mk +++ b/sources/third_party/vulkan/src/build-android/jni/Android.mk @@ -27,7 +27,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(LAYER_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/layers \ $(LOCAL_PATH)/$(SRC_DIR)/loader -LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden include $(BUILD_STATIC_LIBRARY) @@ -38,12 +38,13 @@ LOCAL_SRC_FILES += $(SRC_DIR)/layers/descriptor_sets.cpp LOCAL_SRC_FILES += $(SRC_DIR)/layers/buffer_validation.cpp LOCAL_SRC_FILES += $(SRC_DIR)/layers/shader_validation.cpp LOCAL_SRC_FILES += $(SRC_DIR)/layers/vk_layer_table.cpp +LOCAL_SRC_FILES += $(SRC_DIR)/layers/xxhash.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/layers \ $(LOCAL_PATH)/$(LAYER_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/loader LOCAL_STATIC_LIBRARIES += layer_utils glslang SPIRV-Tools -LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -60,7 +61,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/layers \ $(LOCAL_PATH)/$(SRC_DIR)/loader LOCAL_STATIC_LIBRARIES += layer_utils -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -77,7 +78,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(LAYER_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/loader LOCAL_STATIC_LIBRARIES += layer_utils -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -93,7 +94,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(LAYER_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/loader LOCAL_STATIC_LIBRARIES += layer_utils -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -109,7 +110,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(LAYER_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/loader LOCAL_STATIC_LIBRARIES += layer_utils -LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_PROTOTYPES -fvisibility=hidden LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -130,7 +131,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/common LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden --include=$(SRC_DIR)/common/vulkan_wrapper.h LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,-Bsymbolic @@ -152,7 +153,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/common LOCAL_STATIC_LIBRARIES := googletest_main layer_utils shaderc -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden -DVALIDATION_APK --include=$(SRC_DIR)/common/vulkan_wrapper.h LOCAL_WHOLE_STATIC_LIBRARIES += android_native_app_glue LOCAL_LDLIBS := -llog -landroid @@ -169,7 +170,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/include \ $(LOCAL_PATH)/$(SRC_DIR)/libs/cjson/includes \ $(LOCAL_PATH)/$(SRC_DIR)/loader -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -fvisibility=hidden --include=$(SRC_DIR)/common/vulkan_wrapper.h include $(BUILD_STATIC_LIBRARY) @@ -181,7 +182,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SRC_DIR)/loader \ $(LOCAL_PATH)/$(SRC_DIR)/include LOCAL_STATIC_LIBRARIES += vkjson -LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable -mxgot +LOCAL_CPPFLAGS += -std=c++11 -DVK_PROTOTYPES -Wall -Werror -Wno-unused-function -Wno-unused-const-variable LOCAL_CPPFLAGS += -Wno-sign-compare -DVK_USE_PLATFORM_ANDROID_KHR --include=$(SRC_DIR)/common/vulkan_wrapper.h LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -Wl,--exclude-libs,ALL diff --git a/sources/third_party/vulkan/src/build-android/jni/Application.mk b/sources/third_party/vulkan/src/build-android/jni/Application.mk index c83044eb1f586885d700ce86c4a8b7f1f34f06cc..a80a35734f057d944dbcfdb0d45ebee34b15a30c 100644 --- a/sources/third_party/vulkan/src/build-android/jni/Application.mk +++ b/sources/third_party/vulkan/src/build-android/jni/Application.mk @@ -13,9 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 mips mips64 +APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 APP_PLATFORM := android-22 -APP_STL := gnustl_static -APP_MODULES := layer_utils VkLayer_core_validation VkLayer_parameter_validation VkLayer_object_tracker VkLayer_threading VkLayer_unique_objects VkLayerValidationTests VulkanLayerValidationTests vkjson_info +APP_STL := c++_static NDK_TOOLCHAIN_VERSION := clang NDK_MODULE_PATH := . diff --git a/sources/third_party/vulkan/src/build-android/jni/shaderc/Application.mk b/sources/third_party/vulkan/src/build-android/jni/shaderc/Application.mk new file mode 100644 index 0000000000000000000000000000000000000000..5447415eb5fd7bcc4452a60eba2d627d1378395c --- /dev/null +++ b/sources/third_party/vulkan/src/build-android/jni/shaderc/Application.mk @@ -0,0 +1,4 @@ +APP_ABI := all +APP_BUILD_SCRIPT := Android.mk +APP_STL := c++_static +APP_PLATFORM := android-23 diff --git a/sources/third_party/vulkan/src/build-android/shaderc_revision_android b/sources/third_party/vulkan/src/build-android/shaderc_revision_android index bf6696c6835d1d35c90c356ff625bda7287e3853..d65bc865df63064be7a20d6a80aa1433728b0cf6 100644 --- a/sources/third_party/vulkan/src/build-android/shaderc_revision_android +++ b/sources/third_party/vulkan/src/build-android/shaderc_revision_android @@ -1 +1 @@ -12fb656ab20ea9aa06e7084a74e5ff832b7ce2da +563bc6e87a43c38b5495469307922c768edbd191 diff --git a/sources/third_party/vulkan/src/build-android/spirv-headers_revision_android b/sources/third_party/vulkan/src/build-android/spirv-headers_revision_android index 9ef133d0264154e4701121d9cdb844714d7fc4b7..f6cc8e506ffc3e128eee274a62dbc99e31b955a2 100644 --- a/sources/third_party/vulkan/src/build-android/spirv-headers_revision_android +++ b/sources/third_party/vulkan/src/build-android/spirv-headers_revision_android @@ -1 +1 @@ -2bb92e6fe2c6aa410152fc6c63443f452acb1a65 +ce309203d7eceaf908bea8862c27f3e0749f7d00 diff --git a/sources/third_party/vulkan/src/build-android/spirv-tools_revision_android b/sources/third_party/vulkan/src/build-android/spirv-tools_revision_android index 8070b7962535eac093f91faccd7bb7d435c55057..9f033b45ccc5250035a2d8804b470ed0ec15780a 100644 --- a/sources/third_party/vulkan/src/build-android/spirv-tools_revision_android +++ b/sources/third_party/vulkan/src/build-android/spirv-tools_revision_android @@ -1 +1 @@ -7e2d26c77b606b21af839b37fd21381c4a669f23 +5d442fad2f00fcca8354aaaa9bfd36be8c418a1b diff --git a/sources/third_party/vulkan/src/build-android/update_external_sources_android.bat b/sources/third_party/vulkan/src/build-android/update_external_sources_android.bat index 16ce1ce8463c2c3341b01e3b3238880eac5af8c0..5ee83f370ccaf6517a851112927cfc48f819e985 100755 --- a/sources/third_party/vulkan/src/build-android/update_external_sources_android.bat +++ b/sources/third_party/vulkan/src/build-android/update_external_sources_android.bat @@ -1,289 +1,289 @@ -@echo off -REM Update source for glslang, spirv-tools, and shaderc - -REM -REM Copyright 2016 The Android Open Source Project -REM Copyright (C) 2015 Valve Corporation -REM -REM Licensed under the Apache License, Version 2.0 (the "License"); -REM you may not use this file except in compliance with the License. -REM You may obtain a copy of the License at -REM -REM http://www.apache.org/licenses/LICENSE-2.0 -REM -REM Unless required by applicable law or agreed to in writing, software -REM distributed under the License is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM See the License for the specific language governing permissions and -REM limitations under the License. -REM - -setlocal EnableDelayedExpansion -set errorCode=0 -set ANDROID_BUILD_DIR=%~dp0 -set BUILD_DIR=%ANDROID_BUILD_DIR% -set BASE_DIR=%BUILD_DIR%\third_party -set GLSLANG_DIR=%BASE_DIR%\shaderc\third_party\glslang -set SPIRV_TOOLS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools -set SPIRV_HEADERS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools\external\spirv-headers -set SHADERC_DIR=%BASE_DIR%\shaderc - -for %%X in (where.exe) do (set FOUND=%%~$PATH:X) -if not defined FOUND ( - echo Dependency check failed: - echo where.exe not found - echo This script requires Windows Vista or later, which includes where.exe. - set errorCode=1 -) - -where /q git.exe -if %ERRORLEVEL% equ 1 ( - echo Dependency check failed: - echo git.exe not found - echo Git for Windows can be downloaded here: https://git-scm.com/download/win - echo Install and ensure git.exe makes it into your PATH - set errorCode=1 -) - -where /q ndk-build.cmd -if %ERRORLEVEL% equ 1 ( - echo Dependency check failed: - echo ndk-build.cmd not found - echo Android NDK can be downloaded here: http://developer.android.com/ndk/guides/setup.html - echo Install and ensure ndk-build.cmd makes it into your PATH - set errorCode=1 -) - -REM ensure where is working with below false test -REM where /q foo -REM if %ERRORLEVEL% equ 1 ( -REM echo foo -REM ) - -:main - -if %errorCode% neq 0 (goto:error) - -REM Read the target versions from external file, which is shared with Linux script - -if not exist %ANDROID_BUILD_DIR%\glslang_revision_android ( - echo. - echo Missing glslang_revision_android file. Place it in %ANDROID_BUILD_DIR% - goto:error -) - -if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android ( - echo. - echo Missing spirv-tools_revision_android file. Place it in %ANDROID_BUILD_DIR% - set errorCode=1 - goto:error -) - -if not exist %ANDROID_BUILD_DIR%\spirv-headers_revision_android ( - echo. - echo Missing spirv-headers_revision_android file. Place it in %ANDROID_BUILD_DIR% - set errorCode=1 - goto:error -) - -if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android ( - echo. - echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR% - set errorCode=1 - goto:error -) - -set /p GLSLANG_REVISION= < glslang_revision_android -set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android -set /p SPIRV_HEADERS_REVISION= < spirv-headers_revision_android -set /p SHADERC_REVISION= < shaderc_revision_android -echo GLSLANG_REVISION=%GLSLANG_REVISION% -echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION% -echo SPIRV_HEADERS_REVISION=%SPIRV_HEADERS_REVISION% -echo SHADERC_REVISION=%SHADERC_REVISION% - - -echo Creating and/or updating glslang, spirv-tools, spirv-headers, shaderc in %BASE_DIR% - -set sync-glslang=1 -set sync-spirv-tools=1 -set sync-spirv-headers=1 -set sync-shaderc=1 -set build-shaderc=1 - -if %sync-shaderc% equ 1 ( - if not exist %SHADERC_DIR% ( - call:create_shaderc - ) - if %errorCode% neq 0 (goto:error) - call:update_shaderc - if %errorCode% neq 0 (goto:error) -) - -if %sync-glslang% equ 1 ( - if not exist %GLSLANG_DIR% ( - call:create_glslang - ) - if %errorCode% neq 0 (goto:error) - call:update_glslang - if %errorCode% neq 0 (goto:error) -) - -if %sync-spirv-tools% equ 1 ( - if %ERRORLEVEL% neq 0 (goto:error) - if not exist %SPIRV_TOOLS_DIR% ( - call:create_spirv-tools - ) - if %errorCode% neq 0 (goto:error) - call:update_spirv-tools - if %errorCode% neq 0 (goto:error) -) - -if %sync-spirv-headers% equ 1 ( - if %ERRORLEVEL% neq 0 (goto:error) - if not exist %SPIRV_HEADERS_DIR% ( - call:create_spirv-headers - ) - if %errorCode% neq 0 (goto:error) - call:update_spirv-headers - if %errorCode% neq 0 (goto:error) -) - -if %build-shaderc% equ 1 ( - call:build_shaderc - if %errorCode% neq 0 (goto:error) -) - -echo. -echo Exiting -goto:finish - -:error -echo. -echo Halting due to error -goto:finish - -:finish -if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% ) -endlocal -REM This needs a fix to return error, something like exit %errorCode% -REM Right now it is returning 0 -goto:eof - - - -REM // ======== Functions ======== // - -:create_glslang - echo. - echo Creating local glslang repository %GLSLANG_DIR% - if not exist "%GLSLANG_DIR%\" mkdir %GLSLANG_DIR% - cd %GLSLANG_DIR% - git clone https://github.com/KhronosGroup/glslang.git . - git checkout %GLSLANG_REVISION% - if not exist %GLSLANG_DIR%\SPIRV ( - echo glslang source download failed! - set errorCode=1 - ) -goto:eof - -:update_glslang - echo. - echo Updating %GLSLANG_DIR% - cd %GLSLANG_DIR% - git fetch --all - git checkout %GLSLANG_REVISION% - if not exist %GLSLANG_DIR%\SPIRV ( - echo glslang source update failed! - set errorCode=1 - ) -goto:eof - -:create_spirv-tools - echo. - echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR% - if not exist "%SPIRV_TOOLS_DIR%\" mkdir %SPIRV_TOOLS_DIR% - cd %SPIRV_TOOLS_DIR% - git clone https://github.com/KhronosGroup/SPIRV-Tools.git . - git checkout %SPIRV_TOOLS_REVISION% - if not exist %SPIRV_TOOLS_DIR%\source ( - echo spirv-tools source download failed! - set errorCode=1 - ) -goto:eof - -:update_spirv-tools - echo. - echo Updating %SPIRV_TOOLS_DIR% - cd %SPIRV_TOOLS_DIR% - git fetch --all - git checkout %SPIRV_TOOLS_REVISION% - if not exist %SPIRV_TOOLS_DIR%\source ( - echo spirv-tools source update failed! - set errorCode=1 - ) -goto:eof - -:create_spirv-headers - echo. - echo Creating local spirv-headers repository %SPIRV_HEADERS_DIR% - if not exist "%SPIRV_HEADERS_DIR%\" mkdir %SPIRV_HEADERS_DIR% - cd %SPIRV_HEADERS_DIR% - git clone https://github.com/KhronosGroup/SPIRV-Headers.git . - git checkout %SPIRV_HEADERS_REVISION% - if not exist %SPIRV_HEADERS_DIR%\include ( - echo spirv-headers source download failed! - set errorCode=1 - ) -goto:eof - -:update_spirv-headers - echo. - echo Updating %SPIRV_HEADERS_DIR% - cd %SPIRV_HEADERS_DIR% - git fetch --all - git checkout %SPIRV_HEADERS_REVISION% - if not exist %SPIRV_HEADERS_DIR%\include ( - echo spirv-headers source update failed! - set errorCode=1 - ) -goto:eof - -:create_shaderc - echo. - echo Creating local shaderc repository %SHADERC_DIR% - if not exist "%SHADERC_DIR%\" mkdir %SHADERC_DIR% - cd %SHADERC_DIR% - git clone https://github.com/google/shaderc.git . - git checkout %SHADERC_REVISION% - if not exist %SHADERC_DIR%\libshaderc ( - echo shaderc source download failed! - set errorCode=1 - ) -goto:eof - -:update_shaderc - echo. - echo Updating %SHADERC_DIR% - cd %SHADERC_DIR% - git fetch --all - git checkout %SHADERC_REVISION% - if not exist %SHADERC_DIR%\libshaderc ( - echo shaderc source update failed! - set errorCode=1 - ) -goto:eof - -:build_shaderc - echo. - echo Building %SHADERC_DIR% - cd %SHADERC_DIR%\android_test - echo Building shaderc with Android NDK - call ndk-build THIRD_PARTY_PATH=../third_party -j 4 - REM Check for existence of one lib, even though we should check for all results - if not exist %SHADERC_DIR%\android_test\obj\local\x86\libshaderc.a ( - echo. - echo shaderc build failed! - set errorCode=1 - ) -goto:eof +@echo off +REM Update source for glslang, spirv-tools, and shaderc + +REM +REM Copyright 2016 The Android Open Source Project +REM Copyright (C) 2015 Valve Corporation +REM +REM Licensed under the Apache License, Version 2.0 (the "License"); +REM you may not use this file except in compliance with the License. +REM You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. +REM + +setlocal EnableDelayedExpansion +set errorCode=0 +set ANDROID_BUILD_DIR=%~dp0 +set BUILD_DIR=%ANDROID_BUILD_DIR% +set BASE_DIR=%BUILD_DIR%\third_party +set GLSLANG_DIR=%BASE_DIR%\shaderc\third_party\glslang +set SPIRV_TOOLS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools +set SPIRV_HEADERS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools\external\spirv-headers +set SHADERC_DIR=%BASE_DIR%\shaderc + +for %%X in (where.exe) do (set FOUND=%%~$PATH:X) +if not defined FOUND ( + echo Dependency check failed: + echo where.exe not found + echo This script requires Windows Vista or later, which includes where.exe. + set errorCode=1 +) + +where /q git.exe +if %ERRORLEVEL% equ 1 ( + echo Dependency check failed: + echo git.exe not found + echo Git for Windows can be downloaded here: https://git-scm.com/download/win + echo Install and ensure git.exe makes it into your PATH + set errorCode=1 +) + +where /q ndk-build.cmd +if %ERRORLEVEL% equ 1 ( + echo Dependency check failed: + echo ndk-build.cmd not found + echo Android NDK can be downloaded here: http://developer.android.com/ndk/guides/setup.html + echo Install and ensure ndk-build.cmd makes it into your PATH + set errorCode=1 +) + +REM ensure where is working with below false test +REM where /q foo +REM if %ERRORLEVEL% equ 1 ( +REM echo foo +REM ) + +:main + +if %errorCode% neq 0 (goto:error) + +REM Read the target versions from external file, which is shared with Linux script + +if not exist %ANDROID_BUILD_DIR%\glslang_revision_android ( + echo. + echo Missing glslang_revision_android file. Place it in %ANDROID_BUILD_DIR% + goto:error +) + +if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android ( + echo. + echo Missing spirv-tools_revision_android file. Place it in %ANDROID_BUILD_DIR% + set errorCode=1 + goto:error +) + +if not exist %ANDROID_BUILD_DIR%\spirv-headers_revision_android ( + echo. + echo Missing spirv-headers_revision_android file. Place it in %ANDROID_BUILD_DIR% + set errorCode=1 + goto:error +) + +if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android ( + echo. + echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR% + set errorCode=1 + goto:error +) + +set /p GLSLANG_REVISION= < glslang_revision_android +set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android +set /p SPIRV_HEADERS_REVISION= < spirv-headers_revision_android +set /p SHADERC_REVISION= < shaderc_revision_android +echo GLSLANG_REVISION=%GLSLANG_REVISION% +echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION% +echo SPIRV_HEADERS_REVISION=%SPIRV_HEADERS_REVISION% +echo SHADERC_REVISION=%SHADERC_REVISION% + + +echo Creating and/or updating glslang, spirv-tools, spirv-headers, shaderc in %BASE_DIR% + +set sync-glslang=1 +set sync-spirv-tools=1 +set sync-spirv-headers=1 +set sync-shaderc=1 +set build-shaderc=1 + +if %sync-shaderc% equ 1 ( + if not exist %SHADERC_DIR% ( + call:create_shaderc + ) + if %errorCode% neq 0 (goto:error) + call:update_shaderc + if %errorCode% neq 0 (goto:error) +) + +if %sync-glslang% equ 1 ( + if not exist %GLSLANG_DIR% ( + call:create_glslang + ) + if %errorCode% neq 0 (goto:error) + call:update_glslang + if %errorCode% neq 0 (goto:error) +) + +if %sync-spirv-tools% equ 1 ( + if %ERRORLEVEL% neq 0 (goto:error) + if not exist %SPIRV_TOOLS_DIR% ( + call:create_spirv-tools + ) + if %errorCode% neq 0 (goto:error) + call:update_spirv-tools + if %errorCode% neq 0 (goto:error) +) + +if %sync-spirv-headers% equ 1 ( + if %ERRORLEVEL% neq 0 (goto:error) + if not exist %SPIRV_HEADERS_DIR% ( + call:create_spirv-headers + ) + if %errorCode% neq 0 (goto:error) + call:update_spirv-headers + if %errorCode% neq 0 (goto:error) +) + +if %build-shaderc% equ 1 ( + call:build_shaderc + if %errorCode% neq 0 (goto:error) +) + +echo. +echo Exiting +goto:finish + +:error +echo. +echo Halting due to error +goto:finish + +:finish +if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% ) +endlocal +REM This needs a fix to return error, something like exit %errorCode% +REM Right now it is returning 0 +goto:eof + + + +REM // ======== Functions ======== // + +:create_glslang + echo. + echo Creating local glslang repository %GLSLANG_DIR% + if not exist "%GLSLANG_DIR%\" mkdir %GLSLANG_DIR% + cd %GLSLANG_DIR% + git clone https://github.com/KhronosGroup/glslang.git . + git checkout %GLSLANG_REVISION% + if not exist %GLSLANG_DIR%\SPIRV ( + echo glslang source download failed! + set errorCode=1 + ) +goto:eof + +:update_glslang + echo. + echo Updating %GLSLANG_DIR% + cd %GLSLANG_DIR% + git fetch --all + git checkout %GLSLANG_REVISION% + if not exist %GLSLANG_DIR%\SPIRV ( + echo glslang source update failed! + set errorCode=1 + ) +goto:eof + +:create_spirv-tools + echo. + echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR% + if not exist "%SPIRV_TOOLS_DIR%\" mkdir %SPIRV_TOOLS_DIR% + cd %SPIRV_TOOLS_DIR% + git clone https://github.com/KhronosGroup/SPIRV-Tools.git . + git checkout %SPIRV_TOOLS_REVISION% + if not exist %SPIRV_TOOLS_DIR%\source ( + echo spirv-tools source download failed! + set errorCode=1 + ) +goto:eof + +:update_spirv-tools + echo. + echo Updating %SPIRV_TOOLS_DIR% + cd %SPIRV_TOOLS_DIR% + git fetch --all + git checkout %SPIRV_TOOLS_REVISION% + if not exist %SPIRV_TOOLS_DIR%\source ( + echo spirv-tools source update failed! + set errorCode=1 + ) +goto:eof + +:create_spirv-headers + echo. + echo Creating local spirv-headers repository %SPIRV_HEADERS_DIR% + if not exist "%SPIRV_HEADERS_DIR%\" mkdir %SPIRV_HEADERS_DIR% + cd %SPIRV_HEADERS_DIR% + git clone https://github.com/KhronosGroup/SPIRV-Headers.git . + git checkout %SPIRV_HEADERS_REVISION% + if not exist %SPIRV_HEADERS_DIR%\include ( + echo spirv-headers source download failed! + set errorCode=1 + ) +goto:eof + +:update_spirv-headers + echo. + echo Updating %SPIRV_HEADERS_DIR% + cd %SPIRV_HEADERS_DIR% + git fetch --all + git checkout %SPIRV_HEADERS_REVISION% + if not exist %SPIRV_HEADERS_DIR%\include ( + echo spirv-headers source update failed! + set errorCode=1 + ) +goto:eof + +:create_shaderc + echo. + echo Creating local shaderc repository %SHADERC_DIR% + if not exist "%SHADERC_DIR%\" mkdir %SHADERC_DIR% + cd %SHADERC_DIR% + git clone https://github.com/google/shaderc.git . + git checkout %SHADERC_REVISION% + if not exist %SHADERC_DIR%\libshaderc ( + echo shaderc source download failed! + set errorCode=1 + ) +goto:eof + +:update_shaderc + echo. + echo Updating %SHADERC_DIR% + cd %SHADERC_DIR% + git fetch --all + git checkout %SHADERC_REVISION% + if not exist %SHADERC_DIR%\libshaderc ( + echo shaderc source update failed! + set errorCode=1 + ) +goto:eof + +:build_shaderc + echo. + echo Building %SHADERC_DIR% + cd %SHADERC_DIR%\android_test + echo Building shaderc with Android NDK + call ndk-build NDK_APPLICATION_MK=../../../jni/shaderc/Application.mk THIRD_PARTY_PATH=../third_party -j 4 + REM Check for existence of one lib, even though we should check for all results + if not exist %SHADERC_DIR%\android_test\obj\local\x86\libshaderc.a ( + echo. + echo shaderc build failed! + set errorCode=1 + ) +goto:eof diff --git a/sources/third_party/vulkan/src/build-android/update_external_sources_android.sh b/sources/third_party/vulkan/src/build-android/update_external_sources_android.sh index 3f0c9bf642e1cef7822a4203fb5b673a176d701e..3d55728a1bc072e30873825545084478a718f5ff 100755 --- a/sources/third_party/vulkan/src/build-android/update_external_sources_android.sh +++ b/sources/third_party/vulkan/src/build-android/update_external_sources_android.sh @@ -55,20 +55,12 @@ fi function printUsage { echo "Supported parameters are:" echo " --abi (optional)" + echo " --no-build (optional)" echo echo "i.e. ${0##*/} --abi arm64-v8a \\" exit 1 } -if [[ $(($# % 2)) -ne 0 ]] -then - echo Parameters must be provided in pairs. - echo parameter count = $# - echo - printUsage - exit 1 -fi - while [[ $# -gt 0 ]] do case $1 in @@ -76,6 +68,10 @@ do abi="$2" shift 2 ;; + --no-build) + nobuild=1 + shift 1 + ;; *) # unknown option echo Unknown option: $1 @@ -92,6 +88,12 @@ then echo No abi provided, so building for all supported abis. fi +echo no-build=$nobuild +if [[ $nobuild ]] +then + echo Skipping build. +fi + function create_glslang () { rm -rf $BASEDIR/shaderc/third_party/glslang echo "Creating local glslang repository ($BASEDIR/glslang)." @@ -180,9 +182,9 @@ function build_shaderc () { echo "Building $BASEDIR/shaderc" cd $BASEDIR/shaderc/android_test if [[ $abi ]]; then - ndk-build THIRD_PARTY_PATH=../third_party APP_ABI=$abi -j $cores; + ndk-build NDK_APPLICATION_MK=../../../jni/shaderc/Application.mk THIRD_PARTY_PATH=../third_party APP_ABI=$abi -j $cores; else - ndk-build THIRD_PARTY_PATH=../third_party -j $cores; + ndk-build NDK_APPLICATION_MK=../../../jni/shaderc/Application.mk THIRD_PARTY_PATH=../third_party -j $cores; fi } @@ -206,7 +208,10 @@ if [ ! -d "$BASEDIR/shaderc/third_party/spirv-tools/external/spirv-headers" -o ! fi update_spirv-headers +if [[ -z $nobuild ]] +then build_shaderc +fi echo "" echo "${0##*/} finished." diff --git a/sources/third_party/vulkan/src/common/android_util.cpp b/sources/third_party/vulkan/src/common/android_util.cpp index 664bcd0f6f2a7193fe4735976b41283d080d89fe..173e8ab812b7c3ed72c94abf0d8a75671e631eae 100644 --- a/sources/third_party/vulkan/src/common/android_util.cpp +++ b/sources/third_party/vulkan/src/common/android_util.cpp @@ -19,6 +19,7 @@ #include "android_util.h" #include #include +#include #include #include #include diff --git a/sources/third_party/vulkan/src/include/vulkan/vk_icd.h b/sources/third_party/vulkan/src/include/vulkan/vk_icd.h index b8c7efcb6bb5dc7d53a67f9ea037ef0a145bd9d9..35956a34fde560f68c1cded03d6d8f1b78d5cab6 100644 --- a/sources/third_party/vulkan/src/include/vulkan/vk_icd.h +++ b/sources/third_party/vulkan/src/include/vulkan/vk_icd.h @@ -44,12 +44,12 @@ #define CURRENT_LOADER_ICD_INTERFACE_VERSION 5 #define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0 #define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4 -typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); +typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); // This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this // file directly, it won't be found. #ifndef PFN_GetPhysicalDeviceProcAddr -typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); +typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName); #endif /* @@ -85,6 +85,9 @@ typedef enum { VK_ICD_WSI_PLATFORM_WIN32, VK_ICD_WSI_PLATFORM_XCB, VK_ICD_WSI_PLATFORM_XLIB, + VK_ICD_WSI_PLATFORM_ANDROID, + VK_ICD_WSI_PLATFORM_MACOS, + VK_ICD_WSI_PLATFORM_IOS, VK_ICD_WSI_PLATFORM_DISPLAY } VkIcdWsiPlatform; @@ -98,7 +101,7 @@ typedef struct { MirConnection *connection; MirSurface *mirSurface; } VkIcdSurfaceMir; -#endif // VK_USE_PLATFORM_MIR_KHR +#endif // VK_USE_PLATFORM_MIR_KHR #ifdef VK_USE_PLATFORM_WAYLAND_KHR typedef struct { @@ -106,7 +109,7 @@ typedef struct { struct wl_display *display; struct wl_surface *surface; } VkIcdSurfaceWayland; -#endif // VK_USE_PLATFORM_WAYLAND_KHR +#endif // VK_USE_PLATFORM_WAYLAND_KHR #ifdef VK_USE_PLATFORM_WIN32_KHR typedef struct { @@ -114,7 +117,7 @@ typedef struct { HINSTANCE hinstance; HWND hwnd; } VkIcdSurfaceWin32; -#endif // VK_USE_PLATFORM_WIN32_KHR +#endif // VK_USE_PLATFORM_WIN32_KHR #ifdef VK_USE_PLATFORM_XCB_KHR typedef struct { @@ -122,7 +125,7 @@ typedef struct { xcb_connection_t *connection; xcb_window_t window; } VkIcdSurfaceXcb; -#endif // VK_USE_PLATFORM_XCB_KHR +#endif // VK_USE_PLATFORM_XCB_KHR #ifdef VK_USE_PLATFORM_XLIB_KHR typedef struct { @@ -130,13 +133,28 @@ typedef struct { Display *dpy; Window window; } VkIcdSurfaceXlib; -#endif // VK_USE_PLATFORM_XLIB_KHR +#endif // VK_USE_PLATFORM_XLIB_KHR #ifdef VK_USE_PLATFORM_ANDROID_KHR typedef struct { - ANativeWindow* window; + VkIcdSurfaceBase base; + ANativeWindow *window; } VkIcdSurfaceAndroid; -#endif //VK_USE_PLATFORM_ANDROID_KHR +#endif // VK_USE_PLATFORM_ANDROID_KHR + +#ifdef VK_USE_PLATFORM_MACOS_MVK +typedef struct { + VkIcdSurfaceBase base; + const void *pView; +} VkIcdSurfaceMacOS; +#endif // VK_USE_PLATFORM_MACOS_MVK + +#ifdef VK_USE_PLATFORM_IOS_MVK +typedef struct { + VkIcdSurfaceBase base; + const void *pView; +} VkIcdSurfaceIOS; +#endif // VK_USE_PLATFORM_IOS_MVK typedef struct { VkIcdSurfaceBase base; @@ -149,4 +167,4 @@ typedef struct { VkExtent2D imageExtent; } VkIcdSurfaceDisplay; -#endif // VKICD_H +#endif // VKICD_H diff --git a/sources/third_party/vulkan/src/include/vulkan/vk_layer.h b/sources/third_party/vulkan/src/include/vulkan/vk_layer.h index a7ac2915028396824ed8968cf3522cbdc4bbe43c..147dcd43ab37bed9b7aafaa3160d0cae31bd05a4 100644 --- a/sources/third_party/vulkan/src/include/vulkan/vk_layer.h +++ b/sources/third_party/vulkan/src/include/vulkan/vk_layer.h @@ -48,6 +48,8 @@ #define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2 #define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1 +#define VK_CURRENT_CHAIN_VERSION 1 + // Version negotiation values typedef enum VkNegotiateLayerStructType { LAYER_NEGOTIATE_UNINTIALIZED = 0, @@ -138,6 +140,43 @@ extern "C" { VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); +typedef enum VkChainType { + VK_CHAIN_TYPE_UNKNOWN = 0, + VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1, + VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2, +} VkChainType; + +typedef struct VkChainHeader { + VkChainType type; + uint32_t version; + uint32_t size; +} VkChainHeader; + +typedef struct VkEnumerateInstanceExtensionPropertiesChain { + VkChainHeader header; + VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *, + VkExtensionProperties *); + const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink; + +#if defined(__cplusplus) + inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const { + return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties); + } +#endif +} VkEnumerateInstanceExtensionPropertiesChain; + +typedef struct VkEnumerateInstanceLayerPropertiesChain { + VkChainHeader header; + VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *); + const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink; + +#if defined(__cplusplus) + inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const { + return pfnNextLayer(pNextLink, pPropertyCount, pProperties); + } +#endif +} VkEnumerateInstanceLayerPropertiesChain; + #ifdef __cplusplus } #endif diff --git a/sources/third_party/vulkan/src/include/vulkan/vk_sdk_platform.h b/sources/third_party/vulkan/src/include/vulkan/vk_sdk_platform.h index ef9a000fb2436e296a65ab15dc170820b16a7068..96d8676949e5622df597ccd4d374835d1a5f8d7e 100644 --- a/sources/third_party/vulkan/src/include/vulkan/vk_sdk_platform.h +++ b/sources/third_party/vulkan/src/include/vulkan/vk_sdk_platform.h @@ -43,4 +43,27 @@ #endif // _WIN32 -#endif // VK_SDK_PLATFORM_H +// Check for noexcept support using clang, with fallback to Windows or GCC version numbers +#ifndef NOEXCEPT +#if defined(__clang__) +#if __has_feature(cxx_noexcept) +#define HAS_NOEXCEPT +#endif +#else +#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 +#define HAS_NOEXCEPT +#else +#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS +#define HAS_NOEXCEPT +#endif +#endif +#endif + +#ifdef HAS_NOEXCEPT +#define NOEXCEPT noexcept +#else +#define NOEXCEPT +#endif +#endif + +#endif // VK_SDK_PLATFORM_H diff --git a/sources/third_party/vulkan/src/include/vulkan/vulkan.h b/sources/third_party/vulkan/src/include/vulkan/vulkan.h index 4cf2c2176b8b4bce587aeb23a50062d7be57113d..5253f98f23e7a880d6106e28f1847977cef41c0d 100644 --- a/sources/third_party/vulkan/src/include/vulkan/vulkan.h +++ b/sources/third_party/vulkan/src/include/vulkan/vulkan.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2015-2017 The Khronos Group Inc. +** Copyright (c) 2015-2018 The Khronos Group Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 62 +#define VK_HEADER_VERSION 69 #define VK_NULL_HANDLE 0 @@ -147,6 +147,7 @@ typedef enum VkResult { VK_ERROR_INVALID_SHADER_NV = -1000012000, VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = -1000072003, + VK_ERROR_NOT_PERMITTED_EXT = -1000174001, VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL, VK_RESULT_END_RANGE = VK_INCOMPLETE, VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1), @@ -303,6 +304,8 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000, @@ -353,6 +356,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = 1000157001, VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, + VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO, VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), @@ -4193,6 +4200,9 @@ typedef enum VkExternalMemoryHandleTypeFlagBitsKHR { VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkExternalMemoryHandleTypeFlagBitsKHR; typedef VkFlags VkExternalMemoryHandleTypeFlagsKHR; @@ -5192,7 +5202,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) -#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 8 +#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" #define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT #define VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT @@ -5232,12 +5242,12 @@ typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, - VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33, + VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000, VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1), + VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1), VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportObjectTypeEXT; @@ -5486,6 +5496,52 @@ typedef struct VkTextureLODGatherFormatPropertiesAMD { +#define VK_AMD_shader_info 1 +#define VK_AMD_SHADER_INFO_SPEC_VERSION 1 +#define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info" + + +typedef enum VkShaderInfoTypeAMD { + VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, + VK_SHADER_INFO_TYPE_BINARY_AMD = 1, + VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, + VK_SHADER_INFO_TYPE_BEGIN_RANGE_AMD = VK_SHADER_INFO_TYPE_STATISTICS_AMD, + VK_SHADER_INFO_TYPE_END_RANGE_AMD = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD, + VK_SHADER_INFO_TYPE_RANGE_SIZE_AMD = (VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD - VK_SHADER_INFO_TYPE_STATISTICS_AMD + 1), + VK_SHADER_INFO_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF +} VkShaderInfoTypeAMD; + +typedef struct VkShaderResourceUsageAMD { + uint32_t numUsedVgprs; + uint32_t numUsedSgprs; + uint32_t ldsSizePerLocalWorkGroup; + size_t ldsUsageSizeInBytes; + size_t scratchMemUsageInBytes; +} VkShaderResourceUsageAMD; + +typedef struct VkShaderStatisticsInfoAMD { + VkShaderStageFlags shaderStageMask; + VkShaderResourceUsageAMD resourceUsage; + uint32_t numPhysicalVgprs; + uint32_t numPhysicalSgprs; + uint32_t numAvailableVgprs; + uint32_t numAvailableSgprs; + uint32_t computeWorkGroupSize[3]; +} VkShaderStatisticsInfoAMD; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( + VkDevice device, + VkPipeline pipeline, + VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, + void* pInfo); +#endif + #define VK_AMD_shader_image_load_store_lod 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod" @@ -6478,6 +6534,47 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( const VkRect2D* pDiscardRectangles); #endif +#define VK_EXT_conservative_rasterization 1 +#define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1 +#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization" + + +typedef enum VkConservativeRasterizationModeEXT { + VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, + VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, + VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, + VK_CONSERVATIVE_RASTERIZATION_MODE_BEGIN_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, + VK_CONSERVATIVE_RASTERIZATION_MODE_END_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT, + VK_CONSERVATIVE_RASTERIZATION_MODE_RANGE_SIZE_EXT = (VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT - VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT + 1), + VK_CONSERVATIVE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkConservativeRasterizationModeEXT; + +typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; + +typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { + VkStructureType sType; + void* pNext; + float primitiveOverestimationSize; + float maxExtraPrimitiveOverestimationSize; + float extraPrimitiveOverestimationSizeGranularity; + VkBool32 primitiveUnderestimation; + VkBool32 conservativePointAndLineRasterization; + VkBool32 degenerateTrianglesRasterized; + VkBool32 degenerateLinesRasterized; + VkBool32 fullyCoveredFragmentShaderInputVariable; + VkBool32 conservativeRasterizationPostDepthCoverage; +} VkPhysicalDeviceConservativeRasterizationPropertiesEXT; + +typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; + VkConservativeRasterizationModeEXT conservativeRasterizationMode; + float extraPrimitiveOverestimationSize; +} VkPipelineRasterizationConservativeStateCreateInfoEXT; + + + #define VK_EXT_swapchain_colorspace 1 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" @@ -6568,6 +6665,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( #endif #endif /* VK_USE_PLATFORM_MACOS_MVK */ +#define VK_EXT_external_memory_dma_buf 1 +#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 +#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" + + +#define VK_EXT_queue_family_foreign 1 +#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 +#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign" +#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2) + + #define VK_EXT_sampler_filter_minmax 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" @@ -6796,6 +6904,7 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) #define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1 #define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache" +#define VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT typedef enum VkValidationCacheHeaderVersionEXT { @@ -6858,6 +6967,79 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer" +#define VK_EXT_global_priority 1 +#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 +#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" + + +typedef enum VkQueueGlobalPriorityEXT { + VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, + VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024, + VK_QUEUE_GLOBAL_PRIORITY_BEGIN_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, + VK_QUEUE_GLOBAL_PRIORITY_END_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT, + VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT + 1), + VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_EXT = 0x7FFFFFFF +} VkQueueGlobalPriorityEXT; + +typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkQueueGlobalPriorityEXT globalPriority; +} VkDeviceQueueGlobalPriorityCreateInfoEXT; + + + +#define VK_EXT_external_memory_host 1 +#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 +#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" + +typedef struct VkImportMemoryHostPointerInfoEXT { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHR handleType; + void* pHostPointer; +} VkImportMemoryHostPointerInfoEXT; + +typedef struct VkMemoryHostPointerPropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; +} VkMemoryHostPointerPropertiesEXT; + +typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { + VkStructureType sType; + void* pNext; + VkDeviceSize minImportedHostPointerAlignment; +} VkPhysicalDeviceExternalMemoryHostPropertiesEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); +#endif + +#define VK_AMD_buffer_marker 1 +#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1 +#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker" + +typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + uint32_t marker); +#endif + #ifdef __cplusplus } #endif diff --git a/sources/third_party/vulkan/src/include/vulkan/vulkan.hpp b/sources/third_party/vulkan/src/include/vulkan/vulkan.hpp index c96889c9bc9cdad57b361643f77043a03ba8f98a..59277e81c8f6cbfdfebf8a7d4dfe19a2245f0d61 100644 --- a/sources/third_party/vulkan/src/include/vulkan/vulkan.hpp +++ b/sources/third_party/vulkan/src/include/vulkan/vulkan.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2017 The Khronos Group Inc. +// Copyright (c) 2015-2018 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -33,7 +32,11 @@ # include # include #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -static_assert( VK_HEADER_VERSION == 62 , "Wrong VK_HEADER_VERSION!" ); +#if !defined(VULKAN_HPP_ASSERT) +# include +# define VULKAN_HPP_ASSERT assert +#endif +static_assert( VK_HEADER_VERSION == 69 , "Wrong VK_HEADER_VERSION!" ); // 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION @@ -87,6 +90,10 @@ static_assert( VK_HEADER_VERSION == 62 , "Wrong VK_HEADER_VERSION!" ); #define VULKAN_HPP_NAMESPACE vk #endif +#define VULKAN_HPP_STRINGIFY2(text) #text +#define VULKAN_HPP_STRINGIFY(text) VULKAN_HPP_STRINGIFY2(text) +#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY(VULKAN_HPP_NAMESPACE) + namespace VULKAN_HPP_NAMESPACE { @@ -114,6 +121,11 @@ namespace VULKAN_HPP_NAMESPACE { } + explicit Flags(MaskType flags) + : m_mask(flags) + { + } + Flags & operator=(Flags const& rhs) { m_mask = rhs.m_mask; @@ -291,13 +303,13 @@ namespace VULKAN_HPP_NAMESPACE const T & front() const { - assert(m_count && m_ptr); + VULKAN_HPP_ASSERT(m_count && m_ptr); return *m_ptr; } const T & back() const { - assert(m_count && m_ptr); + VULKAN_HPP_ASSERT(m_count && m_ptr); return *(m_ptr + m_count - 1); } @@ -322,30 +334,31 @@ namespace VULKAN_HPP_NAMESPACE }; #endif -#if defined(VULKAN_HPP_NO_EXCEPTIONS) && !defined(VULKAN_HPP_NO_SMART_HANDLE) -# define VULKAN_HPP_NO_SMART_HANDLE -#endif - #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - class UniqueHandle + + template class UniqueHandleTraits; + + template + class UniqueHandle : public UniqueHandleTraits::deleter { + private: + using Deleter = typename UniqueHandleTraits::deleter; public: explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() ) - : m_value( value ) - , m_deleter( deleter ) + : Deleter( deleter) + , m_value( value ) {} UniqueHandle( UniqueHandle const& ) = delete; UniqueHandle( UniqueHandle && other ) - : m_value( other.release() ) - , m_deleter( std::move( other.m_deleter ) ) + : Deleter( std::move( static_cast( other ) ) ) + , m_value( other.release() ) {} ~UniqueHandle() { - destroy(); + if ( m_value ) this->destroy( m_value ); } UniqueHandle & operator=( UniqueHandle const& ) = delete; @@ -353,7 +366,7 @@ namespace VULKAN_HPP_NAMESPACE UniqueHandle & operator=( UniqueHandle && other ) { reset( other.release() ); - m_deleter = std::move( other.m_deleter ); + *static_cast(this) = std::move( static_cast(other) ); return *this; } @@ -392,21 +405,11 @@ namespace VULKAN_HPP_NAMESPACE return m_value; } - Deleter & getDeleter() - { - return m_deleter; - } - - Deleter const& getDeleter() const - { - return m_deleter; - } - void reset( Type const& value = Type() ) { if ( m_value != value ) { - destroy(); + if ( m_value ) this->destroy( m_value ); m_value = value; } } @@ -418,35 +421,25 @@ namespace VULKAN_HPP_NAMESPACE return value; } - void swap( UniqueHandle & rhs ) + void swap( UniqueHandle & rhs ) { std::swap(m_value, rhs.m_value); - std::swap(m_deleter, rhs.m_deleter); - } - - private: - void destroy() - { - if ( m_value ) - { - m_deleter( m_value ); - } + std::swap(static_cast(*this), static_cast(rhs)); } private: Type m_value; - Deleter m_deleter; }; - template - VULKAN_HPP_INLINE void swap( UniqueHandle & lhs, UniqueHandle & rhs ) + template + VULKAN_HPP_INLINE void swap( UniqueHandle & lhs, UniqueHandle & rhs ) { lhs.swap( rhs ); } #endif - template constexpr bool isStructureChainValid() { return false; } + template struct isStructureChainValid { enum { value = false }; }; template class StructureChainElement @@ -489,7 +482,7 @@ namespace VULKAN_HPP_NAMESPACE template void link() { - static_assert(isStructureChainValid(), "The structure chain is not valid!"); + static_assert(isStructureChainValid::value, "The structure chain is not valid!"); X& x = static_cast(*this); Y& y = static_cast(*this); x.pNext = &y; @@ -505,7 +498,7 @@ namespace VULKAN_HPP_NAMESPACE template void linkAndCopy(StructureChain const &rhs) { - static_assert(isStructureChainValid(), "The structure chain is not valid!"); + static_assert(isStructureChainValid::value, "The structure chain is not valid!"); X& x = static_cast(*this); Y& y = static_cast(*this); x = static_cast(rhs); @@ -542,7 +535,8 @@ namespace VULKAN_HPP_NAMESPACE eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT, eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV, eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR, - eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR + eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, + eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT }; VULKAN_HPP_INLINE std::string to_string(Result value) @@ -576,6 +570,7 @@ namespace VULKAN_HPP_NAMESPACE case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV"; case Result::eErrorOutOfPoolMemoryKHR: return "ErrorOutOfPoolMemoryKHR"; case Result::eErrorInvalidExternalHandleKHR: return "ErrorInvalidExternalHandleKHR"; + case Result::eErrorNotPermittedEXT: return "ErrorNotPermittedEXT"; default: return "invalid"; } } @@ -588,7 +583,7 @@ namespace VULKAN_HPP_NAMESPACE class ErrorCategoryImpl : public std::error_category { public: - virtual const char* name() const noexcept override { return "VULKAN_HPP_NAMESPACE::Result"; } + virtual const char* name() const noexcept override { return VULKAN_HPP_NAMESPACE_STRING"::Result"; } virtual std::string message(int ev) const override { return to_string(static_cast(ev)); } }; @@ -820,10 +815,17 @@ namespace VULKAN_HPP_NAMESPACE InvalidExternalHandleKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidExternalHandleKHR ), message ) {} }; + class NotPermittedEXTError : public SystemError + { + public: + NotPermittedEXTError( std::string const& message ) + : SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {} + NotPermittedEXTError( char const * message ) + : SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {} + }; VULKAN_HPP_INLINE void throwResultException( Result result, char const * message ) { - assert ( static_cast(result) < 0 ); switch ( result ) { case Result::eErrorOutOfHostMemory: throw OutOfHostMemoryError ( message ); @@ -846,6 +848,7 @@ namespace VULKAN_HPP_NAMESPACE case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError ( message ); case Result::eErrorOutOfPoolMemoryKHR: throw OutOfPoolMemoryKHRError ( message ); case Result::eErrorInvalidExternalHandleKHR: throw InvalidExternalHandleKHRError ( message ); + case Result::eErrorNotPermittedEXT: throw NotPermittedEXTError ( message ); default: throw SystemError( make_error_code( result ) ); } } @@ -870,6 +873,11 @@ namespace VULKAN_HPP_NAMESPACE , value( v ) {} + ResultValue( Result r, T && v ) + : result( r ) + , value( std::move( v ) ) + {} + Result result; T value; @@ -882,7 +890,7 @@ namespace VULKAN_HPP_NAMESPACE #ifdef VULKAN_HPP_NO_EXCEPTIONS typedef ResultValue type; #else - typedef T type; + typedef T type; #endif }; @@ -899,7 +907,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE ResultValueType::type createResultValue( Result result, char const * message ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( result == Result::eSuccess ); + VULKAN_HPP_ASSERT( result == Result::eSuccess ); return result; #else if ( result != Result::eSuccess ) @@ -913,21 +921,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE typename ResultValueType::type createResultValue( Result result, T & data, char const * message ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( result == Result::eSuccess ); + VULKAN_HPP_ASSERT( result == Result::eSuccess ); return ResultValue( result, data ); #else if ( result != Result::eSuccess ) { throwResultException( result, message ); } - return data; + return std::move( data ); #endif } VULKAN_HPP_INLINE Result createResultValue( Result result, char const * message, std::initializer_list successCodes ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); + VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); #else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { @@ -941,7 +949,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE ResultValue createResultValue( Result result, T & data, char const * message, std::initializer_list successCodes ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); + VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); #else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { @@ -951,228 +959,1401 @@ namespace VULKAN_HPP_NAMESPACE return ResultValue( result, data ); } - using SampleMask = uint32_t; - - using Bool32 = uint32_t; - - using DeviceSize = uint64_t; - - enum class FramebufferCreateFlagBits +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE typename ResultValueType>::type createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits::deleter const& deleter ) { - }; - - using FramebufferCreateFlags = Flags; +#ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( result == Result::eSuccess ); + return ResultValue>( result, UniqueHandle(data, deleter) ); +#else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return UniqueHandle(data, deleter); +#endif + } +#endif - enum class QueryPoolCreateFlagBits - { - }; - using QueryPoolCreateFlags = Flags; + struct AllocationCallbacks; - enum class RenderPassCreateFlagBits + template + class ObjectDeleter { - }; - - using RenderPassCreateFlags = Flags; + public: + ObjectDeleter(OwnerType owner = OwnerType(), Optional allocator = nullptr) + : m_owner(owner) + , m_allocator(allocator) + {} - enum class SamplerCreateFlagBits - { - }; + OwnerType getOwner() const { return m_owner; } + Optional getAllocator() const { return m_allocator; } - using SamplerCreateFlags = Flags; + protected: + template + void destroy(T t) + { + m_owner.destroy(t, m_allocator); + } - enum class PipelineLayoutCreateFlagBits - { + private: + OwnerType m_owner; + Optional m_allocator; }; - using PipelineLayoutCreateFlags = Flags; + class NoParent; - enum class PipelineCacheCreateFlagBits + template <> + class ObjectDeleter { - }; - - using PipelineCacheCreateFlags = Flags; + public: + ObjectDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} - enum class PipelineDepthStencilStateCreateFlagBits - { - }; + Optional getAllocator() const { return m_allocator; } - using PipelineDepthStencilStateCreateFlags = Flags; + protected: + template + void destroy(T t) + { + t.destroy( m_allocator ); + } - enum class PipelineDynamicStateCreateFlagBits - { + private: + Optional m_allocator; }; - using PipelineDynamicStateCreateFlags = Flags; - - enum class PipelineColorBlendStateCreateFlagBits + template + class PoolDeleter { - }; - - using PipelineColorBlendStateCreateFlags = Flags; + public: + PoolDeleter(OwnerType owner = OwnerType(), PoolType pool = PoolType()) + : m_owner(owner) + , m_pool(pool) + {} - enum class PipelineMultisampleStateCreateFlagBits - { - }; + OwnerType getOwner() const { return m_owner; } + PoolType getPool() const { return m_pool; } - using PipelineMultisampleStateCreateFlags = Flags; + protected: + template + void destroy(T t) + { + m_owner.free(m_pool, t); + } - enum class PipelineRasterizationStateCreateFlagBits - { + private: + OwnerType m_owner; + PoolType m_pool; }; - using PipelineRasterizationStateCreateFlags = Flags; - - enum class PipelineViewportStateCreateFlagBits +class DispatchLoaderStatic +{ +public: + VkResult vkAcquireNextImage2KHX( VkDevice device, const VkAcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex ) const { - }; - - using PipelineViewportStateCreateFlags = Flags; - - enum class PipelineTessellationStateCreateFlagBits + return ::vkAcquireNextImage2KHX( device, pAcquireInfo, pImageIndex); + } + VkResult vkAcquireNextImageKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex ) const { - }; - - using PipelineTessellationStateCreateFlags = Flags; - - enum class PipelineInputAssemblyStateCreateFlagBits + return ::vkAcquireNextImageKHR( device, swapchain, timeout, semaphore, fence, pImageIndex); + } +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VkResult vkAcquireXlibDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display ) const { - }; - - using PipelineInputAssemblyStateCreateFlags = Flags; - - enum class PipelineVertexInputStateCreateFlagBits + return ::vkAcquireXlibDisplayEXT( physicalDevice, dpy, display); + } +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + VkResult vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers ) const { - }; - - using PipelineVertexInputStateCreateFlags = Flags; - - enum class PipelineShaderStageCreateFlagBits + return ::vkAllocateCommandBuffers( device, pAllocateInfo, pCommandBuffers); + } + VkResult vkAllocateDescriptorSets( VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets ) const { - }; - - using PipelineShaderStageCreateFlags = Flags; - - enum class BufferViewCreateFlagBits + return ::vkAllocateDescriptorSets( device, pAllocateInfo, pDescriptorSets); + } + VkResult vkAllocateMemory( VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory ) const { - }; - - using BufferViewCreateFlags = Flags; - - enum class InstanceCreateFlagBits + return ::vkAllocateMemory( device, pAllocateInfo, pAllocator, pMemory); + } + VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo ) const { - }; - - using InstanceCreateFlags = Flags; - - enum class DeviceCreateFlagBits + return ::vkBeginCommandBuffer( commandBuffer, pBeginInfo); + } + VkResult vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const { - }; - - using DeviceCreateFlags = Flags; - - enum class DeviceQueueCreateFlagBits + return ::vkBindBufferMemory( device, buffer, memory, memoryOffset); + } + VkResult vkBindBufferMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos ) const { - }; - - using DeviceQueueCreateFlags = Flags; - - enum class ImageViewCreateFlagBits + return ::vkBindBufferMemory2KHR( device, bindInfoCount, pBindInfos); + } + VkResult vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const { - }; - - using ImageViewCreateFlags = Flags; - - enum class SemaphoreCreateFlagBits + return ::vkBindImageMemory( device, image, memory, memoryOffset); + } + VkResult vkBindImageMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos ) const { - }; - - using SemaphoreCreateFlags = Flags; - - enum class ShaderModuleCreateFlagBits + return ::vkBindImageMemory2KHR( device, bindInfoCount, pBindInfos); + } + void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags ) const { - }; - - using ShaderModuleCreateFlags = Flags; - - enum class EventCreateFlagBits + return ::vkCmdBeginQuery( commandBuffer, queryPool, query, flags); + } + void vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents ) const { - }; - - using EventCreateFlags = Flags; - - enum class MemoryMapFlagBits + return ::vkCmdBeginRenderPass( commandBuffer, pRenderPassBegin, contents); + } + void vkCmdBindDescriptorSets( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const { - }; - - using MemoryMapFlags = Flags; - - enum class DescriptorPoolResetFlagBits + return ::vkCmdBindDescriptorSets( commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); + } + void vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType ) const { - }; - - using DescriptorPoolResetFlags = Flags; - - enum class DescriptorUpdateTemplateCreateFlagBitsKHR + return ::vkCmdBindIndexBuffer( commandBuffer, buffer, offset, indexType); + } + void vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) const { - }; - - using DescriptorUpdateTemplateCreateFlagsKHR = Flags; - - enum class DisplayModeCreateFlagBitsKHR + return ::vkCmdBindPipeline( commandBuffer, pipelineBindPoint, pipeline); + } + void vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets ) const { - }; - - using DisplayModeCreateFlagsKHR = Flags; - - enum class DisplaySurfaceCreateFlagBitsKHR + return ::vkCmdBindVertexBuffers( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); + } + void vkCmdBlitImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter ) const { - }; - - using DisplaySurfaceCreateFlagsKHR = Flags; - -#ifdef VK_USE_PLATFORM_ANDROID_KHR - enum class AndroidSurfaceCreateFlagBitsKHR + return ::vkCmdBlitImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); + } + void vkCmdClearAttachments( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects ) const { - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#ifdef VK_USE_PLATFORM_ANDROID_KHR - using AndroidSurfaceCreateFlagsKHR = Flags; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - -#ifdef VK_USE_PLATFORM_MIR_KHR - enum class MirSurfaceCreateFlagBitsKHR + return ::vkCmdClearAttachments( commandBuffer, attachmentCount, pAttachments, rectCount, pRects); + } + void vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges ) const { - }; -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - -#ifdef VK_USE_PLATFORM_MIR_KHR - using MirSurfaceCreateFlagsKHR = Flags; -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - -#ifdef VK_USE_PLATFORM_VI_NN - enum class ViSurfaceCreateFlagBitsNN + return ::vkCmdClearColorImage( commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); + } + void vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges ) const { - }; -#endif /*VK_USE_PLATFORM_VI_NN*/ - -#ifdef VK_USE_PLATFORM_VI_NN - using ViSurfaceCreateFlagsNN = Flags; -#endif /*VK_USE_PLATFORM_VI_NN*/ - -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - enum class WaylandSurfaceCreateFlagBitsKHR + return ::vkCmdClearDepthStencilImage( commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); + } + void vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions ) const { - }; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - using WaylandSurfaceCreateFlagsKHR = Flags; -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - -#ifdef VK_USE_PLATFORM_WIN32_KHR - enum class Win32SurfaceCreateFlagBitsKHR + return ::vkCmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); + } + void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions ) const + { + return ::vkCmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); + } + void vkCmdCopyImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions ) const + { + return ::vkCmdCopyImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + } + void vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions ) const + { + return ::vkCmdCopyImageToBuffer( commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); + } + void vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags ) const + { + return ::vkCmdCopyQueryPoolResults( commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); + } + void vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + return ::vkCmdDebugMarkerBeginEXT( commandBuffer, pMarkerInfo); + } + void vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer ) const + { + return ::vkCmdDebugMarkerEndEXT( commandBuffer); + } + void vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + return ::vkCmdDebugMarkerInsertEXT( commandBuffer, pMarkerInfo); + } + void vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const + { + return ::vkCmdDispatch( commandBuffer, groupCountX, groupCountY, groupCountZ); + } + void vkCmdDispatchBaseKHX( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const + { + return ::vkCmdDispatchBaseKHX( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); + } + void vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset ) const + { + return ::vkCmdDispatchIndirect( commandBuffer, buffer, offset); + } + void vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const + { + return ::vkCmdDraw( commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); + } + void vkCmdDrawIndexed( VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const + { + return ::vkCmdDrawIndexed( commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); + } + void vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + return ::vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, stride); + } + void vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + return ::vkCmdDrawIndexedIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } + void vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + return ::vkCmdDrawIndirect( commandBuffer, buffer, offset, drawCount, stride); + } + void vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + return ::vkCmdDrawIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + } + void vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query ) const + { + return ::vkCmdEndQuery( commandBuffer, queryPool, query); + } + void vkCmdEndRenderPass( VkCommandBuffer commandBuffer ) const + { + return ::vkCmdEndRenderPass( commandBuffer); + } + void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers ) const + { + return ::vkCmdExecuteCommands( commandBuffer, commandBufferCount, pCommandBuffers); + } + void vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data ) const + { + return ::vkCmdFillBuffer( commandBuffer, dstBuffer, dstOffset, size, data); + } + void vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents ) const + { + return ::vkCmdNextSubpass( commandBuffer, contents); + } + void vkCmdPipelineBarrier( VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers ) const + { + return ::vkCmdPipelineBarrier( commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + } + void vkCmdProcessCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const + { + return ::vkCmdProcessCommandsNVX( commandBuffer, pProcessCommandsInfo); + } + void vkCmdPushConstants( VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const + { + return ::vkCmdPushConstants( commandBuffer, layout, stageFlags, offset, size, pValues); + } + void vkCmdPushDescriptorSetKHR( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites ) const + { + return ::vkCmdPushDescriptorSetKHR( commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); + } + void vkCmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData ) const + { + return ::vkCmdPushDescriptorSetWithTemplateKHR( commandBuffer, descriptorUpdateTemplate, layout, set, pData); + } + void vkCmdReserveSpaceForCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const + { + return ::vkCmdReserveSpaceForCommandsNVX( commandBuffer, pReserveSpaceInfo); + } + void vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const + { + return ::vkCmdResetEvent( commandBuffer, event, stageMask); + } + void vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const + { + return ::vkCmdResetQueryPool( commandBuffer, queryPool, firstQuery, queryCount); + } + void vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions ) const + { + return ::vkCmdResolveImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + } + void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4] ) const + { + return ::vkCmdSetBlendConstants( commandBuffer, blendConstants); + } + void vkCmdSetDepthBias( VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const + { + return ::vkCmdSetDepthBias( commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); + } + void vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds ) const + { + return ::vkCmdSetDepthBounds( commandBuffer, minDepthBounds, maxDepthBounds); + } + void vkCmdSetDeviceMaskKHX( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const + { + return ::vkCmdSetDeviceMaskKHX( commandBuffer, deviceMask); + } + void vkCmdSetDiscardRectangleEXT( VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles ) const + { + return ::vkCmdSetDiscardRectangleEXT( commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); + } + void vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const + { + return ::vkCmdSetEvent( commandBuffer, event, stageMask); + } + void vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth ) const + { + return ::vkCmdSetLineWidth( commandBuffer, lineWidth); + } + void vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo ) const + { + return ::vkCmdSetSampleLocationsEXT( commandBuffer, pSampleLocationsInfo); + } + void vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors ) const + { + return ::vkCmdSetScissor( commandBuffer, firstScissor, scissorCount, pScissors); + } + void vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask ) const + { + return ::vkCmdSetStencilCompareMask( commandBuffer, faceMask, compareMask); + } + void vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference ) const + { + return ::vkCmdSetStencilReference( commandBuffer, faceMask, reference); + } + void vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask ) const + { + return ::vkCmdSetStencilWriteMask( commandBuffer, faceMask, writeMask); + } + void vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports ) const + { + return ::vkCmdSetViewport( commandBuffer, firstViewport, viewportCount, pViewports); + } + void vkCmdSetViewportWScalingNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings ) const + { + return ::vkCmdSetViewportWScalingNV( commandBuffer, firstViewport, viewportCount, pViewportWScalings); + } + void vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData ) const + { + return ::vkCmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, pData); + } + void vkCmdWaitEvents( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers ) const + { + return ::vkCmdWaitEvents( commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + } + void vkCmdWriteBufferMarkerAMD( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker ) const + { + return ::vkCmdWriteBufferMarkerAMD( commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + } + void vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query ) const + { + return ::vkCmdWriteTimestamp( commandBuffer, pipelineStage, queryPool, query); + } +#ifdef VK_USE_PLATFORM_ANDROID_KHR + VkResult vkCreateAndroidSurfaceKHR( VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateAndroidSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + VkResult vkCreateBuffer( VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer ) const + { + return ::vkCreateBuffer( device, pCreateInfo, pAllocator, pBuffer); + } + VkResult vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView ) const + { + return ::vkCreateBufferView( device, pCreateInfo, pAllocator, pView); + } + VkResult vkCreateCommandPool( VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool ) const + { + return ::vkCreateCommandPool( device, pCreateInfo, pAllocator, pCommandPool); + } + VkResult vkCreateComputePipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines ) const + { + return ::vkCreateComputePipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + } + VkResult vkCreateDebugReportCallbackEXT( VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback ) const + { + return ::vkCreateDebugReportCallbackEXT( instance, pCreateInfo, pAllocator, pCallback); + } + VkResult vkCreateDescriptorPool( VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool ) const + { + return ::vkCreateDescriptorPool( device, pCreateInfo, pAllocator, pDescriptorPool); + } + VkResult vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout ) const + { + return ::vkCreateDescriptorSetLayout( device, pCreateInfo, pAllocator, pSetLayout); + } + VkResult vkCreateDescriptorUpdateTemplateKHR( VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate ) const + { + return ::vkCreateDescriptorUpdateTemplateKHR( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); + } + VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice ) const + { + return ::vkCreateDevice( physicalDevice, pCreateInfo, pAllocator, pDevice); + } + VkResult vkCreateDisplayModeKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode ) const + { + return ::vkCreateDisplayModeKHR( physicalDevice, display, pCreateInfo, pAllocator, pMode); + } + VkResult vkCreateDisplayPlaneSurfaceKHR( VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateDisplayPlaneSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } + VkResult vkCreateEvent( VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent ) const + { + return ::vkCreateEvent( device, pCreateInfo, pAllocator, pEvent); + } + VkResult vkCreateFence( VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const + { + return ::vkCreateFence( device, pCreateInfo, pAllocator, pFence); + } + VkResult vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer ) const + { + return ::vkCreateFramebuffer( device, pCreateInfo, pAllocator, pFramebuffer); + } + VkResult vkCreateGraphicsPipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines ) const + { + return ::vkCreateGraphicsPipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + } +#ifdef VK_USE_PLATFORM_IOS_MVK + VkResult vkCreateIOSSurfaceMVK( VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateIOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_IOS_MVK*/ + VkResult vkCreateImage( VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage ) const + { + return ::vkCreateImage( device, pCreateInfo, pAllocator, pImage); + } + VkResult vkCreateImageView( VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView ) const + { + return ::vkCreateImageView( device, pCreateInfo, pAllocator, pView); + } + VkResult vkCreateIndirectCommandsLayoutNVX( VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const + { + return ::vkCreateIndirectCommandsLayoutNVX( device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + } + VkResult vkCreateInstance( const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance ) const + { + return ::vkCreateInstance( pCreateInfo, pAllocator, pInstance); + } +#ifdef VK_USE_PLATFORM_MACOS_MVK + VkResult vkCreateMacOSSurfaceMVK( VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateMacOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_MACOS_MVK*/ +#ifdef VK_USE_PLATFORM_MIR_KHR + VkResult vkCreateMirSurfaceKHR( VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateMirSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + VkResult vkCreateObjectTableNVX( VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable ) const + { + return ::vkCreateObjectTableNVX( device, pCreateInfo, pAllocator, pObjectTable); + } + VkResult vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache ) const + { + return ::vkCreatePipelineCache( device, pCreateInfo, pAllocator, pPipelineCache); + } + VkResult vkCreatePipelineLayout( VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout ) const + { + return ::vkCreatePipelineLayout( device, pCreateInfo, pAllocator, pPipelineLayout); + } + VkResult vkCreateQueryPool( VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool ) const + { + return ::vkCreateQueryPool( device, pCreateInfo, pAllocator, pQueryPool); + } + VkResult vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const + { + return ::vkCreateRenderPass( device, pCreateInfo, pAllocator, pRenderPass); + } + VkResult vkCreateSampler( VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler ) const + { + return ::vkCreateSampler( device, pCreateInfo, pAllocator, pSampler); + } + VkResult vkCreateSamplerYcbcrConversionKHR( VkDevice device, const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversionKHR* pYcbcrConversion ) const + { + return ::vkCreateSamplerYcbcrConversionKHR( device, pCreateInfo, pAllocator, pYcbcrConversion); + } + VkResult vkCreateSemaphore( VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore ) const + { + return ::vkCreateSemaphore( device, pCreateInfo, pAllocator, pSemaphore); + } + VkResult vkCreateShaderModule( VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule ) const + { + return ::vkCreateShaderModule( device, pCreateInfo, pAllocator, pShaderModule); + } + VkResult vkCreateSharedSwapchainsKHR( VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains ) const + { + return ::vkCreateSharedSwapchainsKHR( device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); + } + VkResult vkCreateSwapchainKHR( VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain ) const + { + return ::vkCreateSwapchainKHR( device, pCreateInfo, pAllocator, pSwapchain); + } + VkResult vkCreateValidationCacheEXT( VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache ) const + { + return ::vkCreateValidationCacheEXT( device, pCreateInfo, pAllocator, pValidationCache); + } +#ifdef VK_USE_PLATFORM_VI_NN + VkResult vkCreateViSurfaceNN( VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateViSurfaceNN( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_VI_NN*/ +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VkResult vkCreateWaylandSurfaceKHR( VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateWaylandSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkCreateWin32SurfaceKHR( VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateWin32SurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + VkResult vkCreateXcbSurfaceKHR( VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateXcbSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + VkResult vkCreateXlibSurfaceKHR( VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const + { + return ::vkCreateXlibSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface); + } +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + VkResult vkDebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo ) const + { + return ::vkDebugMarkerSetObjectNameEXT( device, pNameInfo); + } + VkResult vkDebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo ) const + { + return ::vkDebugMarkerSetObjectTagEXT( device, pTagInfo); + } + void vkDebugReportMessageEXT( VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const + { + return ::vkDebugReportMessageEXT( instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage); + } + void vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyBuffer( device, buffer, pAllocator); + } + void vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyBufferView( device, bufferView, pAllocator); + } + void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyCommandPool( device, commandPool, pAllocator); + } + void vkDestroyDebugReportCallbackEXT( VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyDebugReportCallbackEXT( instance, callback, pAllocator); + } + void vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyDescriptorPool( device, descriptorPool, pAllocator); + } + void vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyDescriptorSetLayout( device, descriptorSetLayout, pAllocator); + } + void vkDestroyDescriptorUpdateTemplateKHR( VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyDescriptorUpdateTemplateKHR( device, descriptorUpdateTemplate, pAllocator); + } + void vkDestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyDevice( device, pAllocator); + } + void vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyEvent( device, event, pAllocator); + } + void vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyFence( device, fence, pAllocator); + } + void vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyFramebuffer( device, framebuffer, pAllocator); + } + void vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyImage( device, image, pAllocator); + } + void vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyImageView( device, imageView, pAllocator); + } + void vkDestroyIndirectCommandsLayoutNVX( VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyIndirectCommandsLayoutNVX( device, indirectCommandsLayout, pAllocator); + } + void vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyInstance( instance, pAllocator); + } + void vkDestroyObjectTableNVX( VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyObjectTableNVX( device, objectTable, pAllocator); + } + void vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyPipeline( device, pipeline, pAllocator); + } + void vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyPipelineCache( device, pipelineCache, pAllocator); + } + void vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyPipelineLayout( device, pipelineLayout, pAllocator); + } + void vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyQueryPool( device, queryPool, pAllocator); + } + void vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyRenderPass( device, renderPass, pAllocator); + } + void vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroySampler( device, sampler, pAllocator); + } + void vkDestroySamplerYcbcrConversionKHR( VkDevice device, VkSamplerYcbcrConversionKHR ycbcrConversion, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroySamplerYcbcrConversionKHR( device, ycbcrConversion, pAllocator); + } + void vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroySemaphore( device, semaphore, pAllocator); + } + void vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyShaderModule( device, shaderModule, pAllocator); + } + void vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroySurfaceKHR( instance, surface, pAllocator); + } + void vkDestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroySwapchainKHR( device, swapchain, pAllocator); + } + void vkDestroyValidationCacheEXT( VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkDestroyValidationCacheEXT( device, validationCache, pAllocator); + } + VkResult vkDeviceWaitIdle( VkDevice device ) const + { + return ::vkDeviceWaitIdle( device); + } + VkResult vkDisplayPowerControlEXT( VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo ) const + { + return ::vkDisplayPowerControlEXT( device, display, pDisplayPowerInfo); + } + VkResult vkEndCommandBuffer( VkCommandBuffer commandBuffer ) const + { + return ::vkEndCommandBuffer( commandBuffer); + } + VkResult vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties ) const + { + return ::vkEnumerateDeviceExtensionProperties( physicalDevice, pLayerName, pPropertyCount, pProperties); + } + VkResult vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties ) const + { + return ::vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, pProperties); + } + VkResult vkEnumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties ) const + { + return ::vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, pProperties); + } + VkResult vkEnumerateInstanceLayerProperties( uint32_t* pPropertyCount, VkLayerProperties* pProperties ) const + { + return ::vkEnumerateInstanceLayerProperties( pPropertyCount, pProperties); + } + VkResult vkEnumeratePhysicalDeviceGroupsKHX( VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties ) const + { + return ::vkEnumeratePhysicalDeviceGroupsKHX( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + } + VkResult vkEnumeratePhysicalDevices( VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices ) const + { + return ::vkEnumeratePhysicalDevices( instance, pPhysicalDeviceCount, pPhysicalDevices); + } + VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges ) const + { + return ::vkFlushMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges); + } + void vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers ) const + { + return ::vkFreeCommandBuffers( device, commandPool, commandBufferCount, pCommandBuffers); + } + VkResult vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets ) const + { + return ::vkFreeDescriptorSets( device, descriptorPool, descriptorSetCount, pDescriptorSets); + } + void vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator ) const + { + return ::vkFreeMemory( device, memory, pAllocator); + } + void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements ) const + { + return ::vkGetBufferMemoryRequirements( device, buffer, pMemoryRequirements); + } + void vkGetBufferMemoryRequirements2KHR( VkDevice device, const VkBufferMemoryRequirementsInfo2KHR* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements ) const + { + return ::vkGetBufferMemoryRequirements2KHR( device, pInfo, pMemoryRequirements); + } + void vkGetDeviceGroupPeerMemoryFeaturesKHX( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures ) const + { + return ::vkGetDeviceGroupPeerMemoryFeaturesKHX( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); + } + VkResult vkGetDeviceGroupPresentCapabilitiesKHX( VkDevice device, VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities ) const + { + return ::vkGetDeviceGroupPresentCapabilitiesKHX( device, pDeviceGroupPresentCapabilities); + } + VkResult vkGetDeviceGroupSurfacePresentModesKHX( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHX* pModes ) const + { + return ::vkGetDeviceGroupSurfacePresentModesKHX( device, surface, pModes); + } + void vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes ) const + { + return ::vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes); + } + PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char* pName ) const + { + return ::vkGetDeviceProcAddr( device, pName); + } + void vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue ) const + { + return ::vkGetDeviceQueue( device, queueFamilyIndex, queueIndex, pQueue); + } + VkResult vkGetDisplayModePropertiesKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties ) const + { + return ::vkGetDisplayModePropertiesKHR( physicalDevice, display, pPropertyCount, pProperties); + } + VkResult vkGetDisplayPlaneCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities ) const + { + return ::vkGetDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, pCapabilities); + } + VkResult vkGetDisplayPlaneSupportedDisplaysKHR( VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays ) const + { + return ::vkGetDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, pDisplayCount, pDisplays); + } + VkResult vkGetEventStatus( VkDevice device, VkEvent event ) const + { + return ::vkGetEventStatus( device, event); + } + VkResult vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd ) const + { + return ::vkGetFenceFdKHR( device, pGetFdInfo, pFd); + } + VkResult vkGetFenceStatus( VkDevice device, VkFence fence ) const + { + return ::vkGetFenceStatus( device, fence); + } +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + { + return ::vkGetFenceWin32HandleKHR( device, pGetWin32HandleInfo, pHandle); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + void vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements ) const + { + return ::vkGetImageMemoryRequirements( device, image, pMemoryRequirements); + } + void vkGetImageMemoryRequirements2KHR( VkDevice device, const VkImageMemoryRequirementsInfo2KHR* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements ) const + { + return ::vkGetImageMemoryRequirements2KHR( device, pInfo, pMemoryRequirements); + } + void vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements ) const + { + return ::vkGetImageSparseMemoryRequirements( device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + } + void vkGetImageSparseMemoryRequirements2KHR( VkDevice device, const VkImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const + { + return ::vkGetImageSparseMemoryRequirements2KHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + } + void vkGetImageSubresourceLayout( VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout ) const + { + return ::vkGetImageSubresourceLayout( device, image, pSubresource, pLayout); + } + PFN_vkVoidFunction vkGetInstanceProcAddr( VkInstance instance, const char* pName ) const + { + return ::vkGetInstanceProcAddr( instance, pName); + } + VkResult vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd ) const + { + return ::vkGetMemoryFdKHR( device, pGetFdInfo, pFd); + } + VkResult vkGetMemoryFdPropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties ) const + { + return ::vkGetMemoryFdPropertiesKHR( device, handleType, fd, pMemoryFdProperties); + } + VkResult vkGetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties ) const + { + return ::vkGetMemoryHostPointerPropertiesEXT( device, handleType, pHostPointer, pMemoryHostPointerProperties); + } +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkGetMemoryWin32HandleKHR( VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + { + return ::vkGetMemoryWin32HandleKHR( device, pGetWin32HandleInfo, pHandle); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkGetMemoryWin32HandleNV( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const + { + return ::vkGetMemoryWin32HandleNV( device, memory, handleType, pHandle); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkGetMemoryWin32HandlePropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) const + { + return ::vkGetMemoryWin32HandlePropertiesKHR( device, handleType, handle, pMemoryWin32HandleProperties); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VkResult vkGetPastPresentationTimingGOOGLE( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings ) const + { + return ::vkGetPastPresentationTimingGOOGLE( device, swapchain, pPresentationTimingCount, pPresentationTimings); + } + VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties ) const + { + return ::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, pPropertyCount, pProperties); + } + VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties ) const + { + return ::vkGetPhysicalDeviceDisplayPropertiesKHR( physicalDevice, pPropertyCount, pProperties); + } + void vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, VkExternalBufferPropertiesKHR* pExternalBufferProperties ) const + { + return ::vkGetPhysicalDeviceExternalBufferPropertiesKHR( physicalDevice, pExternalBufferInfo, pExternalBufferProperties); + } + void vkGetPhysicalDeviceExternalFencePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, VkExternalFencePropertiesKHR* pExternalFenceProperties ) const + { + return ::vkGetPhysicalDeviceExternalFencePropertiesKHR( physicalDevice, pExternalFenceInfo, pExternalFenceProperties); + } + VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const + { + return ::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); + } + void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties ) const + { + return ::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); + } + void vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures ) const + { + return ::vkGetPhysicalDeviceFeatures( physicalDevice, pFeatures); + } + void vkGetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures ) const + { + return ::vkGetPhysicalDeviceFeatures2KHR( physicalDevice, pFeatures); + } + void vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties ) const + { + return ::vkGetPhysicalDeviceFormatProperties( physicalDevice, format, pFormatProperties); + } + void vkGetPhysicalDeviceFormatProperties2KHR( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties ) const + { + return ::vkGetPhysicalDeviceFormatProperties2KHR( physicalDevice, format, pFormatProperties); + } + void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits ) const + { + return ::vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( physicalDevice, pFeatures, pLimits); + } + VkResult vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties ) const + { + return ::vkGetPhysicalDeviceImageFormatProperties( physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); + } + VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties ) const + { + return ::vkGetPhysicalDeviceImageFormatProperties2KHR( physicalDevice, pImageFormatInfo, pImageFormatProperties); + } + void vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties ) const + { + return ::vkGetPhysicalDeviceMemoryProperties( physicalDevice, pMemoryProperties); + } + void vkGetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const + { + return ::vkGetPhysicalDeviceMemoryProperties2KHR( physicalDevice, pMemoryProperties); + } +#ifdef VK_USE_PLATFORM_MIR_KHR + VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection ) const + { + return ::vkGetPhysicalDeviceMirPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection); + } +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + void vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties ) const + { + return ::vkGetPhysicalDeviceMultisamplePropertiesEXT( physicalDevice, samples, pMultisampleProperties); + } + VkResult vkGetPhysicalDevicePresentRectanglesKHX( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects ) const + { + return ::vkGetPhysicalDevicePresentRectanglesKHX( physicalDevice, surface, pRectCount, pRects); + } + void vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties ) const + { + return ::vkGetPhysicalDeviceProperties( physicalDevice, pProperties); + } + void vkGetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties ) const + { + return ::vkGetPhysicalDeviceProperties2KHR( physicalDevice, pProperties); + } + void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties ) const + { + return ::vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + } + void vkGetPhysicalDeviceQueueFamilyProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties ) const + { + return ::vkGetPhysicalDeviceQueueFamilyProperties2KHR( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + } + void vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties ) const + { + return ::vkGetPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties); + } + void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties ) const + { + return ::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( physicalDevice, pFormatInfo, pPropertyCount, pProperties); + } + VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities ) const + { + return ::vkGetPhysicalDeviceSurfaceCapabilities2EXT( physicalDevice, surface, pSurfaceCapabilities); + } + VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities ) const + { + return ::vkGetPhysicalDeviceSurfaceCapabilities2KHR( physicalDevice, pSurfaceInfo, pSurfaceCapabilities); + } + VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities ) const + { + return ::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, pSurfaceCapabilities); + } + VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats ) const + { + return ::vkGetPhysicalDeviceSurfaceFormats2KHR( physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); + } + VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats ) const + { + return ::vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); + } + VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes ) const + { + return ::vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, pPresentModeCount, pPresentModes); + } + VkResult vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported ) const + { + return ::vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported); + } +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display ) const + { + return ::vkGetPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display); + } +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex ) const + { + return ::vkGetPhysicalDeviceWin32PresentationSupportKHR( physicalDevice, queueFamilyIndex); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const + { + return ::vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id); + } +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const + { + return ::vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID); + } +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + VkResult vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + { + return ::vkGetPipelineCacheData( device, pipelineCache, pDataSize, pData); + } + VkResult vkGetQueryPoolResults( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags ) const + { + return ::vkGetQueryPoolResults( device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); + } +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VkResult vkGetRandROutputDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay ) const + { + return ::vkGetRandROutputDisplayEXT( physicalDevice, dpy, rrOutput, pDisplay); + } +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + VkResult vkGetRefreshCycleDurationGOOGLE( VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties ) const + { + return ::vkGetRefreshCycleDurationGOOGLE( device, swapchain, pDisplayTimingProperties); + } + void vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity ) const + { + return ::vkGetRenderAreaGranularity( device, renderPass, pGranularity); + } + VkResult vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd ) const + { + return ::vkGetSemaphoreFdKHR( device, pGetFdInfo, pFd); + } +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkGetSemaphoreWin32HandleKHR( VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + { + return ::vkGetSemaphoreWin32HandleKHR( device, pGetWin32HandleInfo, pHandle); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VkResult vkGetShaderInfoAMD( VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const + { + return ::vkGetShaderInfoAMD( device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + } + VkResult vkGetSwapchainCounterEXT( VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const + { + return ::vkGetSwapchainCounterEXT( device, swapchain, counter, pCounterValue); + } + VkResult vkGetSwapchainImagesKHR( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages ) const + { + return ::vkGetSwapchainImagesKHR( device, swapchain, pSwapchainImageCount, pSwapchainImages); + } + VkResult vkGetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain ) const + { + return ::vkGetSwapchainStatusKHR( device, swapchain); + } + VkResult vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const + { + return ::vkGetValidationCacheDataEXT( device, validationCache, pDataSize, pData); + } + VkResult vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo ) const + { + return ::vkImportFenceFdKHR( device, pImportFenceFdInfo); + } +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo ) const + { + return ::vkImportFenceWin32HandleKHR( device, pImportFenceWin32HandleInfo); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VkResult vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo ) const + { + return ::vkImportSemaphoreFdKHR( device, pImportSemaphoreFdInfo); + } +#ifdef VK_USE_PLATFORM_WIN32_KHR + VkResult vkImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo ) const + { + return ::vkImportSemaphoreWin32HandleKHR( device, pImportSemaphoreWin32HandleInfo); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges ) const + { + return ::vkInvalidateMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges); + } + VkResult vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData ) const + { + return ::vkMapMemory( device, memory, offset, size, flags, ppData); + } + VkResult vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches ) const + { + return ::vkMergePipelineCaches( device, dstCache, srcCacheCount, pSrcCaches); + } + VkResult vkMergeValidationCachesEXT( VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches ) const + { + return ::vkMergeValidationCachesEXT( device, dstCache, srcCacheCount, pSrcCaches); + } + VkResult vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence ) const + { + return ::vkQueueBindSparse( queue, bindInfoCount, pBindInfo, fence); + } + VkResult vkQueuePresentKHR( VkQueue queue, const VkPresentInfoKHR* pPresentInfo ) const + { + return ::vkQueuePresentKHR( queue, pPresentInfo); + } + VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence ) const + { + return ::vkQueueSubmit( queue, submitCount, pSubmits, fence); + } + VkResult vkQueueWaitIdle( VkQueue queue ) const + { + return ::vkQueueWaitIdle( queue); + } + VkResult vkRegisterDeviceEventEXT( VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const + { + return ::vkRegisterDeviceEventEXT( device, pDeviceEventInfo, pAllocator, pFence); + } + VkResult vkRegisterDisplayEventEXT( VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const + { + return ::vkRegisterDisplayEventEXT( device, display, pDisplayEventInfo, pAllocator, pFence); + } + VkResult vkRegisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + { + return ::vkRegisterObjectsNVX( device, objectTable, objectCount, ppObjectTableEntries, pObjectIndices); + } + VkResult vkReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const + { + return ::vkReleaseDisplayEXT( physicalDevice, display); + } + VkResult vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags ) const + { + return ::vkResetCommandBuffer( commandBuffer, flags); + } + VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) const + { + return ::vkResetCommandPool( device, commandPool, flags); + } + VkResult vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags ) const + { + return ::vkResetDescriptorPool( device, descriptorPool, flags); + } + VkResult vkResetEvent( VkDevice device, VkEvent event ) const + { + return ::vkResetEvent( device, event); + } + VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences ) const + { + return ::vkResetFences( device, fenceCount, pFences); + } + VkResult vkSetEvent( VkDevice device, VkEvent event ) const + { + return ::vkSetEvent( device, event); + } + void vkSetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata ) const + { + return ::vkSetHdrMetadataEXT( device, swapchainCount, pSwapchains, pMetadata); + } + void vkTrimCommandPoolKHR( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags ) const + { + return ::vkTrimCommandPoolKHR( device, commandPool, flags); + } + void vkUnmapMemory( VkDevice device, VkDeviceMemory memory ) const + { + return ::vkUnmapMemory( device, memory); + } + VkResult vkUnregisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const + { + return ::vkUnregisterObjectsNVX( device, objectTable, objectCount, pObjectEntryTypes, pObjectIndices); + } + void vkUpdateDescriptorSetWithTemplateKHR( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData ) const + { + return ::vkUpdateDescriptorSetWithTemplateKHR( device, descriptorSet, descriptorUpdateTemplate, pData); + } + void vkUpdateDescriptorSets( VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies ) const + { + return ::vkUpdateDescriptorSets( device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); + } + VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout ) const + { + return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout); + } +}; + using SampleMask = uint32_t; + + using Bool32 = uint32_t; + + using DeviceSize = uint64_t; + + enum class FramebufferCreateFlagBits + { + }; + + using FramebufferCreateFlags = Flags; + + enum class QueryPoolCreateFlagBits + { + }; + + using QueryPoolCreateFlags = Flags; + + enum class RenderPassCreateFlagBits + { + }; + + using RenderPassCreateFlags = Flags; + + enum class SamplerCreateFlagBits + { + }; + + using SamplerCreateFlags = Flags; + + enum class PipelineLayoutCreateFlagBits + { + }; + + using PipelineLayoutCreateFlags = Flags; + + enum class PipelineCacheCreateFlagBits + { + }; + + using PipelineCacheCreateFlags = Flags; + + enum class PipelineDepthStencilStateCreateFlagBits + { + }; + + using PipelineDepthStencilStateCreateFlags = Flags; + + enum class PipelineDynamicStateCreateFlagBits + { + }; + + using PipelineDynamicStateCreateFlags = Flags; + + enum class PipelineColorBlendStateCreateFlagBits + { + }; + + using PipelineColorBlendStateCreateFlags = Flags; + + enum class PipelineMultisampleStateCreateFlagBits + { + }; + + using PipelineMultisampleStateCreateFlags = Flags; + + enum class PipelineRasterizationStateCreateFlagBits + { + }; + + using PipelineRasterizationStateCreateFlags = Flags; + + enum class PipelineViewportStateCreateFlagBits + { + }; + + using PipelineViewportStateCreateFlags = Flags; + + enum class PipelineTessellationStateCreateFlagBits + { + }; + + using PipelineTessellationStateCreateFlags = Flags; + + enum class PipelineInputAssemblyStateCreateFlagBits + { + }; + + using PipelineInputAssemblyStateCreateFlags = Flags; + + enum class PipelineVertexInputStateCreateFlagBits + { + }; + + using PipelineVertexInputStateCreateFlags = Flags; + + enum class PipelineShaderStageCreateFlagBits + { + }; + + using PipelineShaderStageCreateFlags = Flags; + + enum class BufferViewCreateFlagBits + { + }; + + using BufferViewCreateFlags = Flags; + + enum class InstanceCreateFlagBits + { + }; + + using InstanceCreateFlags = Flags; + + enum class DeviceCreateFlagBits + { + }; + + using DeviceCreateFlags = Flags; + + enum class DeviceQueueCreateFlagBits + { + }; + + using DeviceQueueCreateFlags = Flags; + + enum class ImageViewCreateFlagBits + { + }; + + using ImageViewCreateFlags = Flags; + + enum class SemaphoreCreateFlagBits + { + }; + + using SemaphoreCreateFlags = Flags; + + enum class ShaderModuleCreateFlagBits + { + }; + + using ShaderModuleCreateFlags = Flags; + + enum class EventCreateFlagBits + { + }; + + using EventCreateFlags = Flags; + + enum class MemoryMapFlagBits + { + }; + + using MemoryMapFlags = Flags; + + enum class DescriptorPoolResetFlagBits + { + }; + + using DescriptorPoolResetFlags = Flags; + + enum class DescriptorUpdateTemplateCreateFlagBitsKHR + { + }; + + using DescriptorUpdateTemplateCreateFlagsKHR = Flags; + + enum class DisplayModeCreateFlagBitsKHR + { + }; + + using DisplayModeCreateFlagsKHR = Flags; + + enum class DisplaySurfaceCreateFlagBitsKHR + { + }; + + using DisplaySurfaceCreateFlagsKHR = Flags; + +#ifdef VK_USE_PLATFORM_ANDROID_KHR + enum class AndroidSurfaceCreateFlagBitsKHR + { + }; +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + +#ifdef VK_USE_PLATFORM_ANDROID_KHR + using AndroidSurfaceCreateFlagsKHR = Flags; +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + enum class MirSurfaceCreateFlagBitsKHR + { + }; +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + using MirSurfaceCreateFlagsKHR = Flags; +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + +#ifdef VK_USE_PLATFORM_VI_NN + enum class ViSurfaceCreateFlagBitsNN + { + }; +#endif /*VK_USE_PLATFORM_VI_NN*/ + +#ifdef VK_USE_PLATFORM_VI_NN + using ViSurfaceCreateFlagsNN = Flags; +#endif /*VK_USE_PLATFORM_VI_NN*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + enum class WaylandSurfaceCreateFlagBitsKHR + { + }; +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + using WaylandSurfaceCreateFlagsKHR = Flags; +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + enum class Win32SurfaceCreateFlagBitsKHR { }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -1257,6 +2438,12 @@ namespace VULKAN_HPP_NAMESPACE using ValidationCacheCreateFlagsEXT = Flags; + enum class PipelineRasterizationConservativeStateCreateFlagBitsEXT + { + }; + + using PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; + class DeviceMemory { public: @@ -1269,7 +2456,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) - : m_deviceMemory( deviceMemory ) + : m_deviceMemory( deviceMemory ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1336,7 +2523,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) - : m_commandPool( commandPool ) + : m_commandPool( commandPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1403,7 +2590,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) - : m_buffer( buffer ) + : m_buffer( buffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1470,7 +2657,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) - : m_bufferView( bufferView ) + : m_bufferView( bufferView ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1537,7 +2724,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) - : m_image( image ) + : m_image( image ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1604,7 +2791,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) - : m_imageView( imageView ) + : m_imageView( imageView ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1671,7 +2858,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) - : m_shaderModule( shaderModule ) + : m_shaderModule( shaderModule ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1738,7 +2925,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) - : m_pipeline( pipeline ) + : m_pipeline( pipeline ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1805,7 +2992,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) - : m_pipelineLayout( pipelineLayout ) + : m_pipelineLayout( pipelineLayout ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1872,7 +3059,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) - : m_sampler( sampler ) + : m_sampler( sampler ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1939,7 +3126,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) - : m_descriptorSet( descriptorSet ) + : m_descriptorSet( descriptorSet ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2006,7 +3193,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout ) - : m_descriptorSetLayout( descriptorSetLayout ) + : m_descriptorSetLayout( descriptorSetLayout ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2073,7 +3260,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) - : m_descriptorPool( descriptorPool ) + : m_descriptorPool( descriptorPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2140,7 +3327,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) - : m_fence( fence ) + : m_fence( fence ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2207,7 +3394,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) - : m_semaphore( semaphore ) + : m_semaphore( semaphore ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2274,7 +3461,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) - : m_event( event ) + : m_event( event ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2341,7 +3528,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) - : m_queryPool( queryPool ) + : m_queryPool( queryPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2408,7 +3595,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) - : m_framebuffer( framebuffer ) + : m_framebuffer( framebuffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2475,7 +3662,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) - : m_renderPass( renderPass ) + : m_renderPass( renderPass ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2542,7 +3729,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) - : m_pipelineCache( pipelineCache ) + : m_pipelineCache( pipelineCache ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2609,7 +3796,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT ObjectTableNVX( VkObjectTableNVX objectTableNVX ) - : m_objectTableNVX( objectTableNVX ) + : m_objectTableNVX( objectTableNVX ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2676,7 +3863,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNVX( VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) - : m_indirectCommandsLayoutNVX( indirectCommandsLayoutNVX ) + : m_indirectCommandsLayoutNVX( indirectCommandsLayoutNVX ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2743,7 +3930,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorUpdateTemplateKHR( VkDescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) - : m_descriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR ) + : m_descriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2810,7 +3997,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT SamplerYcbcrConversionKHR( VkSamplerYcbcrConversionKHR samplerYcbcrConversionKHR ) - : m_samplerYcbcrConversionKHR( samplerYcbcrConversionKHR ) + : m_samplerYcbcrConversionKHR( samplerYcbcrConversionKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2877,7 +4064,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT ValidationCacheEXT( VkValidationCacheEXT validationCacheEXT ) - : m_validationCacheEXT( validationCacheEXT ) + : m_validationCacheEXT( validationCacheEXT ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2944,7 +4131,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) - : m_displayKHR( displayKHR ) + : m_displayKHR( displayKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -3011,7 +4198,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) - : m_displayModeKHR( displayModeKHR ) + : m_displayModeKHR( displayModeKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -3078,7 +4265,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) - : m_surfaceKHR( surfaceKHR ) + : m_surfaceKHR( surfaceKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -3145,7 +4332,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) - : m_swapchainKHR( swapchainKHR ) + : m_swapchainKHR( swapchainKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -3212,7 +4399,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT( VkDebugReportCallbackEXT debugReportCallbackEXT ) - : m_debugReportCallbackEXT( debugReportCallbackEXT ) + : m_debugReportCallbackEXT( debugReportCallbackEXT ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -5557,6 +6744,35 @@ namespace VULKAN_HPP_NAMESPACE }; static_assert( sizeof( SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" ); + struct ShaderResourceUsageAMD + { + operator const VkShaderResourceUsageAMD&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ShaderResourceUsageAMD const& rhs ) const + { + return ( numUsedVgprs == rhs.numUsedVgprs ) + && ( numUsedSgprs == rhs.numUsedSgprs ) + && ( ldsSizePerLocalWorkGroup == rhs.ldsSizePerLocalWorkGroup ) + && ( ldsUsageSizeInBytes == rhs.ldsUsageSizeInBytes ) + && ( scratchMemUsageInBytes == rhs.scratchMemUsageInBytes ); + } + + bool operator!=( ShaderResourceUsageAMD const& rhs ) const + { + return !operator==( rhs ); + } + + uint32_t numUsedVgprs; + uint32_t numUsedSgprs; + uint32_t ldsSizePerLocalWorkGroup; + size_t ldsUsageSizeInBytes; + size_t scratchMemUsageInBytes; + }; + static_assert( sizeof( ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), "struct and wrapper have different size!" ); + enum class ImageLayout { eUndefined = VK_IMAGE_LAYOUT_UNDEFINED, @@ -6838,6 +8054,8 @@ namespace VULKAN_HPP_NAMESPACE ePipelineViewportSwizzleStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV, ePhysicalDeviceDiscardRectanglePropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, ePipelineDiscardRectangleStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT, + ePhysicalDeviceConservativeRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, + ePipelineRasterizationConservativeStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, eHdrMetadataEXT = VK_STRUCTURE_TYPE_HDR_METADATA_EXT, eSharedPresentSurfaceCapabilitiesKHR = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, ePhysicalDeviceExternalFenceInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR, @@ -6887,15 +8105,17 @@ namespace VULKAN_HPP_NAMESPACE eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR, eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, - eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT + eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, + eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, + eImportMemoryHostPointerInfoEXT = VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT, + eMemoryHostPointerPropertiesEXT = VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, + ePhysicalDeviceExternalMemoryHostPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT }; struct ApplicationInfo { ApplicationInfo( const char* pApplicationName_ = nullptr, uint32_t applicationVersion_ = 0, const char* pEngineName_ = nullptr, uint32_t engineVersion_ = 0, uint32_t apiVersion_ = 0 ) - : sType( StructureType::eApplicationInfo ) - , pNext( nullptr ) - , pApplicationName( pApplicationName_ ) + : pApplicationName( pApplicationName_ ) , applicationVersion( applicationVersion_ ) , pEngineName( pEngineName_ ) , engineVersion( engineVersion_ ) @@ -6971,10 +8191,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eApplicationInfo; public: - const void* pNext; + const void* pNext = nullptr; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; @@ -6986,9 +8206,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceQueueCreateInfo { DeviceQueueCreateInfo( DeviceQueueCreateFlags flags_ = DeviceQueueCreateFlags(), uint32_t queueFamilyIndex_ = 0, uint32_t queueCount_ = 0, const float* pQueuePriorities_ = nullptr ) - : sType( StructureType::eDeviceQueueCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , queueFamilyIndex( queueFamilyIndex_ ) , queueCount( queueCount_ ) , pQueuePriorities( pQueuePriorities_ ) @@ -7056,10 +8274,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceQueueCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; uint32_t queueCount; @@ -7070,9 +8288,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceCreateInfo { DeviceCreateInfo( DeviceCreateFlags flags_ = DeviceCreateFlags(), uint32_t queueCreateInfoCount_ = 0, const DeviceQueueCreateInfo* pQueueCreateInfos_ = nullptr, uint32_t enabledLayerCount_ = 0, const char* const* ppEnabledLayerNames_ = nullptr, uint32_t enabledExtensionCount_ = 0, const char* const* ppEnabledExtensionNames_ = nullptr, const PhysicalDeviceFeatures* pEnabledFeatures_ = nullptr ) - : sType( StructureType::eDeviceCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , queueCreateInfoCount( queueCreateInfoCount_ ) , pQueueCreateInfos( pQueueCreateInfos_ ) , enabledLayerCount( enabledLayerCount_ ) @@ -7172,10 +8388,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceCreateFlags flags; uint32_t queueCreateInfoCount; const DeviceQueueCreateInfo* pQueueCreateInfos; @@ -7190,9 +8406,7 @@ namespace VULKAN_HPP_NAMESPACE struct InstanceCreateInfo { InstanceCreateInfo( InstanceCreateFlags flags_ = InstanceCreateFlags(), const ApplicationInfo* pApplicationInfo_ = nullptr, uint32_t enabledLayerCount_ = 0, const char* const* ppEnabledLayerNames_ = nullptr, uint32_t enabledExtensionCount_ = 0, const char* const* ppEnabledExtensionNames_ = nullptr ) - : sType( StructureType::eInstanceCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pApplicationInfo( pApplicationInfo_ ) , enabledLayerCount( enabledLayerCount_ ) , ppEnabledLayerNames( ppEnabledLayerNames_ ) @@ -7276,10 +8490,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eInstanceCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; InstanceCreateFlags flags; const ApplicationInfo* pApplicationInfo; uint32_t enabledLayerCount; @@ -7292,9 +8506,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryAllocateInfo { MemoryAllocateInfo( DeviceSize allocationSize_ = 0, uint32_t memoryTypeIndex_ = 0 ) - : sType( StructureType::eMemoryAllocateInfo ) - , pNext( nullptr ) - , allocationSize( allocationSize_ ) + : allocationSize( allocationSize_ ) , memoryTypeIndex( memoryTypeIndex_ ) { } @@ -7346,10 +8558,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceSize allocationSize; uint32_t memoryTypeIndex; }; @@ -7358,9 +8570,7 @@ namespace VULKAN_HPP_NAMESPACE struct MappedMemoryRange { MappedMemoryRange( DeviceMemory memory_ = DeviceMemory(), DeviceSize offset_ = 0, DeviceSize size_ = 0 ) - : sType( StructureType::eMappedMemoryRange ) - , pNext( nullptr ) - , memory( memory_ ) + : memory( memory_ ) , offset( offset_ ) , size( size_ ) { @@ -7420,10 +8630,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMappedMemoryRange; public: - const void* pNext; + const void* pNext = nullptr; DeviceMemory memory; DeviceSize offset; DeviceSize size; @@ -7433,9 +8643,7 @@ namespace VULKAN_HPP_NAMESPACE struct WriteDescriptorSet { WriteDescriptorSet( DescriptorSet dstSet_ = DescriptorSet(), uint32_t dstBinding_ = 0, uint32_t dstArrayElement_ = 0, uint32_t descriptorCount_ = 0, DescriptorType descriptorType_ = DescriptorType::eSampler, const DescriptorImageInfo* pImageInfo_ = nullptr, const DescriptorBufferInfo* pBufferInfo_ = nullptr, const BufferView* pTexelBufferView_ = nullptr ) - : sType( StructureType::eWriteDescriptorSet ) - , pNext( nullptr ) - , dstSet( dstSet_ ) + : dstSet( dstSet_ ) , dstBinding( dstBinding_ ) , dstArrayElement( dstArrayElement_ ) , descriptorCount( descriptorCount_ ) @@ -7535,10 +8743,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eWriteDescriptorSet; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; @@ -7553,9 +8761,7 @@ namespace VULKAN_HPP_NAMESPACE struct CopyDescriptorSet { CopyDescriptorSet( DescriptorSet srcSet_ = DescriptorSet(), uint32_t srcBinding_ = 0, uint32_t srcArrayElement_ = 0, DescriptorSet dstSet_ = DescriptorSet(), uint32_t dstBinding_ = 0, uint32_t dstArrayElement_ = 0, uint32_t descriptorCount_ = 0 ) - : sType( StructureType::eCopyDescriptorSet ) - , pNext( nullptr ) - , srcSet( srcSet_ ) + : srcSet( srcSet_ ) , srcBinding( srcBinding_ ) , srcArrayElement( srcArrayElement_ ) , dstSet( dstSet_ ) @@ -7647,10 +8853,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCopyDescriptorSet; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSet srcSet; uint32_t srcBinding; uint32_t srcArrayElement; @@ -7664,9 +8870,7 @@ namespace VULKAN_HPP_NAMESPACE struct BufferViewCreateInfo { BufferViewCreateInfo( BufferViewCreateFlags flags_ = BufferViewCreateFlags(), Buffer buffer_ = Buffer(), Format format_ = Format::eUndefined, DeviceSize offset_ = 0, DeviceSize range_ = 0 ) - : sType( StructureType::eBufferViewCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , buffer( buffer_ ) , format( format_ ) , offset( offset_ ) @@ -7742,10 +8946,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBufferViewCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; BufferViewCreateFlags flags; Buffer buffer; Format format; @@ -7757,9 +8961,7 @@ namespace VULKAN_HPP_NAMESPACE struct ShaderModuleCreateInfo { ShaderModuleCreateInfo( ShaderModuleCreateFlags flags_ = ShaderModuleCreateFlags(), size_t codeSize_ = 0, const uint32_t* pCode_ = nullptr ) - : sType( StructureType::eShaderModuleCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , codeSize( codeSize_ ) , pCode( pCode_ ) { @@ -7819,10 +9021,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eShaderModuleCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ShaderModuleCreateFlags flags; size_t codeSize; const uint32_t* pCode; @@ -7832,9 +9034,7 @@ namespace VULKAN_HPP_NAMESPACE struct DescriptorSetAllocateInfo { DescriptorSetAllocateInfo( DescriptorPool descriptorPool_ = DescriptorPool(), uint32_t descriptorSetCount_ = 0, const DescriptorSetLayout* pSetLayouts_ = nullptr ) - : sType( StructureType::eDescriptorSetAllocateInfo ) - , pNext( nullptr ) - , descriptorPool( descriptorPool_ ) + : descriptorPool( descriptorPool_ ) , descriptorSetCount( descriptorSetCount_ ) , pSetLayouts( pSetLayouts_ ) { @@ -7894,10 +9094,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorSetAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorPool descriptorPool; uint32_t descriptorSetCount; const DescriptorSetLayout* pSetLayouts; @@ -7907,9 +9107,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineVertexInputStateCreateInfo { PipelineVertexInputStateCreateInfo( PipelineVertexInputStateCreateFlags flags_ = PipelineVertexInputStateCreateFlags(), uint32_t vertexBindingDescriptionCount_ = 0, const VertexInputBindingDescription* pVertexBindingDescriptions_ = nullptr, uint32_t vertexAttributeDescriptionCount_ = 0, const VertexInputAttributeDescription* pVertexAttributeDescriptions_ = nullptr ) - : sType( StructureType::ePipelineVertexInputStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , vertexBindingDescriptionCount( vertexBindingDescriptionCount_ ) , pVertexBindingDescriptions( pVertexBindingDescriptions_ ) , vertexAttributeDescriptionCount( vertexAttributeDescriptionCount_ ) @@ -7985,10 +9183,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineVertexInputStateCreateFlags flags; uint32_t vertexBindingDescriptionCount; const VertexInputBindingDescription* pVertexBindingDescriptions; @@ -8000,9 +9198,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineInputAssemblyStateCreateInfo { PipelineInputAssemblyStateCreateInfo( PipelineInputAssemblyStateCreateFlags flags_ = PipelineInputAssemblyStateCreateFlags(), PrimitiveTopology topology_ = PrimitiveTopology::ePointList, Bool32 primitiveRestartEnable_ = 0 ) - : sType( StructureType::ePipelineInputAssemblyStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , topology( topology_ ) , primitiveRestartEnable( primitiveRestartEnable_ ) { @@ -8062,10 +9258,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineInputAssemblyStateCreateFlags flags; PrimitiveTopology topology; Bool32 primitiveRestartEnable; @@ -8075,9 +9271,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineTessellationStateCreateInfo { PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateFlags flags_ = PipelineTessellationStateCreateFlags(), uint32_t patchControlPoints_ = 0 ) - : sType( StructureType::ePipelineTessellationStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , patchControlPoints( patchControlPoints_ ) { } @@ -8129,10 +9323,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineTessellationStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineTessellationStateCreateFlags flags; uint32_t patchControlPoints; }; @@ -8141,9 +9335,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineViewportStateCreateInfo { PipelineViewportStateCreateInfo( PipelineViewportStateCreateFlags flags_ = PipelineViewportStateCreateFlags(), uint32_t viewportCount_ = 0, const Viewport* pViewports_ = nullptr, uint32_t scissorCount_ = 0, const Rect2D* pScissors_ = nullptr ) - : sType( StructureType::ePipelineViewportStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , viewportCount( viewportCount_ ) , pViewports( pViewports_ ) , scissorCount( scissorCount_ ) @@ -8219,10 +9411,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineViewportStateCreateFlags flags; uint32_t viewportCount; const Viewport* pViewports; @@ -8234,9 +9426,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineRasterizationStateCreateInfo { PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateFlags flags_ = PipelineRasterizationStateCreateFlags(), Bool32 depthClampEnable_ = 0, Bool32 rasterizerDiscardEnable_ = 0, PolygonMode polygonMode_ = PolygonMode::eFill, CullModeFlags cullMode_ = CullModeFlags(), FrontFace frontFace_ = FrontFace::eCounterClockwise, Bool32 depthBiasEnable_ = 0, float depthBiasConstantFactor_ = 0, float depthBiasClamp_ = 0, float depthBiasSlopeFactor_ = 0, float lineWidth_ = 0 ) - : sType( StructureType::ePipelineRasterizationStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , depthClampEnable( depthClampEnable_ ) , rasterizerDiscardEnable( rasterizerDiscardEnable_ ) , polygonMode( polygonMode_ ) @@ -8360,10 +9550,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineRasterizationStateCreateFlags flags; Bool32 depthClampEnable; Bool32 rasterizerDiscardEnable; @@ -8381,9 +9571,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineDepthStencilStateCreateInfo { PipelineDepthStencilStateCreateInfo( PipelineDepthStencilStateCreateFlags flags_ = PipelineDepthStencilStateCreateFlags(), Bool32 depthTestEnable_ = 0, Bool32 depthWriteEnable_ = 0, CompareOp depthCompareOp_ = CompareOp::eNever, Bool32 depthBoundsTestEnable_ = 0, Bool32 stencilTestEnable_ = 0, StencilOpState front_ = StencilOpState(), StencilOpState back_ = StencilOpState(), float minDepthBounds_ = 0, float maxDepthBounds_ = 0 ) - : sType( StructureType::ePipelineDepthStencilStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , depthTestEnable( depthTestEnable_ ) , depthWriteEnable( depthWriteEnable_ ) , depthCompareOp( depthCompareOp_ ) @@ -8499,10 +9687,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineDepthStencilStateCreateFlags flags; Bool32 depthTestEnable; Bool32 depthWriteEnable; @@ -8519,9 +9707,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineCacheCreateInfo { PipelineCacheCreateInfo( PipelineCacheCreateFlags flags_ = PipelineCacheCreateFlags(), size_t initialDataSize_ = 0, const void* pInitialData_ = nullptr ) - : sType( StructureType::ePipelineCacheCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , initialDataSize( initialDataSize_ ) , pInitialData( pInitialData_ ) { @@ -8581,10 +9767,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineCacheCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCacheCreateFlags flags; size_t initialDataSize; const void* pInitialData; @@ -8594,9 +9780,7 @@ namespace VULKAN_HPP_NAMESPACE struct SamplerCreateInfo { SamplerCreateInfo( SamplerCreateFlags flags_ = SamplerCreateFlags(), Filter magFilter_ = Filter::eNearest, Filter minFilter_ = Filter::eNearest, SamplerMipmapMode mipmapMode_ = SamplerMipmapMode::eNearest, SamplerAddressMode addressModeU_ = SamplerAddressMode::eRepeat, SamplerAddressMode addressModeV_ = SamplerAddressMode::eRepeat, SamplerAddressMode addressModeW_ = SamplerAddressMode::eRepeat, float mipLodBias_ = 0, Bool32 anisotropyEnable_ = 0, float maxAnisotropy_ = 0, Bool32 compareEnable_ = 0, CompareOp compareOp_ = CompareOp::eNever, float minLod_ = 0, float maxLod_ = 0, BorderColor borderColor_ = BorderColor::eFloatTransparentBlack, Bool32 unnormalizedCoordinates_ = 0 ) - : sType( StructureType::eSamplerCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , magFilter( magFilter_ ) , minFilter( minFilter_ ) , mipmapMode( mipmapMode_ ) @@ -8760,10 +9944,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSamplerCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; SamplerCreateFlags flags; Filter magFilter; Filter minFilter; @@ -8786,9 +9970,7 @@ namespace VULKAN_HPP_NAMESPACE struct CommandBufferAllocateInfo { CommandBufferAllocateInfo( CommandPool commandPool_ = CommandPool(), CommandBufferLevel level_ = CommandBufferLevel::ePrimary, uint32_t commandBufferCount_ = 0 ) - : sType( StructureType::eCommandBufferAllocateInfo ) - , pNext( nullptr ) - , commandPool( commandPool_ ) + : commandPool( commandPool_ ) , level( level_ ) , commandBufferCount( commandBufferCount_ ) { @@ -8848,10 +10030,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandPool commandPool; CommandBufferLevel level; uint32_t commandBufferCount; @@ -8861,9 +10043,7 @@ namespace VULKAN_HPP_NAMESPACE struct RenderPassBeginInfo { RenderPassBeginInfo( RenderPass renderPass_ = RenderPass(), Framebuffer framebuffer_ = Framebuffer(), Rect2D renderArea_ = Rect2D(), uint32_t clearValueCount_ = 0, const ClearValue* pClearValues_ = nullptr ) - : sType( StructureType::eRenderPassBeginInfo ) - , pNext( nullptr ) - , renderPass( renderPass_ ) + : renderPass( renderPass_ ) , framebuffer( framebuffer_ ) , renderArea( renderArea_ ) , clearValueCount( clearValueCount_ ) @@ -8939,10 +10119,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassBeginInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPass renderPass; Framebuffer framebuffer; Rect2D renderArea; @@ -8954,9 +10134,7 @@ namespace VULKAN_HPP_NAMESPACE struct EventCreateInfo { EventCreateInfo( EventCreateFlags flags_ = EventCreateFlags() ) - : sType( StructureType::eEventCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -9000,10 +10178,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eEventCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; EventCreateFlags flags; }; static_assert( sizeof( EventCreateInfo ) == sizeof( VkEventCreateInfo ), "struct and wrapper have different size!" ); @@ -9011,9 +10189,7 @@ namespace VULKAN_HPP_NAMESPACE struct SemaphoreCreateInfo { SemaphoreCreateInfo( SemaphoreCreateFlags flags_ = SemaphoreCreateFlags() ) - : sType( StructureType::eSemaphoreCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -9057,10 +10233,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSemaphoreCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; SemaphoreCreateFlags flags; }; static_assert( sizeof( SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "struct and wrapper have different size!" ); @@ -9068,9 +10244,7 @@ namespace VULKAN_HPP_NAMESPACE struct FramebufferCreateInfo { FramebufferCreateInfo( FramebufferCreateFlags flags_ = FramebufferCreateFlags(), RenderPass renderPass_ = RenderPass(), uint32_t attachmentCount_ = 0, const ImageView* pAttachments_ = nullptr, uint32_t width_ = 0, uint32_t height_ = 0, uint32_t layers_ = 0 ) - : sType( StructureType::eFramebufferCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , renderPass( renderPass_ ) , attachmentCount( attachmentCount_ ) , pAttachments( pAttachments_ ) @@ -9162,10 +10336,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eFramebufferCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; FramebufferCreateFlags flags; RenderPass renderPass; uint32_t attachmentCount; @@ -9179,9 +10353,7 @@ namespace VULKAN_HPP_NAMESPACE struct DisplayModeCreateInfoKHR { DisplayModeCreateInfoKHR( DisplayModeCreateFlagsKHR flags_ = DisplayModeCreateFlagsKHR(), DisplayModeParametersKHR parameters_ = DisplayModeParametersKHR() ) - : sType( StructureType::eDisplayModeCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , parameters( parameters_ ) { } @@ -9233,10 +10405,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDisplayModeCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DisplayModeCreateFlagsKHR flags; DisplayModeParametersKHR parameters; }; @@ -9245,9 +10417,7 @@ namespace VULKAN_HPP_NAMESPACE struct DisplayPresentInfoKHR { DisplayPresentInfoKHR( Rect2D srcRect_ = Rect2D(), Rect2D dstRect_ = Rect2D(), Bool32 persistent_ = 0 ) - : sType( StructureType::eDisplayPresentInfoKHR ) - , pNext( nullptr ) - , srcRect( srcRect_ ) + : srcRect( srcRect_ ) , dstRect( dstRect_ ) , persistent( persistent_ ) { @@ -9307,10 +10477,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDisplayPresentInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Rect2D srcRect; Rect2D dstRect; Bool32 persistent; @@ -9321,9 +10491,7 @@ namespace VULKAN_HPP_NAMESPACE struct AndroidSurfaceCreateInfoKHR { AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateFlagsKHR flags_ = AndroidSurfaceCreateFlagsKHR(), ANativeWindow* window_ = nullptr ) - : sType( StructureType::eAndroidSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , window( window_ ) { } @@ -9375,10 +10543,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; AndroidSurfaceCreateFlagsKHR flags; ANativeWindow* window; }; @@ -9389,9 +10557,7 @@ namespace VULKAN_HPP_NAMESPACE struct MirSurfaceCreateInfoKHR { MirSurfaceCreateInfoKHR( MirSurfaceCreateFlagsKHR flags_ = MirSurfaceCreateFlagsKHR(), MirConnection* connection_ = nullptr, MirSurface* mirSurface_ = nullptr ) - : sType( StructureType::eMirSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , connection( connection_ ) , mirSurface( mirSurface_ ) { @@ -9451,10 +10617,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMirSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; MirSurfaceCreateFlagsKHR flags; MirConnection* connection; MirSurface* mirSurface; @@ -9466,9 +10632,7 @@ namespace VULKAN_HPP_NAMESPACE struct ViSurfaceCreateInfoNN { ViSurfaceCreateInfoNN( ViSurfaceCreateFlagsNN flags_ = ViSurfaceCreateFlagsNN(), void* window_ = nullptr ) - : sType( StructureType::eViSurfaceCreateInfoNN ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , window( window_ ) { } @@ -9520,10 +10684,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eViSurfaceCreateInfoNN; public: - const void* pNext; + const void* pNext = nullptr; ViSurfaceCreateFlagsNN flags; void* window; }; @@ -9534,9 +10698,7 @@ namespace VULKAN_HPP_NAMESPACE struct WaylandSurfaceCreateInfoKHR { WaylandSurfaceCreateInfoKHR( WaylandSurfaceCreateFlagsKHR flags_ = WaylandSurfaceCreateFlagsKHR(), struct wl_display* display_ = nullptr, struct wl_surface* surface_ = nullptr ) - : sType( StructureType::eWaylandSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , display( display_ ) , surface( surface_ ) { @@ -9596,10 +10758,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; WaylandSurfaceCreateFlagsKHR flags; struct wl_display* display; struct wl_surface* surface; @@ -9611,9 +10773,7 @@ namespace VULKAN_HPP_NAMESPACE struct Win32SurfaceCreateInfoKHR { Win32SurfaceCreateInfoKHR( Win32SurfaceCreateFlagsKHR flags_ = Win32SurfaceCreateFlagsKHR(), HINSTANCE hinstance_ = 0, HWND hwnd_ = 0 ) - : sType( StructureType::eWin32SurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , hinstance( hinstance_ ) , hwnd( hwnd_ ) { @@ -9673,10 +10833,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Win32SurfaceCreateFlagsKHR flags; HINSTANCE hinstance; HWND hwnd; @@ -9688,9 +10848,7 @@ namespace VULKAN_HPP_NAMESPACE struct XlibSurfaceCreateInfoKHR { XlibSurfaceCreateInfoKHR( XlibSurfaceCreateFlagsKHR flags_ = XlibSurfaceCreateFlagsKHR(), Display* dpy_ = nullptr, Window window_ = 0 ) - : sType( StructureType::eXlibSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , dpy( dpy_ ) , window( window_ ) { @@ -9750,10 +10908,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; XlibSurfaceCreateFlagsKHR flags; Display* dpy; Window window; @@ -9765,9 +10923,7 @@ namespace VULKAN_HPP_NAMESPACE struct XcbSurfaceCreateInfoKHR { XcbSurfaceCreateInfoKHR( XcbSurfaceCreateFlagsKHR flags_ = XcbSurfaceCreateFlagsKHR(), xcb_connection_t* connection_ = nullptr, xcb_window_t window_ = 0 ) - : sType( StructureType::eXcbSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , connection( connection_ ) , window( window_ ) { @@ -9827,10 +10983,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; XcbSurfaceCreateFlagsKHR flags; xcb_connection_t* connection; xcb_window_t window; @@ -9841,9 +10997,7 @@ namespace VULKAN_HPP_NAMESPACE struct DebugMarkerMarkerInfoEXT { DebugMarkerMarkerInfoEXT( const char* pMarkerName_ = nullptr, std::array const& color_ = { { 0, 0, 0, 0 } } ) - : sType( StructureType::eDebugMarkerMarkerInfoEXT ) - , pNext( nullptr ) - , pMarkerName( pMarkerName_ ) + : pMarkerName( pMarkerName_ ) { memcpy( &color, color_.data(), 4 * sizeof( float ) ); } @@ -9895,10 +11049,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; const char* pMarkerName; float color[4]; }; @@ -9907,9 +11061,7 @@ namespace VULKAN_HPP_NAMESPACE struct DedicatedAllocationImageCreateInfoNV { DedicatedAllocationImageCreateInfoNV( Bool32 dedicatedAllocation_ = 0 ) - : sType( StructureType::eDedicatedAllocationImageCreateInfoNV ) - , pNext( nullptr ) - , dedicatedAllocation( dedicatedAllocation_ ) + : dedicatedAllocation( dedicatedAllocation_ ) { } @@ -9953,10 +11105,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Bool32 dedicatedAllocation; }; static_assert( sizeof( DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), "struct and wrapper have different size!" ); @@ -9964,9 +11116,7 @@ namespace VULKAN_HPP_NAMESPACE struct DedicatedAllocationBufferCreateInfoNV { DedicatedAllocationBufferCreateInfoNV( Bool32 dedicatedAllocation_ = 0 ) - : sType( StructureType::eDedicatedAllocationBufferCreateInfoNV ) - , pNext( nullptr ) - , dedicatedAllocation( dedicatedAllocation_ ) + : dedicatedAllocation( dedicatedAllocation_ ) { } @@ -10010,10 +11160,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Bool32 dedicatedAllocation; }; static_assert( sizeof( DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), "struct and wrapper have different size!" ); @@ -10021,9 +11171,7 @@ namespace VULKAN_HPP_NAMESPACE struct DedicatedAllocationMemoryAllocateInfoNV { DedicatedAllocationMemoryAllocateInfoNV( Image image_ = Image(), Buffer buffer_ = Buffer() ) - : sType( StructureType::eDedicatedAllocationMemoryAllocateInfoNV ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) , buffer( buffer_ ) { } @@ -10075,10 +11223,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Image image; Buffer buffer; }; @@ -10088,9 +11236,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportMemoryWin32HandleInfoNV { ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr, DWORD dwAccess_ = 0 ) - : sType( StructureType::eExportMemoryWin32HandleInfoNV ) - , pNext( nullptr ) - , pAttributes( pAttributes_ ) + : pAttributes( pAttributes_ ) , dwAccess( dwAccess_ ) { } @@ -10142,10 +11288,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; }; @@ -10156,9 +11302,7 @@ namespace VULKAN_HPP_NAMESPACE struct Win32KeyedMutexAcquireReleaseInfoNV { Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = 0, const DeviceMemory* pAcquireSyncs_ = nullptr, const uint64_t* pAcquireKeys_ = nullptr, const uint32_t* pAcquireTimeoutMilliseconds_ = nullptr, uint32_t releaseCount_ = 0, const DeviceMemory* pReleaseSyncs_ = nullptr, const uint64_t* pReleaseKeys_ = nullptr ) - : sType( StructureType::eWin32KeyedMutexAcquireReleaseInfoNV ) - , pNext( nullptr ) - , acquireCount( acquireCount_ ) + : acquireCount( acquireCount_ ) , pAcquireSyncs( pAcquireSyncs_ ) , pAcquireKeys( pAcquireKeys_ ) , pAcquireTimeoutMilliseconds( pAcquireTimeoutMilliseconds_ ) @@ -10250,10 +11394,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV; public: - const void* pNext; + const void* pNext = nullptr; uint32_t acquireCount; const DeviceMemory* pAcquireSyncs; const uint64_t* pAcquireKeys; @@ -10268,9 +11412,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGeneratedCommandsFeaturesNVX { DeviceGeneratedCommandsFeaturesNVX( Bool32 computeBindingPointSupport_ = 0 ) - : sType( StructureType::eDeviceGeneratedCommandsFeaturesNVX ) - , pNext( nullptr ) - , computeBindingPointSupport( computeBindingPointSupport_ ) + : computeBindingPointSupport( computeBindingPointSupport_ ) { } @@ -10314,10 +11456,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGeneratedCommandsFeaturesNVX; public: - const void* pNext; + const void* pNext = nullptr; Bool32 computeBindingPointSupport; }; static_assert( sizeof( DeviceGeneratedCommandsFeaturesNVX ) == sizeof( VkDeviceGeneratedCommandsFeaturesNVX ), "struct and wrapper have different size!" ); @@ -10325,9 +11467,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGeneratedCommandsLimitsNVX { DeviceGeneratedCommandsLimitsNVX( uint32_t maxIndirectCommandsLayoutTokenCount_ = 0, uint32_t maxObjectEntryCounts_ = 0, uint32_t minSequenceCountBufferOffsetAlignment_ = 0, uint32_t minSequenceIndexBufferOffsetAlignment_ = 0, uint32_t minCommandsTokenBufferOffsetAlignment_ = 0 ) - : sType( StructureType::eDeviceGeneratedCommandsLimitsNVX ) - , pNext( nullptr ) - , maxIndirectCommandsLayoutTokenCount( maxIndirectCommandsLayoutTokenCount_ ) + : maxIndirectCommandsLayoutTokenCount( maxIndirectCommandsLayoutTokenCount_ ) , maxObjectEntryCounts( maxObjectEntryCounts_ ) , minSequenceCountBufferOffsetAlignment( minSequenceCountBufferOffsetAlignment_ ) , minSequenceIndexBufferOffsetAlignment( minSequenceIndexBufferOffsetAlignment_ ) @@ -10403,10 +11543,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGeneratedCommandsLimitsNVX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t maxIndirectCommandsLayoutTokenCount; uint32_t maxObjectEntryCounts; uint32_t minSequenceCountBufferOffsetAlignment; @@ -10418,9 +11558,7 @@ namespace VULKAN_HPP_NAMESPACE struct CmdReserveSpaceForCommandsInfoNVX { CmdReserveSpaceForCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(), IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(), uint32_t maxSequencesCount_ = 0 ) - : sType( StructureType::eCmdReserveSpaceForCommandsInfoNVX ) - , pNext( nullptr ) - , objectTable( objectTable_ ) + : objectTable( objectTable_ ) , indirectCommandsLayout( indirectCommandsLayout_ ) , maxSequencesCount( maxSequencesCount_ ) { @@ -10480,10 +11618,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCmdReserveSpaceForCommandsInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; ObjectTableNVX objectTable; IndirectCommandsLayoutNVX indirectCommandsLayout; uint32_t maxSequencesCount; @@ -10493,9 +11631,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceFeatures2KHR { PhysicalDeviceFeatures2KHR( PhysicalDeviceFeatures features_ = PhysicalDeviceFeatures() ) - : sType( StructureType::ePhysicalDeviceFeatures2KHR ) - , pNext( nullptr ) - , features( features_ ) + : features( features_ ) { } @@ -10539,10 +11675,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceFeatures2KHR; public: - void* pNext; + void* pNext = nullptr; PhysicalDeviceFeatures features; }; static_assert( sizeof( PhysicalDeviceFeatures2KHR ) == sizeof( VkPhysicalDeviceFeatures2KHR ), "struct and wrapper have different size!" ); @@ -10550,9 +11686,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDevicePushDescriptorPropertiesKHR { PhysicalDevicePushDescriptorPropertiesKHR( uint32_t maxPushDescriptors_ = 0 ) - : sType( StructureType::ePhysicalDevicePushDescriptorPropertiesKHR ) - , pNext( nullptr ) - , maxPushDescriptors( maxPushDescriptors_ ) + : maxPushDescriptors( maxPushDescriptors_ ) { } @@ -10596,10 +11730,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; uint32_t maxPushDescriptors; }; static_assert( sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) == sizeof( VkPhysicalDevicePushDescriptorPropertiesKHR ), "struct and wrapper have different size!" ); @@ -10607,9 +11741,7 @@ namespace VULKAN_HPP_NAMESPACE struct PresentRegionsKHR { PresentRegionsKHR( uint32_t swapchainCount_ = 0, const PresentRegionKHR* pRegions_ = nullptr ) - : sType( StructureType::ePresentRegionsKHR ) - , pNext( nullptr ) - , swapchainCount( swapchainCount_ ) + : swapchainCount( swapchainCount_ ) , pRegions( pRegions_ ) { } @@ -10661,10 +11793,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePresentRegionsKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const PresentRegionKHR* pRegions; }; @@ -10673,9 +11805,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceVariablePointerFeaturesKHR { PhysicalDeviceVariablePointerFeaturesKHR( Bool32 variablePointersStorageBuffer_ = 0, Bool32 variablePointers_ = 0 ) - : sType( StructureType::ePhysicalDeviceVariablePointerFeaturesKHR ) - , pNext( nullptr ) - , variablePointersStorageBuffer( variablePointersStorageBuffer_ ) + : variablePointersStorageBuffer( variablePointersStorageBuffer_ ) , variablePointers( variablePointers_ ) { } @@ -10727,10 +11857,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceVariablePointerFeaturesKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 variablePointersStorageBuffer; Bool32 variablePointers; }; @@ -10760,10 +11890,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceIdPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; uint8_t deviceUUID[VK_UUID_SIZE]; uint8_t driverUUID[VK_UUID_SIZE]; uint8_t deviceLUID[VK_LUID_SIZE_KHR]; @@ -10776,9 +11906,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportMemoryWin32HandleInfoKHR { ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr, DWORD dwAccess_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eExportMemoryWin32HandleInfoKHR ) - , pNext( nullptr ) - , pAttributes( pAttributes_ ) + : pAttributes( pAttributes_ ) , dwAccess( dwAccess_ ) , name( name_ ) { @@ -10838,10 +11966,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -10870,10 +11998,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR; public: - void* pNext; + void* pNext = nullptr; uint32_t memoryTypeBits; }; static_assert( sizeof( MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), "struct and wrapper have different size!" ); @@ -10899,10 +12027,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryFdPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; uint32_t memoryTypeBits; }; static_assert( sizeof( MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), "struct and wrapper have different size!" ); @@ -10911,9 +12039,7 @@ namespace VULKAN_HPP_NAMESPACE struct Win32KeyedMutexAcquireReleaseInfoKHR { Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = 0, const DeviceMemory* pAcquireSyncs_ = nullptr, const uint64_t* pAcquireKeys_ = nullptr, const uint32_t* pAcquireTimeouts_ = nullptr, uint32_t releaseCount_ = 0, const DeviceMemory* pReleaseSyncs_ = nullptr, const uint64_t* pReleaseKeys_ = nullptr ) - : sType( StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR ) - , pNext( nullptr ) - , acquireCount( acquireCount_ ) + : acquireCount( acquireCount_ ) , pAcquireSyncs( pAcquireSyncs_ ) , pAcquireKeys( pAcquireKeys_ ) , pAcquireTimeouts( pAcquireTimeouts_ ) @@ -11005,10 +12131,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t acquireCount; const DeviceMemory* pAcquireSyncs; const uint64_t* pAcquireKeys; @@ -11024,9 +12150,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportSemaphoreWin32HandleInfoKHR { ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr, DWORD dwAccess_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eExportSemaphoreWin32HandleInfoKHR ) - , pNext( nullptr ) - , pAttributes( pAttributes_ ) + : pAttributes( pAttributes_ ) , dwAccess( dwAccess_ ) , name( name_ ) { @@ -11086,10 +12210,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -11101,9 +12225,7 @@ namespace VULKAN_HPP_NAMESPACE struct D3D12FenceSubmitInfoKHR { D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = 0, const uint64_t* pWaitSemaphoreValues_ = nullptr, uint32_t signalSemaphoreValuesCount_ = 0, const uint64_t* pSignalSemaphoreValues_ = nullptr ) - : sType( StructureType::eD3D12FenceSubmitInfoKHR ) - , pNext( nullptr ) - , waitSemaphoreValuesCount( waitSemaphoreValuesCount_ ) + : waitSemaphoreValuesCount( waitSemaphoreValuesCount_ ) , pWaitSemaphoreValues( pWaitSemaphoreValues_ ) , signalSemaphoreValuesCount( signalSemaphoreValuesCount_ ) , pSignalSemaphoreValues( pSignalSemaphoreValues_ ) @@ -11171,10 +12293,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreValuesCount; const uint64_t* pWaitSemaphoreValues; uint32_t signalSemaphoreValuesCount; @@ -11187,9 +12309,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportFenceWin32HandleInfoKHR { ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr, DWORD dwAccess_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eExportFenceWin32HandleInfoKHR ) - , pNext( nullptr ) - , pAttributes( pAttributes_ ) + : pAttributes( pAttributes_ ) , dwAccess( dwAccess_ ) , name( name_ ) { @@ -11249,10 +12369,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -11263,9 +12383,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceMultiviewFeaturesKHX { PhysicalDeviceMultiviewFeaturesKHX( Bool32 multiview_ = 0, Bool32 multiviewGeometryShader_ = 0, Bool32 multiviewTessellationShader_ = 0 ) - : sType( StructureType::ePhysicalDeviceMultiviewFeaturesKHX ) - , pNext( nullptr ) - , multiview( multiview_ ) + : multiview( multiview_ ) , multiviewGeometryShader( multiviewGeometryShader_ ) , multiviewTessellationShader( multiviewTessellationShader_ ) { @@ -11325,10 +12443,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMultiviewFeaturesKHX; public: - void* pNext; + void* pNext = nullptr; Bool32 multiview; Bool32 multiviewGeometryShader; Bool32 multiviewTessellationShader; @@ -11356,10 +12474,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMultiviewPropertiesKHX; public: - void* pNext; + void* pNext = nullptr; uint32_t maxMultiviewViewCount; uint32_t maxMultiviewInstanceIndex; }; @@ -11368,9 +12486,7 @@ namespace VULKAN_HPP_NAMESPACE struct RenderPassMultiviewCreateInfoKHX { RenderPassMultiviewCreateInfoKHX( uint32_t subpassCount_ = 0, const uint32_t* pViewMasks_ = nullptr, uint32_t dependencyCount_ = 0, const int32_t* pViewOffsets_ = nullptr, uint32_t correlationMaskCount_ = 0, const uint32_t* pCorrelationMasks_ = nullptr ) - : sType( StructureType::eRenderPassMultiviewCreateInfoKHX ) - , pNext( nullptr ) - , subpassCount( subpassCount_ ) + : subpassCount( subpassCount_ ) , pViewMasks( pViewMasks_ ) , dependencyCount( dependencyCount_ ) , pViewOffsets( pViewOffsets_ ) @@ -11454,10 +12570,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassMultiviewCreateInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t subpassCount; const uint32_t* pViewMasks; uint32_t dependencyCount; @@ -11470,9 +12586,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindBufferMemoryInfoKHR { BindBufferMemoryInfoKHR( Buffer buffer_ = Buffer(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0 ) - : sType( StructureType::eBindBufferMemoryInfoKHR ) - , pNext( nullptr ) - , buffer( buffer_ ) + : buffer( buffer_ ) , memory( memory_ ) , memoryOffset( memoryOffset_ ) { @@ -11532,10 +12646,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindBufferMemoryInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Buffer buffer; DeviceMemory memory; DeviceSize memoryOffset; @@ -11545,9 +12659,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindBufferMemoryDeviceGroupInfoKHX { BindBufferMemoryDeviceGroupInfoKHX( uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr ) - : sType( StructureType::eBindBufferMemoryDeviceGroupInfoKHX ) - , pNext( nullptr ) - , deviceIndexCount( deviceIndexCount_ ) + : deviceIndexCount( deviceIndexCount_ ) , pDeviceIndices( pDeviceIndices_ ) { } @@ -11599,10 +12711,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; }; @@ -11611,9 +12723,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindImageMemoryInfoKHR { BindImageMemoryInfoKHR( Image image_ = Image(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0 ) - : sType( StructureType::eBindImageMemoryInfoKHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) , memory( memory_ ) , memoryOffset( memoryOffset_ ) { @@ -11673,10 +12783,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindImageMemoryInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Image image; DeviceMemory memory; DeviceSize memoryOffset; @@ -11686,9 +12796,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindImageMemoryDeviceGroupInfoKHX { BindImageMemoryDeviceGroupInfoKHX( uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr, uint32_t SFRRectCount_ = 0, const Rect2D* pSFRRects_ = nullptr ) - : sType( StructureType::eBindImageMemoryDeviceGroupInfoKHX ) - , pNext( nullptr ) - , deviceIndexCount( deviceIndexCount_ ) + : deviceIndexCount( deviceIndexCount_ ) , pDeviceIndices( pDeviceIndices_ ) , SFRRectCount( SFRRectCount_ ) , pSFRRects( pSFRRects_ ) @@ -11756,10 +12864,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; uint32_t SFRRectCount; @@ -11770,9 +12878,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupRenderPassBeginInfoKHX { DeviceGroupRenderPassBeginInfoKHX( uint32_t deviceMask_ = 0, uint32_t deviceRenderAreaCount_ = 0, const Rect2D* pDeviceRenderAreas_ = nullptr ) - : sType( StructureType::eDeviceGroupRenderPassBeginInfoKHX ) - , pNext( nullptr ) - , deviceMask( deviceMask_ ) + : deviceMask( deviceMask_ ) , deviceRenderAreaCount( deviceRenderAreaCount_ ) , pDeviceRenderAreas( pDeviceRenderAreas_ ) { @@ -11832,10 +12938,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t deviceMask; uint32_t deviceRenderAreaCount; const Rect2D* pDeviceRenderAreas; @@ -11845,9 +12951,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupCommandBufferBeginInfoKHX { DeviceGroupCommandBufferBeginInfoKHX( uint32_t deviceMask_ = 0 ) - : sType( StructureType::eDeviceGroupCommandBufferBeginInfoKHX ) - , pNext( nullptr ) - , deviceMask( deviceMask_ ) + : deviceMask( deviceMask_ ) { } @@ -11891,10 +12995,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t deviceMask; }; static_assert( sizeof( DeviceGroupCommandBufferBeginInfoKHX ) == sizeof( VkDeviceGroupCommandBufferBeginInfoKHX ), "struct and wrapper have different size!" ); @@ -11902,9 +13006,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupSubmitInfoKHX { DeviceGroupSubmitInfoKHX( uint32_t waitSemaphoreCount_ = 0, const uint32_t* pWaitSemaphoreDeviceIndices_ = nullptr, uint32_t commandBufferCount_ = 0, const uint32_t* pCommandBufferDeviceMasks_ = nullptr, uint32_t signalSemaphoreCount_ = 0, const uint32_t* pSignalSemaphoreDeviceIndices_ = nullptr ) - : sType( StructureType::eDeviceGroupSubmitInfoKHX ) - , pNext( nullptr ) - , waitSemaphoreCount( waitSemaphoreCount_ ) + : waitSemaphoreCount( waitSemaphoreCount_ ) , pWaitSemaphoreDeviceIndices( pWaitSemaphoreDeviceIndices_ ) , commandBufferCount( commandBufferCount_ ) , pCommandBufferDeviceMasks( pCommandBufferDeviceMasks_ ) @@ -11988,10 +13090,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupSubmitInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const uint32_t* pWaitSemaphoreDeviceIndices; uint32_t commandBufferCount; @@ -12004,9 +13106,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupBindSparseInfoKHX { DeviceGroupBindSparseInfoKHX( uint32_t resourceDeviceIndex_ = 0, uint32_t memoryDeviceIndex_ = 0 ) - : sType( StructureType::eDeviceGroupBindSparseInfoKHX ) - , pNext( nullptr ) - , resourceDeviceIndex( resourceDeviceIndex_ ) + : resourceDeviceIndex( resourceDeviceIndex_ ) , memoryDeviceIndex( memoryDeviceIndex_ ) { } @@ -12058,10 +13158,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupBindSparseInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t resourceDeviceIndex; uint32_t memoryDeviceIndex; }; @@ -12070,9 +13170,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageSwapchainCreateInfoKHX { ImageSwapchainCreateInfoKHX( SwapchainKHR swapchain_ = SwapchainKHR() ) - : sType( StructureType::eImageSwapchainCreateInfoKHX ) - , pNext( nullptr ) - , swapchain( swapchain_ ) + : swapchain( swapchain_ ) { } @@ -12116,10 +13214,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageSwapchainCreateInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; SwapchainKHR swapchain; }; static_assert( sizeof( ImageSwapchainCreateInfoKHX ) == sizeof( VkImageSwapchainCreateInfoKHX ), "struct and wrapper have different size!" ); @@ -12127,9 +13225,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindImageMemorySwapchainInfoKHX { BindImageMemorySwapchainInfoKHX( SwapchainKHR swapchain_ = SwapchainKHR(), uint32_t imageIndex_ = 0 ) - : sType( StructureType::eBindImageMemorySwapchainInfoKHX ) - , pNext( nullptr ) - , swapchain( swapchain_ ) + : swapchain( swapchain_ ) , imageIndex( imageIndex_ ) { } @@ -12181,10 +13277,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; SwapchainKHR swapchain; uint32_t imageIndex; }; @@ -12193,9 +13289,7 @@ namespace VULKAN_HPP_NAMESPACE struct AcquireNextImageInfoKHX { AcquireNextImageInfoKHX( SwapchainKHR swapchain_ = SwapchainKHR(), uint64_t timeout_ = 0, Semaphore semaphore_ = Semaphore(), Fence fence_ = Fence(), uint32_t deviceMask_ = 0 ) - : sType( StructureType::eAcquireNextImageInfoKHX ) - , pNext( nullptr ) - , swapchain( swapchain_ ) + : swapchain( swapchain_ ) , timeout( timeout_ ) , semaphore( semaphore_ ) , fence( fence_ ) @@ -12271,10 +13365,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eAcquireNextImageInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; SwapchainKHR swapchain; uint64_t timeout; Semaphore semaphore; @@ -12286,9 +13380,7 @@ namespace VULKAN_HPP_NAMESPACE struct HdrMetadataEXT { HdrMetadataEXT( XYColorEXT displayPrimaryRed_ = XYColorEXT(), XYColorEXT displayPrimaryGreen_ = XYColorEXT(), XYColorEXT displayPrimaryBlue_ = XYColorEXT(), XYColorEXT whitePoint_ = XYColorEXT(), float maxLuminance_ = 0, float minLuminance_ = 0, float maxContentLightLevel_ = 0, float maxFrameAverageLightLevel_ = 0 ) - : sType( StructureType::eHdrMetadataEXT ) - , pNext( nullptr ) - , displayPrimaryRed( displayPrimaryRed_ ) + : displayPrimaryRed( displayPrimaryRed_ ) , displayPrimaryGreen( displayPrimaryGreen_ ) , displayPrimaryBlue( displayPrimaryBlue_ ) , whitePoint( whitePoint_ ) @@ -12388,10 +13480,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eHdrMetadataEXT; public: - const void* pNext; + const void* pNext = nullptr; XYColorEXT displayPrimaryRed; XYColorEXT displayPrimaryGreen; XYColorEXT displayPrimaryBlue; @@ -12406,9 +13498,7 @@ namespace VULKAN_HPP_NAMESPACE struct PresentTimesInfoGOOGLE { PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = 0, const PresentTimeGOOGLE* pTimes_ = nullptr ) - : sType( StructureType::ePresentTimesInfoGOOGLE ) - , pNext( nullptr ) - , swapchainCount( swapchainCount_ ) + : swapchainCount( swapchainCount_ ) , pTimes( pTimes_ ) { } @@ -12460,10 +13550,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePresentTimesInfoGOOGLE; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const PresentTimeGOOGLE* pTimes; }; @@ -12473,9 +13563,7 @@ namespace VULKAN_HPP_NAMESPACE struct IOSSurfaceCreateInfoMVK { IOSSurfaceCreateInfoMVK( IOSSurfaceCreateFlagsMVK flags_ = IOSSurfaceCreateFlagsMVK(), const void* pView_ = nullptr ) - : sType( StructureType::eIOSSurfaceCreateInfoMVK ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pView( pView_ ) { } @@ -12527,10 +13615,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eIosSurfaceCreateInfoMVK; public: - const void* pNext; + const void* pNext = nullptr; IOSSurfaceCreateFlagsMVK flags; const void* pView; }; @@ -12541,9 +13629,7 @@ namespace VULKAN_HPP_NAMESPACE struct MacOSSurfaceCreateInfoMVK { MacOSSurfaceCreateInfoMVK( MacOSSurfaceCreateFlagsMVK flags_ = MacOSSurfaceCreateFlagsMVK(), const void* pView_ = nullptr ) - : sType( StructureType::eMacOSSurfaceCreateInfoMVK ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pView( pView_ ) { } @@ -12595,10 +13681,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK; public: - const void* pNext; + const void* pNext = nullptr; MacOSSurfaceCreateFlagsMVK flags; const void* pView; }; @@ -12608,9 +13694,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineViewportWScalingStateCreateInfoNV { PipelineViewportWScalingStateCreateInfoNV( Bool32 viewportWScalingEnable_ = 0, uint32_t viewportCount_ = 0, const ViewportWScalingNV* pViewportWScalings_ = nullptr ) - : sType( StructureType::ePipelineViewportWScalingStateCreateInfoNV ) - , pNext( nullptr ) - , viewportWScalingEnable( viewportWScalingEnable_ ) + : viewportWScalingEnable( viewportWScalingEnable_ ) , viewportCount( viewportCount_ ) , pViewportWScalings( pViewportWScalings_ ) { @@ -12670,10 +13754,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Bool32 viewportWScalingEnable; uint32_t viewportCount; const ViewportWScalingNV* pViewportWScalings; @@ -12683,9 +13767,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceDiscardRectanglePropertiesEXT { PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = 0 ) - : sType( StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT ) - , pNext( nullptr ) - , maxDiscardRectangles( maxDiscardRectangles_ ) + : maxDiscardRectangles( maxDiscardRectangles_ ) { } @@ -12729,10 +13811,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT; public: - void* pNext; + void* pNext = nullptr; uint32_t maxDiscardRectangles; }; static_assert( sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) == sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), "struct and wrapper have different size!" ); @@ -12757,10 +13839,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; public: - void* pNext; + void* pNext = nullptr; Bool32 perViewPositionAllComponents; }; static_assert( sizeof( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), "struct and wrapper have different size!" ); @@ -12768,9 +13850,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceSurfaceInfo2KHR { PhysicalDeviceSurfaceInfo2KHR( SurfaceKHR surface_ = SurfaceKHR() ) - : sType( StructureType::ePhysicalDeviceSurfaceInfo2KHR ) - , pNext( nullptr ) - , surface( surface_ ) + : surface( surface_ ) { } @@ -12814,10 +13894,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; SurfaceKHR surface; }; static_assert( sizeof( PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), "struct and wrapper have different size!" ); @@ -12825,9 +13905,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDevice16BitStorageFeaturesKHR { PhysicalDevice16BitStorageFeaturesKHR( Bool32 storageBuffer16BitAccess_ = 0, Bool32 uniformAndStorageBuffer16BitAccess_ = 0, Bool32 storagePushConstant16_ = 0, Bool32 storageInputOutput16_ = 0 ) - : sType( StructureType::ePhysicalDevice16BitStorageFeaturesKHR ) - , pNext( nullptr ) - , storageBuffer16BitAccess( storageBuffer16BitAccess_ ) + : storageBuffer16BitAccess( storageBuffer16BitAccess_ ) , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ ) , storagePushConstant16( storagePushConstant16_ ) , storageInputOutput16( storageInputOutput16_ ) @@ -12895,10 +13973,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDevice16BitStorageFeaturesKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 storageBuffer16BitAccess; Bool32 uniformAndStorageBuffer16BitAccess; Bool32 storagePushConstant16; @@ -12909,9 +13987,7 @@ namespace VULKAN_HPP_NAMESPACE struct BufferMemoryRequirementsInfo2KHR { BufferMemoryRequirementsInfo2KHR( Buffer buffer_ = Buffer() ) - : sType( StructureType::eBufferMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , buffer( buffer_ ) + : buffer( buffer_ ) { } @@ -12955,10 +14031,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBufferMemoryRequirementsInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Buffer buffer; }; static_assert( sizeof( BufferMemoryRequirementsInfo2KHR ) == sizeof( VkBufferMemoryRequirementsInfo2KHR ), "struct and wrapper have different size!" ); @@ -12966,9 +14042,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageMemoryRequirementsInfo2KHR { ImageMemoryRequirementsInfo2KHR( Image image_ = Image() ) - : sType( StructureType::eImageMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) { } @@ -13012,10 +14086,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageMemoryRequirementsInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Image image; }; static_assert( sizeof( ImageMemoryRequirementsInfo2KHR ) == sizeof( VkImageMemoryRequirementsInfo2KHR ), "struct and wrapper have different size!" ); @@ -13023,9 +14097,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageSparseMemoryRequirementsInfo2KHR { ImageSparseMemoryRequirementsInfo2KHR( Image image_ = Image() ) - : sType( StructureType::eImageSparseMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) { } @@ -13069,10 +14141,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Image image; }; static_assert( sizeof( ImageSparseMemoryRequirementsInfo2KHR ) == sizeof( VkImageSparseMemoryRequirementsInfo2KHR ), "struct and wrapper have different size!" ); @@ -13097,10 +14169,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryRequirements2KHR; public: - void* pNext; + void* pNext = nullptr; MemoryRequirements memoryRequirements; }; static_assert( sizeof( MemoryRequirements2KHR ) == sizeof( VkMemoryRequirements2KHR ), "struct and wrapper have different size!" ); @@ -13126,10 +14198,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryDedicatedRequirementsKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 prefersDedicatedAllocation; Bool32 requiresDedicatedAllocation; }; @@ -13138,9 +14210,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryDedicatedAllocateInfoKHR { MemoryDedicatedAllocateInfoKHR( Image image_ = Image(), Buffer buffer_ = Buffer() ) - : sType( StructureType::eMemoryDedicatedAllocateInfoKHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) , buffer( buffer_ ) { } @@ -13192,10 +14262,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryDedicatedAllocateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Image image; Buffer buffer; }; @@ -13204,9 +14274,7 @@ namespace VULKAN_HPP_NAMESPACE struct SamplerYcbcrConversionInfoKHR { SamplerYcbcrConversionInfoKHR( SamplerYcbcrConversionKHR conversion_ = SamplerYcbcrConversionKHR() ) - : sType( StructureType::eSamplerYcbcrConversionInfoKHR ) - , pNext( nullptr ) - , conversion( conversion_ ) + : conversion( conversion_ ) { } @@ -13250,10 +14318,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSamplerYcbcrConversionInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; SamplerYcbcrConversionKHR conversion; }; static_assert( sizeof( SamplerYcbcrConversionInfoKHR ) == sizeof( VkSamplerYcbcrConversionInfoKHR ), "struct and wrapper have different size!" ); @@ -13261,9 +14329,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceSamplerYcbcrConversionFeaturesKHR { PhysicalDeviceSamplerYcbcrConversionFeaturesKHR( Bool32 samplerYcbcrConversion_ = 0 ) - : sType( StructureType::ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR ) - , pNext( nullptr ) - , samplerYcbcrConversion( samplerYcbcrConversion_ ) + : samplerYcbcrConversion( samplerYcbcrConversion_ ) { } @@ -13307,10 +14373,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 samplerYcbcrConversion; }; static_assert( sizeof( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR ), "struct and wrapper have different size!" ); @@ -13335,10 +14401,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; uint32_t combinedImageSamplerDescriptorCount; }; static_assert( sizeof( SamplerYcbcrConversionImageFormatPropertiesKHR ) == sizeof( VkSamplerYcbcrConversionImageFormatPropertiesKHR ), "struct and wrapper have different size!" ); @@ -13363,10 +14429,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD; public: - void* pNext; + void* pNext = nullptr; Bool32 supportsTextureGatherLODBiasAMD; }; static_assert( sizeof( TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), "struct and wrapper have different size!" ); @@ -13374,9 +14440,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineCoverageToColorStateCreateInfoNV { PipelineCoverageToColorStateCreateInfoNV( PipelineCoverageToColorStateCreateFlagsNV flags_ = PipelineCoverageToColorStateCreateFlagsNV(), Bool32 coverageToColorEnable_ = 0, uint32_t coverageToColorLocation_ = 0 ) - : sType( StructureType::ePipelineCoverageToColorStateCreateInfoNV ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , coverageToColorEnable( coverageToColorEnable_ ) , coverageToColorLocation( coverageToColorLocation_ ) { @@ -13436,10 +14500,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; PipelineCoverageToColorStateCreateFlagsNV flags; Bool32 coverageToColorEnable; uint32_t coverageToColorLocation; @@ -13467,10 +14531,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT; public: - void* pNext; + void* pNext = nullptr; Bool32 filterMinmaxSingleComponentFormats; Bool32 filterMinmaxImageComponentMapping; }; @@ -13496,10 +14560,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMultisamplePropertiesEXT; public: - void* pNext; + void* pNext = nullptr; Extent2D maxSampleLocationGridSize; }; static_assert( sizeof( MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "struct and wrapper have different size!" ); @@ -13507,9 +14571,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT { PhysicalDeviceBlendOperationAdvancedFeaturesEXT( Bool32 advancedBlendCoherentOperations_ = 0 ) - : sType( StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT ) - , pNext( nullptr ) - , advancedBlendCoherentOperations( advancedBlendCoherentOperations_ ) + : advancedBlendCoherentOperations( advancedBlendCoherentOperations_ ) { } @@ -13553,10 +14615,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT; public: - void* pNext; + void* pNext = nullptr; Bool32 advancedBlendCoherentOperations; }; static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), "struct and wrapper have different size!" ); @@ -13586,10 +14648,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; public: - void* pNext; + void* pNext = nullptr; uint32_t advancedBlendMaxColorAttachments; Bool32 advancedBlendIndependentBlend; Bool32 advancedBlendNonPremultipliedSrcColor; @@ -13602,9 +14664,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageFormatListCreateInfoKHR { ImageFormatListCreateInfoKHR( uint32_t viewFormatCount_ = 0, const Format* pViewFormats_ = nullptr ) - : sType( StructureType::eImageFormatListCreateInfoKHR ) - , pNext( nullptr ) - , viewFormatCount( viewFormatCount_ ) + : viewFormatCount( viewFormatCount_ ) , pViewFormats( pViewFormats_ ) { } @@ -13656,10 +14716,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageFormatListCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t viewFormatCount; const Format* pViewFormats; }; @@ -13668,9 +14728,7 @@ namespace VULKAN_HPP_NAMESPACE struct ValidationCacheCreateInfoEXT { ValidationCacheCreateInfoEXT( ValidationCacheCreateFlagsEXT flags_ = ValidationCacheCreateFlagsEXT(), size_t initialDataSize_ = 0, const void* pInitialData_ = nullptr ) - : sType( StructureType::eValidationCacheCreateInfoEXT ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , initialDataSize( initialDataSize_ ) , pInitialData( pInitialData_ ) { @@ -13730,10 +14788,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eValidationCacheCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; ValidationCacheCreateFlagsEXT flags; size_t initialDataSize; const void* pInitialData; @@ -13743,9 +14801,7 @@ namespace VULKAN_HPP_NAMESPACE struct ShaderModuleValidationCacheCreateInfoEXT { ShaderModuleValidationCacheCreateInfoEXT( ValidationCacheEXT validationCache_ = ValidationCacheEXT() ) - : sType( StructureType::eShaderModuleValidationCacheCreateInfoEXT ) - , pNext( nullptr ) - , validationCache( validationCache_ ) + : validationCache( validationCache_ ) { } @@ -13767,35 +14823,272 @@ namespace VULKAN_HPP_NAMESPACE ShaderModuleValidationCacheCreateInfoEXT& setValidationCache( ValidationCacheEXT validationCache_ ) { - validationCache = validationCache_; + validationCache = validationCache_; + return *this; + } + + operator const VkShaderModuleValidationCacheCreateInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( validationCache == rhs.validationCache ); + } + + bool operator!=( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT; + + public: + const void* pNext = nullptr; + ValidationCacheEXT validationCache; + }; + static_assert( sizeof( ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" ); + + struct MemoryHostPointerPropertiesEXT + { + MemoryHostPointerPropertiesEXT( uint32_t memoryTypeBits_ = 0 ) + : memoryTypeBits( memoryTypeBits_ ) + { + } + + MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( MemoryHostPointerPropertiesEXT ) ); + } + + MemoryHostPointerPropertiesEXT& operator=( VkMemoryHostPointerPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( MemoryHostPointerPropertiesEXT ) ); + return *this; + } + MemoryHostPointerPropertiesEXT& setPNext( void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + MemoryHostPointerPropertiesEXT& setMemoryTypeBits( uint32_t memoryTypeBits_ ) + { + memoryTypeBits = memoryTypeBits_; + return *this; + } + + operator const VkMemoryHostPointerPropertiesEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( MemoryHostPointerPropertiesEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( memoryTypeBits == rhs.memoryTypeBits ); + } + + bool operator!=( MemoryHostPointerPropertiesEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT; + + public: + void* pNext = nullptr; + uint32_t memoryTypeBits; + }; + static_assert( sizeof( MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), "struct and wrapper have different size!" ); + + struct PhysicalDeviceExternalMemoryHostPropertiesEXT + { + PhysicalDeviceExternalMemoryHostPropertiesEXT( DeviceSize minImportedHostPointerAlignment_ = 0 ) + : minImportedHostPointerAlignment( minImportedHostPointerAlignment_ ) + { + } + + PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) ); + } + + PhysicalDeviceExternalMemoryHostPropertiesEXT& operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) ); + return *this; + } + PhysicalDeviceExternalMemoryHostPropertiesEXT& setPNext( void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PhysicalDeviceExternalMemoryHostPropertiesEXT& setMinImportedHostPointerAlignment( DeviceSize minImportedHostPointerAlignment_ ) + { + minImportedHostPointerAlignment = minImportedHostPointerAlignment_; + return *this; + } + + operator const VkPhysicalDeviceExternalMemoryHostPropertiesEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PhysicalDeviceExternalMemoryHostPropertiesEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( minImportedHostPointerAlignment == rhs.minImportedHostPointerAlignment ); + } + + bool operator!=( PhysicalDeviceExternalMemoryHostPropertiesEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT; + + public: + void* pNext = nullptr; + DeviceSize minImportedHostPointerAlignment; + }; + static_assert( sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) == sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), "struct and wrapper have different size!" ); + + struct PhysicalDeviceConservativeRasterizationPropertiesEXT + { + PhysicalDeviceConservativeRasterizationPropertiesEXT( float primitiveOverestimationSize_ = 0, float maxExtraPrimitiveOverestimationSize_ = 0, float extraPrimitiveOverestimationSizeGranularity_ = 0, Bool32 primitiveUnderestimation_ = 0, Bool32 conservativePointAndLineRasterization_ = 0, Bool32 degenerateTrianglesRasterized_ = 0, Bool32 degenerateLinesRasterized_ = 0, Bool32 fullyCoveredFragmentShaderInputVariable_ = 0, Bool32 conservativeRasterizationPostDepthCoverage_ = 0 ) + : primitiveOverestimationSize( primitiveOverestimationSize_ ) + , maxExtraPrimitiveOverestimationSize( maxExtraPrimitiveOverestimationSize_ ) + , extraPrimitiveOverestimationSizeGranularity( extraPrimitiveOverestimationSizeGranularity_ ) + , primitiveUnderestimation( primitiveUnderestimation_ ) + , conservativePointAndLineRasterization( conservativePointAndLineRasterization_ ) + , degenerateTrianglesRasterized( degenerateTrianglesRasterized_ ) + , degenerateLinesRasterized( degenerateLinesRasterized_ ) + , fullyCoveredFragmentShaderInputVariable( fullyCoveredFragmentShaderInputVariable_ ) + , conservativeRasterizationPostDepthCoverage( conservativeRasterizationPostDepthCoverage_ ) + { + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) ); + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) ); + return *this; + } + PhysicalDeviceConservativeRasterizationPropertiesEXT& setPNext( void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setPrimitiveOverestimationSize( float primitiveOverestimationSize_ ) + { + primitiveOverestimationSize = primitiveOverestimationSize_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setMaxExtraPrimitiveOverestimationSize( float maxExtraPrimitiveOverestimationSize_ ) + { + maxExtraPrimitiveOverestimationSize = maxExtraPrimitiveOverestimationSize_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setExtraPrimitiveOverestimationSizeGranularity( float extraPrimitiveOverestimationSizeGranularity_ ) + { + extraPrimitiveOverestimationSizeGranularity = extraPrimitiveOverestimationSizeGranularity_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setPrimitiveUnderestimation( Bool32 primitiveUnderestimation_ ) + { + primitiveUnderestimation = primitiveUnderestimation_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setConservativePointAndLineRasterization( Bool32 conservativePointAndLineRasterization_ ) + { + conservativePointAndLineRasterization = conservativePointAndLineRasterization_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setDegenerateTrianglesRasterized( Bool32 degenerateTrianglesRasterized_ ) + { + degenerateTrianglesRasterized = degenerateTrianglesRasterized_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setDegenerateLinesRasterized( Bool32 degenerateLinesRasterized_ ) + { + degenerateLinesRasterized = degenerateLinesRasterized_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setFullyCoveredFragmentShaderInputVariable( Bool32 fullyCoveredFragmentShaderInputVariable_ ) + { + fullyCoveredFragmentShaderInputVariable = fullyCoveredFragmentShaderInputVariable_; + return *this; + } + + PhysicalDeviceConservativeRasterizationPropertiesEXT& setConservativeRasterizationPostDepthCoverage( Bool32 conservativeRasterizationPostDepthCoverage_ ) + { + conservativeRasterizationPostDepthCoverage = conservativeRasterizationPostDepthCoverage_; return *this; } - operator const VkShaderModuleValidationCacheCreateInfoEXT&() const + operator const VkPhysicalDeviceConservativeRasterizationPropertiesEXT&() const { - return *reinterpret_cast(this); + return *reinterpret_cast(this); } - bool operator==( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const + bool operator==( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( validationCache == rhs.validationCache ); + && ( primitiveOverestimationSize == rhs.primitiveOverestimationSize ) + && ( maxExtraPrimitiveOverestimationSize == rhs.maxExtraPrimitiveOverestimationSize ) + && ( extraPrimitiveOverestimationSizeGranularity == rhs.extraPrimitiveOverestimationSizeGranularity ) + && ( primitiveUnderestimation == rhs.primitiveUnderestimation ) + && ( conservativePointAndLineRasterization == rhs.conservativePointAndLineRasterization ) + && ( degenerateTrianglesRasterized == rhs.degenerateTrianglesRasterized ) + && ( degenerateLinesRasterized == rhs.degenerateLinesRasterized ) + && ( fullyCoveredFragmentShaderInputVariable == rhs.fullyCoveredFragmentShaderInputVariable ) + && ( conservativeRasterizationPostDepthCoverage == rhs.conservativeRasterizationPostDepthCoverage ); } - bool operator!=( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const + bool operator!=( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const { return !operator==( rhs ); } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; public: - const void* pNext; - ValidationCacheEXT validationCache; + void* pNext = nullptr; + float primitiveOverestimationSize; + float maxExtraPrimitiveOverestimationSize; + float extraPrimitiveOverestimationSizeGranularity; + Bool32 primitiveUnderestimation; + Bool32 conservativePointAndLineRasterization; + Bool32 degenerateTrianglesRasterized; + Bool32 degenerateLinesRasterized; + Bool32 fullyCoveredFragmentShaderInputVariable; + Bool32 conservativeRasterizationPostDepthCoverage; }; - static_assert( sizeof( ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" ); + static_assert( sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "struct and wrapper have different size!" ); enum class SubpassContents { @@ -13806,9 +15099,7 @@ namespace VULKAN_HPP_NAMESPACE struct PresentInfoKHR { PresentInfoKHR( uint32_t waitSemaphoreCount_ = 0, const Semaphore* pWaitSemaphores_ = nullptr, uint32_t swapchainCount_ = 0, const SwapchainKHR* pSwapchains_ = nullptr, const uint32_t* pImageIndices_ = nullptr, Result* pResults_ = nullptr ) - : sType( StructureType::ePresentInfoKHR ) - , pNext( nullptr ) - , waitSemaphoreCount( waitSemaphoreCount_ ) + : waitSemaphoreCount( waitSemaphoreCount_ ) , pWaitSemaphores( pWaitSemaphores_ ) , swapchainCount( swapchainCount_ ) , pSwapchains( pSwapchains_ ) @@ -13892,10 +15183,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePresentInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; uint32_t swapchainCount; @@ -13924,9 +15215,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineDynamicStateCreateInfo { PipelineDynamicStateCreateInfo( PipelineDynamicStateCreateFlags flags_ = PipelineDynamicStateCreateFlags(), uint32_t dynamicStateCount_ = 0, const DynamicState* pDynamicStates_ = nullptr ) - : sType( StructureType::ePipelineDynamicStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , dynamicStateCount( dynamicStateCount_ ) , pDynamicStates( pDynamicStates_ ) { @@ -13986,10 +15275,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDynamicStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineDynamicStateCreateFlags flags; uint32_t dynamicStateCount; const DynamicState* pDynamicStates; @@ -14005,9 +15294,7 @@ namespace VULKAN_HPP_NAMESPACE struct DescriptorUpdateTemplateCreateInfoKHR { DescriptorUpdateTemplateCreateInfoKHR( DescriptorUpdateTemplateCreateFlagsKHR flags_ = DescriptorUpdateTemplateCreateFlagsKHR(), uint32_t descriptorUpdateEntryCount_ = 0, const DescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries_ = nullptr, DescriptorUpdateTemplateTypeKHR templateType_ = DescriptorUpdateTemplateTypeKHR::eDescriptorSet, DescriptorSetLayout descriptorSetLayout_ = DescriptorSetLayout(), PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics, PipelineLayout pipelineLayout_ = PipelineLayout(), uint32_t set_ = 0 ) - : sType( StructureType::eDescriptorUpdateTemplateCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , descriptorUpdateEntryCount( descriptorUpdateEntryCount_ ) , pDescriptorUpdateEntries( pDescriptorUpdateEntries_ ) , templateType( templateType_ ) @@ -14107,10 +15394,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfoKHR; public: - void* pNext; + void* pNext = nullptr; DescriptorUpdateTemplateCreateFlagsKHR flags; uint32_t descriptorUpdateEntryCount; const DescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries; @@ -14237,10 +15524,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eQueueFamilyProperties2KHR; public: - void* pNext; + void* pNext = nullptr; QueueFamilyProperties queueFamilyProperties; }; static_assert( sizeof( QueueFamilyProperties2KHR ) == sizeof( VkQueueFamilyProperties2KHR ), "struct and wrapper have different size!" ); @@ -14393,10 +15680,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2KHR; public: - void* pNext; + void* pNext = nullptr; PhysicalDeviceMemoryProperties memoryProperties; }; static_assert( sizeof( PhysicalDeviceMemoryProperties2KHR ) == sizeof( VkPhysicalDeviceMemoryProperties2KHR ), "struct and wrapper have different size!" ); @@ -14448,9 +15735,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryBarrier { MemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(), AccessFlags dstAccessMask_ = AccessFlags() ) - : sType( StructureType::eMemoryBarrier ) - , pNext( nullptr ) - , srcAccessMask( srcAccessMask_ ) + : srcAccessMask( srcAccessMask_ ) , dstAccessMask( dstAccessMask_ ) { } @@ -14502,10 +15787,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; }; @@ -14514,9 +15799,7 @@ namespace VULKAN_HPP_NAMESPACE struct BufferMemoryBarrier { BufferMemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(), AccessFlags dstAccessMask_ = AccessFlags(), uint32_t srcQueueFamilyIndex_ = 0, uint32_t dstQueueFamilyIndex_ = 0, Buffer buffer_ = Buffer(), DeviceSize offset_ = 0, DeviceSize size_ = 0 ) - : sType( StructureType::eBufferMemoryBarrier ) - , pNext( nullptr ) - , srcAccessMask( srcAccessMask_ ) + : srcAccessMask( srcAccessMask_ ) , dstAccessMask( dstAccessMask_ ) , srcQueueFamilyIndex( srcQueueFamilyIndex_ ) , dstQueueFamilyIndex( dstQueueFamilyIndex_ ) @@ -14608,10 +15891,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBufferMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; uint32_t srcQueueFamilyIndex; @@ -14685,9 +15968,7 @@ namespace VULKAN_HPP_NAMESPACE struct BufferCreateInfo { BufferCreateInfo( BufferCreateFlags flags_ = BufferCreateFlags(), DeviceSize size_ = 0, BufferUsageFlags usage_ = BufferUsageFlags(), SharingMode sharingMode_ = SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = 0, const uint32_t* pQueueFamilyIndices_ = nullptr ) - : sType( StructureType::eBufferCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , size( size_ ) , usage( usage_ ) , sharingMode( sharingMode_ ) @@ -14771,10 +16052,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBufferCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; BufferCreateFlags flags; DeviceSize size; BufferUsageFlags usage; @@ -14897,9 +16178,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineShaderStageCreateInfo { PipelineShaderStageCreateInfo( PipelineShaderStageCreateFlags flags_ = PipelineShaderStageCreateFlags(), ShaderStageFlagBits stage_ = ShaderStageFlagBits::eVertex, ShaderModule module_ = ShaderModule(), const char* pName_ = nullptr, const SpecializationInfo* pSpecializationInfo_ = nullptr ) - : sType( StructureType::ePipelineShaderStageCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , stage( stage_ ) , module( module_ ) , pName( pName_ ) @@ -14975,10 +16254,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineShaderStageCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineShaderStageCreateFlags flags; ShaderStageFlagBits stage; ShaderModule module; @@ -15050,9 +16329,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineLayoutCreateInfo { PipelineLayoutCreateInfo( PipelineLayoutCreateFlags flags_ = PipelineLayoutCreateFlags(), uint32_t setLayoutCount_ = 0, const DescriptorSetLayout* pSetLayouts_ = nullptr, uint32_t pushConstantRangeCount_ = 0, const PushConstantRange* pPushConstantRanges_ = nullptr ) - : sType( StructureType::ePipelineLayoutCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , setLayoutCount( setLayoutCount_ ) , pSetLayouts( pSetLayouts_ ) , pushConstantRangeCount( pushConstantRangeCount_ ) @@ -15128,10 +16405,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineLayoutCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineLayoutCreateFlags flags; uint32_t setLayoutCount; const DescriptorSetLayout* pSetLayouts; @@ -15140,6 +16417,39 @@ namespace VULKAN_HPP_NAMESPACE }; static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" ); + struct ShaderStatisticsInfoAMD + { + operator const VkShaderStatisticsInfoAMD&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ShaderStatisticsInfoAMD const& rhs ) const + { + return ( shaderStageMask == rhs.shaderStageMask ) + && ( resourceUsage == rhs.resourceUsage ) + && ( numPhysicalVgprs == rhs.numPhysicalVgprs ) + && ( numPhysicalSgprs == rhs.numPhysicalSgprs ) + && ( numAvailableVgprs == rhs.numAvailableVgprs ) + && ( numAvailableSgprs == rhs.numAvailableSgprs ) + && ( memcmp( computeWorkGroupSize, rhs.computeWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 ); + } + + bool operator!=( ShaderStatisticsInfoAMD const& rhs ) const + { + return !operator==( rhs ); + } + + ShaderStageFlags shaderStageMask; + ShaderResourceUsageAMD resourceUsage; + uint32_t numPhysicalVgprs; + uint32_t numPhysicalSgprs; + uint32_t numAvailableVgprs; + uint32_t numAvailableSgprs; + uint32_t computeWorkGroupSize[3]; + }; + static_assert( sizeof( ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), "struct and wrapper have different size!" ); + enum class ImageUsageFlagBits { eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT, @@ -15192,10 +16502,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR; public: - void* pNext; + void* pNext = nullptr; ImageUsageFlags sharedPresentSupportedUsageFlags; }; static_assert( sizeof( SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" ); @@ -15203,9 +16513,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageViewUsageCreateInfoKHR { ImageViewUsageCreateInfoKHR( ImageUsageFlags usage_ = ImageUsageFlags() ) - : sType( StructureType::eImageViewUsageCreateInfoKHR ) - , pNext( nullptr ) - , usage( usage_ ) + : usage( usage_ ) { } @@ -15249,10 +16557,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageViewUsageCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ImageUsageFlags usage; }; static_assert( sizeof( ImageViewUsageCreateInfoKHR ) == sizeof( VkImageViewUsageCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -15296,9 +16604,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceImageFormatInfo2KHR { PhysicalDeviceImageFormatInfo2KHR( Format format_ = Format::eUndefined, ImageType type_ = ImageType::e1D, ImageTiling tiling_ = ImageTiling::eOptimal, ImageUsageFlags usage_ = ImageUsageFlags(), ImageCreateFlags flags_ = ImageCreateFlags() ) - : sType( StructureType::ePhysicalDeviceImageFormatInfo2KHR ) - , pNext( nullptr ) - , format( format_ ) + : format( format_ ) , type( type_ ) , tiling( tiling_ ) , usage( usage_ ) @@ -15374,10 +16680,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Format format; ImageType type; ImageTiling tiling; @@ -15418,9 +16724,7 @@ namespace VULKAN_HPP_NAMESPACE struct ComputePipelineCreateInfo { ComputePipelineCreateInfo( PipelineCreateFlags flags_ = PipelineCreateFlags(), PipelineShaderStageCreateInfo stage_ = PipelineShaderStageCreateInfo(), PipelineLayout layout_ = PipelineLayout(), Pipeline basePipelineHandle_ = Pipeline(), int32_t basePipelineIndex_ = 0 ) - : sType( StructureType::eComputePipelineCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , stage( stage_ ) , layout( layout_ ) , basePipelineHandle( basePipelineHandle_ ) @@ -15496,10 +16800,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eComputePipelineCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCreateFlags flags; PipelineShaderStageCreateInfo stage; PipelineLayout layout; @@ -15644,9 +16948,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineColorBlendStateCreateInfo { PipelineColorBlendStateCreateInfo( PipelineColorBlendStateCreateFlags flags_ = PipelineColorBlendStateCreateFlags(), Bool32 logicOpEnable_ = 0, LogicOp logicOp_ = LogicOp::eClear, uint32_t attachmentCount_ = 0, const PipelineColorBlendAttachmentState* pAttachments_ = nullptr, std::array const& blendConstants_ = { { 0, 0, 0, 0 } } ) - : sType( StructureType::ePipelineColorBlendStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , logicOpEnable( logicOpEnable_ ) , logicOp( logicOp_ ) , attachmentCount( attachmentCount_ ) @@ -15730,10 +17032,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineColorBlendStateCreateFlags flags; Bool32 logicOpEnable; LogicOp logicOp; @@ -15771,9 +17073,7 @@ namespace VULKAN_HPP_NAMESPACE struct FenceCreateInfo { FenceCreateInfo( FenceCreateFlags flags_ = FenceCreateFlags() ) - : sType( StructureType::eFenceCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -15817,10 +17117,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eFenceCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; FenceCreateFlags flags; }; static_assert( sizeof( FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "struct and wrapper have different size!" ); @@ -15918,10 +17218,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eFormatProperties2KHR; public: - void* pNext; + void* pNext = nullptr; FormatProperties formatProperties; }; static_assert( sizeof( FormatProperties2KHR ) == sizeof( VkFormatProperties2KHR ), "struct and wrapper have different size!" ); @@ -16044,9 +17344,7 @@ namespace VULKAN_HPP_NAMESPACE struct CommandBufferInheritanceInfo { CommandBufferInheritanceInfo( RenderPass renderPass_ = RenderPass(), uint32_t subpass_ = 0, Framebuffer framebuffer_ = Framebuffer(), Bool32 occlusionQueryEnable_ = 0, QueryControlFlags queryFlags_ = QueryControlFlags(), QueryPipelineStatisticFlags pipelineStatistics_ = QueryPipelineStatisticFlags() ) - : sType( StructureType::eCommandBufferInheritanceInfo ) - , pNext( nullptr ) - , renderPass( renderPass_ ) + : renderPass( renderPass_ ) , subpass( subpass_ ) , framebuffer( framebuffer_ ) , occlusionQueryEnable( occlusionQueryEnable_ ) @@ -16130,10 +17428,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferInheritanceInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPass renderPass; uint32_t subpass; Framebuffer framebuffer; @@ -16146,9 +17444,7 @@ namespace VULKAN_HPP_NAMESPACE struct CommandBufferBeginInfo { CommandBufferBeginInfo( CommandBufferUsageFlags flags_ = CommandBufferUsageFlags(), const CommandBufferInheritanceInfo* pInheritanceInfo_ = nullptr ) - : sType( StructureType::eCommandBufferBeginInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pInheritanceInfo( pInheritanceInfo_ ) { } @@ -16200,10 +17496,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferBeginInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandBufferUsageFlags flags; const CommandBufferInheritanceInfo* pInheritanceInfo; }; @@ -16212,9 +17508,7 @@ namespace VULKAN_HPP_NAMESPACE struct QueryPoolCreateInfo { QueryPoolCreateInfo( QueryPoolCreateFlags flags_ = QueryPoolCreateFlags(), QueryType queryType_ = QueryType::eOcclusion, uint32_t queryCount_ = 0, QueryPipelineStatisticFlags pipelineStatistics_ = QueryPipelineStatisticFlags() ) - : sType( StructureType::eQueryPoolCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , queryType( queryType_ ) , queryCount( queryCount_ ) , pipelineStatistics( pipelineStatistics_ ) @@ -16282,10 +17576,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eQueryPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; QueryPoolCreateFlags flags; QueryType queryType; uint32_t queryCount; @@ -16534,9 +17828,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageMemoryBarrier { ImageMemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(), AccessFlags dstAccessMask_ = AccessFlags(), ImageLayout oldLayout_ = ImageLayout::eUndefined, ImageLayout newLayout_ = ImageLayout::eUndefined, uint32_t srcQueueFamilyIndex_ = 0, uint32_t dstQueueFamilyIndex_ = 0, Image image_ = Image(), ImageSubresourceRange subresourceRange_ = ImageSubresourceRange() ) - : sType( StructureType::eImageMemoryBarrier ) - , pNext( nullptr ) - , srcAccessMask( srcAccessMask_ ) + : srcAccessMask( srcAccessMask_ ) , dstAccessMask( dstAccessMask_ ) , oldLayout( oldLayout_ ) , newLayout( newLayout_ ) @@ -16636,10 +17928,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; ImageLayout oldLayout; @@ -16654,9 +17946,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageViewCreateInfo { ImageViewCreateInfo( ImageViewCreateFlags flags_ = ImageViewCreateFlags(), Image image_ = Image(), ImageViewType viewType_ = ImageViewType::e1D, Format format_ = Format::eUndefined, ComponentMapping components_ = ComponentMapping(), ImageSubresourceRange subresourceRange_ = ImageSubresourceRange() ) - : sType( StructureType::eImageViewCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , image( image_ ) , viewType( viewType_ ) , format( format_ ) @@ -16740,10 +18030,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageViewCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ImageViewCreateFlags flags; Image image; ImageViewType viewType; @@ -17176,9 +18466,7 @@ namespace VULKAN_HPP_NAMESPACE struct RenderPassInputAttachmentAspectCreateInfoKHR { RenderPassInputAttachmentAspectCreateInfoKHR( uint32_t aspectReferenceCount_ = 0, const InputAttachmentAspectReferenceKHR* pAspectReferences_ = nullptr ) - : sType( StructureType::eRenderPassInputAttachmentAspectCreateInfoKHR ) - , pNext( nullptr ) - , aspectReferenceCount( aspectReferenceCount_ ) + : aspectReferenceCount( aspectReferenceCount_ ) , pAspectReferences( pAspectReferences_ ) { } @@ -17230,10 +18518,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t aspectReferenceCount; const InputAttachmentAspectReferenceKHR* pAspectReferences; }; @@ -17242,9 +18530,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindImagePlaneMemoryInfoKHR { BindImagePlaneMemoryInfoKHR( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor ) - : sType( StructureType::eBindImagePlaneMemoryInfoKHR ) - , pNext( nullptr ) - , planeAspect( planeAspect_ ) + : planeAspect( planeAspect_ ) { } @@ -17288,10 +18574,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindImagePlaneMemoryInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ImageAspectFlagBits planeAspect; }; static_assert( sizeof( BindImagePlaneMemoryInfoKHR ) == sizeof( VkBindImagePlaneMemoryInfoKHR ), "struct and wrapper have different size!" ); @@ -17299,9 +18585,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImagePlaneMemoryRequirementsInfoKHR { ImagePlaneMemoryRequirementsInfoKHR( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor ) - : sType( StructureType::eImagePlaneMemoryRequirementsInfoKHR ) - , pNext( nullptr ) - , planeAspect( planeAspect_ ) + : planeAspect( planeAspect_ ) { } @@ -17345,10 +18629,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ImageAspectFlagBits planeAspect; }; static_assert( sizeof( ImagePlaneMemoryRequirementsInfoKHR ) == sizeof( VkImagePlaneMemoryRequirementsInfoKHR ), "struct and wrapper have different size!" ); @@ -17454,10 +18738,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSparseImageFormatProperties2KHR; public: - void* pNext; + void* pNext = nullptr; SparseImageFormatProperties properties; }; static_assert( sizeof( SparseImageFormatProperties2KHR ) == sizeof( VkSparseImageFormatProperties2KHR ), "struct and wrapper have different size!" ); @@ -17482,10 +18766,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSparseImageMemoryRequirements2KHR; public: - void* pNext; + void* pNext = nullptr; SparseImageMemoryRequirements memoryRequirements; }; static_assert( sizeof( SparseImageMemoryRequirements2KHR ) == sizeof( VkSparseImageMemoryRequirements2KHR ), "struct and wrapper have different size!" ); @@ -17863,9 +19147,7 @@ namespace VULKAN_HPP_NAMESPACE struct BindSparseInfo { BindSparseInfo( uint32_t waitSemaphoreCount_ = 0, const Semaphore* pWaitSemaphores_ = nullptr, uint32_t bufferBindCount_ = 0, const SparseBufferMemoryBindInfo* pBufferBinds_ = nullptr, uint32_t imageOpaqueBindCount_ = 0, const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ = nullptr, uint32_t imageBindCount_ = 0, const SparseImageMemoryBindInfo* pImageBinds_ = nullptr, uint32_t signalSemaphoreCount_ = 0, const Semaphore* pSignalSemaphores_ = nullptr ) - : sType( StructureType::eBindSparseInfo ) - , pNext( nullptr ) - , waitSemaphoreCount( waitSemaphoreCount_ ) + : waitSemaphoreCount( waitSemaphoreCount_ ) , pWaitSemaphores( pWaitSemaphores_ ) , bufferBindCount( bufferBindCount_ ) , pBufferBinds( pBufferBinds_ ) @@ -17981,10 +19263,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eBindSparseInfo; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; uint32_t bufferBindCount; @@ -18069,9 +19351,7 @@ namespace VULKAN_HPP_NAMESPACE struct CommandPoolCreateInfo { CommandPoolCreateInfo( CommandPoolCreateFlags flags_ = CommandPoolCreateFlags(), uint32_t queueFamilyIndex_ = 0 ) - : sType( StructureType::eCommandPoolCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , queueFamilyIndex( queueFamilyIndex_ ) { } @@ -18123,10 +19403,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCommandPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandPoolCreateFlags flags; uint32_t queueFamilyIndex; }; @@ -18245,9 +19525,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImageCreateInfo { ImageCreateInfo( ImageCreateFlags flags_ = ImageCreateFlags(), ImageType imageType_ = ImageType::e1D, Format format_ = Format::eUndefined, Extent3D extent_ = Extent3D(), uint32_t mipLevels_ = 0, uint32_t arrayLayers_ = 0, SampleCountFlagBits samples_ = SampleCountFlagBits::e1, ImageTiling tiling_ = ImageTiling::eOptimal, ImageUsageFlags usage_ = ImageUsageFlags(), SharingMode sharingMode_ = SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = 0, const uint32_t* pQueueFamilyIndices_ = nullptr, ImageLayout initialLayout_ = ImageLayout::eUndefined ) - : sType( StructureType::eImageCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , imageType( imageType_ ) , format( format_ ) , extent( extent_ ) @@ -18387,10 +19665,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ImageCreateFlags flags; ImageType imageType; Format format; @@ -18410,9 +19688,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineMultisampleStateCreateInfo { PipelineMultisampleStateCreateInfo( PipelineMultisampleStateCreateFlags flags_ = PipelineMultisampleStateCreateFlags(), SampleCountFlagBits rasterizationSamples_ = SampleCountFlagBits::e1, Bool32 sampleShadingEnable_ = 0, float minSampleShading_ = 0, const SampleMask* pSampleMask_ = nullptr, Bool32 alphaToCoverageEnable_ = 0, Bool32 alphaToOneEnable_ = 0 ) - : sType( StructureType::ePipelineMultisampleStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , rasterizationSamples( rasterizationSamples_ ) , sampleShadingEnable( sampleShadingEnable_ ) , minSampleShading( minSampleShading_ ) @@ -18504,10 +19780,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineMultisampleStateCreateFlags flags; SampleCountFlagBits rasterizationSamples; Bool32 sampleShadingEnable; @@ -18521,9 +19797,7 @@ namespace VULKAN_HPP_NAMESPACE struct GraphicsPipelineCreateInfo { GraphicsPipelineCreateInfo( PipelineCreateFlags flags_ = PipelineCreateFlags(), uint32_t stageCount_ = 0, const PipelineShaderStageCreateInfo* pStages_ = nullptr, const PipelineVertexInputStateCreateInfo* pVertexInputState_ = nullptr, const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ = nullptr, const PipelineTessellationStateCreateInfo* pTessellationState_ = nullptr, const PipelineViewportStateCreateInfo* pViewportState_ = nullptr, const PipelineRasterizationStateCreateInfo* pRasterizationState_ = nullptr, const PipelineMultisampleStateCreateInfo* pMultisampleState_ = nullptr, const PipelineDepthStencilStateCreateInfo* pDepthStencilState_ = nullptr, const PipelineColorBlendStateCreateInfo* pColorBlendState_ = nullptr, const PipelineDynamicStateCreateInfo* pDynamicState_ = nullptr, PipelineLayout layout_ = PipelineLayout(), RenderPass renderPass_ = RenderPass(), uint32_t subpass_ = 0, Pipeline basePipelineHandle_ = Pipeline(), int32_t basePipelineIndex_ = 0 ) - : sType( StructureType::eGraphicsPipelineCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , stageCount( stageCount_ ) , pStages( pStages_ ) , pVertexInputState( pVertexInputState_ ) @@ -18695,10 +19969,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eGraphicsPipelineCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCreateFlags flags; uint32_t stageCount; const PipelineShaderStageCreateInfo* pStages; @@ -19007,10 +20281,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceProperties2KHR; public: - void* pNext; + void* pNext = nullptr; PhysicalDeviceProperties properties; }; static_assert( sizeof( PhysicalDeviceProperties2KHR ) == sizeof( VkPhysicalDeviceProperties2KHR ), "struct and wrapper have different size!" ); @@ -19035,10 +20309,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImageFormatProperties2KHR; public: - void* pNext; + void* pNext = nullptr; ImageFormatProperties imageFormatProperties; }; static_assert( sizeof( ImageFormatProperties2KHR ) == sizeof( VkImageFormatProperties2KHR ), "struct and wrapper have different size!" ); @@ -19046,9 +20320,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceSparseImageFormatInfo2KHR { PhysicalDeviceSparseImageFormatInfo2KHR( Format format_ = Format::eUndefined, ImageType type_ = ImageType::e1D, SampleCountFlagBits samples_ = SampleCountFlagBits::e1, ImageUsageFlags usage_ = ImageUsageFlags(), ImageTiling tiling_ = ImageTiling::eOptimal ) - : sType( StructureType::ePhysicalDeviceSparseImageFormatInfo2KHR ) - , pNext( nullptr ) - , format( format_ ) + : format( format_ ) , type( type_ ) , samples( samples_ ) , usage( usage_ ) @@ -19124,10 +20396,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Format format; ImageType type; SampleCountFlagBits samples; @@ -19139,9 +20411,7 @@ namespace VULKAN_HPP_NAMESPACE struct SampleLocationsInfoEXT { SampleLocationsInfoEXT( SampleCountFlagBits sampleLocationsPerPixel_ = SampleCountFlagBits::e1, Extent2D sampleLocationGridSize_ = Extent2D(), uint32_t sampleLocationsCount_ = 0, const SampleLocationEXT* pSampleLocations_ = nullptr ) - : sType( StructureType::eSampleLocationsInfoEXT ) - , pNext( nullptr ) - , sampleLocationsPerPixel( sampleLocationsPerPixel_ ) + : sampleLocationsPerPixel( sampleLocationsPerPixel_ ) , sampleLocationGridSize( sampleLocationGridSize_ ) , sampleLocationsCount( sampleLocationsCount_ ) , pSampleLocations( pSampleLocations_ ) @@ -19209,10 +20479,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSampleLocationsInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; SampleCountFlagBits sampleLocationsPerPixel; Extent2D sampleLocationGridSize; uint32_t sampleLocationsCount; @@ -19325,9 +20595,7 @@ namespace VULKAN_HPP_NAMESPACE struct RenderPassSampleLocationsBeginInfoEXT { RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = 0, const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = nullptr, uint32_t postSubpassSampleLocationsCount_ = 0, const SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = nullptr ) - : sType( StructureType::eRenderPassSampleLocationsBeginInfoEXT ) - , pNext( nullptr ) - , attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ ) + : attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ ) , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ ) , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ ) , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ ) @@ -19395,10 +20663,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; uint32_t attachmentInitialSampleLocationsCount; const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; uint32_t postSubpassSampleLocationsCount; @@ -19409,9 +20677,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineSampleLocationsStateCreateInfoEXT { PipelineSampleLocationsStateCreateInfoEXT( Bool32 sampleLocationsEnable_ = 0, SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() ) - : sType( StructureType::ePipelineSampleLocationsStateCreateInfoEXT ) - , pNext( nullptr ) - , sampleLocationsEnable( sampleLocationsEnable_ ) + : sampleLocationsEnable( sampleLocationsEnable_ ) , sampleLocationsInfo( sampleLocationsInfo_ ) { } @@ -19463,10 +20729,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; Bool32 sampleLocationsEnable; SampleLocationsInfoEXT sampleLocationsInfo; }; @@ -19496,10 +20762,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; public: - void* pNext; + void* pNext = nullptr; SampleCountFlags sampleLocationSampleCounts; Extent2D maxSampleLocationGridSize; float sampleLocationCoordinateRange[2]; @@ -19702,9 +20968,7 @@ namespace VULKAN_HPP_NAMESPACE struct DescriptorPoolCreateInfo { DescriptorPoolCreateInfo( DescriptorPoolCreateFlags flags_ = DescriptorPoolCreateFlags(), uint32_t maxSets_ = 0, uint32_t poolSizeCount_ = 0, const DescriptorPoolSize* pPoolSizes_ = nullptr ) - : sType( StructureType::eDescriptorPoolCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , maxSets( maxSets_ ) , poolSizeCount( poolSizeCount_ ) , pPoolSizes( pPoolSizes_ ) @@ -19772,10 +21036,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorPoolCreateFlags flags; uint32_t maxSets; uint32_t poolSizeCount; @@ -19978,10 +21242,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSurfaceFormat2KHR; public: - void* pNext; + void* pNext = nullptr; SurfaceFormatKHR surfaceFormat; }; static_assert( sizeof( SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "struct and wrapper have different size!" ); @@ -20148,9 +21412,7 @@ namespace VULKAN_HPP_NAMESPACE struct DisplaySurfaceCreateInfoKHR { DisplaySurfaceCreateInfoKHR( DisplaySurfaceCreateFlagsKHR flags_ = DisplaySurfaceCreateFlagsKHR(), DisplayModeKHR displayMode_ = DisplayModeKHR(), uint32_t planeIndex_ = 0, uint32_t planeStackIndex_ = 0, SurfaceTransformFlagBitsKHR transform_ = SurfaceTransformFlagBitsKHR::eIdentity, float globalAlpha_ = 0, DisplayPlaneAlphaFlagBitsKHR alphaMode_ = DisplayPlaneAlphaFlagBitsKHR::eOpaque, Extent2D imageExtent_ = Extent2D() ) - : sType( StructureType::eDisplaySurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , displayMode( displayMode_ ) , planeIndex( planeIndex_ ) , planeStackIndex( planeStackIndex_ ) @@ -20250,10 +21512,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DisplaySurfaceCreateFlagsKHR flags; DisplayModeKHR displayMode; uint32_t planeIndex; @@ -20324,10 +21586,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSurfaceCapabilities2KHR; public: - void* pNext; + void* pNext = nullptr; SurfaceCapabilitiesKHR surfaceCapabilities; }; static_assert( sizeof( SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), "struct and wrapper have different size!" ); @@ -20364,9 +21626,7 @@ namespace VULKAN_HPP_NAMESPACE struct DebugReportCallbackCreateInfoEXT { DebugReportCallbackCreateInfoEXT( DebugReportFlagsEXT flags_ = DebugReportFlagsEXT(), PFN_vkDebugReportCallbackEXT pfnCallback_ = nullptr, void* pUserData_ = nullptr ) - : sType( StructureType::eDebugReportCallbackCreateInfoEXT ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pfnCallback( pfnCallback_ ) , pUserData( pUserData_ ) { @@ -20426,10 +21686,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportFlagsEXT flags; PFN_vkDebugReportCallbackEXT pfnCallback; void* pUserData; @@ -20471,7 +21731,7 @@ namespace VULKAN_HPP_NAMESPACE eDisplayModeKhr = VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT, eObjectTableNvx = VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT, eIndirectCommandsLayoutNvx = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, - eValidationCache = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, + eValidationCacheExt = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, eDescriptorUpdateTemplateKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT, eSamplerYcbcrConversionKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT }; @@ -20479,9 +21739,7 @@ namespace VULKAN_HPP_NAMESPACE struct DebugMarkerObjectNameInfoEXT { DebugMarkerObjectNameInfoEXT( DebugReportObjectTypeEXT objectType_ = DebugReportObjectTypeEXT::eUnknown, uint64_t object_ = 0, const char* pObjectName_ = nullptr ) - : sType( StructureType::eDebugMarkerObjectNameInfoEXT ) - , pNext( nullptr ) - , objectType( objectType_ ) + : objectType( objectType_ ) , object( object_ ) , pObjectName( pObjectName_ ) { @@ -20541,10 +21799,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportObjectTypeEXT objectType; uint64_t object; const char* pObjectName; @@ -20554,9 +21812,7 @@ namespace VULKAN_HPP_NAMESPACE struct DebugMarkerObjectTagInfoEXT { DebugMarkerObjectTagInfoEXT( DebugReportObjectTypeEXT objectType_ = DebugReportObjectTypeEXT::eUnknown, uint64_t object_ = 0, uint64_t tagName_ = 0, size_t tagSize_ = 0, const void* pTag_ = nullptr ) - : sType( StructureType::eDebugMarkerObjectTagInfoEXT ) - , pNext( nullptr ) - , objectType( objectType_ ) + : objectType( objectType_ ) , object( object_ ) , tagName( tagName_ ) , tagSize( tagSize_ ) @@ -20632,10 +21888,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportObjectTypeEXT objectType; uint64_t object; uint64_t tagName; @@ -20653,9 +21909,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineRasterizationStateRasterizationOrderAMD { PipelineRasterizationStateRasterizationOrderAMD( RasterizationOrderAMD rasterizationOrder_ = RasterizationOrderAMD::eStrict ) - : sType( StructureType::ePipelineRasterizationStateRasterizationOrderAMD ) - , pNext( nullptr ) - , rasterizationOrder( rasterizationOrder_ ) + : rasterizationOrder( rasterizationOrder_ ) { } @@ -20699,10 +21953,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD; public: - const void* pNext; + const void* pNext = nullptr; RasterizationOrderAMD rasterizationOrder; }; static_assert( sizeof( PipelineRasterizationStateRasterizationOrderAMD ) == sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), "struct and wrapper have different size!" ); @@ -20738,9 +21992,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExternalMemoryImageCreateInfoNV { ExternalMemoryImageCreateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() ) - : sType( StructureType::eExternalMemoryImageCreateInfoNV ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -20784,10 +22036,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsNV handleTypes; }; static_assert( sizeof( ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), "struct and wrapper have different size!" ); @@ -20795,9 +22047,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportMemoryAllocateInfoNV { ExportMemoryAllocateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() ) - : sType( StructureType::eExportMemoryAllocateInfoNV ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -20841,10 +22091,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryAllocateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsNV handleTypes; }; static_assert( sizeof( ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), "struct and wrapper have different size!" ); @@ -20853,9 +22103,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportMemoryWin32HandleInfoNV { ImportMemoryWin32HandleInfoNV( ExternalMemoryHandleTypeFlagsNV handleType_ = ExternalMemoryHandleTypeFlagsNV(), HANDLE handle_ = 0 ) - : sType( StructureType::eImportMemoryWin32HandleInfoNV ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) , handle( handle_ ) { } @@ -20907,10 +22155,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsNV handleType; HANDLE handle; }; @@ -20980,9 +22228,7 @@ namespace VULKAN_HPP_NAMESPACE struct ValidationFlagsEXT { ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = 0, ValidationCheckEXT* pDisabledValidationChecks_ = nullptr ) - : sType( StructureType::eValidationFlagsEXT ) - , pNext( nullptr ) - , disabledValidationCheckCount( disabledValidationCheckCount_ ) + : disabledValidationCheckCount( disabledValidationCheckCount_ ) , pDisabledValidationChecks( pDisabledValidationChecks_ ) { } @@ -21034,10 +22280,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eValidationFlagsEXT; public: - const void* pNext; + const void* pNext = nullptr; uint32_t disabledValidationCheckCount; ValidationCheckEXT* pDisabledValidationChecks; }; @@ -21241,9 +22487,7 @@ namespace VULKAN_HPP_NAMESPACE struct IndirectCommandsLayoutCreateInfoNVX { IndirectCommandsLayoutCreateInfoNVX( PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics, IndirectCommandsLayoutUsageFlagsNVX flags_ = IndirectCommandsLayoutUsageFlagsNVX(), uint32_t tokenCount_ = 0, const IndirectCommandsLayoutTokenNVX* pTokens_ = nullptr ) - : sType( StructureType::eIndirectCommandsLayoutCreateInfoNVX ) - , pNext( nullptr ) - , pipelineBindPoint( pipelineBindPoint_ ) + : pipelineBindPoint( pipelineBindPoint_ ) , flags( flags_ ) , tokenCount( tokenCount_ ) , pTokens( pTokens_ ) @@ -21311,10 +22555,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; PipelineBindPoint pipelineBindPoint; IndirectCommandsLayoutUsageFlagsNVX flags; uint32_t tokenCount; @@ -21334,9 +22578,7 @@ namespace VULKAN_HPP_NAMESPACE struct ObjectTableCreateInfoNVX { ObjectTableCreateInfoNVX( uint32_t objectCount_ = 0, const ObjectEntryTypeNVX* pObjectEntryTypes_ = nullptr, const uint32_t* pObjectEntryCounts_ = nullptr, const ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ = nullptr, uint32_t maxUniformBuffersPerDescriptor_ = 0, uint32_t maxStorageBuffersPerDescriptor_ = 0, uint32_t maxStorageImagesPerDescriptor_ = 0, uint32_t maxSampledImagesPerDescriptor_ = 0, uint32_t maxPipelineLayouts_ = 0 ) - : sType( StructureType::eObjectTableCreateInfoNVX ) - , pNext( nullptr ) - , objectCount( objectCount_ ) + : objectCount( objectCount_ ) , pObjectEntryTypes( pObjectEntryTypes_ ) , pObjectEntryCounts( pObjectEntryCounts_ ) , pObjectEntryUsageFlags( pObjectEntryUsageFlags_ ) @@ -21444,10 +22686,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eObjectTableCreateInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t objectCount; const ObjectEntryTypeNVX* pObjectEntryTypes; const uint32_t* pObjectEntryCounts; @@ -21866,9 +23108,7 @@ namespace VULKAN_HPP_NAMESPACE struct DescriptorSetLayoutCreateInfo { DescriptorSetLayoutCreateInfo( DescriptorSetLayoutCreateFlags flags_ = DescriptorSetLayoutCreateFlags(), uint32_t bindingCount_ = 0, const DescriptorSetLayoutBinding* pBindings_ = nullptr ) - : sType( StructureType::eDescriptorSetLayoutCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , bindingCount( bindingCount_ ) , pBindings( pBindings_ ) { @@ -21928,10 +23168,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSetLayoutCreateFlags flags; uint32_t bindingCount; const DescriptorSetLayoutBinding* pBindings; @@ -21946,7 +23186,10 @@ namespace VULKAN_HPP_NAMESPACE eD3D11Texture = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, eD3D11TextureKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR, eD3D12Heap = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, - eD3D12Resource = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR + eD3D12Resource = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, + eDmaBufEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, + eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, + eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT }; using ExternalMemoryHandleTypeFlagsKHR = Flags; @@ -21965,16 +23208,14 @@ namespace VULKAN_HPP_NAMESPACE { enum { - allFlags = VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueWin32) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueWin32Kmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D11Texture) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D11TextureKmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Heap) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Resource) + allFlags = VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueWin32) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueWin32Kmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D11Texture) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D11TextureKmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Heap) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Resource) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eDmaBufEXT) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eHostAllocationEXT) | VkFlags(ExternalMemoryHandleTypeFlagBitsKHR::eHostMappedForeignMemoryEXT) }; }; struct PhysicalDeviceExternalImageFormatInfoKHR { PhysicalDeviceExternalImageFormatInfoKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalImageFormatInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) { } @@ -22018,10 +23259,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagBitsKHR handleType; }; static_assert( sizeof( PhysicalDeviceExternalImageFormatInfoKHR ) == sizeof( VkPhysicalDeviceExternalImageFormatInfoKHR ), "struct and wrapper have different size!" ); @@ -22029,9 +23270,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceExternalBufferInfoKHR { PhysicalDeviceExternalBufferInfoKHR( BufferCreateFlags flags_ = BufferCreateFlags(), BufferUsageFlags usage_ = BufferUsageFlags(), ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalBufferInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , usage( usage_ ) , handleType( handleType_ ) { @@ -22091,10 +23330,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; BufferCreateFlags flags; BufferUsageFlags usage; ExternalMemoryHandleTypeFlagBitsKHR handleType; @@ -22104,9 +23343,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExternalMemoryImageCreateInfoKHR { ExternalMemoryImageCreateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExternalMemoryImageCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -22150,10 +23387,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalMemoryImageCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsKHR handleTypes; }; static_assert( sizeof( ExternalMemoryImageCreateInfoKHR ) == sizeof( VkExternalMemoryImageCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -22161,9 +23398,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExternalMemoryBufferCreateInfoKHR { ExternalMemoryBufferCreateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExternalMemoryBufferCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -22207,10 +23442,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalMemoryBufferCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsKHR handleTypes; }; static_assert( sizeof( ExternalMemoryBufferCreateInfoKHR ) == sizeof( VkExternalMemoryBufferCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -22218,9 +23453,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportMemoryAllocateInfoKHR { ExportMemoryAllocateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExportMemoryAllocateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -22264,10 +23497,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryAllocateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsKHR handleTypes; }; static_assert( sizeof( ExportMemoryAllocateInfoKHR ) == sizeof( VkExportMemoryAllocateInfoKHR ), "struct and wrapper have different size!" ); @@ -22276,9 +23509,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportMemoryWin32HandleInfoKHR { ImportMemoryWin32HandleInfoKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd, HANDLE handle_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eImportMemoryWin32HandleInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) , handle( handle_ ) , name( name_ ) { @@ -22338,10 +23569,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagBitsKHR handleType; HANDLE handle; LPCWSTR name; @@ -22353,9 +23584,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryGetWin32HandleInfoKHR { MemoryGetWin32HandleInfoKHR( DeviceMemory memory_ = DeviceMemory(), ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eMemoryGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , memory( memory_ ) + : memory( memory_ ) , handleType( handleType_ ) { } @@ -22407,10 +23636,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DeviceMemory memory; ExternalMemoryHandleTypeFlagBitsKHR handleType; }; @@ -22420,9 +23649,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportMemoryFdInfoKHR { ImportMemoryFdInfoKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd, int fd_ = 0 ) - : sType( StructureType::eImportMemoryFdInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) , fd( fd_ ) { } @@ -22474,10 +23701,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagBitsKHR handleType; int fd; }; @@ -22486,9 +23713,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryGetFdInfoKHR { MemoryGetFdInfoKHR( DeviceMemory memory_ = DeviceMemory(), ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eMemoryGetFdInfoKHR ) - , pNext( nullptr ) - , memory( memory_ ) + : memory( memory_ ) , handleType( handleType_ ) { } @@ -22540,15 +23765,79 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryGetFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DeviceMemory memory; ExternalMemoryHandleTypeFlagBitsKHR handleType; }; static_assert( sizeof( MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "struct and wrapper have different size!" ); + struct ImportMemoryHostPointerInfoEXT + { + ImportMemoryHostPointerInfoEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd, void* pHostPointer_ = nullptr ) + : handleType( handleType_ ) + , pHostPointer( pHostPointer_ ) + { + } + + ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ImportMemoryHostPointerInfoEXT ) ); + } + + ImportMemoryHostPointerInfoEXT& operator=( VkImportMemoryHostPointerInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ImportMemoryHostPointerInfoEXT ) ); + return *this; + } + ImportMemoryHostPointerInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ImportMemoryHostPointerInfoEXT& setHandleType( ExternalMemoryHandleTypeFlagBitsKHR handleType_ ) + { + handleType = handleType_; + return *this; + } + + ImportMemoryHostPointerInfoEXT& setPHostPointer( void* pHostPointer_ ) + { + pHostPointer = pHostPointer_; + return *this; + } + + operator const VkImportMemoryHostPointerInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ImportMemoryHostPointerInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( handleType == rhs.handleType ) + && ( pHostPointer == rhs.pHostPointer ); + } + + bool operator!=( ImportMemoryHostPointerInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT; + + public: + const void* pNext = nullptr; + ExternalMemoryHandleTypeFlagBitsKHR handleType; + void* pHostPointer; + }; + static_assert( sizeof( ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), "struct and wrapper have different size!" ); + enum class ExternalMemoryFeatureFlagBitsKHR { eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR, @@ -22621,10 +23910,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalImageFormatPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalMemoryPropertiesKHR externalMemoryProperties; }; static_assert( sizeof( ExternalImageFormatPropertiesKHR ) == sizeof( VkExternalImageFormatPropertiesKHR ), "struct and wrapper have different size!" ); @@ -22649,10 +23938,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalBufferPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalMemoryPropertiesKHR externalMemoryProperties; }; static_assert( sizeof( ExternalBufferPropertiesKHR ) == sizeof( VkExternalBufferPropertiesKHR ), "struct and wrapper have different size!" ); @@ -22689,9 +23978,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceExternalSemaphoreInfoKHR { PhysicalDeviceExternalSemaphoreInfoKHR( ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalSemaphoreInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) { } @@ -22735,10 +24022,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; }; static_assert( sizeof( PhysicalDeviceExternalSemaphoreInfoKHR ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfoKHR ), "struct and wrapper have different size!" ); @@ -22746,9 +24033,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportSemaphoreCreateInfoKHR { ExportSemaphoreCreateInfoKHR( ExternalSemaphoreHandleTypeFlagsKHR handleTypes_ = ExternalSemaphoreHandleTypeFlagsKHR() ) - : sType( StructureType::eExportSemaphoreCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -22792,10 +24077,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportSemaphoreCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalSemaphoreHandleTypeFlagsKHR handleTypes; }; static_assert( sizeof( ExportSemaphoreCreateInfoKHR ) == sizeof( VkExportSemaphoreCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -22804,9 +24089,7 @@ namespace VULKAN_HPP_NAMESPACE struct SemaphoreGetWin32HandleInfoKHR { SemaphoreGetWin32HandleInfoKHR( Semaphore semaphore_ = Semaphore(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eSemaphoreGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , handleType( handleType_ ) { } @@ -22858,10 +24141,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; }; @@ -22871,9 +24154,7 @@ namespace VULKAN_HPP_NAMESPACE struct SemaphoreGetFdInfoKHR { SemaphoreGetFdInfoKHR( Semaphore semaphore_ = Semaphore(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eSemaphoreGetFdInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , handleType( handleType_ ) { } @@ -22925,10 +24206,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSemaphoreGetFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; }; @@ -22982,10 +24263,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalSemaphorePropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes; ExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes; ExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures; @@ -23021,9 +24302,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportSemaphoreWin32HandleInfoKHR { ImportSemaphoreWin32HandleInfoKHR( Semaphore semaphore_ = Semaphore(), SemaphoreImportFlagsKHR flags_ = SemaphoreImportFlagsKHR(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd, HANDLE handle_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eImportSemaphoreWin32HandleInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , flags( flags_ ) , handleType( handleType_ ) , handle( handle_ ) @@ -23099,10 +24378,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; SemaphoreImportFlagsKHR flags; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; @@ -23115,9 +24394,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportSemaphoreFdInfoKHR { ImportSemaphoreFdInfoKHR( Semaphore semaphore_ = Semaphore(), SemaphoreImportFlagsKHR flags_ = SemaphoreImportFlagsKHR(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd, int fd_ = 0 ) - : sType( StructureType::eImportSemaphoreFdInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , flags( flags_ ) , handleType( handleType_ ) , fd( fd_ ) @@ -23185,10 +24462,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportSemaphoreFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; SemaphoreImportFlagsKHR flags; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; @@ -23227,9 +24504,7 @@ namespace VULKAN_HPP_NAMESPACE struct PhysicalDeviceExternalFenceInfoKHR { PhysicalDeviceExternalFenceInfoKHR( ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalFenceInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) { } @@ -23273,10 +24548,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalFenceHandleTypeFlagBitsKHR handleType; }; static_assert( sizeof( PhysicalDeviceExternalFenceInfoKHR ) == sizeof( VkPhysicalDeviceExternalFenceInfoKHR ), "struct and wrapper have different size!" ); @@ -23284,9 +24559,7 @@ namespace VULKAN_HPP_NAMESPACE struct ExportFenceCreateInfoKHR { ExportFenceCreateInfoKHR( ExternalFenceHandleTypeFlagsKHR handleTypes_ = ExternalFenceHandleTypeFlagsKHR() ) - : sType( StructureType::eExportFenceCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -23330,10 +24603,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExportFenceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalFenceHandleTypeFlagsKHR handleTypes; }; static_assert( sizeof( ExportFenceCreateInfoKHR ) == sizeof( VkExportFenceCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -23342,9 +24615,7 @@ namespace VULKAN_HPP_NAMESPACE struct FenceGetWin32HandleInfoKHR { FenceGetWin32HandleInfoKHR( Fence fence_ = Fence(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eFenceGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , handleType( handleType_ ) { } @@ -23396,10 +24667,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; ExternalFenceHandleTypeFlagBitsKHR handleType; }; @@ -23409,9 +24680,7 @@ namespace VULKAN_HPP_NAMESPACE struct FenceGetFdInfoKHR { FenceGetFdInfoKHR( Fence fence_ = Fence(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eFenceGetFdInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , handleType( handleType_ ) { } @@ -23463,10 +24732,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eFenceGetFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; ExternalFenceHandleTypeFlagBitsKHR handleType; }; @@ -23520,10 +24789,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eExternalFencePropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes; ExternalFenceHandleTypeFlagsKHR compatibleHandleTypes; ExternalFenceFeatureFlagsKHR externalFenceFeatures; @@ -23559,9 +24828,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportFenceWin32HandleInfoKHR { ImportFenceWin32HandleInfoKHR( Fence fence_ = Fence(), FenceImportFlagsKHR flags_ = FenceImportFlagsKHR(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd, HANDLE handle_ = 0, LPCWSTR name_ = 0 ) - : sType( StructureType::eImportFenceWin32HandleInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , flags( flags_ ) , handleType( handleType_ ) , handle( handle_ ) @@ -23637,10 +24904,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; FenceImportFlagsKHR flags; ExternalFenceHandleTypeFlagBitsKHR handleType; @@ -23653,9 +24920,7 @@ namespace VULKAN_HPP_NAMESPACE struct ImportFenceFdInfoKHR { ImportFenceFdInfoKHR( Fence fence_ = Fence(), FenceImportFlagsKHR flags_ = FenceImportFlagsKHR(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd, int fd_ = 0 ) - : sType( StructureType::eImportFenceFdInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , flags( flags_ ) , handleType( handleType_ ) , fd( fd_ ) @@ -23723,10 +24988,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eImportFenceFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; FenceImportFlagsKHR flags; ExternalFenceHandleTypeFlagBitsKHR handleType; @@ -23789,10 +25054,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSurfaceCapabilities2EXT; public: - void* pNext; + void* pNext = nullptr; uint32_t minImageCount; uint32_t maxImageCount; Extent2D currentExtent; @@ -23810,9 +25075,7 @@ namespace VULKAN_HPP_NAMESPACE struct SwapchainCounterCreateInfoEXT { SwapchainCounterCreateInfoEXT( SurfaceCounterFlagsEXT surfaceCounters_ = SurfaceCounterFlagsEXT() ) - : sType( StructureType::eSwapchainCounterCreateInfoEXT ) - , pNext( nullptr ) - , surfaceCounters( surfaceCounters_ ) + : surfaceCounters( surfaceCounters_ ) { } @@ -23856,10 +25119,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; SurfaceCounterFlagsEXT surfaceCounters; }; static_assert( sizeof( SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), "struct and wrapper have different size!" ); @@ -23874,9 +25137,7 @@ namespace VULKAN_HPP_NAMESPACE struct DisplayPowerInfoEXT { DisplayPowerInfoEXT( DisplayPowerStateEXT powerState_ = DisplayPowerStateEXT::eOff ) - : sType( StructureType::eDisplayPowerInfoEXT ) - , pNext( nullptr ) - , powerState( powerState_ ) + : powerState( powerState_ ) { } @@ -23920,10 +25181,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDisplayPowerInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DisplayPowerStateEXT powerState; }; static_assert( sizeof( DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "struct and wrapper have different size!" ); @@ -23936,9 +25197,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceEventInfoEXT { DeviceEventInfoEXT( DeviceEventTypeEXT deviceEvent_ = DeviceEventTypeEXT::eDisplayHotplug ) - : sType( StructureType::eDeviceEventInfoEXT ) - , pNext( nullptr ) - , deviceEvent( deviceEvent_ ) + : deviceEvent( deviceEvent_ ) { } @@ -23982,10 +25241,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceEventInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DeviceEventTypeEXT deviceEvent; }; static_assert( sizeof( DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "struct and wrapper have different size!" ); @@ -23998,9 +25257,7 @@ namespace VULKAN_HPP_NAMESPACE struct DisplayEventInfoEXT { DisplayEventInfoEXT( DisplayEventTypeEXT displayEvent_ = DisplayEventTypeEXT::eFirstPixelOut ) - : sType( StructureType::eDisplayEventInfoEXT ) - , pNext( nullptr ) - , displayEvent( displayEvent_ ) + : displayEvent( displayEvent_ ) { } @@ -24044,10 +25301,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDisplayEventInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DisplayEventTypeEXT displayEvent; }; static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" ); @@ -24108,9 +25365,7 @@ namespace VULKAN_HPP_NAMESPACE struct MemoryAllocateFlagsInfoKHX { MemoryAllocateFlagsInfoKHX( MemoryAllocateFlagsKHX flags_ = MemoryAllocateFlagsKHX(), uint32_t deviceMask_ = 0 ) - : sType( StructureType::eMemoryAllocateFlagsInfoKHX ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , deviceMask( deviceMask_ ) { } @@ -24162,10 +25417,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eMemoryAllocateFlagsInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; MemoryAllocateFlagsKHX flags; uint32_t deviceMask; }; @@ -24220,10 +25475,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE_KHX]; DeviceGroupPresentModeFlagsKHX modes; }; @@ -24232,9 +25487,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupPresentInfoKHX { DeviceGroupPresentInfoKHX( uint32_t swapchainCount_ = 0, const uint32_t* pDeviceMasks_ = nullptr, DeviceGroupPresentModeFlagBitsKHX mode_ = DeviceGroupPresentModeFlagBitsKHX::eLocal ) - : sType( StructureType::eDeviceGroupPresentInfoKHX ) - , pNext( nullptr ) - , swapchainCount( swapchainCount_ ) + : swapchainCount( swapchainCount_ ) , pDeviceMasks( pDeviceMasks_ ) , mode( mode_ ) { @@ -24294,10 +25547,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupPresentInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const uint32_t* pDeviceMasks; DeviceGroupPresentModeFlagBitsKHX mode; @@ -24307,9 +25560,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupSwapchainCreateInfoKHX { DeviceGroupSwapchainCreateInfoKHX( DeviceGroupPresentModeFlagsKHX modes_ = DeviceGroupPresentModeFlagsKHX() ) - : sType( StructureType::eDeviceGroupSwapchainCreateInfoKHX ) - , pNext( nullptr ) - , modes( modes_ ) + : modes( modes_ ) { } @@ -24353,10 +25604,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; DeviceGroupPresentModeFlagsKHX modes; }; static_assert( sizeof( DeviceGroupSwapchainCreateInfoKHX ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHX ), "struct and wrapper have different size!" ); @@ -24389,9 +25640,7 @@ namespace VULKAN_HPP_NAMESPACE struct SwapchainCreateInfoKHR { SwapchainCreateInfoKHR( SwapchainCreateFlagsKHR flags_ = SwapchainCreateFlagsKHR(), SurfaceKHR surface_ = SurfaceKHR(), uint32_t minImageCount_ = 0, Format imageFormat_ = Format::eUndefined, ColorSpaceKHR imageColorSpace_ = ColorSpaceKHR::eSrgbNonlinear, Extent2D imageExtent_ = Extent2D(), uint32_t imageArrayLayers_ = 0, ImageUsageFlags imageUsage_ = ImageUsageFlags(), SharingMode imageSharingMode_ = SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = 0, const uint32_t* pQueueFamilyIndices_ = nullptr, SurfaceTransformFlagBitsKHR preTransform_ = SurfaceTransformFlagBitsKHR::eIdentity, CompositeAlphaFlagBitsKHR compositeAlpha_ = CompositeAlphaFlagBitsKHR::eOpaque, PresentModeKHR presentMode_ = PresentModeKHR::eImmediate, Bool32 clipped_ = 0, SwapchainKHR oldSwapchain_ = SwapchainKHR() ) - : sType( StructureType::eSwapchainCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , surface( surface_ ) , minImageCount( minImageCount_ ) , imageFormat( imageFormat_ ) @@ -24555,10 +25804,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSwapchainCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; SwapchainCreateFlagsKHR flags; SurfaceKHR surface; uint32_t minImageCount; @@ -24662,9 +25911,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineViewportSwizzleStateCreateInfoNV { PipelineViewportSwizzleStateCreateInfoNV( PipelineViewportSwizzleStateCreateFlagsNV flags_ = PipelineViewportSwizzleStateCreateFlagsNV(), uint32_t viewportCount_ = 0, const ViewportSwizzleNV* pViewportSwizzles_ = nullptr ) - : sType( StructureType::ePipelineViewportSwizzleStateCreateInfoNV ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , viewportCount( viewportCount_ ) , pViewportSwizzles( pViewportSwizzles_ ) { @@ -24724,10 +25971,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; PipelineViewportSwizzleStateCreateFlagsNV flags; uint32_t viewportCount; const ViewportSwizzleNV* pViewportSwizzles; @@ -24743,9 +25990,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineDiscardRectangleStateCreateInfoEXT { PipelineDiscardRectangleStateCreateInfoEXT( PipelineDiscardRectangleStateCreateFlagsEXT flags_ = PipelineDiscardRectangleStateCreateFlagsEXT(), DiscardRectangleModeEXT discardRectangleMode_ = DiscardRectangleModeEXT::eInclusive, uint32_t discardRectangleCount_ = 0, const Rect2D* pDiscardRectangles_ = nullptr ) - : sType( StructureType::ePipelineDiscardRectangleStateCreateInfoEXT ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , discardRectangleMode( discardRectangleMode_ ) , discardRectangleCount( discardRectangleCount_ ) , pDiscardRectangles( pDiscardRectangles_ ) @@ -24813,10 +26058,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; PipelineDiscardRectangleStateCreateFlagsEXT flags; DiscardRectangleModeEXT discardRectangleMode; uint32_t discardRectangleCount; @@ -24976,9 +26221,7 @@ namespace VULKAN_HPP_NAMESPACE struct RenderPassCreateInfo { RenderPassCreateInfo( RenderPassCreateFlags flags_ = RenderPassCreateFlags(), uint32_t attachmentCount_ = 0, const AttachmentDescription* pAttachments_ = nullptr, uint32_t subpassCount_ = 0, const SubpassDescription* pSubpasses_ = nullptr, uint32_t dependencyCount_ = 0, const SubpassDependency* pDependencies_ = nullptr ) - : sType( StructureType::eRenderPassCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , attachmentCount( attachmentCount_ ) , pAttachments( pAttachments_ ) , subpassCount( subpassCount_ ) @@ -25070,10 +26313,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPassCreateFlags flags; uint32_t attachmentCount; const AttachmentDescription* pAttachments; @@ -25110,10 +26353,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDevicePointClippingPropertiesKHR; public: - void* pNext; + void* pNext = nullptr; PointClippingBehaviorKHR pointClippingBehavior; }; static_assert( sizeof( PhysicalDevicePointClippingPropertiesKHR ) == sizeof( VkPhysicalDevicePointClippingPropertiesKHR ), "struct and wrapper have different size!" ); @@ -25128,9 +26371,7 @@ namespace VULKAN_HPP_NAMESPACE struct SamplerReductionModeCreateInfoEXT { SamplerReductionModeCreateInfoEXT( SamplerReductionModeEXT reductionMode_ = SamplerReductionModeEXT::eWeightedAverage ) - : sType( StructureType::eSamplerReductionModeCreateInfoEXT ) - , pNext( nullptr ) - , reductionMode( reductionMode_ ) + : reductionMode( reductionMode_ ) { } @@ -25174,10 +26415,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSamplerReductionModeCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; SamplerReductionModeEXT reductionMode; }; static_assert( sizeof( SamplerReductionModeCreateInfoEXT ) == sizeof( VkSamplerReductionModeCreateInfoEXT ), "struct and wrapper have different size!" ); @@ -25191,9 +26432,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineTessellationDomainOriginStateCreateInfoKHR { PipelineTessellationDomainOriginStateCreateInfoKHR( TessellationDomainOriginKHR domainOrigin_ = TessellationDomainOriginKHR::eUpperLeft ) - : sType( StructureType::ePipelineTessellationDomainOriginStateCreateInfoKHR ) - , pNext( nullptr ) - , domainOrigin( domainOrigin_ ) + : domainOrigin( domainOrigin_ ) { } @@ -25237,10 +26476,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; TessellationDomainOriginKHR domainOrigin; }; static_assert( sizeof( PipelineTessellationDomainOriginStateCreateInfoKHR ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfoKHR ), "struct and wrapper have different size!" ); @@ -25269,9 +26508,7 @@ namespace VULKAN_HPP_NAMESPACE struct SamplerYcbcrConversionCreateInfoKHR { SamplerYcbcrConversionCreateInfoKHR( Format format_ = Format::eUndefined, SamplerYcbcrModelConversionKHR ycbcrModel_ = SamplerYcbcrModelConversionKHR::eRgbIdentity, SamplerYcbcrRangeKHR ycbcrRange_ = SamplerYcbcrRangeKHR::eItuFull, ComponentMapping components_ = ComponentMapping(), ChromaLocationKHR xChromaOffset_ = ChromaLocationKHR::eCositedEven, ChromaLocationKHR yChromaOffset_ = ChromaLocationKHR::eCositedEven, Filter chromaFilter_ = Filter::eNearest, Bool32 forceExplicitReconstruction_ = 0 ) - : sType( StructureType::eSamplerYcbcrConversionCreateInfoKHR ) - , pNext( nullptr ) - , format( format_ ) + : format( format_ ) , ycbcrModel( ycbcrModel_ ) , ycbcrRange( ycbcrRange_ ) , components( components_ ) @@ -25371,10 +26608,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Format format; SamplerYcbcrModelConversionKHR ycbcrModel; SamplerYcbcrRangeKHR ycbcrRange; @@ -25396,9 +26633,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineColorBlendAdvancedStateCreateInfoEXT { PipelineColorBlendAdvancedStateCreateInfoEXT( Bool32 srcPremultiplied_ = 0, Bool32 dstPremultiplied_ = 0, BlendOverlapEXT blendOverlap_ = BlendOverlapEXT::eUncorrelated ) - : sType( StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT ) - , pNext( nullptr ) - , srcPremultiplied( srcPremultiplied_ ) + : srcPremultiplied( srcPremultiplied_ ) , dstPremultiplied( dstPremultiplied_ ) , blendOverlap( blendOverlap_ ) { @@ -25458,10 +26693,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; Bool32 srcPremultiplied; Bool32 dstPremultiplied; BlendOverlapEXT blendOverlap; @@ -25479,9 +26714,7 @@ namespace VULKAN_HPP_NAMESPACE struct PipelineCoverageModulationStateCreateInfoNV { PipelineCoverageModulationStateCreateInfoNV( PipelineCoverageModulationStateCreateFlagsNV flags_ = PipelineCoverageModulationStateCreateFlagsNV(), CoverageModulationModeNV coverageModulationMode_ = CoverageModulationModeNV::eNone, Bool32 coverageModulationTableEnable_ = 0, uint32_t coverageModulationTableCount_ = 0, const float* pCoverageModulationTable_ = nullptr ) - : sType( StructureType::ePipelineCoverageModulationStateCreateInfoNV ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , coverageModulationMode( coverageModulationMode_ ) , coverageModulationTableEnable( coverageModulationTableEnable_ ) , coverageModulationTableCount( coverageModulationTableCount_ ) @@ -25523,119 +26756,273 @@ namespace VULKAN_HPP_NAMESPACE return *this; } - PipelineCoverageModulationStateCreateInfoNV& setCoverageModulationTableCount( uint32_t coverageModulationTableCount_ ) + PipelineCoverageModulationStateCreateInfoNV& setCoverageModulationTableCount( uint32_t coverageModulationTableCount_ ) + { + coverageModulationTableCount = coverageModulationTableCount_; + return *this; + } + + PipelineCoverageModulationStateCreateInfoNV& setPCoverageModulationTable( const float* pCoverageModulationTable_ ) + { + pCoverageModulationTable = pCoverageModulationTable_; + return *this; + } + + operator const VkPipelineCoverageModulationStateCreateInfoNV&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( flags == rhs.flags ) + && ( coverageModulationMode == rhs.coverageModulationMode ) + && ( coverageModulationTableEnable == rhs.coverageModulationTableEnable ) + && ( coverageModulationTableCount == rhs.coverageModulationTableCount ) + && ( pCoverageModulationTable == rhs.pCoverageModulationTable ); + } + + bool operator!=( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; + + public: + const void* pNext = nullptr; + PipelineCoverageModulationStateCreateFlagsNV flags; + CoverageModulationModeNV coverageModulationMode; + Bool32 coverageModulationTableEnable; + uint32_t coverageModulationTableCount; + const float* pCoverageModulationTable; + }; + static_assert( sizeof( PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "struct and wrapper have different size!" ); + + enum class ValidationCacheHeaderVersionEXT + { + eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + }; + + enum class ShaderInfoTypeAMD + { + eStatistics = VK_SHADER_INFO_TYPE_STATISTICS_AMD, + eBinary = VK_SHADER_INFO_TYPE_BINARY_AMD, + eDisassembly = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD + }; + + enum class QueueGlobalPriorityEXT + { + eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, + eMedium = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT, + eHigh = VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT, + eRealtime = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT + }; + + struct DeviceQueueGlobalPriorityCreateInfoEXT + { + DeviceQueueGlobalPriorityCreateInfoEXT( QueueGlobalPriorityEXT globalPriority_ = QueueGlobalPriorityEXT::eLow ) + : globalPriority( globalPriority_ ) + { + } + + DeviceQueueGlobalPriorityCreateInfoEXT( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) ); + } + + DeviceQueueGlobalPriorityCreateInfoEXT& operator=( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) ); + return *this; + } + DeviceQueueGlobalPriorityCreateInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + DeviceQueueGlobalPriorityCreateInfoEXT& setGlobalPriority( QueueGlobalPriorityEXT globalPriority_ ) + { + globalPriority = globalPriority_; + return *this; + } + + operator const VkDeviceQueueGlobalPriorityCreateInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( globalPriority == rhs.globalPriority ); + } + + bool operator!=( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT; + + public: + const void* pNext = nullptr; + QueueGlobalPriorityEXT globalPriority; + }; + static_assert( sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoEXT ), "struct and wrapper have different size!" ); + + enum class ConservativeRasterizationModeEXT + { + eDisabled = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, + eOverestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, + eUnderestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT + }; + + struct PipelineRasterizationConservativeStateCreateInfoEXT + { + PipelineRasterizationConservativeStateCreateInfoEXT( PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = PipelineRasterizationConservativeStateCreateFlagsEXT(), ConservativeRasterizationModeEXT conservativeRasterizationMode_ = ConservativeRasterizationModeEXT::eDisabled, float extraPrimitiveOverestimationSize_ = 0 ) + : flags( flags_ ) + , conservativeRasterizationMode( conservativeRasterizationMode_ ) + , extraPrimitiveOverestimationSize( extraPrimitiveOverestimationSize_ ) + { + } + + PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) ); + } + + PipelineRasterizationConservativeStateCreateInfoEXT& operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) ); + return *this; + } + PipelineRasterizationConservativeStateCreateInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PipelineRasterizationConservativeStateCreateInfoEXT& setFlags( PipelineRasterizationConservativeStateCreateFlagsEXT flags_ ) + { + flags = flags_; + return *this; + } + + PipelineRasterizationConservativeStateCreateInfoEXT& setConservativeRasterizationMode( ConservativeRasterizationModeEXT conservativeRasterizationMode_ ) { - coverageModulationTableCount = coverageModulationTableCount_; + conservativeRasterizationMode = conservativeRasterizationMode_; return *this; } - PipelineCoverageModulationStateCreateInfoNV& setPCoverageModulationTable( const float* pCoverageModulationTable_ ) + PipelineRasterizationConservativeStateCreateInfoEXT& setExtraPrimitiveOverestimationSize( float extraPrimitiveOverestimationSize_ ) { - pCoverageModulationTable = pCoverageModulationTable_; + extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_; return *this; } - operator const VkPipelineCoverageModulationStateCreateInfoNV&() const + operator const VkPipelineRasterizationConservativeStateCreateInfoEXT&() const { - return *reinterpret_cast(this); + return *reinterpret_cast(this); } - bool operator==( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const + bool operator==( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) - && ( coverageModulationMode == rhs.coverageModulationMode ) - && ( coverageModulationTableEnable == rhs.coverageModulationTableEnable ) - && ( coverageModulationTableCount == rhs.coverageModulationTableCount ) - && ( pCoverageModulationTable == rhs.pCoverageModulationTable ); + && ( conservativeRasterizationMode == rhs.conservativeRasterizationMode ) + && ( extraPrimitiveOverestimationSize == rhs.extraPrimitiveOverestimationSize ); } - bool operator!=( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const + bool operator!=( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const { return !operator==( rhs ); } private: - StructureType sType; + StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; public: - const void* pNext; - PipelineCoverageModulationStateCreateFlagsNV flags; - CoverageModulationModeNV coverageModulationMode; - Bool32 coverageModulationTableEnable; - uint32_t coverageModulationTableCount; - const float* pCoverageModulationTable; - }; - static_assert( sizeof( PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "struct and wrapper have different size!" ); - - enum class ValidationCacheHeaderVersionEXT - { - eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + const void* pNext = nullptr; + PipelineRasterizationConservativeStateCreateFlagsEXT flags; + ConservativeRasterizationModeEXT conservativeRasterizationMode; + float extraPrimitiveOverestimationSize; }; + static_assert( sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), "struct and wrapper have different size!" ); - Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ); + template + Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d = Dispatch() ); #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceLayerProperties(Allocator const & alloc = Allocator() ); + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumerateInstanceLayerProperties(Dispatch const &d = Dispatch() ); #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) + template + VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d) { - return static_cast( vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties(Allocator const & alloc ) + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties(Dispatch const &d ) { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::enumerateInstanceLayerProperties" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceLayerProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ); + template + Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d = Dispatch() ); #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr, Allocator const & alloc = Allocator() ); + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr, Dispatch const &d = Dispatch() ); #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) + template + VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d) { - return static_cast( vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, Allocator const & alloc ) + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, Dispatch const &d ) { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::enumerateInstanceExtensionProperties" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceExtensionProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25655,7 +27042,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT CommandBuffer( VkCommandBuffer commandBuffer ) - : m_commandBuffer( commandBuffer ) + : m_commandBuffer( commandBuffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -25687,222 +27074,314 @@ namespace VULKAN_HPP_NAMESPACE return m_commandBuffer < rhs.m_commandBuffer; } - Result begin( const CommandBufferBeginInfo* pBeginInfo ) const; + template + Result begin( const CommandBufferBeginInfo* pBeginInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo ) const; + template + ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result end() const; + template + Result end(Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type end() const; + template + ResultValueType::type end(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result reset( CommandBufferResetFlags flags ) const; + template + Result reset( CommandBufferResetFlags flags, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type reset( CommandBufferResetFlags flags ) const; + template + ResultValueType::type reset( CommandBufferResetFlags flags, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const; + template + void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d = Dispatch() ) const; - void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const; + template + void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const; + template + void setViewport( uint32_t firstViewport, ArrayProxy viewports, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const; + template + void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const; + template + void setScissor( uint32_t firstScissor, ArrayProxy scissors, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setLineWidth( float lineWidth ) const; + template + void setLineWidth( float lineWidth, Dispatch const &d = Dispatch() ) const; - void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const; + template + void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d = Dispatch() ) const; - void setBlendConstants( const float blendConstants[4] ) const; + template + void setBlendConstants( const float blendConstants[4], Dispatch const &d = Dispatch() ) const; - void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const; + template + void setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d = Dispatch() ) const; - void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const; + template + void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d = Dispatch() ) const; - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const; + template + void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d = Dispatch() ) const; - void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const; + template + void setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d = Dispatch() ) const; - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const; + template + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const; + template + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const; + template + void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d = Dispatch() ) const; - void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const; + template + void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const; + template + void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const; + template + void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d = Dispatch() ) const; - void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const; + template + void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const &d = Dispatch() ) const; - void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + template + void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const; - void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + template + void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const; - void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const; + template + void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d = Dispatch() ) const; - void dispatchIndirect( Buffer buffer, DeviceSize offset ) const; + template + void dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d = Dispatch() ) const; - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const; + template + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const; + template + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const; + template + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; + template + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const; + template + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const; + template + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const; + template + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; + template + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const; + template + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const; + template + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const; + template + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const; + template + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const; + template + void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d = Dispatch() ) const; - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; + template + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const; + template + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; + template + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const; + template + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const; + template + void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const; + template + void clearAttachments( ArrayProxy attachments, ArrayProxy rects, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const; + template + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; + template + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setEvent( Event event, PipelineStageFlags stageMask ) const; + template + void setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d = Dispatch() ) const; - void resetEvent( Event event, PipelineStageFlags stageMask ) const; + template + void resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d = Dispatch() ) const; - void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; + template + void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; + template + void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; + template + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; + template + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const; + template + void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d = Dispatch() ) const; - void endQuery( QueryPool queryPool, uint32_t query ) const; + template + void endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d = Dispatch() ) const; - void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const; + template + void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = Dispatch() ) const; - void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const; + template + void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d = Dispatch() ) const; - void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const; + template + void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const; - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const; + template + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const; + template + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const; + template + void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const; + template + void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void nextSubpass( SubpassContents contents ) const; + template + void nextSubpass( SubpassContents contents, Dispatch const &d = Dispatch() ) const; - void endRenderPass() const; + template + void endRenderPass(Dispatch const &d = Dispatch() ) const; - void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; + template + void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void executeCommands( ArrayProxy commandBuffers ) const; + template + void executeCommands( ArrayProxy commandBuffers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; + template + void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const; + template + void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerEndEXT() const; + template + void debugMarkerEndEXT(Dispatch const &d = Dispatch() ) const; - void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; + template + void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const; + template + void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; + template + void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const; - void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; + template + void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const; - void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const; + template + void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const; + template + void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const; + template + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const; + template + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites ) const; + template + void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy descriptorWrites ) const; + template + void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy descriptorWrites, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setDeviceMaskKHX( uint32_t deviceMask ) const; + template + void setDeviceMaskKHX( uint32_t deviceMask, Dispatch const &d = Dispatch() ) const; - void dispatchBaseKHX( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const; + template + void dispatchBaseKHX( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d = Dispatch() ) const; - void pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData ) const; + template + void pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d = Dispatch() ) const; - void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings ) const; + template + void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setViewportWScalingNV( uint32_t firstViewport, ArrayProxy viewportWScalings ) const; + template + void setViewportWScalingNV( uint32_t firstViewport, ArrayProxy viewportWScalings, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles ) const; + template + void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy discardRectangles ) const; + template + void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy discardRectangles, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo ) const; + template + void setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo ) const; + template + void setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + void writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d = Dispatch() ) const; + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandBuffer() const @@ -25926,512 +27405,861 @@ namespace VULKAN_HPP_NAMESPACE static_assert( sizeof( CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); - VULKAN_HPP_INLINE Result CommandBuffer::begin( const CommandBufferBeginInfo* pBeginInfo ) const + template + VULKAN_HPP_INLINE Result CommandBuffer::begin( const CommandBufferBeginInfo* pBeginInfo, Dispatch const &d) const { - return static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); + return static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d ) const { - Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::begin" ); + Result result = static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::begin" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result CommandBuffer::end() const + template + VULKAN_HPP_INLINE Result CommandBuffer::end(Dispatch const &d) const { - return static_cast( vkEndCommandBuffer( m_commandBuffer ) ); + return static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::end() const + template + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::end(Dispatch const &d ) const { - Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::end" ); + Result result = static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::end" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags ) const + template + VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags, Dispatch const &d) const { - return static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + return static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::reset( CommandBufferResetFlags flags ) const + template + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::reset( CommandBufferResetFlags flags, Dispatch const &d ) const { - Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::reset" ); + Result result = static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::reset" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d) const { - vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); + d.vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d ) const + { + d.vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports, Dispatch const &d) const { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); + d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy viewports ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy viewports, Dispatch const &d ) const { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); + d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors, Dispatch const &d) const { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); + d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy scissors ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy scissors, Dispatch const &d ) const { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); + d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const &d) const + { + d.vkCmdSetLineWidth( m_commandBuffer, lineWidth ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const &d ) const { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); + d.vkCmdSetLineWidth( m_commandBuffer, lineWidth ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d) const + { + d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d ) const { - vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); + d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const &d) const + { + d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const &d ) const { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); + d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d) const { - vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); + d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d ) const + { + d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d) const + { + d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d ) const { - vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); + d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d) const + { + d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d ) const { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); + d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d) const + { + d.vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d ) const { - vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); + d.vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const + template + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d) const { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); + d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const + template + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets, Dispatch const &d ) const { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); + d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d) const { - vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); + d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d ) const + { + d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const + template + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, Dispatch const &d) const { - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); + d.vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const + template + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets, Dispatch const &d ) const { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); #else if ( buffers.size() != offsets.size() ) { - throw LogicError( "VULKAN_HPP_NAMESPACE::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); + throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); + d.vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d) const + { + d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d ) const { - vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); + d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const &d) const + { + d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const &d ) const { - vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); + d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const + { + d.vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const { - vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + d.vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const { - vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const + { + d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d) const + { + d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d ) const { - vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ ); + d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d) const + { + d.vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d ) const { - vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); + d.vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions, Dispatch const &d) const { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + d.vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions, Dispatch const &d ) const { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + d.vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions, Dispatch const &d) const { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + d.vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d ) const { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + d.vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const + template + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter, Dispatch const &d) const { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); + d.vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const + template + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter, Dispatch const &d ) const { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); + d.vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d) const { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d ) const { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d) const { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions, Dispatch const &d ) const { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const + template + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData, Dispatch const &d) const { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); + d.vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const + template + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data, Dispatch const &d ) const { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); + d.vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d) const { - vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); + d.vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d ) const + { + d.vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d) const { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); + d.vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges, Dispatch const &d ) const { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); + d.vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d) const { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); + d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges, Dispatch const &d ) const { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); + d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects, Dispatch const &d) const { - vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); + d.vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const + template + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy attachments, ArrayProxy rects, Dispatch const &d ) const { - vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); + d.vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions, Dispatch const &d) const { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + d.vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + template + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Dispatch const &d ) const { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + d.vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d) const + { + d.vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d ) const { - vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + d.vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d) const + { + d.vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d ) const { - vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + d.vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const { - vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + d.vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers, Dispatch const &d ) const { - vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); + d.vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + d.vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers, Dispatch const &d ) const { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); + d.vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d) const + { + d.vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d ) const { - vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); + d.vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d) const { - vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); + d.vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d ) const + { + d.vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const + { + d.vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const { - vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); + d.vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d) const + { + d.vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d ) const { - vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); + d.vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d) const + { + d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d ) const { - vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); + d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d) const { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); + d.vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values, Dispatch const &d ) const { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); + d.vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const + template + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents, Dispatch const &d) const { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); + d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const + template + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents, Dispatch const &d ) const { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); + d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents, Dispatch const &d) const + { + d.vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents, Dispatch const &d ) const { - vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); + d.vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::endRenderPass() const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::endRenderPass(Dispatch const &d) const + { + d.vkCmdEndRenderPass( m_commandBuffer ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::endRenderPass(Dispatch const &d ) const { - vkCmdEndRenderPass( m_commandBuffer ); + d.vkCmdEndRenderPass( m_commandBuffer ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const { - vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + d.vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy commandBuffers ) const + template + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy commandBuffers, Dispatch const &d ) const { - vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + d.vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d ) const { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT() const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT(Dispatch const &d) const + { + d.vkCmdDebugMarkerEndEXT( m_commandBuffer ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT(Dispatch const &d ) const { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); + d.vkCmdDebugMarkerEndEXT( m_commandBuffer ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d ) const { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const { - vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const + { + d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const + { + d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const { - vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d) const { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); + d.vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo, Dispatch const &d ) const { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); + d.vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d) const { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); + d.vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo, Dispatch const &d ) const { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); + d.vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, Dispatch const &d) const { - vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ) ); + d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy descriptorWrites ) const + template + VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy descriptorWrites, Dispatch const &d ) const { - vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ) ); + d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHX( uint32_t deviceMask ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHX( uint32_t deviceMask, Dispatch const &d) const + { + d.vkCmdSetDeviceMaskKHX( m_commandBuffer, deviceMask ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHX( uint32_t deviceMask, Dispatch const &d ) const { - vkCmdSetDeviceMaskKHX( m_commandBuffer, deviceMask ); + d.vkCmdSetDeviceMaskKHX( m_commandBuffer, deviceMask ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHX( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHX( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d) const + { + d.vkCmdDispatchBaseKHX( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHX( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d ) const { - vkCmdDispatchBaseKHX( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); + d.vkCmdDispatchBaseKHX( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d) const { - vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); + d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d ) const + { + d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings, Dispatch const &d) const { - vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewportWScalings ) ); + d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewportWScalings ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, ArrayProxy viewportWScalings ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, ArrayProxy viewportWScalings, Dispatch const &d ) const { - vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportWScalings.size() , reinterpret_cast( viewportWScalings.data() ) ); + d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportWScalings.size() , reinterpret_cast( viewportWScalings.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles, Dispatch const &d) const { - vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangleCount, reinterpret_cast( pDiscardRectangles ) ); + d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangleCount, reinterpret_cast( pDiscardRectangles ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy discardRectangles ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy discardRectangles, Dispatch const &d ) const { - vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangles.size() , reinterpret_cast( discardRectangles.data() ) ); + d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangles.size() , reinterpret_cast( discardRectangles.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d) const { - vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( pSampleLocationsInfo ) ); + d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( pSampleLocationsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo ) const + template + VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const &d ) const + { + d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( &sampleLocationsInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d) const + { + d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast( pipelineStage ), static_cast( dstBuffer ), dstOffset, marker ); + } +#else + template + VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d ) const { - vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( &sampleLocationsInfo ) ); + d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast( pipelineStage ), static_cast( dstBuffer ), dstOffset, marker ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct SubmitInfo { SubmitInfo( uint32_t waitSemaphoreCount_ = 0, const Semaphore* pWaitSemaphores_ = nullptr, const PipelineStageFlags* pWaitDstStageMask_ = nullptr, uint32_t commandBufferCount_ = 0, const CommandBuffer* pCommandBuffers_ = nullptr, uint32_t signalSemaphoreCount_ = 0, const Semaphore* pSignalSemaphores_ = nullptr ) - : sType( StructureType::eSubmitInfo ) - , pNext( nullptr ) - , waitSemaphoreCount( waitSemaphoreCount_ ) + : waitSemaphoreCount( waitSemaphoreCount_ ) , pWaitSemaphores( pWaitSemaphores_ ) , pWaitDstStageMask( pWaitDstStageMask_ ) , commandBufferCount( commandBufferCount_ ) @@ -26523,10 +28351,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eSubmitInfo; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; const PipelineStageFlags* pWaitDstStageMask; @@ -26549,7 +28377,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Queue( VkQueue queue ) - : m_queue( queue ) + : m_queue( queue ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -26581,25 +28409,33 @@ namespace VULKAN_HPP_NAMESPACE return m_queue < rhs.m_queue; } - Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const; + template + Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type submit( ArrayProxy submits, Fence fence ) const; + template + ResultValueType::type submit( ArrayProxy submits, Fence fence, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle() const; + template + Result waitIdle(Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type waitIdle() const; + template + ResultValueType::type waitIdle(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const; + template + Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence ) const; + template + ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result presentKHR( const PresentInfoKHR* pPresentInfo ) const; + template + Result presentKHR( const PresentInfoKHR* pPresentInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result presentKHR( const PresentInfoKHR & presentInfo ) const; + template + Result presentKHR( const PresentInfoKHR & presentInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26625,110 +28461,120 @@ namespace VULKAN_HPP_NAMESPACE static_assert( sizeof( Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" ); - VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const + template + VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence, Dispatch const &d) const { - return static_cast( vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); + return static_cast( d.vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Queue::submit( ArrayProxy submits, Fence fence ) const + template + VULKAN_HPP_INLINE ResultValueType::type Queue::submit( ArrayProxy submits, Fence fence, Dispatch const &d ) const { - Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::submit" ); + Result result = static_cast( d.vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::submit" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Queue::waitIdle() const + template + VULKAN_HPP_INLINE Result Queue::waitIdle(Dispatch const &d) const { - return static_cast( vkQueueWaitIdle( m_queue ) ); + return static_cast( d.vkQueueWaitIdle( m_queue ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Queue::waitIdle() const + template + VULKAN_HPP_INLINE ResultValueType::type Queue::waitIdle(Dispatch const &d ) const { - Result result = static_cast( vkQueueWaitIdle( m_queue ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::waitIdle" ); + Result result = static_cast( d.vkQueueWaitIdle( m_queue ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::waitIdle" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const + template + VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence, Dispatch const &d) const { - return static_cast( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); + return static_cast( d.vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Queue::bindSparse( ArrayProxy bindInfo, Fence fence ) const + template + VULKAN_HPP_INLINE ResultValueType::type Queue::bindSparse( ArrayProxy bindInfo, Fence fence, Dispatch const &d ) const { - Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::bindSparse" ); + Result result = static_cast( d.vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::bindSparse" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR* pPresentInfo ) const + template + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR* pPresentInfo, Dispatch const &d) const { - return static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); + return static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo ) const + template + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo, Dispatch const &d ) const { - Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + Result result = static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE - class BufferDeleter; - using UniqueBuffer = UniqueHandle; - class BufferViewDeleter; - using UniqueBufferView = UniqueHandle; - class CommandBufferDeleter; - using UniqueCommandBuffer = UniqueHandle; - class CommandPoolDeleter; - using UniqueCommandPool = UniqueHandle; - class DescriptorPoolDeleter; - using UniqueDescriptorPool = UniqueHandle; - class DescriptorSetDeleter; - using UniqueDescriptorSet = UniqueHandle; - class DescriptorSetLayoutDeleter; - using UniqueDescriptorSetLayout = UniqueHandle; - class DescriptorUpdateTemplateKHRDeleter; - using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; - class DeviceMemoryDeleter; - using UniqueDeviceMemory = UniqueHandle; - class EventDeleter; - using UniqueEvent = UniqueHandle; - class FenceDeleter; - using UniqueFence = UniqueHandle; - class FramebufferDeleter; - using UniqueFramebuffer = UniqueHandle; - class ImageDeleter; - using UniqueImage = UniqueHandle; - class ImageViewDeleter; - using UniqueImageView = UniqueHandle; - class IndirectCommandsLayoutNVXDeleter; - using UniqueIndirectCommandsLayoutNVX = UniqueHandle; - class ObjectTableNVXDeleter; - using UniqueObjectTableNVX = UniqueHandle; - class PipelineDeleter; - using UniquePipeline = UniqueHandle; - class PipelineCacheDeleter; - using UniquePipelineCache = UniqueHandle; - class PipelineLayoutDeleter; - using UniquePipelineLayout = UniqueHandle; - class QueryPoolDeleter; - using UniqueQueryPool = UniqueHandle; - class RenderPassDeleter; - using UniqueRenderPass = UniqueHandle; - class SamplerDeleter; - using UniqueSampler = UniqueHandle; - class SamplerYcbcrConversionKHRDeleter; - using UniqueSamplerYcbcrConversionKHR = UniqueHandle; - class SemaphoreDeleter; - using UniqueSemaphore = UniqueHandle; - class ShaderModuleDeleter; - using UniqueShaderModule = UniqueHandle; - class SwapchainKHRDeleter; - using UniqueSwapchainKHR = UniqueHandle; - class ValidationCacheEXTDeleter; - using UniqueValidationCacheEXT = UniqueHandle; + class Device; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueBuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueBufferView = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = PoolDeleter; }; + using UniqueCommandBuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueCommandPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDescriptorPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = PoolDeleter; }; + using UniqueDescriptorSet = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDescriptorSetLayout = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDeviceMemory = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueEvent = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueFence = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueFramebuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueImage = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueImageView = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueIndirectCommandsLayoutNVX = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueObjectTableNVX = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniquePipeline = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniquePipelineCache = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniquePipelineLayout = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueQueryPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueRenderPass = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueSampler = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueSamplerYcbcrConversionKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueSemaphore = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueShaderModule = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueSwapchainKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueValidationCacheEXT = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class Device @@ -26743,7 +28589,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Device( VkDevice device ) - : m_device( device ) + : m_device( device ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -26775,3160 +28621,3921 @@ namespace VULKAN_HPP_NAMESPACE return m_device < rhs.m_device; } - PFN_vkVoidFunction getProcAddr( const char* pName ) const; + template + PFN_vkVoidFunction getProcAddr( const char* pName, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const; + template + PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroy( const AllocationCallbacks* pAllocator ) const; + template + void destroy( const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const; + template + void destroy( Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const; + template + void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; + template + Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle() const; + template + Result waitIdle(Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type waitIdle() const; + template + ResultValueType::type waitIdle(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const; + template + Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const; + template + void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void freeMemory( DeviceMemory memory, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + void free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const; + template + void free( DeviceMemory memory, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const; + template + Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const; + template + ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags(), Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void unmapMemory( DeviceMemory memory ) const; + template + void unmapMemory( DeviceMemory memory, Dispatch const &d = Dispatch() ) const; - Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; + template + Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges ) const; + template + ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; + template + Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const; + template + ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const; + template + void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DeviceSize getMemoryCommitment( DeviceMemory memory ) const; + template + DeviceSize getMemoryCommitment( DeviceMemory memory, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const; + template + void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const; + template + MemoryRequirements getBufferMemoryRequirements( Buffer buffer, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; + template + Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; + template + ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const; + template + void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getImageMemoryRequirements( Image image ) const; + template + MemoryRequirements getImageMemoryRequirements( Image image, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; + template + Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; + template + ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const; + template + void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getImageSparseMemoryRequirements( Image image, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + std::vector getImageSparseMemoryRequirements( Image image, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; + template + Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const; + template + void destroyFence( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFence( Fence fence, Optional allocator = nullptr ) const; + template + void destroyFence( Fence fence, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result resetFences( uint32_t fenceCount, const Fence* pFences ) const; + template + void destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetFences( ArrayProxy fences ) const; + template + void destroy( Fence fence, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getFenceStatus( Fence fence ) const; + template + Result resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type resetFences( ArrayProxy fences, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const; + template + Result getFenceStatus( Fence fence, Dispatch const &d = Dispatch() ) const; + + template + Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const; + template + Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const; + template + Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const; + template + void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + void destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const; + template + void destroy( Semaphore semaphore, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const; + template + Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const; + template + void destroyEvent( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroyEvent( Event event, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + void destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyEvent( Event event, Optional allocator = nullptr ) const; + template + void destroy( Event event, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getEventStatus( Event event ) const; + template + Result getEventStatus( Event event, Dispatch const &d = Dispatch() ) const; #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result setEvent( Event event ) const; + template + Result setEvent( Event event, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type setEvent( Event event ) const; + template + ResultValueType::type setEvent( Event event, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetEvent( Event event ) const; + template + Result resetEvent( Event event, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type resetEvent( Event event ) const; + template + ResultValueType::type resetEvent( Event event, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const; + template + Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const; + template + void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const; + template + void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const; + template + void destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const; + template + void destroy( QueryPool queryPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const; + template + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const; + template + Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const; + template + ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const; + template + void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + void destroyBuffer( Buffer buffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const; + template + void destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const; + template + void destroy( Buffer buffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const; + template + Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const; + template + void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImage( Image image, Optional allocator = nullptr ) const; + template + void destroyBufferView( BufferView bufferView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const; + template + void destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const; + template + void destroy( BufferView bufferView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const; + template + Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const; + template + void destroyImage( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const; + template + void destroyImage( Image image, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const; + template + void destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + void destroy( Image image, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const; + template + void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const; + template + SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const; + template + Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const; + template + void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache, Allocator const & alloc = Allocator() ) const; + template + void destroyImageView( ImageView imageView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const; + template + void destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const; + template + void destroy( ImageView imageView, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; + template + Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; + template + void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const; + template + void destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const; + template + void destroy( ShaderModule shaderModule, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const; + template + Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const; + template + void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const; + template + void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const; + template + void destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + void destroy( PipelineCache pipelineCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const; + template + Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySampler( Sampler sampler, Optional allocator = nullptr ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const; + template + Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const; + template + Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const; + template + Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const; + template + void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const; + template + void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const; -#else - ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const; + template + void destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( Pipeline pipeline, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const; + template + Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; + template + ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; + template + ResultValueType::type createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const; + template + void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const; + template + void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const; + template + void destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const; + template + void destroy( PipelineLayout pipelineLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const; + template + Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const; + template + void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const; + template + void destroySampler( Sampler sampler, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const; + template + void destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + void destroy( Sampler sampler, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const; + template + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const; + template + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const; + template + void destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Extent2D getRenderAreaGranularity( RenderPass renderPass ) const; + template + void destroy( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const; + template + Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const; + template + void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + void destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const; + template + void destroy( DescriptorPool descriptorPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; + template + Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; + template + ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const; + template + Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; + template + Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const; + template + ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const; + template + Result free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr, Allocator const & alloc = Allocator() ) const; - UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + ResultValueType::type free( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const; + template + void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const; + template + void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const; + template + void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const; + template + void destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const & alloc = Allocator() ) const; + template + void destroy( Framebuffer framebuffer, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const; + template + Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const; + template + ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo ) const; + template + void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo ) const; + template + void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo ) const; + template + void destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo ) const; + template + void destroy( RenderPass renderPass, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const; + template + void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const; + template + Extent2D getRenderAreaGranularity( RenderPass renderPass, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const; + template + Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const; + template + void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr ) const; + template + void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const; + template + void destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + void destroy( CommandPool commandPool, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr ) const; +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d = Dispatch() ) const; +#else + template + ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const; + template + Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const; + template + void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const; -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const; -#else - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags = CommandPoolTrimFlagsKHR() ) const; + template + void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const; + template + void free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const; + template + void free( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) const; + template + Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; + template , typename Dispatch = DispatchLoaderStatic> + ResultValueType::type createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd ) const; + template + Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo ) const; + template + ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties ) const; + template + void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd ) const; + template + void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const; + template + void destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const; + template + void destroy( SwapchainKHR swapchain, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo ) const; + template + Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd ) const; + template + Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo ) const; + template + ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo ) const; + template + Result debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const; + template + ResultValueType::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const; + template + Result debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const; + template + ResultValueType::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Result importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo ) const; + template + Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const; + template + ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd ) const; + template + Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo ) const; + template + ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo ) const; + template + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo ) const; + template + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const; + template + void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const; + template + void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; + template + Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; + template + void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator = nullptr ) const; + template + void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const; + template + void destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const; + template + void destroy( ObjectTableNVX objectTable, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures ) const; + template + Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PeerMemoryFeatureFlagsKHX getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const; + template + ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos ) const; + template + Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindBufferMemory2KHR( ArrayProxy bindInfos ) const; + template + ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos ) const; + template + void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags = CommandPoolTrimFlagsKHR(), Dispatch const &d = Dispatch() ) const; + +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindImageMemory2KHR( ArrayProxy bindInfos ) const; + template + ResultValueType::type getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result getGroupPresentCapabilitiesKHX( DeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities ) const; +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getGroupPresentCapabilitiesKHX() const; + template + ResultValueType::type getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result getGroupSurfacePresentModesKHX( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHX* pModes ) const; + template + Result getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getGroupSurfacePresentModesKHX( SurfaceKHR surface ) const; + template + ResultValueType::type getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result acquireNextImage2KHX( const AcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex ) const; + template + Result getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue acquireNextImage2KHX( const AcquireNextImageInfoKHX & acquireInfo ) const; + template + ResultValueType::type getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate ) const; +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorUpdateTemplateKHR createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + ResultValueType::type getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator ) const; +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator = nullptr ) const; + template + ResultValueType::type importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - void updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData ) const; - - void setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata ) const; + template + Result getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setHdrMetadataEXT( ArrayProxy swapchains, ArrayProxy metadata ) const; + template + ResultValueType::type getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainStatusKHR( SwapchainKHR swapchain ) const; - - Result getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties ) const; + template + Result importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain ) const; + template + ResultValueType::type importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings ) const; +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const & alloc = Allocator() ) const; + template + ResultValueType::type getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const; +#ifdef VK_USE_PLATFORM_WIN32_KHR + template + Result importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements2KHR getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const; - template - StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const; + template + ResultValueType::type importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - void getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const; + template + Result getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements2KHR getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const; - template - StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const; + template + ResultValueType::type getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const; + template + Result importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Allocator const & alloc = Allocator() ) const; + template + ResultValueType::type importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const; + template + Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSamplerYcbcrConversionKHR createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator ) const; + template + Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr ) const; + template + ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache ) const; + template + Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueValidationCacheEXT createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + template + ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator ) const; + template + Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator = nullptr ) const; + template + ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const; + template + void getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const & alloc = Allocator() ) const; + template + PeerMemoryFeatureFlagsKHX getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const; + template + Result bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches ) const; + template + ResultValueType::type bindBufferMemory2KHR( ArrayProxy bindInfos, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + Result bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type bindImageMemory2KHR( ArrayProxy bindInfos, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + template + Result getGroupPresentCapabilitiesKHX( DeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type getGroupPresentCapabilitiesKHX(Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const - { - return m_device; - } - - explicit operator bool() const - { - return m_device != VK_NULL_HANDLE; - } - - bool operator!() const - { - return m_device == VK_NULL_HANDLE; - } - - private: - VkDevice m_device; - }; - - static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class BufferDeleter - { - public: - BufferDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Buffer buffer ) - { - m_device.destroyBuffer( buffer, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class BufferViewDeleter - { - public: - BufferViewDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( BufferView bufferView ) - { - m_device.destroyBufferView( bufferView, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class CommandBufferDeleter - { - public: - CommandBufferDeleter( Device device = Device(), CommandPool commandPool = CommandPool() ) - : m_device( device ) - , m_commandPool( commandPool ) - {} - - void operator()( CommandBuffer commandBuffer ) - { - m_device.freeCommandBuffers( m_commandPool, commandBuffer ); - } - - private: - Device m_device; - CommandPool m_commandPool; - }; - - class CommandPoolDeleter - { - public: - CommandPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( CommandPool commandPool ) - { - m_device.destroyCommandPool( commandPool, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorPoolDeleter - { - public: - DescriptorPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DescriptorPool descriptorPool ) - { - m_device.destroyDescriptorPool( descriptorPool, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorSetDeleter - { - public: - DescriptorSetDeleter( Device device = Device(), DescriptorPool descriptorPool = DescriptorPool() ) - : m_device( device ) - , m_descriptorPool( descriptorPool ) - {} - - void operator()( DescriptorSet descriptorSet ) - { - m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); - } - - private: - Device m_device; - DescriptorPool m_descriptorPool; - }; - - class DescriptorSetLayoutDeleter - { - public: - DescriptorSetLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DescriptorSetLayout descriptorSetLayout ) - { - m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DescriptorUpdateTemplateKHRDeleter - { - public: - DescriptorUpdateTemplateKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) - { - m_device.destroyDescriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class DeviceMemoryDeleter - { - public: - DeviceMemoryDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DeviceMemory deviceMemory ) - { - m_device.freeMemory( deviceMemory, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class EventDeleter - { - public: - EventDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Event event ) - { - m_device.destroyEvent( event, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class FenceDeleter - { - public: - FenceDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Fence fence ) - { - m_device.destroyFence( fence, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class FramebufferDeleter - { - public: - FramebufferDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Framebuffer framebuffer ) - { - m_device.destroyFramebuffer( framebuffer, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ImageDeleter - { - public: - ImageDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Image image ) - { - m_device.destroyImage( image, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ImageViewDeleter - { - public: - ImageViewDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( ImageView imageView ) - { - m_device.destroyImageView( imageView, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class IndirectCommandsLayoutNVXDeleter - { - public: - IndirectCommandsLayoutNVXDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) - { - m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class ObjectTableNVXDeleter - { - public: - ObjectTableNVXDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( ObjectTableNVX objectTableNVX ) - { - m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class PipelineDeleter - { - public: - PipelineDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Pipeline pipeline ) - { - m_device.destroyPipeline( pipeline, m_allocator ); - } - - private: - Device m_device; - Optional m_allocator; - }; - - class PipelineCacheDeleter - { - public: - PipelineCacheDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + Result getGroupSurfacePresentModesKHX( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHX* pModes, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type getGroupSurfacePresentModesKHX( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( PipelineCache pipelineCache ) - { - m_device.destroyPipelineCache( pipelineCache, m_allocator ); - } + template + Result acquireNextImage2KHX( const AcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValue acquireNextImage2KHX( const AcquireNextImageInfoKHX & acquireInfo, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + Result createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class PipelineLayoutDeleter - { - public: - PipelineLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( PipelineLayout pipelineLayout ) - { - m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); - } + template + void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + void updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData, Dispatch const &d = Dispatch() ) const; - class QueryPoolDeleter - { - public: - QueryPoolDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + void setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void setHdrMetadataEXT( ArrayProxy swapchains, ArrayProxy metadata, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( QueryPool queryPool ) - { - m_device.destroyQueryPool( queryPool, m_allocator ); - } + template + Result getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const; - private: - Device m_device; - Optional m_allocator; - }; + template + Result getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class RenderPassDeleter - { - public: - RenderPassDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + Result getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( RenderPass renderPass ) - { - m_device.destroyRenderPass( renderPass, m_allocator ); - } + template + void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + MemoryRequirements2KHR getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + void getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + MemoryRequirements2KHR getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info, Dispatch const &d = Dispatch() ) const; + template + StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class SamplerDeleter - { - public: - SamplerDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template , typename Dispatch = DispatchLoaderStatic> + std::vector getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( Sampler sampler ) - { - m_device.destroySampler( sampler, m_allocator ); - } + template + Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class SamplerYcbcrConversionKHRDeleter - { - public: - SamplerYcbcrConversionKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + void destroy( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( SamplerYcbcrConversionKHR samplerYcbcrConversionKHR ) - { - m_device.destroySamplerYcbcrConversionKHR( samplerYcbcrConversionKHR, m_allocator ); - } + template + Result createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + ResultValueType::type createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + void destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class SemaphoreDeleter - { - public: - SemaphoreDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + void destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroy( ValidationCacheEXT validationCache, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( Semaphore semaphore ) - { - m_device.destroySemaphore( semaphore, m_allocator ); - } + template + Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; + template + Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - class ShaderModuleDeleter - { - public: - ShaderModuleDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + template + Result getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void operator()( ShaderModule shaderModule ) - { - m_device.destroyShaderModule( shaderModule, m_allocator ); - } + template + Result getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + ResultValueType::type getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - Device m_device; - Optional m_allocator; - }; - class SwapchainKHRDeleter - { - public: - SwapchainKHRDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - void operator()( SwapchainKHR swapchainKHR ) + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const { - m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); + return m_device; } - private: - Device m_device; - Optional m_allocator; - }; - - class ValidationCacheEXTDeleter - { - public: - ValidationCacheEXTDeleter( Device device = Device(), Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} + explicit operator bool() const + { + return m_device != VK_NULL_HANDLE; + } - void operator()( ValidationCacheEXT validationCacheEXT ) + bool operator!() const { - m_device.destroyValidationCacheEXT( validationCacheEXT, m_allocator ); + return m_device == VK_NULL_HANDLE; } private: - Device m_device; - Optional m_allocator; + VkDevice m_device; }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName ) const + static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); + + template + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName, Dispatch const &d) const { - return vkGetDeviceProcAddr( m_device, pName ); + return d.vkGetDeviceProcAddr( m_device, pName ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name ) const + template + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name, Dispatch const &d ) const { - return vkGetDeviceProcAddr( m_device, name.c_str() ); + return d.vkGetDeviceProcAddr( m_device, name.c_str() ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); + d.vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroy( Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( Optional allocator, Dispatch const &d ) const { - vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const + template + VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue, Dispatch const &d) const { - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); + d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + template + VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d ) const { Queue queue; - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); + d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); return queue; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::waitIdle() const + template + VULKAN_HPP_INLINE Result Device::waitIdle(Dispatch const &d) const { - return static_cast( vkDeviceWaitIdle( m_device ) ); + return static_cast( d.vkDeviceWaitIdle( m_device ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Device::waitIdle() const + template + VULKAN_HPP_INLINE ResultValueType::type Device::waitIdle(Dispatch const &d ) const { - Result result = static_cast( vkDeviceWaitIdle( m_device ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::waitIdle" ); + Result result = static_cast( d.vkDeviceWaitIdle( m_device ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitIdle" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const + template + VULKAN_HPP_INLINE Result Device::allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory, Dispatch const &d) const { - return static_cast( vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); + return static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator, Dispatch const &d ) const { DeviceMemory memory; - Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); - return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemory" ); + Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); + return createResultValue( result, memory, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateMemory" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator, Dispatch const &d ) const { - DeviceMemoryDeleter deleter( *this, allocator ); - return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + DeviceMemory memory; + Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, memory, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateMemoryUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional allocator, Dispatch const &d ) const + { + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, Optional allocator, Dispatch const &d ) const { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const + template + VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d) const { - return static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); + return static_cast( d.vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, Dispatch const &d ) const { void* pData; - Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); - return createResultValue( result, pData, "VULKAN_HPP_NAMESPACE::Device::mapMemory" ); + Result result = static_cast( d.vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); + return createResultValue( result, pData, VULKAN_HPP_NAMESPACE_STRING"::Device::mapMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory, Dispatch const &d) const { - vkUnmapMemory( m_device, static_cast( memory ) ); + d.vkUnmapMemory( m_device, static_cast( memory ) ); } +#else + template + VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory, Dispatch const &d ) const + { + d.vkUnmapMemory( m_device, static_cast( memory ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + template + VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d) const { - return static_cast( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + return static_cast( d.vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::flushMappedMemoryRanges( ArrayProxy memoryRanges ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::flushMappedMemoryRanges( ArrayProxy memoryRanges, Dispatch const &d ) const { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::flushMappedMemoryRanges" ); + Result result = static_cast( d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::flushMappedMemoryRanges" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + template + VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d) const { - return static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + return static_cast( d.vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::invalidateMappedMemoryRanges( ArrayProxy memoryRanges, Dispatch const &d ) const { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::invalidateMappedMemoryRanges" ); + Result result = static_cast( d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::invalidateMappedMemoryRanges" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const + template + VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes, Dispatch const &d) const { - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); + d.vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory ) const + template + VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory, Dispatch const &d ) const { DeviceSize committedMemoryInBytes; - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); + d.vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); return committedMemoryInBytes; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements, Dispatch const &d) const { - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); + d.vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer ) const + template + VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer, Dispatch const &d ) const { MemoryRequirements memoryRequirements; - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + template + VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d) const { - return static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + return static_cast( d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d ) const { - Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindBufferMemory" ); + Result result = static_cast( d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements, Dispatch const &d) const { - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); + d.vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image ) const + template + VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image, Dispatch const &d ) const { MemoryRequirements memoryRequirements; - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + template + VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d) const { - return static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + return static_cast( d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d ) const { - Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindImageMemory" ); + Result result = static_cast( d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d) const { - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); + d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( Image image, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( Image image, Dispatch const &d ) const { - std::vector sparseMemoryRequirements( {alloc} ); + std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); + d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); + d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); return sparseMemoryRequirements; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + template + VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const { - return static_cast( vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + return static_cast( d.vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createFence( const FenceCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createFence( const FenceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Fence fence; - Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFence" ); + Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::createFence" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + Fence fence; + Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::createFenceUnique", deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Fence fence, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d) const + { + return static_cast( d.vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::resetFences( ArrayProxy fences, Dispatch const &d ) const + { + Result result = static_cast( d.vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetFences" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence, Dispatch const &d) const + { + return static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); + } +#else + template + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence, Dispatch const &d ) const + { + Result result = static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout, Dispatch const &d) const + { + return static_cast( d.vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout, Dispatch const &d ) const + { + Result result = static_cast( d.vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore, Dispatch const &d) const + { + return static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + Semaphore semaphore; + Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); + return createResultValue( result, semaphore, VULKAN_HPP_NAMESPACE_STRING"::Device::createSemaphore" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + Semaphore semaphore; + Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, semaphore, VULKAN_HPP_NAMESPACE_STRING"::Device::createSemaphoreUnique", deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d) const + { + return static_cast( d.vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createEvent( const EventCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + Event event; + Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); + return createResultValue( result, event, VULKAN_HPP_NAMESPACE_STRING"::Device::createEvent" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - FenceDeleter deleter( *this, allocator ); - return UniqueFence( createFence( createInfo, allocator ), deleter ); + Event event; + Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, event, VULKAN_HPP_NAMESPACE_STRING"::Device::createEventUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional allocator, Dispatch const &d ) const { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences ) const + template + VULKAN_HPP_INLINE void Device::destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::resetFences( ArrayProxy fences ) const + template + VULKAN_HPP_INLINE void Device::destroy( Event event, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event, Dispatch const &d) const + { + return static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); + } +#else + template + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event, Dispatch const &d ) const { - Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetFences" ); + Result result = static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + template + VULKAN_HPP_INLINE Result Device::setEvent( Event event, Dispatch const &d) const { - return static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); + return static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); } #else - VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::setEvent( Event event, Dispatch const &d ) const { - Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); + Result result = static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setEvent" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::resetEvent( Event event, Dispatch const &d) const { - return static_cast( vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); + return static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const +#else + template + VULKAN_HPP_INLINE ResultValueType::type Device::resetEvent( Event event, Dispatch const &d ) const { - Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + Result result = static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetEvent" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const + template + VULKAN_HPP_INLINE Result Device::createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool, Dispatch const &d) const { - return static_cast( vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); + return static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - Semaphore semaphore; - Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); - return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphore" ); + QueryPool queryPool; + Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); + return createResultValue( result, queryPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createQueryPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - SemaphoreDeleter deleter( *this, allocator ); - return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); + QueryPool queryPool; + Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, queryPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createQueryPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional allocator, Dispatch const &d ) const { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const + template + VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createEvent( const EventCreateInfo & createInfo, Optional allocator ) const - { - Event event; - Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); - return createResultValue( result, event, "VULKAN_HPP_NAMESPACE::Device::createEvent" ); - } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueEvent Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, Optional allocator, Dispatch const &d ) const { - EventDeleter deleter( *this, allocator ); - return UniqueEvent( createEvent( createInfo, allocator ), deleter ); + d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d) const { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); + return static_cast( d.vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional allocator ) const + template + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags, Dispatch const &d ) const { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); + Result result = static_cast( d.vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + template + VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer, Dispatch const &d) const { - return static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); + return static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); } -#else - VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + Buffer buffer; + Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); + return createResultValue( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createBuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); + Buffer buffer; + Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferUnique", deleter ); } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::setEvent( Event event ) const + template + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkSetEvent( m_device, static_cast( event ) ) ); + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); } -#else - VULKAN_HPP_INLINE ResultValueType::type Device::setEvent( Event event ) const +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional allocator, Dispatch const &d ) const { - Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::setEvent" ); + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::resetEvent( Event event ) const + template + VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkResetEvent( m_device, static_cast( event ) ) ); + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); } -#else - VULKAN_HPP_INLINE ResultValueType::type Device::resetEvent( Event event ) const +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, Optional allocator, Dispatch const &d ) const { - Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetEvent" ); + d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const + template + VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d) const { - return static_cast( vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); + return static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - QueryPool queryPool; - Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); - return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPool" ); + BufferView view; + Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferView" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - QueryPoolDeleter deleter( *this, allocator ); - return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + BufferView view; + Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional allocator, Dispatch const &d ) const { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const + template + VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const + template + VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, Optional allocator, Dispatch const &d ) const { - Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); + d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const + template + VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d) const { - return static_cast( vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); + return static_cast( d.vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createImage( const ImageCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - Buffer buffer; - Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); - return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBuffer" ); + Image image; + Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); + return createResultValue( result, image, VULKAN_HPP_NAMESPACE_STRING"::Device::createImage" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - BufferDeleter deleter( *this, allocator ); - return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); + Image image; + Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, image, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional allocator, Dispatch const &d ) const { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const + template + VULKAN_HPP_INLINE void Device::destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator ) const - { - BufferView view; - Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createBufferView" ); - } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueBufferView Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( Image image, Optional allocator, Dispatch const &d ) const { - BufferViewDeleter deleter( *this, allocator ); - return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); + d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d) const { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); + d.vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional allocator ) const + template + VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource, Dispatch const &d ) const { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); + SubresourceLayout layout; + d.vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); + return layout; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const + template + VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView, Dispatch const &d) const { - return static_cast( vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); + return static_cast( d.vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createImage( const ImageCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - Image image; - Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); - return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImage" ); + ImageView view; + Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageView" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - ImageDeleter deleter( *this, allocator ); - return UniqueImage( createImage( createInfo, allocator ), deleter ); + ImageView view; + Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional allocator, Dispatch const &d ) const { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const + template + VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const + template + VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, Optional allocator, Dispatch const &d ) const { - SubresourceLayout layout; - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); - return layout; + d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const + template + VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d) const { - return static_cast( vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + return static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - ImageView view; - Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageView" ); + ShaderModule shaderModule; + Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); + return createResultValue( result, shaderModule, VULKAN_HPP_NAMESPACE_STRING"::Device::createShaderModule" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - ImageViewDeleter deleter( *this, allocator ); - return UniqueImageView( createImageView( createInfo, allocator ), deleter ); + ShaderModule shaderModule; + Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, shaderModule, VULKAN_HPP_NAMESPACE_STRING"::Device::createShaderModuleUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional allocator, Dispatch const &d ) const { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const + template + VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const - { - ShaderModule shaderModule; - Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); - return createResultValue( result, shaderModule, "VULKAN_HPP_NAMESPACE::Device::createShaderModule" ); - } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueShaderModule Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, Optional allocator, Dispatch const &d ) const { - ShaderModuleDeleter deleter( *this, allocator ); - return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); + d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d) const { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); + return static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const + { + PipelineCache pipelineCache; + Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); + return createResultValue( result, pipelineCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineCache" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); + PipelineCache pipelineCache; + Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, pipelineCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineCacheUnique", deleter ); } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const + template + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const - { - PipelineCache pipelineCache; - Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); - return createResultValue( result, pipelineCache, "VULKAN_HPP_NAMESPACE::Device::createPipelineCache" ); - } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniquePipelineCache Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional allocator, Dispatch const &d ) const { - PipelineCacheDeleter deleter( *this, allocator ); - return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, Optional allocator, Dispatch const &d ) const { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + template + VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d) const { - return static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); + return static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( PipelineCache pipelineCache, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( PipelineCache pipelineCache, Dispatch const &d ) const { - std::vector data( {alloc} ); + std::vector data; size_t dataSize; Result result; do { - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); + result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); if ( ( result == Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( dataSize <= data.size() ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); data.resize( dataSize ); - return createResultValue( result, data, "VULKAN_HPP_NAMESPACE::Device::getPipelineCacheData" ); + return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getPipelineCacheData" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const + template + VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches, Dispatch const &d) const { - return static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); + return static_cast( d.vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches, Dispatch const &d ) const { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::mergePipelineCaches" ); + Result result = static_cast( d.vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergePipelineCaches" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + template + VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d) const { - return static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + return static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const { - std::vector pipelines( createInfos.size(), {}, {alloc} ); - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelines" ); + std::vector pipelines( createInfos.size() ); + Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); + return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelines" ); } - VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Pipeline pipeline; - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); - return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipeline" ); + Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipeline" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const { - PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator, alloc ); - std::vector uniquePipelines; - uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" ); + std::vector pipelines; + pipelines.reserve( createInfos.size() ); + Pipeline* buffer = reinterpret_cast( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); + Result result = static_cast(d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); + + ObjectDeleter deleter( *this, allocator ); + for ( size_t i=0 ; i allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); + Pipeline pipeline; + Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + template + VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d) const { - return static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + return static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const { - std::vector pipelines( createInfos.size(), {}, {alloc} ); - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelines" ); + std::vector pipelines( createInfos.size() ); + Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); + return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelines" ); } - VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Pipeline pipeline; - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); - return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createComputePipeline" ); + Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipeline" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_INLINE std::vector Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const { - PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator, alloc ); - std::vector uniquePipelines; - uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" ); + std::vector pipelines; + pipelines.reserve( createInfos.size() ); + Pipeline* buffer = reinterpret_cast( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); + Result result = static_cast(d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); + + ObjectDeleter deleter( *this, allocator ); + for ( size_t i=0 ; i allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); + Pipeline pipeline; + Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, Optional allocator, Dispatch const &d ) const { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const + template + VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d) const { - return static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); + return static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { PipelineLayout pipelineLayout; - Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); - return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayout" ); + Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); + return createResultValue( result, pipelineLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - PipelineLayoutDeleter deleter( *this, allocator ); - return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); + PipelineLayout pipelineLayout; + Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, pipelineLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator, Dispatch const &d ) const { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const + template + VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - return static_cast( vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d) const + { + return static_cast( d.vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Sampler sampler; - Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); - return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSampler" ); + Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); + return createResultValue( result, sampler, VULKAN_HPP_NAMESPACE_STRING"::Device::createSampler" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - SamplerDeleter deleter( *this, allocator ); - return UniqueSampler( createSampler( createInfo, allocator ), deleter ); + Sampler sampler; + Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, sampler, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, Optional allocator, Dispatch const &d ) const { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + template + VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d) const { - return static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); + return static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { DescriptorSetLayout setLayout; - Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); - return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayout" ); + Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); + return createResultValue( result, setLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorSetLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - DescriptorSetLayoutDeleter deleter( *this, allocator ); - return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); + DescriptorSetLayout setLayout; + Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, setLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorSetLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, Optional allocator, Dispatch const &d ) const { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const + template + VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d) const { - return static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); + return static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { DescriptorPool descriptorPool; - Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); - return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPool" ); + Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); + return createResultValue( result, descriptorPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - DescriptorPoolDeleter deleter( *this, allocator ); - return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); + DescriptorPool descriptorPool; + Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, descriptorPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, Optional allocator, Dispatch const &d ) const { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + template + VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags, Dispatch const &d) const { - return static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + return static_cast( d.vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags, Dispatch const &d ) const { - Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetDescriptorPool" ); + Result result = static_cast( d.vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetDescriptorPool" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const + template + VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets, Dispatch const &d) const { - return static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); + return static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const { - std::vector descriptorSets( allocateInfo.descriptorSetCount, {}, {alloc} ); - Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, descriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSets" ); + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateDescriptorSets" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_INLINE std::vector Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const { - DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); - std::vector descriptorSets = allocateDescriptorSets( allocateInfo, alloc ); - std::vector uniqueDescriptorSets; - uniqueDescriptorSets.reserve( descriptorSets.size() ); - for ( auto descriptorSet : descriptorSets ) + static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueDescriptorSet ), "DescriptorSet is greater than UniqueDescriptorSet!" ); + std::vector descriptorSets; + descriptorSets.reserve( allocateInfo.descriptorSetCount ); + DescriptorSet* buffer = reinterpret_cast( reinterpret_cast( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) ); + Result result = static_cast(d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( buffer ) ) ); + + PoolDeleter deleter( *this, allocateInfo.descriptorPool ); + for ( size_t i=0 ; i + VULKAN_HPP_INLINE Result Device::freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d) const + { + return static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE ResultValueType::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d ) const + { + Result result = static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::freeDescriptorSets" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d) const { - return static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + return static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::free( DescriptorPool descriptorPool, ArrayProxy descriptorSets, Dispatch const &d ) const { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::freeDescriptorSets" ); + Result result = static_cast( d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::free" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const + template + VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d) const { - vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); + d.vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const + template + VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies, Dispatch const &d ) const { - vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); + d.vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const + template + VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer, Dispatch const &d) const { - return static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); + return static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Framebuffer framebuffer; - Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); - return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebuffer" ); + Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); + return createResultValue( result, framebuffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createFramebuffer" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - FramebufferDeleter deleter( *this, allocator ); - return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); + Framebuffer framebuffer; + Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, framebuffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createFramebufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, Optional allocator, Dispatch const &d ) const { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const + template + VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d) const { - return static_cast( vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); + return static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { RenderPass renderPass; - Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); - return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPass" ); + Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); + return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - RenderPassDeleter deleter( *this, allocator ); - return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); + RenderPass renderPass; + Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPassUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, Optional allocator, Dispatch const &d ) const { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const + template + VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d) const { - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); + d.vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass ) const + template + VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass, Dispatch const &d ) const { Extent2D granularity; - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); + d.vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); return granularity; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const + template + VULKAN_HPP_INLINE Result Device::createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool, Dispatch const &d) const { - return static_cast( vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); + return static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { CommandPool commandPool; - Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); - return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPool" ); + Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); + return createResultValue( result, commandPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createCommandPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - CommandPoolDeleter deleter( *this, allocator ); - return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); + CommandPool commandPool; + Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, commandPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createCommandPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, Optional allocator, Dispatch const &d ) const { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + template + VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d) const { - return static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + return static_cast( d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d ) const { - Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetCommandPool" ); + Result result = static_cast( d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetCommandPool" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const + template + VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers, Dispatch const &d) const { - return static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); + return static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const { - std::vector commandBuffers( allocateInfo.commandBufferCount, {}, {alloc} ); - Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); - return createResultValue( result, commandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffers" ); + std::vector commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateCommandBuffers" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_INLINE std::vector Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const { - CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); - std::vector commandBuffers = allocateCommandBuffers( allocateInfo, alloc ); - std::vector uniqueCommandBuffers; - uniqueCommandBuffers.reserve( commandBuffers.size() ); - for ( auto commandBuffer : commandBuffers ) + static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueCommandBuffer ), "CommandBuffer is greater than UniqueCommandBuffer!" ); + std::vector commandBuffers; + commandBuffers.reserve( allocateInfo.commandBufferCount ); + CommandBuffer* buffer = reinterpret_cast( reinterpret_cast( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) ); + Result result = static_cast(d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( buffer ) ) ); + + PoolDeleter deleter( *this, allocateInfo.commandPool ); + for ( size_t i=0 ; i + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const + template + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d ) const { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const + template + VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const { - return static_cast( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, ArrayProxy commandBuffers, Dispatch const &d ) const { - std::vector swapchains( createInfos.size(), {}, {alloc} ); - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); - return createResultValue( result, swapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHR" ); + d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); } - VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d) const + { + return static_cast( d.vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const + { + std::vector swapchains( createInfos.size() ); + Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); + return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainsKHR" ); + } + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SwapchainKHR swapchain; - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainKHR" ); + Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - template - VULKAN_HPP_INLINE std::vector Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator, Dispatch const &d ) const { - SwapchainKHRDeleter deleter( *this, allocator ); - std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator, alloc ); - std::vector uniqueSwapchainKHRs; - uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); - for ( auto swapchainKHR : swapchainKHRs ) + static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueSwapchainKHR ), "SwapchainKHR is greater than UniqueSwapchainKHR!" ); + std::vector swapchainKHRs; + swapchainKHRs.reserve( createInfos.size() ); + SwapchainKHR* buffer = reinterpret_cast( reinterpret_cast( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) ); + Result result = static_cast(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); + + ObjectDeleter deleter( *this, allocator ); + for ( size_t i=0 ; i allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); + SwapchainKHR swapchain; + Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const + template + VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain, Dispatch const &d) const { - return static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); + return static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SwapchainKHR swapchain; - Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHR" ); + Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSwapchainKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); + SwapchainKHR swapchain; + Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, Optional allocator, Dispatch const &d ) const { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const + template + VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d) const { - return static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); + return static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain, Dispatch const &d ) const { - std::vector swapchainImages( {alloc} ); + std::vector swapchainImages; uint32_t swapchainImageCount; Result result; do { - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); if ( ( result == Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( swapchainImageCount <= swapchainImages.size() ); + VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); swapchainImages.resize( swapchainImageCount ); - return createResultValue( result, swapchainImages, "VULKAN_HPP_NAMESPACE::Device::getSwapchainImagesKHR" ); + return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainImagesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const + template + VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex, Dispatch const &d) const { - return static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); + return static_cast( d.vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const + template + VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, Dispatch const &d ) const { uint32_t imageIndex; - Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); - return createResultValue( result, imageIndex, "VULKAN_HPP_NAMESPACE::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + Result result = static_cast( d.vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); + return createResultValue( result, imageIndex, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo ) const + template + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d) const { - return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); + return static_cast( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d ) const { - Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::debugMarkerSetObjectNameEXT" ); + Result result = static_cast( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectNameEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo ) const + template + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d) const { - return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); + return static_cast( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d ) const { - Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::debugMarkerSetObjectTagEXT" ); + Result result = static_cast( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectTagEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d) const { - return static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); + return static_cast( d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d ) const { HANDLE handle; - Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); - return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandleNV" ); + Result result = static_cast( d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); + return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandleNV" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const + template + VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d) const { - return static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); + return static_cast( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator, Dispatch const &d ) const { IndirectCommandsLayoutNVX indirectCommandsLayout; - Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); - return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVX" ); + Result result = static_cast( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); + return createResultValue( result, indirectCommandsLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createIndirectCommandsLayoutNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator, Dispatch const &d ) const { - IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); - return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, indirectCommandsLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createIndirectCommandsLayoutNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator, Dispatch const &d ) const { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const + template + VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d) const { - return static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); + return static_cast( d.vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator, Dispatch const &d ) const { ObjectTableNVX objectTable; - Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); - return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVX" ); + Result result = static_cast( d.vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); + return createResultValue( result, objectTable, VULKAN_HPP_NAMESPACE_STRING"::Device::createObjectTableNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator, Dispatch const &d ) const { - ObjectTableNVXDeleter deleter( *this, allocator ); - return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); + ObjectTableNVX objectTable; + Result result = static_cast( d.vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, objectTable, VULKAN_HPP_NAMESPACE_STRING"::Device::createObjectTableNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, Optional allocator, Dispatch const &d ) const { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + template + VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d) const { - return static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); + return static_cast( d.vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices, Dispatch const &d ) const { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( pObjectTableEntries.size() == objectIndices.size() ); + VULKAN_HPP_ASSERT( pObjectTableEntries.size() == objectIndices.size() ); #else if ( pObjectTableEntries.size() != objectIndices.size() ) { - throw LogicError( "VULKAN_HPP_NAMESPACE::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); + throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::registerObjectsNVX" ); + Result result = static_cast( d.vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::registerObjectsNVX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const + template + VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d) const { - return static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); + return static_cast( d.vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices, Dispatch const &d ) const { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( objectEntryTypes.size() == objectIndices.size() ); + VULKAN_HPP_ASSERT( objectEntryTypes.size() == objectIndices.size() ); #else if ( objectEntryTypes.size() != objectIndices.size() ) { - throw LogicError( "VULKAN_HPP_NAMESPACE::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); + throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::unregisterObjectsNVX" ); + Result result = static_cast( d.vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::unregisterObjectsNVX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags, Dispatch const &d) const + { + d.vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); + } +#else + template + VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags, Dispatch const &d ) const { - vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); + d.vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const { - return static_cast( vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); + return static_cast( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const { HANDLE handle; - Result result = static_cast( vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandleKHR" ); + Result result = static_cast( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d) const { - return static_cast( vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( pMemoryWin32HandleProperties ) ) ); + return static_cast( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( pMemoryWin32HandleProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, Dispatch const &d ) const { MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - Result result = static_cast( vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( &memoryWin32HandleProperties ) ) ); - return createResultValue( result, memoryWin32HandleProperties, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandlePropertiesKHR" ); + Result result = static_cast( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( &memoryWin32HandleProperties ) ) ); + return createResultValue( result, memoryWin32HandleProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandlePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const { - return static_cast( vkGetMemoryFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); + return static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d ) const { int fd; - Result result = static_cast( vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getMemoryFdKHR" ); + Result result = static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d) const { - return static_cast( vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( pMemoryFdProperties ) ) ); + return static_cast( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( pMemoryFdProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, Dispatch const &d ) const { MemoryFdPropertiesKHR memoryFdProperties; - Result result = static_cast( vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); - return createResultValue( result, memoryFdProperties, "VULKAN_HPP_NAMESPACE::Device::getMemoryFdPropertiesKHR" ); + Result result = static_cast( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); + return createResultValue( result, memoryFdProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryFdPropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + template + VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const { - return static_cast( vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); + return static_cast( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const { HANDLE handle; - Result result = static_cast( vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getSemaphoreWin32HandleKHR" ); + Result result = static_cast( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getSemaphoreWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo ) const + template + VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d) const { - return static_cast( vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pImportSemaphoreWin32HandleInfo ) ) ); + return static_cast( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( pImportSemaphoreWin32HandleInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d ) const { - Result result = static_cast( vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importSemaphoreWin32HandleKHR" ); + Result result = static_cast( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd ) const + template + VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const { - return static_cast( vkGetSemaphoreFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); + return static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d ) const { int fd; - Result result = static_cast( vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getSemaphoreFdKHR" ); + Result result = static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getSemaphoreFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo ) const + template + VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d) const { - return static_cast( vkImportSemaphoreFdKHR( m_device, reinterpret_cast( pImportSemaphoreFdInfo ) ) ); + return static_cast( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( pImportSemaphoreFdInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d ) const { - Result result = static_cast( vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importSemaphoreFdKHR" ); + Result result = static_cast( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const + template + VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const { - return static_cast( vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); + return static_cast( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const { HANDLE handle; - Result result = static_cast( vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getFenceWin32HandleKHR" ); + Result result = static_cast( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo ) const + template + VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d) const { - return static_cast( vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( pImportFenceWin32HandleInfo ) ) ); + return static_cast( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( pImportFenceWin32HandleInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d ) const { - Result result = static_cast( vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importFenceWin32HandleKHR" ); + Result result = static_cast( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd ) const + template + VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const { - return static_cast( vkGetFenceFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); + return static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d ) const { int fd; - Result result = static_cast( vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getFenceFdKHR" ); + Result result = static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo ) const + template + VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d) const { - return static_cast( vkImportFenceFdKHR( m_device, reinterpret_cast( pImportFenceFdInfo ) ) ); + return static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( pImportFenceFdInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d ) const { - Result result = static_cast( vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importFenceFdKHR" ); + Result result = static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const + template + VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d) const { - return static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); + return static_cast( d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d ) const { - Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::displayPowerControlEXT" ); + Result result = static_cast( d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::displayPowerControlEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + template + VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const { - return static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + return static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator, Dispatch const &d ) const { Fence fence; - Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::registerEventEXT" ); + Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerEventEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + template + VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const { - return static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + return static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator, Dispatch const &d ) const { Fence fence; - Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::registerDisplayEventEXT" ); + Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerDisplayEventEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const + template + VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d) const { - return static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); + return static_cast( d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValue Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const + template + VULKAN_HPP_INLINE ResultValue Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, Dispatch const &d ) const { uint64_t counterValue; - Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); - return createResultValue( result, counterValue, "VULKAN_HPP_NAMESPACE::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); + Result result = static_cast( d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); + return createResultValue( result, counterValue, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures ) const + template + VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures, Dispatch const &d) const { - vkGetDeviceGroupPeerMemoryFeaturesKHX( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); + d.vkGetDeviceGroupPeerMemoryFeaturesKHX( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PeerMemoryFeatureFlagsKHX Device::getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const + template + VULKAN_HPP_INLINE PeerMemoryFeatureFlagsKHX Device::getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d ) const { PeerMemoryFeatureFlagsKHX peerMemoryFeatures; - vkGetDeviceGroupPeerMemoryFeaturesKHX( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); + d.vkGetDeviceGroupPeerMemoryFeaturesKHX( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); return peerMemoryFeatures; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos ) const + template + VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos, Dispatch const &d) const { - return static_cast( vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); + return static_cast( d.vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory2KHR( ArrayProxy bindInfos ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory2KHR( ArrayProxy bindInfos, Dispatch const &d ) const { - Result result = static_cast( vkBindBufferMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindBufferMemory2KHR" ); + Result result = static_cast( d.vkBindBufferMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos ) const + template + VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos, Dispatch const &d) const { - return static_cast( vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); + return static_cast( d.vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory2KHR( ArrayProxy bindInfos ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory2KHR( ArrayProxy bindInfos, Dispatch const &d ) const { - Result result = static_cast( vkBindImageMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindImageMemory2KHR" ); + Result result = static_cast( d.vkBindImageMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHX( DeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities ) const + template + VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHX( DeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities, Dispatch const &d) const { - return static_cast( vkGetDeviceGroupPresentCapabilitiesKHX( m_device, reinterpret_cast( pDeviceGroupPresentCapabilities ) ) ); + return static_cast( d.vkGetDeviceGroupPresentCapabilitiesKHX( m_device, reinterpret_cast( pDeviceGroupPresentCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getGroupPresentCapabilitiesKHX() const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getGroupPresentCapabilitiesKHX(Dispatch const &d ) const { DeviceGroupPresentCapabilitiesKHX deviceGroupPresentCapabilities; - Result result = static_cast( vkGetDeviceGroupPresentCapabilitiesKHX( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); - return createResultValue( result, deviceGroupPresentCapabilities, "VULKAN_HPP_NAMESPACE::Device::getGroupPresentCapabilitiesKHX" ); + Result result = static_cast( d.vkGetDeviceGroupPresentCapabilitiesKHX( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); + return createResultValue( result, deviceGroupPresentCapabilities, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupPresentCapabilitiesKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHX( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHX* pModes ) const + template + VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHX( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHX* pModes, Dispatch const &d) const { - return static_cast( vkGetDeviceGroupSurfacePresentModesKHX( m_device, static_cast( surface ), reinterpret_cast( pModes ) ) ); + return static_cast( d.vkGetDeviceGroupSurfacePresentModesKHX( m_device, static_cast( surface ), reinterpret_cast( pModes ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getGroupSurfacePresentModesKHX( SurfaceKHR surface ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getGroupSurfacePresentModesKHX( SurfaceKHR surface, Dispatch const &d ) const { DeviceGroupPresentModeFlagsKHX modes; - Result result = static_cast( vkGetDeviceGroupSurfacePresentModesKHX( m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); - return createResultValue( result, modes, "VULKAN_HPP_NAMESPACE::Device::getGroupSurfacePresentModesKHX" ); + Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModesKHX( m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); + return createResultValue( result, modes, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupSurfacePresentModesKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::acquireNextImage2KHX( const AcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex ) const + template + VULKAN_HPP_INLINE Result Device::acquireNextImage2KHX( const AcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d) const { - return static_cast( vkAcquireNextImage2KHX( m_device, reinterpret_cast( pAcquireInfo ), pImageIndex ) ); + return static_cast( d.vkAcquireNextImage2KHX( m_device, reinterpret_cast( pAcquireInfo ), pImageIndex ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValue Device::acquireNextImage2KHX( const AcquireNextImageInfoKHX & acquireInfo ) const + template + VULKAN_HPP_INLINE ResultValue Device::acquireNextImage2KHX( const AcquireNextImageInfoKHX & acquireInfo, Dispatch const &d ) const { uint32_t imageIndex; - Result result = static_cast( vkAcquireNextImage2KHX( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); - return createResultValue( result, imageIndex, "VULKAN_HPP_NAMESPACE::Device::acquireNextImage2KHX", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + Result result = static_cast( d.vkAcquireNextImage2KHX( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); + return createResultValue( result, imageIndex, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireNextImage2KHX", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate ) const + template + VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate, Dispatch const &d) const { - return static_cast( vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorUpdateTemplate ) ) ); + return static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorUpdateTemplate ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { DescriptorUpdateTemplateKHR descriptorUpdateTemplate; - Result result = static_cast( vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); - return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHR" ); + Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); + return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorUpdateTemplateKHR Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - DescriptorUpdateTemplateKHRDeleter deleter( *this, allocator ); - return UniqueDescriptorUpdateTemplateKHR( createDescriptorUpdateTemplateKHR( createInfo, allocator ), deleter ); + DescriptorUpdateTemplateKHR descriptorUpdateTemplate; + Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplate, Optional allocator, Dispatch const &d ) const { - vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData, Dispatch const &d) const + { + d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); + } +#else + template + VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData, Dispatch const &d ) const { - vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); + d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata ) const + template + VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata, Dispatch const &d) const { - vkSetHdrMetadataEXT( m_device, swapchainCount, reinterpret_cast( pSwapchains ), reinterpret_cast( pMetadata ) ); + d.vkSetHdrMetadataEXT( m_device, swapchainCount, reinterpret_cast( pSwapchains ), reinterpret_cast( pMetadata ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy swapchains, ArrayProxy metadata ) const + template + VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy swapchains, ArrayProxy metadata, Dispatch const &d ) const { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( swapchains.size() == metadata.size() ); + VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); #else if ( swapchains.size() != metadata.size() ) { - throw LogicError( "VULKAN_HPP_NAMESPACE::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); + throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS - vkSetHdrMetadataEXT( m_device, swapchains.size() , reinterpret_cast( swapchains.data() ), reinterpret_cast( metadata.data() ) ); + d.vkSetHdrMetadataEXT( m_device, swapchains.size() , reinterpret_cast( swapchains.data() ), reinterpret_cast( metadata.data() ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain ) const + template + VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d) const { - return static_cast( vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); + return static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); } #else - VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain ) const + template + VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d ) const { - Result result = static_cast( vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + Result result = static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties ) const + template + VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d) const { - return static_cast( vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( pDisplayTimingProperties ) ) ); + return static_cast( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( pDisplayTimingProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, Dispatch const &d ) const { RefreshCycleDurationGOOGLE displayTimingProperties; - Result result = static_cast( vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); - return createResultValue( result, displayTimingProperties, "VULKAN_HPP_NAMESPACE::Device::getRefreshCycleDurationGOOGLE" ); + Result result = static_cast( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); + return createResultValue( result, displayTimingProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getRefreshCycleDurationGOOGLE" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings ) const + template + VULKAN_HPP_INLINE Result Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d) const { - return static_cast( vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), pPresentationTimingCount, reinterpret_cast( pPresentationTimings ) ) ); + return static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), pPresentationTimingCount, reinterpret_cast( pPresentationTimings ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Dispatch const &d ) const { - std::vector presentationTimings( {alloc} ); + std::vector presentationTimings; uint32_t presentationTimingCount; - Result result = static_cast( vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && presentationTimingCount ) + Result result; + do { - presentationTimings.resize( presentationTimingCount ); - result = static_cast( vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); - } - return createResultValue( result, presentationTimings, "VULKAN_HPP_NAMESPACE::Device::getPastPresentationTimingGOOGLE" ); + result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && presentationTimingCount ) + { + presentationTimings.resize( presentationTimingCount ); + result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); + presentationTimings.resize( presentationTimingCount ); + return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING"::Device::getPastPresentationTimingGOOGLE" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d) const { - vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); + d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE MemoryRequirements2KHR Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const + template + VULKAN_HPP_INLINE MemoryRequirements2KHR Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info, Dispatch const &d ) const { MemoryRequirements2KHR memoryRequirements; - vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const + template + VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info, Dispatch const &d ) const { StructureChain structureChain; MemoryRequirements2KHR& memoryRequirements = structureChain.template get(); - vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d) const { - vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); + d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE MemoryRequirements2KHR Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const + template + VULKAN_HPP_INLINE MemoryRequirements2KHR Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info, Dispatch const &d ) const { MemoryRequirements2KHR memoryRequirements; - vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } - template - VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const + template + VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info, Dispatch const &d ) const { StructureChain structureChain; MemoryRequirements2KHR& memoryRequirements = structureChain.template get(); - vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); + d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const + template + VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements, Dispatch const &d) const { - vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); + d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Dispatch const &d ) const { - std::vector sparseMemoryRequirements( {alloc} ); + std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; - vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); + d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); + d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); return sparseMemoryRequirements; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const + template + VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion, Dispatch const &d) const { - return static_cast( vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pYcbcrConversion ) ) ); + return static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pYcbcrConversion ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SamplerYcbcrConversionKHR ycbcrConversion; - Result result = static_cast( vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); - return createResultValue( result, ycbcrConversion, "VULKAN_HPP_NAMESPACE::Device::createSamplerYcbcrConversionKHR" ); + Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); + return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSamplerYcbcrConversionKHR Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SamplerYcbcrConversionKHRDeleter deleter( *this, allocator ); - return UniqueSamplerYcbcrConversionKHR( createSamplerYcbcrConversionKHR( createInfo, allocator ), deleter ); + SamplerYcbcrConversionKHR ycbcrConversion; + Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator ) const + template + VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator, Dispatch const &d ) const { - vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache ) const + template + VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d) const { - return static_cast( vkCreateValidationCacheEXT( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pValidationCache ) ) ); + return static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pValidationCache ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator, Dispatch const &d ) const { ValidationCacheEXT validationCache; - Result result = static_cast( vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); - return createResultValue( result, validationCache, "VULKAN_HPP_NAMESPACE::Device::createValidationCacheEXT" ); + Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); + return createResultValue( result, validationCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createValidationCacheEXT" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE ResultValueType::type Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator, Dispatch const &d ) const + { + ValidationCacheEXT validationCache; + Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, validationCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createValidationCacheEXTUnique", deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d) const + { + return static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), pDataSize, pData ) ); } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueValidationCacheEXT Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator ) const +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, Dispatch const &d ) const { - ValidationCacheEXTDeleter deleter( *this, allocator ); - return UniqueValidationCacheEXT( createValidationCacheEXT( createInfo, allocator ), deleter ); + std::vector data; + size_t dataSize; + Result result; + do + { + result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && dataSize ) + { + data.resize( dataSize ); + result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + data.resize( dataSize ); + return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getValidationCacheDataEXT" ); } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches, Dispatch const &d) const { - vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); + return static_cast( d.vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches, Dispatch const &d ) const { - vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); + Result result = static_cast( d.vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergeValidationCachesEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const + template + VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d) const { - return static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), pDataSize, pData ) ); + return static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), pInfoSize, pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Dispatch const &d ) const { - std::vector data( {alloc} ); - size_t dataSize; + std::vector info; + size_t infoSize; Result result; do { - result = static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); - if ( ( result == Result::eSuccess ) && dataSize ) + result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && infoSize ) { - data.resize( dataSize ); - result = static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + info.resize( infoSize ); + result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( dataSize <= data.size() ); - data.resize( dataSize ); - return createResultValue( result, data, "VULKAN_HPP_NAMESPACE::Device::getValidationCacheDataEXT" ); + VULKAN_HPP_ASSERT( infoSize <= info.size() ); + info.resize( infoSize ); + return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING"::Device::getShaderInfoAMD" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const + template + VULKAN_HPP_INLINE Result Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d) const { - return static_cast( vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); + return static_cast( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast( handleType ), pHostPointer, reinterpret_cast( pMemoryHostPointerProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches ) const + template + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, Dispatch const &d ) const { - Result result = static_cast( vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::mergeValidationCachesEXT" ); + MemoryHostPointerPropertiesEXT memoryHostPointerProperties; + Result result = static_cast( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast( handleType ), pHostPointer, reinterpret_cast( &memoryHostPointerProperties ) ) ); + return createResultValue( result, memoryHostPointerProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryHostPointerPropertiesEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE - class DeviceDeleter; - using UniqueDevice = UniqueHandle; + class PhysicalDevice; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDevice = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class PhysicalDevice @@ -29943,7 +32550,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT PhysicalDevice( VkPhysicalDevice physicalDevice ) - : m_physicalDevice( physicalDevice ) + : m_physicalDevice( physicalDevice ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -29975,266 +32582,342 @@ namespace VULKAN_HPP_NAMESPACE return m_physicalDevice < rhs.m_physicalDevice; } - void getProperties( PhysicalDeviceProperties* pProperties ) const; + template + void getProperties( PhysicalDeviceProperties* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties getProperties() const; + template + PhysicalDeviceProperties getProperties(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const; + template + void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + std::vector getQueueFamilyProperties(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const; + template + void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties getMemoryProperties() const; + template + PhysicalDeviceMemoryProperties getMemoryProperties(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures( PhysicalDeviceFeatures* pFeatures ) const; + template + void getFeatures( PhysicalDeviceFeatures* pFeatures, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures getFeatures() const; + template + PhysicalDeviceFeatures getFeatures(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const; + template + void getFormatProperties( Format format, FormatProperties* pFormatProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties getFormatProperties( Format format ) const; + template + FormatProperties getFormatProperties( Format format, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const; + template + Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const; + template + ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const; + template + Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const; + template + Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceLayerProperties(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumerateDeviceLayerProperties(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const; + template + Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const; + template + void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const; + template + Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPropertiesKHR(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getDisplayPropertiesKHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const; + template + Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlanePropertiesKHR(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getDisplayPlanePropertiesKHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const; + template + Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const; + template + Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const; + template + Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const; + template + Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const; + template + ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const; + template + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const; + template + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ - Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const; + template + Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const; + template + ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const; + template + Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const; + template + ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const; + template + Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const; + template + Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const; + template + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const; + template + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const; + template + Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d = Dispatch() ) const; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_XLIB_KHR - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const; + template + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const; + template + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #ifdef VK_USE_PLATFORM_XCB_KHR - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const; + template + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const; + template + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ - Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const; + template + Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const; + template + ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const; + template + void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const; + template + DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const; + template + void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures2KHR getFeatures2KHR() const; - template - StructureChain getFeatures2KHR() const; + template + PhysicalDeviceFeatures2KHR getFeatures2KHR(Dispatch const &d = Dispatch() ) const; + template + StructureChain getFeatures2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const; + template + void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties2KHR getProperties2KHR() const; - template - StructureChain getProperties2KHR() const; + template + PhysicalDeviceProperties2KHR getProperties2KHR(Dispatch const &d = Dispatch() ) const; + template + StructureChain getProperties2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const; + template + void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties2KHR getFormatProperties2KHR( Format format ) const; + template + FormatProperties2KHR getFormatProperties2KHR( Format format, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const; + template + Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; - template - typename ResultValueType>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; + template + ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const; + template + void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties2KHR(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + std::vector getQueueFamilyProperties2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const; + template + void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const; + template + PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const; + template + void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties ) const; + template + void getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ExternalBufferPropertiesKHR getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR & externalBufferInfo ) const; + template + ExternalBufferPropertiesKHR getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR & externalBufferInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, ExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties ) const; + template + void getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, ExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ExternalSemaphorePropertiesKHR getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR & externalSemaphoreInfo ) const; + template + ExternalSemaphorePropertiesKHR getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR & externalSemaphoreInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, ExternalFencePropertiesKHR* pExternalFenceProperties ) const; + template + void getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, ExternalFencePropertiesKHR* pExternalFenceProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ExternalFencePropertiesKHR getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR & externalFenceInfo ) const; + template + ExternalFencePropertiesKHR getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR & externalFenceInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result releaseDisplayEXT( DisplayKHR display ) const; + template + Result releaseDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const; #else - ResultValueType::type releaseDisplayEXT( DisplayKHR display ) const; + template + ResultValueType::type releaseDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const; + template + Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display ) const; + template + ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const; + template + Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const; + template + ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const; + template + Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const; + template + ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects ) const; + template + Result getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getPresentRectanglesKHX( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getPresentRectanglesKHX( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const; + template + void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MultisamplePropertiesEXT getMultisamplePropertiesEXT( SampleCountFlagBits samples ) const; + template + MultisamplePropertiesEXT getMultisamplePropertiesEXT( SampleCountFlagBits samples, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities ) const; + template + Result getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; - template - typename ResultValueType>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; + template + ResultValueType::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; + template + typename ResultValueType>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats ) const; + template + Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -30260,798 +32943,865 @@ namespace VULKAN_HPP_NAMESPACE static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class DeviceDeleter - { - public: - DeviceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - void operator()( Device device ) - { - device.destroy( m_allocator ); - } - - private: - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties, Dispatch const &d) const { - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); + d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties() const + template + VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties(Dispatch const &d ) const { PhysicalDeviceProperties properties; - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); + d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d) const { - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties(Dispatch const &d ) const { - std::vector queueFamilyProperties( {alloc} ); + std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); return queueFamilyProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d) const { - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const + template + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties(Dispatch const &d ) const { PhysicalDeviceMemoryProperties memoryProperties; - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures, Dispatch const &d) const { - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); + d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures() const + template + VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures(Dispatch const &d ) const { PhysicalDeviceFeatures features; - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); + d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); return features; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( Format format, FormatProperties* pFormatProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( Format format, FormatProperties* pFormatProperties, Dispatch const &d) const { - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format ) const + template + VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format, Dispatch const &d ) const { FormatProperties formatProperties; - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); + return static_cast( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, Dispatch const &d ) const { ImageFormatProperties imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getImageFormatProperties" ); + Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice, Dispatch const &d) const { - return static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); + return static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { Device device; - Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); - return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDevice" ); + Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); + return createResultValue( result, device, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDevice" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) const { - DeviceDeleter deleter( allocator ); - return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + Device device; + Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, device, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDeviceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d) const { - return static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties(Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::enumerateDeviceLayerProperties" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceLayerProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d) const { - return static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::enumerateDeviceExtensionProperties" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceExtensionProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties, Dispatch const &d) const { - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); + d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); + d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); + d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); return properties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR(Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPropertiesKHR" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR(Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlanePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays, Dispatch const &d) const { - return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); + return static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const &d ) const { - std::vector displays( {alloc} ); + std::vector displays; uint32_t displayCount; Result result; do { - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); if ( ( result == Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( displayCount <= displays.size() ); + VULKAN_HPP_ASSERT( displayCount <= displays.size() ); displays.resize( displayCount ); - return createResultValue( result, displays, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + return createResultValue( result, displays, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties, Dispatch const &d) const { - return static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); + return static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; Result result; do { - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayModePropertiesKHR" ); + return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode, Dispatch const &d) const { - return static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); + return static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { DisplayModeKHR mode; - Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &mode ) ) ); - return createResultValue( result, mode, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDisplayModeKHR" ); + Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &mode ) ) ); + return createResultValue( result, mode, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDisplayModeKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d) const { - return static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); + return static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d ) const { DisplayPlaneCapabilitiesKHR capabilities; - Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); - return createResultValue( result, capabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + Result result = static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); + return createResultValue( result, capabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection, Dispatch const &d) const { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); + return d.vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection, Dispatch const &d ) const { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); + return d.vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Dispatch const &d ) const { Bool32 supported; - Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); - return createResultValue( result, supported, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceSupportKHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); + return createResultValue( result, supported, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceSupportKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, Dispatch const &d ) const { SurfaceCapabilitiesKHR surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilitiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, Dispatch const &d ) const { - std::vector surfaceFormats( {alloc} ); + std::vector surfaceFormats; uint32_t surfaceFormatCount; Result result; do { - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); if ( ( result == Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( surfaceFormatCount <= surfaceFormats.size() ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceFormatsKHR" ); + return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormatsKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d ) const { - std::vector presentModes( {alloc} ); + std::vector presentModes; uint32_t presentModeCount; Result result; do { - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); if ( ( result == Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( presentModeCount <= presentModes.size() ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); presentModes.resize( presentModeCount ); - return createResultValue( result, presentModes, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfacePresentModesKHR" ); + return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfacePresentModesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display, Dispatch const &d) const { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); + return d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const &d ) const { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); + return d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d) const + { + return d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + } +#else + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d ) const { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + return d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_XLIB_KHR - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, Dispatch const &d) const { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); + return d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const &d ) const { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); + return d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #ifdef VK_USE_PLATFORM_XCB_KHR - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, Dispatch const &d) const { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); + return d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const + template + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const &d ) const { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); + return d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); + return static_cast( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d ) const { ExternalImageFormatPropertiesNV externalImageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); - return createResultValue( result, externalImageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + Result result = static_cast( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); + return createResultValue( result, externalImageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getExternalImageFormatPropertiesNV" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d) const { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); + d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const + template + VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d ) const { DeviceGeneratedCommandsLimitsNVX limits; - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); + d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); return limits; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures, Dispatch const &d) const { - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); + d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceFeatures2KHR PhysicalDevice::getFeatures2KHR() const + template + VULKAN_HPP_INLINE PhysicalDeviceFeatures2KHR PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const { PhysicalDeviceFeatures2KHR features; - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); + d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return features; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR() const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const { StructureChain structureChain; PhysicalDeviceFeatures2KHR& features = structureChain.template get(); - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); + d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return structureChain; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties, Dispatch const &d) const { - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); + d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceProperties2KHR PhysicalDevice::getProperties2KHR() const + template + VULKAN_HPP_INLINE PhysicalDeviceProperties2KHR PhysicalDevice::getProperties2KHR(Dispatch const &d ) const { PhysicalDeviceProperties2KHR properties; - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); + d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } - template - VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR() const + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR(Dispatch const &d ) const { StructureChain structureChain; PhysicalDeviceProperties2KHR& properties = structureChain.template get(); - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); + d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return structureChain; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties, Dispatch const &d) const { - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE FormatProperties2KHR PhysicalDevice::getFormatProperties2KHR( Format format ) const + template + VULKAN_HPP_INLINE FormatProperties2KHR PhysicalDevice::getFormatProperties2KHR( Format format, Dispatch const &d ) const { FormatProperties2KHR formatProperties; - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); + return static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo, Dispatch const &d ) const { ImageFormatProperties2KHR imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getImageFormatProperties2KHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo, Dispatch const &d ) const { StructureChain structureChain; ImageFormatProperties2KHR& imageFormatProperties = structureChain.template get(); - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, structureChain, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getImageFormatProperties2KHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties, Dispatch const &d) const { - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR(Dispatch const &d ) const { - std::vector queueFamilyProperties( {alloc} ); + std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); return queueFamilyProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties, Dispatch const &d) const { - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2KHR PhysicalDevice::getMemoryProperties2KHR() const + template + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2KHR PhysicalDevice::getMemoryProperties2KHR(Dispatch const &d ) const { PhysicalDeviceMemoryProperties2KHR memoryProperties; - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties, Dispatch const &d) const { - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); + d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Dispatch const &d ) const { - std::vector properties( {alloc} ); + std::vector properties; uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); + d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); + d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); return properties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties, Dispatch const &d) const { - vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalBufferInfo ), reinterpret_cast( pExternalBufferProperties ) ); + d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalBufferInfo ), reinterpret_cast( pExternalBufferProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ExternalBufferPropertiesKHR PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR & externalBufferInfo ) const + template + VULKAN_HPP_INLINE ExternalBufferPropertiesKHR PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR & externalBufferInfo, Dispatch const &d ) const { ExternalBufferPropertiesKHR externalBufferProperties; - vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); + d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); return externalBufferProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, ExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, ExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties, Dispatch const &d) const { - vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalSemaphoreInfo ), reinterpret_cast( pExternalSemaphoreProperties ) ); + d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalSemaphoreInfo ), reinterpret_cast( pExternalSemaphoreProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ExternalSemaphorePropertiesKHR PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR & externalSemaphoreInfo ) const + template + VULKAN_HPP_INLINE ExternalSemaphorePropertiesKHR PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfoKHR & externalSemaphoreInfo, Dispatch const &d ) const { ExternalSemaphorePropertiesKHR externalSemaphoreProperties; - vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); + d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); return externalSemaphoreProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, ExternalFencePropertiesKHR* pExternalFenceProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, ExternalFencePropertiesKHR* pExternalFenceProperties, Dispatch const &d) const { - vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalFenceInfo ), reinterpret_cast( pExternalFenceProperties ) ); + d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast( pExternalFenceInfo ), reinterpret_cast( pExternalFenceProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ExternalFencePropertiesKHR PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR & externalFenceInfo ) const + template + VULKAN_HPP_INLINE ExternalFencePropertiesKHR PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfoKHR & externalFenceInfo, Dispatch const &d ) const { ExternalFencePropertiesKHR externalFenceProperties; - vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); + d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); return externalFenceProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display, Dispatch const &d) const { - return static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + return static_cast( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); } #else - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display, Dispatch const &d ) const { - Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - return createResultValue( result, "VULKAN_HPP_NAMESPACE::PhysicalDevice::releaseDisplayEXT" ); + Result result = static_cast( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::releaseDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display, Dispatch const &d) const { - return static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); + return static_cast( d.vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display, Dispatch const &d ) const { Display dpy; - Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); - return createResultValue( result, dpy, "VULKAN_HPP_NAMESPACE::PhysicalDevice::acquireXlibDisplayEXT" ); + Result result = static_cast( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); + return createResultValue( result, dpy, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::acquireXlibDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay, Dispatch const &d) const { - return static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); + return static_cast( d.vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d ) const { DisplayKHR display; - Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); - return createResultValue( result, display, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getRandROutputDisplayEXT" ); + Result result = static_cast( d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); + return createResultValue( result, display, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getRandROutputDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, Dispatch const &d ) const { SurfaceCapabilities2EXT surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilities2EXT" ); + Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2EXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects, Dispatch const &d) const { - return static_cast( vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), pRectCount, reinterpret_cast( pRects ) ) ); + return static_cast( d.vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), pRectCount, reinterpret_cast( pRects ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface, Dispatch const &d ) const { - std::vector rects( {alloc} ); + std::vector rects; uint32_t rectCount; Result result; do { - result = static_cast( vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); if ( ( result == Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = static_cast( vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( rectCount <= rects.size() ); + VULKAN_HPP_ASSERT( rectCount <= rects.size() ); rects.resize( rectCount ); - return createResultValue( result, rects, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getPresentRectanglesKHX" ); + return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getPresentRectanglesKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const + template + VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d) const { - vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( pMultisampleProperties ) ); + d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( pMultisampleProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples ) const + template + VULKAN_HPP_INLINE MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, Dispatch const &d ) const { MultisamplePropertiesEXT multisampleProperties; - vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); + d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); return multisampleProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( pSurfaceInfo ), reinterpret_cast( pSurfaceCapabilities ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( pSurfaceInfo ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const + template + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const { SurfaceCapabilities2KHR surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilities2KHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" ); } - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const { StructureChain structureChain; SurfaceCapabilities2KHR& surfaceCapabilities = structureChain.template get(); - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, structureChain, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilities2KHR" ); + Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats ) const + template + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d) const { - return static_cast( vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( pSurfaceInfo ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); + return static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( pSurfaceInfo ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const { - std::vector surfaceFormats( {alloc} ); + std::vector surfaceFormats; uint32_t surfaceFormatCount; Result result; do { - result = static_cast( vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( surfaceFormatCount <= surfaceFormats.size() ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceFormats2KHR" ); + return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormats2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct CmdProcessCommandsInfoNVX { CmdProcessCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(), IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(), uint32_t indirectCommandsTokenCount_ = 0, const IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr, uint32_t maxSequencesCount_ = 0, CommandBuffer targetCommandBuffer_ = CommandBuffer(), Buffer sequencesCountBuffer_ = Buffer(), DeviceSize sequencesCountOffset_ = 0, Buffer sequencesIndexBuffer_ = Buffer(), DeviceSize sequencesIndexOffset_ = 0 ) - : sType( StructureType::eCmdProcessCommandsInfoNVX ) - , pNext( nullptr ) - , objectTable( objectTable_ ) + : objectTable( objectTable_ ) , indirectCommandsLayout( indirectCommandsLayout_ ) , indirectCommandsTokenCount( indirectCommandsTokenCount_ ) , pIndirectCommandsTokens( pIndirectCommandsTokens_ ) @@ -31167,10 +33917,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eCmdProcessCommandsInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; ObjectTableNVX objectTable; IndirectCommandsLayoutNVX indirectCommandsLayout; uint32_t indirectCommandsTokenCount; @@ -31206,10 +33956,10 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceGroupPropertiesKHX; public: - void* pNext; + void* pNext = nullptr; uint32_t physicalDeviceCount; PhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE_KHX]; Bool32 subsetAllocation; @@ -31217,10 +33967,12 @@ namespace VULKAN_HPP_NAMESPACE static_assert( sizeof( PhysicalDeviceGroupPropertiesKHX ) == sizeof( VkPhysicalDeviceGroupPropertiesKHX ), "struct and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - class DebugReportCallbackEXTDeleter; - using UniqueDebugReportCallbackEXT = UniqueHandle; - class SurfaceKHRDeleter; - using UniqueSurfaceKHR = UniqueHandle; + class Instance; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueDebugReportCallbackEXT = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueSurfaceKHR = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class Instance @@ -31235,7 +33987,7 @@ namespace VULKAN_HPP_NAMESPACE {} VULKAN_HPP_TYPESAFE_EXPLICIT Instance( VkInstance instance ) - : m_instance( instance ) + : m_instance( instance ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -31267,145 +34019,204 @@ namespace VULKAN_HPP_NAMESPACE return m_instance < rhs.m_instance; } - void destroy( const AllocationCallbacks* pAllocator ) const; + template + void destroy( const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const; + template + void destroy( Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const; + template + Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumeratePhysicalDevices(Allocator const & alloc = Allocator() ) const; + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumeratePhysicalDevices(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - PFN_vkVoidFunction getProcAddr( const char* pName ) const; + template + PFN_vkVoidFunction getProcAddr( const char* pName, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const; + template + PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_ANDROID_KHR - Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ - void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const; + template + void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + void destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const; + template + void destroy( SurfaceKHR surface, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_VI_NN - Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_VI_NN*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_XLIB_KHR - Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #ifdef VK_USE_PLATFORM_XCB_KHR - Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ - Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const; + template + Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const; + template + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const; + template + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const; + template + void destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const; + template + void destroy( DebugReportCallbackEXT callback, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties ) const; + template + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumeratePhysicalDeviceGroupsKHX(Allocator const & alloc = Allocator() ) const; + template + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const &d = Dispatch() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + Result enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties, Dispatch const &d = Dispatch() ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template , typename Dispatch = DispatchLoaderStatic> + typename ResultValueType>::type enumeratePhysicalDeviceGroupsKHX(Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_IOS_MVK - Result createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_IOS_MVK*/ #ifdef VK_USE_PLATFORM_MACOS_MVK - Result createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; + template + Result createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + template + ResultValueType::type createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MACOS_MVK*/ @@ -31433,392 +34244,458 @@ namespace VULKAN_HPP_NAMESPACE static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class DebugReportCallbackEXTDeleter - { - public: - DebugReportCallbackEXTDeleter( Instance instance = Instance(), Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) - {} - - void operator()( DebugReportCallbackEXT debugReportCallbackEXT ) - { - m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); - } - - private: - Instance m_instance; - Optional m_allocator; - }; - - class SurfaceKHRDeleter - { - public: - SurfaceKHRDeleter( Instance instance = Instance(), Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) - {} - - void operator()( SurfaceKHR surfaceKHR ) - { - m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); - } - - private: - Instance m_instance; - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); + d.vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Instance::destroy( Optional allocator ) const + template + VULKAN_HPP_INLINE void Instance::destroy( Optional allocator, Dispatch const &d ) const { - vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const + template + VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices, Dispatch const &d) const { - return static_cast( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); + return static_cast( d.vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices(Dispatch const &d ) const { - std::vector physicalDevices( {alloc} ); + std::vector physicalDevices; uint32_t physicalDeviceCount; Result result; do { - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); if ( ( result == Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( physicalDeviceCount <= physicalDevices.size() ); + VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); physicalDevices.resize( physicalDeviceCount ); - return createResultValue( result, physicalDevices, "VULKAN_HPP_NAMESPACE::Instance::enumeratePhysicalDevices" ); + return createResultValue( result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDevices" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName ) const + template + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName, Dispatch const &d) const { - return vkGetInstanceProcAddr( m_instance, pName ); + return d.vkGetInstanceProcAddr( m_instance, pName ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name ) const + template + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name, Dispatch const &d ) const { - return vkGetInstanceProcAddr( m_instance, name.c_str() ); + return d.vkGetInstanceProcAddr( m_instance, name.c_str() ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_ANDROID_KHR - VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHR" ); + Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createAndroidSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createAndroidSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHR" ); + Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDisplayPlaneSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDisplayPlaneSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - VULKAN_HPP_INLINE Result Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHR" ); + Result result = static_cast( d.vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMirSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMirSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ - VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional allocator, Dispatch const &d ) const + { + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional allocator ) const + template + VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, Optional allocator, Dispatch const &d ) const { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_VI_NN - VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNN" ); + Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createViSurfaceNN" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createViSurfaceNNUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_VI_NN*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHR" ); + Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWaylandSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWaylandSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHR" ); + Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWin32SurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWin32SurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_XLIB_KHR - VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHR" ); + Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXlibSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXlibSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #ifdef VK_USE_PLATFORM_XCB_KHR - VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHR" ); + Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXcbSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXcbSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ - VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const + template + VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback, Dispatch const &d) const { - return static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); + return static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator, Dispatch const &d ) const { DebugReportCallbackEXT callback; - Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); - return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXT" ); + Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); + return createResultValue( result, callback, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugReportCallbackEXT" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator, Dispatch const &d ) const { - DebugReportCallbackEXTDeleter deleter( *this, allocator ); - return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + DebugReportCallbackEXT callback; + Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, callback, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugReportCallbackEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const + template + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d) const + { + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator, Dispatch const &d ) const + { + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + template + VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d) const { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator ) const + template + VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, Optional allocator, Dispatch const &d ) const { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); + d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const + template + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d) const { - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); + d.vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const + template + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const &d ) const { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( layerPrefix.size() == message.size() ); + VULKAN_HPP_ASSERT( layerPrefix.size() == message.size() ); #else if ( layerPrefix.size() != message.size() ) { - throw LogicError( "VULKAN_HPP_NAMESPACE::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); + throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); + d.vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties ) const + template + VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties, Dispatch const &d) const { - return static_cast( vkEnumeratePhysicalDeviceGroupsKHX( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); + return static_cast( d.vkEnumeratePhysicalDeviceGroupsKHX( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroupsKHX(Allocator const & alloc ) const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroupsKHX(Dispatch const &d ) const { - std::vector physicalDeviceGroupProperties( {alloc} ); + std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; Result result; do { - result = static_cast( vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, nullptr ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, nullptr ) ); if ( ( result == Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = static_cast( vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == Result::eIncomplete ); - assert( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - return createResultValue( result, physicalDeviceGroupProperties, "VULKAN_HPP_NAMESPACE::Instance::enumeratePhysicalDeviceGroupsKHX" ); + return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDeviceGroupsKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_IOS_MVK - VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVK" ); + Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createIOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createIOSSurfaceMVK( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createIOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_IOS_MVK*/ #ifdef VK_USE_PLATFORM_MACOS_MVK - VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + template + VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const { - return static_cast( vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + return static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const &d ) const { SurfaceKHR surface; - Result result = static_cast( vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVK" ); + Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMacOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + template + VULKAN_HPP_INLINE ResultValueType::type Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const &d ) const { - SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMacOSSurfaceMVK( createInfo, allocator ), deleter ); + SurfaceKHR surface; + Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + + ObjectDeleter deleter( *this, allocator ); + return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMacOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31827,9 +34704,7 @@ namespace VULKAN_HPP_NAMESPACE struct DeviceGroupDeviceCreateInfoKHX { DeviceGroupDeviceCreateInfoKHX( uint32_t physicalDeviceCount_ = 0, const PhysicalDevice* pPhysicalDevices_ = nullptr ) - : sType( StructureType::eDeviceGroupDeviceCreateInfoKHX ) - , pNext( nullptr ) - , physicalDeviceCount( physicalDeviceCount_ ) + : physicalDeviceCount( physicalDeviceCount_ ) , pPhysicalDevices( pPhysicalDevices_ ) { } @@ -31881,170 +34756,167 @@ namespace VULKAN_HPP_NAMESPACE } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupDeviceCreateInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t physicalDeviceCount; const PhysicalDevice* pPhysicalDevices; }; static_assert( sizeof( DeviceGroupDeviceCreateInfoKHX ) == sizeof( VkDeviceGroupDeviceCreateInfoKHX ), "struct and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - class InstanceDeleter; - using UniqueInstance = UniqueHandle; + + template <> class UniqueHandleTraits {public: using deleter = ObjectDeleter; }; + using UniqueInstance = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ); + template + Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance, Dispatch const &d = Dispatch() ); #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); + template + ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); + template + ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr, Dispatch const &d = Dispatch() ); #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class InstanceDeleter - { - public: - InstanceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - void operator()( Instance instance ) - { - instance.destroy( m_allocator ); - } - - private: - Optional m_allocator; - }; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - - VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ) + template + VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance, Dispatch const &d) { - return static_cast( vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pInstance ) ) ); + return static_cast( d.vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pInstance ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator ) + template + VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) { Instance instance; - Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); - return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstance" ); + Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); + return createResultValue( result, instance, VULKAN_HPP_NAMESPACE_STRING"::createInstance" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) + template + VULKAN_HPP_INLINE ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator, Dispatch const &d ) { - InstanceDeleter deleter( allocator ); - return UniqueInstance( createInstance( createInfo, allocator ), deleter ); + Instance instance; + Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); + + ObjectDeleter deleter( allocator ); + return createResultValue( result, instance, VULKAN_HPP_NAMESPACE_STRING"::createInstanceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; #ifdef VK_USE_PLATFORM_WIN32_KHR - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } - template <> constexpr bool isStructureChainValid() { return true; } + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; + template <> struct isStructureChainValid{ enum { value = true }; }; VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits) { return "(void)"; @@ -32521,6 +35393,16 @@ namespace VULKAN_HPP_NAMESPACE return "{}"; } + VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationConservativeStateCreateFlagBitsEXT) + { + return "(void)"; + } + + VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationConservativeStateCreateFlagsEXT) + { + return "{}"; + } + VULKAN_HPP_INLINE std::string to_string(ImageLayout value) { switch (value) @@ -33380,6 +36262,8 @@ namespace VULKAN_HPP_NAMESPACE case StructureType::ePipelineViewportSwizzleStateCreateInfoNV: return "PipelineViewportSwizzleStateCreateInfoNV"; case StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT: return "PhysicalDeviceDiscardRectanglePropertiesEXT"; case StructureType::ePipelineDiscardRectangleStateCreateInfoEXT: return "PipelineDiscardRectangleStateCreateInfoEXT"; + case StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT: return "PhysicalDeviceConservativeRasterizationPropertiesEXT"; + case StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT: return "PipelineRasterizationConservativeStateCreateInfoEXT"; case StructureType::eHdrMetadataEXT: return "HdrMetadataEXT"; case StructureType::eSharedPresentSurfaceCapabilitiesKHR: return "SharedPresentSurfaceCapabilitiesKHR"; case StructureType::ePhysicalDeviceExternalFenceInfoKHR: return "PhysicalDeviceExternalFenceInfoKHR"; @@ -33430,6 +36314,10 @@ namespace VULKAN_HPP_NAMESPACE case StructureType::eBindImageMemoryInfoKHR: return "BindImageMemoryInfoKHR"; case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT"; case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT"; + case StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT: return "DeviceQueueGlobalPriorityCreateInfoEXT"; + case StructureType::eImportMemoryHostPointerInfoEXT: return "ImportMemoryHostPointerInfoEXT"; + case StructureType::eMemoryHostPointerPropertiesEXT: return "MemoryHostPointerPropertiesEXT"; + case StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT: return "PhysicalDeviceExternalMemoryHostPropertiesEXT"; default: return "invalid"; } } @@ -34475,7 +37363,7 @@ namespace VULKAN_HPP_NAMESPACE case DebugReportObjectTypeEXT::eDisplayModeKhr: return "DisplayModeKhr"; case DebugReportObjectTypeEXT::eObjectTableNvx: return "ObjectTableNvx"; case DebugReportObjectTypeEXT::eIndirectCommandsLayoutNvx: return "IndirectCommandsLayoutNvx"; - case DebugReportObjectTypeEXT::eValidationCache: return "ValidationCache"; + case DebugReportObjectTypeEXT::eValidationCacheExt: return "ValidationCacheExt"; case DebugReportObjectTypeEXT::eDescriptorUpdateTemplateKHR: return "DescriptorUpdateTemplateKHR"; case DebugReportObjectTypeEXT::eSamplerYcbcrConversionKHR: return "SamplerYcbcrConversionKHR"; default: return "invalid"; @@ -34645,6 +37533,9 @@ namespace VULKAN_HPP_NAMESPACE case ExternalMemoryHandleTypeFlagBitsKHR::eD3D11TextureKmt: return "D3D11TextureKmt"; case ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Heap: return "D3D12Heap"; case ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Resource: return "D3D12Resource"; + case ExternalMemoryHandleTypeFlagBitsKHR::eDmaBufEXT: return "DmaBufEXT"; + case ExternalMemoryHandleTypeFlagBitsKHR::eHostAllocationEXT: return "HostAllocationEXT"; + case ExternalMemoryHandleTypeFlagBitsKHR::eHostMappedForeignMemoryEXT: return "HostMappedForeignMemoryEXT"; default: return "invalid"; } } @@ -34660,6 +37551,9 @@ namespace VULKAN_HPP_NAMESPACE if (value & ExternalMemoryHandleTypeFlagBitsKHR::eD3D11TextureKmt) result += "D3D11TextureKmt | "; if (value & ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Heap) result += "D3D12Heap | "; if (value & ExternalMemoryHandleTypeFlagBitsKHR::eD3D12Resource) result += "D3D12Resource | "; + if (value & ExternalMemoryHandleTypeFlagBitsKHR::eDmaBufEXT) result += "DmaBufEXT | "; + if (value & ExternalMemoryHandleTypeFlagBitsKHR::eHostAllocationEXT) result += "HostAllocationEXT | "; + if (value & ExternalMemoryHandleTypeFlagBitsKHR::eHostMappedForeignMemoryEXT) result += "HostMappedForeignMemoryEXT | "; return "{" + result.substr(0, result.size() - 3) + "}"; } @@ -35071,6 +37965,664 @@ namespace VULKAN_HPP_NAMESPACE } } + VULKAN_HPP_INLINE std::string to_string(ShaderInfoTypeAMD value) + { + switch (value) + { + case ShaderInfoTypeAMD::eStatistics: return "Statistics"; + case ShaderInfoTypeAMD::eBinary: return "Binary"; + case ShaderInfoTypeAMD::eDisassembly: return "Disassembly"; + default: return "invalid"; + } + } + + VULKAN_HPP_INLINE std::string to_string(QueueGlobalPriorityEXT value) + { + switch (value) + { + case QueueGlobalPriorityEXT::eLow: return "Low"; + case QueueGlobalPriorityEXT::eMedium: return "Medium"; + case QueueGlobalPriorityEXT::eHigh: return "High"; + case QueueGlobalPriorityEXT::eRealtime: return "Realtime"; + default: return "invalid"; + } + } + + VULKAN_HPP_INLINE std::string to_string(ConservativeRasterizationModeEXT value) + { + switch (value) + { + case ConservativeRasterizationModeEXT::eDisabled: return "Disabled"; + case ConservativeRasterizationModeEXT::eOverestimate: return "Overestimate"; + case ConservativeRasterizationModeEXT::eUnderestimate: return "Underestimate"; + default: return "invalid"; + } + } + + class DispatchLoaderDynamic + { + public: + PFN_vkAcquireNextImage2KHX vkAcquireNextImage2KHX = 0; + PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0; +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0; +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0; + PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0; + PFN_vkAllocateMemory vkAllocateMemory = 0; + PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0; + PFN_vkBindBufferMemory vkBindBufferMemory = 0; + PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0; + PFN_vkBindImageMemory vkBindImageMemory = 0; + PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0; + PFN_vkCmdBeginQuery vkCmdBeginQuery = 0; + PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0; + PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0; + PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0; + PFN_vkCmdBindPipeline vkCmdBindPipeline = 0; + PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0; + PFN_vkCmdBlitImage vkCmdBlitImage = 0; + PFN_vkCmdClearAttachments vkCmdClearAttachments = 0; + PFN_vkCmdClearColorImage vkCmdClearColorImage = 0; + PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0; + PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0; + PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0; + PFN_vkCmdCopyImage vkCmdCopyImage = 0; + PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0; + PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0; + PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0; + PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0; + PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0; + PFN_vkCmdDispatch vkCmdDispatch = 0; + PFN_vkCmdDispatchBaseKHX vkCmdDispatchBaseKHX = 0; + PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0; + PFN_vkCmdDraw vkCmdDraw = 0; + PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0; + PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0; + PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0; + PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0; + PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0; + PFN_vkCmdEndQuery vkCmdEndQuery = 0; + PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0; + PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0; + PFN_vkCmdFillBuffer vkCmdFillBuffer = 0; + PFN_vkCmdNextSubpass vkCmdNextSubpass = 0; + PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0; + PFN_vkCmdProcessCommandsNVX vkCmdProcessCommandsNVX = 0; + PFN_vkCmdPushConstants vkCmdPushConstants = 0; + PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0; + PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0; + PFN_vkCmdReserveSpaceForCommandsNVX vkCmdReserveSpaceForCommandsNVX = 0; + PFN_vkCmdResetEvent vkCmdResetEvent = 0; + PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0; + PFN_vkCmdResolveImage vkCmdResolveImage = 0; + PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0; + PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0; + PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0; + PFN_vkCmdSetDeviceMaskKHX vkCmdSetDeviceMaskKHX = 0; + PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0; + PFN_vkCmdSetEvent vkCmdSetEvent = 0; + PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0; + PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0; + PFN_vkCmdSetScissor vkCmdSetScissor = 0; + PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0; + PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0; + PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0; + PFN_vkCmdSetViewport vkCmdSetViewport = 0; + PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0; + PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0; + PFN_vkCmdWaitEvents vkCmdWaitEvents = 0; + PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0; + PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0; +#ifdef VK_USE_PLATFORM_ANDROID_KHR + PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + PFN_vkCreateBuffer vkCreateBuffer = 0; + PFN_vkCreateBufferView vkCreateBufferView = 0; + PFN_vkCreateCommandPool vkCreateCommandPool = 0; + PFN_vkCreateComputePipelines vkCreateComputePipelines = 0; + PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; + PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0; + PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0; + PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0; + PFN_vkCreateDevice vkCreateDevice = 0; + PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0; + PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0; + PFN_vkCreateEvent vkCreateEvent = 0; + PFN_vkCreateFence vkCreateFence = 0; + PFN_vkCreateFramebuffer vkCreateFramebuffer = 0; + PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0; +#ifdef VK_USE_PLATFORM_IOS_MVK + PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0; +#endif /*VK_USE_PLATFORM_IOS_MVK*/ + PFN_vkCreateImage vkCreateImage = 0; + PFN_vkCreateImageView vkCreateImageView = 0; + PFN_vkCreateIndirectCommandsLayoutNVX vkCreateIndirectCommandsLayoutNVX = 0; + PFN_vkCreateInstance vkCreateInstance = 0; +#ifdef VK_USE_PLATFORM_MACOS_MVK + PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0; +#endif /*VK_USE_PLATFORM_MACOS_MVK*/ +#ifdef VK_USE_PLATFORM_MIR_KHR + PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + PFN_vkCreateObjectTableNVX vkCreateObjectTableNVX = 0; + PFN_vkCreatePipelineCache vkCreatePipelineCache = 0; + PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0; + PFN_vkCreateQueryPool vkCreateQueryPool = 0; + PFN_vkCreateRenderPass vkCreateRenderPass = 0; + PFN_vkCreateSampler vkCreateSampler = 0; + PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0; + PFN_vkCreateSemaphore vkCreateSemaphore = 0; + PFN_vkCreateShaderModule vkCreateShaderModule = 0; + PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0; + PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0; + PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0; +#ifdef VK_USE_PLATFORM_VI_NN + PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0; +#endif /*VK_USE_PLATFORM_VI_NN*/ +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0; +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0; + PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0; + PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0; + PFN_vkDestroyBuffer vkDestroyBuffer = 0; + PFN_vkDestroyBufferView vkDestroyBufferView = 0; + PFN_vkDestroyCommandPool vkDestroyCommandPool = 0; + PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0; + PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0; + PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0; + PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0; + PFN_vkDestroyDevice vkDestroyDevice = 0; + PFN_vkDestroyEvent vkDestroyEvent = 0; + PFN_vkDestroyFence vkDestroyFence = 0; + PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0; + PFN_vkDestroyImage vkDestroyImage = 0; + PFN_vkDestroyImageView vkDestroyImageView = 0; + PFN_vkDestroyIndirectCommandsLayoutNVX vkDestroyIndirectCommandsLayoutNVX = 0; + PFN_vkDestroyInstance vkDestroyInstance = 0; + PFN_vkDestroyObjectTableNVX vkDestroyObjectTableNVX = 0; + PFN_vkDestroyPipeline vkDestroyPipeline = 0; + PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0; + PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0; + PFN_vkDestroyQueryPool vkDestroyQueryPool = 0; + PFN_vkDestroyRenderPass vkDestroyRenderPass = 0; + PFN_vkDestroySampler vkDestroySampler = 0; + PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0; + PFN_vkDestroySemaphore vkDestroySemaphore = 0; + PFN_vkDestroyShaderModule vkDestroyShaderModule = 0; + PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0; + PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0; + PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0; + PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0; + PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0; + PFN_vkEndCommandBuffer vkEndCommandBuffer = 0; + PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0; + PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0; + PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0; + PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0; + PFN_vkEnumeratePhysicalDeviceGroupsKHX vkEnumeratePhysicalDeviceGroupsKHX = 0; + PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0; + PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0; + PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0; + PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0; + PFN_vkFreeMemory vkFreeMemory = 0; + PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0; + PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0; + PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX vkGetDeviceGroupPeerMemoryFeaturesKHX = 0; + PFN_vkGetDeviceGroupPresentCapabilitiesKHX vkGetDeviceGroupPresentCapabilitiesKHX = 0; + PFN_vkGetDeviceGroupSurfacePresentModesKHX vkGetDeviceGroupSurfacePresentModesKHX = 0; + PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0; + PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; + PFN_vkGetDeviceQueue vkGetDeviceQueue = 0; + PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0; + PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0; + PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0; + PFN_vkGetEventStatus vkGetEventStatus = 0; + PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0; + PFN_vkGetFenceStatus vkGetFenceStatus = 0; +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0; + PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0; + PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0; + PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0; + PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0; + PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; + PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0; + PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0; + PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0; +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0; + PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0; + PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0; + PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0; + PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0; + PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0; + PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0; + PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0; + PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0; + PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0; + PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0; + PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = 0; + PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0; + PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0; + PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0; + PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0; +#ifdef VK_USE_PLATFORM_MIR_KHR + PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR = 0; +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0; + PFN_vkGetPhysicalDevicePresentRectanglesKHX vkGetPhysicalDevicePresentRectanglesKHX = 0; + PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0; + PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0; + PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0; + PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0; + PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0; + PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0; + PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0; + PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0; + PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0; + PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0; + PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0; + PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0; + PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0; +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0; +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0; +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0; +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0; + PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0; +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0; +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0; + PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0; + PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0; +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0; + PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0; + PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0; + PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0; + PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0; + PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0; +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0; +#ifdef VK_USE_PLATFORM_WIN32_KHR + PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0; + PFN_vkMapMemory vkMapMemory = 0; + PFN_vkMergePipelineCaches vkMergePipelineCaches = 0; + PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0; + PFN_vkQueueBindSparse vkQueueBindSparse = 0; + PFN_vkQueuePresentKHR vkQueuePresentKHR = 0; + PFN_vkQueueSubmit vkQueueSubmit = 0; + PFN_vkQueueWaitIdle vkQueueWaitIdle = 0; + PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0; + PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0; + PFN_vkRegisterObjectsNVX vkRegisterObjectsNVX = 0; + PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0; + PFN_vkResetCommandBuffer vkResetCommandBuffer = 0; + PFN_vkResetCommandPool vkResetCommandPool = 0; + PFN_vkResetDescriptorPool vkResetDescriptorPool = 0; + PFN_vkResetEvent vkResetEvent = 0; + PFN_vkResetFences vkResetFences = 0; + PFN_vkSetEvent vkSetEvent = 0; + PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0; + PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0; + PFN_vkUnmapMemory vkUnmapMemory = 0; + PFN_vkUnregisterObjectsNVX vkUnregisterObjectsNVX = 0; + PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0; + PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0; + PFN_vkWaitForFences vkWaitForFences = 0; + public: + DispatchLoaderDynamic(Instance instance = Instance(), Device device = Device()) + { + if (instance) + { + init(instance, device); + } + } + + void init(Instance instance, Device device = Device()) + { + vkAcquireNextImage2KHX = PFN_vkAcquireNextImage2KHX(device ? device.getProcAddr( "vkAcquireNextImage2KHX") : instance.getProcAddr( "vkAcquireNextImage2KHX")); + vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR(device ? device.getProcAddr( "vkAcquireNextImageKHR") : instance.getProcAddr( "vkAcquireNextImageKHR")); +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT(device ? device.getProcAddr( "vkAcquireXlibDisplayEXT") : instance.getProcAddr( "vkAcquireXlibDisplayEXT")); +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers(device ? device.getProcAddr( "vkAllocateCommandBuffers") : instance.getProcAddr( "vkAllocateCommandBuffers")); + vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets(device ? device.getProcAddr( "vkAllocateDescriptorSets") : instance.getProcAddr( "vkAllocateDescriptorSets")); + vkAllocateMemory = PFN_vkAllocateMemory(device ? device.getProcAddr( "vkAllocateMemory") : instance.getProcAddr( "vkAllocateMemory")); + vkBeginCommandBuffer = PFN_vkBeginCommandBuffer(device ? device.getProcAddr( "vkBeginCommandBuffer") : instance.getProcAddr( "vkBeginCommandBuffer")); + vkBindBufferMemory = PFN_vkBindBufferMemory(device ? device.getProcAddr( "vkBindBufferMemory") : instance.getProcAddr( "vkBindBufferMemory")); + vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR(device ? device.getProcAddr( "vkBindBufferMemory2KHR") : instance.getProcAddr( "vkBindBufferMemory2KHR")); + vkBindImageMemory = PFN_vkBindImageMemory(device ? device.getProcAddr( "vkBindImageMemory") : instance.getProcAddr( "vkBindImageMemory")); + vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR(device ? device.getProcAddr( "vkBindImageMemory2KHR") : instance.getProcAddr( "vkBindImageMemory2KHR")); + vkCmdBeginQuery = PFN_vkCmdBeginQuery(device ? device.getProcAddr( "vkCmdBeginQuery") : instance.getProcAddr( "vkCmdBeginQuery")); + vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass(device ? device.getProcAddr( "vkCmdBeginRenderPass") : instance.getProcAddr( "vkCmdBeginRenderPass")); + vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets(device ? device.getProcAddr( "vkCmdBindDescriptorSets") : instance.getProcAddr( "vkCmdBindDescriptorSets")); + vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer(device ? device.getProcAddr( "vkCmdBindIndexBuffer") : instance.getProcAddr( "vkCmdBindIndexBuffer")); + vkCmdBindPipeline = PFN_vkCmdBindPipeline(device ? device.getProcAddr( "vkCmdBindPipeline") : instance.getProcAddr( "vkCmdBindPipeline")); + vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers(device ? device.getProcAddr( "vkCmdBindVertexBuffers") : instance.getProcAddr( "vkCmdBindVertexBuffers")); + vkCmdBlitImage = PFN_vkCmdBlitImage(device ? device.getProcAddr( "vkCmdBlitImage") : instance.getProcAddr( "vkCmdBlitImage")); + vkCmdClearAttachments = PFN_vkCmdClearAttachments(device ? device.getProcAddr( "vkCmdClearAttachments") : instance.getProcAddr( "vkCmdClearAttachments")); + vkCmdClearColorImage = PFN_vkCmdClearColorImage(device ? device.getProcAddr( "vkCmdClearColorImage") : instance.getProcAddr( "vkCmdClearColorImage")); + vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage(device ? device.getProcAddr( "vkCmdClearDepthStencilImage") : instance.getProcAddr( "vkCmdClearDepthStencilImage")); + vkCmdCopyBuffer = PFN_vkCmdCopyBuffer(device ? device.getProcAddr( "vkCmdCopyBuffer") : instance.getProcAddr( "vkCmdCopyBuffer")); + vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage(device ? device.getProcAddr( "vkCmdCopyBufferToImage") : instance.getProcAddr( "vkCmdCopyBufferToImage")); + vkCmdCopyImage = PFN_vkCmdCopyImage(device ? device.getProcAddr( "vkCmdCopyImage") : instance.getProcAddr( "vkCmdCopyImage")); + vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer(device ? device.getProcAddr( "vkCmdCopyImageToBuffer") : instance.getProcAddr( "vkCmdCopyImageToBuffer")); + vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults(device ? device.getProcAddr( "vkCmdCopyQueryPoolResults") : instance.getProcAddr( "vkCmdCopyQueryPoolResults")); + vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT(device ? device.getProcAddr( "vkCmdDebugMarkerBeginEXT") : instance.getProcAddr( "vkCmdDebugMarkerBeginEXT")); + vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT(device ? device.getProcAddr( "vkCmdDebugMarkerEndEXT") : instance.getProcAddr( "vkCmdDebugMarkerEndEXT")); + vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT(device ? device.getProcAddr( "vkCmdDebugMarkerInsertEXT") : instance.getProcAddr( "vkCmdDebugMarkerInsertEXT")); + vkCmdDispatch = PFN_vkCmdDispatch(device ? device.getProcAddr( "vkCmdDispatch") : instance.getProcAddr( "vkCmdDispatch")); + vkCmdDispatchBaseKHX = PFN_vkCmdDispatchBaseKHX(device ? device.getProcAddr( "vkCmdDispatchBaseKHX") : instance.getProcAddr( "vkCmdDispatchBaseKHX")); + vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect(device ? device.getProcAddr( "vkCmdDispatchIndirect") : instance.getProcAddr( "vkCmdDispatchIndirect")); + vkCmdDraw = PFN_vkCmdDraw(device ? device.getProcAddr( "vkCmdDraw") : instance.getProcAddr( "vkCmdDraw")); + vkCmdDrawIndexed = PFN_vkCmdDrawIndexed(device ? device.getProcAddr( "vkCmdDrawIndexed") : instance.getProcAddr( "vkCmdDrawIndexed")); + vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect(device ? device.getProcAddr( "vkCmdDrawIndexedIndirect") : instance.getProcAddr( "vkCmdDrawIndexedIndirect")); + vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD(device ? device.getProcAddr( "vkCmdDrawIndexedIndirectCountAMD") : instance.getProcAddr( "vkCmdDrawIndexedIndirectCountAMD")); + vkCmdDrawIndirect = PFN_vkCmdDrawIndirect(device ? device.getProcAddr( "vkCmdDrawIndirect") : instance.getProcAddr( "vkCmdDrawIndirect")); + vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD(device ? device.getProcAddr( "vkCmdDrawIndirectCountAMD") : instance.getProcAddr( "vkCmdDrawIndirectCountAMD")); + vkCmdEndQuery = PFN_vkCmdEndQuery(device ? device.getProcAddr( "vkCmdEndQuery") : instance.getProcAddr( "vkCmdEndQuery")); + vkCmdEndRenderPass = PFN_vkCmdEndRenderPass(device ? device.getProcAddr( "vkCmdEndRenderPass") : instance.getProcAddr( "vkCmdEndRenderPass")); + vkCmdExecuteCommands = PFN_vkCmdExecuteCommands(device ? device.getProcAddr( "vkCmdExecuteCommands") : instance.getProcAddr( "vkCmdExecuteCommands")); + vkCmdFillBuffer = PFN_vkCmdFillBuffer(device ? device.getProcAddr( "vkCmdFillBuffer") : instance.getProcAddr( "vkCmdFillBuffer")); + vkCmdNextSubpass = PFN_vkCmdNextSubpass(device ? device.getProcAddr( "vkCmdNextSubpass") : instance.getProcAddr( "vkCmdNextSubpass")); + vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier(device ? device.getProcAddr( "vkCmdPipelineBarrier") : instance.getProcAddr( "vkCmdPipelineBarrier")); + vkCmdProcessCommandsNVX = PFN_vkCmdProcessCommandsNVX(device ? device.getProcAddr( "vkCmdProcessCommandsNVX") : instance.getProcAddr( "vkCmdProcessCommandsNVX")); + vkCmdPushConstants = PFN_vkCmdPushConstants(device ? device.getProcAddr( "vkCmdPushConstants") : instance.getProcAddr( "vkCmdPushConstants")); + vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR(device ? device.getProcAddr( "vkCmdPushDescriptorSetKHR") : instance.getProcAddr( "vkCmdPushDescriptorSetKHR")); + vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(device ? device.getProcAddr( "vkCmdPushDescriptorSetWithTemplateKHR") : instance.getProcAddr( "vkCmdPushDescriptorSetWithTemplateKHR")); + vkCmdReserveSpaceForCommandsNVX = PFN_vkCmdReserveSpaceForCommandsNVX(device ? device.getProcAddr( "vkCmdReserveSpaceForCommandsNVX") : instance.getProcAddr( "vkCmdReserveSpaceForCommandsNVX")); + vkCmdResetEvent = PFN_vkCmdResetEvent(device ? device.getProcAddr( "vkCmdResetEvent") : instance.getProcAddr( "vkCmdResetEvent")); + vkCmdResetQueryPool = PFN_vkCmdResetQueryPool(device ? device.getProcAddr( "vkCmdResetQueryPool") : instance.getProcAddr( "vkCmdResetQueryPool")); + vkCmdResolveImage = PFN_vkCmdResolveImage(device ? device.getProcAddr( "vkCmdResolveImage") : instance.getProcAddr( "vkCmdResolveImage")); + vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants(device ? device.getProcAddr( "vkCmdSetBlendConstants") : instance.getProcAddr( "vkCmdSetBlendConstants")); + vkCmdSetDepthBias = PFN_vkCmdSetDepthBias(device ? device.getProcAddr( "vkCmdSetDepthBias") : instance.getProcAddr( "vkCmdSetDepthBias")); + vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds(device ? device.getProcAddr( "vkCmdSetDepthBounds") : instance.getProcAddr( "vkCmdSetDepthBounds")); + vkCmdSetDeviceMaskKHX = PFN_vkCmdSetDeviceMaskKHX(device ? device.getProcAddr( "vkCmdSetDeviceMaskKHX") : instance.getProcAddr( "vkCmdSetDeviceMaskKHX")); + vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT(device ? device.getProcAddr( "vkCmdSetDiscardRectangleEXT") : instance.getProcAddr( "vkCmdSetDiscardRectangleEXT")); + vkCmdSetEvent = PFN_vkCmdSetEvent(device ? device.getProcAddr( "vkCmdSetEvent") : instance.getProcAddr( "vkCmdSetEvent")); + vkCmdSetLineWidth = PFN_vkCmdSetLineWidth(device ? device.getProcAddr( "vkCmdSetLineWidth") : instance.getProcAddr( "vkCmdSetLineWidth")); + vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT(device ? device.getProcAddr( "vkCmdSetSampleLocationsEXT") : instance.getProcAddr( "vkCmdSetSampleLocationsEXT")); + vkCmdSetScissor = PFN_vkCmdSetScissor(device ? device.getProcAddr( "vkCmdSetScissor") : instance.getProcAddr( "vkCmdSetScissor")); + vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask(device ? device.getProcAddr( "vkCmdSetStencilCompareMask") : instance.getProcAddr( "vkCmdSetStencilCompareMask")); + vkCmdSetStencilReference = PFN_vkCmdSetStencilReference(device ? device.getProcAddr( "vkCmdSetStencilReference") : instance.getProcAddr( "vkCmdSetStencilReference")); + vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask(device ? device.getProcAddr( "vkCmdSetStencilWriteMask") : instance.getProcAddr( "vkCmdSetStencilWriteMask")); + vkCmdSetViewport = PFN_vkCmdSetViewport(device ? device.getProcAddr( "vkCmdSetViewport") : instance.getProcAddr( "vkCmdSetViewport")); + vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV(device ? device.getProcAddr( "vkCmdSetViewportWScalingNV") : instance.getProcAddr( "vkCmdSetViewportWScalingNV")); + vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer(device ? device.getProcAddr( "vkCmdUpdateBuffer") : instance.getProcAddr( "vkCmdUpdateBuffer")); + vkCmdWaitEvents = PFN_vkCmdWaitEvents(device ? device.getProcAddr( "vkCmdWaitEvents") : instance.getProcAddr( "vkCmdWaitEvents")); + vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD(device ? device.getProcAddr( "vkCmdWriteBufferMarkerAMD") : instance.getProcAddr( "vkCmdWriteBufferMarkerAMD")); + vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp(device ? device.getProcAddr( "vkCmdWriteTimestamp") : instance.getProcAddr( "vkCmdWriteTimestamp")); +#ifdef VK_USE_PLATFORM_ANDROID_KHR + vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR(instance.getProcAddr( "vkCreateAndroidSurfaceKHR")); +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + vkCreateBuffer = PFN_vkCreateBuffer(device ? device.getProcAddr( "vkCreateBuffer") : instance.getProcAddr( "vkCreateBuffer")); + vkCreateBufferView = PFN_vkCreateBufferView(device ? device.getProcAddr( "vkCreateBufferView") : instance.getProcAddr( "vkCreateBufferView")); + vkCreateCommandPool = PFN_vkCreateCommandPool(device ? device.getProcAddr( "vkCreateCommandPool") : instance.getProcAddr( "vkCreateCommandPool")); + vkCreateComputePipelines = PFN_vkCreateComputePipelines(device ? device.getProcAddr( "vkCreateComputePipelines") : instance.getProcAddr( "vkCreateComputePipelines")); + vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT(instance.getProcAddr( "vkCreateDebugReportCallbackEXT")); + vkCreateDescriptorPool = PFN_vkCreateDescriptorPool(device ? device.getProcAddr( "vkCreateDescriptorPool") : instance.getProcAddr( "vkCreateDescriptorPool")); + vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout(device ? device.getProcAddr( "vkCreateDescriptorSetLayout") : instance.getProcAddr( "vkCreateDescriptorSetLayout")); + vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(device ? device.getProcAddr( "vkCreateDescriptorUpdateTemplateKHR") : instance.getProcAddr( "vkCreateDescriptorUpdateTemplateKHR")); + vkCreateDevice = PFN_vkCreateDevice(device ? device.getProcAddr( "vkCreateDevice") : instance.getProcAddr( "vkCreateDevice")); + vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR(device ? device.getProcAddr( "vkCreateDisplayModeKHR") : instance.getProcAddr( "vkCreateDisplayModeKHR")); + vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR(instance.getProcAddr( "vkCreateDisplayPlaneSurfaceKHR")); + vkCreateEvent = PFN_vkCreateEvent(device ? device.getProcAddr( "vkCreateEvent") : instance.getProcAddr( "vkCreateEvent")); + vkCreateFence = PFN_vkCreateFence(device ? device.getProcAddr( "vkCreateFence") : instance.getProcAddr( "vkCreateFence")); + vkCreateFramebuffer = PFN_vkCreateFramebuffer(device ? device.getProcAddr( "vkCreateFramebuffer") : instance.getProcAddr( "vkCreateFramebuffer")); + vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines(device ? device.getProcAddr( "vkCreateGraphicsPipelines") : instance.getProcAddr( "vkCreateGraphicsPipelines")); +#ifdef VK_USE_PLATFORM_IOS_MVK + vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK(instance.getProcAddr( "vkCreateIOSSurfaceMVK")); +#endif /*VK_USE_PLATFORM_IOS_MVK*/ + vkCreateImage = PFN_vkCreateImage(device ? device.getProcAddr( "vkCreateImage") : instance.getProcAddr( "vkCreateImage")); + vkCreateImageView = PFN_vkCreateImageView(device ? device.getProcAddr( "vkCreateImageView") : instance.getProcAddr( "vkCreateImageView")); + vkCreateIndirectCommandsLayoutNVX = PFN_vkCreateIndirectCommandsLayoutNVX(device ? device.getProcAddr( "vkCreateIndirectCommandsLayoutNVX") : instance.getProcAddr( "vkCreateIndirectCommandsLayoutNVX")); + vkCreateInstance = PFN_vkCreateInstance(instance.getProcAddr( "vkCreateInstance")); +#ifdef VK_USE_PLATFORM_MACOS_MVK + vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK(instance.getProcAddr( "vkCreateMacOSSurfaceMVK")); +#endif /*VK_USE_PLATFORM_MACOS_MVK*/ +#ifdef VK_USE_PLATFORM_MIR_KHR + vkCreateMirSurfaceKHR = PFN_vkCreateMirSurfaceKHR(instance.getProcAddr( "vkCreateMirSurfaceKHR")); +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + vkCreateObjectTableNVX = PFN_vkCreateObjectTableNVX(device ? device.getProcAddr( "vkCreateObjectTableNVX") : instance.getProcAddr( "vkCreateObjectTableNVX")); + vkCreatePipelineCache = PFN_vkCreatePipelineCache(device ? device.getProcAddr( "vkCreatePipelineCache") : instance.getProcAddr( "vkCreatePipelineCache")); + vkCreatePipelineLayout = PFN_vkCreatePipelineLayout(device ? device.getProcAddr( "vkCreatePipelineLayout") : instance.getProcAddr( "vkCreatePipelineLayout")); + vkCreateQueryPool = PFN_vkCreateQueryPool(device ? device.getProcAddr( "vkCreateQueryPool") : instance.getProcAddr( "vkCreateQueryPool")); + vkCreateRenderPass = PFN_vkCreateRenderPass(device ? device.getProcAddr( "vkCreateRenderPass") : instance.getProcAddr( "vkCreateRenderPass")); + vkCreateSampler = PFN_vkCreateSampler(device ? device.getProcAddr( "vkCreateSampler") : instance.getProcAddr( "vkCreateSampler")); + vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR(device ? device.getProcAddr( "vkCreateSamplerYcbcrConversionKHR") : instance.getProcAddr( "vkCreateSamplerYcbcrConversionKHR")); + vkCreateSemaphore = PFN_vkCreateSemaphore(device ? device.getProcAddr( "vkCreateSemaphore") : instance.getProcAddr( "vkCreateSemaphore")); + vkCreateShaderModule = PFN_vkCreateShaderModule(device ? device.getProcAddr( "vkCreateShaderModule") : instance.getProcAddr( "vkCreateShaderModule")); + vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR(device ? device.getProcAddr( "vkCreateSharedSwapchainsKHR") : instance.getProcAddr( "vkCreateSharedSwapchainsKHR")); + vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR(device ? device.getProcAddr( "vkCreateSwapchainKHR") : instance.getProcAddr( "vkCreateSwapchainKHR")); + vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT(device ? device.getProcAddr( "vkCreateValidationCacheEXT") : instance.getProcAddr( "vkCreateValidationCacheEXT")); +#ifdef VK_USE_PLATFORM_VI_NN + vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN(instance.getProcAddr( "vkCreateViSurfaceNN")); +#endif /*VK_USE_PLATFORM_VI_NN*/ +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR(instance.getProcAddr( "vkCreateWaylandSurfaceKHR")); +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR(instance.getProcAddr( "vkCreateWin32SurfaceKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR(instance.getProcAddr( "vkCreateXcbSurfaceKHR")); +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR(instance.getProcAddr( "vkCreateXlibSurfaceKHR")); +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT(device ? device.getProcAddr( "vkDebugMarkerSetObjectNameEXT") : instance.getProcAddr( "vkDebugMarkerSetObjectNameEXT")); + vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT(device ? device.getProcAddr( "vkDebugMarkerSetObjectTagEXT") : instance.getProcAddr( "vkDebugMarkerSetObjectTagEXT")); + vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT(instance.getProcAddr( "vkDebugReportMessageEXT")); + vkDestroyBuffer = PFN_vkDestroyBuffer(device ? device.getProcAddr( "vkDestroyBuffer") : instance.getProcAddr( "vkDestroyBuffer")); + vkDestroyBufferView = PFN_vkDestroyBufferView(device ? device.getProcAddr( "vkDestroyBufferView") : instance.getProcAddr( "vkDestroyBufferView")); + vkDestroyCommandPool = PFN_vkDestroyCommandPool(device ? device.getProcAddr( "vkDestroyCommandPool") : instance.getProcAddr( "vkDestroyCommandPool")); + vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT(instance.getProcAddr( "vkDestroyDebugReportCallbackEXT")); + vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool(device ? device.getProcAddr( "vkDestroyDescriptorPool") : instance.getProcAddr( "vkDestroyDescriptorPool")); + vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout(device ? device.getProcAddr( "vkDestroyDescriptorSetLayout") : instance.getProcAddr( "vkDestroyDescriptorSetLayout")); + vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(device ? device.getProcAddr( "vkDestroyDescriptorUpdateTemplateKHR") : instance.getProcAddr( "vkDestroyDescriptorUpdateTemplateKHR")); + vkDestroyDevice = PFN_vkDestroyDevice(device ? device.getProcAddr( "vkDestroyDevice") : instance.getProcAddr( "vkDestroyDevice")); + vkDestroyEvent = PFN_vkDestroyEvent(device ? device.getProcAddr( "vkDestroyEvent") : instance.getProcAddr( "vkDestroyEvent")); + vkDestroyFence = PFN_vkDestroyFence(device ? device.getProcAddr( "vkDestroyFence") : instance.getProcAddr( "vkDestroyFence")); + vkDestroyFramebuffer = PFN_vkDestroyFramebuffer(device ? device.getProcAddr( "vkDestroyFramebuffer") : instance.getProcAddr( "vkDestroyFramebuffer")); + vkDestroyImage = PFN_vkDestroyImage(device ? device.getProcAddr( "vkDestroyImage") : instance.getProcAddr( "vkDestroyImage")); + vkDestroyImageView = PFN_vkDestroyImageView(device ? device.getProcAddr( "vkDestroyImageView") : instance.getProcAddr( "vkDestroyImageView")); + vkDestroyIndirectCommandsLayoutNVX = PFN_vkDestroyIndirectCommandsLayoutNVX(device ? device.getProcAddr( "vkDestroyIndirectCommandsLayoutNVX") : instance.getProcAddr( "vkDestroyIndirectCommandsLayoutNVX")); + vkDestroyInstance = PFN_vkDestroyInstance(instance.getProcAddr( "vkDestroyInstance")); + vkDestroyObjectTableNVX = PFN_vkDestroyObjectTableNVX(device ? device.getProcAddr( "vkDestroyObjectTableNVX") : instance.getProcAddr( "vkDestroyObjectTableNVX")); + vkDestroyPipeline = PFN_vkDestroyPipeline(device ? device.getProcAddr( "vkDestroyPipeline") : instance.getProcAddr( "vkDestroyPipeline")); + vkDestroyPipelineCache = PFN_vkDestroyPipelineCache(device ? device.getProcAddr( "vkDestroyPipelineCache") : instance.getProcAddr( "vkDestroyPipelineCache")); + vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout(device ? device.getProcAddr( "vkDestroyPipelineLayout") : instance.getProcAddr( "vkDestroyPipelineLayout")); + vkDestroyQueryPool = PFN_vkDestroyQueryPool(device ? device.getProcAddr( "vkDestroyQueryPool") : instance.getProcAddr( "vkDestroyQueryPool")); + vkDestroyRenderPass = PFN_vkDestroyRenderPass(device ? device.getProcAddr( "vkDestroyRenderPass") : instance.getProcAddr( "vkDestroyRenderPass")); + vkDestroySampler = PFN_vkDestroySampler(device ? device.getProcAddr( "vkDestroySampler") : instance.getProcAddr( "vkDestroySampler")); + vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR(device ? device.getProcAddr( "vkDestroySamplerYcbcrConversionKHR") : instance.getProcAddr( "vkDestroySamplerYcbcrConversionKHR")); + vkDestroySemaphore = PFN_vkDestroySemaphore(device ? device.getProcAddr( "vkDestroySemaphore") : instance.getProcAddr( "vkDestroySemaphore")); + vkDestroyShaderModule = PFN_vkDestroyShaderModule(device ? device.getProcAddr( "vkDestroyShaderModule") : instance.getProcAddr( "vkDestroyShaderModule")); + vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR(instance.getProcAddr( "vkDestroySurfaceKHR")); + vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR(device ? device.getProcAddr( "vkDestroySwapchainKHR") : instance.getProcAddr( "vkDestroySwapchainKHR")); + vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT(device ? device.getProcAddr( "vkDestroyValidationCacheEXT") : instance.getProcAddr( "vkDestroyValidationCacheEXT")); + vkDeviceWaitIdle = PFN_vkDeviceWaitIdle(device ? device.getProcAddr( "vkDeviceWaitIdle") : instance.getProcAddr( "vkDeviceWaitIdle")); + vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT(device ? device.getProcAddr( "vkDisplayPowerControlEXT") : instance.getProcAddr( "vkDisplayPowerControlEXT")); + vkEndCommandBuffer = PFN_vkEndCommandBuffer(device ? device.getProcAddr( "vkEndCommandBuffer") : instance.getProcAddr( "vkEndCommandBuffer")); + vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(device ? device.getProcAddr( "vkEnumerateDeviceExtensionProperties") : instance.getProcAddr( "vkEnumerateDeviceExtensionProperties")); + vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties(device ? device.getProcAddr( "vkEnumerateDeviceLayerProperties") : instance.getProcAddr( "vkEnumerateDeviceLayerProperties")); + vkEnumerateInstanceExtensionProperties = PFN_vkEnumerateInstanceExtensionProperties(instance.getProcAddr( "vkEnumerateInstanceExtensionProperties")); + vkEnumerateInstanceLayerProperties = PFN_vkEnumerateInstanceLayerProperties(instance.getProcAddr( "vkEnumerateInstanceLayerProperties")); + vkEnumeratePhysicalDeviceGroupsKHX = PFN_vkEnumeratePhysicalDeviceGroupsKHX(instance.getProcAddr( "vkEnumeratePhysicalDeviceGroupsKHX")); + vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices(instance.getProcAddr( "vkEnumeratePhysicalDevices")); + vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges(device ? device.getProcAddr( "vkFlushMappedMemoryRanges") : instance.getProcAddr( "vkFlushMappedMemoryRanges")); + vkFreeCommandBuffers = PFN_vkFreeCommandBuffers(device ? device.getProcAddr( "vkFreeCommandBuffers") : instance.getProcAddr( "vkFreeCommandBuffers")); + vkFreeDescriptorSets = PFN_vkFreeDescriptorSets(device ? device.getProcAddr( "vkFreeDescriptorSets") : instance.getProcAddr( "vkFreeDescriptorSets")); + vkFreeMemory = PFN_vkFreeMemory(device ? device.getProcAddr( "vkFreeMemory") : instance.getProcAddr( "vkFreeMemory")); + vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements(device ? device.getProcAddr( "vkGetBufferMemoryRequirements") : instance.getProcAddr( "vkGetBufferMemoryRequirements")); + vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetBufferMemoryRequirements2KHR") : instance.getProcAddr( "vkGetBufferMemoryRequirements2KHR")); + vkGetDeviceGroupPeerMemoryFeaturesKHX = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX(device ? device.getProcAddr( "vkGetDeviceGroupPeerMemoryFeaturesKHX") : instance.getProcAddr( "vkGetDeviceGroupPeerMemoryFeaturesKHX")); + vkGetDeviceGroupPresentCapabilitiesKHX = PFN_vkGetDeviceGroupPresentCapabilitiesKHX(device ? device.getProcAddr( "vkGetDeviceGroupPresentCapabilitiesKHX") : instance.getProcAddr( "vkGetDeviceGroupPresentCapabilitiesKHX")); + vkGetDeviceGroupSurfacePresentModesKHX = PFN_vkGetDeviceGroupSurfacePresentModesKHX(device ? device.getProcAddr( "vkGetDeviceGroupSurfacePresentModesKHX") : instance.getProcAddr( "vkGetDeviceGroupSurfacePresentModesKHX")); + vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment(device ? device.getProcAddr( "vkGetDeviceMemoryCommitment") : instance.getProcAddr( "vkGetDeviceMemoryCommitment")); + vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr(device ? device.getProcAddr( "vkGetDeviceProcAddr") : instance.getProcAddr( "vkGetDeviceProcAddr")); + vkGetDeviceQueue = PFN_vkGetDeviceQueue(device ? device.getProcAddr( "vkGetDeviceQueue") : instance.getProcAddr( "vkGetDeviceQueue")); + vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR(device ? device.getProcAddr( "vkGetDisplayModePropertiesKHR") : instance.getProcAddr( "vkGetDisplayModePropertiesKHR")); + vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR(device ? device.getProcAddr( "vkGetDisplayPlaneCapabilitiesKHR") : instance.getProcAddr( "vkGetDisplayPlaneCapabilitiesKHR")); + vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(device ? device.getProcAddr( "vkGetDisplayPlaneSupportedDisplaysKHR") : instance.getProcAddr( "vkGetDisplayPlaneSupportedDisplaysKHR")); + vkGetEventStatus = PFN_vkGetEventStatus(device ? device.getProcAddr( "vkGetEventStatus") : instance.getProcAddr( "vkGetEventStatus")); + vkGetFenceFdKHR = PFN_vkGetFenceFdKHR(device ? device.getProcAddr( "vkGetFenceFdKHR") : instance.getProcAddr( "vkGetFenceFdKHR")); + vkGetFenceStatus = PFN_vkGetFenceStatus(device ? device.getProcAddr( "vkGetFenceStatus") : instance.getProcAddr( "vkGetFenceStatus")); +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR(device ? device.getProcAddr( "vkGetFenceWin32HandleKHR") : instance.getProcAddr( "vkGetFenceWin32HandleKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements(device ? device.getProcAddr( "vkGetImageMemoryRequirements") : instance.getProcAddr( "vkGetImageMemoryRequirements")); + vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetImageMemoryRequirements2KHR") : instance.getProcAddr( "vkGetImageMemoryRequirements2KHR")); + vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements(device ? device.getProcAddr( "vkGetImageSparseMemoryRequirements") : instance.getProcAddr( "vkGetImageSparseMemoryRequirements")); + vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetImageSparseMemoryRequirements2KHR") : instance.getProcAddr( "vkGetImageSparseMemoryRequirements2KHR")); + vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout(device ? device.getProcAddr( "vkGetImageSubresourceLayout") : instance.getProcAddr( "vkGetImageSubresourceLayout")); + vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr(instance.getProcAddr( "vkGetInstanceProcAddr")); + vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR(device ? device.getProcAddr( "vkGetMemoryFdKHR") : instance.getProcAddr( "vkGetMemoryFdKHR")); + vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR(device ? device.getProcAddr( "vkGetMemoryFdPropertiesKHR") : instance.getProcAddr( "vkGetMemoryFdPropertiesKHR")); + vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(device ? device.getProcAddr( "vkGetMemoryHostPointerPropertiesEXT") : instance.getProcAddr( "vkGetMemoryHostPointerPropertiesEXT")); +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR(device ? device.getProcAddr( "vkGetMemoryWin32HandleKHR") : instance.getProcAddr( "vkGetMemoryWin32HandleKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV(device ? device.getProcAddr( "vkGetMemoryWin32HandleNV") : instance.getProcAddr( "vkGetMemoryWin32HandleNV")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR(device ? device.getProcAddr( "vkGetMemoryWin32HandlePropertiesKHR") : instance.getProcAddr( "vkGetMemoryWin32HandlePropertiesKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE(device ? device.getProcAddr( "vkGetPastPresentationTimingGOOGLE") : instance.getProcAddr( "vkGetPastPresentationTimingGOOGLE")); + vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceDisplayPlanePropertiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")); + vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceDisplayPropertiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceDisplayPropertiesKHR")); + vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceExternalBufferPropertiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceExternalBufferPropertiesKHR")); + vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceExternalFencePropertiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceExternalFencePropertiesKHR")); + vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(device ? device.getProcAddr( "vkGetPhysicalDeviceExternalImageFormatPropertiesNV") : instance.getProcAddr( "vkGetPhysicalDeviceExternalImageFormatPropertiesNV")); + vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR")); + vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures(device ? device.getProcAddr( "vkGetPhysicalDeviceFeatures") : instance.getProcAddr( "vkGetPhysicalDeviceFeatures")); + vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceFeatures2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceFeatures2KHR")); + vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceFormatProperties") : instance.getProcAddr( "vkGetPhysicalDeviceFormatProperties")); + vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceFormatProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceFormatProperties2KHR")); + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(device ? device.getProcAddr( "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX") : instance.getProcAddr( "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX")); + vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties") : instance.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties")); + vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties2KHR")); + vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceMemoryProperties") : instance.getProcAddr( "vkGetPhysicalDeviceMemoryProperties")); + vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceMemoryProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceMemoryProperties2KHR")); +#ifdef VK_USE_PLATFORM_MIR_KHR + vkGetPhysicalDeviceMirPresentationSupportKHR = PFN_vkGetPhysicalDeviceMirPresentationSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceMirPresentationSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceMirPresentationSupportKHR")); +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(device ? device.getProcAddr( "vkGetPhysicalDeviceMultisamplePropertiesEXT") : instance.getProcAddr( "vkGetPhysicalDeviceMultisamplePropertiesEXT")); + vkGetPhysicalDevicePresentRectanglesKHX = PFN_vkGetPhysicalDevicePresentRectanglesKHX(device ? device.getProcAddr( "vkGetPhysicalDevicePresentRectanglesKHX") : instance.getProcAddr( "vkGetPhysicalDevicePresentRectanglesKHX")); + vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceProperties") : instance.getProcAddr( "vkGetPhysicalDeviceProperties")); + vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceProperties2KHR")); + vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties") : instance.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties")); + vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties2KHR")); + vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties(device ? device.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties") : instance.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties")); + vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties2KHR")); + vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2EXT") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2EXT")); + vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2KHR")); + vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilitiesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")); + vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceFormats2KHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceFormats2KHR")); + vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceFormatsKHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceFormatsKHR")); + vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfacePresentModesKHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfacePresentModesKHR")); + vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceSurfaceSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceSurfaceSupportKHR")); +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceWaylandPresentationSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceWaylandPresentationSupportKHR")); +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceWin32PresentationSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceWin32PresentationSupportKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_XCB_KHR + vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceXcbPresentationSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceXcbPresentationSupportKHR")); +#endif /*VK_USE_PLATFORM_XCB_KHR*/ +#ifdef VK_USE_PLATFORM_XLIB_KHR + vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR(device ? device.getProcAddr( "vkGetPhysicalDeviceXlibPresentationSupportKHR") : instance.getProcAddr( "vkGetPhysicalDeviceXlibPresentationSupportKHR")); +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + vkGetPipelineCacheData = PFN_vkGetPipelineCacheData(device ? device.getProcAddr( "vkGetPipelineCacheData") : instance.getProcAddr( "vkGetPipelineCacheData")); + vkGetQueryPoolResults = PFN_vkGetQueryPoolResults(device ? device.getProcAddr( "vkGetQueryPoolResults") : instance.getProcAddr( "vkGetQueryPoolResults")); +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT(device ? device.getProcAddr( "vkGetRandROutputDisplayEXT") : instance.getProcAddr( "vkGetRandROutputDisplayEXT")); +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE(device ? device.getProcAddr( "vkGetRefreshCycleDurationGOOGLE") : instance.getProcAddr( "vkGetRefreshCycleDurationGOOGLE")); + vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity(device ? device.getProcAddr( "vkGetRenderAreaGranularity") : instance.getProcAddr( "vkGetRenderAreaGranularity")); + vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR(device ? device.getProcAddr( "vkGetSemaphoreFdKHR") : instance.getProcAddr( "vkGetSemaphoreFdKHR")); +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR(device ? device.getProcAddr( "vkGetSemaphoreWin32HandleKHR") : instance.getProcAddr( "vkGetSemaphoreWin32HandleKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD(device ? device.getProcAddr( "vkGetShaderInfoAMD") : instance.getProcAddr( "vkGetShaderInfoAMD")); + vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT(device ? device.getProcAddr( "vkGetSwapchainCounterEXT") : instance.getProcAddr( "vkGetSwapchainCounterEXT")); + vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR(device ? device.getProcAddr( "vkGetSwapchainImagesKHR") : instance.getProcAddr( "vkGetSwapchainImagesKHR")); + vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR(device ? device.getProcAddr( "vkGetSwapchainStatusKHR") : instance.getProcAddr( "vkGetSwapchainStatusKHR")); + vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT(device ? device.getProcAddr( "vkGetValidationCacheDataEXT") : instance.getProcAddr( "vkGetValidationCacheDataEXT")); + vkImportFenceFdKHR = PFN_vkImportFenceFdKHR(device ? device.getProcAddr( "vkImportFenceFdKHR") : instance.getProcAddr( "vkImportFenceFdKHR")); +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR(device ? device.getProcAddr( "vkImportFenceWin32HandleKHR") : instance.getProcAddr( "vkImportFenceWin32HandleKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR(device ? device.getProcAddr( "vkImportSemaphoreFdKHR") : instance.getProcAddr( "vkImportSemaphoreFdKHR")); +#ifdef VK_USE_PLATFORM_WIN32_KHR + vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR(device ? device.getProcAddr( "vkImportSemaphoreWin32HandleKHR") : instance.getProcAddr( "vkImportSemaphoreWin32HandleKHR")); +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges(device ? device.getProcAddr( "vkInvalidateMappedMemoryRanges") : instance.getProcAddr( "vkInvalidateMappedMemoryRanges")); + vkMapMemory = PFN_vkMapMemory(device ? device.getProcAddr( "vkMapMemory") : instance.getProcAddr( "vkMapMemory")); + vkMergePipelineCaches = PFN_vkMergePipelineCaches(device ? device.getProcAddr( "vkMergePipelineCaches") : instance.getProcAddr( "vkMergePipelineCaches")); + vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT(device ? device.getProcAddr( "vkMergeValidationCachesEXT") : instance.getProcAddr( "vkMergeValidationCachesEXT")); + vkQueueBindSparse = PFN_vkQueueBindSparse(device ? device.getProcAddr( "vkQueueBindSparse") : instance.getProcAddr( "vkQueueBindSparse")); + vkQueuePresentKHR = PFN_vkQueuePresentKHR(device ? device.getProcAddr( "vkQueuePresentKHR") : instance.getProcAddr( "vkQueuePresentKHR")); + vkQueueSubmit = PFN_vkQueueSubmit(device ? device.getProcAddr( "vkQueueSubmit") : instance.getProcAddr( "vkQueueSubmit")); + vkQueueWaitIdle = PFN_vkQueueWaitIdle(device ? device.getProcAddr( "vkQueueWaitIdle") : instance.getProcAddr( "vkQueueWaitIdle")); + vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT(device ? device.getProcAddr( "vkRegisterDeviceEventEXT") : instance.getProcAddr( "vkRegisterDeviceEventEXT")); + vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT(device ? device.getProcAddr( "vkRegisterDisplayEventEXT") : instance.getProcAddr( "vkRegisterDisplayEventEXT")); + vkRegisterObjectsNVX = PFN_vkRegisterObjectsNVX(device ? device.getProcAddr( "vkRegisterObjectsNVX") : instance.getProcAddr( "vkRegisterObjectsNVX")); + vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT(device ? device.getProcAddr( "vkReleaseDisplayEXT") : instance.getProcAddr( "vkReleaseDisplayEXT")); + vkResetCommandBuffer = PFN_vkResetCommandBuffer(device ? device.getProcAddr( "vkResetCommandBuffer") : instance.getProcAddr( "vkResetCommandBuffer")); + vkResetCommandPool = PFN_vkResetCommandPool(device ? device.getProcAddr( "vkResetCommandPool") : instance.getProcAddr( "vkResetCommandPool")); + vkResetDescriptorPool = PFN_vkResetDescriptorPool(device ? device.getProcAddr( "vkResetDescriptorPool") : instance.getProcAddr( "vkResetDescriptorPool")); + vkResetEvent = PFN_vkResetEvent(device ? device.getProcAddr( "vkResetEvent") : instance.getProcAddr( "vkResetEvent")); + vkResetFences = PFN_vkResetFences(device ? device.getProcAddr( "vkResetFences") : instance.getProcAddr( "vkResetFences")); + vkSetEvent = PFN_vkSetEvent(device ? device.getProcAddr( "vkSetEvent") : instance.getProcAddr( "vkSetEvent")); + vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT(device ? device.getProcAddr( "vkSetHdrMetadataEXT") : instance.getProcAddr( "vkSetHdrMetadataEXT")); + vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR(device ? device.getProcAddr( "vkTrimCommandPoolKHR") : instance.getProcAddr( "vkTrimCommandPoolKHR")); + vkUnmapMemory = PFN_vkUnmapMemory(device ? device.getProcAddr( "vkUnmapMemory") : instance.getProcAddr( "vkUnmapMemory")); + vkUnregisterObjectsNVX = PFN_vkUnregisterObjectsNVX(device ? device.getProcAddr( "vkUnregisterObjectsNVX") : instance.getProcAddr( "vkUnregisterObjectsNVX")); + vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(device ? device.getProcAddr( "vkUpdateDescriptorSetWithTemplateKHR") : instance.getProcAddr( "vkUpdateDescriptorSetWithTemplateKHR")); + vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets(device ? device.getProcAddr( "vkUpdateDescriptorSets") : instance.getProcAddr( "vkUpdateDescriptorSets")); + vkWaitForFences = PFN_vkWaitForFences(device ? device.getProcAddr( "vkWaitForFences") : instance.getProcAddr( "vkWaitForFences")); + } + }; } // namespace VULKAN_HPP_NAMESPACE #endif diff --git a/sources/third_party/vulkan/src/layers/buffer_validation.cpp b/sources/third_party/vulkan/src/layers/buffer_validation.cpp index 7dd8f839a2fa191fcf84ce0c9dd61d168af0b8af..8bb4fd440a09dc2250cd3b563aecf9f9c0fb38c4 100644 --- a/sources/third_party/vulkan/src/layers/buffer_validation.cpp +++ b/sources/third_party/vulkan/src/layers/buffer_validation.cpp @@ -33,22 +33,10 @@ #include "buffer_validation.h" -// TODO: remove on NDK update (r15 will probably have proper STL impl) -#ifdef __ANDROID__ -namespace std { - -template -std::string to_string(T var) { - std::ostringstream ss; - ss << var; - return ss.str(); -} -} // namespace std -#endif - void SetLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const VkImageLayout &layout) { - if (pCB->imageLayoutMap.find(imgpair) != pCB->imageLayoutMap.end()) { - pCB->imageLayoutMap[imgpair].layout = layout; + auto it = pCB->imageLayoutMap.find(imgpair); + if (it != pCB->imageLayoutMap.end()) { + it->second.layout = layout; } else { assert(imgpair.hasSubresource); IMAGE_CMD_BUF_LAYOUT_NODE node; @@ -65,6 +53,11 @@ void SetLayout(layer_data *device_data, OBJECT *pObject, VkImage image, VkImageS SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_DEPTH_BIT); SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_STENCIL_BIT); SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + SetLayout(device_data, pObject, imgpair, layout, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } } template @@ -79,7 +72,12 @@ void SetLayout(layer_data *device_data, OBJECT *pObject, ImageSubresourcePair im // Set the layout in supplied map void SetLayout(std::unordered_map &imageLayoutMap, ImageSubresourcePair imgpair, VkImageLayout layout) { - imageLayoutMap[imgpair].layout = layout; + auto it = imageLayoutMap.find(imgpair); + if (it != imageLayoutMap.end()) { + it->second.layout = layout; // Update + } else { + imageLayoutMap[imgpair].layout = layout; // Insert + } } bool FindLayoutVerifyNode(layer_data const *device_data, GLOBAL_CB_NODE const *pCB, ImageSubresourcePair imgpair, @@ -146,6 +144,11 @@ bool FindCmdBufLayout(layer_data const *device_data, GLOBAL_CB_NODE const *pCB, FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_DEPTH_BIT); FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_STENCIL_BIT); FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + FindLayoutVerifyNode(device_data, pCB, imgpair, node, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } if (node.layout == VK_IMAGE_LAYOUT_MAX_ENUM) { imgpair = {image, false, VkImageSubresource()}; auto imgsubIt = pCB->imageLayoutMap.find(imgpair); @@ -163,6 +166,11 @@ bool FindGlobalLayout(layer_data *device_data, ImageSubresourcePair imgpair, VkI FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_DEPTH_BIT); FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_STENCIL_BIT); FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + FindLayoutVerifyLayout(device_data, imgpair, layout, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } if (layout == VK_IMAGE_LAYOUT_MAX_ENUM) { imgpair = {imgpair.image, false, VkImageSubresource()}; auto imgsubIt = (*core_validation::GetImageLayoutMap(device_data)).find(imgpair); @@ -206,13 +214,19 @@ bool FindLayout(const std::unordered_map &imageLayoutMap, ImageSubresourcePair imgpair, - VkImageLayout &layout) { +bool FindLayout(layer_data *device_data, const std::unordered_map &imageLayoutMap, + ImageSubresourcePair imgpair, VkImageLayout &layout) { layout = VK_IMAGE_LAYOUT_MAX_ENUM; FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_COLOR_BIT); FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_DEPTH_BIT); FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_STENCIL_BIT); FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + FindLayout(imageLayoutMap, imgpair, layout, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } + // Image+subresource not found, look for image handle w/o subresource if (layout == VK_IMAGE_LAYOUT_MAX_ENUM) { imgpair = {imgpair.image, false, VkImageSubresource()}; auto imgsubIt = imageLayoutMap.find(imgpair); @@ -225,7 +239,13 @@ bool FindLayout(const std::unordered_mapsecond.layout = layout; // Update + } else { + lmap[imgpair].layout = layout; // Insert + } auto &image_subresources = (*core_validation::GetImageSubresourceMap(device_data))[image]; auto subresource = std::find(image_subresources.begin(), image_subresources.end(), imgpair); if (subresource == image_subresources.end()) { @@ -235,12 +255,18 @@ void SetGlobalLayout(layer_data *device_data, ImageSubresourcePair imgpair, cons // Set the layout on the cmdbuf level void SetLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const IMAGE_CMD_BUF_LAYOUT_NODE &node) { - pCB->imageLayoutMap[imgpair] = node; + auto it = pCB->imageLayoutMap.find(imgpair); + if (it != pCB->imageLayoutMap.end()) { + it->second = node; // Update + } else { + pCB->imageLayoutMap[imgpair] = node; // Insert + } } // Set image layout for given VkImageSubresourceRange struct void SetImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *image_state, VkImageSubresourceRange image_subresource_range, const VkImageLayout &layout) { assert(image_state); + cb_node->image_layout_change_count++; // Change the version of this data to force revalidation for (uint32_t level_index = 0; level_index < image_subresource_range.levelCount; ++level_index) { uint32_t level = image_subresource_range.baseMipLevel + level_index; for (uint32_t layer_index = 0; layer_index < image_subresource_range.layerCount; layer_index++) { @@ -288,8 +314,7 @@ bool VerifyFramebufferAndRenderPassLayouts(layer_data *device_data, GLOBAL_CB_NO if (pRenderPassInfo->attachmentCount != framebufferInfo.attachmentCount) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS", - "You cannot start a render pass using a framebuffer " - "with a different number of attachments."); + "You cannot start a render pass using a framebuffer with a different number of attachments."); } for (uint32_t i = 0; i < pRenderPassInfo->attachmentCount; ++i) { const VkImageView &image_view = framebufferInfo.pAttachments[i]; @@ -312,11 +337,9 @@ bool VerifyFramebufferAndRenderPassLayouts(layer_data *device_data, GLOBAL_CB_NO if (initial_layout != VK_IMAGE_LAYOUT_UNDEFINED && initial_layout != node.layout) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS", - "You cannot start a render pass using attachment %u " - "where the render pass initial layout is %s and the previous " - "known layout of the attachment is %s. The layouts must match, or " - "the render pass initial layout for the attachment must be " - "VK_IMAGE_LAYOUT_UNDEFINED", + "You cannot start a render pass using attachment %u where the render pass initial layout is %s " + "and the previous known layout of the attachment is %s. The layouts must match, or the render " + "pass initial layout for the attachment must be VK_IMAGE_LAYOUT_UNDEFINED", i, string_VkImageLayout(initial_layout), string_VkImageLayout(node.layout)); } } @@ -365,13 +388,12 @@ bool ValidateImageAspectLayout(layer_data *device_data, GLOBAL_CB_NODE const *pC if (mem_barrier->oldLayout == VK_IMAGE_LAYOUT_UNDEFINED) { // TODO: Set memory invalid which is in mem_tracker currently } else if (node.layout != mem_barrier->oldLayout) { - skip |= - log_msg(core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, - DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "For image 0x%" PRIxLEAST64 " you cannot transition the layout of aspect %d from %s when current layout is %s.", - HandleToUint64(mem_barrier->image), aspect, string_VkImageLayout(mem_barrier->oldLayout), - string_VkImageLayout(node.layout)); + skip |= log_msg(core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, + DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + "For image 0x%" PRIx64 " you cannot transition the layout of aspect %d from %s when current layout is %s.", + HandleToUint64(mem_barrier->image), aspect, string_VkImageLayout(mem_barrier->oldLayout), + string_VkImageLayout(node.layout)); } return skip; } @@ -399,6 +421,7 @@ void TransitionImageAspectLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, c VkImageSubresource sub = {aspect, level, layer}; IMAGE_CMD_BUF_LAYOUT_NODE node; if (!FindCmdBufLayout(device_data, pCB, mem_barrier->image, sub, node)) { + pCB->image_layout_change_count++; // Change the version of this data to force revalidation SetLayout(device_data, pCB, mem_barrier->image, sub, IMAGE_CMD_BUF_LAYOUT_NODE(mem_barrier->oldLayout, mem_barrier->newLayout)); return; @@ -419,6 +442,10 @@ bool VerifyAspectsPresent(VkImageAspectFlags aspect_mask, VkFormat format) { if ((aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0) { if (!FormatHasStencil(format)) return false; } + if (0 != + (aspect_mask & (VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | VK_IMAGE_ASPECT_PLANE_1_BIT_KHR | VK_IMAGE_ASPECT_PLANE_2_BIT_KHR))) { + if (FormatPlaneCount(format) == 1) return false; + } return true; } @@ -471,8 +498,8 @@ bool ValidateBarrierLayoutToImageUsage(layer_data *device_data, const VkImageMem log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(img_barrier->image), __LINE__, msg_code, "DS", "%s: Image barrier 0x%p %sLayout=%s is not compatible with image 0x%" PRIx64 " usage flags 0x%" PRIx32 ". %s", - func_name, img_barrier, ((new_not_old) ? "new" : "old"), string_VkImageLayout(layout), - HandleToUint64(img_barrier->image), usage_flags, validation_error_map[msg_code]); + func_name, static_cast(img_barrier), ((new_not_old) ? "new" : "old"), + string_VkImageLayout(layout), HandleToUint64(img_barrier->image), usage_flags, validation_error_map[msg_code]); } return skip; } @@ -498,9 +525,9 @@ bool ValidateBarriersToImages(layer_data *device_data, GLOBAL_CB_NODE const *cb_ skip |= log_msg( core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, 0, "DS", - "Attempting to transition shared presentable image 0x%" PRIxLEAST64 + "Attempting to transition shared presentable image 0x%" PRIx64 " from layout %s to layout %s, but image has already been presented and cannot have its layout transitioned.", - reinterpret_cast(img_barrier->image), string_VkImageLayout(img_barrier->oldLayout), + HandleToUint64(img_barrier->image), string_VkImageLayout(img_barrier->oldLayout), string_VkImageLayout(img_barrier->newLayout)); } } @@ -511,15 +538,14 @@ bool ValidateBarriersToImages(layer_data *device_data, GLOBAL_CB_NODE const *cb_ auto const aspect_mask = img_barrier->subresourceRange.aspectMask; auto const ds_mask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; if ((aspect_mask & ds_mask) != (ds_mask)) { - skip |= - log_msg(core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(img_barrier->image), __LINE__, - VALIDATION_ERROR_0a00096e, "DS", - "%s: Image barrier 0x%p references image 0x%" PRIx64 - " of format %s that must have the depth and stencil aspects set, but its " - "aspectMask is 0x%" PRIx32 ". %s", - func_name, img_barrier, HandleToUint64(img_barrier->image), string_VkFormat(image_create_info->format), - aspect_mask, validation_error_map[VALIDATION_ERROR_0a00096e]); + skip |= log_msg( + core_validation::GetReportData(device_data), VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(img_barrier->image), __LINE__, VALIDATION_ERROR_0a00096e, + "DS", + "%s: Image barrier 0x%p references image 0x%" PRIx64 + " of format %s that must have the depth and stencil aspects set, but its aspectMask is 0x%" PRIx32 ". %s", + func_name, static_cast(img_barrier), HandleToUint64(img_barrier->image), + string_VkFormat(image_create_info->format), aspect_mask, validation_error_map[VALIDATION_ERROR_0a00096e]); } } uint32_t level_count = ResolveRemainingLevels(&img_barrier->subresourceRange, image_create_info->mipLevels); @@ -533,6 +559,14 @@ bool ValidateBarriersToImages(layer_data *device_data, GLOBAL_CB_NODE const *cb_ skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, VK_IMAGE_ASPECT_DEPTH_BIT); skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, VK_IMAGE_ASPECT_STENCIL_BIT); skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, + VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, + VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + skip |= ValidateImageAspectLayout(device_data, cb_state, img_barrier, level, layer, + VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } } } } @@ -551,6 +585,14 @@ void TransitionImageLayouts(layer_data *device_data, VkCommandBuffer cmdBuffer, uint32_t level_count = ResolveRemainingLevels(&mem_barrier->subresourceRange, image_create_info->mipLevels); uint32_t layer_count = ResolveRemainingLayers(&mem_barrier->subresourceRange, image_create_info->arrayLayers); + // Special case for 3D images with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR flag bit, where and + // can potentially alias. When recording layout for the entire image, pre-emptively record layouts + // for all (potential) layer sub_resources. + if ((0 != (image_create_info->flags & VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR)) && + (mem_barrier->subresourceRange.baseArrayLayer == 0) && (layer_count == 1)) { + layer_count = image_create_info->extent.depth; // Treat each depth slice as a layer subresource + } + for (uint32_t j = 0; j < level_count; j++) { uint32_t level = mem_barrier->subresourceRange.baseMipLevel + j; for (uint32_t k = 0; k < layer_count; k++) { @@ -559,6 +601,11 @@ void TransitionImageLayouts(layer_data *device_data, VkCommandBuffer cmdBuffer, TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_DEPTH_BIT); TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_STENCIL_BIT); TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_METADATA_BIT); + if (GetDeviceExtensions(device_data)->vk_khr_sampler_ycbcr_conversion) { + TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR); + TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + TransitionImageAspectLayout(device_data, pCB, mem_barrier, level, layer, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR); + } } } } @@ -579,12 +626,11 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n if (node.layout != explicit_layout) { *error = true; // TODO: Improve log message in the next pass - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "%s: Cannot use image 0x%" PRIxLEAST64 - " with specific layout %s that doesn't match the actual current layout %s.", - caller, HandleToUint64(image), string_VkImageLayout(explicit_layout), - string_VkImageLayout(node.layout)); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + "%s: Cannot use image 0x%" PRIx64 " with specific layout %s that doesn't match the actual current layout %s.", + caller, HandleToUint64(image), string_VkImageLayout(explicit_layout), string_VkImageLayout(node.layout)); } } } @@ -596,8 +642,8 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "%s: For optimal performance image 0x%" PRIxLEAST64 " layout should be %s instead of GENERAL.", - caller, HandleToUint64(image), string_VkImageLayout(optimal_layout)); + "%s: For optimal performance image 0x%" PRIx64 " layout should be %s instead of GENERAL.", caller, + HandleToUint64(image), string_VkImageLayout(optimal_layout)); } } else if (GetDeviceExtensions(device_data)->vk_khr_shared_presentable_image) { if (image_state->shared_presentable) { @@ -613,9 +659,9 @@ bool VerifyImageLayout(layer_data const *device_data, GLOBAL_CB_NODE const *cb_n *error = true; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, msg_code, "DS", - "%s: Layout for image 0x%" PRIxLEAST64 " is %s but can only be %s or VK_IMAGE_LAYOUT_GENERAL. %s", - caller, HandleToUint64(image), string_VkImageLayout(explicit_layout), - string_VkImageLayout(optimal_layout), validation_error_map[msg_code]); + "%s: Layout for image 0x%" PRIx64 " is %s but can only be %s or VK_IMAGE_LAYOUT_GENERAL. %s", caller, + HandleToUint64(image), string_VkImageLayout(explicit_layout), string_VkImageLayout(optimal_layout), + validation_error_map[msg_code]); } } return skip; @@ -648,150 +694,197 @@ bool PreCallValidateCreateImage(layer_data *device_data, const VkImageCreateInfo return skip; } + bool optimal_tiling = (VK_IMAGE_TILING_OPTIMAL == pCreateInfo->tiling); + const char *tiling_string = string_VkImageTiling(pCreateInfo->tiling); + const char *format_string = string_VkFormat(pCreateInfo->format); VkFormatProperties properties = GetFormatProperties(device_data, pCreateInfo->format); + VkFormatFeatureFlags features = (optimal_tiling ? properties.optimalTilingFeatures : properties.linearTilingFeatures); - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && (properties.linearTilingFeatures == 0)) { + if (0 == features) { std::stringstream ss; - ss << "vkCreateImage format parameter (" << string_VkFormat(pCreateInfo->format) << ") is an unsupported format"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007a2, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007a2]); - + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ac : VALIDATION_ERROR_09e007a2); + ss << "vkCreateImage format parameter " << format_string << " is an unsupported format"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); return skip; } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && (properties.optimalTilingFeatures == 0)) { + if ((pCreateInfo->usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { std::stringstream ss; - ss << "vkCreateImage format parameter (" << string_VkFormat(pCreateInfo->format) << ") is an unsupported format"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007ac, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007ac]); + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007ae : VALIDATION_ERROR_09e007a4); + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_SAMPLED_BIT is not supported for format " << format_string << " with tiling " + << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); + } - return skip; + if ((pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT) && !(features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) { + std::stringstream ss; + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b0 : VALIDATION_ERROR_09e007a6); + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format " << format_string << " with tiling " + << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); } // TODO: Add checks for EXTENDED_USAGE images to validate images are compatible // For EXTENDED_USAGE images, format can match any image COMPATIBLE with original image if (!GetDeviceExtensions(device_data)->vk_khr_maintenance2 || !(pCreateInfo->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR)) { // Validate that format supports usage as color attachment - if (pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) { - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && - ((properties.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) == 0)) { - std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_OPTIMAL image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_COLOR_ATTACHMENT"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007b2, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007b2]); - } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && - ((properties.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) == 0)) { - std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_LINEAR image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_COLOR_ATTACHMENT"; - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007a8, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007a8]); - } + if ((pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) && + (0 == (features & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))) { + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b2 : VALIDATION_ERROR_09e007a8); + std::stringstream ss; + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_COLOR_ATTACHMENT is not supported for format " << format_string + << " with tiling " << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); } // Validate that format supports usage as depth/stencil attachment - if (pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) { - if ((pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL) && - ((properties.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) == 0)) { + if ((pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) && + (0 == (features & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT))) { + UNIQUE_VALIDATION_ERROR_CODE vuid = (optimal_tiling ? VALIDATION_ERROR_09e007b4 : VALIDATION_ERROR_09e007aa); + std::stringstream ss; + ss << "vkCreateImage: usage bit VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT is not supported for format " << format_string + << " with tiling " << tiling_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[vuid]); + } + } + + if ((pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && (VK_IMAGE_TYPE_2D != pCreateInfo->imageType)) { + std::stringstream ss; + ss << "vkCreateImage: Image type must be VK_IMAGE_TYPE_2D when VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT flag bit is set"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0076a, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0076a]); + } + + const VkPhysicalDeviceLimits *device_limits = &(GetPhysicalDeviceProperties(device_data)->limits); + VkImageFormatProperties format_limits; // Format limits may exceed general device limits + VkResult err = GetImageFormatProperties(device_data, pCreateInfo, &format_limits); + if (VK_SUCCESS != err) { + std::stringstream ss; + ss << "vkCreateImage: The combination of format, type, tiling, usage and flags supplied in the VkImageCreateInfo struct is " + "reported by vkGetPhysicalDeviceImageFormatProperties() as unsupported"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00758, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00758]); + return skip; + } + + if ((VK_IMAGE_TYPE_1D == pCreateInfo->imageType) && + (pCreateInfo->extent.width > std::max(device_limits->maxImageDimension1D, format_limits.maxExtent.width))) { + std::stringstream ss; + ss << "vkCreateImage: 1D image width exceeds maximum supported width for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0076e, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0076e]); + } + + if (VK_IMAGE_TYPE_2D == pCreateInfo->imageType) { + if (0 == (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT)) { + if (pCreateInfo->extent.width > std::max(device_limits->maxImageDimension2D, format_limits.maxExtent.width) || + pCreateInfo->extent.height > std::max(device_limits->maxImageDimension2D, format_limits.maxExtent.height)) { std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_OPTIMAL image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT"; + ss << "vkCreateImage: 2D image extent exceeds maximum supported width or height for format " << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007b4, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007b4]); + VALIDATION_ERROR_09e00770, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00770]); } - if ((pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) && - ((properties.linearTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) == 0)) { + } else { + if (pCreateInfo->extent.width > std::max(device_limits->maxImageDimensionCube, format_limits.maxExtent.width) || + pCreateInfo->extent.height > std::max(device_limits->maxImageDimensionCube, format_limits.maxExtent.height)) { std::stringstream ss; - ss << "vkCreateImage: VkFormat for TILING_LINEAR image (" << string_VkFormat(pCreateInfo->format) - << ") does not support requested Image usage type VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT"; + ss << "vkCreateImage: 2D image extent exceeds maximum supported width or height for cube-compatible images with " + "format " + << format_string; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007aa, "IMAGE", "%s. %s", ss.str().c_str(), - validation_error_map[VALIDATION_ERROR_09e007aa]); + VALIDATION_ERROR_09e00772, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00772]); } } } - VkImageFormatProperties ImageFormatProperties = GetImageFormatProperties( - device_data, pCreateInfo->format, pCreateInfo->imageType, pCreateInfo->tiling, pCreateInfo->usage, pCreateInfo->flags); + if (VK_IMAGE_TYPE_3D == pCreateInfo->imageType) { + if ((pCreateInfo->extent.width > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.width)) || + (pCreateInfo->extent.height > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.height)) || + (pCreateInfo->extent.depth > std::max(device_limits->maxImageDimension3D, format_limits.maxExtent.depth))) { + std::stringstream ss; + ss << "vkCreateImage: 3D image extent exceeds maximum supported width, height, or depth for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00776, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00776]); + } + } - VkDeviceSize imageGranularity = GetPhysicalDeviceProperties(device_data)->limits.bufferImageGranularity; - imageGranularity = imageGranularity == 1 ? 0 : imageGranularity; - // TODO : This is also covering 2918 & 2919. Break out into separate checks - if ((pCreateInfo->extent.width <= 0) || (pCreateInfo->extent.height <= 0) || (pCreateInfo->extent.depth <= 0)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007b8, "Image", - "CreateImage extent is 0 for at least one required dimension for image: " - "Width = %d Height = %d Depth = %d. %s", - pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth, - validation_error_map[VALIDATION_ERROR_09e007b8]); - } - - // TODO: VALIDATION_ERROR_09e00770 VALIDATION_ERROR_09e00772 VALIDATION_ERROR_09e00776 VALIDATION_ERROR_09e0076e - // All these extent-related VUs should be checked here - if ((pCreateInfo->extent.depth > ImageFormatProperties.maxExtent.depth) || - (pCreateInfo->extent.width > ImageFormatProperties.maxExtent.width) || - (pCreateInfo->extent.height > ImageFormatProperties.maxExtent.height)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", - "CreateImage extents exceed allowable limits for format: " - "Width = %d Height = %d Depth = %d: Limits for Width = %d Height = %d Depth = %d for format %s.", - pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth, - ImageFormatProperties.maxExtent.width, ImageFormatProperties.maxExtent.height, - ImageFormatProperties.maxExtent.depth, string_VkFormat(pCreateInfo->format)); + // NOTE: As of 1/30/2018 the spec VU language is as in the commented code below. I believe this is an + // error in the spec, and have submitted Gitlab Vulkan issue #1151 to have it changed to match the + // implementation shown. DJH + // + // if ((pCreateInfo->mipLevels > format_limits.maxMipLevels) && + // (std::max({ pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth }) > + // device_limits->maxImageDimension3D)) { + if (pCreateInfo->mipLevels > format_limits.maxMipLevels) { + std::stringstream ss; + ss << "vkCreateImage: Image mip levels exceed image format maxMipLevels for format " << format_string; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0077e, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0077e]); } - uint64_t totalSize = - ((uint64_t)pCreateInfo->extent.width * (uint64_t)pCreateInfo->extent.height * (uint64_t)pCreateInfo->extent.depth * - (uint64_t)pCreateInfo->arrayLayers * (uint64_t)pCreateInfo->samples * (uint64_t)FormatSize(pCreateInfo->format) + - (uint64_t)imageGranularity) & - ~(uint64_t)imageGranularity; + VkImageUsageFlags attach_flags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; + if ((pCreateInfo->usage & attach_flags) && (pCreateInfo->extent.width > device_limits->maxFramebufferWidth)) { + std::stringstream ss; + ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image width exceeds device " + "maxFramebufferWidth"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00788, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e00788]); + } - if (totalSize > ImageFormatProperties.maxResourceSize) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", - "CreateImage resource size exceeds allowable maximum " - "Image resource size = 0x%" PRIxLEAST64 ", maximum resource size = 0x%" PRIxLEAST64 " ", - totalSize, ImageFormatProperties.maxResourceSize); + if ((pCreateInfo->usage & attach_flags) && (pCreateInfo->extent.height > device_limits->maxFramebufferHeight)) { + std::stringstream ss; + ss << "vkCreateImage: Image usage flags include a frame buffer attachment bit and image height exceeds device " + "maxFramebufferHeight"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0078a, "IMAGE", "%s. %s", ss.str().c_str(), + validation_error_map[VALIDATION_ERROR_09e0078a]); } - // TODO: VALIDATION_ERROR_09e0077e - if (pCreateInfo->mipLevels > ImageFormatProperties.maxMipLevels) { + uint64_t total_size = (uint64_t)pCreateInfo->extent.width * (uint64_t)pCreateInfo->extent.height * + (uint64_t)pCreateInfo->extent.depth * (uint64_t)pCreateInfo->arrayLayers * + (uint64_t)pCreateInfo->samples * (uint64_t)FormatSize(pCreateInfo->format); + + // Round up to imageGranularity boundary + VkDeviceSize imageGranularity = GetPhysicalDeviceProperties(device_data)->limits.bufferImageGranularity; + uint64_t ig_mask = imageGranularity - 1; + total_size = (total_size + ig_mask) & ~ig_mask; + + if (total_size > format_limits.maxResourceSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, IMAGE_INVALID_FORMAT_LIMITS_VIOLATION, "Image", - "CreateImage mipLevels=%d exceeds allowable maximum supported by format of %d", pCreateInfo->mipLevels, - ImageFormatProperties.maxMipLevels); + "CreateImage resource size exceeds allowable maximum Image resource size = 0x%" PRIxLEAST64 + ", maximum resource size = 0x%" PRIxLEAST64 " ", + total_size, format_limits.maxResourceSize); } - if (pCreateInfo->arrayLayers > ImageFormatProperties.maxArrayLayers) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - VALIDATION_ERROR_09e00780, "Image", - "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d. %s", pCreateInfo->arrayLayers, - ImageFormatProperties.maxArrayLayers, validation_error_map[VALIDATION_ERROR_09e00780]); + if (pCreateInfo->arrayLayers > format_limits.maxArrayLayers) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00780, "Image", + "CreateImage arrayLayers=%d exceeds allowable maximum supported by format of %d. %s", + pCreateInfo->arrayLayers, format_limits.maxArrayLayers, validation_error_map[VALIDATION_ERROR_09e00780]); } - if ((pCreateInfo->samples & ImageFormatProperties.sampleCounts) == 0) { + if ((pCreateInfo->samples & format_limits.sampleCounts) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, VALIDATION_ERROR_09e0078e, "Image", "CreateImage samples %s is not supported by format 0x%.8X. %s", - string_VkSampleCountFlagBits(pCreateInfo->samples), ImageFormatProperties.sampleCounts, + string_VkSampleCountFlagBits(pCreateInfo->samples), format_limits.sampleCounts, validation_error_map[VALIDATION_ERROR_09e0078e]); } - if (pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_UNDEFINED && pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_PREINITIALIZED) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, 0, __LINE__, - VALIDATION_ERROR_09e0b801, "Image", - "vkCreateImage parameter, pCreateInfo->initialLayout, must be VK_IMAGE_LAYOUT_UNDEFINED or " - "VK_IMAGE_LAYOUT_PREINITIALIZED. %s", - validation_error_map[VALIDATION_ERROR_09e0b801]); - } - if ((pCreateInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) && (!GetEnabledFeatures(device_data)->sparseBinding)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00792, "DS", @@ -971,9 +1064,8 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM } skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image_state->image), __LINE__, error_code, "DS", - "%s: Layout for cleared image is %s but can only be " - "TRANSFER_DST_OPTIMAL or GENERAL. %s", - func_name, string_VkImageLayout(dest_image_layout), validation_error_map[error_code]); + "%s: Layout for cleared image is %s but can only be TRANSFER_DST_OPTIMAL or GENERAL. %s", func_name, + string_VkImageLayout(dest_image_layout), validation_error_map[error_code]); } } @@ -993,8 +1085,7 @@ bool VerifyClearImageLayout(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IM } skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, error_code, "DS", - "%s: Cannot clear an image whose layout is %s and " - "doesn't match the current layout %s. %s", + "%s: Cannot clear an image whose layout is %s and doesn't match the current layout %s. %s", func_name, string_VkImageLayout(dest_image_layout), string_VkImageLayout(node.layout), validation_error_map[error_code]); } @@ -1088,8 +1179,8 @@ bool PreCallValidateCmdClearDepthStencilImage(layer_data *device_data, VkCommand if (((pRanges[i].aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) != VK_IMAGE_ASPECT_DEPTH_BIT) && ((pRanges[i].aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) != VK_IMAGE_ASPECT_STENCIL_BIT)) { char const str[] = - "vkCmdClearDepthStencilImage aspectMasks for all subresource ranges must be " - "set to VK_IMAGE_ASPECT_DEPTH_BIT and/or VK_IMAGE_ASPECT_STENCIL_BIT"; + "vkCmdClearDepthStencilImage aspectMasks for all subresource ranges must be set to VK_IMAGE_ASPECT_DEPTH_BIT " + "and/or VK_IMAGE_ASPECT_STENCIL_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", str); } @@ -1100,6 +1191,26 @@ bool PreCallValidateCmdClearDepthStencilImage(layer_data *device_data, VkCommand HandleToUint64(image), __LINE__, VALIDATION_ERROR_18a0001c, "IMAGE", "%s. %s", str, validation_error_map[VALIDATION_ERROR_18a0001c]); } + if (VK_IMAGE_USAGE_TRANSFER_DST_BIT != (VK_IMAGE_USAGE_TRANSFER_DST_BIT & image_state->createInfo.usage)) { + char const str[] = + "vkCmdClearDepthStencilImage() called with an image that was not created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT " + "set."; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image), __LINE__, VALIDATION_ERROR_18a00012, "IMAGE", "%s. %s", str, + validation_error_map[VALIDATION_ERROR_18a00012]); + } + VkFormatProperties props = GetFormatProperties(device_data, image_state->createInfo.format); + VkImageTiling tiling = image_state->createInfo.tiling; + VkFormatFeatureFlags flags = (tiling == VK_IMAGE_TILING_LINEAR ? props.linearTilingFeatures : props.optimalTilingFeatures); + if ((GetDeviceExtensions(device_data)->vk_khr_maintenance1) && + (VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR != (flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR))) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image), __LINE__, VALIDATION_ERROR_18a00010, "IMAGE", + "vkCmdClearDepthStencilImage() called with an image of format %s and tiling %s that does not support " + "VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR. %s", + string_VkFormat(image_state->createInfo.format), string_VkImageTiling(image_state->createInfo.tiling), + validation_error_map[VALIDATION_ERROR_18a00010]); + } } return skip; } @@ -1173,6 +1284,24 @@ static inline bool IsExtentEqual(const VkExtent3D *extent, const VkExtent3D *oth return result; } +// For image copies between compressed/uncompressed formats, the extent is provided in source image texels +// Destination image texel extents must be adjusted by block size for the dest validation checks +VkExtent3D GetAdjustedDestImageExtent(VkFormat src_format, VkFormat dst_format, VkExtent3D extent) { + VkExtent3D adjusted_extent = extent; + if ((FormatIsCompressed(src_format) && (!FormatIsCompressed(dst_format)))) { + VkExtent3D block_size = FormatCompressedTexelBlockExtent(src_format); + adjusted_extent.width /= block_size.width; + adjusted_extent.height /= block_size.height; + adjusted_extent.depth /= block_size.depth; + } else if ((!FormatIsCompressed(src_format) && (FormatIsCompressed(dst_format)))) { + VkExtent3D block_size = FormatCompressedTexelBlockExtent(dst_format); + adjusted_extent.width *= block_size.width; + adjusted_extent.height *= block_size.height; + adjusted_extent.depth *= block_size.depth; + } + return adjusted_extent; +} + // Returns the effective extent of an image subresource, adjusted for mip level and array depth. static inline VkExtent3D GetImageSubresourceExtent(const IMAGE_STATE *img, const VkImageSubresourceLayers *subresource) { const uint32_t mip = subresource->mipLevel; @@ -1247,8 +1376,8 @@ static inline bool CheckItgOffset(layer_data *device_data, const GLOBAL_CB_NODE if (IsExtentAllZeroes(&offset_extent) == false) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", - "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) must be (x=0, y=0, z=0) " - "when the command buffer's queue family image transfer granularity is (w=0, h=0, d=0).", + "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) must be (x=0, y=0, z=0) when the command buffer's queue family " + "image transfer granularity is (w=0, h=0, d=0).", function, i, member, offset->x, offset->y, offset->z); } } else { @@ -1257,8 +1386,8 @@ static inline bool CheckItgOffset(layer_data *device_data, const GLOBAL_CB_NODE if (IsExtentAligned(&offset_extent, granularity) == false) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", - "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) dimensions must be even integer " - "multiples of this command buffer's queue family image transfer granularity (w=%d, h=%d, d=%d).", + "%s: pRegion[%d].%s (x=%d, y=%d, z=%d) dimensions must be even integer multiples of this command " + "buffer's queue family image transfer granularity (w=%d, h=%d, d=%d).", function, i, member, offset->x, offset->y, offset->z, granularity->width, granularity->height, granularity->depth); } @@ -1312,53 +1441,20 @@ static inline bool CheckItgExtent(layer_data *device_data, const GLOBAL_CB_NODE assert(false); } if (!(x_ok && y_ok && z_ok)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", - "%s: pRegion[%d].%s (w=%d, h=%d, d=%d) dimensions must be even integer multiples of this command buffer's " - "queue family image transfer granularity (w=%d, h=%d, d=%d) or offset (x=%d, y=%d, z=%d) + " - "extent (w=%d, h=%d, d=%d) must match the image subresource extents (w=%d, h=%d, d=%d).", - function, i, member, extent->width, extent->height, extent->depth, granularity->width, granularity->height, - granularity->depth, offset->x, offset->y, offset->z, extent->width, extent->height, extent->depth, - subresource_extent->width, subresource_extent->height, subresource_extent->depth); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", + "%s: pRegion[%d].%s (w=%d, h=%d, d=%d) dimensions must be even integer multiples of this command " + "buffer's queue family image transfer granularity (w=%d, h=%d, d=%d) or offset (x=%d, y=%d, z=%d) + " + "extent (w=%d, h=%d, d=%d) must match the image subresource extents (w=%d, h=%d, d=%d).", + function, i, member, extent->width, extent->height, extent->depth, granularity->width, + granularity->height, granularity->depth, offset->x, offset->y, offset->z, extent->width, extent->height, + extent->depth, subresource_extent->width, subresource_extent->height, subresource_extent->depth); } } return skip; } -// Check a uint32_t width or stride value against a queue family's Image Transfer Granularity width value -static inline bool CheckItgInt(layer_data *device_data, const GLOBAL_CB_NODE *cb_node, const uint32_t value, - const uint32_t granularity, const uint32_t i, const char *function, const char *member) { - const debug_report_data *report_data = core_validation::GetReportData(device_data); - - bool skip = false; - if (SafeModulo(value, granularity) != 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", - "%s: pRegion[%d].%s (%d) must be an even integer multiple of this command buffer's queue family image " - "transfer granularity width (%d).", - function, i, member, value, granularity); - } - return skip; -} - -// Check a VkDeviceSize value against a queue family's Image Transfer Granularity width value -static inline bool CheckItgSize(layer_data *device_data, const GLOBAL_CB_NODE *cb_node, const VkDeviceSize value, - const uint32_t granularity, const uint32_t i, const char *function, const char *member) { - const debug_report_data *report_data = core_validation::GetReportData(device_data); - bool skip = false; - if (SafeModulo(value, granularity) != 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_IMAGE_TRANSFER_GRANULARITY, "DS", - "%s: pRegion[%d].%s (%" PRIdLEAST64 - ") must be an even integer multiple of this command buffer's queue family image transfer " - "granularity width (%d).", - function, i, member, value, granularity); - } - return skip; -} - -// Check valid usage Image Tranfer Granularity requirements for elements of a VkBufferImageCopy structure +// Check valid usage Image Transfer Granularity requirements for elements of a VkBufferImageCopy structure bool ValidateCopyBufferImageTransferGranularityRequirements(layer_data *device_data, const GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *img, const VkBufferImageCopy *region, const uint32_t i, const char *function) { @@ -1378,9 +1474,6 @@ bool ValidateCopyBufferImageTransferGranularityRequirements(layer_data *device_d // must equal the image subresource depth } else { VkExtent3D granularity = GetScaledItg(device_data, cb_node, img); - skip |= CheckItgSize(device_data, cb_node, region->bufferOffset, granularity.width, i, function, "bufferOffset"); - skip |= CheckItgInt(device_data, cb_node, region->bufferRowLength, granularity.width, i, function, "bufferRowLength"); - skip |= CheckItgInt(device_data, cb_node, region->bufferImageHeight, granularity.width, i, function, "bufferImageHeight"); skip |= CheckItgOffset(device_data, cb_node, ®ion->imageOffset, &granularity, i, function, "imageOffset"); VkExtent3D subresource_extent = GetImageSubresourceExtent(img, ®ion->imageSubresource); skip |= CheckItgExtent(device_data, cb_node, ®ion->imageExtent, ®ion->imageOffset, &granularity, &subresource_extent, @@ -1389,21 +1482,27 @@ bool ValidateCopyBufferImageTransferGranularityRequirements(layer_data *device_d return skip; } -// Check valid usage Image Tranfer Granularity requirements for elements of a VkImageCopy structure +// Check valid usage Image Transfer Granularity requirements for elements of a VkImageCopy structure bool ValidateCopyImageTransferGranularityRequirements(layer_data *device_data, const GLOBAL_CB_NODE *cb_node, const IMAGE_STATE *src_img, const IMAGE_STATE *dst_img, const VkImageCopy *region, const uint32_t i, const char *function) { bool skip = false; + // Source image checks VkExtent3D granularity = GetScaledItg(device_data, cb_node, src_img); skip |= CheckItgOffset(device_data, cb_node, ®ion->srcOffset, &granularity, i, function, "srcOffset"); VkExtent3D subresource_extent = GetImageSubresourceExtent(src_img, ®ion->srcSubresource); - skip |= CheckItgExtent(device_data, cb_node, ®ion->extent, ®ion->srcOffset, &granularity, &subresource_extent, + const VkExtent3D extent = region->extent; + skip |= CheckItgExtent(device_data, cb_node, &extent, ®ion->srcOffset, &granularity, &subresource_extent, src_img->createInfo.imageType, i, function, "extent"); + // Destination image checks granularity = GetScaledItg(device_data, cb_node, dst_img); skip |= CheckItgOffset(device_data, cb_node, ®ion->dstOffset, &granularity, i, function, "dstOffset"); + // Adjust dest extent, if necessary + const VkExtent3D dest_effective_extent = + GetAdjustedDestImageExtent(src_img->createInfo.format, dst_img->createInfo.format, extent); subresource_extent = GetImageSubresourceExtent(dst_img, ®ion->dstSubresource); - skip |= CheckItgExtent(device_data, cb_node, ®ion->extent, ®ion->dstOffset, &granularity, &subresource_extent, + skip |= CheckItgExtent(device_data, cb_node, &dest_effective_extent, ®ion->dstOffset, &granularity, &subresource_extent, dst_img->createInfo.imageType, i, function, "extent"); return skip; } @@ -1414,134 +1513,124 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat bool skip = false; for (uint32_t i = 0; i < regionCount; i++) { - VkImageCopy image_copy = ic_regions[i]; + const VkImageCopy region = ic_regions[i]; + + // For comp<->uncomp copies, the copy extent for the dest image must be adjusted + const VkExtent3D src_copy_extent = region.extent; + const VkExtent3D dst_copy_extent = + GetAdjustedDestImageExtent(src_state->createInfo.format, dst_state->createInfo.format, region.extent); + bool slice_override = false; uint32_t depth_slices = 0; // Special case for copying between a 1D/2D array and a 3D image // TBD: This seems like the only way to reconcile 3 mutually-exclusive VU checks for 2D/3D copies. Heads up. if ((VK_IMAGE_TYPE_3D == src_state->createInfo.imageType) && (VK_IMAGE_TYPE_3D != dst_state->createInfo.imageType)) { - depth_slices = image_copy.dstSubresource.layerCount; // Slice count from 2D subresource + depth_slices = region.dstSubresource.layerCount; // Slice count from 2D subresource slice_override = (depth_slices != 1); } else if ((VK_IMAGE_TYPE_3D == dst_state->createInfo.imageType) && (VK_IMAGE_TYPE_3D != src_state->createInfo.imageType)) { - depth_slices = image_copy.srcSubresource.layerCount; // Slice count from 2D subresource + depth_slices = region.srcSubresource.layerCount; // Slice count from 2D subresource slice_override = (depth_slices != 1); } // Do all checks on source image // if (src_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { - if ((0 != image_copy.srcOffset.y) || (1 != image_copy.extent.height)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c00124, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] srcOffset.y is %d and extent.height is %d. For 1D images these must " - "be 0 and 1, respectively. %s", - i, image_copy.srcOffset.y, image_copy.extent.height, validation_error_map[VALIDATION_ERROR_09c00124]); + if ((0 != region.srcOffset.y) || (1 != src_copy_extent.height)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c00124, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] srcOffset.y is %d and extent.height is %d. For 1D images these must " + "be 0 and 1, respectively. %s", + i, region.srcOffset.y, src_copy_extent.height, validation_error_map[VALIDATION_ERROR_09c00124]); } } if ((src_state->createInfo.imageType == VK_IMAGE_TYPE_1D) || (src_state->createInfo.imageType == VK_IMAGE_TYPE_2D)) { - if ((0 != image_copy.srcOffset.z) || (1 != image_copy.extent.depth)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c00128, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] srcOffset.z is %d and extent.depth is %d. For 1D and 2D images " - "these must be 0 and 1, respectively. %s", - i, image_copy.srcOffset.z, image_copy.extent.depth, validation_error_map[VALIDATION_ERROR_09c00128]); + if ((0 != region.srcOffset.z) || (1 != src_copy_extent.depth)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c00128, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] srcOffset.z is %d and extent.depth is %d. For 1D and 2D images " + "these must be 0 and 1, respectively. %s", + i, region.srcOffset.z, src_copy_extent.depth, validation_error_map[VALIDATION_ERROR_09c00128]); } } // VU01199 changed with mnt1 if (GetDeviceExtensions(device_data)->vk_khr_maintenance1) { if (src_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { - if ((0 != image_copy.srcSubresource.baseArrayLayer) || (1 != image_copy.srcSubresource.layerCount)) { + if ((0 != region.srcSubresource.baseArrayLayer) || (1 != region.srcSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer is %d and srcSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively. %s", - i, image_copy.srcSubresource.baseArrayLayer, image_copy.srcSubresource.layerCount, + i, region.srcSubresource.baseArrayLayer, region.srcSubresource.layerCount, validation_error_map[VALIDATION_ERROR_09c0011a]); } } } else { // Pre maint 1 if (src_state->createInfo.imageType == VK_IMAGE_TYPE_3D || dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { - if ((0 != image_copy.srcSubresource.baseArrayLayer) || (1 != image_copy.srcSubresource.layerCount)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer is %d and " - "srcSubresource.layerCount is %d. For copies with either source or dest of type " - "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively. %s", - i, image_copy.srcSubresource.baseArrayLayer, image_copy.srcSubresource.layerCount, - validation_error_map[VALIDATION_ERROR_09c0011a]); + if ((0 != region.srcSubresource.baseArrayLayer) || (1 != region.srcSubresource.layerCount)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer is %d and " + "srcSubresource.layerCount is %d. For copies with either source or dest of type " + "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively. %s", + i, region.srcSubresource.baseArrayLayer, region.srcSubresource.layerCount, + validation_error_map[VALIDATION_ERROR_09c0011a]); } } } - // TODO: this VU is redundant with VU01224. Gitlab issue 812 submitted to get it removed from the spec. - if ((image_copy.srcSubresource.baseArrayLayer >= src_state->createInfo.arrayLayers) || - (image_copy.srcSubresource.baseArrayLayer + image_copy.srcSubresource.layerCount > src_state->createInfo.arrayLayers)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0012a, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] srcSubresource.baseArrayLayer (%d) must be less than the source image's " - "arrayLayers (%d), and the sum of baseArrayLayer and srcSubresource.layerCount (%d) must be less than " - "or equal to the source image's arrayLayers. %s", - i, image_copy.srcSubresource.baseArrayLayer, src_state->createInfo.arrayLayers, - image_copy.srcSubresource.layerCount, validation_error_map[VALIDATION_ERROR_09c0012a]); - } - // Checks that apply only to compressed images if (FormatIsCompressed(src_state->createInfo.format)) { - VkExtent3D block_size = FormatCompressedTexelBlockExtent(src_state->createInfo.format); + const VkExtent3D block_size = FormatCompressedTexelBlockExtent(src_state->createInfo.format); // image offsets must be multiples of block dimensions - if ((SafeModulo(image_copy.srcOffset.x, block_size.width) != 0) || - (SafeModulo(image_copy.srcOffset.y, block_size.height) != 0) || - (SafeModulo(image_copy.srcOffset.z, block_size.depth) != 0)) { + if ((SafeModulo(region.srcOffset.x, block_size.width) != 0) || + (SafeModulo(region.srcOffset.y, block_size.height) != 0) || + (SafeModulo(region.srcOffset.z, block_size.depth) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0013a, "IMAGE", + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c0013a, "IMAGE", "vkCmdCopyImage(): pRegion[%d] srcOffset (%d, %d) must be multiples of the compressed image's " "texel width & height (%d, %d). %s.", - i, image_copy.srcOffset.x, image_copy.srcOffset.y, block_size.width, block_size.height, + i, region.srcOffset.x, region.srcOffset.y, block_size.width, block_size.height, validation_error_map[VALIDATION_ERROR_09c0013a]); } - // extent width must be a multiple of block width, or extent+offset width must equal subresource width - VkExtent3D mip_extent = GetImageSubresourceExtent(src_state, &(image_copy.srcSubresource)); - if ((SafeModulo(image_copy.extent.width, block_size.width) != 0) && - (image_copy.extent.width + image_copy.srcOffset.x != mip_extent.width)) { + const VkExtent3D mip_extent = GetImageSubresourceExtent(src_state, &(region.srcSubresource)); + if ((SafeModulo(src_copy_extent.width, block_size.width) != 0) && + (src_copy_extent.width + region.srcOffset.x != mip_extent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0013c, "IMAGE", + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c0013c, "IMAGE", "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " "width (%d), or when added to srcOffset.x (%d) must equal the image subresource width (%d). %s.", - i, image_copy.extent.width, block_size.width, image_copy.srcOffset.x, mip_extent.width, + i, src_copy_extent.width, block_size.width, region.srcOffset.x, mip_extent.width, validation_error_map[VALIDATION_ERROR_09c0013c]); } - // extent height must be a multiple of block height, or extent+offset height must equal subresource height - if ((SafeModulo(image_copy.extent.height, block_size.height) != 0) && - (image_copy.extent.height + image_copy.srcOffset.y != mip_extent.height)) { + // Extent height must be a multiple of block height, or extent+offset height must equal subresource height + if ((SafeModulo(src_copy_extent.height, block_size.height) != 0) && + (src_copy_extent.height + region.srcOffset.y != mip_extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c0013e, "IMAGE", + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c0013e, "IMAGE", "vkCmdCopyImage(): pRegion[%d] extent height (%d) must be a multiple of the compressed texture block " "height (%d), or when added to srcOffset.y (%d) must equal the image subresource height (%d). %s.", - i, image_copy.extent.height, block_size.height, image_copy.srcOffset.y, mip_extent.height, + i, src_copy_extent.height, block_size.height, region.srcOffset.y, mip_extent.height, validation_error_map[VALIDATION_ERROR_09c0013e]); } - // extent depth must be a multiple of block depth, or extent+offset depth must equal subresource depth - uint32_t copy_depth = (slice_override ? depth_slices : image_copy.extent.depth); - if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + image_copy.srcOffset.z != mip_extent.depth)) { + // Extent depth must be a multiple of block depth, or extent+offset depth must equal subresource depth + uint32_t copy_depth = (slice_override ? depth_slices : src_copy_extent.depth); + if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + region.srcOffset.z != mip_extent.depth)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(src_state->image), __LINE__, VALIDATION_ERROR_09c00140, "IMAGE", + HandleToUint64(src_state->image), __LINE__, VALIDATION_ERROR_09c00140, "IMAGE", "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " "depth (%d), or when added to srcOffset.z (%d) must equal the image subresource depth (%d). %s.", - i, image_copy.extent.depth, block_size.depth, image_copy.srcOffset.z, mip_extent.depth, + i, src_copy_extent.depth, block_size.depth, region.srcOffset.z, mip_extent.depth, validation_error_map[VALIDATION_ERROR_09c00140]); } } // Compressed @@ -1549,127 +1638,111 @@ bool ValidateImageCopyData(const layer_data *device_data, const debug_report_dat // Do all checks on dest image // if (dst_state->createInfo.imageType == VK_IMAGE_TYPE_1D) { - if ((0 != image_copy.dstOffset.y) || (1 != image_copy.extent.height)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00130, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] dstOffset.y is %d and extent.height is %d. For 1D images these must " - "be 0 and 1, respectively. %s", - i, image_copy.dstOffset.y, image_copy.extent.height, validation_error_map[VALIDATION_ERROR_09c00130]); + if ((0 != region.dstOffset.y) || (1 != dst_copy_extent.height)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c00130, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dstOffset.y is %d and dst_copy_extent.height is %d. For 1D images " + "these must be 0 and 1, respectively. %s", + i, region.dstOffset.y, dst_copy_extent.height, validation_error_map[VALIDATION_ERROR_09c00130]); } } if ((dst_state->createInfo.imageType == VK_IMAGE_TYPE_1D) || (dst_state->createInfo.imageType == VK_IMAGE_TYPE_2D)) { - if ((0 != image_copy.dstOffset.z) || (1 != image_copy.extent.depth)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00134, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] dstOffset.z is %d and extent.depth is %d. For 1D and 2D images " - "these must be 0 and 1, respectively. %s", - i, image_copy.dstOffset.z, image_copy.extent.depth, validation_error_map[VALIDATION_ERROR_09c00134]); + if ((0 != region.dstOffset.z) || (1 != dst_copy_extent.depth)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c00134, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dstOffset.z is %d and dst_copy_extent.depth is %d. For 1D and 2D " + "images these must be 0 and 1, respectively. %s", + i, region.dstOffset.z, dst_copy_extent.depth, validation_error_map[VALIDATION_ERROR_09c00134]); } } if (dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { - if ((0 != image_copy.dstSubresource.baseArrayLayer) || (1 != image_copy.dstSubresource.layerCount)) { + if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and dstSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively. %s", - i, image_copy.dstSubresource.baseArrayLayer, image_copy.dstSubresource.layerCount, + i, region.dstSubresource.baseArrayLayer, region.dstSubresource.layerCount, validation_error_map[VALIDATION_ERROR_09c0011a]); } } // VU01199 changed with mnt1 if (GetDeviceExtensions(device_data)->vk_khr_maintenance1) { if (dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { - if ((0 != image_copy.dstSubresource.baseArrayLayer) || (1 != image_copy.dstSubresource.layerCount)) { + if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and dstSubresource.layerCount " "is %d. For VK_IMAGE_TYPE_3D images these must be 0 and 1, respectively. %s", - i, image_copy.dstSubresource.baseArrayLayer, image_copy.dstSubresource.layerCount, + i, region.dstSubresource.baseArrayLayer, region.dstSubresource.layerCount, validation_error_map[VALIDATION_ERROR_09c0011a]); } } } else { // Pre maint 1 if (src_state->createInfo.imageType == VK_IMAGE_TYPE_3D || dst_state->createInfo.imageType == VK_IMAGE_TYPE_3D) { - if ((0 != image_copy.dstSubresource.baseArrayLayer) || (1 != image_copy.dstSubresource.layerCount)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and " - "dstSubresource.layerCount is %d. For copies with either source or dest of type " - "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively. %s", - i, image_copy.dstSubresource.baseArrayLayer, image_copy.dstSubresource.layerCount, - validation_error_map[VALIDATION_ERROR_09c0011a]); + if ((0 != region.dstSubresource.baseArrayLayer) || (1 != region.dstSubresource.layerCount)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c0011a, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer is %d and " + "dstSubresource.layerCount is %d. For copies with either source or dest of type " + "VK_IMAGE_TYPE_3D, these must be 0 and 1, respectively. %s", + i, region.dstSubresource.baseArrayLayer, region.dstSubresource.layerCount, + validation_error_map[VALIDATION_ERROR_09c0011a]); } } } - // TODO: this VU is redundant with VU01224. Gitlab issue 812 submitted to get it removed from the spec. - if ((image_copy.dstSubresource.baseArrayLayer >= dst_state->createInfo.arrayLayers) || - (image_copy.dstSubresource.baseArrayLayer + image_copy.dstSubresource.layerCount > dst_state->createInfo.arrayLayers)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00136, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] dstSubresource.baseArrayLayer (%d) must be less than the dest image's " - "arrayLayers (%d), and the sum of baseArrayLayer and dstSubresource.layerCount (%d) must be less than " - "or equal to the dest image's arrayLayers. %s", - i, image_copy.dstSubresource.baseArrayLayer, dst_state->createInfo.arrayLayers, - image_copy.dstSubresource.layerCount, validation_error_map[VALIDATION_ERROR_09c00136]); - } - // Checks that apply only to compressed images if (FormatIsCompressed(dst_state->createInfo.format)) { - VkExtent3D block_size = FormatCompressedTexelBlockExtent(dst_state->createInfo.format); + const VkExtent3D block_size = FormatCompressedTexelBlockExtent(dst_state->createInfo.format); // image offsets must be multiples of block dimensions - if ((SafeModulo(image_copy.dstOffset.x, block_size.width) != 0) || - (SafeModulo(image_copy.dstOffset.y, block_size.height) != 0) || - (SafeModulo(image_copy.dstOffset.z, block_size.depth) != 0)) { + if ((SafeModulo(region.dstOffset.x, block_size.width) != 0) || + (SafeModulo(region.dstOffset.y, block_size.height) != 0) || + (SafeModulo(region.dstOffset.z, block_size.depth) != 0)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00144, "IMAGE", + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c00144, "IMAGE", "vkCmdCopyImage(): pRegion[%d] dstOffset (%d, %d) must be multiples of the compressed image's " "texel width & height (%d, %d). %s.", - i, image_copy.dstOffset.x, image_copy.dstOffset.y, block_size.width, block_size.height, + i, region.dstOffset.x, region.dstOffset.y, block_size.width, block_size.height, validation_error_map[VALIDATION_ERROR_09c00144]); } - // extent width must be a multiple of block width, or extent+offset width must equal subresource width - VkExtent3D mip_extent = GetImageSubresourceExtent(dst_state, &(image_copy.dstSubresource)); - if ((SafeModulo(image_copy.extent.width, block_size.width) != 0) && - (image_copy.extent.width + image_copy.dstOffset.x != mip_extent.width)) { + const VkExtent3D mip_extent = GetImageSubresourceExtent(dst_state, &(region.dstSubresource)); + if ((SafeModulo(dst_copy_extent.width, block_size.width) != 0) && + (dst_copy_extent.width + region.dstOffset.x != mip_extent.width)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00146, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " - "width (%d), or when added to dstOffset.x (%d) must equal the image subresource width (%d). %s.", - i, image_copy.extent.width, block_size.width, image_copy.dstOffset.x, mip_extent.width, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c00146, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dst_copy_extent width (%d) must be a multiple of the compressed texture " + "block width (%d), or when added to dstOffset.x (%d) must equal the image subresource width (%d). %s.", + i, dst_copy_extent.width, block_size.width, region.dstOffset.x, mip_extent.width, validation_error_map[VALIDATION_ERROR_09c00146]); } - // extent height must be a multiple of block height, or extent+offset height must equal subresource height - if ((SafeModulo(image_copy.extent.height, block_size.height) != 0) && - (image_copy.extent.height + image_copy.dstOffset.y != mip_extent.height)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c00148, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] extent height (%d) must be a multiple of the compressed texture block " - "height (%d), or when added to dstOffset.y (%d) must equal the image subresource height (%d). %s.", - i, image_copy.extent.height, block_size.height, image_copy.dstOffset.y, mip_extent.height, - validation_error_map[VALIDATION_ERROR_09c00148]); + // Extent height must be a multiple of block height, or dst_copy_extent+offset height must equal subresource height + if ((SafeModulo(dst_copy_extent.height, block_size.height) != 0) && + (dst_copy_extent.height + region.dstOffset.y != mip_extent.height)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c00148, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dst_copy_extent height (%d) must be a multiple of the compressed " + "texture block height (%d), or when added to dstOffset.y (%d) must equal the image subresource " + "height (%d). %s.", + i, dst_copy_extent.height, block_size.height, region.dstOffset.y, mip_extent.height, + validation_error_map[VALIDATION_ERROR_09c00148]); } - // extent depth must be a multiple of block depth, or extent+offset depth must equal subresource depth - uint32_t copy_depth = (slice_override ? depth_slices : image_copy.extent.depth); - if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + image_copy.dstOffset.z != mip_extent.depth)) { + // Extent depth must be a multiple of block depth, or dst_copy_extent+offset depth must equal subresource depth + uint32_t copy_depth = (slice_override ? depth_slices : dst_copy_extent.depth); + if ((SafeModulo(copy_depth, block_size.depth) != 0) && (copy_depth + region.dstOffset.z != mip_extent.depth)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - reinterpret_cast(dst_state->image), __LINE__, VALIDATION_ERROR_09c0014a, "IMAGE", - "vkCmdCopyImage(): pRegion[%d] extent width (%d) must be a multiple of the compressed texture block " - "depth (%d), or when added to dstOffset.z (%d) must equal the image subresource depth (%d). %s.", - i, image_copy.extent.depth, block_size.depth, image_copy.dstOffset.z, mip_extent.depth, + HandleToUint64(dst_state->image), __LINE__, VALIDATION_ERROR_09c0014a, "IMAGE", + "vkCmdCopyImage(): pRegion[%d] dst_copy_extent width (%d) must be a multiple of the compressed texture " + "block depth (%d), or when added to dstOffset.z (%d) must equal the image subresource depth (%d). %s.", + i, dst_copy_extent.depth, block_size.depth, region.dstOffset.z, mip_extent.depth, validation_error_map[VALIDATION_ERROR_09c0014a]); } } // Compressed @@ -1687,6 +1760,13 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod VkCommandBuffer command_buffer = cb_node->commandBuffer; for (uint32_t i = 0; i < region_count; i++) { + const VkImageCopy region = regions[i]; + + // For comp/uncomp copies, the copy extent for the dest image must be adjusted + VkExtent3D src_copy_extent = region.extent; + VkExtent3D dst_copy_extent = + GetAdjustedDestImageExtent(src_image_state->createInfo.format, dst_image_state->createInfo.format, region.extent); + bool slice_override = false; uint32_t depth_slices = 0; @@ -1694,15 +1774,15 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // TBD: This seems like the only way to reconcile 3 mutually-exclusive VU checks for 2D/3D copies. Heads up. if ((VK_IMAGE_TYPE_3D == src_image_state->createInfo.imageType) && (VK_IMAGE_TYPE_3D != dst_image_state->createInfo.imageType)) { - depth_slices = regions[i].dstSubresource.layerCount; // Slice count from 2D subresource + depth_slices = region.dstSubresource.layerCount; // Slice count from 2D subresource slice_override = (depth_slices != 1); } else if ((VK_IMAGE_TYPE_3D == dst_image_state->createInfo.imageType) && (VK_IMAGE_TYPE_3D != src_image_state->createInfo.imageType)) { - depth_slices = regions[i].srcSubresource.layerCount; // Slice count from 2D subresource + depth_slices = region.srcSubresource.layerCount; // Slice count from 2D subresource slice_override = (depth_slices != 1); } - if (regions[i].srcSubresource.layerCount == 0) { + if (region.srcSubresource.layerCount == 0) { std::stringstream ss; ss << "vkCmdCopyImage: number of layers in pRegions[" << i << "] srcSubresource is zero"; skip |= @@ -1710,7 +1790,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", "%s", ss.str().c_str()); } - if (regions[i].dstSubresource.layerCount == 0) { + if (region.dstSubresource.layerCount == 0) { std::stringstream ss; ss << "vkCmdCopyImage: number of layers in pRegions[" << i << "] dstSubresource is zero"; skip |= @@ -1724,23 +1804,23 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // The number of depth slices in srcSubresource and dstSubresource must match // Depth comes from layerCount for 1D,2D resources, from extent.depth for 3D uint32_t src_slices = - (VK_IMAGE_TYPE_3D == src_image_state->createInfo.imageType ? regions[i].extent.depth - : regions[i].srcSubresource.layerCount); + (VK_IMAGE_TYPE_3D == src_image_state->createInfo.imageType ? src_copy_extent.depth + : region.srcSubresource.layerCount); uint32_t dst_slices = - (VK_IMAGE_TYPE_3D == dst_image_state->createInfo.imageType ? regions[i].extent.depth - : regions[i].dstSubresource.layerCount); + (VK_IMAGE_TYPE_3D == dst_image_state->createInfo.imageType ? dst_copy_extent.depth + : region.dstSubresource.layerCount); if (src_slices != dst_slices) { std::stringstream ss; ss << "vkCmdCopyImage: number of depth slices in source and destination subresources for pRegions[" << i << "] do not match"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - reinterpret_cast(command_buffer), __LINE__, VALIDATION_ERROR_09c00118, "IMAGE", - "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_09c00118]); + HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00118, "IMAGE", "%s. %s", + ss.str().c_str(), validation_error_map[VALIDATION_ERROR_09c00118]); } } } else { // For each region the layerCount member of srcSubresource and dstSubresource must match - if (regions[i].srcSubresource.layerCount != regions[i].dstSubresource.layerCount) { + if (region.srcSubresource.layerCount != region.dstSubresource.layerCount) { std::stringstream ss; ss << "vkCmdCopyImage: number of layers in source and destination subresources for pRegions[" << i << "] do not match"; @@ -1751,7 +1831,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // For each region, the aspectMask member of srcSubresource and dstSubresource must match - if (regions[i].srcSubresource.aspectMask != regions[i].dstSubresource.aspectMask) { + if (region.srcSubresource.aspectMask != region.dstSubresource.aspectMask) { char const str[] = "vkCmdCopyImage: Src and dest aspectMasks for each region must match"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00112, "IMAGE", "%s. %s", str, @@ -1759,7 +1839,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // For each region, the aspectMask member of srcSubresource must be present in the source image - if (!VerifyAspectsPresent(regions[i].srcSubresource.aspectMask, src_image_state->createInfo.format)) { + if (!VerifyAspectsPresent(region.srcSubresource.aspectMask, src_image_state->createInfo.format)) { std::stringstream ss; ss << "vkCmdCopyImage: pRegion[" << i << "] srcSubresource.aspectMask cannot specify aspects not present in source image"; @@ -1769,7 +1849,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // For each region, the aspectMask member of dstSubresource must be present in the destination image - if (!VerifyAspectsPresent(regions[i].dstSubresource.aspectMask, dst_image_state->createInfo.format)) { + if (!VerifyAspectsPresent(region.dstSubresource.aspectMask, dst_image_state->createInfo.format)) { std::stringstream ss; ss << "vkCmdCopyImage: pRegion[" << i << "] dstSubresource.aspectMask cannot specify aspects not present in dest image"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, @@ -1778,8 +1858,8 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // AspectMask must not contain VK_IMAGE_ASPECT_METADATA_BIT - if ((regions[i].srcSubresource.aspectMask & VK_IMAGE_ASPECT_METADATA_BIT) || - (regions[i].dstSubresource.aspectMask & VK_IMAGE_ASPECT_METADATA_BIT)) { + if ((region.srcSubresource.aspectMask & VK_IMAGE_ASPECT_METADATA_BIT) || + (region.dstSubresource.aspectMask & VK_IMAGE_ASPECT_METADATA_BIT)) { std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] may not specify aspectMask containing VK_IMAGE_ASPECT_METADATA_BIT"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, @@ -1789,8 +1869,8 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // For each region, if aspectMask contains VK_IMAGE_ASPECT_COLOR_BIT, it must not contain either of // VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT - if ((regions[i].srcSubresource.aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) && - (regions[i].srcSubresource.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))) { + if ((region.srcSubresource.aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) && + (region.srcSubresource.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))) { char const str[] = "vkCmdCopyImage aspectMask cannot specify both COLOR and DEPTH/STENCIL aspects"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_0a60014e, "IMAGE", "%s. %s", str, @@ -1798,7 +1878,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // MipLevel must be less than the mipLevels specified in VkImageCreateInfo when the image was created - if (regions[i].srcSubresource.mipLevel >= src_image_state->createInfo.mipLevels) { + if (region.srcSubresource.mipLevel >= src_image_state->createInfo.mipLevels) { std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] specifies a src mipLevel greater than the number specified when the srcImage was created."; @@ -1806,7 +1886,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_0a600152, "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_0a600152]); } - if (regions[i].dstSubresource.mipLevel >= dst_image_state->createInfo.mipLevels) { + if (region.dstSubresource.mipLevel >= dst_image_state->createInfo.mipLevels) { std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] specifies a dst mipLevel greater than the number specified when the dstImage was created."; @@ -1817,22 +1897,18 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // (baseArrayLayer + layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the // image was created - if ((regions[i].srcSubresource.baseArrayLayer + regions[i].srcSubresource.layerCount) > - src_image_state->createInfo.arrayLayers) { + if ((region.srcSubresource.baseArrayLayer + region.srcSubresource.layerCount) > src_image_state->createInfo.arrayLayers) { std::stringstream ss; ss << "vkCmdCopyImage: srcImage arrayLayers was " << src_image_state->createInfo.arrayLayers << " but subRegion[" << i - << "] baseArrayLayer + layerCount is " - << (regions[i].srcSubresource.baseArrayLayer + regions[i].srcSubresource.layerCount); + << "] baseArrayLayer + layerCount is " << (region.srcSubresource.baseArrayLayer + region.srcSubresource.layerCount); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_0a600154, "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_0a600154]); } - if ((regions[i].dstSubresource.baseArrayLayer + regions[i].dstSubresource.layerCount) > - dst_image_state->createInfo.arrayLayers) { + if ((region.dstSubresource.baseArrayLayer + region.dstSubresource.layerCount) > dst_image_state->createInfo.arrayLayers) { std::stringstream ss; ss << "vkCmdCopyImage: dstImage arrayLayers was " << dst_image_state->createInfo.arrayLayers << " but subRegion[" << i - << "] baseArrayLayer + layerCount is " - << (regions[i].dstSubresource.baseArrayLayer + regions[i].dstSubresource.layerCount); + << "] baseArrayLayer + layerCount is " << (region.dstSubresource.baseArrayLayer + region.dstSubresource.layerCount); skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_0a600154, "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_0a600154]); @@ -1841,26 +1917,26 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // Check region extents for 1D-1D, 2D-2D, and 3D-3D copies if (src_image_state->createInfo.imageType == dst_image_state->createInfo.imageType) { // The source region specified by a given element of regions must be a region that is contained within srcImage - VkExtent3D img_extent = GetImageSubresourceExtent(src_image_state, &(regions[i].srcSubresource)); - if (0 != ExceedsBounds(®ions[i].srcOffset, ®ions[i].extent, &img_extent)) { + VkExtent3D img_extent = GetImageSubresourceExtent(src_image_state, &(region.srcSubresource)); + if (0 != ExceedsBounds(®ion.srcOffset, &src_copy_extent, &img_extent)) { std::stringstream ss; - ss << "vkCmdCopyImage: Source pRegion[" << i << "] with mipLevel [ " << regions[i].srcSubresource.mipLevel - << " ], offset [ " << regions[i].srcOffset.x << ", " << regions[i].srcOffset.y << ", " << regions[i].srcOffset.z - << " ], extent [ " << regions[i].extent.width << ", " << regions[i].extent.height << ", " - << regions[i].extent.depth << " ] exceeds the source image dimensions"; + ss << "vkCmdCopyImage: Source pRegion[" << i << "] with mipLevel [ " << region.srcSubresource.mipLevel + << " ], offset [ " << region.srcOffset.x << ", " << region.srcOffset.y << ", " << region.srcOffset.z + << " ], extent [ " << src_copy_extent.width << ", " << src_copy_extent.height << ", " << src_copy_extent.depth + << " ] exceeds the source image dimensions"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_190000f4, "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_190000f4]); } // The destination region specified by a given element of regions must be a region that is contained within dst_image - img_extent = GetImageSubresourceExtent(dst_image_state, &(regions[i].dstSubresource)); - if (0 != ExceedsBounds(®ions[i].dstOffset, ®ions[i].extent, &img_extent)) { + img_extent = GetImageSubresourceExtent(dst_image_state, &(region.dstSubresource)); + if (0 != ExceedsBounds(®ion.dstOffset, &dst_copy_extent, &img_extent)) { std::stringstream ss; - ss << "vkCmdCopyImage: Dest pRegion[" << i << "] with mipLevel [ " << regions[i].dstSubresource.mipLevel - << " ], offset [ " << regions[i].dstOffset.x << ", " << regions[i].dstOffset.y << ", " << regions[i].dstOffset.z - << " ], extent [ " << regions[i].extent.width << ", " << regions[i].extent.height << ", " - << regions[i].extent.depth << " ] exceeds the destination image dimensions"; + ss << "vkCmdCopyImage: Dest pRegion[" << i << "] with mipLevel [ " << region.dstSubresource.mipLevel + << " ], offset [ " << region.dstOffset.x << ", " << region.dstOffset.y << ", " << region.dstOffset.z + << " ], extent [ " << dst_copy_extent.width << ", " << dst_copy_extent.height << ", " << dst_copy_extent.depth + << " ] exceeds the destination image dimensions"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_190000f6, "IMAGE", "%s. %s", ss.str().c_str(), validation_error_map[VALIDATION_ERROR_190000f6]); @@ -1868,16 +1944,15 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // Each dimension offset + extent limits must fall with image subresource extent - VkExtent3D subresource_extent = GetImageSubresourceExtent(src_image_state, &(regions[i].srcSubresource)); - VkExtent3D copy_extent = regions[i].extent; - if (slice_override) copy_extent.depth = depth_slices; - uint32_t extent_check = ExceedsBounds(&(regions[i].srcOffset), ©_extent, &subresource_extent); + VkExtent3D subresource_extent = GetImageSubresourceExtent(src_image_state, &(region.srcSubresource)); + if (slice_override) src_copy_extent.depth = depth_slices; + uint32_t extent_check = ExceedsBounds(&(region.srcOffset), &src_copy_extent, &subresource_extent); if (extent_check & x_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00120, "IMAGE", "vkCmdCopyImage: Source image pRegion %1d x-dimension offset [%1d] + extent [%1d] exceeds subResource " "width [%1d]. %s", - i, regions[i].srcOffset.x, regions[i].extent.width, subresource_extent.width, + i, region.srcOffset.x, src_copy_extent.width, subresource_extent.width, validation_error_map[VALIDATION_ERROR_09c00120]); } @@ -1886,7 +1961,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00122, "IMAGE", "vkCmdCopyImage: Source image pRegion %1d y-dimension offset [%1d] + extent [%1d] exceeds subResource " "height [%1d]. %s", - i, regions[i].srcOffset.y, regions[i].extent.height, subresource_extent.height, + i, region.srcOffset.y, src_copy_extent.height, subresource_extent.height, validation_error_map[VALIDATION_ERROR_09c00122]); } if (extent_check & z_bit) { @@ -1894,20 +1969,21 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00126, "IMAGE", "vkCmdCopyImage: Source image pRegion %1d z-dimension offset [%1d] + extent [%1d] exceeds subResource " "depth [%1d]. %s", - i, regions[i].srcOffset.z, copy_extent.depth, subresource_extent.depth, + i, region.srcOffset.z, src_copy_extent.depth, subresource_extent.depth, validation_error_map[VALIDATION_ERROR_09c00126]); } - subresource_extent = GetImageSubresourceExtent(dst_image_state, &(regions[i].dstSubresource)); - copy_extent = regions[i].extent; - if (slice_override) copy_extent.depth = depth_slices; - extent_check = ExceedsBounds(&(regions[i].dstOffset), ©_extent, &subresource_extent); + // Adjust dest extent if necessary + subresource_extent = GetImageSubresourceExtent(dst_image_state, &(region.dstSubresource)); + if (slice_override) dst_copy_extent.depth = depth_slices; + + extent_check = ExceedsBounds(&(region.dstOffset), &dst_copy_extent, &subresource_extent); if (extent_check & x_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c0012c, "IMAGE", "vkCmdCopyImage: Dest image pRegion %1d x-dimension offset [%1d] + extent [%1d] exceeds subResource " "width [%1d]. %s", - i, regions[i].dstOffset.x, regions[i].extent.width, subresource_extent.width, + i, region.dstOffset.x, dst_copy_extent.width, subresource_extent.width, validation_error_map[VALIDATION_ERROR_09c0012c]); } if (extent_check & y_bit) { @@ -1915,7 +1991,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c0012e, "IMAGE", "vkCmdCopyImage: Dest image pRegion %1d y-dimension offset [%1d] + extent [%1d] exceeds subResource " "height [%1d]. %s", - i, regions[i].dstOffset.y, regions[i].extent.height, subresource_extent.height, + i, region.dstOffset.y, dst_copy_extent.height, subresource_extent.height, validation_error_map[VALIDATION_ERROR_09c0012e]); } if (extent_check & z_bit) { @@ -1923,7 +1999,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod HandleToUint64(command_buffer), __LINE__, VALIDATION_ERROR_09c00132, "IMAGE", "vkCmdCopyImage: Dest image pRegion %1d z-dimension offset [%1d] + extent [%1d] exceeds subResource " "depth [%1d]. %s", - i, regions[i].dstOffset.z, copy_extent.depth, subresource_extent.depth, + i, region.dstOffset.z, dst_copy_extent.depth, subresource_extent.depth, validation_error_map[VALIDATION_ERROR_09c00132]); } @@ -1931,7 +2007,7 @@ bool PreCallValidateCmdCopyImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod // must not overlap in memory if (src_image_state->image == dst_image_state->image) { for (uint32_t j = 0; j < region_count; j++) { - if (RegionIntersects(®ions[i], ®ions[j], src_image_state->createInfo.imageType)) { + if (RegionIntersects(®ion, ®ions[j], src_image_state->createInfo.imageType)) { std::stringstream ss; ss << "vkCmdCopyImage: pRegions[" << i << "] src overlaps with pRegions[" << j << "]."; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, @@ -2038,12 +2114,12 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer // There are times where app needs to use ClearAttachments (generally when reusing a buffer inside of a render pass) // This warning should be made more specific. It'd be best to avoid triggering this test if it's a use that must call // CmdClearAttachments. - skip |= - log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), 0, DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "DS", - "vkCmdClearAttachments() issued on command buffer object 0x%p prior to any Draw Cmds." - " It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.", - commandBuffer); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), 0, DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, "DS", + "vkCmdClearAttachments() issued on command buffer object 0x%" PRIx64 + " prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.", + HandleToUint64(commandBuffer)); } skip |= outsideRenderPass(device_data, cb_node, "vkCmdClearAttachments()", VALIDATION_ERROR_18600017); } @@ -2128,12 +2204,11 @@ bool PreCallValidateCmdClearAttachments(layer_data *device_data, VkCommandBuffer auto attachment_layer_count = image_view_state->create_info.subresourceRange.layerCount; if ((pRects[j].baseArrayLayer >= attachment_layer_count) || (pRects[j].baseArrayLayer + pRects[j].layerCount > attachment_layer_count)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_18600022, "DS", - "vkCmdClearAttachments(): The layers defined in pRects[%d] are not contained in the layers of " - "pAttachment[%d]. %s", - j, i, validation_error_map[VALIDATION_ERROR_18600022]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_18600022, "DS", + "vkCmdClearAttachments(): The layers defined in pRects[%d] are not contained in the layers " + "of pAttachment[%d]. %s", + j, i, validation_error_map[VALIDATION_ERROR_18600022]); } } } @@ -2231,10 +2306,14 @@ void PreCallRecordCmdResolveImage(layer_data *device_data, GLOBAL_CB_NODE *cb_no } bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *src_image_state, - IMAGE_STATE *dst_image_state, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter) { + IMAGE_STATE *dst_image_state, uint32_t region_count, const VkImageBlit *regions, + VkImageLayout src_image_layout, VkImageLayout dst_image_layout, VkFilter filter) { const debug_report_data *report_data = core_validation::GetReportData(device_data); bool skip = false; + if (cb_node) { + skip |= ValidateCmd(device_data, cb_node, CMD_BLITIMAGE, "vkCmdBlitImage()"); + } if (cb_node && src_image_state && dst_image_state) { skip |= ValidateImageSampleCount(device_data, src_image_state, VK_SAMPLE_COUNT_1_BIT, "vkCmdBlitImage(): srcImage", VALIDATION_ERROR_184001d2); @@ -2258,8 +2337,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod VkFormatProperties props = GetFormatProperties(device_data, src_format); VkImageTiling tiling = src_image_state->createInfo.tiling; - VkFormatFeatureFlags flags = - (tiling == VK_IMAGE_TILING_LINEAR ? props.linearTilingFeatures : props.optimalTilingFeatures); + VkFormatFeatureFlags flags = (tiling == VK_IMAGE_TILING_LINEAR ? props.linearTilingFeatures : props.optimalTilingFeatures); if (VK_FORMAT_FEATURE_BLIT_SRC_BIT != (flags & VK_FORMAT_FEATURE_BLIT_SRC_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, VALIDATION_ERROR_184001b4, "IMAGE", @@ -2361,8 +2439,7 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod if (FormatIsDepthAndStencil(src_format)) { if ((srcAspect != VK_IMAGE_ASPECT_DEPTH_BIT) && (srcAspect != VK_IMAGE_ASPECT_STENCIL_BIT)) { std::stringstream ss; - ss << "vkCmdBlitImage: Combination depth/stencil image formats must have only one of " - "VK_IMAGE_ASPECT_DEPTH_BIT " + ss << "vkCmdBlitImage: Combination depth/stencil image formats must have only one of VK_IMAGE_ASPECT_DEPTH_BIT " << "and VK_IMAGE_ASPECT_STENCIL_BIT set in srcImage and dstImage"; skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_ASPECT, "IMAGE", @@ -2394,8 +2471,15 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } // Depth or Stencil // Do per-region checks - for (uint32_t i = 0; i < regionCount; i++) { - VkImageBlit rgn = pRegions[i]; + for (uint32_t i = 0; i < region_count; i++) { + const VkImageBlit rgn = regions[i]; + bool hit_error = false; + skip |= + VerifyImageLayout(device_data, cb_node, src_image_state, rgn.srcSubresource, src_image_layout, + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, "vkCmdBlitImage()", VALIDATION_ERROR_184001bc, &hit_error); + skip |= + VerifyImageLayout(device_data, cb_node, dst_image_state, rgn.dstSubresource, dst_image_layout, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, "vkCmdBlitImage()", VALIDATION_ERROR_184001c6, &hit_error); // Warn for zero-sized regions if ((rgn.srcOffsets[0].x == rgn.srcOffsets[1].x) || (rgn.srcOffsets[0].y == rgn.srcOffsets[1].y) || @@ -2600,7 +2684,13 @@ bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_nod } void PreCallRecordCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *src_image_state, - IMAGE_STATE *dst_image_state) { + IMAGE_STATE *dst_image_state, uint32_t region_count, const VkImageBlit *regions, + VkImageLayout src_image_layout, VkImageLayout dst_image_layout) { + // Make sure that all image slices are updated to correct layout + for (uint32_t i = 0; i < region_count; ++i) { + SetImageLayout(device_data, cb_node, src_image_state, regions[i].srcSubresource, src_image_layout); + SetImageLayout(device_data, cb_node, dst_image_state, regions[i].dstSubresource, dst_image_layout); + } // Update bindings between images and cmd buffer AddCommandBufferBindingImage(device_data, cb_node, src_image_state); AddCommandBufferBindingImage(device_data, cb_node, dst_image_state); @@ -2618,33 +2708,31 @@ void PreCallRecordCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_node, // the IMAGE is the same // as the global IMAGE layout bool ValidateCmdBufImageLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB, - std::unordered_map const & globalImageLayoutMap, - std::unordered_map & overlayLayoutMap) { + std::unordered_map const &globalImageLayoutMap, + std::unordered_map &overlayLayoutMap) { bool skip = false; const debug_report_data *report_data = core_validation::GetReportData(device_data); for (auto cb_image_data : pCB->imageLayoutMap) { VkImageLayout imageLayout; - if (FindLayout(overlayLayoutMap, cb_image_data.first, imageLayout) || - FindLayout(globalImageLayoutMap, cb_image_data.first, imageLayout)) { + if (FindLayout(device_data, overlayLayoutMap, cb_image_data.first, imageLayout) || + FindLayout(device_data, globalImageLayoutMap, cb_image_data.first, imageLayout)) { if (cb_image_data.second.initialLayout == VK_IMAGE_LAYOUT_UNDEFINED) { // TODO: Set memory invalid which is in mem_tracker currently } else if (imageLayout != cb_image_data.second.initialLayout) { if (cb_image_data.first.hasSubresource) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Cannot submit cmd buffer using image (0x%" PRIx64 - ") [sub-resource: aspectMask 0x%X array layer %u, mip level %u], " - "with layout %s when first use is %s.", - HandleToUint64(cb_image_data.first.image), cb_image_data.first.subresource.aspectMask, - cb_image_data.first.subresource.arrayLayer, cb_image_data.first.subresource.mipLevel, - string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout)); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + "Cannot submit cmd buffer using image (0x%" PRIx64 + ") [sub-resource: aspectMask 0x%X array layer %u, mip level %u], with layout %s when first use is %s.", + HandleToUint64(cb_image_data.first.image), cb_image_data.first.subresource.aspectMask, + cb_image_data.first.subresource.arrayLayer, cb_image_data.first.subresource.mipLevel, + string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout)); } else { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Cannot submit cmd buffer using image (0x%" PRIx64 - ") with layout %s when " - "first use is %s.", + "Cannot submit cmd buffer using image (0x%" PRIx64 ") with layout %s when first use is %s.", HandleToUint64(cb_image_data.first.image), string_VkImageLayout(imageLayout), string_VkImageLayout(cb_image_data.second.initialLayout)); } @@ -2704,9 +2792,8 @@ static bool ValidateMaskBits(core_validation::layer_data *device_data, VkCommand if (!required_bit) { skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cmdBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", - "%s AccessMask %d %s must contain at least one of access bits %d " - "%s when layout is %s, unless the app has previously added a " - "barrier for this transition.", + "%s AccessMask %d %s must contain at least one of access bits %d %s when layout is %s, unless the app " + "has previously added a barrier for this transition.", type, accessMask, string_VkAccessFlags(accessMask).c_str(), optional_bits, string_VkAccessFlags(optional_bits).c_str(), string_VkImageLayout(layout)); } else { @@ -2718,9 +2805,8 @@ static bool ValidateMaskBits(core_validation::layer_data *device_data, VkCommand } skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cmdBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", - "%s AccessMask %d %s must have required access bit %d %s %s when " - "layout is %s, unless the app has previously added a barrier for " - "this transition.", + "%s AccessMask %d %s must have required access bit %d %s %s when layout is %s, unless the app has " + "previously added a barrier for this transition.", type, accessMask, string_VkAccessFlags(accessMask).c_str(), required_bit, string_VkAccessFlags(required_bit).c_str(), opt_bits.c_str(), string_VkImageLayout(layout)); } @@ -2750,6 +2836,29 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, const debug_report_data *report_data = core_validation::GetReportData(device_data); bool skip = false; + for (uint32_t i = 0; i < pCreateInfo->attachmentCount; ++i) { + VkFormat format = pCreateInfo->pAttachments[i].format; + if (pCreateInfo->pAttachments[i].initialLayout == VK_IMAGE_LAYOUT_UNDEFINED) { + if ((FormatIsColor(format) || FormatHasDepth(format)) && + pCreateInfo->pAttachments[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + DRAWSTATE_INVALID_RENDERPASS, "DS", + "Render pass has an attachment with loadOp == VK_ATTACHMENT_LOAD_OP_LOAD and initialLayout == " + "VK_IMAGE_LAYOUT_UNDEFINED. This is probably not what you intended. Consider using " + "VK_ATTACHMENT_LOAD_OP_DONT_CARE instead if the image truely is undefined at the start of the " + "render pass."); + } + if (FormatHasStencil(format) && pCreateInfo->pAttachments[i].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + DRAWSTATE_INVALID_RENDERPASS, "DS", + "Render pass has an attachment with stencilLoadOp == VK_ATTACHMENT_LOAD_OP_LOAD and initialLayout " + "== VK_IMAGE_LAYOUT_UNDEFINED. This is probably not what you intended. Consider using " + "VK_ATTACHMENT_LOAD_OP_DONT_CARE instead if the image truely is undefined at the start of the " + "render pass."); + } + } + } + // Track when we're observing the first use of an attachment std::vector attach_first_use(pCreateInfo->attachmentCount, true); for (uint32_t i = 0; i < pCreateInfo->subpassCount; ++i) { @@ -2790,12 +2899,11 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, (subpass.pColorAttachments[c].attachment == attach_index && subpass.pColorAttachments[c].layout != layout); } if (found_layout_mismatch) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_140006ae, "DS", - "CreateRenderPass: Subpass %u pInputAttachments[%u] (%u) has layout %u, but is also used as a depth/color " - "attachment with a different layout. %s", - i, j, attach_index, layout, validation_error_map[VALIDATION_ERROR_140006ae]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_140006ae, "DS", + "CreateRenderPass: Subpass %u pInputAttachments[%u] (%u) has layout %u, but is also used as a " + "depth/color attachment with a different layout. %s", + i, j, attach_index, layout, validation_error_map[VALIDATION_ERROR_140006ae]); } if (attach_first_use[attach_index]) { @@ -2856,34 +2964,34 @@ bool ValidateLayouts(core_validation::layer_data *device_data, VkDevice device, if (subpass.pDepthStencilAttachment && subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { switch (subpass.pDepthStencilAttachment->layout) { - case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: - case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: - // These are ideal. - break; - - case VK_IMAGE_LAYOUT_GENERAL: - // May not be optimal; TODO: reconsider this warning based on other constraints? GENERAL can be better than - // doing a bunch of transitions. - skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "GENERAL layout for depth attachment may not give optimal performance."); - break; + case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: + case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: + // These are ideal. + break; - case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR: - case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR: - if (GetDeviceExtensions(device_data)->vk_khr_maintenance2) { + case VK_IMAGE_LAYOUT_GENERAL: + // May not be optimal; TODO: reconsider this warning based on other constraints? GENERAL can be better than + // doing a bunch of transitions. + skip |= log_msg(report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + "GENERAL layout for depth attachment may not give optimal performance."); break; - } else { - // Intentionally fall through to generic error message - } - default: - // No other layouts are acceptable - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Layout for depth attachment is %s but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL, " - "DEPTH_STENCIL_READ_ONLY_OPTIMAL or GENERAL.", - string_VkImageLayout(subpass.pDepthStencilAttachment->layout)); + case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR: + case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR: + if (GetDeviceExtensions(device_data)->vk_khr_maintenance2) { + break; + } else { + // Intentionally fall through to generic error message + } + + default: + // No other layouts are acceptable + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", + "Layout for depth attachment is %s but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL, " + "DEPTH_STENCIL_READ_ONLY_OPTIMAL or GENERAL.", + string_VkImageLayout(subpass.pDepthStencilAttachment->layout)); } auto attach_index = subpass.pDepthStencilAttachment->attachment; @@ -2916,8 +3024,8 @@ bool ValidateMapImageLayouts(core_validation::layer_data *device_data, VkDevice skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_info->mem), __LINE__, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", - "Mapping an image with layout %s can result in undefined behavior if this memory is " - "used by the device. Only GENERAL or PREINITIALIZED should be used.", + "Mapping an image with layout %s can result in undefined behavior if this memory is used " + "by the device. Only GENERAL or PREINITIALIZED should be used.", string_VkImageLayout(layout)); } } @@ -2945,16 +3053,16 @@ static bool validate_usage_flags(layer_data *device_data, VkFlags actual, VkFlag if (!correct_usage) { if (msgCode == -1) { // TODO: Fix callers with msgCode == -1 to use correct validation checks. - skip = log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, __LINE__, - MEMTRACK_INVALID_USAGE_FLAG, "MEM", - "Invalid usage flag for %s 0x%" PRIxLEAST64 - " used by %s. In this case, %s should have %s set during creation.", - type_str, obj_handle, func_name, type_str, usage_str); + skip = + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, __LINE__, + MEMTRACK_INVALID_USAGE_FLAG, "MEM", + "Invalid usage flag for %s 0x%" PRIx64 " used by %s. In this case, %s should have %s set during creation.", + type_str, obj_handle, func_name, type_str, usage_str); } else { const char *valid_usage = (msgCode == -1) ? "" : validation_error_map[msgCode]; skip = log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[obj_type], obj_handle, __LINE__, msgCode, "MEM", - "Invalid usage flag for %s 0x%" PRIxLEAST64 " used by %s. In this case, %s should have %s set during creation. %s", + "Invalid usage flag for %s 0x%" PRIx64 " used by %s. In this case, %s should have %s set during creation. %s", type_str, obj_handle, func_name, type_str, usage_str, valid_usage); } } @@ -2992,21 +3100,19 @@ bool PreCallValidateCreateBuffer(layer_data *device_data, const VkBufferCreateIn } if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyBuffer)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_01400728, "DS", - "vkCreateBuffer(): the sparseResidencyBuffer device feature is disabled: Buffers cannot be created with the " - "VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set. %s", - validation_error_map[VALIDATION_ERROR_01400728]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_01400728, "DS", + "vkCreateBuffer(): the sparseResidencyBuffer device feature is disabled: Buffers cannot be created with " + "the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set. %s", + validation_error_map[VALIDATION_ERROR_01400728]); } if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_ALIASED_BIT) && (!GetEnabledFeatures(device_data)->sparseResidencyAliased)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_0140072a, "DS", - "vkCreateBuffer(): the sparseResidencyAliased device feature is disabled: Buffers cannot be created with the " - "VK_BUFFER_CREATE_SPARSE_ALIASED_BIT set. %s", - validation_error_map[VALIDATION_ERROR_0140072a]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0140072a, "DS", + "vkCreateBuffer(): the sparseResidencyAliased device feature is disabled: Buffers cannot be created with " + "the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT set. %s", + validation_error_map[VALIDATION_ERROR_0140072a]); } return skip; } @@ -3057,9 +3163,8 @@ bool ValidateImageAspectMask(layer_data *device_data, VkImage image, VkFormat fo if ((aspect_mask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) == 0) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), __LINE__, VALIDATION_ERROR_0a400c01, "IMAGE", - "%s: Depth/stencil image formats must have " - "at least one of VK_IMAGE_ASPECT_DEPTH_BIT " - "and VK_IMAGE_ASPECT_STENCIL_BIT set. %s", + "%s: Depth/stencil image formats must have at least one of VK_IMAGE_ASPECT_DEPTH_BIT and " + "VK_IMAGE_ASPECT_STENCIL_BIT set. %s", func_name, validation_error_map[VALIDATION_ERROR_0a400c01]); } else if ((aspect_mask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) != aspect_mask) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, @@ -3242,7 +3347,7 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr skip |= ValidateImageUsageFlags( device_data, image_state, VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT | - VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, false, -1, "vkCreateImageView()", "VK_IMAGE_USAGE_[SAMPLED|STORAGE|COLOR_ATTACHMENT|DEPTH_STENCIL_ATTACHMENT|INPUT_ATTACHMENT]_BIT"); // If this isn't a sparse image, it needs to have memory backing it at CreateImageView time @@ -3336,14 +3441,14 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr validation_error_map[VALIDATION_ERROR_0ac007da]); } else if ((image_flags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT | VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | VK_IMAGE_CREATE_SPARSE_ALIASED_BIT))) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_0ac007fa, "IMAGE", - "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s when the " - "VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or " - "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags are enabled. %s", - string_VkImageViewType(view_type), string_VkImageType(image_type), - validation_error_map[VALIDATION_ERROR_0ac007fa]); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_0ac007fa, "IMAGE", + "vkCreateImageView(): pCreateInfo->viewType %s is not compatible with image type %s " + "when the VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or " + "VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags are enabled. %s", + string_VkImageViewType(view_type), string_VkImageType(image_type), + validation_error_map[VALIDATION_ERROR_0ac007fa]); } } else { skip |= @@ -3395,38 +3500,37 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, error_codes[0], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the " - "%s flag set. %s", + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s flag set. %s", string_VkFormat(view_format), string_VkImageTiling(image_tiling), validation_error_map[error_codes[0]]); } else if ((image_usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(tiling_features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, error_codes[1], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the " - "%s and VK_IMAGE_USAGE_SAMPLED_BIT flags set. %s", + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_SAMPLED_BIT flags set. %s", string_VkFormat(view_format), string_VkImageTiling(image_tiling), validation_error_map[error_codes[1]]); } else if ((image_usage & VK_IMAGE_USAGE_STORAGE_BIT) && !(tiling_features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, error_codes[2], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the " - "%s and VK_IMAGE_USAGE_STORAGE_BIT flags set. %s", + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_STORAGE_BIT flags set. %s", string_VkFormat(view_format), string_VkImageTiling(image_tiling), validation_error_map[error_codes[2]]); } else if ((image_usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) && !(tiling_features & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, error_codes[3], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the " - "%s and VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT flags set. %s", + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT flags set. %s", string_VkFormat(view_format), string_VkImageTiling(image_tiling), validation_error_map[error_codes[3]]); } else if ((image_usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) && !(tiling_features & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, error_codes[4], "IMAGE", - "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the " - "%s and VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT flags set. %s", + "vkCreateImageView() pCreateInfo->format %s cannot be used with an image having the %s and " + "VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT flags set. %s", string_VkFormat(view_format), string_VkImageTiling(image_tiling), validation_error_map[error_codes[4]]); } } @@ -3484,13 +3588,13 @@ static bool validateIdleBuffer(layer_data *device_data, VkBuffer buffer) { auto buffer_state = GetBufferState(device_data, buffer); if (!buffer_state) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, HandleToUint64(buffer), - __LINE__, DRAWSTATE_DOUBLE_DESTROY, "DS", - "Cannot free buffer 0x%" PRIxLEAST64 " that has not been allocated.", HandleToUint64(buffer)); + __LINE__, DRAWSTATE_DOUBLE_DESTROY, "DS", "Cannot free buffer 0x%" PRIx64 " that has not been allocated.", + HandleToUint64(buffer)); } else { if (buffer_state->in_use.load()) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, HandleToUint64(buffer), __LINE__, VALIDATION_ERROR_23c00734, "DS", - "Cannot free buffer 0x%" PRIxLEAST64 " that is in use by a command buffer. %s", HandleToUint64(buffer), + "Cannot free buffer 0x%" PRIx64 " that is in use by a command buffer. %s", HandleToUint64(buffer), validation_error_map[VALIDATION_ERROR_23c00734]); } } @@ -3592,8 +3696,8 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((pRegions[i].imageOffset.y != 0) || (pRegions[i].imageExtent.height != 1)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_0160018e, "IMAGE", - "%s(): pRegion[%d] imageOffset.y is %d and imageExtent.height is %d. For 1D images these " - "must be 0 and 1, respectively. %s", + "%s(): pRegion[%d] imageOffset.y is %d and imageExtent.height is %d. For 1D images these must be 0 " + "and 1, respectively. %s", function, i, pRegions[i].imageOffset.y, pRegions[i].imageExtent.height, validation_error_map[VALIDATION_ERROR_0160018e]); } @@ -3614,8 +3718,8 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t if ((0 != pRegions[i].imageSubresource.baseArrayLayer) || (1 != pRegions[i].imageSubresource.layerCount)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_016001aa, "IMAGE", - "%s(): pRegion[%d] imageSubresource.baseArrayLayer is %d and imageSubresource.layerCount is " - "%d. For 3D images these must be 0 and 1, respectively. %s", + "%s(): pRegion[%d] imageSubresource.baseArrayLayer is %d and imageSubresource.layerCount is %d. " + "For 3D images these must be 0 and 1, respectively. %s", function, i, pRegions[i].imageSubresource.baseArrayLayer, pRegions[i].imageSubresource.layerCount, validation_error_map[VALIDATION_ERROR_016001aa]); } @@ -3698,12 +3802,11 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t // BufferRowHeight must be a multiple of block height if (SafeModulo(pRegions[i].bufferImageHeight, block_size.height) != 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_01600198, "IMAGE", - "%s(): pRegion[%d] bufferImageHeight (%d) must be a multiple of the compressed image's texel " - "height (%d). %s.", - function, i, pRegions[i].bufferImageHeight, block_size.height, - validation_error_map[VALIDATION_ERROR_01600198]); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_01600198, "IMAGE", + "%s(): pRegion[%d] bufferImageHeight (%d) must be a multiple of the compressed image's texel height (%d). %s.", + function, i, pRegions[i].bufferImageHeight, block_size.height, validation_error_map[VALIDATION_ERROR_01600198]); } // image offsets must be multiples of block dimensions @@ -3721,13 +3824,12 @@ bool ValidateBufferImageCopyData(const debug_report_data *report_data, uint32_t // bufferOffset must be a multiple of block size (linear bytes) size_t block_size_in_bytes = FormatSize(image_state->createInfo.format); if (SafeModulo(pRegions[i].bufferOffset, block_size_in_bytes) != 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_0160019c, "IMAGE", - "%s(): pRegion[%d] bufferOffset (0x%" PRIxLEAST64 - ") must be a multiple of the compressed image's texel block " - "size (" PRINTF_SIZE_T_SPECIFIER "). %s.", - function, i, pRegions[i].bufferOffset, block_size_in_bytes, - validation_error_map[VALIDATION_ERROR_0160019c]); + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image_state->image), __LINE__, VALIDATION_ERROR_0160019c, "IMAGE", + "%s(): pRegion[%d] bufferOffset (0x%" PRIxLEAST64 + ") must be a multiple of the compressed image's texel block size (" PRINTF_SIZE_T_SPECIFIER "). %s.", + function, i, pRegions[i].bufferOffset, block_size_in_bytes, validation_error_map[VALIDATION_ERROR_0160019c]); } // imageExtent width must be a multiple of block width, or extent+offset width must equal subresource width @@ -3887,14 +3989,7 @@ bool PreCallValidateCmdCopyImageToBuffer(layer_data *device_data, VkImageLayout bool skip = ValidateBufferImageCopyData(report_data, regionCount, pRegions, src_image_state, "vkCmdCopyImageToBuffer"); // Validate command buffer state - if (CB_RECORDING != cb_node->state) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, VALIDATION_ERROR_19202413, "DS", - "Cannot call vkCmdCopyImageToBuffer() on command buffer which is not in recording state. %s.", - validation_error_map[VALIDATION_ERROR_19202413]); - } else { - skip |= ValidateCmdSubpassState(device_data, cb_node, CMD_COPYIMAGETOBUFFER); - } + skip |= ValidateCmd(device_data, cb_node, CMD_COPYIMAGETOBUFFER, "vkCmdCopyImageToBuffer()"); // Command pool must support graphics, compute, or transfer operations auto pPool = GetCommandPoolNode(device_data, cb_node->createInfo.commandPool); @@ -3963,14 +4058,7 @@ bool PreCallValidateCmdCopyBufferToImage(layer_data *device_data, VkImageLayout bool skip = ValidateBufferImageCopyData(report_data, regionCount, pRegions, dst_image_state, "vkCmdCopyBufferToImage"); // Validate command buffer state - if (CB_RECORDING != cb_node->state) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, VALIDATION_ERROR_18e02413, "DS", - "Cannot call vkCmdCopyBufferToImage() on command buffer which is not in recording state. %s.", - validation_error_map[VALIDATION_ERROR_18e02413]); - } else { - skip |= ValidateCmdSubpassState(device_data, cb_node, CMD_COPYBUFFERTOIMAGE); - } + skip |= ValidateCmd(device_data, cb_node, CMD_COPYBUFFERTOIMAGE, "vkCmdCopyBufferToImage()"); // Command pool must support graphics, compute, or transfer operations auto pPool = GetCommandPoolNode(device_data, cb_node->createInfo.commandPool); @@ -4029,7 +4117,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i bool skip = false; const VkImageAspectFlags sub_aspect = pSubresource->aspectMask; - // VU 00733: The aspectMask member of pSubresource must only have a single bit set + // The aspectMask member of pSubresource must only have a single bit set const int num_bits = sizeof(sub_aspect) * CHAR_BIT; std::bitset aspect_mask_bits(sub_aspect); if (aspect_mask_bits.count() != 1) { @@ -4044,7 +4132,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i return skip; } - // VU 00732: image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR + // image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR if (image_entry->createInfo.tiling != VK_IMAGE_TILING_LINEAR) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), __LINE__, VALIDATION_ERROR_2a6007c8, "IMAGE", @@ -4052,7 +4140,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i validation_error_map[VALIDATION_ERROR_2a6007c8]); } - // VU 00739: mipLevel must be less than the mipLevels specified in VkImageCreateInfo when the image was created + // mipLevel must be less than the mipLevels specified in VkImageCreateInfo when the image was created if (pSubresource->mipLevel >= image_entry->createInfo.mipLevels) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), __LINE__, VALIDATION_ERROR_0a4007cc, "IMAGE", @@ -4060,7 +4148,7 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i pSubresource->mipLevel, image_entry->createInfo.mipLevels, validation_error_map[VALIDATION_ERROR_0a4007cc]); } - // VU 00740: arrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when the image was created + // arrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when the image was created if (pSubresource->arrayLayer >= image_entry->createInfo.arrayLayers) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), @@ -4069,9 +4157,23 @@ bool PreCallValidateGetImageSubresourceLayout(layer_data *device_data, VkImage i pSubresource->arrayLayer, image_entry->createInfo.arrayLayers, validation_error_map[VALIDATION_ERROR_0a4007ce]); } - // VU 00741: subresource's aspect must be compatible with image's format. + // subresource's aspect must be compatible with image's format. const VkFormat img_format = image_entry->createInfo.format; - if (FormatIsColor(img_format)) { + if (FormatIsMultiplane(img_format)) { + VkImageAspectFlags allowed_flags = (VK_IMAGE_ASPECT_PLANE_0_BIT_KHR | VK_IMAGE_ASPECT_PLANE_1_BIT_KHR); + UNIQUE_VALIDATION_ERROR_CODE vuid = VALIDATION_ERROR_2a600c5a; // 2-plane version + if (FormatPlaneCount(img_format) > 2u) { + allowed_flags |= VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; + vuid = VALIDATION_ERROR_2a600c5c; // 3-plane version + } + if (sub_aspect != (sub_aspect & allowed_flags)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image), __LINE__, vuid, "IMAGE", + "vkGetImageSubresourceLayout(): For multi-planar images, VkImageSubresource.aspectMask (0x%" PRIx32 + ") must be a single-plane specifier flag. %s", + sub_aspect, validation_error_map[vuid]); + } + } else if (FormatIsColor(img_format)) { if (sub_aspect != VK_IMAGE_ASPECT_COLOR_BIT) { skip |= log_msg( report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image), __LINE__, diff --git a/sources/third_party/vulkan/src/layers/buffer_validation.h b/sources/third_party/vulkan/src/layers/buffer_validation.h index 0bc7dabf0c90300ff5f88b8507185c0d2314e0fa..a07a5d05e6a87989cd3362793208ad38df72bb01 100644 --- a/sources/third_party/vulkan/src/layers/buffer_validation.h +++ b/sources/third_party/vulkan/src/layers/buffer_validation.h @@ -85,8 +85,8 @@ bool FindLayouts(layer_data *device_data, VkImage image, std::vector &imageLayoutMap, ImageSubresourcePair imgpair, VkImageLayout &layout, const VkImageAspectFlags aspectMask); -bool FindLayout(const std::unordered_map &imageLayoutMap, ImageSubresourcePair imgpair, - VkImageLayout &layout); +bool FindLayout(layer_data *device_data, const std::unordered_map &imageLayoutMap, + ImageSubresourcePair imgpair, VkImageLayout &layout); void SetGlobalLayout(layer_data *device_data, ImageSubresourcePair imgpair, const VkImageLayout &layout); @@ -97,8 +97,7 @@ void SetLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, ImageSubresourcePai void SetLayout(std::unordered_map &imageLayoutMap, ImageSubresourcePair imgpair, VkImageLayout layout); -void SetImageViewLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, VkImageView imageView, - const VkImageLayout &layout); +void SetImageViewLayout(layer_data *device_data, GLOBAL_CB_NODE *pCB, VkImageView imageView, const VkImageLayout &layout); bool VerifyFramebufferAndRenderPassLayouts(layer_data *dev_data, GLOBAL_CB_NODE *pCB, const VkRenderPassBeginInfo *pRenderPassBegin, const FRAMEBUFFER_STATE *framebuffer_state); @@ -148,10 +147,12 @@ void PreCallRecordCmdResolveImage(layer_data *device_data, GLOBAL_CB_NODE *cb_no IMAGE_STATE *dst_image_state); bool PreCallValidateCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *src_image_state, - IMAGE_STATE *dst_image_state, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter); + IMAGE_STATE *dst_image_state, uint32_t region_count, const VkImageBlit *regions, + VkImageLayout src_image_layout, VkImageLayout dst_image_layout, VkFilter filter); void PreCallRecordCmdBlitImage(layer_data *device_data, GLOBAL_CB_NODE *cb_node, IMAGE_STATE *src_image_state, - IMAGE_STATE *dst_image_state); + IMAGE_STATE *dst_image_state, uint32_t region_count, const VkImageBlit *regions, + VkImageLayout src_image_layout, VkImageLayout dst_image_layout); bool ValidateCmdBufImageLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB, std::unordered_map const &globalImageLayoutMap, diff --git a/sources/third_party/vulkan/src/layers/core_validation.cpp b/sources/third_party/vulkan/src/layers/core_validation.cpp index b12dc861cf879fb6f4f514f09ef6e6b5f3e8b32a..74eae3251688523ef826f5fde60d68ac0405518c 100644 --- a/sources/third_party/vulkan/src/layers/core_validation.cpp +++ b/sources/third_party/vulkan/src/layers/core_validation.cpp @@ -37,6 +37,7 @@ #define NOMINMAX #include +#include #include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include "vk_loader_platform.h" @@ -67,6 +69,7 @@ #include "vk_layer_data.h" #include "vk_layer_extension_utils.h" #include "vk_layer_utils.h" +#include "vk_typemap_helper.h" #if defined __ANDROID__ #include @@ -79,19 +82,6 @@ } #endif -// TODO: remove on NDK update (r15 will probably have proper STL impl) -#ifdef __ANDROID__ -namespace std { - -template -std::string to_string(T var) { - std::ostringstream ss; - ss << var; - return ss.str(); -} -} -#endif - // This intentionally includes a cpp file #include "vk_safe_struct.cpp" @@ -101,13 +91,13 @@ using unique_lock_t = std::unique_lock; namespace core_validation { +using std::max; +using std::string; +using std::stringstream; +using std::unique_ptr; using std::unordered_map; using std::unordered_set; -using std::unique_ptr; using std::vector; -using std::string; -using std::stringstream; -using std::max; // WSI Image Objects bypass usual Image Object creation methods. A special Memory // Object value will be used to identify them internally. @@ -115,10 +105,6 @@ static const VkDeviceMemory MEMTRACKER_SWAP_CHAIN_IMAGE_KEY = (VkDeviceMemory)(- // 2nd special memory handle used to flag object as unbound from memory static const VkDeviceMemory MEMORY_UNBOUND = VkDeviceMemory(~((uint64_t)(0)) - 1); -// A special value of (0xFFFFFFFF, 0xFFFFFFFF) indicates that the surface size will be determined -// by the extent of a swapchain targeting the surface. -static const uint32_t kSurfaceSizeFromSwapchain = 0xFFFFFFFFu; - struct instance_layer_data { VkInstance instance = VK_NULL_HANDLE; debug_report_data *report_data = nullptr; @@ -153,7 +139,7 @@ struct layer_data { unordered_map commandPoolMap; unordered_map descriptorPoolMap; unordered_map setMap; - unordered_map> descriptorSetLayoutMap; + unordered_map> descriptorSetLayoutMap; unordered_map pipelineLayoutMap; unordered_map> memObjMap; unordered_map fenceMap; @@ -181,6 +167,12 @@ struct layer_data { PHYS_DEV_PROPERTIES_NODE phys_dev_properties = {}; VkPhysicalDeviceMemoryProperties phys_dev_mem_props = {}; VkPhysicalDeviceProperties phys_dev_props = {}; + // Device extension properties -- storing properties gathered from VkPhysicalDeviceProperties2KHR::pNext chain + struct DeviceExtensionProperties { + uint32_t max_push_descriptors; // from VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors + }; + DeviceExtensionProperties phys_dev_ext_props = {}; + bool external_sync_warning = false; }; // TODO : Do we need to guard access to layer_data_map w/ lock? @@ -190,7 +182,14 @@ static unordered_map instance_layer_data_map; static uint32_t loader_layer_if_version = CURRENT_LOADER_LAYER_INTERFACE_VERSION; static const VkLayerProperties global_layer = { - "VK_LAYER_LUNARG_core_validation", VK_LAYER_API_VERSION, 1, "LunarG Validation Layer", + "VK_LAYER_LUNARG_core_validation", + VK_LAYER_API_VERSION, + 1, + "LunarG Validation Layer", +}; + +static const VkExtensionProperties device_extensions[] = { + {VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, VK_EXT_VALIDATION_CACHE_SPEC_VERSION}, }; template @@ -323,9 +322,7 @@ SURFACE_STATE *GetSurfaceState(instance_layer_data *instance_data, VkSurfaceKHR return &it->second; } -DeviceExtensions const *GetEnabledExtensions(layer_data const *dev_data) { - return &dev_data->extensions; -} +DeviceExtensions const *GetEnabledExtensions(layer_data const *dev_data) { return &dev_data->extensions; } // Return ptr to memory binding for given handle of specified type static BINDABLE *GetObjectMemBinding(layer_data *dev_data, uint64_t handle, VulkanObjectType type) { @@ -357,6 +354,18 @@ static void add_mem_obj_info(layer_data *dev_data, void *object, const VkDeviceM assert(object != NULL); dev_data->memObjMap[mem] = unique_ptr(new DEVICE_MEM_INFO(object, mem, pAllocateInfo)); + + if (pAllocateInfo->pNext) { + auto struct_header = reinterpret_cast(pAllocateInfo->pNext); + while (struct_header) { + if (VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR == struct_header->sType || + VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR == struct_header->sType) { + dev_data->memObjMap[mem]->global_valid = true; + break; + } + struct_header = reinterpret_cast(struct_header->pNext); + } + } } // For given bound_object_handle, bound to given mem allocation, verify that the range for the bound object is valid @@ -532,15 +541,16 @@ bool VerifyBoundMemoryIsValid(const layer_data *dev_data, VkDeviceMemory mem, ui bool result = false; if (VK_NULL_HANDLE == mem) { result = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, - __LINE__, error_code, "MEM", "%s: Vk%s object 0x%" PRIxLEAST64 - " used with no memory bound. Memory should be bound by calling " - "vkBind%sMemory(). %s", + __LINE__, error_code, "MEM", + "%s: Vk%s object 0x%" PRIx64 + " used with no memory bound. Memory should be bound by calling vkBind%sMemory(). %s", api_name, type_name, handle, type_name, validation_error_map[error_code]); } else if (MEMORY_UNBOUND == mem) { result = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, handle, - __LINE__, error_code, "MEM", "%s: Vk%s object 0x%" PRIxLEAST64 - " used with no memory bound and previously bound memory was freed. " - "Memory must not be freed prior to this operation. %s", + __LINE__, error_code, "MEM", + "%s: Vk%s object 0x%" PRIx64 + " used with no memory bound and previously bound memory was freed. Memory must not be freed prior to this " + "operation. %s", api_name, type_name, handle, validation_error_map[error_code]); } return result; @@ -570,17 +580,22 @@ bool ValidateMemoryIsBoundToBuffer(const layer_data *dev_data, const BUFFER_STAT // SetMemBinding is used to establish immutable, non-sparse binding between a single image/buffer object and memory object. // Corresponding valid usage checks are in ValidateSetMemBinding(). -static void SetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint64_t handle, VulkanObjectType type, const char *apiName) { +static void SetMemBinding(layer_data *dev_data, VkDeviceMemory mem, BINDABLE *mem_binding, VkDeviceSize memory_offset, + uint64_t handle, VulkanObjectType type, const char *apiName) { + assert(mem_binding); + mem_binding->binding.mem = mem; + mem_binding->UpdateBoundMemorySet(); // force recreation of cached set + mem_binding->binding.offset = memory_offset; + mem_binding->binding.size = mem_binding->requirements.size; + if (mem != VK_NULL_HANDLE) { - BINDABLE *mem_binding = GetObjectMemBinding(dev_data, handle, type); - assert(mem_binding); DEVICE_MEM_INFO *mem_info = GetMemObjInfo(dev_data, mem); if (mem_info) { mem_info->obj_bindings.insert({handle, type}); // For image objects, make sure default memory state is correctly set // TODO : What's the best/correct way to handle this? if (kVulkanObjectTypeImage == type) { - auto const image_state = GetImageState(dev_data, VkImage(handle)); + auto const image_state = reinterpret_cast(mem_binding); if (image_state) { VkImageCreateInfo ici = image_state->createInfo; if (ici.usage & (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)) { @@ -588,7 +603,6 @@ static void SetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint64_t han } } } - mem_binding->binding.mem = mem; } } } @@ -610,15 +624,15 @@ static bool ValidateSetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint if (mem_binding->sparse) { UNIQUE_VALIDATION_ERROR_CODE error_code = VALIDATION_ERROR_1740082a; const char *handle_type = "IMAGE"; - if (strcmp(apiName, "vkBindBufferMemory()") == 0) { + if (type == kVulkanObjectTypeBuffer) { error_code = VALIDATION_ERROR_1700080c; handle_type = "BUFFER"; } else { - assert(strcmp(apiName, "vkBindImageMemory()") == 0); + assert(type == kVulkanObjectTypeImage); } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem), __LINE__, error_code, "MEM", - "In %s, attempting to bind memory (0x%" PRIxLEAST64 ") to object (0x%" PRIxLEAST64 + "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 ") which was created with sparse memory flags (VK_%s_CREATE_SPARSE_*_BIT). %s", apiName, HandleToUint64(mem), handle, handle_type, validation_error_map[error_code]); } @@ -627,21 +641,21 @@ static bool ValidateSetMemBinding(layer_data *dev_data, VkDeviceMemory mem, uint DEVICE_MEM_INFO *prev_binding = GetMemObjInfo(dev_data, mem_binding->binding.mem); if (prev_binding) { UNIQUE_VALIDATION_ERROR_CODE error_code = VALIDATION_ERROR_17400828; - if (strcmp(apiName, "vkBindBufferMemory()") == 0) { + if (type == kVulkanObjectTypeBuffer) { error_code = VALIDATION_ERROR_1700080a; } else { - assert(strcmp(apiName, "vkBindImageMemory()") == 0); + assert(type == kVulkanObjectTypeImage); } skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem), __LINE__, error_code, "MEM", - "In %s, attempting to bind memory (0x%" PRIxLEAST64 ") to object (0x%" PRIxLEAST64 - ") which has already been bound to mem object 0x%" PRIxLEAST64 ". %s", + "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 + ") which has already been bound to mem object 0x%" PRIx64 ". %s", apiName, HandleToUint64(mem), handle, HandleToUint64(prev_binding->mem), validation_error_map[error_code]); } else if (mem_binding->binding.mem == MEMORY_UNBOUND) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem), __LINE__, MEMTRACK_REBIND_OBJECT, "MEM", - "In %s, attempting to bind memory (0x%" PRIxLEAST64 ") to object (0x%" PRIxLEAST64 + "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 ") which was previous bound to memory that has since been freed. Memory bindings are immutable in " "Vulkan so this attempt to bind to new memory is not allowed.", apiName, HandleToUint64(mem), handle); @@ -671,6 +685,7 @@ static bool SetSparseMemBinding(layer_data *dev_data, MEM_BINDING binding, uint6 mem_info->obj_bindings.insert({handle, type}); // Need to set mem binding for this object mem_binding->sparse_bindings.insert(binding); + mem_binding->UpdateBoundMemorySet(); } } return skip; @@ -682,8 +697,8 @@ static bool validate_status(layer_data *dev_data, GLOBAL_CB_NODE *pNode, CBStatu if (!(pNode->status & status_mask)) { char const *const message = validation_error_map[msg_code]; return log_msg(dev_data->report_data, msg_flags, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pNode->commandBuffer), __LINE__, msg_code, "DS", "command buffer object 0x%p: %s. %s.", - pNode->commandBuffer, fail_msg, message); + HandleToUint64(pNode->commandBuffer), __LINE__, msg_code, "DS", + "command buffer object 0x%" PRIx64 ": %s. %s.", HandleToUint64(pNode->commandBuffer), fail_msg, message); } return false; } @@ -844,9 +859,8 @@ static bool validateAttachmentCompatibility(layer_data const *dev_data, const ch secondary_attach, "They have different samples.", caller, error_code); } if (primaryPassCI.pAttachments[primary_attach].flags != secondaryPassCI.pAttachments[secondary_attach].flags) { - skip |= - logInvalidAttachmentMessage(dev_data, type1_string, rp1_state, type2_string, rp2_state, primary_attach, secondary_attach, - "They have different flags.", caller, error_code); + skip |= logInvalidAttachmentMessage(dev_data, type1_string, rp1_state, type2_string, rp2_state, primary_attach, + secondary_attach, "They have different flags.", caller, error_code); } return skip; @@ -972,10 +986,10 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "DS", - "The Pipeline State Object (0x%" PRIxLEAST64 - ") expects that this Command Buffer's vertex binding Index %u " - "should be set via vkCmdBindVertexBuffers. This is because VkVertexInputBindingDescription struct " - "at index " PRINTF_SIZE_T_SPECIFIER " of pVertexBindingDescriptions has a binding value of %u.", + "The Pipeline State Object (0x%" PRIx64 + ") expects that this Command Buffer's vertex binding Index %u should be set via " + "vkCmdBindVertexBuffers. This is because VkVertexInputBindingDescription struct at " + "index " PRINTF_SIZE_T_SPECIFIER " of pVertexBindingDescriptions has a binding value of %u.", HandleToUint64(state.pipeline_state->pipeline), vertex_binding, i, vertex_binding); } } @@ -984,9 +998,9 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, "DS", - "Vertex buffers are bound to command buffer (0x%p" - ") but no vertex buffers are attached to this Pipeline State Object (0x%" PRIxLEAST64 ").", - pCB->commandBuffer, HandleToUint64(state.pipeline_state->pipeline)); + "Vertex buffers are bound to command buffer (0x%" PRIx64 + ") but no vertex buffers are attached to this Pipeline State Object (0x%" PRIx64 ").", + HandleToUint64(pCB->commandBuffer), HandleToUint64(state.pipeline_state->pipeline)); } } // If Viewport or scissors are dynamic, verify that dynamic count matches PSO count. @@ -1051,15 +1065,15 @@ static bool ValidatePipelineDrawtimeState(layer_data const *dev_data, LAST_BOUND ((subpass_num_samples & static_cast(pso_num_samples)) != subpass_num_samples)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS", - "Num samples mismatch! At draw-time in Pipeline (0x%" PRIxLEAST64 - ") with %u samples while current RenderPass (0x%" PRIxLEAST64 ") w/ %u samples!", + "Num samples mismatch! At draw-time in Pipeline (0x%" PRIx64 + ") with %u samples while current RenderPass (0x%" PRIx64 ") w/ %u samples!", HandleToUint64(pPipeline->pipeline), pso_num_samples, HandleToUint64(pCB->activeRenderPass->renderPass), subpass_num_samples); } } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS", - "No active render pass found at draw-time in Pipeline (0x%" PRIxLEAST64 ")!", + "No active render pass found at draw-time in Pipeline (0x%" PRIx64 ")!", HandleToUint64(pPipeline->pipeline)); } } @@ -1158,11 +1172,10 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD uint32_t setIndex = set_binding_pair.first; // If valid set is not bound throw an error if ((state.boundDescriptorSets.size() <= setIndex) || (!state.boundDescriptorSets[setIndex])) { - result |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_DESCRIPTOR_SET_NOT_BOUND, "DS", - "VkPipeline 0x%" PRIxLEAST64 " uses set #%u but that set is not bound.", - HandleToUint64(pPipe->pipeline), setIndex); + result |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_DESCRIPTOR_SET_NOT_BOUND, "DS", + "VkPipeline 0x%" PRIx64 " uses set #%u but that set is not bound.", HandleToUint64(pPipe->pipeline), setIndex); } else if (!verify_set_layout_compatibility(state.boundDescriptorSets[setIndex], &pipeline_layout, setIndex, errorString)) { // Set is bound but not compatible w/ overlapping pipeline_layout from PSO @@ -1170,23 +1183,32 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, CMD result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(setHandle), __LINE__, DRAWSTATE_PIPELINE_LAYOUTS_INCOMPATIBLE, "DS", - "VkDescriptorSet (0x%" PRIxLEAST64 - ") bound as set #%u is not compatible with overlapping VkPipelineLayout 0x%" PRIxLEAST64 " due to: %s", + "VkDescriptorSet (0x%" PRIx64 + ") bound as set #%u is not compatible with overlapping VkPipelineLayout 0x%" PRIx64 " due to: %s", HandleToUint64(setHandle), setIndex, HandleToUint64(pipeline_layout.layout), errorString.c_str()); } else { // Valid set is bound and layout compatible, validate that it's updated // Pull the set node cvdescriptorset::DescriptorSet *descriptor_set = state.boundDescriptorSets[setIndex]; // Validate the draw-time state for this descriptor set std::string err_str; - if (!descriptor_set->IsPushDescriptor() && - !descriptor_set->ValidateDrawState(set_binding_pair.second, state.dynamicOffsets[setIndex], cb_node, function, - &err_str)) { - auto set = descriptor_set->GetSet(); - result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(set), __LINE__, - DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", - "Descriptor set 0x%" PRIxLEAST64 " encountered the following validation error at %s time: %s", - HandleToUint64(set), function, err_str.c_str()); + if (!descriptor_set->IsPushDescriptor()) { + // For the "bindless" style resource usage with many descriptors, need to optimize command <-> descriptor + // binding validation. Take the requested binding set and prefilter it to eliminate redundant validation checks. + // Here, the currently bound pipeline determines whether an image validation check is redundant... + // for images are the "req" portion of the binding_req is indirectly (but tightly) coupled to the pipeline. + const cvdescriptorset::PrefilterBindRequestMap reduced_map(*descriptor_set, set_binding_pair.second, cb_node, + pPipe); + const auto &binding_req_map = reduced_map.Map(); + + if (!descriptor_set->ValidateDrawState(binding_req_map, state.dynamicOffsets[setIndex], cb_node, function, + &err_str)) { + auto set = descriptor_set->GetSet(); + result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(set), __LINE__, + DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", + "Descriptor set 0x%" PRIx64 " encountered the following validation error at %s time: %s", + HandleToUint64(set), function, err_str.c_str()); + } } } } @@ -1208,10 +1230,14 @@ static void UpdateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, cons // Pull the set node cvdescriptorset::DescriptorSet *descriptor_set = state.boundDescriptorSets[setIndex]; if (!descriptor_set->IsPushDescriptor()) { + // For the "bindless" style resource usage with many descriptors, need to optimize command <-> descriptor binding + const cvdescriptorset::PrefilterBindRequestMap reduced_map(*descriptor_set, set_binding_pair.second, cb_state); + const auto &binding_req_map = reduced_map.Map(); + // Bind this set and its active descriptor resources to the command buffer - descriptor_set->BindCommandBuffer(cb_state, set_binding_pair.second); + descriptor_set->BindCommandBuffer(cb_state, binding_req_map); // For given active slots record updated images & buffers - descriptor_set->GetStorageUpdates(set_binding_pair.second, &cb_state->updateBuffers, &cb_state->updateImages); + descriptor_set->GetStorageUpdates(binding_req_map, &cb_state->updateBuffers, &cb_state->updateImages); } } } @@ -1220,35 +1246,8 @@ static void UpdateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, cons } } -// Validate HW line width capabilities prior to setting requested line width. -static bool verifyLineWidth(layer_data *dev_data, DRAW_STATE_ERROR dsError, VulkanObjectType object_type, const uint64_t &target, - float lineWidth) { - bool skip = false; - - // First check to see if the physical device supports wide lines. - if ((VK_FALSE == dev_data->enabled_features.wideLines) && (1.0f != lineWidth)) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object_type], target, __LINE__, - dsError, "DS", - "Attempt to set lineWidth to %f but physical device wideLines feature " - "not supported/enabled so lineWidth must be 1.0f!", - lineWidth); - } else { - // Otherwise, make sure the width falls in the valid range. - if ((dev_data->phys_dev_properties.properties.limits.lineWidthRange[0] > lineWidth) || - (dev_data->phys_dev_properties.properties.limits.lineWidthRange[1] < lineWidth)) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object_type], target, - __LINE__, dsError, "DS", - "Attempt to set lineWidth to %f but physical device limits line width " - "to between [%f, %f]!", - lineWidth, dev_data->phys_dev_properties.properties.limits.lineWidthRange[0], - dev_data->phys_dev_properties.properties.limits.lineWidthRange[1]); - } - } - - return skip; -} - -static bool ValidatePipelineLocked(layer_data *dev_data, std::vector> const &pPipelines, int pipelineIndex) { +static bool ValidatePipelineLocked(layer_data *dev_data, std::vector> const &pPipelines, + int pipelineIndex) { bool skip = false; PIPELINE_STATE *pPipeline = pPipelines[pipelineIndex].get(); @@ -1289,7 +1288,8 @@ static bool ValidatePipelineLocked(layer_data *dev_data, std::vector* maps in this function. -static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector> const &pPipelines, int pipelineIndex) { +static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector> const &pPipelines, + int pipelineIndex) { bool skip = false; PIPELINE_STATE *pPipeline = pPipelines[pipelineIndex].get(); @@ -1297,13 +1297,12 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorrender_pass_ci.pSubpasses[pPipeline->graphicsPipelineCI.subpass]; - if (pPipeline->graphicsPipelineCI.subpass >= pPipeline->render_pass_ci.subpassCount) { + auto subpass_desc = &pPipeline->rp_state->createInfo.pSubpasses[pPipeline->graphicsPipelineCI.subpass]; + if (pPipeline->graphicsPipelineCI.subpass >= pPipeline->rp_state->createInfo.subpassCount) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005ee, "DS", - "Invalid Pipeline CreateInfo State: Subpass index %u " - "is out of range for this renderpass (0..%u). %s", - pPipeline->graphicsPipelineCI.subpass, pPipeline->render_pass_ci.subpassCount - 1, + "Invalid Pipeline CreateInfo State: Subpass index %u is out of range for this renderpass (0..%u). %s", + pPipeline->graphicsPipelineCI.subpass, pPipeline->rp_state->createInfo.subpassCount - 1, validation_error_map[VALIDATION_ERROR_096005ee]); subpass_desc = nullptr; } @@ -1314,7 +1313,7 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorreport_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005d4, "DS", - "vkCreateGraphicsPipelines(): Render pass (0x%" PRIxLEAST64 + "vkCreateGraphicsPipelines(): Render pass (0x%" PRIx64 ") subpass %u has colorAttachmentCount of %u which doesn't match the pColorBlendState->attachmentCount of %u. %s", HandleToUint64(pPipeline->rp_state->renderPass), pPipeline->graphicsPipelineCI.subpass, subpass_desc->colorAttachmentCount, color_blend_state->attachmentCount, @@ -1332,8 +1331,8 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorreport_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_0f4004ba, "DS", - "Invalid Pipeline CreateInfo: If independent blend feature not " - "enabled, all elements of pAttachments must be identical. %s", + "Invalid Pipeline CreateInfo: If independent blend feature not enabled, all elements of " + "pAttachments must be identical. %s", validation_error_map[VALIDATION_ERROR_0f4004ba]); break; } @@ -1399,9 +1398,8 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorgraphicsPipelineCI.pInputAssemblyState->topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005c0, "DS", - "Invalid Pipeline CreateInfo State: " - "VK_PRIMITIVE_TOPOLOGY_PATCH_LIST must be set as IA " - "topology for tessellation pipelines. %s", + "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH_LIST must be set as IA topology for " + "tessellation pipelines. %s", validation_error_map[VALIDATION_ERROR_096005c0]); } if (pPipeline->graphicsPipelineCI.pInputAssemblyState && @@ -1409,28 +1407,20 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorreport_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005c2, "DS", - "Invalid Pipeline CreateInfo State: " - "VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive " - "topology is only valid for tessellation pipelines. %s", + "Invalid Pipeline CreateInfo State: VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive topology is only valid " + "for tessellation pipelines. %s", validation_error_map[VALIDATION_ERROR_096005c2]); } } // If a rasterization state is provided... if (pPipeline->graphicsPipelineCI.pRasterizationState) { - // Make sure that the line width conforms to the HW. - if (!isDynamic(pPipeline, VK_DYNAMIC_STATE_LINE_WIDTH)) { - skip |= - verifyLineWidth(dev_data, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, kVulkanObjectTypePipeline, - HandleToUint64(pPipeline->pipeline), pPipeline->graphicsPipelineCI.pRasterizationState->lineWidth); - } - if ((pPipeline->graphicsPipelineCI.pRasterizationState->depthClampEnable == VK_TRUE) && (!dev_data->enabled_features.depthClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_1020061c, "DS", - "vkCreateGraphicsPipelines(): the depthClamp device feature is disabled: the depthClampEnable " - "member of the VkPipelineRasterizationStateCreateInfo structure must be set to VK_FALSE. %s", + "vkCreateGraphicsPipelines(): the depthClamp device feature is disabled: the depthClampEnable member " + "of the VkPipelineRasterizationStateCreateInfo structure must be set to VK_FALSE. %s", validation_error_map[VALIDATION_ERROR_1020061c]); } @@ -1439,8 +1429,8 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorenabled_features.depthBiasClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, DRAWSTATE_INVALID_FEATURE, "DS", - "vkCreateGraphicsPipelines(): the depthBiasClamp device feature is disabled: the depthBiasClamp " - "member of the VkPipelineRasterizationStateCreateInfo structure must be set to 0.0 unless the " + "vkCreateGraphicsPipelines(): the depthBiasClamp device feature is disabled: the depthBiasClamp member " + "of the VkPipelineRasterizationStateCreateInfo structure must be set to 0.0 unless the " "VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state is enabled"); } @@ -1461,17 +1451,18 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorgraphicsPipelineCI.pDepthStencilState) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005e0, "DS", - "Invalid Pipeline CreateInfo State: pDepthStencilState is NULL when rasterization is " - "enabled and subpass uses a depth/stencil attachment. %s", + "Invalid Pipeline CreateInfo State: pDepthStencilState is NULL when rasterization is enabled " + "and subpass uses a depth/stencil attachment. %s", validation_error_map[VALIDATION_ERROR_096005e0]); } else if ((pPipeline->graphicsPipelineCI.pDepthStencilState->depthBoundsTestEnable == VK_TRUE) && (!dev_data->enabled_features.depthBounds)) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), __LINE__, DRAWSTATE_INVALID_FEATURE, "DS", - "vkCreateGraphicsPipelines(): the depthBounds device feature is disabled: the depthBoundsTestEnable " - "member of the VkPipelineDepthStencilStateCreateInfo structure must be set to VK_FALSE."); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_0f6004ac, "DS", + "vkCreateGraphicsPipelines(): the depthBounds device feature is disabled: the " + "depthBoundsTestEnable member of the VkPipelineDepthStencilStateCreateInfo structure must be " + "set to VK_FALSE. %s", + validation_error_map[VALIDATION_ERROR_0f6004ac]); } } @@ -1486,8 +1477,8 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector 0 && pPipeline->graphicsPipelineCI.pColorBlendState == nullptr) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_096005e2, "DS", - "Invalid Pipeline CreateInfo State: pColorBlendState is NULL when rasterization is " - "enabled and subpass uses color attachments. %s", + "Invalid Pipeline CreateInfo State: pColorBlendState is NULL when rasterization is enabled and " + "subpass uses color attachments. %s", validation_error_map[VALIDATION_ERROR_096005e2]); } } @@ -1500,14 +1491,15 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vectorpVertexAttributeDescriptions[j].format; // Internal call to get format info. Still goes through layers, could potentially go directly to ICD. VkFormatProperties properties; - dev_data->instance_data->dispatch_table.GetPhysicalDeviceFormatProperties(dev_data->physical_device, format, &properties); + dev_data->instance_data->dispatch_table.GetPhysicalDeviceFormatProperties(dev_data->physical_device, format, + &properties); if ((properties.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) == 0) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_14a004de, "IMAGE", - "vkCreateGraphicsPipelines: pCreateInfo[%d].pVertexInputState->vertexAttributeDescriptions[%d].format " - "(%s) is not a supported vertex buffer format. %s", - pipelineIndex, j, string_VkFormat(format), validation_error_map[VALIDATION_ERROR_14a004de]); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_14a004de, "IMAGE", + "vkCreateGraphicsPipelines: pCreateInfo[%d].pVertexInputState->vertexAttributeDescriptions[%d].format " + "(%s) is not a supported vertex buffer format. %s", + pipelineIndex, j, string_VkFormat(format), validation_error_map[VALIDATION_ERROR_14a004de]); } } } @@ -1516,21 +1508,25 @@ static bool ValidatePipelineUnlocked(layer_data *dev_data, std::vector(0); for (uint32_t i = 0; i < subpass_desc->colorAttachmentCount; ++i) { if (subpass_desc->pColorAttachments[i].attachment != VK_ATTACHMENT_UNUSED) { - max_sample_count = std::max(max_sample_count, pPipeline->render_pass_ci.pAttachments[subpass_desc->pColorAttachments[i].attachment].samples); + max_sample_count = + std::max(max_sample_count, + pPipeline->rp_state->createInfo.pAttachments[subpass_desc->pColorAttachments[i].attachment].samples); } } if (subpass_desc->pDepthStencilAttachment && subpass_desc->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { - max_sample_count = std::max(max_sample_count, pPipeline->render_pass_ci.pAttachments[subpass_desc->pDepthStencilAttachment->attachment].samples); + max_sample_count = + std::max(max_sample_count, + pPipeline->rp_state->createInfo.pAttachments[subpass_desc->pDepthStencilAttachment->attachment].samples); } if (pPipeline->graphicsPipelineCI.pMultisampleState->rasterizationSamples != max_sample_count) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, - HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_09600bc2, "DS", - "vkCreateGraphicsPipelines: pCreateInfo[%d].pMultisampleState->rasterizationSamples (%s) != max attachment samples (%s) " - "used in subpass %u. %s", - pipelineIndex, string_VkSampleCountFlagBits(pPipeline->graphicsPipelineCI.pMultisampleState->rasterizationSamples), - string_VkSampleCountFlagBits(max_sample_count), pPipeline->graphicsPipelineCI.subpass, - validation_error_map[VALIDATION_ERROR_09600bc2]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + HandleToUint64(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_09600bc2, "DS", + "vkCreateGraphicsPipelines: pCreateInfo[%d].pMultisampleState->rasterizationSamples (%s) != max " + "attachment samples (%s) used in subpass %u. %s", + pipelineIndex, + string_VkSampleCountFlagBits(pPipeline->graphicsPipelineCI.pMultisampleState->rasterizationSamples), + string_VkSampleCountFlagBits(max_sample_count), pPipeline->graphicsPipelineCI.subpass, + validation_error_map[VALIDATION_ERROR_09600bc2]); } } @@ -1559,14 +1555,14 @@ static bool validateIdleDescriptorSet(const layer_data *dev_data, VkDescriptorSe if (set_node == dev_data->setMap.end()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(set), __LINE__, DRAWSTATE_DOUBLE_DESTROY, "DS", - "Cannot call %s() on descriptor set 0x%" PRIxLEAST64 " that has not been allocated.", func_str.c_str(), + "Cannot call %s() on descriptor set 0x%" PRIx64 " that has not been allocated.", func_str.c_str(), HandleToUint64(set)); } else { // TODO : This covers various error cases so should pass error enum into this function and use passed in enum here if (set_node->second->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(set), __LINE__, VALIDATION_ERROR_2860026a, "DS", - "Cannot call %s() on descriptor set 0x%" PRIxLEAST64 " that is in use by a command buffer. %s", + "Cannot call %s() on descriptor set 0x%" PRIx64 " that is in use by a command buffer. %s", func_str.c_str(), HandleToUint64(set), validation_error_map[VALIDATION_ERROR_2860026a]); } } @@ -1658,11 +1654,9 @@ bool ValidateCmdQueueFlags(layer_data *dev_data, const GLOBAL_CB_NODE *cb_node, return false; } -static char const * GetCauseStr(VK_OBJECT obj) { - if (obj.type == kVulkanObjectTypeDescriptorSet) - return "destroyed or updated"; - if (obj.type == kVulkanObjectTypeCommandBuffer) - return "destroyed or rerecorded"; +static char const *GetCauseStr(VK_OBJECT obj) { + if (obj.type == kVulkanObjectTypeDescriptorSet) return "destroyed or updated"; + if (obj.type == kVulkanObjectTypeCommandBuffer) return "destroyed or rerecorded"; return "destroyed"; } @@ -1673,12 +1667,79 @@ static bool ReportInvalidCommandBuffer(layer_data *dev_data, const GLOBAL_CB_NOD const char *cause_str = GetCauseStr(obj); skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", - "You are adding %s to command buffer 0x%p that is invalid because bound %s 0x%" PRIxLEAST64 " was %s.", - call_source, cb_state->commandBuffer, type_str, obj.handle, cause_str); + "You are adding %s to command buffer 0x%" PRIx64 " that is invalid because bound %s 0x%" PRIx64 " was %s.", + call_source, HandleToUint64(cb_state->commandBuffer), type_str, obj.handle, cause_str); } return skip; } +// 'commandBuffer must be in the recording state' valid usage error code for each command +// Note: grepping for ^^^^^^^^^ in vk_validation_database is easily massaged into the following list +// Note: C++11 doesn't automatically devolve enum types to the underlying type for hash traits purposes (fixed in C++14) +using CmdTypeHashType = std::underlying_type::type; +static const std::unordered_map must_be_recording_map = { + {CMD_NONE, VALIDATION_ERROR_UNDEFINED}, // UNMATCHED + {CMD_BEGINQUERY, VALIDATION_ERROR_17802413}, + {CMD_BEGINRENDERPASS, VALIDATION_ERROR_17a02413}, + {CMD_BINDDESCRIPTORSETS, VALIDATION_ERROR_17c02413}, + {CMD_BINDINDEXBUFFER, VALIDATION_ERROR_17e02413}, + {CMD_BINDPIPELINE, VALIDATION_ERROR_18002413}, + {CMD_BINDVERTEXBUFFERS, VALIDATION_ERROR_18202413}, + {CMD_BLITIMAGE, VALIDATION_ERROR_18402413}, + {CMD_CLEARATTACHMENTS, VALIDATION_ERROR_18602413}, + {CMD_CLEARCOLORIMAGE, VALIDATION_ERROR_18802413}, + {CMD_CLEARDEPTHSTENCILIMAGE, VALIDATION_ERROR_18a02413}, + {CMD_COPYBUFFER, VALIDATION_ERROR_18c02413}, + {CMD_COPYBUFFERTOIMAGE, VALIDATION_ERROR_18e02413}, + {CMD_COPYIMAGE, VALIDATION_ERROR_19002413}, + {CMD_COPYIMAGETOBUFFER, VALIDATION_ERROR_19202413}, + {CMD_COPYQUERYPOOLRESULTS, VALIDATION_ERROR_19402413}, + {CMD_DEBUGMARKERBEGINEXT, VALIDATION_ERROR_19602413}, + {CMD_DEBUGMARKERENDEXT, VALIDATION_ERROR_19802413}, + {CMD_DEBUGMARKERINSERTEXT, VALIDATION_ERROR_19a02413}, + {CMD_DISPATCH, VALIDATION_ERROR_19c02413}, + // Exclude KHX (if not already present) { CMD_DISPATCHBASEKHX, VALIDATION_ERROR_19e02413 }, + {CMD_DISPATCHINDIRECT, VALIDATION_ERROR_1a002413}, + {CMD_DRAW, VALIDATION_ERROR_1a202413}, + {CMD_DRAWINDEXED, VALIDATION_ERROR_1a402413}, + {CMD_DRAWINDEXEDINDIRECT, VALIDATION_ERROR_1a602413}, + // Exclude vendor ext (if not already present) { CMD_DRAWINDEXEDINDIRECTCOUNTAMD, VALIDATION_ERROR_1a802413 }, + {CMD_DRAWINDIRECT, VALIDATION_ERROR_1aa02413}, + // Exclude vendor ext (if not already present) { CMD_DRAWINDIRECTCOUNTAMD, VALIDATION_ERROR_1ac02413 }, + {CMD_ENDCOMMANDBUFFER, VALIDATION_ERROR_27400076}, + {CMD_ENDQUERY, VALIDATION_ERROR_1ae02413}, + {CMD_ENDRENDERPASS, VALIDATION_ERROR_1b002413}, + {CMD_EXECUTECOMMANDS, VALIDATION_ERROR_1b202413}, + {CMD_FILLBUFFER, VALIDATION_ERROR_1b402413}, + {CMD_NEXTSUBPASS, VALIDATION_ERROR_1b602413}, + {CMD_PIPELINEBARRIER, VALIDATION_ERROR_1b802413}, + // Exclude vendor ext (if not already present) { CMD_PROCESSCOMMANDSNVX, VALIDATION_ERROR_1ba02413 }, + {CMD_PUSHCONSTANTS, VALIDATION_ERROR_1bc02413}, + {CMD_PUSHDESCRIPTORSETKHR, VALIDATION_ERROR_1be02413}, + {CMD_PUSHDESCRIPTORSETWITHTEMPLATEKHR, VALIDATION_ERROR_1c002413}, + // Exclude vendor ext (if not already present) { CMD_RESERVESPACEFORCOMMANDSNVX, VALIDATION_ERROR_1c202413 }, + {CMD_RESETEVENT, VALIDATION_ERROR_1c402413}, + {CMD_RESETQUERYPOOL, VALIDATION_ERROR_1c602413}, + {CMD_RESOLVEIMAGE, VALIDATION_ERROR_1c802413}, + {CMD_SETBLENDCONSTANTS, VALIDATION_ERROR_1ca02413}, + {CMD_SETDEPTHBIAS, VALIDATION_ERROR_1cc02413}, + {CMD_SETDEPTHBOUNDS, VALIDATION_ERROR_1ce02413}, + // Exclude KHX (if not already present) { CMD_SETDEVICEMASKKHX, VALIDATION_ERROR_1d002413 }, + {CMD_SETDISCARDRECTANGLEEXT, VALIDATION_ERROR_1d202413}, + {CMD_SETEVENT, VALIDATION_ERROR_1d402413}, + {CMD_SETLINEWIDTH, VALIDATION_ERROR_1d602413}, + {CMD_SETSAMPLELOCATIONSEXT, VALIDATION_ERROR_3e202413}, + {CMD_SETSCISSOR, VALIDATION_ERROR_1d802413}, + {CMD_SETSTENCILCOMPAREMASK, VALIDATION_ERROR_1da02413}, + {CMD_SETSTENCILREFERENCE, VALIDATION_ERROR_1dc02413}, + {CMD_SETSTENCILWRITEMASK, VALIDATION_ERROR_1de02413}, + {CMD_SETVIEWPORT, VALIDATION_ERROR_1e002413}, + // Exclude vendor ext (if not already present) { CMD_SETVIEWPORTWSCALINGNV, VALIDATION_ERROR_1e202413 }, + {CMD_UPDATEBUFFER, VALIDATION_ERROR_1e402413}, + {CMD_WAITEVENTS, VALIDATION_ERROR_1e602413}, + {CMD_WRITETIMESTAMP, VALIDATION_ERROR_1e802413}, +}; + // Validate the given command being added to the specified cmd buffer, flagging errors if CB is not in the recording state or if // there's an issue with the Cmd ordering bool ValidateCmd(layer_data *dev_data, const GLOBAL_CB_NODE *cb_state, const CMD_TYPE cmd, const char *caller_name) { @@ -1691,9 +1752,17 @@ bool ValidateCmd(layer_data *dev_data, const GLOBAL_CB_NODE *cb_state, const CMD return ReportInvalidCommandBuffer(dev_data, cb_state, caller_name); default: + auto error_it = must_be_recording_map.find(cmd); + // This assert lets us know that a vkCmd.* entrypoint has been added without enabling it in the map + assert(error_it != must_be_recording_map.cend()); + if (error_it == must_be_recording_map.cend()) { + error_it = must_be_recording_map.find(CMD_NONE); // But we'll handle the asserting case, in case of a test gap + } + const auto error = error_it->second; return log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_NO_BEGIN_COMMAND_BUFFER, "DS", - "You must call vkBeginCommandBuffer() before this call to %s", caller_name); + HandleToUint64(cb_state->commandBuffer), __LINE__, error, "DS", + "You must call vkBeginCommandBuffer() before this call to %s. %s", caller_name, + validation_error_map[error]); } } @@ -1779,7 +1848,7 @@ static void removeCommandBufferBinding(layer_data *dev_data, VK_OBJECT const *ob } // Reset the command buffer state // Maintain the createInfo and set state to CB_NEW, but clear all other state -static void resetCB(layer_data *dev_data, const VkCommandBuffer cb) { +static void ResetCommandBufferState(layer_data *dev_data, const VkCommandBuffer cb) { GLOBAL_CB_NODE *pCB = dev_data->commandBufferMap[cb]; if (pCB) { pCB->in_use.store(0); @@ -1790,6 +1859,7 @@ static void resetCB(layer_data *dev_data, const VkCommandBuffer cb) { pCB->hasDrawCmd = false; pCB->state = CB_NEW; pCB->submitCount = 0; + pCB->image_layout_change_count = 1; // Start at 1. 0 is insert value for validation cache versions, s.t. new == dirty pCB->status = 0; pCB->static_status = 0; pCB->viewportMask = 0; @@ -1819,9 +1889,7 @@ static void resetCB(layer_data *dev_data, const VkCommandBuffer cb) { pCB->primaryCommandBuffer = VK_NULL_HANDLE; // If secondary, invalidate any primary command buffer that may call us. if (pCB->createInfo.level == VK_COMMAND_BUFFER_LEVEL_SECONDARY) { - invalidateCommandBuffers(dev_data, - pCB->linkedCommandBuffers, - {HandleToUint64(cb), kVulkanObjectTypeCommandBuffer}); + invalidateCommandBuffers(dev_data, pCB->linkedCommandBuffers, {HandleToUint64(cb), kVulkanObjectTypeCommandBuffer}); } // Remove reverse command buffer links. @@ -1903,7 +1971,7 @@ bool insideRenderPass(const layer_data *dev_data, const GLOBAL_CB_NODE *pCB, con if (pCB->activeRenderPass) { inside = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, msgCode, "DS", - "%s: It is invalid to issue this call inside an active render pass (0x%" PRIxLEAST64 "). %s", apiName, + "%s: It is invalid to issue this call inside an active render pass (0x%" PRIx64 "). %s", apiName, HandleToUint64(pCB->activeRenderPass->renderPass), validation_error_map[msgCode]); } return inside; @@ -1928,7 +1996,7 @@ static void init_core_validation(instance_layer_data *instance_data, const VkAll } // For the given ValidationCheck enum, set all relevant instance disabled flags to true -void SetDisabledFlags(instance_layer_data *instance_data, VkValidationFlagsEXT *val_flags_struct) { +void SetDisabledFlags(instance_layer_data *instance_data, const VkValidationFlagsEXT *val_flags_struct) { for (uint32_t i = 0; i < val_flags_struct->disabledValidationCheckCount; ++i) { switch (val_flags_struct->pDisabledValidationChecks[i]) { case VK_VALIDATION_CHECK_SHADERS_EXT: @@ -1969,15 +2037,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat ValidateLayerOrdering(*pCreateInfo); // Parse any pNext chains - if (pCreateInfo->pNext) { - GENERIC_HEADER *struct_header = (GENERIC_HEADER *)pCreateInfo->pNext; - while (struct_header) { - // Check for VkValidationFlagsExt - if (VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT == struct_header->sType) { - SetDisabledFlags(instance_data, (VkValidationFlagsEXT *)struct_header); - } - struct_header = (GENERIC_HEADER *)struct_header->pNext; - } + const auto *validation_flags_ext = lvl_find_in_chain(pCreateInfo->pNext); + if (validation_flags_ext) { + SetDisabledFlags(instance_data, validation_flags_ext); } return result; @@ -2058,17 +2120,15 @@ static bool ValidateDeviceQueueCreateInfos(instance_layer_data *instance_data, c if (!queue_family_has_props || requested_queue_count > pd_state->queue_family_properties[requested_queue_family].queueCount) { - skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(pd_state->phys_device), __LINE__, - VALIDATION_ERROR_06c002fc, "DL", - "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueCount (=%" PRIu32 - ") is not " - "less than or equal to available queue count for this " - "pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex} (=%" PRIu32 - ") obtained previously " - "from vkGetPhysicalDeviceQueueFamilyProperties%s (%s). %s", - i, requested_queue_count, i, requested_queue_family, conditional_ext_cmd, count_note.c_str(), - validation_error_map[VALIDATION_ERROR_06c002fc]); + skip |= log_msg( + instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, + HandleToUint64(pd_state->phys_device), __LINE__, VALIDATION_ERROR_06c002fc, "DL", + "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueCount (=%" PRIu32 + ") is not less than or equal to available queue count for this pCreateInfo->pQueueCreateInfos[%" PRIu32 + "].queueFamilyIndex} (=%" PRIu32 + ") obtained previously from vkGetPhysicalDeviceQueueFamilyProperties%s (%s). %s", + i, requested_queue_count, i, requested_queue_family, conditional_ext_cmd, count_note.c_str(), + validation_error_map[VALIDATION_ERROR_06c002fc]); } } } @@ -2092,8 +2152,8 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const if (requested[i] > actual[i]) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_INVALID_FEATURE_REQUESTED, "DL", - "While calling vkCreateDevice(), requesting feature '%s' in VkPhysicalDeviceFeatures struct, " - "which is not available on this device.", + "While calling vkCreateDevice(), requesting feature '%s' in VkPhysicalDeviceFeatures struct, which is " + "not available on this device.", GetPhysDevFeatureString(i)); errors++; } @@ -2103,8 +2163,8 @@ static bool ValidateRequestedFeatures(instance_layer_data *instance_data, const // TODO: Verify this against the spec. I believe this is an invalid use of the API and should return an error skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_INVALID_FEATURE_REQUESTED, "DL", - "You requested features that are unavailable on this device. You should first query feature " - "availability by calling vkGetPhysicalDeviceFeatures()."); + "You requested features that are unavailable on this device. You should first query feature availability " + "by calling vkGetPhysicalDeviceFeatures()."); } return skip; } @@ -2126,9 +2186,19 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice } // Check that any requested features are available - if (pCreateInfo->pEnabledFeatures) { - skip |= ValidateRequestedFeatures(instance_data, pd_state, pCreateInfo->pEnabledFeatures); + // The enabled features can come from either pEnabledFeatures, or from the pNext chain + const VkPhysicalDeviceFeatures *enabled_features_found = pCreateInfo->pEnabledFeatures; + if (nullptr == enabled_features_found) { + const auto *features2 = lvl_find_in_chain(pCreateInfo->pNext); + if (features2) { + enabled_features_found = &(features2->features); + } + } + + if (enabled_features_found) { + skip |= ValidateRequestedFeatures(instance_data, pd_state, enabled_features_found); } + skip |= ValidateDeviceQueueCreateInfos(instance_data, pd_state, pCreateInfo->queueCreateInfoCount, pCreateInfo->pQueueCreateInfos); @@ -2175,14 +2245,23 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice instance_data->dispatch_table.GetPhysicalDeviceQueueFamilyProperties( gpu, &count, &device_data->phys_dev_properties.queue_family_properties[0]); // TODO: device limits should make sure these are compatible - if (pCreateInfo->pEnabledFeatures) { - device_data->enabled_features = *pCreateInfo->pEnabledFeatures; + if (enabled_features_found) { + device_data->enabled_features = *enabled_features_found; } else { memset(&device_data->enabled_features, 0, sizeof(VkPhysicalDeviceFeatures)); } // Store physical device properties and physical device mem limits into device layer_data structs instance_data->dispatch_table.GetPhysicalDeviceMemoryProperties(gpu, &device_data->phys_dev_mem_props); instance_data->dispatch_table.GetPhysicalDeviceProperties(gpu, &device_data->phys_dev_props); + + if (device_data->extensions.vk_khr_push_descriptor) { + // Get the needed push_descriptor limits + auto push_descriptor_prop = lvl_init_struct(); + auto prop2 = lvl_init_struct(&push_descriptor_prop); + instance_data->dispatch_table.GetPhysicalDeviceProperties2KHR(gpu, &prop2); + device_data->phys_dev_ext_props.max_push_descriptors = push_descriptor_prop.maxPushDescriptors; + } + lock.unlock(); ValidateLayerOrdering(*pCreateInfo); @@ -2238,17 +2317,17 @@ static bool ValidateStageMaskGsTsEnables(layer_data *dev_data, VkPipelineStageFl if (!dev_data->enabled_features.geometryShader && (stageMask & VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, geo_error_id, "DL", - "%s call includes a stageMask with VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT bit set when " - "device does not have geometryShader feature enabled. %s", + "%s call includes a stageMask with VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT bit set when device does not have " + "geometryShader feature enabled. %s", caller, validation_error_map[geo_error_id]); } if (!dev_data->enabled_features.tessellationShader && (stageMask & (VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, tess_error_id, "DL", - "%s call includes a stageMask with VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT " - "and/or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT bit(s) set when device " - "does not have tessellationShader feature enabled. %s", + "%s call includes a stageMask with VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT and/or " + "VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT bit(s) set when device does not have " + "tessellationShader feature enabled. %s", caller, validation_error_map[tess_error_id]); } return skip; @@ -2295,10 +2374,10 @@ static bool VerifyQueueStateToSeq(layer_data *dev_data, QUEUE_STATE *initial_que bool skip = false; // sequence number we want to validate up to, per queue - std::unordered_map target_seqs { { initial_queue, initial_seq } }; + std::unordered_map target_seqs{{initial_queue, initial_seq}}; // sequence number we've completed validation for, per queue std::unordered_map done_seqs; - std::vector worklist { initial_queue }; + std::vector worklist{initial_queue}; while (worklist.size()) { auto queue = worklist.back(); @@ -2312,8 +2391,7 @@ static bool VerifyQueueStateToSeq(layer_data *dev_data, QUEUE_STATE *initial_que for (auto &wait : sub_it->waitSemaphores) { auto other_queue = GetQueueState(dev_data, wait.queue); - if (other_queue == queue) - continue; // semaphores /always/ point backwards, so no point here. + if (other_queue == queue) continue; // semaphores /always/ point backwards, so no point here. auto other_target_seq = std::max(target_seqs[other_queue], wait.seq); auto other_done_seq = std::max(done_seqs[other_queue], other_queue->seq); @@ -2356,7 +2434,7 @@ static bool VerifyQueueStateToSeq(layer_data *dev_data, QUEUE_STATE *initial_que // When the given fence is retired, verify outstanding queue operations through the point of the fence static bool VerifyQueueStateToFence(layer_data *dev_data, VkFence fence) { auto fence_state = GetFenceNode(dev_data, fence); - if (VK_NULL_HANDLE != fence_state->signaler.first) { + if (fence_state->scope == kSyncScopeInternal && VK_NULL_HANDLE != fence_state->signaler.first) { return VerifyQueueStateToSeq(dev_data, GetQueueState(dev_data, fence_state->signaler.first), fence_state->signaler.second); } return false; @@ -2396,6 +2474,13 @@ static void RetireWorkOnQueue(layer_data *dev_data, QUEUE_STATE *pQueue, uint64_ } } + for (auto &semaphore : submission.externalSemaphores) { + auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); + if (pSemaphore) { + pSemaphore->in_use.fetch_sub(1); + } + } + for (auto cb : submission.cbs) { auto cb_node = GetCBNode(dev_data, cb); if (!cb_node) { @@ -2428,7 +2513,7 @@ static void RetireWorkOnQueue(layer_data *dev_data, QUEUE_STATE *pQueue, uint64_ } auto pFence = GetFenceNode(dev_data, submission.fence); - if (pFence) { + if (pFence && pFence->scope == kSyncScopeInternal) { pFence->state = FENCE_RETIRED; } @@ -2456,8 +2541,8 @@ static bool validateCommandBufferSimultaneousUse(layer_data *dev_data, GLOBAL_CB !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, VALIDATION_ERROR_31a0008e, "DS", - "Command Buffer 0x%p is already in use and is not marked for simultaneous use. %s", pCB->commandBuffer, - validation_error_map[VALIDATION_ERROR_31a0008e]); + "Command Buffer 0x%" PRIx64 " is already in use and is not marked for simultaneous use. %s", + HandleToUint64(pCB->commandBuffer), validation_error_map[VALIDATION_ERROR_31a0008e]); } return skip; } @@ -2471,9 +2556,10 @@ static bool validateCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *cb_ (cb_state->submitCount + current_submit_count > 1)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, DRAWSTATE_COMMAND_BUFFER_SINGLE_SUBMIT_VIOLATION, "DS", - "Commandbuffer 0x%p was begun w/ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT " - "set, but has been submitted 0x%" PRIxLEAST64 " times.", - cb_state->commandBuffer, cb_state->submitCount + current_submit_count); + "Commandbuffer 0x%" PRIx64 + " was begun w/ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has been submitted 0x%" PRIxLEAST64 + " times.", + HandleToUint64(cb_state->commandBuffer), cb_state->submitCount + current_submit_count); } // Validate that cmd buffers have been updated @@ -2486,15 +2572,15 @@ static bool validateCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *cb_ case CB_NEW: skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, (uint64_t)(cb_state->commandBuffer), __LINE__, vu_id, "DS", - "Command buffer 0x%p used in the call to %s is unrecorded and contains no commands. %s", - cb_state->commandBuffer, call_source, validation_error_map[vu_id]); + "Command buffer 0x%" PRIx64 " used in the call to %s is unrecorded and contains no commands. %s", + HandleToUint64(cb_state->commandBuffer), call_source, validation_error_map[vu_id]); break; case CB_RECORDING: skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_NO_END_COMMAND_BUFFER, "DS", - "You must call vkEndCommandBuffer() on command buffer 0x%p before this call to %s!", - cb_state->commandBuffer, call_source); + "You must call vkEndCommandBuffer() on command buffer 0x%" PRIx64 " before this call to %s!", + HandleToUint64(cb_state->commandBuffer), call_source); break; default: /* recorded */ @@ -2512,7 +2598,7 @@ static bool validateResources(layer_data *dev_data, GLOBAL_CB_NODE *cb_node) { for (auto drawDataElement : cb_node->drawData) { for (auto buffer : drawDataElement.buffers) { auto buffer_state = GetBufferState(dev_data, buffer); - if (!buffer_state) { + if (buffer != VK_NULL_HANDLE && !buffer_state) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, HandleToUint64(buffer), __LINE__, DRAWSTATE_INVALID_BUFFER, "DS", "Cannot submit cmd buffer using deleted buffer 0x%" PRIx64 ".", HandleToUint64(buffer)); @@ -2537,11 +2623,12 @@ bool ValidImageBufferQueue(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, const } if (!found) { - skip = log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object->type], object->handle, __LINE__, - DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", "vkQueueSubmit: Command buffer 0x%" PRIxLEAST64 " contains %s 0x%" PRIxLEAST64 - " which was not created allowing concurrent access to this queue family %d.", - HandleToUint64(cb_node->commandBuffer), object_string[object->type], object->handle, queue_state->queueFamilyIndex); + skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object->type], + object->handle, __LINE__, DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", + "vkQueueSubmit: Command buffer 0x%" PRIx64 " contains %s 0x%" PRIx64 + " which was not created allowing concurrent access to this queue family %d.", + HandleToUint64(cb_node->commandBuffer), object_string[object->type], object->handle, + queue_state->queueFamilyIndex); } } return skip; @@ -2558,10 +2645,10 @@ static bool validateQueueFamilyIndices(layer_data *dev_data, GLOBAL_CB_NODE *pCB if (pPool->queueFamilyIndex != queue_state->queueFamilyIndex) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, VALIDATION_ERROR_31a00094, "DS", - "vkQueueSubmit: Primary command buffer 0x%p created in queue family %d is being submitted on queue " - "0x%p from queue family %d. %s", - pCB->commandBuffer, pPool->queueFamilyIndex, queue, queue_state->queueFamilyIndex, - validation_error_map[VALIDATION_ERROR_31a00094]); + "vkQueueSubmit: Primary command buffer 0x%" PRIx64 + " created in queue family %d is being submitted on queue 0x%" PRIx64 " from queue family %d. %s", + HandleToUint64(pCB->commandBuffer), pPool->queueFamilyIndex, HandleToUint64(queue), + queue_state->queueFamilyIndex, validation_error_map[VALIDATION_ERROR_31a00094]); } // Ensure that any bound images or buffers created with SHARING_MODE_CONCURRENT have access to the current queue family @@ -2602,10 +2689,11 @@ static bool validatePrimaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NO !(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, VALIDATION_ERROR_31a00092, "DS", - "Commandbuffer 0x%p was submitted with secondary buffer 0x%p but that buffer has subsequently been bound to " - "primary cmd buffer 0x%p and it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set. %s", - pCB->commandBuffer, pSubCB->commandBuffer, pSubCB->primaryCommandBuffer, - validation_error_map[VALIDATION_ERROR_31a00092]); + "Commandbuffer 0x%" PRIx64 " was submitted with secondary buffer 0x%" PRIx64 + " but that buffer has subsequently been bound to primary cmd buffer 0x%" PRIx64 + " and it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set. %s", + HandleToUint64(pCB->commandBuffer), HandleToUint64(pSubCB->commandBuffer), + HandleToUint64(pSubCB->primaryCommandBuffer), validation_error_map[VALIDATION_ERROR_31a00092]); } } @@ -2617,7 +2705,7 @@ static bool validatePrimaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NO static bool ValidateFenceForSubmit(layer_data *dev_data, FENCE_NODE *pFence) { bool skip = false; - if (pFence) { + if (pFence && pFence->scope == kSyncScopeInternal) { if (pFence->state == FENCE_INFLIGHT) { // TODO: opportunities for VALIDATION_ERROR_31a00080, VALIDATION_ERROR_316008b4, VALIDATION_ERROR_16400a0e skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, @@ -2629,7 +2717,7 @@ static bool ValidateFenceForSubmit(layer_data *dev_data, FENCE_NODE *pFence) { // TODO: opportunities for VALIDATION_ERROR_31a0007e, VALIDATION_ERROR_316008b2, VALIDATION_ERROR_16400a0e skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, HandleToUint64(pFence->fence), __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM", - "Fence 0x%" PRIxLEAST64 " submitted in SIGNALED state. Fences must be reset before being submitted", + "Fence 0x%" PRIx64 " submitted in SIGNALED state. Fences must be reset before being submitted", HandleToUint64(pFence->fence)); } } @@ -2639,12 +2727,34 @@ static bool ValidateFenceForSubmit(layer_data *dev_data, FENCE_NODE *pFence) { static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence) { + uint64_t early_retire_seq = 0; auto pQueue = GetQueueState(dev_data, queue); auto pFence = GetFenceNode(dev_data, fence); - // Mark the fence in-use. if (pFence) { - SubmitFence(pQueue, pFence, std::max(1u, submitCount)); + if (pFence->scope == kSyncScopeInternal) { + // Mark fence in use + SubmitFence(pQueue, pFence, std::max(1u, submitCount)); + if (!submitCount) { + // If no submissions, but just dropping a fence on the end of the queue, + // record an empty submission with just the fence, so we can determine + // its completion. + pQueue->submissions.emplace_back(std::vector(), std::vector(), + std::vector(), std::vector(), fence); + } + } else { + // Retire work up until this fence early, we will not see the wait that corresponds to this signal + early_retire_seq = pQueue->seq + pQueue->submissions.size(); + if (!dev_data->external_sync_warning) { + dev_data->external_sync_warning = true; + log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, + HandleToUint64(fence), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + "vkQueueSubmit(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64 + " will disable validation of preceding command buffer lifecycle states and the in-use status of associated " + "objects.", + HandleToUint64(fence), HandleToUint64(queue)); + } + } } // Now process each individual submit @@ -2653,27 +2763,50 @@ static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint3 const VkSubmitInfo *submit = &pSubmits[submit_idx]; vector semaphore_waits; vector semaphore_signals; + vector semaphore_externals; for (uint32_t i = 0; i < submit->waitSemaphoreCount; ++i) { VkSemaphore semaphore = submit->pWaitSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); if (pSemaphore) { - if (pSemaphore->signaler.first != VK_NULL_HANDLE) { - semaphore_waits.push_back({semaphore, pSemaphore->signaler.first, pSemaphore->signaler.second}); + if (pSemaphore->scope == kSyncScopeInternal) { + if (pSemaphore->signaler.first != VK_NULL_HANDLE) { + semaphore_waits.push_back({semaphore, pSemaphore->signaler.first, pSemaphore->signaler.second}); + pSemaphore->in_use.fetch_add(1); + } + pSemaphore->signaler.first = VK_NULL_HANDLE; + pSemaphore->signaled = false; + } else { + semaphore_externals.push_back(semaphore); pSemaphore->in_use.fetch_add(1); + if (pSemaphore->scope == kSyncScopeExternalTemporary) { + pSemaphore->scope = kSyncScopeInternal; + } } - pSemaphore->signaler.first = VK_NULL_HANDLE; - pSemaphore->signaled = false; } } for (uint32_t i = 0; i < submit->signalSemaphoreCount; ++i) { VkSemaphore semaphore = submit->pSignalSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); if (pSemaphore) { - pSemaphore->signaler.first = queue; - pSemaphore->signaler.second = pQueue->seq + pQueue->submissions.size() + 1; - pSemaphore->signaled = true; - pSemaphore->in_use.fetch_add(1); - semaphore_signals.push_back(semaphore); + if (pSemaphore->scope == kSyncScopeInternal) { + pSemaphore->signaler.first = queue; + pSemaphore->signaler.second = pQueue->seq + pQueue->submissions.size() + 1; + pSemaphore->signaled = true; + pSemaphore->in_use.fetch_add(1); + semaphore_signals.push_back(semaphore); + } else { + // Retire work up until this submit early, we will not see the wait that corresponds to this signal + early_retire_seq = std::max(early_retire_seq, pQueue->seq + pQueue->submissions.size() + 1); + if (!dev_data->external_sync_warning) { + dev_data->external_sync_warning = true; + log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, + HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + "vkQueueSubmit(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64 + " will disable validation of preceding command buffer lifecycle states and the in-use status of " + "associated objects.", + HandleToUint64(semaphore), HandleToUint64(queue)); + } + } } } for (uint32_t i = 0; i < submit->commandBufferCount; i++) { @@ -2682,24 +2815,19 @@ static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint3 cbs.push_back(submit->pCommandBuffers[i]); for (auto secondaryCmdBuffer : cb_node->linkedCommandBuffers) { cbs.push_back(secondaryCmdBuffer->commandBuffer); + UpdateCmdBufImageLayouts(dev_data, secondaryCmdBuffer); + incrementResources(dev_data, secondaryCmdBuffer); } UpdateCmdBufImageLayouts(dev_data, cb_node); incrementResources(dev_data, cb_node); - for (auto secondaryCmdBuffer : cb_node->linkedCommandBuffers) { - incrementResources(dev_data, secondaryCmdBuffer); - } } } - pQueue->submissions.emplace_back(cbs, semaphore_waits, semaphore_signals, + pQueue->submissions.emplace_back(cbs, semaphore_waits, semaphore_signals, semaphore_externals, submit_idx == submitCount - 1 ? fence : VK_NULL_HANDLE); } - if (pFence && !submitCount) { - // If no submissions, but just dropping a fence on the end of the queue, - // record an empty submission with just the fence, so we can determine - // its completion. - pQueue->submissions.emplace_back(std::vector(), std::vector(), std::vector(), - fence); + if (early_retire_seq) { + RetireWorkOnQueue(dev_data, pQueue, early_retire_seq); } } @@ -2713,6 +2841,7 @@ static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint unordered_set signaled_semaphores; unordered_set unsignaled_semaphores; + unordered_set internal_semaphores; vector current_cmds; unordered_map localImageLayoutMap; // Now verify each individual submit @@ -2723,29 +2852,32 @@ static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint VALIDATION_ERROR_13c00098, VALIDATION_ERROR_13c0009a); VkSemaphore semaphore = submit->pWaitSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore) { + if (pSemaphore && (pSemaphore->scope == kSyncScopeInternal || internal_semaphores.count(semaphore))) { if (unsignaled_semaphores.count(semaphore) || (!(signaled_semaphores.count(semaphore)) && !(pSemaphore->signaled))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Queue 0x%p is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", queue, - HandleToUint64(semaphore)); + "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", + HandleToUint64(queue), HandleToUint64(semaphore)); } else { signaled_semaphores.erase(semaphore); unsignaled_semaphores.insert(semaphore); } } + if (pSemaphore && pSemaphore->scope == kSyncScopeExternalTemporary) { + internal_semaphores.insert(semaphore); + } } for (uint32_t i = 0; i < submit->signalSemaphoreCount; ++i) { VkSemaphore semaphore = submit->pSignalSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore) { + if (pSemaphore && (pSemaphore->scope == kSyncScopeInternal || internal_semaphores.count(semaphore))) { if (signaled_semaphores.count(semaphore) || (!(unsignaled_semaphores.count(semaphore)) && pSemaphore->signaled)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Queue 0x%p is signaling semaphore 0x%" PRIx64 + "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".", - queue, HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); + HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); } else { unsignaled_semaphores.erase(semaphore); signaled_semaphores.insert(semaphore); @@ -2862,25 +2994,24 @@ static void PostCallRecordFreeMemory(layer_data *dev_data, VkDeviceMemory mem, D // Clear mem binding for any bound objects for (auto obj : mem_info->obj_bindings) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, get_debug_report_enum[obj.type], obj.handle, __LINE__, - MEMTRACK_FREED_MEM_REF, "MEM", "VK Object 0x%" PRIxLEAST64 " still has a reference to mem obj 0x%" PRIxLEAST64, - obj.handle, HandleToUint64(mem_info->mem)); + MEMTRACK_FREED_MEM_REF, "MEM", "VK Object 0x%" PRIx64 " still has a reference to mem obj 0x%" PRIx64, + HandleToUint64(obj.handle), HandleToUint64(mem_info->mem)); + BINDABLE *bindable_state = nullptr; switch (obj.type) { - case kVulkanObjectTypeImage: { - auto image_state = GetImageState(dev_data, reinterpret_cast(obj.handle)); - assert(image_state); // Any destroyed images should already be removed from bindings - image_state->binding.mem = MEMORY_UNBOUND; + case kVulkanObjectTypeImage: + bindable_state = GetImageState(dev_data, reinterpret_cast(obj.handle)); break; - } - case kVulkanObjectTypeBuffer: { - auto buffer_state = GetBufferState(dev_data, reinterpret_cast(obj.handle)); - assert(buffer_state); // Any destroyed buffers should already be removed from bindings - buffer_state->binding.mem = MEMORY_UNBOUND; + case kVulkanObjectTypeBuffer: + bindable_state = GetBufferState(dev_data, reinterpret_cast(obj.handle)); break; - } default: // Should only have buffer or image objects bound to memory assert(0); } + + assert(bindable_state); + bindable_state->binding.mem = MEMORY_UNBOUND; + bindable_state->UpdateBoundMemorySet(); } // Any bound cmd buffers are now invalid invalidateCommandBuffers(dev_data, mem_info->cb_bindings, obj_struct); @@ -2921,10 +3052,9 @@ static bool ValidateMapMemRange(layer_data *dev_data, VkDeviceMemory mem, VkDevi auto mem_info = mem_element->second.get(); // It is an application error to call VkMapMemory on an object that is already mapped if (mem_info->mem_range.size != 0) { - skip = - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem), __LINE__, MEMTRACK_INVALID_MAP, "MEM", - "VkMapMemory: Attempting to map memory on an already-mapped object 0x%" PRIxLEAST64, HandleToUint64(mem)); + skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, + HandleToUint64(mem), __LINE__, MEMTRACK_INVALID_MAP, "MEM", + "VkMapMemory: Attempting to map memory on an already-mapped object 0x%" PRIx64, HandleToUint64(mem)); } // Validate that offset + size is within object's allocationSize @@ -2965,7 +3095,7 @@ static bool deleteMemRanges(layer_data *dev_data, VkDeviceMemory mem) { // Valid Usage: memory must currently be mapped skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem), __LINE__, VALIDATION_ERROR_33600562, "MEM", - "Unmapping Memory without memory being mapped: mem obj 0x%" PRIxLEAST64 ". %s", HandleToUint64(mem), + "Unmapping Memory without memory being mapped: mem obj 0x%" PRIx64 ". %s", HandleToUint64(mem), validation_error_map[VALIDATION_ERROR_33600562]); } mem_info->mem_range.size = 0; @@ -2994,8 +3124,8 @@ static void initializeAndTrackMemory(layer_data *dev_data, VkDeviceMemory mem, V size = mem_info->alloc_info.allocationSize - offset; } mem_info->shadow_pad_size = dev_data->phys_dev_properties.properties.limits.minMemoryMapAlignment; - assert(SafeModulo(mem_info->shadow_pad_size, - dev_data->phys_dev_properties.properties.limits.minMemoryMapAlignment) == 0); + assert(SafeModulo(mem_info->shadow_pad_size, dev_data->phys_dev_properties.properties.limits.minMemoryMapAlignment) == + 0); // Ensure start of mapped region reflects hardware alignment constraints uint64_t map_alignment = dev_data->phys_dev_properties.properties.limits.minMemoryMapAlignment; @@ -3010,7 +3140,7 @@ static void initializeAndTrackMemory(layer_data *dev_data, VkDeviceMemory mem, V ~(map_alignment - 1)) + start_offset; assert(SafeModulo(reinterpret_cast(mem_info->shadow_copy) + mem_info->shadow_pad_size - start_offset, - map_alignment) == 0); + map_alignment) == 0); memset(mem_info->shadow_copy, NoncoherentMemoryFillValue, static_cast(2 * mem_info->shadow_pad_size + size)); *ppData = static_cast(mem_info->shadow_copy) + mem_info->shadow_pad_size; @@ -3025,14 +3155,13 @@ static inline bool verifyWaitFenceState(layer_data *dev_data, VkFence fence, con bool skip = false; auto pFence = GetFenceNode(dev_data, fence); - if (pFence) { + if (pFence && pFence->scope == kSyncScopeInternal) { if (pFence->state == FENCE_UNSIGNALED) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, - HandleToUint64(fence), __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM", - "%s called for fence 0x%" PRIxLEAST64 - " which has not been submitted on a Queue or during " - "acquire next image.", - apiCall, HandleToUint64(fence)); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, + HandleToUint64(fence), __LINE__, MEMTRACK_INVALID_FENCE_STATE, "MEM", + "%s called for fence 0x%" PRIx64 " which has not been submitted on a Queue or during acquire next image.", + apiCall, HandleToUint64(fence)); } } return skip; @@ -3040,13 +3169,15 @@ static inline bool verifyWaitFenceState(layer_data *dev_data, VkFence fence, con static void RetireFence(layer_data *dev_data, VkFence fence) { auto pFence = GetFenceNode(dev_data, fence); - if (pFence->signaler.first != VK_NULL_HANDLE) { - // Fence signaller is a queue -- use this as proof that prior operations on that queue have completed. - RetireWorkOnQueue(dev_data, GetQueueState(dev_data, pFence->signaler.first), pFence->signaler.second); - } else { - // Fence signaller is the WSI. We're not tracking what the WSI op actually /was/ in CV yet, but we need to mark - // the fence as retired. - pFence->state = FENCE_RETIRED; + if (pFence->scope == kSyncScopeInternal) { + if (pFence->signaler.first != VK_NULL_HANDLE) { + // Fence signaller is a queue -- use this as proof that prior operations on that queue have completed. + RetireWorkOnQueue(dev_data, GetQueueState(dev_data, pFence->signaler.first), pFence->signaler.second); + } else { + // Fence signaller is the WSI. We're not tracking what the WSI op actually /was/ in CV yet, but we need to mark + // the fence as retired. + pFence->state = FENCE_RETIRED; + } } } @@ -3195,7 +3326,7 @@ static bool PreCallValidateDestroyFence(layer_data *dev_data, VkFence fence, FEN if (dev_data->instance_data->disabled.destroy_fence) return false; bool skip = false; if (*fence_node) { - if ((*fence_node)->state == FENCE_INFLIGHT) { + if ((*fence_node)->scope == kSyncScopeInternal && (*fence_node)->state == FENCE_INFLIGHT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, HandleToUint64(fence), __LINE__, VALIDATION_ERROR_24e008c0, "DS", "Fence 0x%" PRIx64 " is in use. %s", HandleToUint64(fence), validation_error_map[VALIDATION_ERROR_24e008c0]); @@ -3318,64 +3449,60 @@ VKAPI_ATTR void VKAPI_CALL DestroyQueryPool(VkDevice device, VkQueryPool queryPo static bool PreCallValidateGetQueryPoolResults(layer_data *dev_data, VkQueryPool query_pool, uint32_t first_query, uint32_t query_count, VkQueryResultFlags flags, unordered_map> *queries_in_flight) { + bool skip = false; + auto query_pool_state = dev_data->queryPoolMap.find(query_pool); + if (query_pool_state != dev_data->queryPoolMap.end()) { + if ((query_pool_state->second.createInfo.queryType == VK_QUERY_TYPE_TIMESTAMP) && (flags & VK_QUERY_RESULT_PARTIAL_BIT)) { + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, + VALIDATION_ERROR_2fa00664, "DS", + "QueryPool 0x%" PRIx64 + " was created with a queryType of VK_QUERY_TYPE_TIMESTAMP but flags contains VK_QUERY_RESULT_PARTIAL_BIT. %s", + HandleToUint64(query_pool), validation_error_map[VALIDATION_ERROR_2fa00664]); + } + } + // TODO: clean this up, it's insanely wasteful. for (auto cmd_buffer : dev_data->commandBufferMap) { if (cmd_buffer.second->in_use.load()) { for (auto query_state_pair : cmd_buffer.second->queryToStateMap) { - (*queries_in_flight)[query_state_pair.first].push_back( - cmd_buffer.first); + (*queries_in_flight)[query_state_pair.first].push_back(cmd_buffer.first); } } } + if (dev_data->instance_data->disabled.get_query_pool_results) return false; - bool skip = false; for (uint32_t i = 0; i < query_count; ++i) { QueryObject query = {query_pool, first_query + i}; auto qif_pair = queries_in_flight->find(query); auto query_state_pair = dev_data->queryToStateMap.find(query); if (query_state_pair != dev_data->queryToStateMap.end()) { // Available and in flight - if (qif_pair != queries_in_flight->end() && query_state_pair != dev_data->queryToStateMap.end() && - query_state_pair->second) { - for (auto cmd_buffer : qif_pair->second) { - auto cb = GetCBNode(dev_data, cmd_buffer); - auto query_event_pair = cb->waitedEventsBeforeQueryReset.find(query); - if (query_event_pair == cb->waitedEventsBeforeQueryReset.end()) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, DRAWSTATE_INVALID_QUERY, "DS", - "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is in flight.", - HandleToUint64(query_pool), first_query + i); + if (qif_pair != queries_in_flight->end()) { + if (query_state_pair->second) { + for (auto cmd_buffer : qif_pair->second) { + auto cb = GetCBNode(dev_data, cmd_buffer); + auto query_event_pair = cb->waitedEventsBeforeQueryReset.find(query); + if (query_event_pair == cb->waitedEventsBeforeQueryReset.end()) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, DRAWSTATE_INVALID_QUERY, "DS", + "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is in flight.", + HandleToUint64(query_pool), first_query + i); + } } } - // Unavailable and in flight - } else if (qif_pair != queries_in_flight->end() && query_state_pair != dev_data->queryToStateMap.end() && - !query_state_pair->second) { - // TODO : Can there be the same query in use by multiple command buffers in flight? - bool make_available = false; - for (auto cmd_buffer : qif_pair->second) { - auto cb = GetCBNode(dev_data, cmd_buffer); - make_available |= cb->queryToStateMap[query]; - } - if (!(((flags & VK_QUERY_RESULT_PARTIAL_BIT) || (flags & VK_QUERY_RESULT_WAIT_BIT)) && make_available)) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, DRAWSTATE_INVALID_QUERY, "DS", - "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is unavailable.", - HandleToUint64(query_pool), first_query + i); - } - // Unavailable - } else if (query_state_pair != dev_data->queryToStateMap.end() && !query_state_pair->second) { + } else if (!query_state_pair->second) { // Unavailable and Not in flight skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, DRAWSTATE_INVALID_QUERY, "DS", "Cannot get query results on queryPool 0x%" PRIx64 " with index %d which is unavailable.", HandleToUint64(query_pool), first_query + i); - // Uninitialized - } else if (query_state_pair == dev_data->queryToStateMap.end()) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, - __LINE__, DRAWSTATE_INVALID_QUERY, "DS", - "Cannot get query results on queryPool 0x%" PRIx64 - " with index %d as data has not been collected for this index.", - HandleToUint64(query_pool), first_query + i); } + } else { // Uninitialized + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, + __LINE__, DRAWSTATE_INVALID_QUERY, "DS", + "Cannot get query results on queryPool 0x%" PRIx64 + " with index %d as data has not been collected for this index.", + HandleToUint64(query_pool), first_query + i); } } return skip; @@ -3450,13 +3577,13 @@ static bool rangesIntersect(layer_data const *dev_data, MEMORY_RANGE const *rang const char *r2_linear_str = range2->linear ? "linear" : "non-linear"; const char *r2_type_str = range2->image ? "image" : "buffer"; auto obj_type = range1->image ? VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT : VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT; - *skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, obj_type, range1->handle, 0, - MEMTRACK_INVALID_ALIASING, "MEM", "%s %s 0x%" PRIx64 " is aliased with %s %s 0x%" PRIx64 - " which may indicate a bug. For further info refer to the " - "Buffer-Image Granularity section of the Vulkan specification. " - "(https://www.khronos.org/registry/vulkan/specs/1.0-extensions/" - "xhtml/vkspec.html#resources-bufferimagegranularity)", - r1_linear_str, r1_type_str, range1->handle, r2_linear_str, r2_type_str, range2->handle); + *skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, obj_type, range1->handle, 0, MEMTRACK_INVALID_ALIASING, "MEM", + "%s %s 0x%" PRIx64 " is aliased with %s %s 0x%" PRIx64 + " which may indicate a bug. For further info refer to the Buffer-Image Granularity section of the Vulkan " + "specification. " + "(https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#resources-bufferimagegranularity)", + r1_linear_str, r1_type_str, range1->handle, r2_linear_str, r2_type_str, range2->handle); } // Ranges intersect return true; @@ -3518,10 +3645,10 @@ static bool ValidateInsertMemoryRange(layer_data const *dev_data, uint64_t handl UNIQUE_VALIDATION_ERROR_CODE error_code = is_image ? VALIDATION_ERROR_1740082c : VALIDATION_ERROR_1700080e; skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_info->mem), __LINE__, error_code, "MEM", - "In %s, attempting to bind memory (0x%" PRIxLEAST64 ") to object (0x%" PRIxLEAST64 - "), memoryOffset=0x%" PRIxLEAST64 " must be less than the memory allocation size 0x%" PRIxLEAST64 ". %s", - api_name, HandleToUint64(mem_info->mem), handle, memoryOffset, mem_info->alloc_info.allocationSize, - validation_error_map[error_code]); + "In %s, attempting to bind memory (0x%" PRIx64 ") to object (0x%" PRIx64 "), memoryOffset=0x%" PRIxLEAST64 + " must be less than the memory allocation size 0x%" PRIxLEAST64 ". %s", + api_name, HandleToUint64(mem_info->mem), HandleToUint64(handle), memoryOffset, + mem_info->alloc_info.allocationSize, validation_error_map[error_code]); } return skip; @@ -3675,22 +3802,22 @@ static bool ValidateMemoryTypes(const layer_data *dev_data, const DEVICE_MEM_INF } static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffer, BUFFER_STATE *buffer_state, VkDeviceMemory mem, - VkDeviceSize memoryOffset) { + VkDeviceSize memoryOffset, const char *api_name) { bool skip = false; if (buffer_state) { unique_lock_t lock(global_lock); // Track objects tied to memory uint64_t buffer_handle = HandleToUint64(buffer); - skip = ValidateSetMemBinding(dev_data, mem, buffer_handle, kVulkanObjectTypeBuffer, "vkBindBufferMemory()"); + skip = ValidateSetMemBinding(dev_data, mem, buffer_handle, kVulkanObjectTypeBuffer, api_name); if (!buffer_state->memory_requirements_checked) { // There's not an explicit requirement in the spec to call vkGetBufferMemoryRequirements() prior to calling // BindBufferMemory, but it's implied in that memory being bound must conform with VkMemoryRequirements from // vkGetBufferMemoryRequirements() skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, buffer_handle, __LINE__, DRAWSTATE_INVALID_BUFFER, "DS", - "vkBindBufferMemory(): Binding memory to buffer 0x%" PRIxLEAST64 + "%s: Binding memory to buffer 0x%" PRIx64 " but vkGetBufferMemoryRequirements() has not been called on that buffer.", - buffer_handle); + api_name, HandleToUint64(buffer_handle)); // Make the call for them so we can verify the state lock.unlock(); dev_data->dispatch_table.GetBufferMemoryRequirements(dev_data->device, buffer, &buffer_state->requirements); @@ -3700,9 +3827,8 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe // Validate bound memory range information auto mem_info = GetMemObjInfo(dev_data, mem); if (mem_info) { - skip |= ValidateInsertBufferMemoryRange(dev_data, buffer, mem_info, memoryOffset, buffer_state->requirements, - "vkBindBufferMemory()"); - skip |= ValidateMemoryTypes(dev_data, mem_info, buffer_state->requirements.memoryTypeBits, "vkBindBufferMemory()", + skip |= ValidateInsertBufferMemoryRange(dev_data, buffer, mem_info, memoryOffset, buffer_state->requirements, api_name); + skip |= ValidateMemoryTypes(dev_data, mem_info, buffer_state->requirements.memoryTypeBits, api_name, VALIDATION_ERROR_17000816); } @@ -3710,23 +3836,24 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe if (SafeModulo(memoryOffset, buffer_state->requirements.alignment) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, buffer_handle, __LINE__, VALIDATION_ERROR_17000818, "DS", - "vkBindBufferMemory(): memoryOffset is 0x%" PRIxLEAST64 - " but must be an integer multiple of the " - "VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 + "%s: memoryOffset is 0x%" PRIxLEAST64 + " but must be an integer multiple of the VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 ", returned from a call to vkGetBufferMemoryRequirements with buffer. %s", - memoryOffset, buffer_state->requirements.alignment, validation_error_map[VALIDATION_ERROR_17000818]); + api_name, memoryOffset, buffer_state->requirements.alignment, + validation_error_map[VALIDATION_ERROR_17000818]); } // Validate memory requirements size - if (buffer_state->requirements.size > (mem_info->alloc_info.allocationSize - memoryOffset)) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, - buffer_handle, __LINE__, VALIDATION_ERROR_1700081a, "DS", - "vkBindBufferMemory(): memory size minus memoryOffset is 0x%" PRIxLEAST64 - " but must be at least as large as " - "VkMemoryRequirements::size value 0x%" PRIxLEAST64 - ", returned from a call to vkGetBufferMemoryRequirements with buffer. %s", - mem_info->alloc_info.allocationSize - memoryOffset, buffer_state->requirements.size, - validation_error_map[VALIDATION_ERROR_1700081a]); + if (mem_info) { + if (buffer_state->requirements.size > (mem_info->alloc_info.allocationSize - memoryOffset)) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, + buffer_handle, __LINE__, VALIDATION_ERROR_1700081a, "DS", + "%s: memory size minus memoryOffset is 0x%" PRIxLEAST64 + " but must be at least as large as VkMemoryRequirements::size value 0x%" PRIxLEAST64 + ", returned from a call to vkGetBufferMemoryRequirements with buffer. %s", + api_name, mem_info->alloc_info.allocationSize - memoryOffset, buffer_state->requirements.size, + validation_error_map[VALIDATION_ERROR_1700081a]); + } } // Validate device limits alignments @@ -3753,12 +3880,12 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe for (int i = 0; i < 3; i++) { if (usage & usage_list[i]) { if (SafeModulo(memoryOffset, offset_requirement[i]) != 0) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, buffer_handle, - __LINE__, msgCode[i], "DS", "vkBindBufferMemory(): %s memoryOffset is 0x%" PRIxLEAST64 - " but must be a multiple of " - "device limit %s 0x%" PRIxLEAST64 ". %s", - memory_type[i], memoryOffset, offset_name[i], offset_requirement[i], validation_error_map[msgCode[i]]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, + buffer_handle, __LINE__, msgCode[i], "DS", + "%s: %s memoryOffset is 0x%" PRIxLEAST64 + " but must be a multiple of device limit %s 0x%" PRIxLEAST64 ". %s", + api_name, memory_type[i], memoryOffset, offset_name[i], offset_requirement[i], + validation_error_map[msgCode[i]]); } } } @@ -3767,7 +3894,7 @@ static bool PreCallValidateBindBufferMemory(layer_data *dev_data, VkBuffer buffe } static void PostCallRecordBindBufferMemory(layer_data *dev_data, VkBuffer buffer, BUFFER_STATE *buffer_state, VkDeviceMemory mem, - VkDeviceSize memoryOffset) { + VkDeviceSize memoryOffset, const char *api_name) { if (buffer_state) { unique_lock_t lock(global_lock); // Track bound memory range information @@ -3778,49 +3905,190 @@ static void PostCallRecordBindBufferMemory(layer_data *dev_data, VkBuffer buffer // Track objects tied to memory uint64_t buffer_handle = HandleToUint64(buffer); - SetMemBinding(dev_data, mem, buffer_handle, kVulkanObjectTypeBuffer, "vkBindBufferMemory()"); - - buffer_state->binding.mem = mem; - buffer_state->binding.offset = memoryOffset; - buffer_state->binding.size = buffer_state->requirements.size; + SetMemBinding(dev_data, mem, buffer_state, memoryOffset, buffer_handle, kVulkanObjectTypeBuffer, api_name); } } VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto buffer_state = GetBufferState(dev_data, buffer); - bool skip = PreCallValidateBindBufferMemory(dev_data, buffer, buffer_state, mem, memoryOffset); + BUFFER_STATE *buffer_state; + { + unique_lock_t lock(global_lock); + buffer_state = GetBufferState(dev_data, buffer); + } + bool skip = PreCallValidateBindBufferMemory(dev_data, buffer, buffer_state, mem, memoryOffset, "vkBindBufferMemory()"); if (!skip) { result = dev_data->dispatch_table.BindBufferMemory(device, buffer, mem, memoryOffset); if (result == VK_SUCCESS) { - PostCallRecordBindBufferMemory(dev_data, buffer, buffer_state, mem, memoryOffset); + PostCallRecordBindBufferMemory(dev_data, buffer, buffer_state, mem, memoryOffset, "vkBindBufferMemory()"); } } return result; } -VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, - VkMemoryRequirements *pMemoryRequirements) { +static bool PreCallValidateBindBufferMemory2KHR(layer_data *dev_data, std::vector *buffer_state, + uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR *pBindInfos) { + { + unique_lock_t lock(global_lock); + for (uint32_t i = 0; i < bindInfoCount; i++) { + (*buffer_state)[i] = GetBufferState(dev_data, pBindInfos[i].buffer); + } + } + bool skip = false; + char api_name[64]; + for (uint32_t i = 0; i < bindInfoCount; i++) { + sprintf(api_name, "vkBindBufferMemory2KHR() pBindInfos[%u]", i); + skip |= PreCallValidateBindBufferMemory(dev_data, pBindInfos[i].buffer, (*buffer_state)[i], pBindInfos[i].memory, + pBindInfos[i].memoryOffset, api_name); + } + return skip; +} + +static void PostCallRecordBindBufferMemory2KHR(layer_data *dev_data, const std::vector &buffer_state, + uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR *pBindInfos) { + for (uint32_t i = 0; i < bindInfoCount; i++) { + PostCallRecordBindBufferMemory(dev_data, pBindInfos[i].buffer, buffer_state[i], pBindInfos[i].memory, + pBindInfos[i].memoryOffset, "vkBindBufferMemory2KHR()"); + } +} + +VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, + const VkBindBufferMemoryInfoKHR *pBindInfos) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - dev_data->dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); - auto buffer_state = GetBufferState(dev_data, buffer); + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + std::vector buffer_state(bindInfoCount); + if (!PreCallValidateBindBufferMemory2KHR(dev_data, &buffer_state, bindInfoCount, pBindInfos)) { + result = dev_data->dispatch_table.BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); + if (result == VK_SUCCESS) { + PostCallRecordBindBufferMemory2KHR(dev_data, buffer_state, bindInfoCount, pBindInfos); + } + } + return result; +} + +static void PostCallRecordGetBufferMemoryRequirements(layer_data *dev_data, VkBuffer buffer, + VkMemoryRequirements *pMemoryRequirements) { + BUFFER_STATE *buffer_state; + { + unique_lock_t lock(global_lock); + buffer_state = GetBufferState(dev_data, buffer); + } if (buffer_state) { buffer_state->requirements = *pMemoryRequirements; buffer_state->memory_requirements_checked = true; } } -VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements) { +VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, + VkMemoryRequirements *pMemoryRequirements) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - dev_data->dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); - auto image_state = GetImageState(dev_data, image); + dev_data->dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); + PostCallRecordGetBufferMemoryRequirements(dev_data, buffer, pMemoryRequirements); +} + +VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2KHR *pInfo, + VkMemoryRequirements2KHR *pMemoryRequirements) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + PostCallRecordGetBufferMemoryRequirements(dev_data, pInfo->buffer, &pMemoryRequirements->memoryRequirements); +} + +static void PostCallRecordGetImageMemoryRequirements(layer_data *dev_data, VkImage image, + VkMemoryRequirements *pMemoryRequirements) { + IMAGE_STATE *image_state; + { + unique_lock_t lock(global_lock); + image_state = GetImageState(dev_data, image); + } if (image_state) { image_state->requirements = *pMemoryRequirements; image_state->memory_requirements_checked = true; } } +VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); + PostCallRecordGetImageMemoryRequirements(dev_data, image, pMemoryRequirements); +} + +VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2KHR *pInfo, + VkMemoryRequirements2KHR *pMemoryRequirements) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + PostCallRecordGetImageMemoryRequirements(dev_data, pInfo->image, &pMemoryRequirements->memoryRequirements); +} + +static void PostCallRecordGetImageSparseMemoryRequirements(IMAGE_STATE *image_state, uint32_t req_count, + VkSparseImageMemoryRequirements *reqs) { + image_state->get_sparse_reqs_called = true; + image_state->sparse_requirements.resize(req_count); + if (reqs) { + std::copy(reqs, reqs + req_count, image_state->sparse_requirements.begin()); + } + for (const auto &req : image_state->sparse_requirements) { + if (req.formatProperties.aspectMask & VK_IMAGE_ASPECT_METADATA_BIT) { + image_state->sparse_metadata_required = true; + } + } +} + +VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements *pSparseMemoryRequirements) { + // TODO : Implement tracking here, just passthrough initially + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); + unique_lock_t lock(global_lock); + auto image_state = GetImageState(dev_data, image); + PostCallRecordGetImageSparseMemoryRequirements(image_state, *pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static void PostCallRecordGetImageSparseMemoryRequirements2KHR(IMAGE_STATE *image_state, uint32_t req_count, + VkSparseImageMemoryRequirements2KHR *reqs) { + std::vector sparse_reqs(req_count); + // Migrate to old struct type for common handling with GetImageSparseMemoryRequirements() + for (uint32_t i = 0; i < req_count; ++i) { + assert(!reqs[i].pNext); // TODO: If an extension is ever added here we need to handle it + sparse_reqs[i] = reqs[i].memoryRequirements; + } + PostCallRecordGetImageSparseMemoryRequirements(image_state, req_count, sparse_reqs.data()); +} + +VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR(VkDevice device, + const VkImageSparseMemoryRequirementsInfo2KHR *pInfo, + uint32_t *pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2KHR *pSparseMemoryRequirements) { + // TODO : Implement tracking here, just passthrough initially + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + dev_data->dispatch_table.GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); + unique_lock_t lock(global_lock); + auto image_state = GetImageState(dev_data, pInfo->image); + PostCallRecordGetImageSparseMemoryRequirements2KHR(image_state, *pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkSampleCountFlagBits samples, + VkImageUsageFlags usage, VkImageTiling tiling, + uint32_t *pPropertyCount, + VkSparseImageFormatProperties *pProperties) { + // TODO : Implement this intercept, track sparse image format properties and make sure they are obeyed. + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); + instance_data->dispatch_table.GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, + pPropertyCount, pProperties); +} + +VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo, uint32_t *pPropertyCount, + VkSparseImageFormatProperties2KHR *pProperties) { + // TODO : Implement this intercept, track sparse image format properties and make sure they are obeyed. + instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); + instance_data->dispatch_table.GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties); +} + VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); // Common data objects used pre & post call @@ -3930,7 +4198,11 @@ VKAPI_ATTR void VKAPI_CALL DestroySampler(VkDevice device, VkSampler sampler, co } static void PostCallRecordDestroyDescriptorSetLayout(layer_data *dev_data, VkDescriptorSetLayout ds_layout) { - dev_data->descriptorSetLayoutMap.erase(ds_layout); + auto layout_it = dev_data->descriptorSetLayoutMap.find(ds_layout); + if (layout_it != dev_data->descriptorSetLayoutMap.end()) { + layout_it->second.get()->MarkDestroyed(); + dev_data->descriptorSetLayoutMap.erase(layout_it); + } } VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, @@ -3992,8 +4264,8 @@ static bool checkCommandBufferInFlight(layer_data *dev_data, const GLOBAL_CB_NOD if (cb_node->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, error_code, "DS", - "Attempt to %s command buffer (0x%p) which is in use. %s", action, cb_node->commandBuffer, - validation_error_map[error_code]); + "Attempt to %s command buffer (0x%" PRIx64 ") which is in use. %s", action, + HandleToUint64(cb_node->commandBuffer), validation_error_map[error_code]); } return skip; } @@ -4008,6 +4280,24 @@ static bool checkCommandBuffersInFlight(layer_data *dev_data, COMMAND_POOL_NODE return skip; } +// Free all command buffers in given list, removing all references/links to them using ResetCommandBufferState +static void FreeCommandBufferStates(layer_data *dev_data, COMMAND_POOL_NODE *pool_state, const uint32_t command_buffer_count, + const VkCommandBuffer *command_buffers) { + for (uint32_t i = 0; i < command_buffer_count; i++) { + auto cb_state = GetCBNode(dev_data, command_buffers[i]); + // Remove references to command buffer's state and delete + if (cb_state) { + // reset prior to delete, removing various references to it. + // TODO: fix this, it's insane. + ResetCommandBufferState(dev_data, cb_state->commandBuffer); + // Remove the cb_state's references from layer_data and COMMAND_POOL_NODE + dev_data->commandBufferMap.erase(cb_state->commandBuffer); + pool_state->commandBuffers.erase(command_buffers[i]); + delete cb_state; + } + } +} + VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); @@ -4025,20 +4315,7 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com if (skip) return; auto pPool = GetCommandPoolNode(dev_data, commandPool); - for (uint32_t i = 0; i < commandBufferCount; i++) { - auto cb_node = GetCBNode(dev_data, pCommandBuffers[i]); - // Delete CB information structure, and remove from commandBufferMap - if (cb_node) { - // reset prior to delete for data clean-up - // TODO: fix this, it's insane. - resetCB(dev_data, cb_node->commandBuffer); - dev_data->commandBufferMap.erase(cb_node->commandBuffer); - delete cb_node; - } - - // Remove commandBuffer reference from commandPoolMap - pPool->commandBuffers.remove(pCommandBuffers[i]); - } + FreeCommandBufferStates(dev_data, pPool, commandBufferCount, pCommandBuffers); lock.unlock(); dev_data->dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); @@ -4066,8 +4343,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo if (!dev_data->enabled_features.pipelineStatisticsQuery) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, 0, __LINE__, VALIDATION_ERROR_11c0062e, "DS", - "Query pool with type VK_QUERY_TYPE_PIPELINE_STATISTICS created on a device " - "with VkDeviceCreateInfo.pEnabledFeatures.pipelineStatisticsQuery == VK_FALSE. %s", + "Query pool with type VK_QUERY_TYPE_PIPELINE_STATISTICS created on a device with " + "VkDeviceCreateInfo.pEnabledFeatures.pipelineStatisticsQuery == VK_FALSE. %s", validation_error_map[VALIDATION_ERROR_11c0062e]); } } @@ -4084,49 +4361,40 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo return result; } -static bool PreCallValidateDestroyCommandPool(layer_data *dev_data, VkCommandPool pool, COMMAND_POOL_NODE **cp_state) { - *cp_state = GetCommandPoolNode(dev_data, pool); +static bool PreCallValidateDestroyCommandPool(layer_data *dev_data, VkCommandPool pool) { + COMMAND_POOL_NODE *cp_state = GetCommandPoolNode(dev_data, pool); if (dev_data->instance_data->disabled.destroy_command_pool) return false; bool skip = false; - if (*cp_state) { + if (cp_state) { // Verify that command buffers in pool are complete (not in-flight) - skip |= checkCommandBuffersInFlight(dev_data, *cp_state, "destroy command pool with", VALIDATION_ERROR_24000052); + skip |= checkCommandBuffersInFlight(dev_data, cp_state, "destroy command pool with", VALIDATION_ERROR_24000052); } return skip; } -static void PostCallRecordDestroyCommandPool(layer_data *dev_data, VkCommandPool pool, COMMAND_POOL_NODE *cp_state) { - // Must remove cmdpool from cmdpoolmap, after removing all cmdbuffers in its list from the commandBufferMap - for (auto cb : cp_state->commandBuffers) { - auto cb_node = GetCBNode(dev_data, cb); - clear_cmd_buf_and_mem_references(dev_data, cb_node); - // Remove references to this cb_node prior to delete - // TODO : Need better solution here, resetCB? - for (auto obj : cb_node->object_bindings) { - removeCommandBufferBinding(dev_data, &obj, cb_node); - } - for (auto framebuffer : cb_node->framebuffers) { - auto fb_state = GetFramebufferState(dev_data, framebuffer); - if (fb_state) fb_state->cb_bindings.erase(cb_node); - } - dev_data->commandBufferMap.erase(cb); // Remove this command buffer - delete cb_node; // delete CB info structure +static void PostCallRecordDestroyCommandPool(layer_data *dev_data, VkCommandPool pool) { + COMMAND_POOL_NODE *cp_state = GetCommandPoolNode(dev_data, pool); + // Remove cmdpool from cmdpoolmap, after freeing layer data for the command buffers + // "When a pool is destroyed, all command buffers allocated from the pool are freed." + if (cp_state) { + // Create a vector, as FreeCommandBufferStates deletes from cp_state->commandBuffers during iteration. + std::vector cb_vec{cp_state->commandBuffers.begin(), cp_state->commandBuffers.end()}; + FreeCommandBufferStates(dev_data, cp_state, static_cast(cb_vec.size()), cb_vec.data()); + dev_data->commandPoolMap.erase(pool); } - dev_data->commandPoolMap.erase(pool); } // Destroy commandPool along with all of the commandBuffers allocated from that pool VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - COMMAND_POOL_NODE *cp_state = nullptr; unique_lock_t lock(global_lock); - bool skip = PreCallValidateDestroyCommandPool(dev_data, commandPool, &cp_state); + bool skip = PreCallValidateDestroyCommandPool(dev_data, commandPool); if (!skip) { lock.unlock(); dev_data->dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); lock.lock(); if (commandPool != VK_NULL_HANDLE) { - PostCallRecordDestroyCommandPool(dev_data, commandPool, cp_state); + PostCallRecordDestroyCommandPool(dev_data, commandPool); } } } @@ -4148,7 +4416,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool c if (VK_SUCCESS == result) { lock.lock(); for (auto cmdBuffer : pPool->commandBuffers) { - resetCB(dev_data, cmdBuffer); + ResetCommandBufferState(dev_data, cmdBuffer); } lock.unlock(); } @@ -4161,7 +4429,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, unique_lock_t lock(global_lock); for (uint32_t i = 0; i < fenceCount; ++i) { auto pFence = GetFenceNode(dev_data, pFences[i]); - if (pFence && pFence->state == FENCE_INFLIGHT) { + if (pFence && pFence->scope == kSyncScopeInternal && pFence->state == FENCE_INFLIGHT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, HandleToUint64(pFences[i]), __LINE__, VALIDATION_ERROR_32e008c6, "DS", "Fence 0x%" PRIx64 " is in use. %s", @@ -4179,7 +4447,11 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, for (uint32_t i = 0; i < fenceCount; ++i) { auto pFence = GetFenceNode(dev_data, pFences[i]); if (pFence) { - pFence->state = FENCE_UNSIGNALED; + if (pFence->scope == kSyncScopeInternal) { + pFence->state = FENCE_UNSIGNALED; + } else if (pFence->scope == kSyncScopeExternalTemporary) { + pFence->scope = kSyncScopeInternal; + } } } lock.unlock(); @@ -4194,10 +4466,10 @@ void invalidateCommandBuffers(const layer_data *dev_data, std::unordered_setstate == CB_RECORDING) { log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", - "Invalidating a command buffer that's currently being recorded: 0x%p.", cb_node->commandBuffer); + "Invalidating a command buffer that's currently being recorded: 0x%" PRIx64 ".", + HandleToUint64(cb_node->commandBuffer)); cb_node->state = CB_INVALID_INCOMPLETE; - } - else if (cb_node->state == CB_RECORDED) { + } else if (cb_node->state == CB_RECORDED) { cb_node->state = CB_INVALID_COMPLETE; } cb_node->broken_bindings.push_back(obj); @@ -4321,14 +4593,13 @@ VkFormatProperties GetFormatProperties(core_validation::layer_data *device_data, return format_properties; } -VkImageFormatProperties GetImageFormatProperties(core_validation::layer_data *device_data, VkFormat format, VkImageType image_type, - VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags) { - VkImageFormatProperties image_format_properties; +VkResult GetImageFormatProperties(core_validation::layer_data *device_data, const VkImageCreateInfo *image_ci, + VkImageFormatProperties *pImageFormatProperties) { instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(device_data->instance_data->instance), instance_layer_data_map); - instance_data->dispatch_table.GetPhysicalDeviceImageFormatProperties(device_data->physical_device, format, image_type, tiling, - usage, flags, &image_format_properties); - return image_format_properties; + return instance_data->dispatch_table.GetPhysicalDeviceImageFormatProperties( + device_data->physical_device, image_ci->format, image_ci->imageType, image_ci->tiling, image_ci->usage, image_ci->flags, + pImageFormatProperties); } const debug_report_data *GetReportData(const core_validation::layer_data *device_data) { return device_data->report_data; } @@ -4367,13 +4638,9 @@ std::unordered_map> *GetImageView return &device_data->imageViewMap; } -const PHYS_DEV_PROPERTIES_NODE *GetPhysDevProperties(const layer_data *device_data) { - return &device_data->phys_dev_properties; -} +const PHYS_DEV_PROPERTIES_NODE *GetPhysDevProperties(const layer_data *device_data) { return &device_data->phys_dev_properties; } -const VkPhysicalDeviceFeatures *GetEnabledFeatures(const layer_data *device_data) { - return &device_data->enabled_features; -} +const VkPhysicalDeviceFeatures *GetEnabledFeatures(const layer_data *device_data) { return &device_data->enabled_features; } const DeviceExtensions *GetDeviceExtensions(const layer_data *device_data) { return &device_data->extensions; } @@ -4451,6 +4718,50 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCa return result; } +// Validation cache: +// CV is the bottommost implementor of this extension. Don't pass calls down. +VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkValidationCacheEXT *pValidationCache) { + *pValidationCache = ValidationCache::Create(pCreateInfo); + return *pValidationCache ? VK_SUCCESS : VK_ERROR_INITIALIZATION_FAILED; +} + +VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks *pAllocator) { + delete (ValidationCache *)validationCache; +} + +VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t *pDataSize, + void *pData) { + size_t inSize = *pDataSize; + ((ValidationCache *)validationCache)->Write(pDataSize, pData); + return (pData && *pDataSize != inSize) ? VK_INCOMPLETE : VK_SUCCESS; +} + +VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT *pSrcCaches) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + auto dst = (ValidationCache *)dstCache; + auto src = (ValidationCache const *const *)pSrcCaches; + VkResult result = VK_SUCCESS; + for (uint32_t i = 0; i < srcCacheCount; i++) { + if (src[i] == dst) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, + 0, __LINE__, VALIDATION_ERROR_3e600c00, "DS", + "vkMergeValidationCachesEXT: dstCache (0x%" PRIx64 ") must not appear in pSrcCaches array. %s", + HandleToUint64(dstCache), validation_error_map[VALIDATION_ERROR_3e600c00]); + result = VK_ERROR_VALIDATION_FAILED_EXT; + } + if (!skip) { + dst->Merge(src[i]); + } + } + + return result; +} + // utility function to set collective state for pipeline void set_pipeline_state(PIPELINE_STATE *pPipe) { // If any attachment used by this pipeline has blendEnable, set top-level blendEnable @@ -4488,7 +4799,7 @@ bool validate_dual_src_blend_feature(layer_data *device_data, PIPELINE_STATE *pi skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, HandleToUint64(pipe_state->pipeline), __LINE__, DRAWSTATE_INVALID_FEATURE, "DS", - "CmdBindPipeline: vkPipeline (0x%" PRIxLEAST64 ") attachment[" PRINTF_SIZE_T_SPECIFIER + "CmdBindPipeline: vkPipeline (0x%" PRIx64 ") attachment[" PRINTF_SIZE_T_SPECIFIER "] has a dual-source blend factor but this device feature is not enabled.", HandleToUint64(pipe_state->pipeline), i); } @@ -4516,7 +4827,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli for (i = 0; i < count; i++) { pipe_state.push_back(std::unique_ptr(new PIPELINE_STATE)); pipe_state[i]->initGraphicsPipeline(&pCreateInfos[i], GetRenderPassStateSharedPtr(dev_data, pCreateInfos[i].renderPass)); - pipe_state[i]->render_pass_ci.initialize(GetRenderPassState(dev_data, pCreateInfos[i].renderPass)->createInfo.ptr()); pipe_state[i]->pipeline_layout = *getPipelineLayout(dev_data, pCreateInfos[i].layout); } @@ -4605,7 +4915,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre static bool PreCallValidateCreateDescriptorSetLayout(layer_data *dev_data, const VkDescriptorSetLayoutCreateInfo *create_info) { if (dev_data->instance_data->disabled.create_descriptor_set_layout) return false; - return cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(dev_data->report_data, create_info); + return cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(dev_data->report_data, create_info, + dev_data->extensions.vk_khr_push_descriptor, + dev_data->phys_dev_ext_props.max_push_descriptors); } static void PostCallRecordCreateDescriptorSetLayout(layer_data *dev_data, const VkDescriptorSetLayoutCreateInfo *create_info, @@ -4644,33 +4956,33 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t // This is a pain just to adapt the log message to the caller, but better to sort it out only when there is a problem. if (0 == strcmp(caller_name, "vkCreatePipelineLayout()")) { if (offset >= maxPushConstantsSize) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_11a0024c, "DS", - "%s call has push constants index %u with offset %u that " - "exceeds this device's maxPushConstantSize of %u. %s", - caller_name, index, offset, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_11a0024c]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_11a0024c, "DS", + "%s call has push constants index %u with offset %u that exceeds this device's maxPushConstantSize of %u. %s", + caller_name, index, offset, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_11a0024c]); } if (size > maxPushConstantsSize - offset) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_11a00254, "DS", - "%s call has push constants index %u with offset %u and size %u that " - "exceeds this device's maxPushConstantSize of %u. %s", + "%s call has push constants index %u with offset %u and size %u that exceeds this device's " + "maxPushConstantSize of %u. %s", caller_name, index, offset, size, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_11a00254]); } } else if (0 == strcmp(caller_name, "vkCmdPushConstants()")) { if (offset >= maxPushConstantsSize) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1bc002e4, "DS", - "%s call has push constants index %u with offset %u that " - "exceeds this device's maxPushConstantSize of %u. %s", - caller_name, index, offset, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_1bc002e4]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_1bc002e4, "DS", + "%s call has push constants index %u with offset %u that exceeds this device's maxPushConstantSize of %u. %s", + caller_name, index, offset, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_1bc002e4]); } if (size > maxPushConstantsSize - offset) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1bc002e6, "DS", - "%s call has push constants index %u with offset %u and size %u that " - "exceeds this device's maxPushConstantSize of %u. %s", + "%s call has push constants index %u with offset %u and size %u that exceeds this device's " + "maxPushConstantSize of %u. %s", caller_name, index, offset, size, maxPushConstantsSize, validation_error_map[VALIDATION_ERROR_1bc002e6]); } @@ -4685,31 +4997,27 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t if (size == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_11a00250, "DS", - "%s call has push constants index %u with " - "size %u. Size must be greater than zero. %s", - caller_name, index, size, validation_error_map[VALIDATION_ERROR_11a00250]); + "%s call has push constants index %u with size %u. Size must be greater than zero. %s", caller_name, + index, size, validation_error_map[VALIDATION_ERROR_11a00250]); } if (size & 0x3) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_11a00252, "DS", - "%s call has push constants index %u with " - "size %u. Size must be a multiple of 4. %s", - caller_name, index, size, validation_error_map[VALIDATION_ERROR_11a00252]); + "%s call has push constants index %u with size %u. Size must be a multiple of 4. %s", caller_name, + index, size, validation_error_map[VALIDATION_ERROR_11a00252]); } } else if (0 == strcmp(caller_name, "vkCmdPushConstants()")) { if (size == 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1bc2c21b, "DS", - "%s call has push constants index %u with " - "size %u. Size must be greater than zero. %s", - caller_name, index, size, validation_error_map[VALIDATION_ERROR_1bc2c21b]); + "%s call has push constants index %u with size %u. Size must be greater than zero. %s", caller_name, + index, size, validation_error_map[VALIDATION_ERROR_1bc2c21b]); } if (size & 0x3) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1bc002e2, "DS", - "%s call has push constants index %u with " - "size %u. Size must be a multiple of 4. %s", - caller_name, index, size, validation_error_map[VALIDATION_ERROR_1bc002e2]); + "%s call has push constants index %u with size %u. Size must be a multiple of 4. %s", caller_name, + index, size, validation_error_map[VALIDATION_ERROR_1bc002e2]); } } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, @@ -4721,15 +5029,13 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t if (0 == strcmp(caller_name, "vkCreatePipelineLayout()")) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_11a0024e, "DS", - "%s call has push constants index %u with " - "offset %u. Offset must be a multiple of 4. %s", - caller_name, index, offset, validation_error_map[VALIDATION_ERROR_11a0024e]); + "%s call has push constants index %u with offset %u. Offset must be a multiple of 4. %s", caller_name, + index, offset, validation_error_map[VALIDATION_ERROR_11a0024e]); } else if (0 == strcmp(caller_name, "vkCmdPushConstants()")) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1bc002e0, "DS", - "%s call has push constants with " - "offset %u. Offset must be a multiple of 4. %s", - caller_name, offset, validation_error_map[VALIDATION_ERROR_1bc002e0]); + "%s call has push constants with offset %u. Offset must be a multiple of 4. %s", caller_name, offset, + validation_error_map[VALIDATION_ERROR_1bc002e0]); } else { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DRAWSTATE_INTERNAL_ERROR, "DS", "%s caller not supported.", caller_name); @@ -4738,12 +5044,112 @@ static bool validatePushConstantRange(const layer_data *dev_data, const uint32_t return skip; } -VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, - const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout) { +enum DSL_DESCRIPTOR_GROUPS { + DSL_TYPE_SAMPLERS = 0, + DSL_TYPE_UNIFORM_BUFFERS, + DSL_TYPE_STORAGE_BUFFERS, + DSL_TYPE_SAMPLED_IMAGES, + DSL_TYPE_STORAGE_IMAGES, + DSL_TYPE_INPUT_ATTACHMENTS, + DSL_NUM_DESCRIPTOR_GROUPS +}; + +// Used by PreCallValiateCreatePipelineLayout. +// Returns an array of size DSL_NUM_DESCRIPTOR_GROUPS of the maximum number of descriptors used in any single pipeline stage +std::valarray GetDescriptorCountMaxPerStage( + const layer_data *dev_data, const std::vector> set_layouts) { + // Identify active pipeline stages + std::vector stage_flags = {VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, + VK_SHADER_STAGE_COMPUTE_BIT}; + if (dev_data->enabled_features.geometryShader) { + stage_flags.push_back(VK_SHADER_STAGE_GEOMETRY_BIT); + } + if (dev_data->enabled_features.tessellationShader) { + stage_flags.push_back(VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT); + stage_flags.push_back(VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT); + } + + // Allow iteration over enum values + std::vector dsl_groups = {DSL_TYPE_SAMPLERS, DSL_TYPE_UNIFORM_BUFFERS, DSL_TYPE_STORAGE_BUFFERS, + DSL_TYPE_SAMPLED_IMAGES, DSL_TYPE_STORAGE_IMAGES, DSL_TYPE_INPUT_ATTACHMENTS}; + + // Sum by layouts per stage, then pick max of stages per type + std::valarray max_sum(0U, DSL_NUM_DESCRIPTOR_GROUPS); // max descriptor sum among all pipeline stages + for (auto stage : stage_flags) { + std::valarray stage_sum(0U, DSL_NUM_DESCRIPTOR_GROUPS); // per-stage sums + for (auto dsl : set_layouts) { + for (uint32_t binding_idx = 0; binding_idx < dsl->GetBindingCount(); binding_idx++) { + const VkDescriptorSetLayoutBinding *binding = dsl->GetDescriptorSetLayoutBindingPtrFromIndex(binding_idx); + if (0 != (stage & binding->stageFlags)) { + switch (binding->descriptorType) { + case VK_DESCRIPTOR_TYPE_SAMPLER: + stage_sum[DSL_TYPE_SAMPLERS] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + stage_sum[DSL_TYPE_UNIFORM_BUFFERS] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + stage_sum[DSL_TYPE_STORAGE_BUFFERS] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + stage_sum[DSL_TYPE_SAMPLED_IMAGES] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + stage_sum[DSL_TYPE_STORAGE_IMAGES] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + stage_sum[DSL_TYPE_SAMPLED_IMAGES] += binding->descriptorCount; + stage_sum[DSL_TYPE_SAMPLERS] += binding->descriptorCount; + break; + case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + stage_sum[DSL_TYPE_INPUT_ATTACHMENTS] += binding->descriptorCount; + break; + default: + break; + } + } + } + } + for (auto type : dsl_groups) { + max_sum[type] = std::max(stage_sum[type], max_sum[type]); + } + } + return max_sum; +} + +// Used by PreCallValidateCreatePipelineLayout. +// Returns an array of size VK_DESCRIPTOR_TYPE_RANGE_SIZE of the summed descriptors by type. +// Note: descriptors only count against the limit once even if used by multiple stages. +std::valarray GetDescriptorSum( + const layer_data *dev_data, const std::vector> &set_layouts) { + std::valarray sum_by_type(0U, VK_DESCRIPTOR_TYPE_RANGE_SIZE); + for (auto dsl : set_layouts) { + for (uint32_t binding_idx = 0; binding_idx < dsl->GetBindingCount(); binding_idx++) { + const VkDescriptorSetLayoutBinding *binding = dsl->GetDescriptorSetLayoutBindingPtrFromIndex(binding_idx); + sum_by_type[binding->descriptorType] += binding->descriptorCount; + } + } + return sum_by_type; +} + +static bool PreCallValiateCreatePipelineLayout(const layer_data *dev_data, const VkPipelineLayoutCreateInfo *pCreateInfo) { bool skip = false; - layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - // TODO : Add checks for VALIDATION_ERRORS 865-870 - // Push Constant Range checks + + // Validate layout count against device physical limit + if (pCreateInfo->setLayoutCount > dev_data->phys_dev_props.limits.maxBoundDescriptorSets) { + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe0023c, "DS", + "vkCreatePipelineLayout(): setLayoutCount (%d) exceeds physical device maxBoundDescriptorSets limit (%d). %s", + pCreateInfo->setLayoutCount, dev_data->phys_dev_props.limits.maxBoundDescriptorSets, + validation_error_map[VALIDATION_ERROR_0fe0023c]); + } + + // Validate Push Constant ranges uint32_t i, j; for (i = 0; i < pCreateInfo->pushConstantRangeCount; ++i) { skip |= validatePushConstantRange(dev_data, pCreateInfo->pPushConstantRanges[i].offset, @@ -4754,7 +5160,6 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip validation_error_map[VALIDATION_ERROR_11a2dc03]); } } - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; // As of 1.0.28, there is a VU that states that a stage flag cannot appear more than once in the list of push constant ranges. for (i = 0; i < pCreateInfo->pushConstantRangeCount; ++i) { @@ -4768,19 +5173,220 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip } } - VkResult result = dev_data->dispatch_table.CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); - if (VK_SUCCESS == result) { - lock_guard_t lock(global_lock); - PIPELINE_LAYOUT_NODE &plNode = dev_data->pipelineLayoutMap[*pPipelineLayout]; - plNode.layout = *pPipelineLayout; - plNode.set_layouts.resize(pCreateInfo->setLayoutCount); + // Early-out + if (skip) return skip; + + std::vector> set_layouts(pCreateInfo->setLayoutCount, nullptr); + unsigned int push_descriptor_set_count = 0; + { + unique_lock_t lock(global_lock); // Lock while accessing global state for (i = 0; i < pCreateInfo->setLayoutCount; ++i) { - plNode.set_layouts[i] = GetDescriptorSetLayout(dev_data, pCreateInfo->pSetLayouts[i]); - } - plNode.push_constant_ranges.resize(pCreateInfo->pushConstantRangeCount); - for (i = 0; i < pCreateInfo->pushConstantRangeCount; ++i) { - plNode.push_constant_ranges[i] = pCreateInfo->pPushConstantRanges[i]; + set_layouts[i] = GetDescriptorSetLayout(dev_data, pCreateInfo->pSetLayouts[i]); + if (set_layouts[i]->IsPushDescriptor()) ++push_descriptor_set_count; } + } // Unlock + + if (push_descriptor_set_count > 1) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe0024a, "DS", "vkCreatePipelineLayout() Multiple push descriptor sets found. %s", + validation_error_map[VALIDATION_ERROR_0fe0024a]); + } + + // Max descriptors by type, within a single pipeline stage + std::valarray max_descriptors_per_stage = GetDescriptorCountMaxPerStage(dev_data, set_layouts); + // Samplers + if (max_descriptors_per_stage[DSL_TYPE_SAMPLERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorSamplers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe0023e, "DS", + "vkCreatePipelineLayout(): max per-stage sampler bindings count (%d) exceeds device " + "maxPerStageDescriptorSamplers limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_SAMPLERS], dev_data->phys_dev_props.limits.maxPerStageDescriptorSamplers, + validation_error_map[VALIDATION_ERROR_0fe0023e]); + } + + // Uniform buffers + if (max_descriptors_per_stage[DSL_TYPE_UNIFORM_BUFFERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorUniformBuffers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00240, "DS", + "vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (%d) exceeds device " + "maxPerStageDescriptorUniformBuffers limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_UNIFORM_BUFFERS], + dev_data->phys_dev_props.limits.maxPerStageDescriptorUniformBuffers, + validation_error_map[VALIDATION_ERROR_0fe00240]); + } + + // Storage buffers + if (max_descriptors_per_stage[DSL_TYPE_STORAGE_BUFFERS] > dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageBuffers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00242, "DS", + "vkCreatePipelineLayout(): max per-stage storage buffer bindings count (%d) exceeds device " + "maxPerStageDescriptorStorageBuffers limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_STORAGE_BUFFERS], + dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageBuffers, + validation_error_map[VALIDATION_ERROR_0fe00242]); + } + + // Sampled images + if (max_descriptors_per_stage[DSL_TYPE_SAMPLED_IMAGES] > dev_data->phys_dev_props.limits.maxPerStageDescriptorSampledImages) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00244, "DS", + "vkCreatePipelineLayout(): max per-stage sampled image bindings count (%d) exceeds device " + "maxPerStageDescriptorSampledImages limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_SAMPLED_IMAGES], + dev_data->phys_dev_props.limits.maxPerStageDescriptorSampledImages, + validation_error_map[VALIDATION_ERROR_0fe00244]); + } + + // Storage images + if (max_descriptors_per_stage[DSL_TYPE_STORAGE_IMAGES] > dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageImages) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00246, "DS", + "vkCreatePipelineLayout(): max per-stage storage image bindings count (%d) exceeds device " + "maxPerStageDescriptorStorageImages limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_STORAGE_IMAGES], + dev_data->phys_dev_props.limits.maxPerStageDescriptorStorageImages, + validation_error_map[VALIDATION_ERROR_0fe00246]); + } + + // Input attachments + if (max_descriptors_per_stage[DSL_TYPE_INPUT_ATTACHMENTS] > + dev_data->phys_dev_props.limits.maxPerStageDescriptorInputAttachments) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d18, "DS", + "vkCreatePipelineLayout(): max per-stage input attachment bindings count (%d) exceeds device " + "maxPerStageDescriptorInputAttachments limit (%d). %s", + max_descriptors_per_stage[DSL_TYPE_INPUT_ATTACHMENTS], + dev_data->phys_dev_props.limits.maxPerStageDescriptorInputAttachments, + validation_error_map[VALIDATION_ERROR_0fe00d18]); + } + + // Total descriptors by type + // + std::valarray sum_all_stages = GetDescriptorSum(dev_data, set_layouts); + // Samplers + if ((sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLER] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER]) > + dev_data->phys_dev_props.limits.maxDescriptorSetSamplers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d1a, "DS", + "vkCreatePipelineLayout(): sum of sampler bindings among all stages (%d) exceeds device " + "maxDescriptorSetSamplers limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLER] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER], + dev_data->phys_dev_props.limits.maxDescriptorSetSamplers, validation_error_map[VALIDATION_ERROR_0fe00d1a]); + } + + // Uniform buffers + if (sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER] > dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d1c, "DS", + "vkCreatePipelineLayout(): sum of uniform buffer bindings among all stages (%d) exceeds device " + "maxDescriptorSetUniformBuffers limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER], + dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffers, + validation_error_map[VALIDATION_ERROR_0fe00d1c]); + } + + // Dynamic uniform buffers + if (sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC] > + dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffersDynamic) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d1e, "DS", + "vkCreatePipelineLayout(): sum of dynamic uniform buffer bindings among all stages (%d) exceeds device " + "maxDescriptorSetUniformBuffersDynamic limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC], + dev_data->phys_dev_props.limits.maxDescriptorSetUniformBuffersDynamic, + validation_error_map[VALIDATION_ERROR_0fe00d1e]); + } + + // Storage buffers + if (sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER] > dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffers) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d20, "DS", + "vkCreatePipelineLayout(): sum of storage buffer bindings among all stages (%d) exceeds device " + "maxDescriptorSetStorageBuffers limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER], + dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffers, + validation_error_map[VALIDATION_ERROR_0fe00d20]); + } + + // Dynamic storage buffers + if (sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC] > + dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffersDynamic) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d22, "DS", + "vkCreatePipelineLayout(): sum of dynamic storage buffer bindings among all stages (%d) exceeds device " + "maxDescriptorSetStorageBuffersDynamic limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC], + dev_data->phys_dev_props.limits.maxDescriptorSetStorageBuffersDynamic, + validation_error_map[VALIDATION_ERROR_0fe00d22]); + } + + // Sampled images + if ((sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER] + + sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER]) > dev_data->phys_dev_props.limits.maxDescriptorSetSampledImages) { + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d24, "DS", + "vkCreatePipelineLayout(): sum of sampled image bindings among all stages (%d) exceeds device " + "maxDescriptorSetSampledImages limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER] + + sum_all_stages[VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER], + dev_data->phys_dev_props.limits.maxDescriptorSetSampledImages, validation_error_map[VALIDATION_ERROR_0fe00d24]); + } + + // Storage images + if ((sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER]) > + dev_data->phys_dev_props.limits.maxDescriptorSetStorageImages) { + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d26, "DS", + "vkCreatePipelineLayout(): sum of storage image bindings among all stages (%d) exceeds device " + "maxDescriptorSetStorageImages limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_IMAGE] + sum_all_stages[VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER], + dev_data->phys_dev_props.limits.maxDescriptorSetStorageImages, validation_error_map[VALIDATION_ERROR_0fe00d26]); + } + + // Input attachments + if (sum_all_stages[VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT] > dev_data->phys_dev_props.limits.maxDescriptorSetInputAttachments) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_0fe00d28, "DS", + "vkCreatePipelineLayout(): sum of input attachment bindings among all stages (%d) exceeds device " + "maxDescriptorSetInputAttachments limit (%d). %s", + sum_all_stages[VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT], + dev_data->phys_dev_props.limits.maxDescriptorSetInputAttachments, + validation_error_map[VALIDATION_ERROR_0fe00d28]); + } + + return skip; +} + +static void PostCallRecordCreatePipelineLayout(layer_data *dev_data, const VkPipelineLayoutCreateInfo *pCreateInfo, + const VkPipelineLayout *pPipelineLayout) { + unique_lock_t lock(global_lock); // Lock while accessing state + + PIPELINE_LAYOUT_NODE &plNode = dev_data->pipelineLayoutMap[*pPipelineLayout]; + plNode.layout = *pPipelineLayout; + plNode.set_layouts.resize(pCreateInfo->setLayoutCount); + for (uint32_t i = 0; i < pCreateInfo->setLayoutCount; ++i) { + plNode.set_layouts[i] = GetDescriptorSetLayout(dev_data, pCreateInfo->pSetLayouts[i]); + } + plNode.push_constant_ranges.resize(pCreateInfo->pushConstantRangeCount); + for (uint32_t i = 0; i < pCreateInfo->pushConstantRangeCount; ++i) { + plNode.push_constant_ranges[i] = pCreateInfo->pPushConstantRanges[i]; + } + // Implicit unlock +}; + +VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + + bool skip = PreCallValiateCreatePipelineLayout(dev_data, pCreateInfo); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + + VkResult result = dev_data->dispatch_table.CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); + + if (VK_SUCCESS == result) { + PostCallRecordCreatePipelineLayout(dev_data, pCreateInfo, pPipelineLayout); } return result; } @@ -4975,11 +5581,11 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkC if (pPool) { for (uint32_t i = 0; i < pCreateInfo->commandBufferCount; i++) { // Add command buffer to its commandPool map - pPool->commandBuffers.push_back(pCommandBuffer[i]); + pPool->commandBuffers.insert(pCommandBuffer[i]); GLOBAL_CB_NODE *pCB = new GLOBAL_CB_NODE; // Add command buffer to map dev_data->commandBufferMap[pCommandBuffer[i]] = pCB; - resetCB(dev_data, pCommandBuffer[i]); + ResetCommandBufferState(dev_data, pCommandBuffer[i]); pCB->createInfo = *pCreateInfo; pCB->device = device; } @@ -5012,9 +5618,9 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, if (cb_node->in_use.load()) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00062, "MEM", - "Calling vkBeginCommandBuffer() on active command buffer %p before it has completed. " - "You must check command buffer fence before this call. %s", - commandBuffer, validation_error_map[VALIDATION_ERROR_16e00062]); + "Calling vkBeginCommandBuffer() on active command buffer %" PRIx64 + " before it has completed. You must check command buffer fence before this call. %s", + HandleToUint64(commandBuffer), validation_error_map[VALIDATION_ERROR_16e00062]); } clear_cmd_buf_and_mem_references(dev_data, cb_node); if (cb_node->createInfo.level != VK_COMMAND_BUFFER_LEVEL_PRIMARY) { @@ -5024,8 +5630,8 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00066, "DS", - "vkBeginCommandBuffer(): Secondary Command Buffer (0x%p) must have inheritance info. %s", commandBuffer, - validation_error_map[VALIDATION_ERROR_16e00066]); + "vkBeginCommandBuffer(): Secondary Command Buffer (0x%" PRIx64 ") must have inheritance info. %s", + HandleToUint64(commandBuffer), validation_error_map[VALIDATION_ERROR_16e00066]); } else { if (pBeginInfo->flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) { assert(pInfo->renderPass); @@ -5048,10 +5654,10 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00068, "DS", - "vkBeginCommandBuffer(): Secondary Command Buffer (0x%p) must not have " - "VK_QUERY_CONTROL_PRECISE_BIT if occulusionQuery is disabled or the device does not " - "support precise occlusion queries. %s", - commandBuffer, validation_error_map[VALIDATION_ERROR_16e00068]); + "vkBeginCommandBuffer(): Secondary Command Buffer (0x%" PRIx64 + ") must not have VK_QUERY_CONTROL_PRECISE_BIT if occulusionQuery is disabled or the device " + "does not support precise occlusion queries. %s", + HandleToUint64(commandBuffer), validation_error_map[VALIDATION_ERROR_16e00068]); } } if (pInfo && pInfo->renderPass != VK_NULL_HANDLE) { @@ -5061,9 +5667,9 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_0280006c, "DS", - "vkBeginCommandBuffer(): Secondary Command Buffers (0x%p) must have a subpass index (%d) " - "that is less than the number of subpasses (%d). %s", - commandBuffer, pInfo->subpass, renderPass->createInfo.subpassCount, + "vkBeginCommandBuffer(): Secondary Command Buffers (0x%" PRIx64 + ") must have a subpass index (%d) that is less than the number of subpasses (%d). %s", + HandleToUint64(commandBuffer), pInfo->subpass, renderPass->createInfo.subpassCount, validation_error_map[VALIDATION_ERROR_0280006c]); } } @@ -5072,22 +5678,22 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, if (CB_RECORDING == cb_node->state) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00062, "DS", - "vkBeginCommandBuffer(): Cannot call Begin on command buffer (0x%p" + "vkBeginCommandBuffer(): Cannot call Begin on command buffer (0x%" PRIx64 ") in the RECORDING state. Must first call vkEndCommandBuffer(). %s", - commandBuffer, validation_error_map[VALIDATION_ERROR_16e00062]); + HandleToUint64(commandBuffer), validation_error_map[VALIDATION_ERROR_16e00062]); } else if (CB_RECORDED == cb_node->state || CB_INVALID_COMPLETE == cb_node->state) { VkCommandPool cmdPool = cb_node->createInfo.commandPool; auto pPool = GetCommandPoolNode(dev_data, cmdPool); if (!(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT & pPool->createFlags)) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00064, "DS", - "Call to vkBeginCommandBuffer() on command buffer (0x%p" - ") attempts to implicitly reset cmdBuffer created from command pool (0x%" PRIxLEAST64 - ") that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set. %s", - commandBuffer, HandleToUint64(cmdPool), validation_error_map[VALIDATION_ERROR_16e00064]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_16e00064, "DS", + "Call to vkBeginCommandBuffer() on command buffer (0x%" PRIx64 + ") attempts to implicitly reset cmdBuffer created from command pool (0x%" PRIx64 + ") that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set. %s", + HandleToUint64(commandBuffer), HandleToUint64(cmdPool), validation_error_map[VALIDATION_ERROR_16e00064]); } - resetCB(dev_data, commandBuffer); + ResetCommandBufferState(dev_data, commandBuffer); } // Set updated state here in case implicit reset occurs above cb_node->state = CB_RECORDING; @@ -5113,6 +5719,13 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, return result; } +static void PostCallRecordEndCommandBuffer(layer_data *dev_data, GLOBAL_CB_NODE *cb_state) { + // Cached validation is specific to a specific recording of a specific command buffer. + for (auto descriptor_set : cb_state->validated_descriptor_sets) { + descriptor_set->ClearCachedValidation(cb_state); + } + cb_state->validated_descriptor_sets.clear(); +} VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { bool skip = false; @@ -5126,7 +5739,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { // https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/516#discussion_r63013756 skip |= insideRenderPass(dev_data, pCB, "vkEndCommandBuffer()", VALIDATION_ERROR_27400078); } - skip |= ValidateCmd(dev_data, pCB, CMD_END, "vkEndCommandBuffer()"); + skip |= ValidateCmd(dev_data, pCB, CMD_ENDCOMMANDBUFFER, "vkEndCommandBuffer()"); for (auto query : pCB->activeQueries) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_2740007a, "DS", @@ -5138,6 +5751,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { lock.unlock(); auto result = dev_data->dispatch_table.EndCommandBuffer(commandBuffer); lock.lock(); + PostCallRecordEndCommandBuffer(dev_data, pCB); if (VK_SUCCESS == result) { pCB->state = CB_RECORDED; } @@ -5157,9 +5771,9 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, if (!(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT & pPool->createFlags)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_3260005c, "DS", - "Attempt to reset command buffer (0x%p) created from command pool (0x%" PRIxLEAST64 + "Attempt to reset command buffer (0x%" PRIx64 ") created from command pool (0x%" PRIx64 ") that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set. %s", - commandBuffer, HandleToUint64(cmdPool), validation_error_map[VALIDATION_ERROR_3260005c]); + HandleToUint64(commandBuffer), HandleToUint64(cmdPool), validation_error_map[VALIDATION_ERROR_3260005c]); } skip |= checkCommandBufferInFlight(dev_data, pCB, "reset", VALIDATION_ERROR_3260005a); lock.unlock(); @@ -5167,7 +5781,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkResult result = dev_data->dispatch_table.ResetCommandBuffer(commandBuffer, flags); if (VK_SUCCESS == result) { lock.lock(); - resetCB(dev_data, commandBuffer); + ResetCommandBufferState(dev_data, commandBuffer); lock.unlock(); } return result; @@ -5183,7 +5797,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipe skip |= ValidateCmdQueueFlags(dev_data, cb_state, "vkCmdBindPipeline()", VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT, VALIDATION_ERROR_18002415); skip |= ValidateCmd(dev_data, cb_state, CMD_BINDPIPELINE, "vkCmdBindPipeline()"); - // TODO: VALIDATION_ERROR_18000612 VALIDATION_ERROR_18000616 + // TODO: VALIDATION_ERROR_18000612 VALIDATION_ERROR_18000616 -- using ValidatePipelineBindPoint auto pipe_state = getPipelineState(dev_data, pipeline); if (VK_PIPELINE_BIND_POINT_GRAPHICS == pipelineBindPoint) { @@ -5208,7 +5822,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_ GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetViewport()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1e002415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETVIEWPORTSTATE, "vkCmdSetViewport()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETVIEWPORT, "vkCmdSetViewport()"); if (pCB->static_status & CBSTATUS_VIEWPORT_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e00098a, "DS", @@ -5232,7 +5846,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetScissor()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1d802415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETSCISSORSTATE, "vkCmdSetScissor()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETSCISSOR, "vkCmdSetScissor()"); if (pCB->static_status & CBSTATUS_SCISSOR_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d80049c, "DS", @@ -5255,17 +5869,13 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetLineWidth()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1d602415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETLINEWIDTHSTATE, "vkCmdSetLineWidth()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETLINEWIDTH, "vkCmdSetLineWidth()"); if (pCB->static_status & CBSTATUS_LINE_WIDTH_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d600626, "DS", - "vkCmdSetLineWidth called but pipeline was created without VK_DYNAMIC_STATE_LINE_WIDTH " - "flag. %s", + "vkCmdSetLineWidth called but pipeline was created without VK_DYNAMIC_STATE_LINE_WIDTH flag. %s", validation_error_map[VALIDATION_ERROR_1d600626]); - } else { - skip |= verifyLineWidth(dev_data, DRAWSTATE_INVALID_SET, kVulkanObjectTypeCommandBuffer, HandleToUint64(commandBuffer), - lineWidth); } if (!skip) { pCB->status |= CBSTATUS_LINE_WIDTH_SET; @@ -5283,7 +5893,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetDepthBias()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1cc02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBIASSTATE, "vkCmdSetDepthBias()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBIAS, "vkCmdSetDepthBias()"); if (pCB->static_status & CBSTATUS_DEPTH_BIAS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1cc0062a, "DS", @@ -5293,8 +5903,8 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float if ((depthBiasClamp != 0.0) && (!dev_data->enabled_features.depthBiasClamp)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1cc0062c, "DS", - "vkCmdSetDepthBias(): the depthBiasClamp device feature is disabled: the depthBiasClamp " - "parameter must be set to 0.0. %s", + "vkCmdSetDepthBias(): the depthBiasClamp device feature is disabled: the depthBiasClamp parameter must " + "be set to 0.0. %s", validation_error_map[VALIDATION_ERROR_1cc0062c]); } if (!skip) { @@ -5313,7 +5923,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, c GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetBlendConstants()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1ca02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETBLENDSTATE, "vkCmdSetBlendConstants()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETBLENDCONSTANTS, "vkCmdSetBlendConstants()"); if (pCB->static_status & CBSTATUS_BLEND_CONSTANTS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1ca004c8, "DS", @@ -5335,7 +5945,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, floa GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer); if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetDepthBounds()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1ce02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBOUNDSSTATE, "vkCmdSetDepthBounds()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETDEPTHBOUNDS, "vkCmdSetDepthBounds()"); if (pCB->static_status & CBSTATUS_DEPTH_BOUNDS_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1ce004ae, "DS", @@ -5359,12 +5969,13 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetStencilCompareMask()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1da02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILREADMASKSTATE, "vkCmdSetStencilCompareMask()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILCOMPAREMASK, "vkCmdSetStencilCompareMask()"); if (pCB->static_status & CBSTATUS_STENCIL_READ_MASK_SET) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1da004b4, "DS", - "vkCmdSetStencilCompareMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK flag. %s.", - validation_error_map[VALIDATION_ERROR_1da004b4]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1da004b4, "DS", + "vkCmdSetStencilCompareMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK flag. %s.", + validation_error_map[VALIDATION_ERROR_1da004b4]); } if (!skip) { pCB->status |= CBSTATUS_STENCIL_READ_MASK_SET; @@ -5382,12 +5993,13 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetStencilWriteMask()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1de02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILWRITEMASKSTATE, "vkCmdSetStencilWriteMask()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILWRITEMASK, "vkCmdSetStencilWriteMask()"); if (pCB->static_status & CBSTATUS_STENCIL_WRITE_MASK_SET) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1de004b6, "DS", - "vkCmdSetStencilWriteMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_WRITE_MASK flag. %s.", - validation_error_map[VALIDATION_ERROR_1de004b6]); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1de004b6, "DS", + "vkCmdSetStencilWriteMask(): pipeline was created without VK_DYNAMIC_STATE_STENCIL_WRITE_MASK flag. %s.", + validation_error_map[VALIDATION_ERROR_1de004b6]); } if (!skip) { pCB->status |= CBSTATUS_STENCIL_WRITE_MASK_SET; @@ -5405,7 +6017,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, if (pCB) { skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetStencilReference()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1dc02415); - skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILREFERENCESTATE, "vkCmdSetStencilReference()"); + skip |= ValidateCmd(dev_data, pCB, CMD_SETSTENCILREFERENCE, "vkCmdSetStencilReference()"); if (pCB->static_status & CBSTATUS_STENCIL_REFERENCE_SET) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1dc004b8, "DS", @@ -5442,7 +6054,7 @@ static void PreCallRecordCmdBindDescriptorSets(layer_data *device_data, GLOBAL_C if ((last_bound->boundDescriptorSets[set_idx + firstSet] != nullptr) && last_bound->boundDescriptorSets[set_idx + firstSet]->IsPushDescriptor()) { - last_bound->push_descriptors[set_idx + firstSet] = nullptr; + last_bound->push_descriptor_set = nullptr; last_bound->boundDescriptorSets[set_idx + firstSet] = nullptr; } @@ -5456,6 +6068,7 @@ static void PreCallRecordCmdBindDescriptorSets(layer_data *device_data, GLOBAL_C pDynamicOffsets + total_dynamic_descriptors + set_dynamic_descriptor_count); total_dynamic_descriptors += set_dynamic_descriptor_count; } + cb_state->validated_descriptor_sets.insert(descriptor_set); } // For any previously bound sets, need to set them to "invalid" if they were disturbed by this update if (firstSet > 0) { @@ -5498,20 +6111,19 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL cvdescriptorset::DescriptorSet *descriptor_set = GetSetNode(device_data, pDescriptorSets[set_idx]); if (descriptor_set) { if (!descriptor_set->IsUpdated() && (descriptor_set->GetTotalDescriptorCount() != 0)) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(pDescriptorSets[set_idx]), __LINE__, - DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", - "Descriptor Set 0x%" PRIxLEAST64 - " bound but it was never updated. You may want to either update it or not bind it.", - HandleToUint64(pDescriptorSets[set_idx])); + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, + HandleToUint64(pDescriptorSets[set_idx]), __LINE__, DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, "DS", + "Descriptor Set 0x%" PRIx64 " bound but it was never updated. You may want to either update it or not bind it.", + HandleToUint64(pDescriptorSets[set_idx])); } // Verify that set being bound is compatible with overlapping setLayout of pipelineLayout if (!verify_set_layout_compatibility(descriptor_set, pipeline_layout, set_idx + firstSet, error_string)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(pDescriptorSets[set_idx]), __LINE__, VALIDATION_ERROR_17c002cc, "DS", - "descriptorSet #%u being bound is not compatible with overlapping descriptorSetLayout " - "at index %u of pipelineLayout 0x%" PRIxLEAST64 " due to: %s. %s", + "descriptorSet #%u being bound is not compatible with overlapping descriptorSetLayout at index %u of " + "pipelineLayout 0x%" PRIx64 " due to: %s. %s", set_idx, set_idx + firstSet, HandleToUint64(layout), error_string.c_str(), validation_error_map[VALIDATION_ERROR_17c002cc]); } @@ -5524,9 +6136,9 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(pDescriptorSets[set_idx]), __LINE__, DRAWSTATE_INVALID_DYNAMIC_OFFSET_COUNT, "DS", - "descriptorSet #%u (0x%" PRIxLEAST64 - ") requires %u dynamicOffsets, but only %u dynamicOffsets are left in pDynamicOffsets " - "array. There must be one dynamic offset for each dynamic descriptor being bound.", + "descriptorSet #%u (0x%" PRIx64 + ") requires %u dynamicOffsets, but only %u dynamicOffsets are left in pDynamicOffsets array. " + "There must be one dynamic offset for each dynamic descriptor being bound.", set_idx, HandleToUint64(pDescriptorSets[set_idx]), descriptor_set->GetDynamicDescriptorCount(), (dynamicOffsetCount - total_dynamic_descriptors)); } else { // Validate dynamic offsets and Dynamic Offset Minimums @@ -5569,7 +6181,7 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL } else { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(pDescriptorSets[set_idx]), __LINE__, DRAWSTATE_INVALID_SET, "DS", - "Attempt to bind descriptor set 0x%" PRIxLEAST64 " that doesn't exist!", + "Attempt to bind descriptor set 0x%" PRIx64 " that doesn't exist!", HandleToUint64(pDescriptorSets[set_idx])); } } @@ -5577,8 +6189,8 @@ static bool PreCallValidateCmdBindDescriptorSets(layer_data *device_data, GLOBAL if (total_dynamic_descriptors != dynamicOffsetCount) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_17c002ce, "DS", - "Attempting to bind %u descriptorSets with %u dynamic descriptors, but dynamicOffsetCount " - "is %u. It should exactly match the number of dynamic descriptors. %s", + "Attempting to bind %u descriptorSets with %u dynamic descriptors, but dynamicOffsetCount is %u. It should " + "exactly match the number of dynamic descriptors. %s", setCount, total_dynamic_descriptors, dynamicOffsetCount, validation_error_map[VALIDATION_ERROR_17c002ce]); } return skip; @@ -5603,18 +6215,76 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); } else { lock.unlock(); + } +} +// Validates that the supplied bind point is supported for the command buffer (vis. the command pool) +// Takes array of error codes as some of the VUID's (e.g. vkCmdBindPipeline) are written per bindpoint +// TODO add vkCmdBindPipeline bind_point validation using this call. +bool ValidatePipelineBindPoint(layer_data *device_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, + const char *func_name, + const std::array &bind_errors) { + bool skip = false; + auto pool = GetCommandPoolNode(device_data, cb_state->createInfo.commandPool); + if (pool) { // The loss of a pool in a recording cmd is reported in DestroyCommandPool + static const VkQueueFlags flag_mask[VK_PIPELINE_BIND_POINT_RANGE_SIZE] = {VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_COMPUTE_BIT}; + const auto bind_point_index = bind_point - VK_PIPELINE_BIND_POINT_BEGIN_RANGE; // typeof enum is not defined, use auto + const auto &qfp = GetPhysDevProperties(device_data)->queue_family_properties[pool->queueFamilyIndex]; + if (0 == (qfp.queueFlags & flag_mask[bind_point_index])) { + const UNIQUE_VALIDATION_ERROR_CODE error = bind_errors[bind_point_index]; + auto cb_u64 = HandleToUint64(cb_state->commandBuffer); + auto cp_u64 = HandleToUint64(cb_state->createInfo.commandPool); + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + cb_u64, __LINE__, error, "DS", + "%s: CommandBuffer 0x%" PRIxLEAST64 " was allocated from VkCommandPool 0x%" PRIxLEAST64 + " that does not support bindpoint %s. %s", + func_name, cb_u64, cp_u64, string_VkPipelineBindPoint(bind_point), validation_error_map[error]); + } } + return skip; } -static void PreCallRecordCmdPushDescriptorSetKHR(layer_data *device_data, VkCommandBuffer commandBuffer, +static bool PreCallValidateCmdPushDescriptorSetKHR(layer_data *device_data, GLOBAL_CB_NODE *cb_state, + const VkPipelineBindPoint bind_point, const VkPipelineLayout layout, + const uint32_t set, const uint32_t descriptor_write_count, + const VkWriteDescriptorSet *descriptor_writes, const char *func_name) { + bool skip = false; + skip |= ValidateCmd(device_data, cb_state, CMD_PUSHDESCRIPTORSETKHR, func_name); + skip |= ValidateCmdQueueFlags(device_data, cb_state, func_name, (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT), + VALIDATION_ERROR_1be02415); + skip |= ValidatePipelineBindPoint(device_data, cb_state, bind_point, func_name, + {{VALIDATION_ERROR_1be002d6, VALIDATION_ERROR_1be002d6}}); + auto layout_data = getPipelineLayout(device_data, layout); + + // Validate the set index points to a push descriptor set and is in range + if (layout_data) { + const auto &set_layouts = layout_data->set_layouts; + const auto layout_u64 = HandleToUint64(layout); + if (set < set_layouts.size()) { + const auto *dsl = set_layouts[set].get(); + if (dsl && (0 == (dsl->GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR))) { + skip = + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, layout_u64, __LINE__, VALIDATION_ERROR_1be002da, "DS", + "%s: Set index %" PRIu32 + " does not match push descriptor set layout index for VkPipelineLayout 0x%" PRIxLEAST64 ". %s", + func_name, set, layout_u64, validation_error_map[VALIDATION_ERROR_1be002da]); + } + } else { + skip = log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, + layout_u64, __LINE__, VALIDATION_ERROR_1be002d8, "DS", + "%s: Set index %" PRIu32 " is outside of range for VkPipelineLayout 0x%" PRIxLEAST64 " (set < %" PRIu32 + "). %s", + func_name, set, layout_u64, static_cast(set_layouts.size()), + validation_error_map[VALIDATION_ERROR_1be002d8]); + } + } + + return skip; +} +static void PreCallRecordCmdPushDescriptorSetKHR(layer_data *device_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites) { - auto cb_state = GetCBNode(device_data, commandBuffer); - - if (set >= cb_state->lastBound[pipelineBindPoint].push_descriptors.size()) { - cb_state->lastBound[pipelineBindPoint].push_descriptors.resize(set + 1); - } if (set >= cb_state->lastBound[pipelineBindPoint].boundDescriptorSets.size()) { cb_state->lastBound[pipelineBindPoint].boundDescriptorSets.resize(set + 1); cb_state->lastBound[pipelineBindPoint].dynamicOffsets.resize(set + 1); @@ -5623,7 +6293,7 @@ static void PreCallRecordCmdPushDescriptorSetKHR(layer_data *device_data, VkComm std::unique_ptr new_desc{ new cvdescriptorset::DescriptorSet(0, 0, layout_state->set_layouts[set], device_data)}; cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[set] = new_desc.get(); - cb_state->lastBound[pipelineBindPoint].push_descriptors[set] = std::move(new_desc); + cb_state->lastBound[pipelineBindPoint].push_descriptor_set = std::move(new_desc); } VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, @@ -5631,11 +6301,16 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer const VkWriteDescriptorSet *pDescriptorWrites) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); unique_lock_t lock(global_lock); - PreCallRecordCmdPushDescriptorSetKHR(device_data, commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, - pDescriptorWrites); - lock.unlock(); - device_data->dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, - pDescriptorWrites); + auto cb_state = GetCBNode(device_data, commandBuffer); + bool skip = PreCallValidateCmdPushDescriptorSetKHR(device_data, cb_state, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites, "vkCmdPushDescriptorSetKHR()"); + if (!skip) { + PreCallRecordCmdPushDescriptorSetKHR(device_data, cb_state, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites); + lock.unlock(); + device_data->dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites); + } } static VkDeviceSize GetIndexAlignment(VkIndexType indexType) { @@ -5662,8 +6337,8 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkB assert(cb_node); assert(buffer_state); - skip |= ValidateBufferUsageFlags(dev_data, buffer_state, VK_BUFFER_USAGE_INDEX_BUFFER_BIT, true, - VALIDATION_ERROR_17e00362, "vkCmdBindIndexBuffer()", "VK_BUFFER_USAGE_INDEX_BUFFER_BIT"); + skip |= ValidateBufferUsageFlags(dev_data, buffer_state, VK_BUFFER_USAGE_INDEX_BUFFER_BIT, true, VALIDATION_ERROR_17e00362, + "vkCmdBindIndexBuffer()", "VK_BUFFER_USAGE_INDEX_BUFFER_BIT"); skip |= ValidateCmdQueueFlags(dev_data, cb_node, "vkCmdBindIndexBuffer()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_17e02415); skip |= ValidateCmd(dev_data, cb_node, CMD_BINDINDEXBUFFER, "vkCmdBindIndexBuffer()"); skip |= ValidateMemoryIsBoundToBuffer(dev_data, buffer_state, "vkCmdBindIndexBuffer()", VALIDATION_ERROR_17e00364); @@ -5672,12 +6347,10 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkB skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_17e00360, "DS", "vkCmdBindIndexBuffer() offset (0x%" PRIxLEAST64 ") does not fall on alignment (%s) boundary. %s", offset, - string_VkIndexType(indexType), - validation_error_map[VALIDATION_ERROR_17e00360]); + string_VkIndexType(indexType), validation_error_map[VALIDATION_ERROR_17e00360]); } - if (skip) - return; + if (skip) return; std::function function = [=]() { return ValidateBufferMemoryIsValid(dev_data, buffer_state, "vkCmdBindIndexBuffer()"); @@ -5711,23 +6384,22 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, u assert(cb_node); skip |= ValidateCmdQueueFlags(dev_data, cb_node, "vkCmdBindVertexBuffers()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_18202415); - skip |= ValidateCmd(dev_data, cb_node, CMD_BINDVERTEXBUFFER, "vkCmdBindVertexBuffers()"); + skip |= ValidateCmd(dev_data, cb_node, CMD_BINDVERTEXBUFFERS, "vkCmdBindVertexBuffers()"); for (uint32_t i = 0; i < bindingCount; ++i) { auto buffer_state = GetBufferState(dev_data, pBuffers[i]); assert(buffer_state); - skip |= ValidateBufferUsageFlags(dev_data, buffer_state, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, true, - VALIDATION_ERROR_182004e6, "vkCmdBindVertexBuffers()", "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT"); + skip |= ValidateBufferUsageFlags(dev_data, buffer_state, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, true, VALIDATION_ERROR_182004e6, + "vkCmdBindVertexBuffers()", "VK_BUFFER_USAGE_VERTEX_BUFFER_BIT"); skip |= ValidateMemoryIsBoundToBuffer(dev_data, buffer_state, "vkCmdBindVertexBuffers()", VALIDATION_ERROR_182004e8); if (pOffsets[i] >= buffer_state->createInfo.size) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, HandleToUint64(buffer_state->buffer), __LINE__, VALIDATION_ERROR_182004e4, "DS", - "vkCmdBindVertexBuffers() offset (0x%" PRIxLEAST64 ") is beyond the end of the buffer. %s", - pOffsets[i], validation_error_map[VALIDATION_ERROR_182004e4]); + "vkCmdBindVertexBuffers() offset (0x%" PRIxLEAST64 ") is beyond the end of the buffer. %s", pOffsets[i], + validation_error_map[VALIDATION_ERROR_182004e4]); } } - if (skip) - return; + if (skip) return; for (uint32_t i = 0; i < bindingCount; ++i) { auto buffer_state = GetBufferState(dev_data, pBuffers[i]); @@ -6036,7 +6708,7 @@ bool ValidateImageSampleCount(layer_data *dev_data, IMAGE_STATE *image_state, Vk if (image_state->createInfo.samples != sample_count) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, HandleToUint64(image_state->image), 0, msgCode, "DS", - "%s for image 0x%" PRIxLEAST64 " was created with a sample count of %s but must be %s. %s", location, + "%s for image 0x%" PRIx64 " was created with a sample count of %s but must be %s. %s", location, HandleToUint64(image_state->image), string_VkSampleCountFlagBits(image_state->createInfo.samples), string_VkSampleCountFlagBits(sample_count), validation_error_map[msgCode]); } @@ -6053,10 +6725,12 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage s auto src_image_state = GetImageState(dev_data, srcImage); auto dst_image_state = GetImageState(dev_data, dstImage); - bool skip = PreCallValidateCmdBlitImage(dev_data, cb_node, src_image_state, dst_image_state, regionCount, pRegions, filter); + bool skip = PreCallValidateCmdBlitImage(dev_data, cb_node, src_image_state, dst_image_state, regionCount, pRegions, + srcImageLayout, dstImageLayout, filter); if (!skip) { - PreCallRecordCmdBlitImage(dev_data, cb_node, src_image_state, dst_image_state); + PreCallRecordCmdBlitImage(dev_data, cb_node, src_image_state, dst_image_state, regionCount, pRegions, srcImageLayout, + dstImageLayout); lock.unlock(); dev_data->dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); @@ -6074,7 +6748,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V auto dst_image_state = GetImageState(device_data, dstImage); if (cb_node && src_buffer_state && dst_image_state) { skip = PreCallValidateCmdCopyBufferToImage(device_data, dstImageLayout, cb_node, src_buffer_state, dst_image_state, - regionCount, pRegions, "vkCmdCopyBufferToImage()"); + regionCount, pRegions, "vkCmdCopyBufferToImage()"); } else { lock.unlock(); assert(0); @@ -6099,7 +6773,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, V auto dst_buffer_state = GetBufferState(device_data, dstBuffer); if (cb_node && src_image_state && dst_buffer_state) { skip = PreCallValidateCmdCopyImageToBuffer(device_data, srcImageLayout, cb_node, src_image_state, dst_buffer_state, - regionCount, pRegions, "vkCmdCopyImageToBuffer()"); + regionCount, pRegions, "vkCmdCopyImageToBuffer()"); } else { lock.unlock(); assert(0); @@ -6239,9 +6913,11 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + unique_lock_t lock(global_lock); bool skip = PreCallValidateGetImageSubresourceLayout(device_data, image, pSubresource); if (!skip) { + lock.unlock(); device_data->dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); } } @@ -6280,7 +6956,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent ev if (!pCB->waitedEvents.count(event)) { pCB->writeEventsBeforeWait.push_back(event); } - pCB->eventUpdates.emplace_back([=](VkQueue q){return setEventStageMask(q, commandBuffer, event, stageMask);}); + pCB->eventUpdates.emplace_back([=](VkQueue q) { return setEventStageMask(q, commandBuffer, event, stageMask); }); } lock.unlock(); if (!skip) dev_data->dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); @@ -6308,7 +6984,8 @@ VKAPI_ATTR void VKAPI_CALL CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent pCB->writeEventsBeforeWait.push_back(event); } // TODO : Add check for VALIDATION_ERROR_32c008f8 - pCB->eventUpdates.emplace_back([=](VkQueue q){return setEventStageMask(q, commandBuffer, event, VkPipelineStageFlags(0));}); + pCB->eventUpdates.emplace_back( + [=](VkQueue q) { return setEventStageMask(q, commandBuffer, event, VkPipelineStageFlags(0)); }); } lock.unlock(); if (!skip) dev_data->dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); @@ -6384,13 +7061,13 @@ static bool ValidateImageBarrierImage(layer_data *device_data, const char *funcN funcName, img_index, HandleToUint64(img_bar_image), fb_handle, validation_error_map[VALIDATION_ERROR_1b800936]); } if (img_barrier.oldLayout != img_barrier.newLayout) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_1b80093a, "CORE", - "%s: As the Image Barrier for image 0x%" PRIx64 - " is being executed within a render pass instance, oldLayout must equal newLayout yet they are " - "%s and %s. %s", - funcName, HandleToUint64(img_barrier.image), string_VkImageLayout(img_barrier.oldLayout), - string_VkImageLayout(img_barrier.newLayout), validation_error_map[VALIDATION_ERROR_1b80093a]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_1b80093a, "CORE", + "%s: As the Image Barrier for image 0x%" PRIx64 + " is being executed within a render pass instance, oldLayout must equal newLayout yet they are %s and %s. %s", + funcName, HandleToUint64(img_barrier.image), string_VkImageLayout(img_barrier.oldLayout), + string_VkImageLayout(img_barrier.newLayout), validation_error_map[VALIDATION_ERROR_1b80093a]); } else { if (sub_image_found && sub_image_layout != img_barrier.oldLayout) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, @@ -6419,8 +7096,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b80092e, "CORE", "%s: Barrier pImageMemoryBarriers[%d].srcAccessMask(0x%X) is not a subset of VkSubpassDependency " - "srcAccessMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "srcAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, i, img_src_access_mask, sub_src_access_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b80092e]); } @@ -6429,8 +7105,7 @@ static bool ValidateRenderPassImageBarriers(layer_data *device_data, const char skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b800930, "CORE", "%s: Barrier pImageMemoryBarriers[%d].dstAccessMask(0x%X) is not a subset of VkSubpassDependency " - "dstAccessMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "dstAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, i, img_dst_access_mask, sub_dst_access_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b800930]); } @@ -6488,8 +7163,8 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch (src_stage_mask != (sub_src_stage_mask & src_stage_mask))) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b80092a, "CORE", - "%s: Barrier srcStageMask(0x%X) is not a subset of VkSubpassDependency srcStageMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "%s: Barrier srcStageMask(0x%X) is not a subset of VkSubpassDependency srcStageMask(0x%X) of subpass " + "%d of renderPass 0x%" PRIx64 ". %s", funcName, src_stage_mask, sub_src_stage_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b80092a]); } @@ -6497,18 +7172,17 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch (dst_stage_mask != (sub_dst_stage_mask & dst_stage_mask))) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b80092c, "CORE", - "%s: Barrier dstStageMask(0x%X) is not a subset of VkSubpassDependency dstStageMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "%s: Barrier dstStageMask(0x%X) is not a subset of VkSubpassDependency dstStageMask(0x%X) of subpass " + "%d of renderPass 0x%" PRIx64 ". %s", funcName, dst_stage_mask, sub_dst_stage_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b80092c]); } if (0 != buffer_mem_barrier_count) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - rp_handle, __LINE__, VALIDATION_ERROR_1b800934, "CORE", - "%s: bufferMemoryBarrierCount is non-zero (%d) for " - "subpass %d of renderPass 0x%" PRIx64 ". %s", - funcName, buffer_mem_barrier_count, active_subpass, rp_handle, - validation_error_map[VALIDATION_ERROR_1b800934]); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + rp_handle, __LINE__, VALIDATION_ERROR_1b800934, "CORE", + "%s: bufferMemoryBarrierCount is non-zero (%d) for subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, + buffer_mem_barrier_count, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b800934]); } const auto &sub_src_access_mask = sub_dep.srcAccessMask; const auto &sub_dst_access_mask = sub_dep.dstAccessMask; @@ -6518,8 +7192,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b80092e, "CORE", "%s: Barrier pMemoryBarriers[%d].srcAccessMask(0x%X) is not a subset of VkSubpassDependency " - "srcAccessMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "srcAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, i, mb_src_access_mask, sub_src_access_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b80092e]); } @@ -6528,8 +7201,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b800930, "CORE", "%s: Barrier pMemoryBarriers[%d].dstAccessMask(0x%X) is not a subset of VkSubpassDependency " - "dstAccessMask(0x%X) of " - "subpass %d of renderPass 0x%" PRIx64 ". %s", + "dstAccessMask(0x%X) of subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, i, mb_dst_access_mask, sub_dst_access_mask, active_subpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b800930]); } @@ -6539,8 +7211,7 @@ static bool ValidateRenderPassPipelineBarriers(layer_data *device_data, const ch if (sub_dep.dependencyFlags != dependency_flags) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, rp_handle, __LINE__, VALIDATION_ERROR_1b800932, "CORE", - "%s: dependencyFlags param (0x%X) does not equal VkSubpassDependency " - "dependencyFlags value (0x%X) for " + "%s: dependencyFlags param (0x%X) does not equal VkSubpassDependency dependencyFlags value (0x%X) for " "subpass %d of renderPass 0x%" PRIx64 ". %s", funcName, dependency_flags, sub_dep.dependencyFlags, cb_state->activeSubpass, rp_handle, validation_error_map[VALIDATION_ERROR_1b800932]); @@ -6616,7 +7287,257 @@ static bool ValidateAccessMaskPipelineStage(VkAccessFlags access_mask, VkPipelin return true; } -static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOBAL_CB_NODE const *cb_state, +namespace barrier_queue_families { +enum VuIndex { + kSrcOrDstMustBeIgnore, + kSpecialOrIgnoreOnly, + kSrcIgnoreRequiresDstIgnore, + kDstValidOrSpecialIfNotIgnore, + kSrcValidOrSpecialIfNotIgnore, + kSrcAndDestMustBeIgnore, + kBothIgnoreOrBothValid, + kSubmitQueueMustMatchSrcOrDst +}; +static const char *vu_summary[] = {"Source or destination queue family must be ignored.", + "Source or destination queue family must be special or ignored.", + "Destination queue family must be ignored if source queue family is.", + "Destination queue family must be valid, ignored, or special.", + "Source queue family must be valid, ignored, or special.", + "Source and destination queue family must both be ignored.", + "Source and destination queue family must both be ignore or both valid.", + "Source or destination queue family must match submit queue family, if not ignored."}; + +static const UNIQUE_VALIDATION_ERROR_CODE image_error_codes[] = { + VALIDATION_ERROR_0a000aca, // VUID-VkImageMemoryBarrier-image-01381 -- kSrcOrDstMustBeIgnore + VALIDATION_ERROR_0a000dcc, // VUID-VkImageMemoryBarrier-image-01766 -- kSpecialOrIgnoreOnly + VALIDATION_ERROR_0a000962, // VUID-VkImageMemoryBarrier-image-01201 -- kSrcIgnoreRequiresDstIgnore + VALIDATION_ERROR_0a000dd0, // VUID-VkImageMemoryBarrier-image-01768 -- kDstValidOrSpecialIfNotIgnore + VALIDATION_ERROR_0a000dce, // VUID-VkImageMemoryBarrier-image-01767 -- kSrcValidOrSpecialIfNotIgnore + VALIDATION_ERROR_0a00095e, // VUID-VkImageMemoryBarrier-image-01199 -- kSrcAndDestMustBeIgnore + VALIDATION_ERROR_0a000960, // VUID-VkImageMemoryBarrier-image-01200 -- kBothIgnoreOrBothValid + VALIDATION_ERROR_0a00096a, // VUID-VkImageMemoryBarrier-image-01205 -- kSubmitQueueMustMatchSrcOrDst +}; + +static const UNIQUE_VALIDATION_ERROR_CODE buffer_error_codes[] = { + VALIDATION_ERROR_0180094e, // VUID-VkBufferMemoryBarrier-buffer-01191 -- kSrcOrDstMustBeIgnore + VALIDATION_ERROR_01800dc6, // VUID-VkBufferMemoryBarrier-buffer-01763 -- kSpecialOrIgnoreOnly + VALIDATION_ERROR_01800952, // VUID-VkBufferMemoryBarrier-buffer-01193 -- kSrcIgnoreRequiresDstIgnore + VALIDATION_ERROR_01800dca, // VUID-VkBufferMemoryBarrier-buffer-01765 -- kDstValidOrSpecialIfNotIgnore + VALIDATION_ERROR_01800dc8, // VUID-VkBufferMemoryBarrier-buffer-01764 -- kSrcValidOrSpecialIfNotIgnore + VALIDATION_ERROR_0180094c, // VUID-VkBufferMemoryBarrier-buffer-01190 -- kSrcAndDestMustBeIgnore + VALIDATION_ERROR_01800950, // VUID-VkBufferMemoryBarrier-buffer-01192 -- kBothIgnoreOrBothValid + VALIDATION_ERROR_01800958, // VUID-VkBufferMemoryBarrier-buffer-01196 -- kSubmitQueueMustMatchSrcOrDst +}; + +class ValidatorState { + public: + ValidatorState(const layer_data *device_data, const char *func_name, const GLOBAL_CB_NODE *cb_state, + const uint64_t barrier_handle64, const VkSharingMode sharing_mode, const VulkanObjectType object_type, + const UNIQUE_VALIDATION_ERROR_CODE *val_codes) + : report_data_(device_data->report_data), + func_name_(func_name), + cb_handle64_(HandleToUint64(cb_state->commandBuffer)), + barrier_handle64_(barrier_handle64), + sharing_mode_(sharing_mode), + object_type_(object_type), + val_codes_(val_codes), + limit_(static_cast(device_data->phys_dev_properties.queue_family_properties.size())), + mem_ext_(device_data->extensions.vk_khr_external_memory) {} + + // Create a validator state from an image state... reducing the image specific to the generic version. + ValidatorState(const layer_data *device_data, const char *func_name, const GLOBAL_CB_NODE *cb_state, + const VkImageMemoryBarrier *barrier, const IMAGE_STATE *state) + : ValidatorState(device_data, func_name, cb_state, HandleToUint64(barrier->image), state->createInfo.sharingMode, + kVulkanObjectTypeImage, image_error_codes) {} + + // Create a validator state from an buffer state... reducing the buffer specific to the generic version. + ValidatorState(const layer_data *device_data, const char *func_name, const GLOBAL_CB_NODE *cb_state, + const VkBufferMemoryBarrier *barrier, const BUFFER_STATE *state) + : ValidatorState(device_data, func_name, cb_state, HandleToUint64(barrier->buffer), state->createInfo.sharingMode, + kVulkanObjectTypeImage, buffer_error_codes) {} + + // Log the messages using boilerplate from object state, and Vu specific information from the template arg + // One and two family versions, in the single family version, Vu holds the name of the passed parameter + bool LogMsg(VuIndex vu_index, size_t location, uint32_t family, const char *param_name) const { + const UNIQUE_VALIDATION_ERROR_CODE val_code = val_codes_[vu_index]; + const char *annotation = GetFamilyAnnotation(family); + return log_msg(report_data_, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, cb_handle64_, + location, val_code, "DS", + "%s: Barrier using %s 0x%" PRIx64 " created with sharingMode %s, has %s %u%s. %s %s", func_name_, + GetTypeString(), barrier_handle64_, GetModeString(), param_name, family, annotation, vu_summary[vu_index], + validation_error_map[val_code]); + } + + bool LogMsg(VuIndex vu_index, size_t location, uint32_t src_family, uint32_t dst_family) const { + const UNIQUE_VALIDATION_ERROR_CODE val_code = val_codes_[vu_index]; + const char *src_annotation = GetFamilyAnnotation(src_family); + const char *dst_annotation = GetFamilyAnnotation(dst_family); + return log_msg(report_data_, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, cb_handle64_, + location, val_code, "DS", + "%s: Barrier using %s 0x%" PRIx64 + " created with sharingMode %s, has srcQueueFamilyIndex %u%s and dstQueueFamilyIndex %u%s. %s %s", + func_name_, GetTypeString(), barrier_handle64_, GetModeString(), src_family, src_annotation, dst_family, + dst_annotation, vu_summary[vu_index], validation_error_map[val_code]); + } + + // This abstract Vu can only be tested at submit time, thus we need a callback from the closure containing the needed + // data. Note that the mem_barrier is copied to the closure as the lambda lifespan exceed the guarantees of validity for + // application input. + static bool ValidateAtQueueSubmit(const VkQueue queue, const layer_data *device_data, uint32_t src_family, uint32_t dst_family, + const ValidatorState &val) { + auto queue_data_it = device_data->queueMap.find(queue); + if (queue_data_it == device_data->queueMap.end()) return false; + + uint32_t queue_family = queue_data_it->second.queueFamilyIndex; + if ((src_family != queue_family) && (dst_family != queue_family)) { + const UNIQUE_VALIDATION_ERROR_CODE val_code = val.val_codes_[kSubmitQueueMustMatchSrcOrDst]; + const char *src_annotation = val.GetFamilyAnnotation(src_family); + const char *dst_annotation = val.GetFamilyAnnotation(dst_family); + return log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, + HandleToUint64(queue), __LINE__, val_code, "DS", + "%s: Barrier submitted to queue with family index %u, using %s 0x%" PRIx64 + " created with sharingMode %s, has srcQueueFamilyIndex %u%s and dstQueueFamilyIndex %u%s. %s %s", + "vkQueueSubmit", queue_family, val.GetTypeString(), val.barrier_handle64_, val.GetModeString(), + src_family, src_annotation, dst_family, dst_annotation, vu_summary[kSubmitQueueMustMatchSrcOrDst], + validation_error_map[val_code]); + } + return false; + } + // Logical helpers for semantic clarity + inline bool KhrExternalMem() const { return mem_ext_; } + inline bool IsValid(uint32_t queue_family) const { return (queue_family < limit_); } + inline bool IsSpecial(uint32_t queue_family) const { + return (queue_family == VK_QUEUE_FAMILY_EXTERNAL_KHR) || (queue_family == VK_QUEUE_FAMILY_FOREIGN_EXT); + } + inline bool IsValidOrSpecial(uint32_t queue_family) const { + return IsValid(queue_family) || (mem_ext_ && IsSpecial(queue_family)); + } + inline bool IsIgnored(uint32_t queue_family) const { return queue_family == VK_QUEUE_FAMILY_IGNORED; } + + // Helpers for LogMsg (and log_msg) + const char *GetModeString() const { return string_VkSharingMode(sharing_mode_); } + + // Descriptive text for the various types of queue family index + const char *GetFamilyAnnotation(uint32_t family) const { + const char *external = " (VK_QUEUE_FAMILY_EXTERNAL_KHR)"; + const char *foreign = " (VK_QUEUE_FAMILY_FOREIGN_EXT)"; + const char *ignored = " (VK_QUEUE_FAMILY_IGNORED)"; + const char *valid = " (VALID)"; + const char *invalid = " (INVALID)"; + switch (family) { + case VK_QUEUE_FAMILY_EXTERNAL_KHR: + return external; + case VK_QUEUE_FAMILY_FOREIGN_EXT: + return foreign; + case VK_QUEUE_FAMILY_IGNORED: + return ignored; + default: + if (IsValid(family)) { + return valid; + } + return invalid; + }; + } + const char *GetTypeString() const { return object_string[object_type_]; } + VkSharingMode GetSharingMode() const { return sharing_mode_; } + + protected: + const debug_report_data *const report_data_; + const char *const func_name_; + const uint64_t cb_handle64_; + const uint64_t barrier_handle64_; + const VkSharingMode sharing_mode_; + const VulkanObjectType object_type_; + const UNIQUE_VALIDATION_ERROR_CODE *val_codes_; + const uint32_t limit_; + const bool mem_ext_; +}; + +bool Validate(const layer_data *device_data, const char *func_name, GLOBAL_CB_NODE *cb_state, const ValidatorState &val, + const uint32_t src_queue_family, const uint32_t dst_queue_family) { + bool skip = false; + + const bool mode_concurrent = val.GetSharingMode() == VK_SHARING_MODE_CONCURRENT; + const bool src_ignored = val.IsIgnored(src_queue_family); + const bool dst_ignored = val.IsIgnored(dst_queue_family); + if (val.KhrExternalMem()) { + if (mode_concurrent) { + if (!(src_ignored || dst_ignored)) { + skip |= val.LogMsg(kSrcOrDstMustBeIgnore, __LINE__, src_queue_family, dst_queue_family); + } + if ((src_ignored && !(dst_ignored || val.IsSpecial(dst_queue_family))) || + (dst_ignored && !(src_ignored || val.IsSpecial(src_queue_family)))) { + skip |= val.LogMsg(kSpecialOrIgnoreOnly, __LINE__, src_queue_family, dst_queue_family); + } + } else { + // VK_SHARING_MODE_EXCLUSIVE + if (src_ignored && !dst_ignored) { + skip |= val.LogMsg(kSrcIgnoreRequiresDstIgnore, __LINE__, src_queue_family, dst_queue_family); + } + if (!dst_ignored && !val.IsValidOrSpecial(dst_queue_family)) { + skip |= val.LogMsg(kDstValidOrSpecialIfNotIgnore, __LINE__, dst_queue_family, "dstQueueFamilyIndex"); + } + if (!src_ignored && !val.IsValidOrSpecial(src_queue_family)) { + skip |= val.LogMsg(kSrcValidOrSpecialIfNotIgnore, __LINE__, src_queue_family, "srcQueueFamilyIndex"); + } + } + } else { + // No memory extension + if (mode_concurrent) { + if (!src_ignored || !dst_ignored) { + skip |= val.LogMsg(kSrcAndDestMustBeIgnore, __LINE__, src_queue_family, dst_queue_family); + } + } else { + // VK_SHARING_MODE_EXCLUSIVE + if (!((src_ignored && dst_ignored) || (val.IsValid(src_queue_family) && val.IsValid(dst_queue_family)))) { + skip |= val.LogMsg(kBothIgnoreOrBothValid, __LINE__, src_queue_family, dst_queue_family); + } + } + } + if (!mode_concurrent && !src_ignored && !dst_ignored) { + // Only enqueue submit time check if it is needed. If more submit time checks are added, change the criteria + // TODO create a better named list, or rename the submit time lists to something that matches the broader usage... + // Note: if we want to create a semantic that separates state lookup, validation, and state update this should go + // to a local queue of update_state_actions or something. + cb_state->eventUpdates.emplace_back([device_data, src_queue_family, dst_queue_family, val](VkQueue queue) { + return ValidatorState::ValidateAtQueueSubmit(queue, device_data, src_queue_family, dst_queue_family, val); + }); + } + return skip; +} +} // namespace barrier_queue_families + +// Type specific wrapper for image barriers +bool ValidateBarrierQueueFamilies(const layer_data *device_data, const char *func_name, GLOBAL_CB_NODE *cb_state, + const VkImageMemoryBarrier *barrier, const IMAGE_STATE *state_data) { + // State data is required + if (!state_data) { + return false; + } + + // Create the validator state from the image state + barrier_queue_families::ValidatorState val(device_data, func_name, cb_state, barrier, state_data); + const uint32_t src_queue_family = barrier->srcQueueFamilyIndex; + const uint32_t dst_queue_family = barrier->dstQueueFamilyIndex; + return barrier_queue_families::Validate(device_data, func_name, cb_state, val, src_queue_family, dst_queue_family); +} + +// Type specific wrapper for buffer barriers +bool ValidateBarrierQueueFamilies(const layer_data *device_data, const char *func_name, GLOBAL_CB_NODE *cb_state, + const VkBufferMemoryBarrier *barrier, const BUFFER_STATE *state_data) { + // State data is required + if (!state_data) { + return false; + } + + // Create the validator state from the buffer state + barrier_queue_families::ValidatorState val(device_data, func_name, cb_state, barrier, state_data); + const uint32_t src_queue_family = barrier->srcQueueFamilyIndex; + const uint32_t dst_queue_family = barrier->dstQueueFamilyIndex; + return barrier_queue_families::Validate(device_data, func_name, cb_state, val, src_queue_family, dst_queue_family); +} + +static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOBAL_CB_NODE *cb_state, VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask, uint32_t memBarrierCount, const VkMemoryBarrier *pMemBarriers, uint32_t bufferBarrierCount, const VkBufferMemoryBarrier *pBufferMemBarriers, uint32_t imageMemBarrierCount, @@ -6651,63 +7572,24 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB "%s: pImageMemBarriers[%d].dstAccessMask (0x%X) is not supported by dstStageMask (0x%X). %s", funcName, i, mem_barrier->dstAccessMask, dst_stage_mask, validation_error_map[VALIDATION_ERROR_1b800942]); } + auto image_data = GetImageState(device_data, mem_barrier->image); - if (image_data) { - uint32_t src_q_f_index = mem_barrier->srcQueueFamilyIndex; - uint32_t dst_q_f_index = mem_barrier->dstQueueFamilyIndex; - if (image_data->createInfo.sharingMode == VK_SHARING_MODE_CONCURRENT) { - // srcQueueFamilyIndex and dstQueueFamilyIndex must both - // be VK_QUEUE_FAMILY_IGNORED - if ((src_q_f_index != VK_QUEUE_FAMILY_IGNORED) || (dst_q_f_index != VK_QUEUE_FAMILY_IGNORED)) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), - __LINE__, DRAWSTATE_INVALID_QUEUE_INDEX, "DS", - "%s: Image Barrier for image 0x%" PRIx64 - " was created with sharingMode of " - "VK_SHARING_MODE_CONCURRENT. Src and dst " - "queueFamilyIndices must be VK_QUEUE_FAMILY_IGNORED.", - funcName, HandleToUint64(mem_barrier->image)); - } - } else { - // Sharing mode is VK_SHARING_MODE_EXCLUSIVE. srcQueueFamilyIndex and - // dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, - // or both be a valid queue family - if (((src_q_f_index == VK_QUEUE_FAMILY_IGNORED) || (dst_q_f_index == VK_QUEUE_FAMILY_IGNORED)) && - (src_q_f_index != dst_q_f_index)) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), - __LINE__, DRAWSTATE_INVALID_QUEUE_INDEX, "DS", - "%s: Image 0x%" PRIx64 - " was created with sharingMode " - "of VK_SHARING_MODE_EXCLUSIVE. If one of src- or " - "dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, both " - "must be.", - funcName, HandleToUint64(mem_barrier->image)); - } else if (((src_q_f_index != VK_QUEUE_FAMILY_IGNORED) && (dst_q_f_index != VK_QUEUE_FAMILY_IGNORED)) && - ((src_q_f_index >= device_data->phys_dev_properties.queue_family_properties.size()) || - (dst_q_f_index >= device_data->phys_dev_properties.queue_family_properties.size()))) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(cb_state->commandBuffer), - __LINE__, DRAWSTATE_INVALID_QUEUE_INDEX, "DS", - "%s: Image 0x%" PRIx64 - " was created with sharingMode " - "of VK_SHARING_MODE_EXCLUSIVE, but srcQueueFamilyIndex %d" - " or dstQueueFamilyIndex %d is greater than " PRINTF_SIZE_T_SPECIFIER - "queueFamilies crated for this device.", - funcName, HandleToUint64(mem_barrier->image), src_q_f_index, dst_q_f_index, - device_data->phys_dev_properties.queue_family_properties.size()); - } - } - } + skip |= ValidateBarrierQueueFamilies(device_data, funcName, cb_state, mem_barrier, image_data); if (mem_barrier->newLayout == VK_IMAGE_LAYOUT_UNDEFINED || mem_barrier->newLayout == VK_IMAGE_LAYOUT_PREINITIALIZED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", - "%s: Image Layout cannot be transitioned to UNDEFINED or " - "PREINITIALIZED.", - funcName); + HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_0a00095c, "DS", + "%s: Image Layout cannot be transitioned to UNDEFINED or PREINITIALIZED. %s", funcName, + validation_error_map[VALIDATION_ERROR_0a00095c]); } + if (image_data) { + // There is no VUID for this, but there is blanket text: + // "Non-sparse resources must be bound completely and contiguously to a single VkDeviceMemory object before + // recording commands in a command buffer." + // TODO: Update this when VUID is defined + skip |= ValidateMemoryIsBoundToImage(device_data, image_data, funcName, VALIDATION_ERROR_UNDEFINED); + auto aspect_mask = mem_barrier->subresourceRange.aspectMask; skip |= ValidateImageAspectMask(device_data, image_data->image, image_data->createInfo.format, aspect_mask, funcName); @@ -6734,37 +7616,33 @@ static bool ValidateBarriers(layer_data *device_data, const char *funcName, GLOB i, mem_barrier->dstAccessMask, dst_stage_mask, validation_error_map[VALIDATION_ERROR_1b800942]); } // Validate buffer barrier queue family indices - if ((mem_barrier->srcQueueFamilyIndex != VK_QUEUE_FAMILY_IGNORED && - mem_barrier->srcQueueFamilyIndex >= device_data->phys_dev_properties.queue_family_properties.size()) || - (mem_barrier->dstQueueFamilyIndex != VK_QUEUE_FAMILY_IGNORED && - mem_barrier->dstQueueFamilyIndex >= device_data->phys_dev_properties.queue_family_properties.size())) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_QUEUE_INDEX, "DS", - "%s: Buffer Barrier 0x%" PRIx64 - " has QueueFamilyIndex greater " - "than the number of QueueFamilies (" PRINTF_SIZE_T_SPECIFIER ") for this device.", - funcName, HandleToUint64(mem_barrier->buffer), - device_data->phys_dev_properties.queue_family_properties.size()); - } - auto buffer_state = GetBufferState(device_data, mem_barrier->buffer); + skip |= ValidateBarrierQueueFamilies(device_data, funcName, cb_state, mem_barrier, buffer_state); + if (buffer_state) { - auto buffer_size = buffer_state->requirements.size; + // There is no VUID for this, but there is blanket text: + // "Non-sparse resources must be bound completely and contiguously to a single VkDeviceMemory object before + // recording commands in a command buffer" + // TODO: Update this when VUID is defined + skip |= ValidateMemoryIsBoundToBuffer(device_data, buffer_state, funcName, VALIDATION_ERROR_UNDEFINED); + + auto buffer_size = buffer_state->createInfo.size; if (mem_barrier->offset >= buffer_size) { skip |= log_msg( device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", - "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " which is not less than total size 0x%" PRIx64 ".", - funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), - HandleToUint64(buffer_size)); + HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_01800946, "DS", + "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " which is not less than total size 0x%" PRIx64 ". %s", + funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), HandleToUint64(buffer_size), + validation_error_map[VALIDATION_ERROR_01800946]); } else if (mem_barrier->size != VK_WHOLE_SIZE && (mem_barrier->offset + mem_barrier->size > buffer_size)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(cb_state->commandBuffer), __LINE__, DRAWSTATE_INVALID_BARRIER, "DS", + HandleToUint64(cb_state->commandBuffer), __LINE__, VALIDATION_ERROR_0180094a, "DS", "%s: Buffer Barrier 0x%" PRIx64 " has offset 0x%" PRIx64 " and size 0x%" PRIx64 - " whose sum is greater than total size 0x%" PRIx64 ".", + " whose sum is greater than total size 0x%" PRIx64 ". %s", funcName, HandleToUint64(mem_barrier->buffer), HandleToUint64(mem_barrier->offset), - HandleToUint64(mem_barrier->size), HandleToUint64(buffer_size)); + HandleToUint64(mem_barrier->size), HandleToUint64(buffer_size), + validation_error_map[VALIDATION_ERROR_0180094a]); } } } @@ -6799,11 +7677,9 @@ bool validateEventStageMask(VkQueue queue, GLOBAL_CB_NODE *pCB, uint32_t eventCo if (sourceStageMask != stageMask && sourceStageMask != (stageMask | VK_PIPELINE_STAGE_HOST_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, VALIDATION_ERROR_1e62d401, "DS", - "Submitting cmdbuffer with call to VkCmdWaitEvents " - "using srcStageMask 0x%X which must be the bitwise " - "OR of the stageMask parameters used in calls to " - "vkCmdSetEvent and VK_PIPELINE_STAGE_HOST_BIT if " - "used with vkSetEvent but instead is 0x%X. %s", + "Submitting cmdbuffer with call to VkCmdWaitEvents using srcStageMask 0x%X which must be the bitwise OR of " + "the stageMask parameters used in calls to vkCmdSetEvent and VK_PIPELINE_STAGE_HOST_BIT if used with " + "vkSetEvent but instead is 0x%X. %s", sourceStageMask, stageMask, validation_error_map[VALIDATION_ERROR_1e62d401]); } return skip; @@ -6852,8 +7728,7 @@ bool CheckStageMaskQueueCompatibility(layer_data *dev_data, VkCommandBuffer comm skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(command_buffer), __LINE__, error_code, "DL", - "%s(): %s flag %s is not compatible with the queue family properties of this " - "command buffer. %s", + "%s(): %s flag %s is not compatible with the queue family properties of this command buffer. %s", function, src_or_dest, string_VkPipelineStageFlagBits(static_cast(item)), validation_error_map[error_code]); } @@ -6917,15 +7792,15 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t for (uint32_t i = 0; i < eventCount; ++i) { auto event_state = GetEventNode(dev_data, pEvents[i]); if (event_state) { - addCommandBufferBinding(&event_state->cb_bindings, {HandleToUint64(pEvents[i]), kVulkanObjectTypeEvent}, cb_state); + addCommandBufferBinding(&event_state->cb_bindings, {HandleToUint64(pEvents[i]), kVulkanObjectTypeEvent}, + cb_state); event_state->cb_bindings.insert(cb_state); } cb_state->waitedEvents.insert(pEvents[i]); cb_state->events.push_back(pEvents[i]); } - cb_state->eventUpdates.emplace_back([=](VkQueue q){ - return validateEventStageMask(q, cb_state, eventCount, first_event_index, sourceStageMask); - }); + cb_state->eventUpdates.emplace_back( + [=](VkQueue q) { return validateEventStageMask(q, cb_state, eventCount, first_event_index, sourceStageMask); }); TransitionImageLayouts(dev_data, commandBuffer, imageMemoryBarrierCount, pImageMemoryBarriers); } } @@ -6991,9 +7866,9 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP } lock.unlock(); if (!skip) { - device_data->dispatch_table.CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, - pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, - imageMemoryBarrierCount, pImageMemoryBarriers); + device_data->dispatch_table.CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, + memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, + pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); } } @@ -7062,7 +7937,7 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPoo lock.lock(); if (cb_state) { cb_state->activeQueries.erase(query); - cb_state->queryUpdates.emplace_back([=](VkQueue q){return setQueryState(q, commandBuffer, query, true);}); + cb_state->queryUpdates.emplace_back([=](VkQueue q) { return setQueryState(q, commandBuffer, query, true); }); addCommandBufferBinding(&GetQueryPoolNode(dev_data, queryPool)->cb_bindings, {HandleToUint64(queryPool), kVulkanObjectTypeQueryPool}, cb_state); } @@ -7074,10 +7949,10 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQu layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); unique_lock_t lock(global_lock); GLOBAL_CB_NODE *cb_state = GetCBNode(dev_data, commandBuffer); - skip |= insideRenderPass(dev_data, cb_state, "vkCmdResetQueryPool()", VALIDATION_ERROR_1c600017); - skip |= ValidateCmd(dev_data, cb_state, CMD_RESETQUERYPOOL, "VkCmdResetQueryPool()"); - skip |= ValidateCmdQueueFlags(dev_data, cb_state, "VkCmdResetQueryPool()", VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT, - VALIDATION_ERROR_1c602415); + skip |= insideRenderPass(dev_data, cb_state, "vkCmdResetQueryPool()", VALIDATION_ERROR_1c600017); + skip |= ValidateCmd(dev_data, cb_state, CMD_RESETQUERYPOOL, "VkCmdResetQueryPool()"); + skip |= ValidateCmdQueueFlags(dev_data, cb_state, "VkCmdResetQueryPool()", VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT, + VALIDATION_ERROR_1c602415); lock.unlock(); if (skip) return; @@ -7088,7 +7963,7 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQu for (uint32_t i = 0; i < queryCount; i++) { QueryObject query = {queryPool, firstQuery + i}; cb_state->waitedEventsBeforeQueryReset[query] = cb_state->waitedEvents; - cb_state->queryUpdates.emplace_back([=](VkQueue q){return setQueryState(q, commandBuffer, query, false);}); + cb_state->queryUpdates.emplace_back([=](VkQueue q) { return setQueryState(q, commandBuffer, query, false); }); } addCommandBufferBinding(&GetQueryPoolNode(dev_data, queryPool)->cb_bindings, {HandleToUint64(queryPool), kVulkanObjectTypeQueryPool}, cb_state); @@ -7101,8 +7976,7 @@ static bool IsQueryInvalid(layer_data *dev_data, QUEUE_STATE *queue_data, VkQuer if (!query_data->second) return true; } else { auto it = dev_data->queryToStateMap.find(query); - if (it == dev_data->queryToStateMap.end() || !it->second) - return true; + if (it == dev_data->queryToStateMap.end() || !it->second) return true; } return false; @@ -7148,8 +8022,8 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer if (skip) return; - dev_data->dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, - stride, flags); + dev_data->dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, + flags); lock.lock(); if (cb_node && dst_buff_state) { @@ -7158,9 +8032,7 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer SetBufferMemoryValid(dev_data, dst_buff_state, true); return false; }); - cb_node->queryUpdates.emplace_back([=](VkQueue q) { - return validateQuery(q, cb_node, queryPool, firstQuery, queryCount); - }); + cb_node->queryUpdates.emplace_back([=](VkQueue q) { return validateQuery(q, cb_node, queryPool, firstQuery, queryCount); }); addCommandBufferBinding(&GetQueryPoolNode(dev_data, queryPool)->cb_bindings, {HandleToUint64(queryPool), kVulkanObjectTypeQueryPool}, cb_node); } @@ -7198,13 +8070,13 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip } } if (!found_matching_range) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1bc002de, "DS", - "vkCmdPushConstants() stageFlags = 0x%" PRIx32 - " do not match the stageFlags in any of the ranges with" - " offset = %d and size = %d in pipeline layout 0x%" PRIx64 ". %s", - (uint32_t)stageFlags, offset, size, HandleToUint64(layout), - validation_error_map[VALIDATION_ERROR_1bc002de]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1bc002de, "DS", + "vkCmdPushConstants() stageFlags = 0x%" PRIx32 + " do not match the stageFlags in any of the ranges with offset = %d and size = %d in pipeline layout 0x%" PRIx64 + ". %s", + (uint32_t)stageFlags, offset, size, HandleToUint64(layout), validation_error_map[VALIDATION_ERROR_1bc002de]); } } lock.unlock(); @@ -7231,7 +8103,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPi lock.lock(); if (cb_state) { QueryObject query = {queryPool, slot}; - cb_state->queryUpdates.emplace_back([=](VkQueue q) {return setQueryState(q, commandBuffer, query, true);}); + cb_state->queryUpdates.emplace_back([=](VkQueue q) { return setQueryState(q, commandBuffer, query, true); }); } } @@ -7281,13 +8153,12 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if (rp_state) { const VkRenderPassCreateInfo *rpci = rp_state->createInfo.ptr(); if (rpci->attachmentCount != pCreateInfo->attachmentCount) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(pCreateInfo->renderPass), __LINE__, VALIDATION_ERROR_094006d8, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachmentCount of %u does not match attachmentCount of %u of " - "renderPass (0x%" PRIxLEAST64 ") being used to create Framebuffer. %s", - pCreateInfo->attachmentCount, rpci->attachmentCount, HandleToUint64(pCreateInfo->renderPass), - validation_error_map[VALIDATION_ERROR_094006d8]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + HandleToUint64(pCreateInfo->renderPass), __LINE__, VALIDATION_ERROR_094006d8, "DS", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachmentCount of %u does not match attachmentCount " + "of %u of renderPass (0x%" PRIx64 ") being used to create Framebuffer. %s", + pCreateInfo->attachmentCount, rpci->attachmentCount, HandleToUint64(pCreateInfo->renderPass), + validation_error_map[VALIDATION_ERROR_094006d8]); } else { // attachmentCounts match, so make sure corresponding attachment details line up const VkImageView *image_views = pCreateInfo->pAttachments; @@ -7295,22 +8166,21 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf auto view_state = GetImageViewState(dev_data, image_views[i]); auto &ivci = view_state->create_info; if (ivci.format != rpci->pAttachments[i].format) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(pCreateInfo->renderPass), __LINE__, VALIDATION_ERROR_094006e0, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has format of %s that does not match " - "the format of " - "%s used by the corresponding attachment for renderPass (0x%" PRIxLEAST64 "). %s", - i, string_VkFormat(ivci.format), string_VkFormat(rpci->pAttachments[i].format), - HandleToUint64(pCreateInfo->renderPass), validation_error_map[VALIDATION_ERROR_094006e0]); + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + HandleToUint64(pCreateInfo->renderPass), __LINE__, VALIDATION_ERROR_094006e0, "DS", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has format of %s that does not " + "match the format of %s used by the corresponding attachment for renderPass (0x%" PRIx64 "). %s", + i, string_VkFormat(ivci.format), string_VkFormat(rpci->pAttachments[i].format), + HandleToUint64(pCreateInfo->renderPass), validation_error_map[VALIDATION_ERROR_094006e0]); } const VkImageCreateInfo *ici = &GetImageState(dev_data, ivci.image)->createInfo; if (ici->samples != rpci->pAttachments[i].samples) { skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, HandleToUint64(pCreateInfo->renderPass), __LINE__, VALIDATION_ERROR_094006e2, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has %s samples that do not match " - "the %s samples used by the corresponding attachment for renderPass (0x%" PRIxLEAST64 "). %s", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has %s samples that do not match the %s " + "samples used by the corresponding attachment for renderPass (0x%" PRIx64 "). %s", i, string_VkSampleCountFlagBits(ici->samples), string_VkSampleCountFlagBits(rpci->pAttachments[i].samples), HandleToUint64(pCreateInfo->renderPass), validation_error_map[VALIDATION_ERROR_094006e2]); } @@ -7318,8 +8188,8 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if (ivci.subresourceRange.levelCount != 1) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_094006e6, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has mip levelCount of %u " - "but only a single mip level (levelCount == 1) is allowed when creating a Framebuffer. %s", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has mip levelCount of %u but " + "only a single mip level (levelCount == 1) is allowed when creating a Framebuffer. %s", i, ivci.subresourceRange.levelCount, validation_error_map[VALIDATION_ERROR_094006e6]); } const uint32_t mip_level = ivci.subresourceRange.baseMipLevel; @@ -7327,35 +8197,35 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf uint32_t mip_height = max(1u, ici->extent.height >> mip_level); if ((ivci.subresourceRange.layerCount < pCreateInfo->layers) || (mip_width < pCreateInfo->width) || (mip_height < pCreateInfo->height)) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_094006e4, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u mip level %u has dimensions smaller " - "than the corresponding framebuffer dimensions. Here are the respective dimensions for attachment #%u, " - "framebuffer:\n" - "width: %u, %u\n" - "height: %u, %u\n" - "layerCount: %u, %u\n%s", - i, ivci.subresourceRange.baseMipLevel, i, mip_width, pCreateInfo->width, mip_height, pCreateInfo->height, - ivci.subresourceRange.layerCount, pCreateInfo->layers, validation_error_map[VALIDATION_ERROR_094006e4]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, + 0, __LINE__, VALIDATION_ERROR_094006e4, "DS", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u mip level %u has dimensions " + "smaller than the corresponding framebuffer dimensions. Here are the respective dimensions for " + "attachment #%u, framebuffer:\n" + "width: %u, %u\n" + "height: %u, %u\n" + "layerCount: %u, %u\n%s", + i, ivci.subresourceRange.baseMipLevel, i, mip_width, pCreateInfo->width, mip_height, + pCreateInfo->height, ivci.subresourceRange.layerCount, pCreateInfo->layers, + validation_error_map[VALIDATION_ERROR_094006e4]); } if (((ivci.components.r != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.r != VK_COMPONENT_SWIZZLE_R)) || ((ivci.components.g != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.g != VK_COMPONENT_SWIZZLE_G)) || ((ivci.components.b != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.b != VK_COMPONENT_SWIZZLE_B)) || ((ivci.components.a != VK_COMPONENT_SWIZZLE_IDENTITY) && (ivci.components.a != VK_COMPONENT_SWIZZLE_A))) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_094006e8, "DS", - "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has non-identy swizzle. All framebuffer " - "attachments must have been created with the identity swizzle. Here are the actual swizzle values:\n" - "r swizzle = %s\n" - "g swizzle = %s\n" - "b swizzle = %s\n" - "a swizzle = %s\n" - "%s", - i, string_VkComponentSwizzle(ivci.components.r), string_VkComponentSwizzle(ivci.components.g), - string_VkComponentSwizzle(ivci.components.b), string_VkComponentSwizzle(ivci.components.a), - validation_error_map[VALIDATION_ERROR_094006e8]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, + 0, __LINE__, VALIDATION_ERROR_094006e8, "DS", + "vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #%u has non-identy swizzle. All " + "framebuffer attachments must have been created with the identity swizzle. Here are the actual " + "swizzle values:\n" + "r swizzle = %s\n" + "g swizzle = %s\n" + "b swizzle = %s\n" + "a swizzle = %s\n" + "%s", + i, string_VkComponentSwizzle(ivci.components.r), string_VkComponentSwizzle(ivci.components.g), + string_VkComponentSwizzle(ivci.components.b), string_VkComponentSwizzle(ivci.components.a), + validation_error_map[VALIDATION_ERROR_094006e8]); } } } @@ -7380,27 +8250,24 @@ static bool ValidateFramebufferCreateInfo(layer_data *dev_data, const VkFramebuf if (pCreateInfo->width > dev_data->phys_dev_properties.properties.limits.maxFramebufferWidth) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_094006ec, "DS", - "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo width exceeds physical device limits. " - "Requested width: %u, device max: %u\n" - "%s", + "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo width exceeds physical device limits. Requested " + "width: %u, device max: %u\n%s", pCreateInfo->width, dev_data->phys_dev_properties.properties.limits.maxFramebufferWidth, validation_error_map[VALIDATION_ERROR_094006ec]); } if (pCreateInfo->height > dev_data->phys_dev_properties.properties.limits.maxFramebufferHeight) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_094006f0, "DS", - "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo height exceeds physical device limits. " - "Requested height: %u, device max: %u\n" - "%s", + "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo height exceeds physical device limits. Requested " + "height: %u, device max: %u\n%s", pCreateInfo->height, dev_data->phys_dev_properties.properties.limits.maxFramebufferHeight, validation_error_map[VALIDATION_ERROR_094006f0]); } if (pCreateInfo->layers > dev_data->phys_dev_properties.properties.limits.maxFramebufferLayers) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_094006f4, "DS", - "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo layers exceeds physical device limits. " - "Requested layers: %u, device max: %u\n" - "%s", + "vkCreateFramebuffer(): Requested VkFramebufferCreateInfo layers exceeds physical device limits. Requested " + "layers: %u, device max: %u\n%s", pCreateInfo->layers, dev_data->phys_dev_properties.properties.limits.maxFramebufferLayers, validation_error_map[VALIDATION_ERROR_094006f4]); } @@ -7617,15 +8484,13 @@ static bool ValidateDependencies(const layer_data *dev_data, FRAMEBUFFER_STATE c if (!(pCreateInfo->pAttachments[attachment].flags & VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, HandleToUint64(framebuffer->framebuffer), __LINE__, VALIDATION_ERROR_12200682, "DS", - "Attachment %d aliases attachment %d but doesn't " - "set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT. %s", + "Attachment %d aliases attachment %d but doesn't set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT. %s", attachment, other_attachment, validation_error_map[VALIDATION_ERROR_12200682]); } if (!(pCreateInfo->pAttachments[other_attachment].flags & VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, HandleToUint64(framebuffer->framebuffer), __LINE__, VALIDATION_ERROR_12200682, "DS", - "Attachment %d aliases attachment %d but doesn't " - "set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT. %s", + "Attachment %d aliases attachment %d but doesn't set VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT. %s", other_attachment, attachment, validation_error_map[VALIDATION_ERROR_12200682]); } } @@ -7737,8 +8602,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShade layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); bool spirv_valid; - if (PreCallValidateCreateShaderModule(dev_data, pCreateInfo, &spirv_valid)) - return VK_ERROR_VALIDATION_FAILED_EXT; + if (PreCallValidateCreateShaderModule(dev_data, pCreateInfo, &spirv_valid)) return VK_ERROR_VALIDATION_FAILED_EXT; VkResult res = dev_data->dispatch_table.CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); @@ -7819,8 +8683,8 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend pCreateInfo->pAttachments[attachment].samples != VK_SAMPLE_COUNT_1_BIT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_140006a2, "DS", - "CreateRenderPass: Subpass %u requests multisample resolve into attachment %u, " - "which must have VK_SAMPLE_COUNT_1_BIT but has %s. %s", + "CreateRenderPass: Subpass %u requests multisample resolve into attachment %u, which must " + "have VK_SAMPLE_COUNT_1_BIT but has %s. %s", i, attachment, string_VkSampleCountFlagBits(pCreateInfo->pAttachments[attachment].samples), validation_error_map[VALIDATION_ERROR_140006a2]); } @@ -7829,8 +8693,8 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend subpass.pColorAttachments[j].attachment == VK_ATTACHMENT_UNUSED) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1400069e, "DS", - "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u " - "which has attachment=VK_ATTACHMENT_UNUSED. %s", + "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u which has " + "attachment=VK_ATTACHMENT_UNUSED. %s", i, attachment, validation_error_map[VALIDATION_ERROR_1400069e]); } } @@ -7843,8 +8707,8 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend if (subpass_performs_resolve && pCreateInfo->pAttachments[attachment].samples == VK_SAMPLE_COUNT_1_BIT) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_140006a0, "DS", - "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u " - "which has VK_SAMPLE_COUNT_1_BIT. %s", + "CreateRenderPass: Subpass %u requests multisample resolve from attachment %u which has " + "VK_SAMPLE_COUNT_1_BIT. %s", i, attachment, validation_error_map[VALIDATION_ERROR_140006a0]); } @@ -7856,22 +8720,23 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_140006a4, "DS", "CreateRenderPass: Subpass %u pColorAttachments[%u] resolves to an attachment with a " - "different format. " - "color format: %u, resolve format: %u. %s", + "different format. color format: %u, resolve format: %u. %s", i, j, color_desc.format, resolve_desc.format, validation_error_map[VALIDATION_ERROR_140006a4]); } } - if (dev_data->extensions.vk_amd_mixed_attachment_samples && - subpass.pDepthStencilAttachment && subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { - const auto depth_stencil_sample_count = pCreateInfo->pAttachments[subpass.pDepthStencilAttachment->attachment].samples; + if (dev_data->extensions.vk_amd_mixed_attachment_samples && subpass.pDepthStencilAttachment && + subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { + const auto depth_stencil_sample_count = + pCreateInfo->pAttachments[subpass.pDepthStencilAttachment->attachment].samples; if (pCreateInfo->pAttachments[attachment].samples > depth_stencil_sample_count) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_14000bc4, "DS", + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_14000bc4, "DS", "CreateRenderPass: Subpass %u pColorAttachments[%u] has %s which is larger than " "depth/stencil attachment %s. %s", i, j, string_VkSampleCountFlagBits(pCreateInfo->pAttachments[attachment].samples), - string_VkSampleCountFlagBits(depth_stencil_sample_count), validation_error_map[VALIDATION_ERROR_14000bc4]); + string_VkSampleCountFlagBits(depth_stencil_sample_count), + validation_error_map[VALIDATION_ERROR_14000bc4]); } } } @@ -7891,26 +8756,20 @@ static bool ValidateRenderpassAttachmentUsage(layer_data *dev_data, const VkRend skip |= ValidateAttachmentIndex(dev_data, attachment, pCreateInfo->attachmentCount, "Input"); } - if (!dev_data->extensions.vk_amd_mixed_attachment_samples && - sample_count && !IsPowerOfTwo(sample_count)) { + if (!dev_data->extensions.vk_amd_mixed_attachment_samples && sample_count && !IsPowerOfTwo(sample_count)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_0082b401, "DS", - "CreateRenderPass: Subpass %u attempts to render to " - "attachments with inconsistent sample counts. %s", + "CreateRenderPass: Subpass %u attempts to render to attachments with inconsistent sample counts. %s", i, validation_error_map[VALIDATION_ERROR_0082b401]); } } return skip; } -static void MarkAttachmentFirstUse(RENDER_PASS_STATE *render_pass, - uint32_t index, - bool is_read) { - if (index == VK_ATTACHMENT_UNUSED) - return; +static void MarkAttachmentFirstUse(RENDER_PASS_STATE *render_pass, uint32_t index, bool is_read) { + if (index == VK_ATTACHMENT_UNUSED) return; - if (!render_pass->attachment_first_read.count(index)) - render_pass->attachment_first_read[index] = is_read; + if (!render_pass->attachment_first_read.count(index)) render_pass->attachment_first_read[index] = is_read; } VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, @@ -7998,9 +8857,8 @@ static bool VerifyRenderAreaBounds(const layer_data *dev_data, const VkRenderPas skip |= static_cast(log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DRAWSTATE_INVALID_RENDER_AREA, "CORE", - "Cannot execute a render pass with renderArea not within the bound of the " - "framebuffer. RenderArea: x %d, y %d, width %d, height %d. Framebuffer: width %d, " - "height %d.", + "Cannot execute a render pass with renderArea not within the bound of the framebuffer. RenderArea: x %d, y %d, width " + "%d, height %d. Framebuffer: width %d, height %d.", pRenderPassBegin->renderArea.offset.x, pRenderPassBegin->renderArea.offset.y, pRenderPassBegin->renderArea.extent.width, pRenderPassBegin->renderArea.extent.height, pFramebufferInfo->width, pFramebufferInfo->height)); } @@ -8018,8 +8876,7 @@ static bool FormatSpecificLoadAndStoreOpSettings(VkFormat format, T color_depth_ bool check_color_depth_load_op = !FormatIsStencilOnly(format); bool check_stencil_load_op = FormatIsDepthAndStencil(format) || !check_color_depth_load_op; - return ((check_color_depth_load_op && (color_depth_op == op)) || - (check_stencil_load_op && (stencil_op == op))); + return ((check_color_depth_load_op && (color_depth_op == op)) || (check_stencil_load_op && (stencil_op == op))); } VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, @@ -8069,17 +8926,16 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con } } if (clear_op_size > pRenderPassBegin->clearValueCount) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, - HandleToUint64(render_pass_state->renderPass), __LINE__, VALIDATION_ERROR_1200070c, "DS", - "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but there must " - "be at least %u entries in pClearValues array to account for the highest index attachment in renderPass " - "0x%" PRIx64 - " that uses VK_ATTACHMENT_LOAD_OP_CLEAR is %u. Note that the pClearValues array " - "is indexed by attachment number so even if some pClearValues entries between 0 and %u correspond to " - "attachments that aren't cleared they will be ignored. %s", - pRenderPassBegin->clearValueCount, clear_op_size, HandleToUint64(render_pass_state->renderPass), clear_op_size, - clear_op_size - 1, validation_error_map[VALIDATION_ERROR_1200070c]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, + HandleToUint64(render_pass_state->renderPass), __LINE__, VALIDATION_ERROR_1200070c, "DS", + "In vkCmdBeginRenderPass() the VkRenderPassBeginInfo struct has a clearValueCount of %u but there " + "must be at least %u entries in pClearValues array to account for the highest index attachment in " + "renderPass 0x%" PRIx64 + " that uses VK_ATTACHMENT_LOAD_OP_CLEAR is %u. Note that the pClearValues array is indexed by " + "attachment number so even if some pClearValues entries between 0 and %u correspond to attachments " + "that aren't cleared they will be ignored. %s", + pRenderPassBegin->clearValueCount, clear_op_size, HandleToUint64(render_pass_state->renderPass), + clear_op_size, clear_op_size - 1, validation_error_map[VALIDATION_ERROR_1200070c]); } skip |= VerifyRenderAreaBounds(dev_data, pRenderPassBegin); skip |= VerifyFramebufferAndRenderPassLayouts(dev_data, cb_node, pRenderPassBegin, @@ -8229,9 +9085,9 @@ static bool validateFramebuffer(layer_data *dev_data, VkCommandBuffer primaryBuf if (!fb) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(primaryBuffer), __LINE__, DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", - "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p " - "which has invalid framebuffer 0x%" PRIx64 ".", - (void *)secondaryBuffer, HandleToUint64(secondary_fb)); + "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 + " which has invalid framebuffer 0x%" PRIx64 ".", + HandleToUint64(secondaryBuffer), HandleToUint64(secondary_fb)); return skip; } } @@ -8251,11 +9107,11 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, VALIDATION_ERROR_1b2000d0, "DS", - "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p " - "which has invalid active query pool 0x%" PRIx64 - ". Pipeline statistics is being queried so the command " - "buffer must have all bits set on the queryPool. %s", - pCB->commandBuffer, HandleToUint64(queryPoolData->first), validation_error_map[VALIDATION_ERROR_1b2000d0]); + "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 + " which has invalid active query pool 0x%" PRIx64 + ". Pipeline statistics is being queried so the command buffer must have all bits set on the queryPool. %s", + HandleToUint64(pCB->commandBuffer), HandleToUint64(queryPoolData->first), + validation_error_map[VALIDATION_ERROR_1b2000d0]); } } activeTypes.insert(queryPoolData->second.createInfo.queryType); @@ -8266,24 +9122,23 @@ static bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_ if (queryPoolData != dev_data->queryPoolMap.end() && activeTypes.count(queryPoolData->second.createInfo.queryType)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_SECONDARY_COMMAND_BUFFER, "DS", - "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p " - "which has invalid active query pool 0x%" PRIx64 - "of type %d but a query of that type has been started on " - "secondary Cmd Buffer 0x%p.", - pCB->commandBuffer, HandleToUint64(queryPoolData->first), queryPoolData->second.createInfo.queryType, - pSubCB->commandBuffer); + "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%" PRIx64 + " which has invalid active query pool 0x%" PRIx64 + " of type %d but a query of that type has been started on secondary Cmd Buffer 0x%" PRIx64 ".", + HandleToUint64(pCB->commandBuffer), HandleToUint64(queryPoolData->first), + queryPoolData->second.createInfo.queryType, HandleToUint64(pSubCB->commandBuffer)); } } auto primary_pool = GetCommandPoolNode(dev_data, pCB->createInfo.commandPool); auto secondary_pool = GetCommandPoolNode(dev_data, pSubCB->createInfo.commandPool); if (primary_pool && secondary_pool && (primary_pool->queueFamilyIndex != secondary_pool->queueFamilyIndex)) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pSubCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", - "vkCmdExecuteCommands(): Primary command buffer 0x%p" - " created in queue family %d has secondary command buffer 0x%p created in queue family %d.", - pCB->commandBuffer, primary_pool->queueFamilyIndex, pSubCB->commandBuffer, secondary_pool->queueFamilyIndex); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(pSubCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_QUEUE_FAMILY, "DS", + "vkCmdExecuteCommands(): Primary command buffer 0x%" PRIx64 + " created in queue family %d has secondary command buffer 0x%" PRIx64 " created in queue family %d.", + HandleToUint64(pCB->commandBuffer), primary_pool->queueFamilyIndex, HandleToUint64(pSubCB->commandBuffer), + secondary_pool->queueFamilyIndex); } return skip; @@ -8301,24 +9156,25 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin pSubCB = GetCBNode(dev_data, pCommandBuffers[i]); assert(pSubCB); if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCommandBuffers[i]), __LINE__, VALIDATION_ERROR_1b2000b0, "DS", - "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%p in element %u of pCommandBuffers " - "array. All cmd buffers in pCommandBuffers array must be secondary. %s", - pCommandBuffers[i], i, validation_error_map[VALIDATION_ERROR_1b2000b0]); + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(pCommandBuffers[i]), __LINE__, VALIDATION_ERROR_1b2000b0, "DS", + "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%" PRIx64 + " in element %u of pCommandBuffers array. All cmd buffers in pCommandBuffers array must be secondary. %s", + HandleToUint64(pCommandBuffers[i]), i, validation_error_map[VALIDATION_ERROR_1b2000b0]); } else if (pCB->activeRenderPass) { // Secondary CB w/i RenderPass must have *CONTINUE_BIT set if (pSubCB->beginInfo.pInheritanceInfo != nullptr) { auto secondary_rp_state = GetRenderPassState(dev_data, pSubCB->beginInfo.pInheritanceInfo->renderPass); if (!(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCommandBuffers[i]), __LINE__, VALIDATION_ERROR_1b2000c0, "DS", - "vkCmdExecuteCommands(): Secondary Command Buffer (0x%p) executed within render pass (0x%" PRIxLEAST64 - ") must have had vkBeginCommandBuffer() called w/ VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT " - "set. %s", - pCommandBuffers[i], HandleToUint64(pCB->activeRenderPass->renderPass), - validation_error_map[VALIDATION_ERROR_1b2000c0]); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCommandBuffers[i]), + __LINE__, VALIDATION_ERROR_1b2000c0, "DS", + "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 + ") executed within render pass (0x%" PRIx64 + ") must have had vkBeginCommandBuffer() called w/ " + "VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set. %s", + HandleToUint64(pCommandBuffers[i]), HandleToUint64(pCB->activeRenderPass->renderPass), + validation_error_map[VALIDATION_ERROR_1b2000c0]); } else { // Make sure render pass is compatible with parent command buffer pass if has continue if (pCB->activeRenderPass->renderPass != secondary_rp_state->renderPass) { @@ -8346,20 +9202,21 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCB->commandBuffer), __LINE__, VALIDATION_ERROR_1b2000b4, "DS", - "Attempt to simultaneously execute command buffer 0x%p" + "Attempt to simultaneously execute command buffer 0x%" PRIx64 " without VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set! %s", - pCB->commandBuffer, validation_error_map[VALIDATION_ERROR_1b2000b4]); + HandleToUint64(pCB->commandBuffer), validation_error_map[VALIDATION_ERROR_1b2000b4]); } if (pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT) { // Warn that non-simultaneous secondary cmd buffer renders primary non-simultaneous - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, - HandleToUint64(pCommandBuffers[i]), __LINE__, DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "DS", - "vkCmdExecuteCommands(): Secondary Command Buffer (0x%p) " - "does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set and will cause primary command buffer " - "(0x%p) to be treated as if it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT " - "set, even though it does.", - pCommandBuffers[i], pCB->commandBuffer); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCommandBuffers[i]), __LINE__, + DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "DS", + "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 + ") does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set and will cause primary " + "command buffer (0x%" PRIx64 + ") to be treated as if it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set, even " + "though it does.", + HandleToUint64(pCommandBuffers[i]), HandleToUint64(pCB->commandBuffer)); pCB->beginInfo.flags &= ~VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; } } @@ -8367,11 +9224,9 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(pCommandBuffers[i]), __LINE__, VALIDATION_ERROR_1b2000ca, "DS", - "vkCmdExecuteCommands(): Secondary Command Buffer " - "(0x%p) cannot be submitted with a query in " - "flight and inherited queries not " - "supported on this device. %s", - pCommandBuffers[i], validation_error_map[VALIDATION_ERROR_1b2000ca]); + "vkCmdExecuteCommands(): Secondary Command Buffer (0x%" PRIx64 + ") cannot be submitted with a query in flight and inherited queries not supported on this device. %s", + HandleToUint64(pCommandBuffers[i]), validation_error_map[VALIDATION_ERROR_1b2000ca]); } // TODO: separate validate from update! This is very tangled. // Propagate layout transitions to the primary cmd buffer @@ -8427,7 +9282,7 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory mem, Vk VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) { skip = log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem), __LINE__, VALIDATION_ERROR_31200554, "MEM", - "Mapping Memory without VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set: mem obj 0x%" PRIxLEAST64 ". %s", + "Mapping Memory without VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set: mem obj 0x%" PRIx64 ". %s", HandleToUint64(mem), validation_error_map[VALIDATION_ERROR_31200554]); } } @@ -8471,8 +9326,7 @@ static bool validateMemoryIsMapped(layer_data *dev_data, const char *funcName, u log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(pMemRanges[i].memory), __LINE__, VALIDATION_ERROR_0c20055c, "MEM", "%s: Flush/Invalidate offset (" PRINTF_SIZE_T_SPECIFIER - ") is less than Memory Object's offset " - "(" PRINTF_SIZE_T_SPECIFIER "). %s", + ") is less than Memory Object's offset (" PRINTF_SIZE_T_SPECIFIER "). %s", funcName, static_cast(pMemRanges[i].offset), static_cast(mem_info->mem_range.offset), validation_error_map[VALIDATION_ERROR_0c20055c]); } @@ -8486,8 +9340,7 @@ static bool validateMemoryIsMapped(layer_data *dev_data, const char *funcName, u log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(pMemRanges[i].memory), __LINE__, VALIDATION_ERROR_0c20055a, "MEM", "%s: Flush/Invalidate size or offset (" PRINTF_SIZE_T_SPECIFIER ", " PRINTF_SIZE_T_SPECIFIER - ") exceed the Memory Object's upper-bound " - "(" PRINTF_SIZE_T_SPECIFIER "). %s", + ") exceed the Memory Object's upper-bound (" PRINTF_SIZE_T_SPECIFIER "). %s", funcName, static_cast(pMemRanges[i].offset + pMemRanges[i].size), static_cast(pMemRanges[i].offset), static_cast(data_end), validation_error_map[VALIDATION_ERROR_0c20055a]); @@ -8514,15 +9367,15 @@ static bool ValidateAndCopyNoncoherentMemoryToDriver(layer_data *dev_data, uint3 skip |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_ranges[i].memory), __LINE__, MEMTRACK_INVALID_MAP, "MEM", - "Memory underflow was detected on mem obj 0x%" PRIxLEAST64, HandleToUint64(mem_ranges[i].memory)); + "Memory underflow was detected on mem obj 0x%" PRIx64, HandleToUint64(mem_ranges[i].memory)); } } for (uint64_t j = (size + mem_info->shadow_pad_size); j < (2 * mem_info->shadow_pad_size + size); ++j) { if (data[j] != NoncoherentMemoryFillValue) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - HandleToUint64(mem_ranges[i].memory), __LINE__, MEMTRACK_INVALID_MAP, "MEM", - "Memory overflow was detected on mem obj 0x%" PRIxLEAST64, HandleToUint64(mem_ranges[i].memory)); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, HandleToUint64(mem_ranges[i].memory), + __LINE__, MEMTRACK_INVALID_MAP, "MEM", "Memory overflow was detected on mem obj 0x%" PRIx64, + HandleToUint64(mem_ranges[i].memory)); } } memcpy(mem_info->p_driver_data, static_cast(data + mem_info->shadow_pad_size), (size_t)(size)); @@ -8618,22 +9471,22 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uin } static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, IMAGE_STATE *image_state, VkDeviceMemory mem, - VkDeviceSize memoryOffset) { + VkDeviceSize memoryOffset, const char *api_name) { bool skip = false; if (image_state) { unique_lock_t lock(global_lock); // Track objects tied to memory uint64_t image_handle = HandleToUint64(image); - skip = ValidateSetMemBinding(dev_data, mem, image_handle, kVulkanObjectTypeImage, "vkBindImageMemory()"); + skip = ValidateSetMemBinding(dev_data, mem, image_handle, kVulkanObjectTypeImage, api_name); if (!image_state->memory_requirements_checked) { // There's not an explicit requirement in the spec to call vkGetImageMemoryRequirements() prior to calling // BindImageMemory but it's implied in that memory being bound must conform with VkMemoryRequirements from // vkGetImageMemoryRequirements() skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, __LINE__, DRAWSTATE_INVALID_IMAGE, "DS", - "vkBindImageMemory(): Binding memory to image 0x%" PRIxLEAST64 + "%s: Binding memory to image 0x%" PRIx64 " but vkGetImageMemoryRequirements() has not been called on that image.", - image_handle); + api_name, HandleToUint64(image_handle)); // Make the call for them so we can verify the state lock.unlock(); dev_data->dispatch_table.GetImageMemoryRequirements(dev_data->device, image, &image_state->requirements); @@ -8644,8 +9497,8 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, auto mem_info = GetMemObjInfo(dev_data, mem); if (mem_info) { skip |= ValidateInsertImageMemoryRange(dev_data, image, mem_info, memoryOffset, image_state->requirements, - image_state->createInfo.tiling == VK_IMAGE_TILING_LINEAR, "vkBindImageMemory()"); - skip |= ValidateMemoryTypes(dev_data, mem_info, image_state->requirements.memoryTypeBits, "vkBindImageMemory()", + image_state->createInfo.tiling == VK_IMAGE_TILING_LINEAR, api_name); + skip |= ValidateMemoryTypes(dev_data, mem_info, image_state->requirements.memoryTypeBits, api_name, VALIDATION_ERROR_1740082e); } @@ -8653,30 +9506,31 @@ static bool PreCallValidateBindImageMemory(layer_data *dev_data, VkImage image, if (SafeModulo(memoryOffset, image_state->requirements.alignment) != 0) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, image_handle, __LINE__, VALIDATION_ERROR_17400830, "DS", - "vkBindImageMemory(): memoryOffset is 0x%" PRIxLEAST64 - " but must be an integer multiple of the " - "VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 + "%s: memoryOffset is 0x%" PRIxLEAST64 + " but must be an integer multiple of the VkMemoryRequirements::alignment value 0x%" PRIxLEAST64 ", returned from a call to vkGetImageMemoryRequirements with image. %s", - memoryOffset, image_state->requirements.alignment, validation_error_map[VALIDATION_ERROR_17400830]); + api_name, memoryOffset, image_state->requirements.alignment, + validation_error_map[VALIDATION_ERROR_17400830]); } // Validate memory requirements size - if (image_state->requirements.size > mem_info->alloc_info.allocationSize - memoryOffset) { - skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, - image_handle, __LINE__, VALIDATION_ERROR_17400832, "DS", - "vkBindImageMemory(): memory size minus memoryOffset is 0x%" PRIxLEAST64 - " but must be at least as large as " - "VkMemoryRequirements::size value 0x%" PRIxLEAST64 - ", returned from a call to vkGetImageMemoryRequirements with image. %s", - mem_info->alloc_info.allocationSize - memoryOffset, image_state->requirements.size, - validation_error_map[VALIDATION_ERROR_17400832]); + if (mem_info) { + if (image_state->requirements.size > mem_info->alloc_info.allocationSize - memoryOffset) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + image_handle, __LINE__, VALIDATION_ERROR_17400832, "DS", + "%s: memory size minus memoryOffset is 0x%" PRIxLEAST64 + " but must be at least as large as VkMemoryRequirements::size value 0x%" PRIxLEAST64 + ", returned from a call to vkGetImageMemoryRequirements with image. %s", + api_name, mem_info->alloc_info.allocationSize - memoryOffset, image_state->requirements.size, + validation_error_map[VALIDATION_ERROR_17400832]); + } } } return skip; } static void PostCallRecordBindImageMemory(layer_data *dev_data, VkImage image, IMAGE_STATE *image_state, VkDeviceMemory mem, - VkDeviceSize memoryOffset) { + VkDeviceSize memoryOffset, const char *api_name) { if (image_state) { unique_lock_t lock(global_lock); // Track bound memory range information @@ -8688,23 +9542,63 @@ static void PostCallRecordBindImageMemory(layer_data *dev_data, VkImage image, I // Track objects tied to memory uint64_t image_handle = HandleToUint64(image); - SetMemBinding(dev_data, mem, image_handle, kVulkanObjectTypeImage, "vkBindImageMemory()"); - - image_state->binding.mem = mem; - image_state->binding.offset = memoryOffset; - image_state->binding.size = image_state->requirements.size; + SetMemBinding(dev_data, mem, image_state, memoryOffset, image_handle, kVulkanObjectTypeImage, api_name); } } VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memoryOffset) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; - auto image_state = GetImageState(dev_data, image); - bool skip = PreCallValidateBindImageMemory(dev_data, image, image_state, mem, memoryOffset); + IMAGE_STATE *image_state; + { + unique_lock_t lock(global_lock); + image_state = GetImageState(dev_data, image); + } + bool skip = PreCallValidateBindImageMemory(dev_data, image, image_state, mem, memoryOffset, "vkBindImageMemory()"); if (!skip) { result = dev_data->dispatch_table.BindImageMemory(device, image, mem, memoryOffset); if (result == VK_SUCCESS) { - PostCallRecordBindImageMemory(dev_data, image, image_state, mem, memoryOffset); + PostCallRecordBindImageMemory(dev_data, image, image_state, mem, memoryOffset, "vkBindImageMemory()"); + } + } + return result; +} + +static bool PreCallValidateBindImageMemory2KHR(layer_data *dev_data, std::vector *image_state, + uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR *pBindInfos) { + { + unique_lock_t lock(global_lock); + for (uint32_t i = 0; i < bindInfoCount; i++) { + (*image_state)[i] = GetImageState(dev_data, pBindInfos[i].image); + } + } + bool skip = false; + char api_name[128]; + for (uint32_t i = 0; i < bindInfoCount; i++) { + sprintf(api_name, "vkBindImageMemory2KHR() pBindInfos[%u]", i); + skip |= PreCallValidateBindImageMemory(dev_data, pBindInfos[i].image, (*image_state)[i], pBindInfos[i].memory, + pBindInfos[i].memoryOffset, api_name); + } + return skip; +} + +static void PostCallRecordBindImageMemory2KHR(layer_data *dev_data, const std::vector &image_state, + uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR *pBindInfos) { + for (uint32_t i = 0; i < bindInfoCount; i++) { + PostCallRecordBindImageMemory(dev_data, pBindInfos[i].image, image_state[i], pBindInfos[i].memory, + pBindInfos[i].memoryOffset, "vkBindImageMemory2KHR()"); + } +} + +VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, + const VkBindImageMemoryInfoKHR *pBindInfos) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + std::vector image_state(bindInfoCount); + if (!PreCallValidateBindImageMemory2KHR(dev_data, &image_state, bindInfoCount, pBindInfos)) { + result = dev_data->dispatch_table.BindImageMemory2KHR(device, bindInfoCount, pBindInfos); + if (result == VK_SUCCESS) { + PostCallRecordBindImageMemory2KHR(dev_data, image_state, bindInfoCount, pBindInfos); } } return result; @@ -8722,7 +9616,7 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { if (event_state->write_in_use) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, HandleToUint64(event), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Cannot call vkSetEvent() on event 0x%" PRIxLEAST64 " that is already in use by a command buffer.", + "Cannot call vkSetEvent() on event 0x%" PRIx64 " that is already in use by a command buffer.", HandleToUint64(event)); } } @@ -8750,6 +9644,7 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, unordered_set signaled_semaphores; unordered_set unsignaled_semaphores; + unordered_set internal_semaphores; for (uint32_t bindIdx = 0; bindIdx < bindInfoCount; ++bindIdx) { const VkBindSparseInfo &bindInfo = pBindInfo[bindIdx]; @@ -8758,46 +9653,112 @@ static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, for (uint32_t i = 0; i < bindInfo.waitSemaphoreCount; ++i) { VkSemaphore semaphore = bindInfo.pWaitSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore) { + if (pSemaphore && (pSemaphore->scope == kSyncScopeInternal || internal_semaphores.count(semaphore))) { if (unsignaled_semaphores.count(semaphore) || (!(signaled_semaphores.count(semaphore)) && !(pSemaphore->signaled))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Queue 0x%p is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", queue, - HandleToUint64(semaphore)); + "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", + HandleToUint64(queue), HandleToUint64(semaphore)); } else { signaled_semaphores.erase(semaphore); unsignaled_semaphores.insert(semaphore); } } + if (pSemaphore && pSemaphore->scope == kSyncScopeExternalTemporary) { + internal_semaphores.insert(semaphore); + } } for (uint32_t i = 0; i < bindInfo.signalSemaphoreCount; ++i) { VkSemaphore semaphore = bindInfo.pSignalSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore) { + if (pSemaphore && pSemaphore->scope == kSyncScopeInternal) { if (signaled_semaphores.count(semaphore) || (!(unsignaled_semaphores.count(semaphore)) && pSemaphore->signaled)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Queue 0x%p is signaling semaphore 0x%" PRIx64 + "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".", - queue, HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); + HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first)); } else { unsignaled_semaphores.erase(semaphore); signaled_semaphores.insert(semaphore); } } } + // Store sparse binding image_state and after binding is complete make sure that any requiring metadata have it bound + std::unordered_set sparse_images; + // If we're binding sparse image memory make sure reqs were queried and note if metadata is required and bound + for (uint32_t i = 0; i < bindInfo.imageBindCount; ++i) { + const auto &opaque_bind = bindInfo.pImageOpaqueBinds[i]; + auto image_state = GetImageState(dev_data, opaque_bind.image); + sparse_images.insert(image_state); + if (!image_state->get_sparse_reqs_called || image_state->sparse_requirements.empty()) { + // For now just warning if sparse image binding occurs without calling to get reqs first + return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image_state->image), __LINE__, MEMTRACK_INVALID_STATE, "CV", + "vkQueueBindSparse(): Binding sparse memory to image 0x%" PRIx64 + " without first calling vkGetImageSparseMemoryRequirements[2KHR]() to retrieve requirements.", + HandleToUint64(image_state->image)); + } + for (uint32_t j = 0; j < opaque_bind.bindCount; ++j) { + if (opaque_bind.pBinds[j].flags & VK_IMAGE_ASPECT_METADATA_BIT) { + image_state->sparse_metadata_bound = true; + } + } + } + for (uint32_t i = 0; i < bindInfo.imageOpaqueBindCount; ++i) { + auto image_state = GetImageState(dev_data, bindInfo.pImageOpaqueBinds[i].image); + sparse_images.insert(image_state); + if (!image_state->get_sparse_reqs_called || image_state->sparse_requirements.empty()) { + // For now just warning if sparse image binding occurs without calling to get reqs first + return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(image_state->image), __LINE__, MEMTRACK_INVALID_STATE, "CV", + "vkQueueBindSparse(): Binding opaque sparse memory to image 0x%" PRIx64 + " without first calling vkGetImageSparseMemoryRequirements[2KHR]() to retrieve requirements.", + HandleToUint64(image_state->image)); + } + } + for (const auto &sparse_image_state : sparse_images) { + if (sparse_image_state->sparse_metadata_required && !sparse_image_state->sparse_metadata_bound) { + // Warn if sparse image binding metadata required for image with sparse binding, but metadata not bound + return log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(sparse_image_state->image), __LINE__, MEMTRACK_INVALID_STATE, "CV", + "vkQueueBindSparse(): Binding sparse memory to image 0x%" PRIx64 + " which requires a metadata aspect but no binding with VK_IMAGE_ASPECT_METADATA_BIT set was made.", + HandleToUint64(sparse_image_state->image)); + } + } } return skip; } static void PostCallRecordQueueBindSparse(layer_data *dev_data, VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence) { + uint64_t early_retire_seq = 0; auto pFence = GetFenceNode(dev_data, fence); auto pQueue = GetQueueState(dev_data, queue); if (pFence) { - SubmitFence(pQueue, pFence, std::max(1u, bindInfoCount)); + if (pFence->scope == kSyncScopeInternal) { + SubmitFence(pQueue, pFence, std::max(1u, bindInfoCount)); + if (!bindInfoCount) { + // No work to do, just dropping a fence in the queue by itself. + pQueue->submissions.emplace_back(std::vector(), std::vector(), + std::vector(), std::vector(), fence); + } + } else { + // Retire work up until this fence early, we will not see the wait that corresponds to this signal + early_retire_seq = pQueue->seq + pQueue->submissions.size(); + if (!dev_data->external_sync_warning) { + dev_data->external_sync_warning = true; + log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, + HandleToUint64(fence), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + "vkQueueBindSparse(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64 + " will disable validation of preceding command buffer lifecycle states and the in-use status of associated " + "objects.", + HandleToUint64(fence), HandleToUint64(queue)); + } + } } for (uint32_t bindIdx = 0; bindIdx < bindInfoCount; ++bindIdx) { @@ -8829,38 +9790,59 @@ static void PostCallRecordQueueBindSparse(layer_data *dev_data, VkQueue queue, u std::vector semaphore_waits; std::vector semaphore_signals; + std::vector semaphore_externals; for (uint32_t i = 0; i < bindInfo.waitSemaphoreCount; ++i) { VkSemaphore semaphore = bindInfo.pWaitSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); if (pSemaphore) { - if (pSemaphore->signaler.first != VK_NULL_HANDLE) { - semaphore_waits.push_back({semaphore, pSemaphore->signaler.first, pSemaphore->signaler.second}); + if (pSemaphore->scope == kSyncScopeInternal) { + if (pSemaphore->signaler.first != VK_NULL_HANDLE) { + semaphore_waits.push_back({semaphore, pSemaphore->signaler.first, pSemaphore->signaler.second}); + pSemaphore->in_use.fetch_add(1); + } + pSemaphore->signaler.first = VK_NULL_HANDLE; + pSemaphore->signaled = false; + } else { + semaphore_externals.push_back(semaphore); pSemaphore->in_use.fetch_add(1); + if (pSemaphore->scope == kSyncScopeExternalTemporary) { + pSemaphore->scope = kSyncScopeInternal; + } } - pSemaphore->signaler.first = VK_NULL_HANDLE; - pSemaphore->signaled = false; } } for (uint32_t i = 0; i < bindInfo.signalSemaphoreCount; ++i) { VkSemaphore semaphore = bindInfo.pSignalSemaphores[i]; auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); if (pSemaphore) { - pSemaphore->signaler.first = queue; - pSemaphore->signaler.second = pQueue->seq + pQueue->submissions.size() + 1; - pSemaphore->signaled = true; - pSemaphore->in_use.fetch_add(1); - semaphore_signals.push_back(semaphore); + if (pSemaphore->scope == kSyncScopeInternal) { + pSemaphore->signaler.first = queue; + pSemaphore->signaler.second = pQueue->seq + pQueue->submissions.size() + 1; + pSemaphore->signaled = true; + pSemaphore->in_use.fetch_add(1); + semaphore_signals.push_back(semaphore); + } else { + // Retire work up until this submit early, we will not see the wait that corresponds to this signal + early_retire_seq = std::max(early_retire_seq, pQueue->seq + pQueue->submissions.size() + 1); + if (!dev_data->external_sync_warning) { + dev_data->external_sync_warning = true; + log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, + HandleToUint64(semaphore), __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", + "vkQueueBindSparse(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64 + " will disable validation of preceding command buffer lifecycle states and the in-use status of " + "associated objects.", + HandleToUint64(semaphore), HandleToUint64(queue)); + } + } } } - pQueue->submissions.emplace_back(std::vector(), semaphore_waits, semaphore_signals, + pQueue->submissions.emplace_back(std::vector(), semaphore_waits, semaphore_signals, semaphore_externals, bindIdx == bindInfoCount - 1 ? fence : VK_NULL_HANDLE); } - if (pFence && !bindInfoCount) { - // No work to do, just dropping a fence in the queue by itself. - pQueue->submissions.emplace_back(std::vector(), std::vector(), std::vector(), - fence); + if (early_retire_seq) { + RetireWorkOnQueue(dev_data, pQueue, early_retire_seq); } } @@ -8891,6 +9873,193 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor sNode->signaler.first = VK_NULL_HANDLE; sNode->signaler.second = 0; sNode->signaled = false; + sNode->scope = kSyncScopeInternal; + } + return result; +} + +static bool PreCallValidateImportSemaphore(layer_data *dev_data, VkSemaphore semaphore, const char *caller_name) { + SEMAPHORE_NODE *sema_node = GetSemaphoreNode(dev_data, semaphore); + VK_OBJECT obj_struct = {HandleToUint64(semaphore), kVulkanObjectTypeSemaphore}; + bool skip = false; + if (sema_node) { + skip |= ValidateObjectNotInUse(dev_data, sema_node, obj_struct, caller_name, VALIDATION_ERROR_UNDEFINED); + } + return skip; +} + +static void PostCallRecordImportSemaphore(layer_data *dev_data, VkSemaphore semaphore, + VkExternalSemaphoreHandleTypeFlagBitsKHR handle_type, VkSemaphoreImportFlagsKHR flags) { + SEMAPHORE_NODE *sema_node = GetSemaphoreNode(dev_data, semaphore); + if (sema_node && sema_node->scope != kSyncScopeExternalPermanent) { + if ((handle_type == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR || flags & VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR) && + sema_node->scope == kSyncScopeInternal) { + sema_node->scope = kSyncScopeExternalTemporary; + } else { + sema_node->scope = kSyncScopeExternalPermanent; + } + } +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL +ImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR *pImportSemaphoreWin32HandleInfo) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = + PreCallValidateImportSemaphore(dev_data, pImportSemaphoreWin32HandleInfo->semaphore, "vkImportSemaphoreWin32HandleKHR"); + + if (!skip) { + result = dev_data->dispatch_table.ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); + } + + if (result == VK_SUCCESS) { + PostCallRecordImportSemaphore(dev_data, pImportSemaphoreWin32HandleInfo->semaphore, + pImportSemaphoreWin32HandleInfo->handleType, pImportSemaphoreWin32HandleInfo->flags); + } + return result; +} +#endif + +VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR *pImportSemaphoreFdInfo) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = PreCallValidateImportSemaphore(dev_data, pImportSemaphoreFdInfo->semaphore, "vkImportSemaphoreFdKHR"); + + if (!skip) { + result = dev_data->dispatch_table.ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); + } + + if (result == VK_SUCCESS) { + PostCallRecordImportSemaphore(dev_data, pImportSemaphoreFdInfo->semaphore, pImportSemaphoreFdInfo->handleType, + pImportSemaphoreFdInfo->flags); + } + return result; +} + +static void PostCallRecordGetSemaphore(layer_data *dev_data, VkSemaphore semaphore, + VkExternalSemaphoreHandleTypeFlagBitsKHR handle_type) { + SEMAPHORE_NODE *sema_node = GetSemaphoreNode(dev_data, semaphore); + if (sema_node && handle_type != VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { + // Cannot track semaphore state once it is exported, except for Sync FD handle types which have copy transference + sema_node->scope = kSyncScopeExternalPermanent; + } +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(VkDevice device, + const VkSemaphoreGetWin32HandleInfoKHR *pGetWin32HandleInfo, + HANDLE *pHandle) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + + if (result == VK_SUCCESS) { + PostCallRecordGetSemaphore(dev_data, pGetWin32HandleInfo->semaphore, pGetWin32HandleInfo->handleType); + } + return result; +} +#endif + +VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR *pGetFdInfo, int *pFd) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.GetSemaphoreFdKHR(device, pGetFdInfo, pFd); + + if (result == VK_SUCCESS) { + PostCallRecordGetSemaphore(dev_data, pGetFdInfo->semaphore, pGetFdInfo->handleType); + } + return result; +} + +static bool PreCallValidateImportFence(layer_data *dev_data, VkFence fence, const char *caller_name) { + FENCE_NODE *fence_node = GetFenceNode(dev_data, fence); + bool skip = false; + if (fence_node && fence_node->scope == kSyncScopeInternal && fence_node->state == FENCE_INFLIGHT) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, + HandleToUint64(fence), __LINE__, VALIDATION_ERROR_UNDEFINED, "DS", + "Cannot call %s on fence 0x%" PRIx64 " that is currently in use.", caller_name, HandleToUint64(fence)); + } + return skip; +} + +static void PostCallRecordImportFence(layer_data *dev_data, VkFence fence, VkExternalFenceHandleTypeFlagBitsKHR handle_type, + VkFenceImportFlagsKHR flags) { + FENCE_NODE *fence_node = GetFenceNode(dev_data, fence); + if (fence_node && fence_node->scope != kSyncScopeExternalPermanent) { + if ((handle_type == VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR || flags & VK_FENCE_IMPORT_TEMPORARY_BIT_KHR) && + fence_node->scope == kSyncScopeInternal) { + fence_node->scope = kSyncScopeExternalTemporary; + } else { + fence_node->scope = kSyncScopeExternalPermanent; + } + } +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR *pImportFenceWin32HandleInfo) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = PreCallValidateImportFence(dev_data, pImportFenceWin32HandleInfo->fence, "vkImportFenceWin32HandleKHR"); + + if (!skip) { + result = dev_data->dispatch_table.ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); + } + + if (result == VK_SUCCESS) { + PostCallRecordImportFence(dev_data, pImportFenceWin32HandleInfo->fence, pImportFenceWin32HandleInfo->handleType, + pImportFenceWin32HandleInfo->flags); + } + return result; +} +#endif + +VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR *pImportFenceFdInfo) { + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = PreCallValidateImportFence(dev_data, pImportFenceFdInfo->fence, "vkImportFenceFdKHR"); + + if (!skip) { + result = dev_data->dispatch_table.ImportFenceFdKHR(device, pImportFenceFdInfo); + } + + if (result == VK_SUCCESS) { + PostCallRecordImportFence(dev_data, pImportFenceFdInfo->fence, pImportFenceFdInfo->handleType, pImportFenceFdInfo->flags); + } + return result; +} + +static void PostCallRecordGetFence(layer_data *dev_data, VkFence fence, VkExternalFenceHandleTypeFlagBitsKHR handle_type) { + FENCE_NODE *fence_node = GetFenceNode(dev_data, fence); + if (fence_node) { + if (handle_type != VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR) { + // Export with reference transference becomes external + fence_node->scope = kSyncScopeExternalPermanent; + } else if (fence_node->scope == kSyncScopeInternal) { + // Export with copy transference has a side effect of resetting the fence + fence_node->state = FENCE_UNSIGNALED; + } + } +} + +#ifdef VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR *pGetWin32HandleInfo, + HANDLE *pHandle) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + + if (result == VK_SUCCESS) { + PostCallRecordGetFence(dev_data, pGetWin32HandleInfo->fence, pGetWin32HandleInfo->handleType); + } + return result; +} +#endif + +VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR *pGetFdInfo, int *pFd) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.GetFenceFdKHR(device, pGetFdInfo, pFd); + + if (result == VK_SUCCESS) { + PostCallRecordGetFence(dev_data, pGetFdInfo->fence, pGetFdInfo->handleType); } return result; } @@ -8919,19 +10088,19 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * // to present to any native window on Android; require the // application to have established support on any other platform. if (!dev_data->instance_data->extensions.vk_khr_android_surface) { - auto support_predicate = [dev_data](decltype(surface_state->gpu_queue_support)::const_reference qs) -> bool { + auto support_predicate = [dev_data](decltype(surface_state->gpu_queue_support)::value_type qs) -> bool { // TODO: should restrict search only to queue families of VkDeviceQueueCreateInfos, not whole phys. device return (qs.first.gpu == dev_data->physical_device) && qs.second; }; - const auto& support = surface_state->gpu_queue_support; + const auto &support = surface_state->gpu_queue_support; bool is_supported = std::any_of(support.begin(), support.end(), support_predicate); if (!is_supported) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_146009ec, "DS", - "%s: pCreateInfo->surface is not known at this time to be supported for presentation by this device. " - "The vkGetPhysicalDeviceSurfaceSupportKHR() must be called beforehand, and it must return VK_TRUE support " - "with this surface for at least one queue family of this device. %s", + "%s: pCreateInfo->surface is not known at this time to be supported for presentation by this device. The " + "vkGetPhysicalDeviceSurfaceSupportKHR() must be called beforehand, and it must return VK_TRUE support with " + "this surface for at least one queue family of this device. %s", func_name, validation_error_map[VALIDATION_ERROR_146009ec])) return true; } @@ -8949,6 +10118,15 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * "%s: pCreateInfo->oldSwapchain's surface is not pCreateInfo->surface", func_name)) return true; } + + if ((pCreateInfo->imageExtent.width == 0) || (pCreateInfo->imageExtent.height == 0)) { + if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_14600d32, "DS", + "%s: pCreateInfo->imageExtent = (%d, %d) which is illegal. %s", func_name, pCreateInfo->imageExtent.width, + pCreateInfo->imageExtent.height, validation_error_map[VALIDATION_ERROR_14600d32])) + return true; + } + auto physical_device_state = GetPhysicalDeviceState(dev_data->instance_data, dev_data->physical_device); if (physical_device_state->vkGetPhysicalDeviceSurfaceCapabilitiesKHRState == UNCALLED) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, @@ -8961,8 +10139,8 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if (pCreateInfo->minImageCount < capabilities.minImageCount) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_146009ee, "DS", - "%s called with minImageCount = %d, which is outside the bounds returned " - "by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d). %s", + "%s called with minImageCount = %d, which is outside the bounds returned by " + "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d). %s", func_name, pCreateInfo->minImageCount, capabilities.minImageCount, capabilities.maxImageCount, validation_error_map[VALIDATION_ERROR_146009ee])) return true; @@ -8971,8 +10149,8 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * if ((capabilities.maxImageCount > 0) && (pCreateInfo->minImageCount > capabilities.maxImageCount)) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_146009f0, "DS", - "%s called with minImageCount = %d, which is outside the bounds returned " - "by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d). %s", + "%s called with minImageCount = %d, which is outside the bounds returned by " + "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = %d, maxImageCount = %d). %s", func_name, pCreateInfo->minImageCount, capabilities.minImageCount, capabilities.maxImageCount, validation_error_map[VALIDATION_ERROR_146009f0])) return true; @@ -9048,11 +10226,11 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * return true; } // Validate pCreateInfo->imageArrayLayers against VkSurfaceCapabilitiesKHR::maxImageArrayLayers: - if ((pCreateInfo->imageArrayLayers < 1) || (pCreateInfo->imageArrayLayers > capabilities.maxImageArrayLayers)) { + if (pCreateInfo->imageArrayLayers > capabilities.maxImageArrayLayers) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_146009f6, "DS", - "%s called with a non-supported imageArrayLayers (i.e. %d). Minimum value is 1, maximum value is %d. %s", - func_name, pCreateInfo->imageArrayLayers, capabilities.maxImageArrayLayers, + "%s called with a non-supported imageArrayLayers (i.e. %d). Maximum value is %d. %s", func_name, + pCreateInfo->imageArrayLayers, capabilities.maxImageArrayLayers, validation_error_map[VALIDATION_ERROR_146009f6])) return true; } @@ -9143,7 +10321,7 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char * return true; } else if (pCreateInfo->minImageCount != 1) { if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - reinterpret_cast(dev_data->device), __LINE__, VALIDATION_ERROR_14600ace, "DS", + HandleToUint64(dev_data->device), __LINE__, VALIDATION_ERROR_14600ace, "DS", "%s called with presentMode %s, but minImageCount value is %d. For shared presentable image, minImageCount " "must be 1. %s", func_name, string_VkPresentModeKHR(pCreateInfo->presentMode), pCreateInfo->minImageCount, @@ -9240,15 +10418,15 @@ static bool PreCallValidateGetSwapchainImagesKHR(layer_data *device_data, SWAPCH if (swapchain_state->vkGetSwapchainImagesKHRState == UNCALLED) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(device), __LINE__, SWAPCHAIN_PRIOR_COUNT, "DS", - "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount; but no prior positive " - "value has been seen for pSwapchainImages."); + "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount; but no prior positive value has " + "been seen for pSwapchainImages."); } else if (*pSwapchainImageCount > swapchain_state->get_swapchain_image_count) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device), __LINE__, SWAPCHAIN_INVALID_COUNT, "DS", - "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount, and with " - "pSwapchainImages set to a value (%d) that is greater than the value (%d) that was returned when " - "pSwapchainImageCount was NULL.", - *pSwapchainImageCount, swapchain_state->get_swapchain_image_count); + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + HandleToUint64(device), __LINE__, SWAPCHAIN_INVALID_COUNT, "DS", + "vkGetSwapchainImagesKHR() called with non-NULL pSwapchainImageCount, and with pSwapchainImages set to a " + "value (%d) that is greater than the value (%d) that was returned when pSwapchainImageCount was NULL.", + *pSwapchainImageCount, swapchain_state->get_swapchain_image_count); } } return skip; @@ -9333,8 +10511,8 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf if (pSemaphore && !pSemaphore->signaled) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, DRAWSTATE_QUEUE_FORWARD_PROGRESS, "DS", - "Queue 0x%p is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", queue, - HandleToUint64(pPresentInfo->pWaitSemaphores[i])); + "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.", + HandleToUint64(queue), HandleToUint64(pPresentInfo->pWaitSemaphores[i])); } } @@ -9367,14 +10545,13 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf vector layouts; if (FindLayouts(dev_data, image, layouts)) { for (auto layout : layouts) { - if ((layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR) && - (!dev_data->extensions.vk_khr_shared_presentable_image || - (layout != VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR))) { + if ((layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR) && (!dev_data->extensions.vk_khr_shared_presentable_image || + (layout != VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, HandleToUint64(queue), __LINE__, VALIDATION_ERROR_11200a20, "DS", - "Images passed to present must be in layout " - "VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in %s. %s", + "Images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or " + "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in %s. %s", string_VkImageLayout(layout), validation_error_map[VALIDATION_ERROR_11200a20]); } } @@ -9392,14 +10569,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, DRAWSTATE_SWAPCHAIN_UNSUPPORTED_QUEUE, "DS", - "vkQueuePresentKHR: Presenting image without calling " - "vkGetPhysicalDeviceSurfaceSupportKHR"); + "vkQueuePresentKHR: Presenting image without calling vkGetPhysicalDeviceSurfaceSupportKHR"); } else if (!support_it->second) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, VALIDATION_ERROR_31800a18, "DS", - "vkQueuePresentKHR: Presenting image on queue that cannot " - "present to this surface. %s", + "vkQueuePresentKHR: Presenting image on queue that cannot present to this surface. %s", validation_error_map[VALIDATION_ERROR_31800a18]); } } @@ -9407,67 +10582,60 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf } if (pPresentInfo && pPresentInfo->pNext) { // Verify ext struct - struct std_header { - VkStructureType sType; - const void *pNext; - }; - std_header *pnext = (std_header *)pPresentInfo->pNext; - while (pnext) { - if (VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR == pnext->sType) { - VkPresentRegionsKHR *present_regions = (VkPresentRegionsKHR *)pnext; - for (uint32_t i = 0; i < present_regions->swapchainCount; ++i) { - auto swapchain_data = GetSwapchainNode(dev_data, pPresentInfo->pSwapchains[i]); - assert(swapchain_data); - VkPresentRegionKHR region = present_regions->pRegions[i]; - for (uint32_t j = 0; j < region.rectangleCount; ++j) { - VkRectLayerKHR rect = region.pRectangles[j]; - // TODO: Need to update these errors to their unique error ids when available - if ((rect.offset.x + rect.extent.width) > swapchain_data->createInfo.imageExtent.width) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS", - "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext " - "chain, pRegion[%i].pRectangles[%i], the sum of offset.x " - "(%i) and extent.width (%i) is greater than the " - "corresponding swapchain's imageExtent.width (%i).", - i, j, rect.offset.x, rect.extent.width, swapchain_data->createInfo.imageExtent.width); - } - if ((rect.offset.y + rect.extent.height) > swapchain_data->createInfo.imageExtent.height) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS", - "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext " - "chain, pRegion[%i].pRectangles[%i], the sum of offset.y " - "(%i) and extent.height (%i) is greater than the " - "corresponding swapchain's imageExtent.height (%i).", - i, j, rect.offset.y, rect.extent.height, swapchain_data->createInfo.imageExtent.height); - } - if (rect.layer > swapchain_data->createInfo.imageArrayLayers) { - skip |= log_msg( - dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS", - "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, pRegion[%i].pRectangles[%i], the " - "layer (%i) is greater than the corresponding swapchain's imageArrayLayers (%i).", - i, j, rect.layer, swapchain_data->createInfo.imageArrayLayers); - } + const auto *present_regions = lvl_find_in_chain(pPresentInfo->pNext); + if (present_regions) { + for (uint32_t i = 0; i < present_regions->swapchainCount; ++i) { + auto swapchain_data = GetSwapchainNode(dev_data, pPresentInfo->pSwapchains[i]); + assert(swapchain_data); + VkPresentRegionKHR region = present_regions->pRegions[i]; + for (uint32_t j = 0; j < region.rectangleCount; ++j) { + VkRectLayerKHR rect = region.pRectangles[j]; + if ((rect.offset.x + rect.extent.width) > swapchain_data->createInfo.imageExtent.width) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), + __LINE__, VALIDATION_ERROR_11e009da, "DS", + "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, " + "pRegion[%i].pRectangles[%i], the sum of offset.x (%i) and extent.width (%i) is greater " + "than the corresponding swapchain's imageExtent.width (%i). %s", + i, j, rect.offset.x, rect.extent.width, swapchain_data->createInfo.imageExtent.width, + validation_error_map[VALIDATION_ERROR_11e009da]); + } + if ((rect.offset.y + rect.extent.height) > swapchain_data->createInfo.imageExtent.height) { + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]), + __LINE__, VALIDATION_ERROR_11e009da, "DS", + "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, " + "pRegion[%i].pRectangles[%i], the sum of offset.y (%i) and extent.height (%i) is greater " + "than the corresponding swapchain's imageExtent.height (%i). %s", + i, j, rect.offset.y, rect.extent.height, swapchain_data->createInfo.imageExtent.height, + validation_error_map[VALIDATION_ERROR_11e009da]); + } + if (rect.layer > swapchain_data->createInfo.imageArrayLayers) { + skip |= log_msg( + dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, + HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, VALIDATION_ERROR_11e009dc, "DS", + "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, pRegion[%i].pRectangles[%i], the layer " + "(%i) is greater than the corresponding swapchain's imageArrayLayers (%i). %s", + i, j, rect.layer, swapchain_data->createInfo.imageArrayLayers, + validation_error_map[VALIDATION_ERROR_11e009dc]); } } - } else if (VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE == pnext->sType) { - VkPresentTimesInfoGOOGLE *present_times_info = (VkPresentTimesInfoGOOGLE *)pnext; - if (pPresentInfo->swapchainCount != present_times_info->swapchainCount) { - skip |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, - HandleToUint64(pPresentInfo->pSwapchains[0]), __LINE__, - - VALIDATION_ERROR_118009be, "DS", - "vkQueuePresentKHR(): VkPresentTimesInfoGOOGLE.swapchainCount is %i but " - "pPresentInfo->swapchainCount is %i. For VkPresentTimesInfoGOOGLE down pNext " - "chain of VkPresentInfoKHR, VkPresentTimesInfoGOOGLE.swapchainCount " - "must equal VkPresentInfoKHR.swapchainCount.", - present_times_info->swapchainCount, pPresentInfo->swapchainCount); - } } - pnext = (std_header *)pnext->pNext; + } + + const auto *present_times_info = lvl_find_in_chain(pPresentInfo->pNext); + if (present_times_info) { + if (pPresentInfo->swapchainCount != present_times_info->swapchainCount) { + skip |= + log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, + HandleToUint64(pPresentInfo->pSwapchains[0]), __LINE__, + + VALIDATION_ERROR_118009be, "DS", + "vkQueuePresentKHR(): VkPresentTimesInfoGOOGLE.swapchainCount is %i but pPresentInfo->swapchainCount " + "is %i. For VkPresentTimesInfoGOOGLE down pNext chain of VkPresentInfoKHR, " + "VkPresentTimesInfoGOOGLE.swapchainCount must equal VkPresentInfoKHR.swapchainCount.", + present_times_info->swapchainCount, pPresentInfo->swapchainCount); + } } } @@ -9587,12 +10755,12 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de if (fence == VK_NULL_HANDLE && semaphore == VK_NULL_HANDLE) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(device), __LINE__, DRAWSTATE_SWAPCHAIN_NO_SYNC_FOR_ACQUIRE, "DS", - "vkAcquireNextImageKHR: Semaphore and fence cannot both be VK_NULL_HANDLE. There would be no way " - "to determine the completion of this operation."); + "vkAcquireNextImageKHR: Semaphore and fence cannot both be VK_NULL_HANDLE. There would be no way to " + "determine the completion of this operation."); } auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore && pSemaphore->signaled) { + if (pSemaphore && pSemaphore->scope == kSyncScopeInternal && pSemaphore->signaled) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, HandleToUint64(semaphore), __LINE__, VALIDATION_ERROR_16400a0c, "DS", "vkAcquireNextImageKHR: Semaphore must not be currently signaled or in a wait state. %s", @@ -9608,8 +10776,8 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de if (swapchain_data->replaced) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(swapchain), __LINE__, DRAWSTATE_SWAPCHAIN_REPLACED, "DS", - "vkAcquireNextImageKHR: This swapchain has been replaced. The application can still " - "present any images it has acquired, but cannot acquire any more."); + "vkAcquireNextImageKHR: This swapchain has been replaced. The application can still present any images it " + "has acquired, but cannot acquire any more."); } auto physical_device_state = GetPhysicalDeviceState(dev_data->instance_data, dev_data->physical_device); @@ -9637,14 +10805,17 @@ static bool PreCallValidateAcquireNextImageKHR(layer_data *dev_data, VkDevice de static void PostCallRecordAcquireNextImageKHR(layer_data *dev_data, VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) { auto pFence = GetFenceNode(dev_data, fence); - if (pFence) { + if (pFence && pFence->scope == kSyncScopeInternal) { + // Treat as inflight since it is valid to wait on this fence, even in cases where it is technically a temporary + // import pFence->state = FENCE_INFLIGHT; pFence->signaler.first = VK_NULL_HANDLE; // ANI isn't on a queue, so this can't participate in a completion proof. } - // A successful call to AcquireNextImageKHR counts as a signal operation on semaphore auto pSemaphore = GetSemaphoreNode(dev_data, semaphore); - if (pSemaphore) { + if (pSemaphore && pSemaphore->scope == kSyncScopeInternal) { + // Treat as signaled since it is valid to wait on this semaphore, even in cases where it is technically a + // temporary import pSemaphore->signaled = true; pSemaphore->signaler.first = VK_NULL_HANDLE; } @@ -9693,15 +10864,15 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin // robust on platforms with multiple physical devices. skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, __LINE__, DEVLIMITS_MISSING_QUERY_COUNT, "DL", - "Call sequence has vkEnumeratePhysicalDevices() w/ non-NULL pPhysicalDevices. You should first " - "call vkEnumeratePhysicalDevices() w/ NULL pPhysicalDevices to query pPhysicalDeviceCount."); + "Call sequence has vkEnumeratePhysicalDevices() w/ non-NULL pPhysicalDevices. You should first call " + "vkEnumeratePhysicalDevices() w/ NULL pPhysicalDevices to query pPhysicalDeviceCount."); } // TODO : Could also flag a warning if re-calling this function in QUERY_DETAILS state else if (instance_data->physical_devices_count != *pPhysicalDeviceCount) { // Having actual count match count from app is not a requirement, so this can be a warning skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_COUNT_MISMATCH, "DL", - "Call to vkEnumeratePhysicalDevices() w/ pPhysicalDeviceCount value %u, but actual count " - "supported by this instance is %u.", + "Call to vkEnumeratePhysicalDevices() w/ pPhysicalDeviceCount value %u, but actual count supported by " + "this instance is %u.", *pPhysicalDeviceCount, instance_data->physical_devices_count); } instance_data->vkEnumeratePhysicalDevicesState = QUERY_DETAILS; @@ -9882,9 +11053,9 @@ VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR s if ((surface_state) && (surface_state->swapchain)) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, - HandleToUint64(instance), __LINE__, VALIDATION_ERROR_26c009e4, "DS", - "vkDestroySurfaceKHR() called before its associated VkSwapchainKHR was destroyed. %s", - validation_error_map[VALIDATION_ERROR_26c009e4]); + HandleToUint64(instance), __LINE__, VALIDATION_ERROR_26c009e4, "DS", + "vkDestroySurfaceKHR() called before its associated VkSwapchainKHR was destroyed. %s", + validation_error_map[VALIDATION_ERROR_26c009e4]); } instance_data->surface_map.erase(surface); lock.unlock(); @@ -9905,6 +11076,20 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR(VkInstance instance, cons } #endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_IOS_MVK +VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { + return CreateSurface(instance, pCreateInfo, pAllocator, pSurface, &VkLayerInstanceDispatchTable::CreateIOSSurfaceMVK); +} +#endif // VK_USE_PLATFORM_IOS_MVK + +#ifdef VK_USE_PLATFORM_MACOS_MVK +VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { + return CreateSurface(instance, pCreateInfo, pAllocator, pSurface, &VkLayerInstanceDispatchTable::CreateMacOSSurfaceMVK); +} +#endif // VK_USE_PLATFORM_MACOS_MVK + #ifdef VK_USE_PLATFORM_MIR_KHR VKAPI_ATTR VkResult VKAPI_CALL CreateMirSurfaceKHR(VkInstance instance, const VkMirSurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) { @@ -10168,11 +11353,11 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica auto prev_mode_count = (uint32_t)physical_device_state->present_modes.size(); switch (call_state) { case UNCALLED: - skip |= log_msg( - instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(physicalDevice), __LINE__, DEVLIMITS_MUST_QUERY_COUNT, "DL", - "vkGetPhysicalDeviceSurfacePresentModesKHR() called with non-NULL pPresentModeCount; but no prior positive " - "value has been seen for pPresentModeCount."); + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, + DEVLIMITS_MUST_QUERY_COUNT, "DL", + "vkGetPhysicalDeviceSurfacePresentModesKHR() called with non-NULL pPresentModeCount; but no prior " + "positive value has been seen for pPresentModeCount."); break; default: // both query count and query details @@ -10180,9 +11365,8 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, DEVLIMITS_COUNT_MISMATCH, "DL", - "vkGetPhysicalDeviceSurfacePresentModesKHR() called with *pPresentModeCount (%u) that " - "differs from the value " - "(%u) that was returned when pPresentModes was NULL.", + "vkGetPhysicalDeviceSurfacePresentModesKHR() called with *pPresentModeCount (%u) that differs " + "from the value (%u) that was returned when pPresentModes was NULL.", *pPresentModeCount, prev_mode_count); } break; @@ -10231,23 +11415,21 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi // Since we haven't recorded a preliminary value of *pSurfaceFormatCount, that likely means that the application // didn't // previously call this function with a NULL value of pSurfaceFormats: - skip |= log_msg( - instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, - HandleToUint64(physicalDevice), __LINE__, DEVLIMITS_MUST_QUERY_COUNT, "DL", - "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount; but no prior positive " - "value has been seen for pSurfaceFormats."); + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, + DEVLIMITS_MUST_QUERY_COUNT, "DL", + "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount; but no prior " + "positive value has been seen for pSurfaceFormats."); break; default: if (prev_format_count != *pSurfaceFormatCount) { - skip |= log_msg( - instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, - DEVLIMITS_COUNT_MISMATCH, "DL", - "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount, and with pSurfaceFormats " - "set " - "to " - "a value (%u) that is greater than the value (%u) that was returned when pSurfaceFormatCount was NULL.", - *pSurfaceFormatCount, prev_format_count); + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, + DEVLIMITS_COUNT_MISMATCH, "DL", + "vkGetPhysicalDeviceSurfaceFormatsKHR() called with non-NULL pSurfaceFormatCount, and with " + "pSurfaceFormats set to a value (%u) that is greater than the value (%u) that was returned " + "when pSurfaceFormatCount was NULL.", + *pSurfaceFormatCount, prev_format_count); } break; } @@ -10359,7 +11541,8 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char * VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { - if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) return util_GetExtensionProperties(0, NULL, pCount, pProperties); + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) + return util_GetExtensionProperties(1, device_extensions, pCount, pProperties); assert(physicalDevice); @@ -10383,18 +11566,16 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHX( skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, __LINE__, DEVLIMITS_MISSING_QUERY_COUNT, "DL", "Call sequence has vkEnumeratePhysicalDeviceGroupsKHX() w/ non-NULL " - "pPhysicalDeviceGroupProperties. You should first " - "call vkEnumeratePhysicalDeviceGroupsKHX() w/ NULL pPhysicalDeviceGroupProperties to query " - "pPhysicalDeviceGroupCount."); - } // TODO : Could also flag a warning if re-calling this function in QUERY_DETAILS state + "pPhysicalDeviceGroupProperties. You should first call vkEnumeratePhysicalDeviceGroupsKHX() w/ " + "NULL pPhysicalDeviceGroupProperties to query pPhysicalDeviceGroupCount."); + } // TODO : Could also flag a warning if re-calling this function in QUERY_DETAILS state else if (instance_data->physical_device_groups_count != *pPhysicalDeviceGroupCount) { // Having actual count match count from app is not a requirement, so this can be a warning - skip |= - log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_COUNT_MISMATCH, "DL", - "Call to vkEnumeratePhysicalDeviceGroupsKHX() w/ pPhysicalDeviceGroupCount value %u, but actual count " - "supported by this instance is %u.", - *pPhysicalDeviceGroupCount, instance_data->physical_device_groups_count); + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, 0, __LINE__, DEVLIMITS_COUNT_MISMATCH, "DL", + "Call to vkEnumeratePhysicalDeviceGroupsKHX() w/ pPhysicalDeviceGroupCount value %u, but actual " + "count supported by this instance is %u.", + *pPhysicalDeviceGroupCount, instance_data->physical_device_groups_count); } instance_data->vkEnumeratePhysicalDeviceGroupsState = QUERY_DETAILS; } @@ -10402,10 +11583,10 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHX( return VK_ERROR_VALIDATION_FAILED_EXT; } VkResult result = instance_data->dispatch_table.EnumeratePhysicalDeviceGroupsKHX(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties); + pPhysicalDeviceGroupProperties); if (NULL == pPhysicalDeviceGroupProperties) { instance_data->physical_device_groups_count = *pPhysicalDeviceGroupCount; - } else if (result == VK_SUCCESS) { // Save physical devices + } else if (result == VK_SUCCESS) { // Save physical devices for (uint32_t i = 0; i < *pPhysicalDeviceGroupCount; i++) { for (uint32_t j = 0; j < pPhysicalDeviceGroupProperties[i].physicalDeviceCount; j++) { VkPhysicalDevice cur_phys_dev = pPhysicalDeviceGroupProperties[i].physicalDevices[j]; @@ -10420,8 +11601,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHX( } else { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, 0, __LINE__, DEVLIMITS_INVALID_INSTANCE, "DL", - "Invalid instance (0x%" PRIxLEAST64 ") passed into vkEnumeratePhysicalDeviceGroupsKHX().", - HandleToUint64(instance)); + "Invalid instance (0x%" PRIx64 ") passed into vkEnumeratePhysicalDeviceGroupsKHX().", HandleToUint64(instance)); } return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -10479,7 +11659,18 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer c VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); - dev_data->dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); + unique_lock_t lock(global_lock); + bool skip = false; + GLOBAL_CB_NODE *cb_state = GetCBNode(dev_data, commandBuffer); + // Minimal validation for command buffer state + if (cb_state) { + skip |= ValidateCmd(dev_data, cb_state, CMD_PUSHDESCRIPTORSETWITHTEMPLATEKHR, "vkCmdPushDescriptorSetWithTemplateKHR()"); + } + lock.unlock(); + + if (!skip) { + dev_data->dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); + } } static void PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(instance_layer_data *instanceData, @@ -10582,11 +11773,11 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p } VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT *pNameInfo) { - std::unique_lock lock(global_lock); + unique_lock_t lock(global_lock); layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); if (pNameInfo->pObjectName) { device_data->report_data->debugObjectNameMap->insert( - std::make_pair((uint64_t &&)pNameInfo->object, pNameInfo->pObjectName)); + std::make_pair((uint64_t &&) pNameInfo->object, pNameInfo->pObjectName)); } else { device_data->report_data->debugObjectNameMap->erase(pNameInfo->object); } @@ -10603,12 +11794,32 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, VkDeb VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT *pMarkerInfo) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); - device_data->dispatch_table.CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); + unique_lock_t lock(global_lock); + bool skip = false; + GLOBAL_CB_NODE *cb_state = GetCBNode(device_data, commandBuffer); + // Minimal validation for command buffer state + if (cb_state) { + skip |= ValidateCmd(device_data, cb_state, CMD_DEBUGMARKERBEGINEXT, "vkCmdDebugMarkerBeginEXT()"); + } + lock.unlock(); + if (!skip) { + device_data->dispatch_table.CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); + } } VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); - device_data->dispatch_table.CmdDebugMarkerEndEXT(commandBuffer); + unique_lock_t lock(global_lock); + bool skip = false; + GLOBAL_CB_NODE *cb_state = GetCBNode(device_data, commandBuffer); + // Minimal validation for command buffer state + if (cb_state) { + skip |= ValidateCmd(device_data, cb_state, CMD_DEBUGMARKERENDEXT, "vkCmdDebugMarkerEndEXT()"); + } + lock.unlock(); + if (!skip) { + device_data->dispatch_table.CmdDebugMarkerEndEXT(commandBuffer); + } } VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT *pMarkerInfo) { @@ -10616,194 +11827,257 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer device_data->dispatch_table.CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); } +VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + unique_lock_t lock(global_lock); + bool skip = false; + GLOBAL_CB_NODE *cb_state = GetCBNode(dev_data, commandBuffer); + // Minimal validation for command buffer state + if (cb_state) { + skip |= ValidateCmd(dev_data, cb_state, CMD_SETDISCARDRECTANGLEEXT, "vkCmdSetDiscardRectangleEXT()"); + } + lock.unlock(); + + if (!skip) { + dev_data->dispatch_table.CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, + pDiscardRectangles); + } +} + +VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT *pSampleLocationsInfo) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + unique_lock_t lock(global_lock); + bool skip = false; + GLOBAL_CB_NODE *cb_state = GetCBNode(dev_data, commandBuffer); + // Minimal validation for command buffer state + if (cb_state) { + skip |= ValidateCmd(dev_data, cb_state, CMD_SETSAMPLELOCATIONSEXT, "vkCmdSetSampleLocationsEXT()"); + } + lock.unlock(); + + if (!skip) { + dev_data->dispatch_table.CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); + } +} + VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char *funcName); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char *funcName); // Map of all APIs to be intercepted by this layer -static const std::unordered_map name_to_funcptr_map = { - {"vkGetInstanceProcAddr", (void*)GetInstanceProcAddr}, - {"vk_layerGetPhysicalDeviceProcAddr", (void*)GetPhysicalDeviceProcAddr}, - {"vkGetDeviceProcAddr", (void*)GetDeviceProcAddr}, - {"vkCreateInstance", (void*)CreateInstance}, - {"vkCreateDevice", (void*)CreateDevice}, - {"vkEnumeratePhysicalDevices", (void*)EnumeratePhysicalDevices}, - {"vkGetPhysicalDeviceQueueFamilyProperties", (void*)GetPhysicalDeviceQueueFamilyProperties}, - {"vkDestroyInstance", (void*)DestroyInstance}, - {"vkEnumerateInstanceLayerProperties", (void*)EnumerateInstanceLayerProperties}, - {"vkEnumerateDeviceLayerProperties", (void*)EnumerateDeviceLayerProperties}, - {"vkEnumerateInstanceExtensionProperties", (void*)EnumerateInstanceExtensionProperties}, - {"vkEnumerateDeviceExtensionProperties", (void*)EnumerateDeviceExtensionProperties}, - {"vkCreateDescriptorUpdateTemplateKHR", (void*)CreateDescriptorUpdateTemplateKHR}, - {"vkDestroyDescriptorUpdateTemplateKHR", (void*)DestroyDescriptorUpdateTemplateKHR}, - {"vkUpdateDescriptorSetWithTemplateKHR", (void*)UpdateDescriptorSetWithTemplateKHR}, - {"vkCmdPushDescriptorSetWithTemplateKHR", (void*)CmdPushDescriptorSetWithTemplateKHR}, - {"vkCmdPushDescriptorSetKHR", (void*)CmdPushDescriptorSetKHR}, - {"vkCreateSwapchainKHR", (void*)CreateSwapchainKHR}, - {"vkDestroySwapchainKHR", (void*)DestroySwapchainKHR}, - {"vkGetSwapchainImagesKHR", (void*)GetSwapchainImagesKHR}, - {"vkAcquireNextImageKHR", (void*)AcquireNextImageKHR}, - {"vkQueuePresentKHR", (void*)QueuePresentKHR}, - {"vkQueueSubmit", (void*)QueueSubmit}, - {"vkWaitForFences", (void*)WaitForFences}, - {"vkGetFenceStatus", (void*)GetFenceStatus}, - {"vkQueueWaitIdle", (void*)QueueWaitIdle}, - {"vkDeviceWaitIdle", (void*)DeviceWaitIdle}, - {"vkGetDeviceQueue", (void*)GetDeviceQueue}, - {"vkDestroyDevice", (void*)DestroyDevice}, - {"vkDestroyFence", (void*)DestroyFence}, - {"vkResetFences", (void*)ResetFences}, - {"vkDestroySemaphore", (void*)DestroySemaphore}, - {"vkDestroyEvent", (void*)DestroyEvent}, - {"vkDestroyQueryPool", (void*)DestroyQueryPool}, - {"vkDestroyBuffer", (void*)DestroyBuffer}, - {"vkDestroyBufferView", (void*)DestroyBufferView}, - {"vkDestroyImage", (void*)DestroyImage}, - {"vkDestroyImageView", (void*)DestroyImageView}, - {"vkDestroyShaderModule", (void*)DestroyShaderModule}, - {"vkDestroyPipeline", (void*)DestroyPipeline}, - {"vkDestroyPipelineLayout", (void*)DestroyPipelineLayout}, - {"vkDestroySampler", (void*)DestroySampler}, - {"vkDestroyDescriptorSetLayout", (void*)DestroyDescriptorSetLayout}, - {"vkDestroyDescriptorPool", (void*)DestroyDescriptorPool}, - {"vkDestroyFramebuffer", (void*)DestroyFramebuffer}, - {"vkDestroyRenderPass", (void*)DestroyRenderPass}, - {"vkCreateBuffer", (void*)CreateBuffer}, - {"vkCreateBufferView", (void*)CreateBufferView}, - {"vkCreateImage", (void*)CreateImage}, - {"vkCreateImageView", (void*)CreateImageView}, - {"vkCreateFence", (void*)CreateFence}, - {"vkCreatePipelineCache", (void*)CreatePipelineCache}, - {"vkDestroyPipelineCache", (void*)DestroyPipelineCache}, - {"vkGetPipelineCacheData", (void*)GetPipelineCacheData}, - {"vkMergePipelineCaches", (void*)MergePipelineCaches}, - {"vkCreateGraphicsPipelines", (void*)CreateGraphicsPipelines}, - {"vkCreateComputePipelines", (void*)CreateComputePipelines}, - {"vkCreateSampler", (void*)CreateSampler}, - {"vkCreateDescriptorSetLayout", (void*)CreateDescriptorSetLayout}, - {"vkCreatePipelineLayout", (void*)CreatePipelineLayout}, - {"vkCreateDescriptorPool", (void*)CreateDescriptorPool}, - {"vkResetDescriptorPool", (void*)ResetDescriptorPool}, - {"vkAllocateDescriptorSets", (void*)AllocateDescriptorSets}, - {"vkFreeDescriptorSets", (void*)FreeDescriptorSets}, - {"vkUpdateDescriptorSets", (void*)UpdateDescriptorSets}, - {"vkCreateCommandPool", (void*)CreateCommandPool}, - {"vkDestroyCommandPool", (void*)DestroyCommandPool}, - {"vkResetCommandPool", (void*)ResetCommandPool}, - {"vkCreateQueryPool", (void*)CreateQueryPool}, - {"vkAllocateCommandBuffers", (void*)AllocateCommandBuffers}, - {"vkFreeCommandBuffers", (void*)FreeCommandBuffers}, - {"vkBeginCommandBuffer", (void*)BeginCommandBuffer}, - {"vkEndCommandBuffer", (void*)EndCommandBuffer}, - {"vkResetCommandBuffer", (void*)ResetCommandBuffer}, - {"vkCmdBindPipeline", (void*)CmdBindPipeline}, - {"vkCmdSetViewport", (void*)CmdSetViewport}, - {"vkCmdSetScissor", (void*)CmdSetScissor}, - {"vkCmdSetLineWidth", (void*)CmdSetLineWidth}, - {"vkCmdSetDepthBias", (void*)CmdSetDepthBias}, - {"vkCmdSetBlendConstants", (void*)CmdSetBlendConstants}, - {"vkCmdSetDepthBounds", (void*)CmdSetDepthBounds}, - {"vkCmdSetStencilCompareMask", (void*)CmdSetStencilCompareMask}, - {"vkCmdSetStencilWriteMask", (void*)CmdSetStencilWriteMask}, - {"vkCmdSetStencilReference", (void*)CmdSetStencilReference}, - {"vkCmdBindDescriptorSets", (void*)CmdBindDescriptorSets}, - {"vkCmdBindVertexBuffers", (void*)CmdBindVertexBuffers}, - {"vkCmdBindIndexBuffer", (void*)CmdBindIndexBuffer}, - {"vkCmdDraw", (void*)CmdDraw}, - {"vkCmdDrawIndexed", (void*)CmdDrawIndexed}, - {"vkCmdDrawIndirect", (void*)CmdDrawIndirect}, - {"vkCmdDrawIndexedIndirect", (void*)CmdDrawIndexedIndirect}, - {"vkCmdDispatch", (void*)CmdDispatch}, - {"vkCmdDispatchIndirect", (void*)CmdDispatchIndirect}, - {"vkCmdCopyBuffer", (void*)CmdCopyBuffer}, - {"vkCmdCopyImage", (void*)CmdCopyImage}, - {"vkCmdBlitImage", (void*)CmdBlitImage}, - {"vkCmdCopyBufferToImage", (void*)CmdCopyBufferToImage}, - {"vkCmdCopyImageToBuffer", (void*)CmdCopyImageToBuffer}, - {"vkCmdUpdateBuffer", (void*)CmdUpdateBuffer}, - {"vkCmdFillBuffer", (void*)CmdFillBuffer}, - {"vkCmdClearColorImage", (void*)CmdClearColorImage}, - {"vkCmdClearDepthStencilImage", (void*)CmdClearDepthStencilImage}, - {"vkCmdClearAttachments", (void*)CmdClearAttachments}, - {"vkCmdResolveImage", (void*)CmdResolveImage}, - {"vkGetImageSubresourceLayout", (void*)GetImageSubresourceLayout}, - {"vkCmdSetEvent", (void*)CmdSetEvent}, - {"vkCmdResetEvent", (void*)CmdResetEvent}, - {"vkCmdWaitEvents", (void*)CmdWaitEvents}, - {"vkCmdPipelineBarrier", (void*)CmdPipelineBarrier}, - {"vkCmdBeginQuery", (void*)CmdBeginQuery}, - {"vkCmdEndQuery", (void*)CmdEndQuery}, - {"vkCmdResetQueryPool", (void*)CmdResetQueryPool}, - {"vkCmdCopyQueryPoolResults", (void*)CmdCopyQueryPoolResults}, - {"vkCmdPushConstants", (void*)CmdPushConstants}, - {"vkCmdWriteTimestamp", (void*)CmdWriteTimestamp}, - {"vkCreateFramebuffer", (void*)CreateFramebuffer}, - {"vkCreateShaderModule", (void*)CreateShaderModule}, - {"vkCreateRenderPass", (void*)CreateRenderPass}, - {"vkCmdBeginRenderPass", (void*)CmdBeginRenderPass}, - {"vkCmdNextSubpass", (void*)CmdNextSubpass}, - {"vkCmdEndRenderPass", (void*)CmdEndRenderPass}, - {"vkCmdExecuteCommands", (void*)CmdExecuteCommands}, - {"vkCmdDebugMarkerBeginEXT", (void*)CmdDebugMarkerBeginEXT}, - {"vkCmdDebugMarkerEndEXT", (void*)CmdDebugMarkerEndEXT}, - {"vkCmdDebugMarkerInsertEXT", (void*)CmdDebugMarkerInsertEXT}, - {"vkDebugMarkerSetObjectNameEXT", (void*)DebugMarkerSetObjectNameEXT}, - {"vkDebugMarkerSetObjectTagEXT", (void*)DebugMarkerSetObjectTagEXT}, - {"vkSetEvent", (void*)SetEvent}, - {"vkMapMemory", (void*)MapMemory}, - {"vkUnmapMemory", (void*)UnmapMemory}, - {"vkFlushMappedMemoryRanges", (void*)FlushMappedMemoryRanges}, - {"vkInvalidateMappedMemoryRanges", (void*)InvalidateMappedMemoryRanges}, - {"vkAllocateMemory", (void*)AllocateMemory}, - {"vkFreeMemory", (void*)FreeMemory}, - {"vkBindBufferMemory", (void*)BindBufferMemory}, - {"vkGetBufferMemoryRequirements", (void*)GetBufferMemoryRequirements}, - {"vkGetImageMemoryRequirements", (void*)GetImageMemoryRequirements}, - {"vkGetQueryPoolResults", (void*)GetQueryPoolResults}, - {"vkBindImageMemory", (void*)BindImageMemory}, - {"vkQueueBindSparse", (void*)QueueBindSparse}, - {"vkCreateSemaphore", (void*)CreateSemaphore}, - {"vkCreateEvent", (void*)CreateEvent}, +static const std::unordered_map name_to_funcptr_map = { + {"vkGetInstanceProcAddr", (void *)GetInstanceProcAddr}, + {"vk_layerGetPhysicalDeviceProcAddr", (void *)GetPhysicalDeviceProcAddr}, + {"vkGetDeviceProcAddr", (void *)GetDeviceProcAddr}, + {"vkCreateInstance", (void *)CreateInstance}, + {"vkCreateDevice", (void *)CreateDevice}, + {"vkEnumeratePhysicalDevices", (void *)EnumeratePhysicalDevices}, + {"vkGetPhysicalDeviceQueueFamilyProperties", (void *)GetPhysicalDeviceQueueFamilyProperties}, + {"vkDestroyInstance", (void *)DestroyInstance}, + {"vkEnumerateInstanceLayerProperties", (void *)EnumerateInstanceLayerProperties}, + {"vkEnumerateDeviceLayerProperties", (void *)EnumerateDeviceLayerProperties}, + {"vkEnumerateInstanceExtensionProperties", (void *)EnumerateInstanceExtensionProperties}, + {"vkEnumerateDeviceExtensionProperties", (void *)EnumerateDeviceExtensionProperties}, + {"vkCreateDescriptorUpdateTemplateKHR", (void *)CreateDescriptorUpdateTemplateKHR}, + {"vkDestroyDescriptorUpdateTemplateKHR", (void *)DestroyDescriptorUpdateTemplateKHR}, + {"vkUpdateDescriptorSetWithTemplateKHR", (void *)UpdateDescriptorSetWithTemplateKHR}, + {"vkCmdPushDescriptorSetWithTemplateKHR", (void *)CmdPushDescriptorSetWithTemplateKHR}, + {"vkCmdPushDescriptorSetKHR", (void *)CmdPushDescriptorSetKHR}, + {"vkCreateSwapchainKHR", (void *)CreateSwapchainKHR}, + {"vkDestroySwapchainKHR", (void *)DestroySwapchainKHR}, + {"vkGetSwapchainImagesKHR", (void *)GetSwapchainImagesKHR}, + {"vkAcquireNextImageKHR", (void *)AcquireNextImageKHR}, + {"vkQueuePresentKHR", (void *)QueuePresentKHR}, + {"vkQueueSubmit", (void *)QueueSubmit}, + {"vkWaitForFences", (void *)WaitForFences}, + {"vkGetFenceStatus", (void *)GetFenceStatus}, + {"vkQueueWaitIdle", (void *)QueueWaitIdle}, + {"vkDeviceWaitIdle", (void *)DeviceWaitIdle}, + {"vkGetDeviceQueue", (void *)GetDeviceQueue}, + {"vkDestroyDevice", (void *)DestroyDevice}, + {"vkDestroyFence", (void *)DestroyFence}, + {"vkResetFences", (void *)ResetFences}, + {"vkDestroySemaphore", (void *)DestroySemaphore}, + {"vkDestroyEvent", (void *)DestroyEvent}, + {"vkDestroyQueryPool", (void *)DestroyQueryPool}, + {"vkDestroyBuffer", (void *)DestroyBuffer}, + {"vkDestroyBufferView", (void *)DestroyBufferView}, + {"vkDestroyImage", (void *)DestroyImage}, + {"vkDestroyImageView", (void *)DestroyImageView}, + {"vkDestroyShaderModule", (void *)DestroyShaderModule}, + {"vkDestroyPipeline", (void *)DestroyPipeline}, + {"vkDestroyPipelineLayout", (void *)DestroyPipelineLayout}, + {"vkDestroySampler", (void *)DestroySampler}, + {"vkDestroyDescriptorSetLayout", (void *)DestroyDescriptorSetLayout}, + {"vkDestroyDescriptorPool", (void *)DestroyDescriptorPool}, + {"vkDestroyFramebuffer", (void *)DestroyFramebuffer}, + {"vkDestroyRenderPass", (void *)DestroyRenderPass}, + {"vkCreateBuffer", (void *)CreateBuffer}, + {"vkCreateBufferView", (void *)CreateBufferView}, + {"vkCreateImage", (void *)CreateImage}, + {"vkCreateImageView", (void *)CreateImageView}, + {"vkCreateFence", (void *)CreateFence}, + {"vkCreatePipelineCache", (void *)CreatePipelineCache}, + {"vkDestroyPipelineCache", (void *)DestroyPipelineCache}, + {"vkGetPipelineCacheData", (void *)GetPipelineCacheData}, + {"vkMergePipelineCaches", (void *)MergePipelineCaches}, + {"vkCreateGraphicsPipelines", (void *)CreateGraphicsPipelines}, + {"vkCreateComputePipelines", (void *)CreateComputePipelines}, + {"vkCreateSampler", (void *)CreateSampler}, + {"vkCreateDescriptorSetLayout", (void *)CreateDescriptorSetLayout}, + {"vkCreatePipelineLayout", (void *)CreatePipelineLayout}, + {"vkCreateDescriptorPool", (void *)CreateDescriptorPool}, + {"vkResetDescriptorPool", (void *)ResetDescriptorPool}, + {"vkAllocateDescriptorSets", (void *)AllocateDescriptorSets}, + {"vkFreeDescriptorSets", (void *)FreeDescriptorSets}, + {"vkUpdateDescriptorSets", (void *)UpdateDescriptorSets}, + {"vkCreateCommandPool", (void *)CreateCommandPool}, + {"vkDestroyCommandPool", (void *)DestroyCommandPool}, + {"vkResetCommandPool", (void *)ResetCommandPool}, + {"vkCreateQueryPool", (void *)CreateQueryPool}, + {"vkAllocateCommandBuffers", (void *)AllocateCommandBuffers}, + {"vkFreeCommandBuffers", (void *)FreeCommandBuffers}, + {"vkBeginCommandBuffer", (void *)BeginCommandBuffer}, + {"vkEndCommandBuffer", (void *)EndCommandBuffer}, + {"vkResetCommandBuffer", (void *)ResetCommandBuffer}, + {"vkCmdBindPipeline", (void *)CmdBindPipeline}, + {"vkCmdSetViewport", (void *)CmdSetViewport}, + {"vkCmdSetScissor", (void *)CmdSetScissor}, + {"vkCmdSetLineWidth", (void *)CmdSetLineWidth}, + {"vkCmdSetDepthBias", (void *)CmdSetDepthBias}, + {"vkCmdSetBlendConstants", (void *)CmdSetBlendConstants}, + {"vkCmdSetDepthBounds", (void *)CmdSetDepthBounds}, + {"vkCmdSetStencilCompareMask", (void *)CmdSetStencilCompareMask}, + {"vkCmdSetStencilWriteMask", (void *)CmdSetStencilWriteMask}, + {"vkCmdSetStencilReference", (void *)CmdSetStencilReference}, + {"vkCmdBindDescriptorSets", (void *)CmdBindDescriptorSets}, + {"vkCmdBindVertexBuffers", (void *)CmdBindVertexBuffers}, + {"vkCmdBindIndexBuffer", (void *)CmdBindIndexBuffer}, + {"vkCmdDraw", (void *)CmdDraw}, + {"vkCmdDrawIndexed", (void *)CmdDrawIndexed}, + {"vkCmdDrawIndirect", (void *)CmdDrawIndirect}, + {"vkCmdDrawIndexedIndirect", (void *)CmdDrawIndexedIndirect}, + {"vkCmdDispatch", (void *)CmdDispatch}, + {"vkCmdDispatchIndirect", (void *)CmdDispatchIndirect}, + {"vkCmdCopyBuffer", (void *)CmdCopyBuffer}, + {"vkCmdCopyImage", (void *)CmdCopyImage}, + {"vkCmdBlitImage", (void *)CmdBlitImage}, + {"vkCmdCopyBufferToImage", (void *)CmdCopyBufferToImage}, + {"vkCmdCopyImageToBuffer", (void *)CmdCopyImageToBuffer}, + {"vkCmdUpdateBuffer", (void *)CmdUpdateBuffer}, + {"vkCmdFillBuffer", (void *)CmdFillBuffer}, + {"vkCmdClearColorImage", (void *)CmdClearColorImage}, + {"vkCmdClearDepthStencilImage", (void *)CmdClearDepthStencilImage}, + {"vkCmdClearAttachments", (void *)CmdClearAttachments}, + {"vkCmdResolveImage", (void *)CmdResolveImage}, + {"vkGetImageSubresourceLayout", (void *)GetImageSubresourceLayout}, + {"vkCmdSetEvent", (void *)CmdSetEvent}, + {"vkCmdResetEvent", (void *)CmdResetEvent}, + {"vkCmdWaitEvents", (void *)CmdWaitEvents}, + {"vkCmdPipelineBarrier", (void *)CmdPipelineBarrier}, + {"vkCmdBeginQuery", (void *)CmdBeginQuery}, + {"vkCmdEndQuery", (void *)CmdEndQuery}, + {"vkCmdResetQueryPool", (void *)CmdResetQueryPool}, + {"vkCmdCopyQueryPoolResults", (void *)CmdCopyQueryPoolResults}, + {"vkCmdPushConstants", (void *)CmdPushConstants}, + {"vkCmdWriteTimestamp", (void *)CmdWriteTimestamp}, + {"vkCreateFramebuffer", (void *)CreateFramebuffer}, + {"vkCreateShaderModule", (void *)CreateShaderModule}, + {"vkCreateRenderPass", (void *)CreateRenderPass}, + {"vkCmdBeginRenderPass", (void *)CmdBeginRenderPass}, + {"vkCmdNextSubpass", (void *)CmdNextSubpass}, + {"vkCmdEndRenderPass", (void *)CmdEndRenderPass}, + {"vkCmdExecuteCommands", (void *)CmdExecuteCommands}, + {"vkCmdDebugMarkerBeginEXT", (void *)CmdDebugMarkerBeginEXT}, + {"vkCmdDebugMarkerEndEXT", (void *)CmdDebugMarkerEndEXT}, + {"vkCmdDebugMarkerInsertEXT", (void *)CmdDebugMarkerInsertEXT}, + {"vkDebugMarkerSetObjectNameEXT", (void *)DebugMarkerSetObjectNameEXT}, + {"vkDebugMarkerSetObjectTagEXT", (void *)DebugMarkerSetObjectTagEXT}, + {"vkSetEvent", (void *)SetEvent}, + {"vkMapMemory", (void *)MapMemory}, + {"vkUnmapMemory", (void *)UnmapMemory}, + {"vkFlushMappedMemoryRanges", (void *)FlushMappedMemoryRanges}, + {"vkInvalidateMappedMemoryRanges", (void *)InvalidateMappedMemoryRanges}, + {"vkAllocateMemory", (void *)AllocateMemory}, + {"vkFreeMemory", (void *)FreeMemory}, + {"vkBindBufferMemory", (void *)BindBufferMemory}, + {"vkBindBufferMemory2KHR", (void *)BindBufferMemory2KHR}, + {"vkGetBufferMemoryRequirements", (void *)GetBufferMemoryRequirements}, + {"vkGetBufferMemoryRequirements2KHR", (void *)GetBufferMemoryRequirements2KHR}, + {"vkGetImageMemoryRequirements", (void *)GetImageMemoryRequirements}, + {"vkGetImageMemoryRequirements2KHR", (void *)GetImageMemoryRequirements2KHR}, + {"vkGetImageSparseMemoryRequirements", (void *)GetImageSparseMemoryRequirements}, + {"vkGetImageSparseMemoryRequirements2KHR", (void *)GetImageSparseMemoryRequirements2KHR}, + {"vkGetPhysicalDeviceSparseImageFormatProperties", (void *)GetPhysicalDeviceSparseImageFormatProperties}, + {"vkGetPhysicalDeviceSparseImageFormatProperties2KHR", (void *)GetPhysicalDeviceSparseImageFormatProperties2KHR}, + {"vkGetQueryPoolResults", (void *)GetQueryPoolResults}, + {"vkBindImageMemory", (void *)BindImageMemory}, + {"vkBindImageMemory2KHR", (void *)BindImageMemory2KHR}, + {"vkQueueBindSparse", (void *)QueueBindSparse}, + {"vkCreateSemaphore", (void *)CreateSemaphore}, + {"vkCreateEvent", (void *)CreateEvent}, #ifdef VK_USE_PLATFORM_ANDROID_KHR - {"vkCreateAndroidSurfaceKHR", (void*)CreateAndroidSurfaceKHR}, + {"vkCreateAndroidSurfaceKHR", (void *)CreateAndroidSurfaceKHR}, #endif #ifdef VK_USE_PLATFORM_MIR_KHR - {"vkCreateMirSurfaceKHR", (void*)CreateMirSurfaceKHR}, - {"vkGetPhysicalDeviceMirPresentationSupportKHR", (void*)GetPhysicalDeviceMirPresentationSupportKHR}, + {"vkCreateMirSurfaceKHR", (void *)CreateMirSurfaceKHR}, + {"vkGetPhysicalDeviceMirPresentationSupportKHR", (void *)GetPhysicalDeviceMirPresentationSupportKHR}, #endif #ifdef VK_USE_PLATFORM_WAYLAND_KHR - {"vkCreateWaylandSurfaceKHR", (void*)CreateWaylandSurfaceKHR}, - {"vkGetPhysicalDeviceWaylandPresentationSupportKHR", (void*)GetPhysicalDeviceWaylandPresentationSupportKHR}, + {"vkCreateWaylandSurfaceKHR", (void *)CreateWaylandSurfaceKHR}, + {"vkGetPhysicalDeviceWaylandPresentationSupportKHR", (void *)GetPhysicalDeviceWaylandPresentationSupportKHR}, #endif #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkCreateWin32SurfaceKHR", (void*)CreateWin32SurfaceKHR}, - {"vkGetPhysicalDeviceWin32PresentationSupportKHR", (void*)GetPhysicalDeviceWin32PresentationSupportKHR}, + {"vkCreateWin32SurfaceKHR", (void *)CreateWin32SurfaceKHR}, + {"vkGetPhysicalDeviceWin32PresentationSupportKHR", (void *)GetPhysicalDeviceWin32PresentationSupportKHR}, + {"vkImportSemaphoreWin32HandleKHR", (void *)ImportSemaphoreWin32HandleKHR}, + {"vkGetSemaphoreWin32HandleKHR", (void *)GetSemaphoreWin32HandleKHR}, + {"vkImportFenceWin32HandleKHR", (void *)ImportFenceWin32HandleKHR}, + {"vkGetFenceWin32HandleKHR", (void *)GetFenceWin32HandleKHR}, #endif #ifdef VK_USE_PLATFORM_XCB_KHR - {"vkCreateXcbSurfaceKHR", (void*)CreateXcbSurfaceKHR}, - {"vkGetPhysicalDeviceXcbPresentationSupportKHR", (void*)GetPhysicalDeviceXcbPresentationSupportKHR}, + {"vkCreateXcbSurfaceKHR", (void *)CreateXcbSurfaceKHR}, + {"vkGetPhysicalDeviceXcbPresentationSupportKHR", (void *)GetPhysicalDeviceXcbPresentationSupportKHR}, #endif #ifdef VK_USE_PLATFORM_XLIB_KHR - {"vkCreateXlibSurfaceKHR", (void*)CreateXlibSurfaceKHR}, - {"vkGetPhysicalDeviceXlibPresentationSupportKHR", (void*)GetPhysicalDeviceXlibPresentationSupportKHR}, + {"vkCreateXlibSurfaceKHR", (void *)CreateXlibSurfaceKHR}, + {"vkGetPhysicalDeviceXlibPresentationSupportKHR", (void *)GetPhysicalDeviceXlibPresentationSupportKHR}, +#endif +#ifdef VK_USE_PLATFORM_IOS_MVK + {"vkCreateIOSSurfaceMVK", (void *)CreateIOSSurfaceMVK}, +#endif +#ifdef VK_USE_PLATFORM_MACOS_MVK + {"vkCreateMacOSSurfaceMVK", (void *)CreateMacOSSurfaceMVK}, #endif - {"vkCreateDisplayPlaneSurfaceKHR", (void*)CreateDisplayPlaneSurfaceKHR}, - {"vkDestroySurfaceKHR", (void*)DestroySurfaceKHR}, - {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", (void*)GetPhysicalDeviceSurfaceCapabilitiesKHR}, - {"vkGetPhysicalDeviceSurfaceCapabilities2KHR", (void*)GetPhysicalDeviceSurfaceCapabilities2KHR}, - {"vkGetPhysicalDeviceSurfaceCapabilities2EXT", (void*)GetPhysicalDeviceSurfaceCapabilities2EXT}, - {"vkGetPhysicalDeviceSurfaceSupportKHR", (void*)GetPhysicalDeviceSurfaceSupportKHR}, - {"vkGetPhysicalDeviceSurfacePresentModesKHR", (void*)GetPhysicalDeviceSurfacePresentModesKHR}, - {"vkGetPhysicalDeviceSurfaceFormatsKHR", (void*)GetPhysicalDeviceSurfaceFormatsKHR}, - {"vkGetPhysicalDeviceSurfaceFormats2KHR", (void*)GetPhysicalDeviceSurfaceFormats2KHR}, - {"vkGetPhysicalDeviceQueueFamilyProperties2KHR", (void*)GetPhysicalDeviceQueueFamilyProperties2KHR}, - {"vkEnumeratePhysicalDeviceGroupsKHX", (void*)EnumeratePhysicalDeviceGroupsKHX}, - {"vkCreateDebugReportCallbackEXT", (void*)CreateDebugReportCallbackEXT}, - {"vkDestroyDebugReportCallbackEXT", (void*)DestroyDebugReportCallbackEXT}, - {"vkDebugReportMessageEXT", (void*)DebugReportMessageEXT}, - {"vkGetPhysicalDeviceDisplayPlanePropertiesKHR", (void*)GetPhysicalDeviceDisplayPlanePropertiesKHR}, - {"GetDisplayPlaneSupportedDisplaysKHR", (void*)GetDisplayPlaneSupportedDisplaysKHR}, - {"GetDisplayPlaneCapabilitiesKHR", (void*)GetDisplayPlaneCapabilitiesKHR}, + {"vkCreateDisplayPlaneSurfaceKHR", (void *)CreateDisplayPlaneSurfaceKHR}, + {"vkDestroySurfaceKHR", (void *)DestroySurfaceKHR}, + {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", (void *)GetPhysicalDeviceSurfaceCapabilitiesKHR}, + {"vkGetPhysicalDeviceSurfaceCapabilities2KHR", (void *)GetPhysicalDeviceSurfaceCapabilities2KHR}, + {"vkGetPhysicalDeviceSurfaceCapabilities2EXT", (void *)GetPhysicalDeviceSurfaceCapabilities2EXT}, + {"vkGetPhysicalDeviceSurfaceSupportKHR", (void *)GetPhysicalDeviceSurfaceSupportKHR}, + {"vkGetPhysicalDeviceSurfacePresentModesKHR", (void *)GetPhysicalDeviceSurfacePresentModesKHR}, + {"vkGetPhysicalDeviceSurfaceFormatsKHR", (void *)GetPhysicalDeviceSurfaceFormatsKHR}, + {"vkGetPhysicalDeviceSurfaceFormats2KHR", (void *)GetPhysicalDeviceSurfaceFormats2KHR}, + {"vkGetPhysicalDeviceQueueFamilyProperties2KHR", (void *)GetPhysicalDeviceQueueFamilyProperties2KHR}, + {"vkEnumeratePhysicalDeviceGroupsKHX", (void *)EnumeratePhysicalDeviceGroupsKHX}, + {"vkCreateDebugReportCallbackEXT", (void *)CreateDebugReportCallbackEXT}, + {"vkDestroyDebugReportCallbackEXT", (void *)DestroyDebugReportCallbackEXT}, + {"vkDebugReportMessageEXT", (void *)DebugReportMessageEXT}, + {"vkGetPhysicalDeviceDisplayPlanePropertiesKHR", (void *)GetPhysicalDeviceDisplayPlanePropertiesKHR}, + {"vkGetDisplayPlaneSupportedDisplaysKHR", (void *)GetDisplayPlaneSupportedDisplaysKHR}, + {"vkGetDisplayPlaneCapabilitiesKHR", (void *)GetDisplayPlaneCapabilitiesKHR}, + {"vkImportSemaphoreFdKHR", (void *)ImportSemaphoreFdKHR}, + {"vkGetSemaphoreFdKHR", (void *)GetSemaphoreFdKHR}, + {"vkImportFenceFdKHR", (void *)ImportFenceFdKHR}, + {"vkGetFenceFdKHR", (void *)GetFenceFdKHR}, + {"vkCreateValidationCacheEXT", (void *)CreateValidationCacheEXT}, + {"vkDestroyValidationCacheEXT", (void *)DestroyValidationCacheEXT}, + {"vkGetValidationCacheDataEXT", (void *)GetValidationCacheDataEXT}, + {"vkMergeValidationCachesEXT", (void *)MergeValidationCachesEXT}, + {"vkCmdSetDiscardRectangleEXT", (void *)CmdSetDiscardRectangleEXT}, + {"vkCmdSetSampleLocationsEXT", (void *)CmdSetSampleLocationsEXT}, }; VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char *funcName) { diff --git a/sources/third_party/vulkan/src/layers/core_validation.h b/sources/third_party/vulkan/src/layers/core_validation.h index 460dba373605d7dfbd2f0108e36fab6b792ea61e..de1aeac51de51f1cb3cafe5a7127ca0d6890a832 100644 --- a/sources/third_party/vulkan/src/layers/core_validation.h +++ b/sources/third_party/vulkan/src/layers/core_validation.h @@ -21,29 +21,6 @@ * Author: Mark Lobodzinski */ -#ifndef NOEXCEPT -// Check for noexcept support -#if defined(__clang__) -#if __has_feature(cxx_noexcept) -#define HAS_NOEXCEPT -#endif -#else -#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 -#define HAS_NOEXCEPT -#else -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS -#define HAS_NOEXCEPT -#endif -#endif -#endif - -#ifdef HAS_NOEXCEPT -#define NOEXCEPT noexcept -#else -#define NOEXCEPT -#endif -#endif - #pragma once #include "core_validation_error_enums.h" #include "vk_validation_error_messages.h" @@ -91,13 +68,17 @@ // TODO : Is there a way to track when Cmd Buffer finishes & remove mem references at that point? // TODO : Could potentially store a list of freed mem allocs to flag when they're incorrectly used - - struct GENERIC_HEADER { VkStructureType sType; const void *pNext; }; +enum SyncScope { + kSyncScopeInternal, + kSyncScopeExternalTemporary, + kSyncScopeExternalPermanent, +}; + enum FENCE_STATE { FENCE_UNSIGNALED, FENCE_INFLIGHT, FENCE_RETIRED }; class FENCE_NODE { @@ -106,15 +87,17 @@ class FENCE_NODE { VkFenceCreateInfo createInfo; std::pair signaler; FENCE_STATE state; + SyncScope scope; // Default constructor - FENCE_NODE() : state(FENCE_UNSIGNALED) {} + FENCE_NODE() : state(FENCE_UNSIGNALED), scope(kSyncScopeInternal) {} }; class SEMAPHORE_NODE : public BASE_NODE { public: std::pair signaler; bool signaled; + SyncScope scope; }; class EVENT_STATE : public BASE_NODE { @@ -176,7 +159,7 @@ struct hash { return hash()((uint64_t)(gq.gpu)) ^ hash()(gq.queue_family_index); } }; -} +} // namespace std struct SURFACE_STATE { VkSurfaceKHR surface = VK_NULL_HANDLE; diff --git a/sources/third_party/vulkan/src/layers/core_validation_error_enums.h b/sources/third_party/vulkan/src/layers/core_validation_error_enums.h index 12099c3275c5e861c66571dfece97d1437a79990..45d03f65d4a7806b312a9db6251b0f93a72c2d64 100644 --- a/sources/third_party/vulkan/src/layers/core_validation_error_enums.h +++ b/sources/third_party/vulkan/src/layers/core_validation_error_enums.h @@ -203,25 +203,25 @@ enum IMAGE_ERROR { }; enum SWAPCHAIN_ERROR { - SWAPCHAIN_INVALID_HANDLE, // Handle used that isn't currently valid - SWAPCHAIN_NULL_POINTER, // Pointer set to NULL, instead of being a valid pointer - SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, // Did not enable WSI extension, but called WSI function - SWAPCHAIN_DEL_OBJECT_BEFORE_CHILDREN, // Called vkDestroyDevice() before vkDestroySwapchainKHR() - SWAPCHAIN_CREATE_UNSUPPORTED_SURFACE, // Called vkCreateSwapchainKHR() with a pCreateInfo->surface that wasn't supported - SWAPCHAIN_CREATE_SWAP_WITHOUT_QUERY, // Called vkCreateSwapchainKHR() without calling a query - SWAPCHAIN_CREATE_SWAP_OUT_OF_BOUNDS_EXTENTS, // Called vkCreateSwapchainKHR() with out-of-bounds imageExtent - SWAPCHAIN_CREATE_SWAP_EXTENTS_NO_MATCH_WIN, // Called vkCreateSwapchainKHR w/imageExtent that doesn't match window's extent - SWAPCHAIN_CREATE_SWAP_BAD_PRE_TRANSFORM, // Called vkCreateSwapchainKHR() with a non-supported preTransform - SWAPCHAIN_CREATE_SWAP_BAD_COMPOSITE_ALPHA, // Called vkCreateSwapchainKHR() with a non-supported compositeAlpha - SWAPCHAIN_CREATE_SWAP_BAD_IMG_ARRAY_LAYERS, // Called vkCreateSwapchainKHR() with a non-supported imageArrayLayers - SWAPCHAIN_CREATE_SWAP_BAD_IMG_USAGE_FLAGS, // Called vkCreateSwapchainKHR() with a non-supported imageUsageFlags - SWAPCHAIN_CREATE_SWAP_BAD_IMG_COLOR_SPACE, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace - SWAPCHAIN_CREATE_SWAP_BAD_IMG_FORMAT, // Called vkCreateSwapchainKHR() with a non-supported imageFormat - SWAPCHAIN_CREATE_SWAP_BAD_IMG_FMT_CLR_SP, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace - SWAPCHAIN_CREATE_SWAP_BAD_PRESENT_MODE, // Called vkCreateSwapchainKHR() with a non-supported presentMode - SWAPCHAIN_CREATE_SWAP_BAD_SHARING_MODE, // Called vkCreateSwapchainKHR() with a non-supported imageSharingMode - SWAPCHAIN_CREATE_SWAP_BAD_SHARING_VALUES, // Called vkCreateSwapchainKHR() with bad values when imageSharingMode is - // VK_SHARING_MODE_CONCURRENT + SWAPCHAIN_INVALID_HANDLE, // Handle used that isn't currently valid + SWAPCHAIN_NULL_POINTER, // Pointer set to NULL, instead of being a valid pointer + SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED, // Did not enable WSI extension, but called WSI function + SWAPCHAIN_DEL_OBJECT_BEFORE_CHILDREN, // Called vkDestroyDevice() before vkDestroySwapchainKHR() + SWAPCHAIN_CREATE_UNSUPPORTED_SURFACE, // Called vkCreateSwapchainKHR() with a pCreateInfo->surface that wasn't supported + SWAPCHAIN_CREATE_SWAP_WITHOUT_QUERY, // Called vkCreateSwapchainKHR() without calling a query + SWAPCHAIN_CREATE_SWAP_OUT_OF_BOUNDS_EXTENTS, // Called vkCreateSwapchainKHR() with out-of-bounds imageExtent + SWAPCHAIN_CREATE_SWAP_EXTENTS_NO_MATCH_WIN, // Called vkCreateSwapchainKHR w/imageExtent that doesn't match window's extent + SWAPCHAIN_CREATE_SWAP_BAD_PRE_TRANSFORM, // Called vkCreateSwapchainKHR() with a non-supported preTransform + SWAPCHAIN_CREATE_SWAP_BAD_COMPOSITE_ALPHA, // Called vkCreateSwapchainKHR() with a non-supported compositeAlpha + SWAPCHAIN_CREATE_SWAP_BAD_IMG_ARRAY_LAYERS, // Called vkCreateSwapchainKHR() with a non-supported imageArrayLayers + SWAPCHAIN_CREATE_SWAP_BAD_IMG_USAGE_FLAGS, // Called vkCreateSwapchainKHR() with a non-supported imageUsageFlags + SWAPCHAIN_CREATE_SWAP_BAD_IMG_COLOR_SPACE, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace + SWAPCHAIN_CREATE_SWAP_BAD_IMG_FORMAT, // Called vkCreateSwapchainKHR() with a non-supported imageFormat + SWAPCHAIN_CREATE_SWAP_BAD_IMG_FMT_CLR_SP, // Called vkCreateSwapchainKHR() with a non-supported imageColorSpace + SWAPCHAIN_CREATE_SWAP_BAD_PRESENT_MODE, // Called vkCreateSwapchainKHR() with a non-supported presentMode + SWAPCHAIN_CREATE_SWAP_BAD_SHARING_MODE, // Called vkCreateSwapchainKHR() with a non-supported imageSharingMode + SWAPCHAIN_CREATE_SWAP_BAD_SHARING_VALUES, // Called vkCreateSwapchainKHR() with bad values when imageSharingMode is + // VK_SHARING_MODE_CONCURRENT SWAPCHAIN_BAD_BOOL, // VkBool32 that doesn't have value of VK_TRUE or VK_FALSE (e.g. is a non-zero form of true) SWAPCHAIN_PRIOR_COUNT, // Query must be called first to get value of pCount, then called second time SWAPCHAIN_INVALID_COUNT, // Second time a query called, the pCount value didn't match first time diff --git a/sources/third_party/vulkan/src/layers/core_validation_types.h b/sources/third_party/vulkan/src/layers/core_validation_types.h index 11fbd3e32077008764206ab06777d99b9f4a1972..bc5a554f6203f3d393ff863462cf170c535c0d32 100644 --- a/sources/third_party/vulkan/src/layers/core_validation_types.h +++ b/sources/third_party/vulkan/src/layers/core_validation_types.h @@ -23,29 +23,6 @@ #ifndef CORE_VALIDATION_TYPES_H_ #define CORE_VALIDATION_TYPES_H_ -#ifndef NOEXCEPT -// Check for noexcept support -#if defined(__clang__) -#if __has_feature(cxx_noexcept) -#define HAS_NOEXCEPT -#endif -#else -#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 -#define HAS_NOEXCEPT -#else -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS -#define HAS_NOEXCEPT -#endif -#endif -#endif - -#ifdef HAS_NOEXCEPT -#define NOEXCEPT noexcept -#else -#define NOEXCEPT -#endif -#endif - #include "vk_safe_struct.h" #include "vulkan/vulkan.h" #include "vk_validation_error_messages.h" @@ -66,7 +43,7 @@ namespace cvdescriptorset { class DescriptorSetLayout; class DescriptorSet; -}; +} // namespace cvdescriptorset struct GLOBAL_CB_NODE; @@ -93,8 +70,8 @@ class BASE_NODE { struct COMMAND_POOL_NODE : public BASE_NODE { VkCommandPoolCreateFlags createFlags; uint32_t queueFamilyIndex; - // TODO: why is this std::list? - std::list commandBuffers; // container of cmd buffers allocated from this pool + // Cmd buffers allocated from this pool + std::unordered_set commandBuffers; }; // Generic wrapper for vulkan objects @@ -110,10 +87,10 @@ template <> struct hash { size_t operator()(VK_OBJECT obj) const NOEXCEPT { return hash()(obj.handle) ^ hash()(obj.type); } }; -} +} // namespace std class PHYS_DEV_PROPERTIES_NODE { -public: + public: VkPhysicalDeviceProperties properties; std::vector queue_family_properties; }; @@ -180,7 +157,7 @@ struct hash { return intermediate ^ hash()(mb.size); } }; -} +} // namespace std // Superclass for bindable object state (currently images and buffers) class BINDABLE : public BASE_NODE { @@ -196,19 +173,28 @@ class BINDABLE : public BASE_NODE { // There's more data for sparse bindings so need better long-term solution // TODO : Need to update solution to track all sparse binding data std::unordered_set sparse_bindings; - BINDABLE() : sparse(false), binding{}, requirements{}, memory_requirements_checked(false), sparse_bindings{} {}; - // Return unordered set of memory objects that are bound - std::unordered_set GetBoundMemory() { - std::unordered_set mem_set; + + std::unordered_set bound_memory_set_; + + BINDABLE() + : sparse(false), binding{}, requirements{}, memory_requirements_checked(false), sparse_bindings{}, bound_memory_set_{} {}; + + // Update the cached set of memory bindings. + // Code that changes binding.mem or sparse_bindings must call UpdateBoundMemorySet() + void UpdateBoundMemorySet() { + bound_memory_set_.clear(); if (!sparse) { - mem_set.insert(binding.mem); + bound_memory_set_.insert(binding.mem); } else { for (auto sb : sparse_bindings) { - mem_set.insert(sb.mem); + bound_memory_set_.insert(sb.mem); } } - return mem_set; } + + // Return unordered set of memory objects that are bound + // Instead of creating a set from scratch each query, return the cached one + const std::unordered_set &GetBoundMemory() const { return bound_memory_set_; } }; class BUFFER_STATE : public BINDABLE { @@ -233,7 +219,7 @@ class BUFFER_STATE : public BINDABLE { ~BUFFER_STATE() { if ((createInfo.sharingMode == VK_SHARING_MODE_CONCURRENT) && (createInfo.queueFamilyIndexCount > 0)) { - delete [] createInfo.pQueueFamilyIndices; + delete[] createInfo.pQueueFamilyIndices; createInfo.pQueueFamilyIndices = nullptr; } }; @@ -258,12 +244,25 @@ class IMAGE_STATE : public BINDABLE { public: VkImage image; VkImageCreateInfo createInfo; - bool valid; // If this is a swapchain image backing memory track valid here as it doesn't have DEVICE_MEM_INFO - bool acquired; // If this is a swapchain image, has it been acquired by the app. - bool shared_presentable; // True for a front-buffered swapchain image - bool layout_locked; // A front-buffered image that has been presented can never have layout transitioned + bool valid; // If this is a swapchain image backing memory track valid here as it doesn't have DEVICE_MEM_INFO + bool acquired; // If this is a swapchain image, has it been acquired by the app. + bool shared_presentable; // True for a front-buffered swapchain image + bool layout_locked; // A front-buffered image that has been presented can never have layout transitioned + bool get_sparse_reqs_called; // Track if GetImageSparseMemoryRequirements() has been called for this image + bool sparse_metadata_required; // Track if sparse metadata aspect is required for this image + bool sparse_metadata_bound; // Track if sparse metadata aspect is bound to this image + std::vector sparse_requirements; IMAGE_STATE(VkImage img, const VkImageCreateInfo *pCreateInfo) - : image(img), createInfo(*pCreateInfo), valid(false), acquired(false), shared_presentable(false), layout_locked(false) { + : image(img), + createInfo(*pCreateInfo), + valid(false), + acquired(false), + shared_presentable(false), + layout_locked(false), + get_sparse_reqs_called(false), + sparse_metadata_required(false), + sparse_metadata_bound(false), + sparse_requirements{} { if ((createInfo.sharingMode == VK_SHARING_MODE_CONCURRENT) && (createInfo.queueFamilyIndexCount > 0)) { uint32_t *pQueueFamilyIndices = new uint32_t[createInfo.queueFamilyIndexCount]; for (uint32_t i = 0; i < createInfo.queueFamilyIndexCount; i++) { @@ -281,7 +280,7 @@ class IMAGE_STATE : public BINDABLE { ~IMAGE_STATE() { if ((createInfo.sharingMode == VK_SHARING_MODE_CONCURRENT) && (createInfo.queueFamilyIndexCount > 0)) { - delete [] createInfo.pQueueFamilyIndices; + delete[] createInfo.pQueueFamilyIndices; createInfo.pQueueFamilyIndices = nullptr; } }; @@ -316,7 +315,7 @@ struct MEMORY_RANGE { // Data struct for tracking memory object struct DEVICE_MEM_INFO : public BASE_NODE { void *object; // Dispatchable object used to create this memory (device of swapchain) - bool global_valid; // If allocation is mapped, set to "true" to be picked up by subsequently bound ranges + bool global_valid; // If allocation is mapped or external, set to "true" to be picked up by subsequently bound ranges VkDeviceMemory mem; VkMemoryAllocateInfo alloc_info; std::unordered_set obj_bindings; // objects bound to this memory @@ -385,69 +384,79 @@ struct RENDER_PASS_STATE : public BASE_NODE { RENDER_PASS_STATE(VkRenderPassCreateInfo const *pCreateInfo) : createInfo(pCreateInfo) {} }; -// Cmd Buffer Tracking +// vkCmd tracking -- complete as of header 1.0.68 +// please keep in "none, then sorted" order +// Note: grepping vulkan.h for VKAPI_CALL.*vkCmd will return all functions except vkEndCommandBuffer + enum CMD_TYPE { CMD_NONE, - CMD_BINDPIPELINE, - CMD_BINDPIPELINEDELTA, - CMD_SETVIEWPORTSTATE, - CMD_SETSCISSORSTATE, - CMD_SETLINEWIDTHSTATE, - CMD_SETDEPTHBIASSTATE, - CMD_SETBLENDSTATE, - CMD_SETDEPTHBOUNDSSTATE, - CMD_SETSTENCILREADMASKSTATE, - CMD_SETSTENCILWRITEMASKSTATE, - CMD_SETSTENCILREFERENCESTATE, + CMD_BEGINQUERY, + CMD_BEGINRENDERPASS, CMD_BINDDESCRIPTORSETS, CMD_BINDINDEXBUFFER, - CMD_BINDVERTEXBUFFER, + CMD_BINDPIPELINE, + CMD_BINDVERTEXBUFFERS, + CMD_BLITIMAGE, + CMD_CLEARATTACHMENTS, + CMD_CLEARCOLORIMAGE, + CMD_CLEARDEPTHSTENCILIMAGE, + CMD_COPYBUFFER, + CMD_COPYBUFFERTOIMAGE, + CMD_COPYIMAGE, + CMD_COPYIMAGETOBUFFER, + CMD_COPYQUERYPOOLRESULTS, + CMD_DEBUGMARKERBEGINEXT, + CMD_DEBUGMARKERENDEXT, + CMD_DEBUGMARKERINSERTEXT, + CMD_DISPATCH, + CMD_DISPATCHBASEKHX, + CMD_DISPATCHINDIRECT, CMD_DRAW, CMD_DRAWINDEXED, - CMD_DRAWINDIRECT, - CMD_DRAWINDIRECTCOUNTAMD, CMD_DRAWINDEXEDINDIRECT, CMD_DRAWINDEXEDINDIRECTCOUNTAMD, - CMD_DISPATCH, - CMD_DISPATCHINDIRECT, - CMD_COPYBUFFER, - CMD_COPYIMAGE, - CMD_BLITIMAGE, - CMD_COPYBUFFERTOIMAGE, - CMD_COPYIMAGETOBUFFER, - CMD_CLONEIMAGEDATA, - CMD_UPDATEBUFFER, + CMD_DRAWINDIRECT, + CMD_DRAWINDIRECTCOUNTAMD, + CMD_ENDCOMMANDBUFFER, // Should be the last command in any RECORDED cmd buffer + CMD_ENDQUERY, + CMD_ENDRENDERPASS, + CMD_EXECUTECOMMANDS, CMD_FILLBUFFER, - CMD_CLEARCOLORIMAGE, - CMD_CLEARATTACHMENTS, - CMD_CLEARDEPTHSTENCILIMAGE, + CMD_NEXTSUBPASS, + CMD_PIPELINEBARRIER, + CMD_PROCESSCOMMANDSNVX, + CMD_PUSHCONSTANTS, + CMD_PUSHDESCRIPTORSETKHR, + CMD_PUSHDESCRIPTORSETWITHTEMPLATEKHR, + CMD_RESERVESPACEFORCOMMANDSNVX, + CMD_RESETEVENT, + CMD_RESETQUERYPOOL, CMD_RESOLVEIMAGE, + CMD_SETBLENDCONSTANTS, + CMD_SETDEPTHBIAS, + CMD_SETDEPTHBOUNDS, + CMD_SETDEVICEMASKKHX, + CMD_SETDISCARDRECTANGLEEXT, CMD_SETEVENT, - CMD_RESETEVENT, + CMD_SETLINEWIDTH, + CMD_SETSAMPLELOCATIONSEXT, + CMD_SETSCISSOR, + CMD_SETSTENCILCOMPAREMASK, + CMD_SETSTENCILREFERENCE, + CMD_SETSTENCILWRITEMASK, + CMD_SETVIEWPORT, + CMD_SETVIEWPORTWSCALINGNV, + CMD_UPDATEBUFFER, CMD_WAITEVENTS, - CMD_PIPELINEBARRIER, - CMD_BEGINQUERY, - CMD_ENDQUERY, - CMD_RESETQUERYPOOL, - CMD_COPYQUERYPOOLRESULTS, CMD_WRITETIMESTAMP, - CMD_PUSHCONSTANTS, - CMD_INITATOMICCOUNTERS, - CMD_LOADATOMICCOUNTERS, - CMD_SAVEATOMICCOUNTERS, - CMD_BEGINRENDERPASS, - CMD_NEXTSUBPASS, - CMD_ENDRENDERPASS, - CMD_EXECUTECOMMANDS, - CMD_END, // Should be last command in any RECORDED cmd buffer }; enum CB_STATE { - CB_NEW, // Newly created CB w/o any cmds - CB_RECORDING, // BeginCB has been called on this CB - CB_RECORDED, // EndCB has been called on this CB - CB_INVALID_COMPLETE, // had a complete recording, but was since invalidated - CB_INVALID_INCOMPLETE, // fouled before recording was completed + CB_NEW, // Newly created CB w/o any cmds + CB_RECORDING, // BeginCB has been called on this CB + CB_RECORDED, // EndCB has been called on this CB + CB_INVALID_COMPLETE, // had a complete recording, but was since invalidated + CB_INVALID_INCOMPLETE, // fouled before recording was completed }; // CB Status -- used to track status of various bindings on cmd buffer objects @@ -477,7 +486,6 @@ struct TEMPLATE_STATE { : desc_update_template(update_template), create_info(*pCreateInfo) {} }; - struct QueryObject { VkQueryPool pool; uint32_t index; @@ -494,7 +502,7 @@ struct hash { return hash()((uint64_t)(query.pool)) ^ hash()(query.index); } }; -} +} // namespace std struct DRAW_DATA { std::vector buffers; }; @@ -526,7 +534,7 @@ struct hash { return hashVal; } }; -} +} // namespace std // Store layouts and pushconstants for PipelineLayout struct PIPELINE_LAYOUT_NODE { @@ -559,8 +567,6 @@ class PIPELINE_STATE : public BASE_NODE { std::vector vertexBindingDescriptions; std::vector attachments; bool blendConstantsEnabled; // Blend constants enabled for any attachments - // Store RPCI b/c renderPass may be destroyed after Pipeline creation - safe_VkRenderPassCreateInfo render_pass_ci; PIPELINE_LAYOUT_NODE pipeline_layout; // Default constructor @@ -575,11 +581,26 @@ class PIPELINE_STATE : public BASE_NODE { vertexBindingDescriptions(), attachments(), blendConstantsEnabled(false), - render_pass_ci(), pipeline_layout() {} void initGraphicsPipeline(const VkGraphicsPipelineCreateInfo *pCreateInfo, std::shared_ptr &&rpstate) { - graphicsPipelineCI.initialize(pCreateInfo); + bool uses_color_attachment = false; + bool uses_depthstencil_attachment = false; + if (pCreateInfo->subpass < rpstate->createInfo.subpassCount) { + const auto &subpass = rpstate->createInfo.pSubpasses[pCreateInfo->subpass]; + + for (uint32_t i = 0; i < subpass.colorAttachmentCount; ++i) { + if (subpass.pColorAttachments[i].attachment != VK_ATTACHMENT_UNUSED) { + uses_color_attachment = true; + break; + } + } + + if (subpass.pDepthStencilAttachment && subpass.pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) { + uses_depthstencil_attachment = true; + } + } + graphicsPipelineCI.initialize(pCreateInfo, uses_color_attachment, uses_depthstencil_attachment); // Make sure compute pipeline is null VkComputePipelineCreateInfo emptyComputeCI = {}; computePipelineCI.initialize(&emptyComputeCI); @@ -588,15 +609,15 @@ class PIPELINE_STATE : public BASE_NODE { this->duplicate_shaders |= this->active_shaders & pPSSCI->stage; this->active_shaders |= pPSSCI->stage; } - if (pCreateInfo->pVertexInputState) { - const VkPipelineVertexInputStateCreateInfo *pVICI = pCreateInfo->pVertexInputState; + if (graphicsPipelineCI.pVertexInputState) { + const auto pVICI = graphicsPipelineCI.pVertexInputState; if (pVICI->vertexBindingDescriptionCount) { this->vertexBindingDescriptions = std::vector( pVICI->pVertexBindingDescriptions, pVICI->pVertexBindingDescriptions + pVICI->vertexBindingDescriptionCount); } } - if (pCreateInfo->pColorBlendState) { - const VkPipelineColorBlendStateCreateInfo *pCBCI = pCreateInfo->pColorBlendState; + if (graphicsPipelineCI.pColorBlendState) { + const auto pCBCI = graphicsPipelineCI.pColorBlendState; if (pCBCI->attachmentCount) { this->attachments = std::vector(pCBCI->pAttachments, pCBCI->pAttachments + pCBCI->attachmentCount); @@ -609,7 +630,7 @@ class PIPELINE_STATE : public BASE_NODE { computePipelineCI.initialize(pCreateInfo); // Make sure gfx pipeline is null VkGraphicsPipelineCreateInfo emptyGraphicsCI = {}; - graphicsPipelineCI.initialize(&emptyGraphicsCI); + graphicsPipelineCI.initialize(&emptyGraphicsCI, false, false); switch (computePipelineCI.stage.stage) { case VK_SHADER_STAGE_COMPUTE_BIT: this->active_shaders |= VK_SHADER_STAGE_COMPUTE_BIT; @@ -628,7 +649,7 @@ struct LAST_BOUND_STATE { // Track each set that has been bound // Ordered bound set tracking where index is set# that given set is bound to std::vector boundDescriptorSets; - std::vector> push_descriptors; + std::unique_ptr push_descriptor_set; // one dynamic offset per dynamic descriptor bound to this CB std::vector> dynamicOffsets; @@ -636,7 +657,7 @@ struct LAST_BOUND_STATE { pipeline_state = nullptr; pipeline_layout.reset(); boundDescriptorSets.clear(); - push_descriptors.clear(); + push_descriptor_set = nullptr; dynamicOffsets.clear(); } }; @@ -646,13 +667,15 @@ struct GLOBAL_CB_NODE : public BASE_NODE { VkCommandBufferAllocateInfo createInfo = {}; VkCommandBufferBeginInfo beginInfo; VkCommandBufferInheritanceInfo inheritanceInfo; - VkDevice device; // device this CB belongs to + VkDevice device; // device this CB belongs to bool hasDrawCmd; - CB_STATE state; // Track cmd buffer update state - uint64_t submitCount; // Number of times CB has been submitted - CBStatusFlags status; // Track status of various bindings on cmd buffer - CBStatusFlags static_status; // All state bits provided by current graphics pipeline - // rather than dynamic state + CB_STATE state; // Track cmd buffer update state + uint64_t submitCount; // Number of times CB has been submitted + typedef uint64_t ImageLayoutUpdateCount; + ImageLayoutUpdateCount image_layout_change_count; // The sequence number for changes to image layout (for cached validation) + CBStatusFlags status; // Track status of various bindings on cmd buffer + CBStatusFlags static_status; // All state bits provided by current graphics pipeline + // rather than dynamic state // Currently storing "lastBound" objects on per-CB basis // long-term may want to create caches of "lastBound" states and could have // each individual CMD_NODE referencing its own "lastBound" state @@ -698,6 +721,7 @@ struct GLOBAL_CB_NODE : public BASE_NODE { std::unordered_set memObjs; std::vector> eventUpdates; std::vector> queryUpdates; + std::unordered_set validated_descriptor_sets; }; struct SEMAPHORE_WAIT { @@ -708,12 +732,18 @@ struct SEMAPHORE_WAIT { struct CB_SUBMISSION { CB_SUBMISSION(std::vector const &cbs, std::vector const &waitSemaphores, - std::vector const &signalSemaphores, VkFence fence) - : cbs(cbs), waitSemaphores(waitSemaphores), signalSemaphores(signalSemaphores), fence(fence) {} + std::vector const &signalSemaphores, std::vector const &externalSemaphores, + VkFence fence) + : cbs(cbs), + waitSemaphores(waitSemaphores), + signalSemaphores(signalSemaphores), + externalSemaphores(externalSemaphores), + fence(fence) {} std::vector cbs; std::vector waitSemaphores; std::vector signalSemaphores; + std::vector externalSemaphores; VkFence fence; }; @@ -755,7 +785,7 @@ struct CHECK_DISABLED { bool destroy_query_pool; bool get_query_pool_results; bool destroy_buffer; - bool shader_validation; // Skip validation for shaders + bool shader_validation; // Skip validation for shaders void SetAll(bool value) { std::fill(&command_buffer_state, &shader_validation + 1, value); } }; @@ -766,7 +796,7 @@ struct MT_FB_ATTACHMENT_INFO { }; class FRAMEBUFFER_STATE : public BASE_NODE { -public: + public: VkFramebuffer framebuffer; safe_VkFramebufferCreateInfo createInfo; std::shared_ptr rp_state; @@ -818,7 +848,8 @@ bool ClearMemoryObjectBindings(layer_data *dev_data, uint64_t handle, VulkanObje bool ValidateCmdQueueFlags(layer_data *dev_data, const GLOBAL_CB_NODE *cb_node, const char *caller_name, VkQueueFlags flags, UNIQUE_VALIDATION_ERROR_CODE error_code); bool ValidateCmd(layer_data *my_data, const GLOBAL_CB_NODE *pCB, const CMD_TYPE cmd, const char *caller_name); -bool insideRenderPass(const layer_data *my_data, const GLOBAL_CB_NODE *pCB, const char *apiName, UNIQUE_VALIDATION_ERROR_CODE msgCode); +bool insideRenderPass(const layer_data *my_data, const GLOBAL_CB_NODE *pCB, const char *apiName, + UNIQUE_VALIDATION_ERROR_CODE msgCode); void SetImageMemoryValid(layer_data *dev_data, IMAGE_STATE *image_state, bool valid); bool outsideRenderPass(const layer_data *my_data, GLOBAL_CB_NODE *pCB, const char *apiName, UNIQUE_VALIDATION_ERROR_CODE msgCode); void SetLayout(GLOBAL_CB_NODE *pCB, ImageSubresourcePair imgpair, const IMAGE_CMD_BUF_LAYOUT_NODE &node); @@ -830,14 +861,12 @@ bool rangesIntersect(layer_data const *dev_data, MEMORY_RANGE const *range1, VkD bool ValidateBufferMemoryIsValid(layer_data *dev_data, BUFFER_STATE *buffer_state, const char *functionName); void SetBufferMemoryValid(layer_data *dev_data, BUFFER_STATE *buffer_state, bool valid); bool ValidateCmdSubpassState(const layer_data *dev_data, const GLOBAL_CB_NODE *pCB, const CMD_TYPE cmd_type); - - +bool ValidateCmd(layer_data *dev_data, const GLOBAL_CB_NODE *cb_state, const CMD_TYPE cmd, const char *caller_name); // Prototypes for layer_data accessor functions. These should be in their own header file at some point VkFormatProperties GetFormatProperties(core_validation::layer_data *device_data, VkFormat format); -VkImageFormatProperties GetImageFormatProperties(core_validation::layer_data *device_data, VkFormat format, - VkImageType image_type, VkImageTiling tiling, VkImageUsageFlags usage, - VkImageCreateFlags flags); +VkResult GetImageFormatProperties(core_validation::layer_data *device_data, const VkImageCreateInfo *image_ci, + VkImageFormatProperties *image_format_properties); const debug_report_data *GetReportData(const layer_data *); const VkPhysicalDeviceProperties *GetPhysicalDeviceProperties(layer_data *); const CHECK_DISABLED *GetDisables(layer_data *); @@ -849,6 +878,6 @@ std::unordered_map> *GetBufferMap(layer_ std::unordered_map> *GetBufferViewMap(layer_data *device_data); std::unordered_map> *GetImageViewMap(layer_data *device_data); const DeviceExtensions *GetDeviceExtensions(const layer_data *); -} +} // namespace core_validation #endif // CORE_VALIDATION_TYPES_H_ diff --git a/sources/third_party/vulkan/src/layers/descriptor_sets.cpp b/sources/third_party/vulkan/src/layers/descriptor_sets.cpp index 5c8981e5309df896e0340803c8dfec17efad1184..9294dde9869093884db1fd58b76b0fd4ad188036 100644 --- a/sources/third_party/vulkan/src/layers/descriptor_sets.cpp +++ b/sources/third_party/vulkan/src/layers/descriptor_sets.cpp @@ -16,6 +16,7 @@ * limitations under the License. * * Author: Tobin Ehlis + * John Zulauf */ // Allow use of STL min and max functions in Windows @@ -28,59 +29,77 @@ #include #include +struct BindingNumCmp { + bool operator()(const VkDescriptorSetLayoutBinding *a, const VkDescriptorSetLayoutBinding *b) const { + return a->binding < b->binding; + } +}; + // Construct DescriptorSetLayout instance from given create info +// Proactively reserve and resize as possible, as the reallocation was visible in profiling cvdescriptorset::DescriptorSetLayout::DescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo *p_create_info, const VkDescriptorSetLayout layout) : layout_(layout), + layout_destroyed_(false), flags_(p_create_info->flags), - binding_count_(p_create_info->bindingCount), + binding_count_(0), descriptor_count_(0), dynamic_descriptor_count_(0) { - // Dyn array indicies are ordered by binding # and array index of any array within the binding - // so we store up bindings w/ count in ordered map in order to create dyn array mappings below + binding_type_stats_ = {0, 0, 0}; + std::set sorted_bindings; + const uint32_t input_bindings_count = p_create_info->bindingCount; + // Sort the input bindings in binding number order, eliminating duplicates + for (uint32_t i = 0; i < input_bindings_count; i++) { + sorted_bindings.insert(p_create_info->pBindings + i); + } + + // Store the create info in the sorted order from above std::map binding_to_dyn_count; - for (uint32_t i = 0; i < binding_count_; ++i) { - auto binding_num = p_create_info->pBindings[i].binding; - descriptor_count_ += p_create_info->pBindings[i].descriptorCount; - uint32_t insert_index = 0; // Track vector index where we insert element - if (bindings_.empty() || binding_num > bindings_.back().binding) { - bindings_.push_back(safe_VkDescriptorSetLayoutBinding(&p_create_info->pBindings[i])); - insert_index = static_cast(bindings_.size()) - 1; - } else { // out-of-order binding number, need to insert into vector in-order - auto it = bindings_.begin(); - // Find currently binding's spot in vector - while (binding_num > it->binding) { - assert(it != bindings_.end()); - ++insert_index; - ++it; - } - bindings_.insert(it, safe_VkDescriptorSetLayoutBinding(&p_create_info->pBindings[i])); - } - // In cases where we should ignore pImmutableSamplers make sure it's NULL - if ((p_create_info->pBindings[i].pImmutableSamplers) && - ((p_create_info->pBindings[i].descriptorType != VK_DESCRIPTOR_TYPE_SAMPLER) && - (p_create_info->pBindings[i].descriptorType != VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER))) { - bindings_[insert_index].pImmutableSamplers = nullptr; + uint32_t index = 0; + binding_count_ = static_cast(sorted_bindings.size()); + bindings_.reserve(binding_count_); + binding_to_index_map_.reserve(binding_count_); + for (auto input_binding : sorted_bindings) { + // Add to binding and map, s.t. it is robust to invalid duplication of binding_num + const auto binding_num = input_binding->binding; + binding_to_index_map_[binding_num] = index++; + bindings_.emplace_back(input_binding); + auto &binding_info = bindings_.back(); + + descriptor_count_ += binding_info.descriptorCount; + if (binding_info.descriptorCount > 0) { + non_empty_bindings_.insert(binding_num); } - if (p_create_info->pBindings[i].descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || - p_create_info->pBindings[i].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) { - binding_to_dyn_count[p_create_info->pBindings[i].binding] = p_create_info->pBindings[i].descriptorCount; - dynamic_descriptor_count_ += p_create_info->pBindings[i].descriptorCount; + + if (binding_info.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || + binding_info.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) { + binding_to_dyn_count[binding_num] = binding_info.descriptorCount; + dynamic_descriptor_count_ += binding_info.descriptorCount; + binding_type_stats_.dynamic_buffer_count++; + } else if ((binding_info.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || + (binding_info.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)) { + binding_type_stats_.non_dynamic_buffer_count++; + } else { + binding_type_stats_.image_sampler_count++; } } assert(bindings_.size() == binding_count_); uint32_t global_index = 0; - // Vector order is finalized so create maps of bindings to indices + binding_to_global_index_range_map_.reserve(binding_count_); + // Vector order is finalized so create maps of bindings to descriptors and descriptors to indices for (uint32_t i = 0; i < binding_count_; ++i) { auto binding_num = bindings_[i].binding; - binding_to_index_map_[binding_num] = i; - binding_to_global_start_index_map_[binding_num] = global_index; - global_index += bindings_[i].descriptorCount ? bindings_[i].descriptorCount - 1 : 0; - binding_to_global_end_index_map_[binding_num] = global_index; - global_index += bindings_[i].descriptorCount ? 1 : 0; + auto final_index = global_index + bindings_[i].descriptorCount; + binding_to_global_index_range_map_[binding_num] = IndexRange(global_index, final_index); + if (final_index != global_index) { + global_start_to_index_map_[global_index] = i; + } + global_index = final_index; } + // Now create dyn offset array mapping for any dynamic descriptors uint32_t dyn_array_idx = 0; + binding_to_dynamic_array_idx_map_.reserve(binding_to_dyn_count.size()); for (const auto &bc_pair : binding_to_dyn_count) { binding_to_dynamic_array_idx_map_[bc_pair.first] = dyn_array_idx; dyn_array_idx += bc_pair.second; @@ -88,110 +107,120 @@ cvdescriptorset::DescriptorSetLayout::DescriptorSetLayout(const VkDescriptorSetL } // Validate descriptor set layout create info -bool cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(debug_report_data *report_data, - const VkDescriptorSetLayoutCreateInfo *create_info) { +bool cvdescriptorset::DescriptorSetLayout::ValidateCreateInfo(const debug_report_data *report_data, + const VkDescriptorSetLayoutCreateInfo *create_info, + const bool push_descriptor_ext, const uint32_t max_push_descriptors) { bool skip = false; std::unordered_set bindings; + uint64_t total_descriptors = 0; + + const bool push_descriptor_set = create_info->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; + if (push_descriptor_set && !push_descriptor_ext) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + DRAWSTATE_EXTENSION_NOT_ENABLED, "DS", + "Attemped to use %s in %s but its required extension %s has not been enabled.\n", + "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR", "VkDescriptorSetLayoutCreateInfo::flags", + VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } + + auto valid_type = [push_descriptor_set](const VkDescriptorType type) { + return !push_descriptor_set || + ((type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) && (type != VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)); + }; + for (uint32_t i = 0; i < create_info->bindingCount; ++i) { - if (!bindings.insert(create_info->pBindings[i].binding).second) { + const auto &binding_info = create_info->pBindings[i]; + if (!bindings.insert(binding_info.binding).second) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_0500022e, "DS", "duplicated binding number in VkDescriptorSetLayoutBinding. %s", validation_error_map[VALIDATION_ERROR_0500022e]); } + if (!valid_type(binding_info.descriptorType)) { + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_05000230, "DS", + "invalid type %s ,for push descriptors in VkDescriptorSetLayoutBinding entry %" PRIu32 ". %s", + string_VkDescriptorType(binding_info.descriptorType), i, validation_error_map[VALIDATION_ERROR_05000230]); + } + total_descriptors += binding_info.descriptorCount; + } + + if ((push_descriptor_set) && (total_descriptors > max_push_descriptors)) { + const char *undefined = push_descriptor_ext ? "" : " -- undefined"; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_05000232, "DS", + "for push descriptor, total descriptor count in layout (%" PRIu64 + ") must not be greater than VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors (%" PRIu32 + "%s). %s", + total_descriptors, max_push_descriptors, undefined, validation_error_map[VALIDATION_ERROR_05000232]); } - return skip; -} -// put all bindings into the given set -void cvdescriptorset::DescriptorSetLayout::FillBindingSet(std::unordered_set *binding_set) const { - for (auto binding_index_pair : binding_to_index_map_) binding_set->insert(binding_index_pair.first); + return skip; } -VkDescriptorSetLayoutBinding const *cvdescriptorset::DescriptorSetLayout::GetDescriptorSetLayoutBindingPtrFromBinding( - const uint32_t binding) const { +// Return valid index or "end" i.e. binding_count_; +// The asserts in "Get" are reduced to the set where no valid answer(like null or 0) could be given +// Common code for all binding lookups. +uint32_t cvdescriptorset::DescriptorSetLayout::GetIndexFromBinding(uint32_t binding) const { const auto &bi_itr = binding_to_index_map_.find(binding); - if (bi_itr != binding_to_index_map_.end()) { - return bindings_[bi_itr->second].ptr(); - } - return nullptr; + if (bi_itr != binding_to_index_map_.cend()) return bi_itr->second; + return GetBindingCount(); } VkDescriptorSetLayoutBinding const *cvdescriptorset::DescriptorSetLayout::GetDescriptorSetLayoutBindingPtrFromIndex( const uint32_t index) const { if (index >= bindings_.size()) return nullptr; return bindings_[index].ptr(); } -// Return descriptorCount for given binding, 0 if index is unavailable -uint32_t cvdescriptorset::DescriptorSetLayout::GetDescriptorCountFromBinding(const uint32_t binding) const { - const auto &bi_itr = binding_to_index_map_.find(binding); - if (bi_itr != binding_to_index_map_.end()) { - return bindings_[bi_itr->second].descriptorCount; - } - return 0; -} // Return descriptorCount for given index, 0 if index is unavailable uint32_t cvdescriptorset::DescriptorSetLayout::GetDescriptorCountFromIndex(const uint32_t index) const { if (index >= bindings_.size()) return 0; return bindings_[index].descriptorCount; } -// For the given binding, return descriptorType -VkDescriptorType cvdescriptorset::DescriptorSetLayout::GetTypeFromBinding(const uint32_t binding) const { - assert(binding_to_index_map_.count(binding)); - const auto &bi_itr = binding_to_index_map_.find(binding); - if (bi_itr != binding_to_index_map_.end()) { - return bindings_[bi_itr->second].descriptorType; - } - return VK_DESCRIPTOR_TYPE_MAX_ENUM; -} // For the given index, return descriptorType VkDescriptorType cvdescriptorset::DescriptorSetLayout::GetTypeFromIndex(const uint32_t index) const { assert(index < bindings_.size()); - return bindings_[index].descriptorType; -} -// For the given global index, return descriptorType -// Currently just counting up through bindings_, may improve this in future -VkDescriptorType cvdescriptorset::DescriptorSetLayout::GetTypeFromGlobalIndex(const uint32_t index) const { - uint32_t global_offset = 0; - for (auto binding : bindings_) { - global_offset += binding.descriptorCount; - if (index < global_offset) return binding.descriptorType; - } - assert(0); // requested global index is out of bounds + if (index < bindings_.size()) return bindings_[index].descriptorType; return VK_DESCRIPTOR_TYPE_MAX_ENUM; } -// For the given binding, return stageFlags -VkShaderStageFlags cvdescriptorset::DescriptorSetLayout::GetStageFlagsFromBinding(const uint32_t binding) const { - assert(binding_to_index_map_.count(binding)); - const auto &bi_itr = binding_to_index_map_.find(binding); - if (bi_itr != binding_to_index_map_.end()) { - return bindings_[bi_itr->second].stageFlags; - } +// For the given index, return stageFlags +VkShaderStageFlags cvdescriptorset::DescriptorSetLayout::GetStageFlagsFromIndex(const uint32_t index) const { + assert(index < bindings_.size()); + if (index < bindings_.size()) return bindings_[index].stageFlags; return VkShaderStageFlags(0); } -// For the given binding, return start index -uint32_t cvdescriptorset::DescriptorSetLayout::GetGlobalStartIndexFromBinding(const uint32_t binding) const { - assert(binding_to_global_start_index_map_.count(binding)); - const auto &btgsi_itr = binding_to_global_start_index_map_.find(binding); - if (btgsi_itr != binding_to_global_start_index_map_.end()) { - return btgsi_itr->second; - } - // In error case max uint32_t so index is out of bounds to break ASAP - assert(0); - return 0xFFFFFFFF; + +// For the given global index, return index +uint32_t cvdescriptorset::DescriptorSetLayout::GetIndexFromGlobalIndex(const uint32_t global_index) const { + auto start_it = global_start_to_index_map_.upper_bound(global_index); + uint32_t index = binding_count_; + assert(start_it != global_start_to_index_map_.cbegin()); + if (start_it != global_start_to_index_map_.cbegin()) { + --start_it; + index = start_it->second; +#ifndef NDEBUG + const auto &range = GetGlobalIndexRangeFromBinding(bindings_[index].binding); + assert(range.start <= global_index && global_index < range.end); +#endif + } + return index; } -// For the given binding, return end index -uint32_t cvdescriptorset::DescriptorSetLayout::GetGlobalEndIndexFromBinding(const uint32_t binding) const { - assert(binding_to_global_end_index_map_.count(binding)); - const auto &btgei_itr = binding_to_global_end_index_map_.find(binding); - if (btgei_itr != binding_to_global_end_index_map_.end()) { - return btgei_itr->second; - } + +// For the given binding, return the global index range +// As start and end are often needed in pairs, get both with a single hash lookup. +const cvdescriptorset::IndexRange &cvdescriptorset::DescriptorSetLayout::GetGlobalIndexRangeFromBinding( + const uint32_t binding) const { + assert(binding_to_global_index_range_map_.count(binding)); // In error case max uint32_t so index is out of bounds to break ASAP - assert(0); - return 0xFFFFFFFF; + const static IndexRange kInvalidRange = {0xFFFFFFFF, 0xFFFFFFFF}; + const auto &range_it = binding_to_global_index_range_map_.find(binding); + if (range_it != binding_to_global_index_range_map_.end()) { + return range_it->second; + } + return kInvalidRange; } + // For given binding, return ptr to ImmutableSampler array VkSampler const *cvdescriptorset::DescriptorSetLayout::GetImmutableSamplerPtrFromBinding(const uint32_t binding) const { - assert(binding_to_index_map_.count(binding)); const auto &bi_itr = binding_to_index_map_.find(binding); if (bi_itr != binding_to_index_map_.end()) { return bindings_[bi_itr->second].pImmutableSamplers; @@ -200,16 +229,17 @@ VkSampler const *cvdescriptorset::DescriptorSetLayout::GetImmutableSamplerPtrFro } // Move to next valid binding having a non-zero binding count uint32_t cvdescriptorset::DescriptorSetLayout::GetNextValidBinding(const uint32_t binding) const { - uint32_t new_binding = binding; - do { - new_binding++; - } while (GetDescriptorCountFromBinding(new_binding) == 0); - return new_binding; + auto it = non_empty_bindings_.upper_bound(binding); + assert(it != non_empty_bindings_.cend()); + if (it != non_empty_bindings_.cend()) return *it; + return GetMaxBinding() + 1; } // For given index, return ptr to ImmutableSampler array VkSampler const *cvdescriptorset::DescriptorSetLayout::GetImmutableSamplerPtrFromIndex(const uint32_t index) const { - assert(index < bindings_.size()); - return bindings_[index].pImmutableSamplers; + if (index < bindings_.size()) { + return bindings_[index].pImmutableSamplers; + } + return nullptr; } // If our layout is compatible with rh_ds_layout, return true, // else return false and fill in error_msg will description of what causes incompatibility @@ -303,8 +333,9 @@ bool cvdescriptorset::DescriptorSetLayout::VerifyUpdateConsistency(uint32_t curr if (!IsNextBindingConsistent(current_binding++)) { std::stringstream error_str; error_str << "Attempting " << type << " descriptor set " << set << " binding #" << orig_binding << " with #" - << update_count << " descriptors being updated but this update oversteps the bounds of this binding and the " - "next binding is not consistent with current binding so this update is invalid."; + << update_count + << " descriptors being updated but this update oversteps the bounds of this binding and the next binding is " + "not consistent with current binding so this update is invalid."; *error_msg = error_str.str(); return false; } @@ -319,7 +350,7 @@ cvdescriptorset::AllocateDescriptorSetsData::AllocateDescriptorSetsData(uint32_t : required_descriptors_by_type{}, layout_nodes(count, nullptr) {} cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const VkDescriptorPool pool, - const std::shared_ptr &layout, const layer_data *dev_data) + const std::shared_ptr &layout, layer_data *dev_data) : some_update_(false), set_(set), pool_state_(nullptr), @@ -328,6 +359,7 @@ cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const V limits_(GetPhysDevProperties(dev_data)->properties.limits) { pool_state_ = GetDescriptorPoolState(dev_data, pool); // Foreach binding, create default descriptors of given type + descriptors_.reserve(p_layout_->GetTotalDescriptorCount()); for (uint32_t i = 0; i < p_layout_->GetBindingCount(); ++i) { auto type = p_layout_->GetTypeFromIndex(i); switch (type) { @@ -405,7 +437,7 @@ bool cvdescriptorset::DescriptorSet::IsCompatible(DescriptorSetLayout const *con // that any update buffers are valid, and that any dynamic offsets are within the bounds of their buffers. // Return true if state is acceptable, or false and write an error message into error string bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::map &bindings, - const std::vector &dynamic_offsets, const GLOBAL_CB_NODE *cb_node, + const std::vector &dynamic_offsets, GLOBAL_CB_NODE *cb_node, const char *caller, std::string *error) const { for (auto binding_pair : bindings) { auto binding = binding_pair.first; @@ -416,10 +448,9 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapGetGlobalStartIndexFromBinding(binding); - auto end_idx = p_layout_->GetGlobalEndIndexFromBinding(binding); + IndexRange index_range = p_layout_->GetGlobalIndexRangeFromBinding(binding); auto array_idx = 0; // Track array idx if we're dealing with array descriptors - for (uint32_t i = start_idx; i <= end_idx; ++i, ++array_idx) { + for (uint32_t i = index_range.start; i < index_range.end; ++i, ++array_idx) { if (!descriptors_[i]->updated) { std::stringstream error_str; error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i @@ -438,7 +469,7 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapsparse) { for (auto mem_binding : buffer_node->GetBoundMemory()) { if (!GetMemObjInfo(device_data_, mem_binding)) { std::stringstream error_str; @@ -448,6 +479,13 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::map function = [device_data_copy, caller, buffer_node]() { + return core_validation::ValidateBufferMemoryIsValid(device_data_copy, buffer_node, caller); + }; + cb_node->queue_submit_functions.push_back(function); } if (descriptors_[i]->IsDynamic()) { // Validate that dynamic offsets are within the buffer @@ -527,8 +565,8 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapHasBinding(binding)) { continue; } - auto start_idx = p_layout_->GetGlobalStartIndexFromBinding(binding); + uint32_t start_idx = p_layout_->GetGlobalIndexRangeFromBinding(binding).start; if (descriptors_[start_idx]->IsStorage()) { if (Image == descriptors_[start_idx]->descriptor_class) { for (uint32_t i = 0; i < p_layout_->GetDescriptorCountFromBinding(binding); ++i) { @@ -611,7 +649,7 @@ void cvdescriptorset::DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorS uint32_t update_index = 0; while (descriptors_remaining) { uint32_t update_count = std::min(descriptors_remaining, GetDescriptorCountFromBinding(binding_being_updated)); - auto global_idx = p_layout_->GetGlobalStartIndexFromBinding(binding_being_updated) + offset; + auto global_idx = p_layout_->GetGlobalIndexRangeFromBinding(binding_being_updated).start + offset; // Loop over the updates for a single binding at a time for (uint32_t di = 0; di < update_count; ++di, ++update_index) { descriptors_[global_idx + di]->WriteUpdate(update, update_index); @@ -629,6 +667,27 @@ void cvdescriptorset::DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorS bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data *report_data, const VkCopyDescriptorSet *update, const DescriptorSet *src_set, UNIQUE_VALIDATION_ERROR_CODE *error_code, std::string *error_msg) { + // Verify dst layout still valid + if (p_layout_->IsDestroyed()) { + *error_code = VALIDATION_ERROR_03207601; + string_sprintf(error_msg, + "Cannot call vkUpdateDescriptorSets() to perform copy update on descriptor set dstSet 0x%" PRIxLEAST64 + " created with destroyed VkDescriptorSetLayout 0x%" PRIxLEAST64, + HandleToUint64(set_), HandleToUint64(p_layout_->GetDescriptorSetLayout())); + return false; + } + + // Verify src layout still valid + if (src_set->p_layout_->IsDestroyed()) { + *error_code = VALIDATION_ERROR_0322d201; + string_sprintf( + error_msg, + "Cannot call vkUpdateDescriptorSets() to perform copy update of dstSet 0x%" PRIxLEAST64 + " from descriptor set srcSet 0x%" PRIxLEAST64 " created with destroyed VkDescriptorSetLayout 0x%" PRIxLEAST64, + HandleToUint64(set_), HandleToUint64(src_set->set_), HandleToUint64(src_set->p_layout_->GetDescriptorSetLayout())); + return false; + } + // Verify idle ds if (in_use.load()) { // TODO : Re-using Free Idle error code, need copy update idle error code @@ -655,25 +714,25 @@ bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data } // src & dst set bindings are valid // Check bounds of src & dst - auto src_start_idx = src_set->GetGlobalStartIndexFromBinding(update->srcBinding) + update->srcArrayElement; + auto src_start_idx = src_set->GetGlobalIndexRangeFromBinding(update->srcBinding).start + update->srcArrayElement; if ((src_start_idx + update->descriptorCount) > src_set->GetTotalDescriptorCount()) { // SRC update out of bounds *error_code = VALIDATION_ERROR_032002b4; std::stringstream error_str; error_str << "Attempting copy update from descriptorSet " << update->srcSet << " binding#" << update->srcBinding - << " with offset index of " << src_set->GetGlobalStartIndexFromBinding(update->srcBinding) + << " with offset index of " << src_set->GetGlobalIndexRangeFromBinding(update->srcBinding).start << " plus update array offset of " << update->srcArrayElement << " and update of " << update->descriptorCount << " descriptors oversteps total number of descriptors in set: " << src_set->GetTotalDescriptorCount(); *error_msg = error_str.str(); return false; } - auto dst_start_idx = p_layout_->GetGlobalStartIndexFromBinding(update->dstBinding) + update->dstArrayElement; + auto dst_start_idx = p_layout_->GetGlobalIndexRangeFromBinding(update->dstBinding).start + update->dstArrayElement; if ((dst_start_idx + update->descriptorCount) > p_layout_->GetTotalDescriptorCount()) { // DST update out of bounds *error_code = VALIDATION_ERROR_032002b8; std::stringstream error_str; error_str << "Attempting copy update to descriptorSet " << set_ << " binding#" << update->dstBinding - << " with offset index of " << p_layout_->GetGlobalStartIndexFromBinding(update->dstBinding) + << " with offset index of " << p_layout_->GetGlobalIndexRangeFromBinding(update->dstBinding).start << " plus update array offset of " << update->dstArrayElement << " and update of " << update->descriptorCount << " descriptors oversteps total number of descriptors in set: " << p_layout_->GetTotalDescriptorCount(); *error_msg = error_str.str(); @@ -700,16 +759,6 @@ bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data set_, error_msg))) { return false; } - // First make sure source descriptors are updated - for (uint32_t i = 0; i < update->descriptorCount; ++i) { - if (!src_set->descriptors_[src_start_idx + i]->updated) { - std::stringstream error_str; - error_str << "Attempting copy update from descriptorSet " << src_set << " binding #" << update->srcBinding - << " but descriptor at array offset " << update->srcArrayElement + i << " has not been updated"; - *error_msg = error_str.str(); - return false; - } - } // Update parameters all look good and descriptor updated so verify update contents if (!VerifyCopyUpdateContents(update, src_set, src_type, src_start_idx, error_code, error_msg)) return false; @@ -718,13 +767,19 @@ bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data } // Perform Copy update void cvdescriptorset::DescriptorSet::PerformCopyUpdate(const VkCopyDescriptorSet *update, const DescriptorSet *src_set) { - auto src_start_idx = src_set->GetGlobalStartIndexFromBinding(update->srcBinding) + update->srcArrayElement; - auto dst_start_idx = p_layout_->GetGlobalStartIndexFromBinding(update->dstBinding) + update->dstArrayElement; + auto src_start_idx = src_set->GetGlobalIndexRangeFromBinding(update->srcBinding).start + update->srcArrayElement; + auto dst_start_idx = p_layout_->GetGlobalIndexRangeFromBinding(update->dstBinding).start + update->dstArrayElement; // Update parameters all look good so perform update for (uint32_t di = 0; di < update->descriptorCount; ++di) { - descriptors_[dst_start_idx + di]->CopyUpdate(src_set->descriptors_[src_start_idx + di].get()); + auto src = src_set->descriptors_[src_start_idx + di].get(); + auto dst = descriptors_[dst_start_idx + di].get(); + if (src->updated) { + dst->CopyUpdate(src); + some_update_ = true; + } else { + dst->updated = false; + } } - if (update->descriptorCount) some_update_ = true; InvalidateBoundCmdBuffers(); } @@ -744,13 +799,78 @@ void cvdescriptorset::DescriptorSet::BindCommandBuffer(GLOBAL_CB_NODE *cb_node, // resources for (auto binding_req_pair : binding_req_map) { auto binding = binding_req_pair.first; - auto start_idx = p_layout_->GetGlobalStartIndexFromBinding(binding); - auto end_idx = p_layout_->GetGlobalEndIndexFromBinding(binding); - for (uint32_t i = start_idx; i <= end_idx; ++i) { + auto range = p_layout_->GetGlobalIndexRangeFromBinding(binding); + for (uint32_t i = range.start; i < range.end; ++i) { descriptors_[i]->BindCommandBuffer(device_data_, cb_node); } } } +void cvdescriptorset::DescriptorSet::FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, + const BindingReqMap &in_req, BindingReqMap *out_req, + TrackedBindings *bindings) { + assert(out_req); + assert(bindings); + const auto binding = binding_req_pair.first; + // Use insert and look at the boolean ("was inserted") in the returned pair to see if this is a new set member. + // Saves one hash lookup vs. find ... compare w/ end ... insert. + const auto it_bool_pair = bindings->insert(binding); + if (it_bool_pair.second) { + out_req->emplace(binding_req_pair); + } +} +void cvdescriptorset::DescriptorSet::FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, + const BindingReqMap &in_req, BindingReqMap *out_req, + TrackedBindings *bindings, uint32_t limit) { + if (bindings->size() < limit) FilterAndTrackOneBindingReq(binding_req_pair, in_req, out_req, bindings); +} + +void cvdescriptorset::DescriptorSet::FilterAndTrackBindingReqs(GLOBAL_CB_NODE *cb_state, const BindingReqMap &in_req, + BindingReqMap *out_req) { + TrackedBindings &bound = cached_validation_[cb_state].command_binding_and_usage; + if (bound.size() == GetBindingCount()) { + return; // All bindings are bound, out req is empty + } + for (const auto &binding_req_pair : in_req) { + const auto binding = binding_req_pair.first; + // If a binding doesn't exist, or has already been bound, skip it + if (p_layout_->HasBinding(binding)) { + FilterAndTrackOneBindingReq(binding_req_pair, in_req, out_req, &bound); + } + } +} + +void cvdescriptorset::DescriptorSet::FilterAndTrackBindingReqs(GLOBAL_CB_NODE *cb_state, PIPELINE_STATE *pipeline, + const BindingReqMap &in_req, BindingReqMap *out_req) { + auto &validated = cached_validation_[cb_state]; + auto &image_sample_val = validated.image_samplers[pipeline]; + auto *const dynamic_buffers = &validated.dynamic_buffers; + auto *const non_dynamic_buffers = &validated.non_dynamic_buffers; + const auto &stats = p_layout_->GetBindingTypeStats(); + for (const auto &binding_req_pair : in_req) { + auto binding = binding_req_pair.first; + VkDescriptorSetLayoutBinding const *layout_binding = p_layout_->GetDescriptorSetLayoutBindingPtrFromBinding(binding); + if (!layout_binding) { + continue; + } + // Caching criteria differs per type. + // If image_layout have changed , the image descriptors need to be validated against them. + if ((layout_binding->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || + (layout_binding->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) { + FilterAndTrackOneBindingReq(binding_req_pair, in_req, out_req, dynamic_buffers, stats.dynamic_buffer_count); + } else if ((layout_binding->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || + (layout_binding->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)) { + FilterAndTrackOneBindingReq(binding_req_pair, in_req, out_req, non_dynamic_buffers, stats.non_dynamic_buffer_count); + } else { + // This is rather crude, as the changed layouts may not impact the bound descriptors, + // but the simple "versioning" is a simple "dirt" test. + auto &version = image_sample_val[binding]; // Take advantage of default construtor zero initialzing new entries + if (version != cb_state->image_layout_change_count) { + version = cb_state->image_layout_change_count; + out_req->emplace(binding_req_pair); + } + } + } +} cvdescriptorset::SamplerDescriptor::SamplerDescriptor(const VkSampler *immut) : sampler_(VK_NULL_HANDLE), immutable_(false) { updated = false; @@ -823,8 +943,9 @@ bool cvdescriptorset::ValidateImageUpdate(VkImageView image_view, VkImageLayout // Only Color bit must be set if ((aspect_mask & VK_IMAGE_ASPECT_COLOR_BIT) != VK_IMAGE_ASPECT_COLOR_BIT) { std::stringstream error_str; - error_str << "ImageView (" << image_view << ") uses layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL but does " - "not have VK_IMAGE_ASPECT_COLOR_BIT set."; + error_str + << "ImageView (" << image_view + << ") uses layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL but does not have VK_IMAGE_ASPECT_COLOR_BIT set."; *error_msg = error_str.str(); return false; } @@ -909,23 +1030,22 @@ bool cvdescriptorset::ValidateImageUpdate(VkImageView image_view, VkImageLayout // TODO : Need to create custom enum error codes for these cases if (image_node->shared_presentable) { if (VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR != image_layout) { - error_str - << "ImageView (" << image_view - << ") of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE type with a front-buffered image is being updated with " - "layout " - << string_VkImageLayout(image_layout) - << " but according to spec section 13.1 Descriptor Types, 'Front-buffered images that report support " - "for " - "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT must be in the VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout.'"; + error_str << "ImageView (" << image_view + << ") of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE type with a front-buffered image is being updated with " + "layout " + << string_VkImageLayout(image_layout) + << " but according to spec section 13.1 Descriptor Types, 'Front-buffered images that report " + "support for VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT must be in the " + "VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout.'"; *error_msg = error_str.str(); return false; } } else if (VK_IMAGE_LAYOUT_GENERAL != image_layout) { - error_str - << "ImageView (" << image_view << ") of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE type is being updated with layout " - << string_VkImageLayout(image_layout) - << " but according to spec section 13.1 Descriptor Types, 'Load and store operations on storage images can " - "only be done on images in VK_IMAGE_LAYOUT_GENERAL layout.'"; + error_str << "ImageView (" << image_view + << ") of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE type is being updated with layout " + << string_VkImageLayout(image_layout) + << " but according to spec section 13.1 Descriptor Types, 'Load and store operations on storage " + "images can only be done on images in VK_IMAGE_LAYOUT_GENERAL layout.'"; *error_msg = error_str.str(); return false; } @@ -1020,7 +1140,7 @@ cvdescriptorset::ImageDescriptor::ImageDescriptor(const VkDescriptorType type) updated = false; descriptor_class = Image; if (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == type) storage_ = true; -}; +} void cvdescriptorset::ImageDescriptor::WriteUpdate(const VkWriteDescriptorSet *update, const uint32_t index) { updated = true; @@ -1083,7 +1203,7 @@ cvdescriptorset::TexelDescriptor::TexelDescriptor(const VkDescriptorType type) : updated = false; descriptor_class = TexelBuffer; if (VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == type) storage_ = true; -}; +} void cvdescriptorset::TexelDescriptor::WriteUpdate(const VkWriteDescriptorSet *update, const uint32_t index) { updated = true; @@ -1127,7 +1247,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo if (!set_node->ValidateWriteUpdate(report_data, &p_wds[i], &error_code, &error_str)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(dest_set), __LINE__, error_code, "DS", - "vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x%" PRIx64 + "vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x%" PRIx64 " with error: %s. %s", HandleToUint64(dest_set), error_str.c_str(), validation_error_map[error_code]); } @@ -1147,7 +1267,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo if (!dst_node->ValidateCopyUpdate(report_data, &p_cds[i], src_node, &error_code, &error_str)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, HandleToUint64(dst_set), __LINE__, error_code, "DS", - "vkUpdateDescriptorsSets() failed copy update from Descriptor Set 0x%" PRIx64 + "vkUpdateDescriptorSets() failed copy update from Descriptor Set 0x%" PRIx64 " to Descriptor Set 0x%" PRIx64 " with error: %s. %s", HandleToUint64(src_set), HandleToUint64(dst_set), error_str.c_str(), validation_error_map[error_code]); } @@ -1200,6 +1320,7 @@ void cvdescriptorset::PerformUpdateDescriptorSetsWithTemplateKHR(layer_data *dev auto binding_being_updated = create_info.pDescriptorUpdateEntries[i].dstBinding; auto dst_array_element = create_info.pDescriptorUpdateEntries[i].dstArrayElement; + desc_writes.reserve(desc_writes.size() + create_info.pDescriptorUpdateEntries[i].descriptorCount); for (uint32_t j = 0; j < create_info.pDescriptorUpdateEntries[i].descriptorCount; j++) { desc_writes.emplace_back(); auto &write_entry = desc_writes.back(); @@ -1253,6 +1374,15 @@ void cvdescriptorset::PerformUpdateDescriptorSetsWithTemplateKHR(layer_data *dev // If an error would occur for this update, return false and fill in details in error_msg string bool cvdescriptorset::DescriptorSet::ValidateWriteUpdate(const debug_report_data *report_data, const VkWriteDescriptorSet *update, UNIQUE_VALIDATION_ERROR_CODE *error_code, std::string *error_msg) { + // Verify dst layout still valid + if (p_layout_->IsDestroyed()) { + *error_code = VALIDATION_ERROR_15c00280; + string_sprintf(error_msg, + "Cannot call vkUpdateDescriptorSets() to perform write update on descriptor set 0x%" PRIxLEAST64 + " created with destroyed VkDescriptorSetLayout 0x%" PRIxLEAST64, + HandleToUint64(set_), HandleToUint64(p_layout_->GetDescriptorSetLayout())); + return false; + } // Verify idle ds if (in_use.load()) { // TODO : Re-using Free Idle error code, need write update idle error code @@ -1281,7 +1411,7 @@ bool cvdescriptorset::DescriptorSet::ValidateWriteUpdate(const debug_report_data } } // We know that binding is valid, verify update and do update on each descriptor - auto start_idx = p_layout_->GetGlobalStartIndexFromBinding(update->dstBinding) + update->dstArrayElement; + auto start_idx = p_layout_->GetGlobalIndexRangeFromBinding(update->dstBinding).start + update->dstArrayElement; auto type = p_layout_->GetTypeFromBinding(update->dstBinding); if (type != update->descriptorType) { *error_code = VALIDATION_ERROR_15c0027e; @@ -1559,8 +1689,10 @@ bool cvdescriptorset::DescriptorSet::VerifyCopyUpdateContents(const VkCopyDescri switch (src_set->descriptors_[index]->descriptor_class) { case PlainSampler: { for (uint32_t di = 0; di < update->descriptorCount; ++di) { - if (!src_set->descriptors_[index + di]->IsImmutableSampler()) { - auto update_sampler = static_cast(src_set->descriptors_[index + di].get())->GetSampler(); + const auto src_desc = src_set->descriptors_[index + di].get(); + if (!src_desc->updated) continue; + if (!src_desc->IsImmutableSampler()) { + auto update_sampler = static_cast(src_desc)->GetSampler(); if (!ValidateSampler(update_sampler, device_data_)) { *error_code = VALIDATION_ERROR_15c0028a; std::stringstream error_str; @@ -1576,7 +1708,9 @@ bool cvdescriptorset::DescriptorSet::VerifyCopyUpdateContents(const VkCopyDescri } case ImageSampler: { for (uint32_t di = 0; di < update->descriptorCount; ++di) { - auto img_samp_desc = static_cast(src_set->descriptors_[index + di].get()); + const auto src_desc = src_set->descriptors_[index + di].get(); + if (!src_desc->updated) continue; + auto img_samp_desc = static_cast(src_desc); // First validate sampler if (!img_samp_desc->IsImmutableSampler()) { auto update_sampler = img_samp_desc->GetSampler(); @@ -1604,7 +1738,9 @@ bool cvdescriptorset::DescriptorSet::VerifyCopyUpdateContents(const VkCopyDescri } case Image: { for (uint32_t di = 0; di < update->descriptorCount; ++di) { - auto img_desc = static_cast(src_set->descriptors_[index + di].get()); + const auto src_desc = src_set->descriptors_[index + di].get(); + if (!src_desc->updated) continue; + auto img_desc = static_cast(src_desc); auto image_view = img_desc->GetImageView(); auto image_layout = img_desc->GetImageLayout(); if (!ValidateImageUpdate(image_view, image_layout, type, device_data_, error_code, error_msg)) { @@ -1618,7 +1754,9 @@ bool cvdescriptorset::DescriptorSet::VerifyCopyUpdateContents(const VkCopyDescri } case TexelBuffer: { for (uint32_t di = 0; di < update->descriptorCount; ++di) { - auto buffer_view = static_cast(src_set->descriptors_[index + di].get())->GetBufferView(); + const auto src_desc = src_set->descriptors_[index + di].get(); + if (!src_desc->updated) continue; + auto buffer_view = static_cast(src_desc)->GetBufferView(); auto bv_state = GetBufferViewState(device_data_, buffer_view); if (!bv_state) { *error_code = VALIDATION_ERROR_15c00286; @@ -1639,7 +1777,9 @@ bool cvdescriptorset::DescriptorSet::VerifyCopyUpdateContents(const VkCopyDescri } case GeneralBuffer: { for (uint32_t di = 0; di < update->descriptorCount; ++di) { - auto buffer = static_cast(src_set->descriptors_[index + di].get())->GetBuffer(); + const auto src_desc = src_set->descriptors_[index + di].get(); + if (!src_desc->updated) continue; + auto buffer = static_cast(src_desc)->GetBuffer(); if (!ValidateBufferUsage(GetBufferState(device_data_, buffer), type, error_code, error_msg)) { std::stringstream error_str; error_str << "Attempted copy update to buffer descriptor failed due to: " << error_msg->c_str(); @@ -1672,7 +1812,7 @@ void cvdescriptorset::UpdateAllocateDescriptorSetsData(const layer_data *dev_dat } // Any unknown layouts will be flagged as errors during ValidateAllocateDescriptorSets() call } -}; +} // Verify that the state at allocate time is correct, but don't actually allocate the sets yet bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::layer_data *dev_data, const VkDescriptorSetAllocateInfo *p_alloc_info, @@ -1682,12 +1822,16 @@ bool cvdescriptorset::ValidateAllocateDescriptorSets(const core_validation::laye for (uint32_t i = 0; i < p_alloc_info->descriptorSetCount; i++) { auto layout = GetDescriptorSetLayout(dev_data, p_alloc_info->pSetLayouts[i]); - if (!layout) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, - HandleToUint64(p_alloc_info->pSetLayouts[i]), __LINE__, DRAWSTATE_INVALID_LAYOUT, "DS", - "Unable to find set layout node for layout 0x%" PRIxLEAST64 " specified in vkAllocateDescriptorSets() call", - HandleToUint64(p_alloc_info->pSetLayouts[i])); + if (layout) { // nullptr layout indicates no valid layout handle for this device, validated/logged in object_tracker + if (layout->GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, + HandleToUint64(p_alloc_info->pSetLayouts[i]), __LINE__, VALIDATION_ERROR_04c00268, "DS", + "Layout 0x%" PRIxLEAST64 " specified at pSetLayouts[%" PRIu32 + "] in vkAllocateDescriptorSets() was created with invalid flag %s set. %s", + HandleToUint64(p_alloc_info->pSetLayouts[i]), i, + "VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR", + validation_error_map[VALIDATION_ERROR_04c00268]); + } } } if (!GetDeviceExtensions(dev_data)->vk_khr_maintenance1) { @@ -1723,7 +1867,7 @@ void cvdescriptorset::PerformAllocateDescriptorSets(const VkDescriptorSetAllocat const AllocateDescriptorSetsData *ds_data, std::unordered_map *pool_map, std::unordered_map *set_map, - const layer_data *dev_data) { + layer_data *dev_data) { auto pool_state = (*pool_map)[p_alloc_info->descriptorPool]; // Account for sets and individual descriptors allocated from pool pool_state->availableSets -= p_alloc_info->descriptorSetCount; @@ -1740,3 +1884,20 @@ void cvdescriptorset::PerformAllocateDescriptorSets(const VkDescriptorSetAllocat (*set_map)[descriptor_sets[i]] = new_ds; } } + +cvdescriptorset::PrefilterBindRequestMap::PrefilterBindRequestMap(cvdescriptorset::DescriptorSet &ds, const BindingReqMap &in_map, + GLOBAL_CB_NODE *cb_state) + : filtered_map_(), orig_map_(in_map) { + if (ds.GetTotalDescriptorCount() > kManyDescriptors_) { + filtered_map_.reset(new std::map()); + ds.FilterAndTrackBindingReqs(cb_state, orig_map_, filtered_map_.get()); + } +} +cvdescriptorset::PrefilterBindRequestMap::PrefilterBindRequestMap(cvdescriptorset::DescriptorSet &ds, const BindingReqMap &in_map, + GLOBAL_CB_NODE *cb_state, PIPELINE_STATE *pipeline) + : filtered_map_(), orig_map_(in_map) { + if (ds.GetTotalDescriptorCount() > kManyDescriptors_) { + filtered_map_.reset(new std::map()); + ds.FilterAndTrackBindingReqs(cb_state, pipeline, orig_map_, filtered_map_.get()); + } +} diff --git a/sources/third_party/vulkan/src/layers/descriptor_sets.h b/sources/third_party/vulkan/src/layers/descriptor_sets.h index 0a40b8e3874f6e427856ecfd34bd98800366ffc1..ac5bede477fd1f82cf1dbb467e6d2624db9ef1d8 100644 --- a/sources/third_party/vulkan/src/layers/descriptor_sets.h +++ b/sources/third_party/vulkan/src/layers/descriptor_sets.h @@ -16,33 +16,11 @@ * limitations under the License. * * Author: Tobin Ehlis + * John Zulauf */ #ifndef CORE_VALIDATION_DESCRIPTOR_SETS_H_ #define CORE_VALIDATION_DESCRIPTOR_SETS_H_ -// Check for noexcept support -#ifndef NOEXCEPT -#if defined(__clang__) -#if __has_feature(cxx_noexcept) -#define HAS_NOEXCEPT -#endif -#else -#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 -#define HAS_NOEXCEPT -#else -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS -#define HAS_NOEXCEPT -#endif -#endif -#endif - -#ifdef HAS_NOEXCEPT -#define NOEXCEPT noexcept -#else -#define NOEXCEPT -#endif -#endif - #include "core_validation_error_enums.h" #include "vk_validation_error_messages.h" #include "core_validation_types.h" @@ -53,6 +31,7 @@ #include "vk_object_types.h" #include #include +#include #include #include #include @@ -60,6 +39,17 @@ using core_validation::layer_data; // Descriptor Data structures +namespace cvdescriptorset { + +// Utility structs/classes/types +// Index range for global indices below, end is exclusive, i.e. [start,end) +struct IndexRange { + IndexRange(uint32_t start_in, uint32_t end_in) : start(start_in), end(end_in) {} + IndexRange() = default; + uint32_t start; + uint32_t end; +}; +typedef std::map BindingReqMap; /* * DescriptorSetLayout class @@ -91,22 +81,23 @@ using core_validation::layer_data; * 10, then the GlobalStartIndex of the 2nd lowest binding# will be 10 where 0-9 are the * global indices for the lowest binding#. */ -namespace cvdescriptorset { class DescriptorSetLayout { public: // Constructors and destructor DescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo *p_create_info, const VkDescriptorSetLayout layout); // Validate create info - should be called prior to creation - static bool ValidateCreateInfo(debug_report_data *, const VkDescriptorSetLayoutCreateInfo *); + static bool ValidateCreateInfo(const debug_report_data *, const VkDescriptorSetLayoutCreateInfo *, const bool, const uint32_t); // Straightforward Get functions VkDescriptorSetLayout GetDescriptorSetLayout() const { return layout_; }; + bool IsDestroyed() const { return layout_destroyed_; } + void MarkDestroyed() { layout_destroyed_ = true; } uint32_t GetTotalDescriptorCount() const { return descriptor_count_; }; uint32_t GetDynamicDescriptorCount() const { return dynamic_descriptor_count_; }; VkDescriptorSetLayoutCreateFlags GetCreateFlags() const { return flags_; } // For a given binding, return the number of descriptors in that binding and all successive bindings uint32_t GetBindingCount() const { return binding_count_; }; - // Fill passed-in set with bindings - void FillBindingSet(std::unordered_set *) const; + // Non-empty binding numbers in order + const std::set &GetSortedBindingSet() const { return non_empty_bindings_; } // Return true if given binding is present in this layout bool HasBinding(const uint32_t binding) const { return binding_to_index_map_.count(binding) > 0; }; // Return true if this layout is compatible with passed in layout from a pipelineLayout, @@ -114,16 +105,28 @@ class DescriptorSetLayout { bool IsCompatible(DescriptorSetLayout const *const, std::string *) const; // Return true if binding 1 beyond given exists and has same type, stageFlags & immutable sampler use bool IsNextBindingConsistent(const uint32_t) const; + uint32_t GetIndexFromBinding(uint32_t binding) const; // Various Get functions that can either be passed a binding#, which will // be automatically translated into the appropriate index, or the index# can be passed in directly - VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(const uint32_t) const; + uint32_t GetMaxBinding() const { return bindings_[bindings_.size() - 1].binding; } VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromIndex(const uint32_t) const; - uint32_t GetDescriptorCountFromBinding(const uint32_t) const; + VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(uint32_t binding) const { + return GetDescriptorSetLayoutBindingPtrFromIndex(GetIndexFromBinding(binding)); + } uint32_t GetDescriptorCountFromIndex(const uint32_t) const; - VkDescriptorType GetTypeFromBinding(const uint32_t) const; + uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const { + return GetDescriptorCountFromIndex(GetIndexFromBinding(binding)); + } VkDescriptorType GetTypeFromIndex(const uint32_t) const; - VkDescriptorType GetTypeFromGlobalIndex(const uint32_t) const; - VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t) const; + VkDescriptorType GetTypeFromBinding(const uint32_t binding) const { return GetTypeFromIndex(GetIndexFromBinding(binding)); } + VkShaderStageFlags GetStageFlagsFromIndex(const uint32_t) const; + VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t binding) const { + return GetStageFlagsFromIndex(GetIndexFromBinding(binding)); + } + uint32_t GetIndexFromGlobalIndex(const uint32_t global_index) const; + VkDescriptorType GetTypeFromGlobalIndex(const uint32_t global_index) const { + return GetTypeFromIndex(GetIndexFromGlobalIndex(global_index)); + } VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t) const; VkSampler const *GetImmutableSamplerPtrFromIndex(const uint32_t) const; // For a given binding and array index, return the corresponding index into the dynamic offset array @@ -135,21 +138,32 @@ class DescriptorSetLayout { } return dyn_off->second; } - // For a particular binding, get the global index - // These calls should be guarded by a call to "HasBinding(binding)" to verify that the given binding exists - uint32_t GetGlobalStartIndexFromBinding(const uint32_t) const; - uint32_t GetGlobalEndIndexFromBinding(const uint32_t) const; + // For a particular binding, get the global index range + // This call should be guarded by a call to "HasBinding(binding)" to verify that the given binding exists + const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t) const; + // Helper function to get the next valid binding for a descriptor uint32_t GetNextValidBinding(const uint32_t) const; // For a particular binding starting at offset and having update_count descriptors // updated, verify that for any binding boundaries crossed, the update is consistent bool VerifyUpdateConsistency(uint32_t, uint32_t, uint32_t, const char *, const VkDescriptorSet, std::string *) const; + bool IsPushDescriptor() const { return GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; }; + + struct BindingTypeStats { + uint32_t dynamic_buffer_count; + uint32_t non_dynamic_buffer_count; + uint32_t image_sampler_count; + }; + const BindingTypeStats &GetBindingTypeStats() const { return binding_type_stats_; } private: VkDescriptorSetLayout layout_; - std::map binding_to_index_map_; - std::unordered_map binding_to_global_start_index_map_; - std::unordered_map binding_to_global_end_index_map_; + bool layout_destroyed_; + std::set non_empty_bindings_; // Containing non-emtpy bindings in numerical order + std::unordered_map binding_to_index_map_; + // The following map allows an non-iterative lookup of a binding from a global index... + std::map global_start_to_index_map_; // The index corresponding for a starting global (descriptor) index + std::unordered_map binding_to_global_index_range_map_; // range is exclusive of .end // For a given binding map to associated index in the dynamic offset array std::unordered_map binding_to_dynamic_array_idx_map_; VkDescriptorSetLayoutCreateFlags flags_; @@ -157,6 +171,7 @@ class DescriptorSetLayout { std::vector bindings_; uint32_t descriptor_count_; // total # descriptors in this layout uint32_t dynamic_descriptor_count_; + BindingTypeStats binding_type_stats_; }; /* @@ -300,7 +315,7 @@ bool ValidateAllocateDescriptorSets(const core_validation::layer_data *, const V void PerformAllocateDescriptorSets(const VkDescriptorSetAllocateInfo *, const VkDescriptorSet *, const AllocateDescriptorSetsData *, std::unordered_map *, std::unordered_map *, - const core_validation::layer_data *); + core_validation::layer_data *); /* * DescriptorSet class @@ -323,7 +338,7 @@ void PerformAllocateDescriptorSets(const VkDescriptorSetAllocateInfo *, const Vk class DescriptorSet : public BASE_NODE { public: DescriptorSet(const VkDescriptorSet, const VkDescriptorPool, const std::shared_ptr &, - const core_validation::layer_data *); + core_validation::layer_data *); ~DescriptorSet(); // A number of common Get* functions that return data based on layout from which this set was created uint32_t GetTotalDescriptorCount() const { return p_layout_->GetTotalDescriptorCount(); }; @@ -345,7 +360,7 @@ class DescriptorSet : public BASE_NODE { // Is this set compatible with the given layout? bool IsCompatible(DescriptorSetLayout const *const, std::string *) const; // For given bindings validate state at time of draw is correct, returning false on error and writing error details into string* - bool ValidateDrawState(const std::map &, const std::vector &, const GLOBAL_CB_NODE *, + bool ValidateDrawState(const std::map &, const std::vector &, GLOBAL_CB_NODE *, const char *caller, std::string *) const; // For given set of bindings, add any buffers and images that will be updated to their respective unordered_sets & return number // of objects inserted @@ -370,21 +385,33 @@ class DescriptorSet : public BASE_NODE { std::unordered_set GetBoundCmdBuffers() const { return cb_bindings; } // Bind given cmd_buffer to this descriptor set void BindCommandBuffer(GLOBAL_CB_NODE *, const std::map &); + + // Track work that has been bound or validated to avoid duplicate work, important when large descriptor arrays + // are present + typedef std::unordered_set TrackedBindings; + static void FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, const BindingReqMap &in_req, + BindingReqMap *out_req, TrackedBindings *set); + static void FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, const BindingReqMap &in_req, + BindingReqMap *out_req, TrackedBindings *set, uint32_t limit); + void FilterAndTrackBindingReqs(GLOBAL_CB_NODE *, const BindingReqMap &in_req, BindingReqMap *out_req); + void FilterAndTrackBindingReqs(GLOBAL_CB_NODE *, PIPELINE_STATE *, const BindingReqMap &in_req, BindingReqMap *out_req); + void ClearCachedDynamicDescriptorValidation(GLOBAL_CB_NODE *cb_state) { cached_validation_[cb_state].dynamic_buffers.clear(); } + void ClearCachedValidation(GLOBAL_CB_NODE *cb_state) { cached_validation_.erase(cb_state); } // If given cmd_buffer is in the cb_bindings set, remove it - void RemoveBoundCommandBuffer(GLOBAL_CB_NODE *cb_node) { cb_bindings.erase(cb_node); } + void RemoveBoundCommandBuffer(GLOBAL_CB_NODE *cb_node) { + cb_bindings.erase(cb_node); + ClearCachedValidation(cb_node); + } VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t index) const { return p_layout_->GetImmutableSamplerPtrFromBinding(index); }; // For a particular binding, get the global index - uint32_t GetGlobalStartIndexFromBinding(const uint32_t binding) const { - return p_layout_->GetGlobalStartIndexFromBinding(binding); - }; - uint32_t GetGlobalEndIndexFromBinding(const uint32_t binding) const { - return p_layout_->GetGlobalEndIndexFromBinding(binding); + const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t binding) const { + return p_layout_->GetGlobalIndexRangeFromBinding(binding); }; // Return true if any part of set has ever been updated bool IsUpdated() const { return some_update_; }; - bool IsPushDescriptor() const { return p_layout_->GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; }; + bool IsPushDescriptor() const { return p_layout_->IsPushDescriptor(); }; private: bool VerifyWriteUpdateContents(const VkWriteDescriptorSet *, const uint32_t, UNIQUE_VALIDATION_ERROR_CODE *, @@ -402,8 +429,37 @@ class DescriptorSet : public BASE_NODE { const std::shared_ptr p_layout_; std::vector> descriptors_; // Ptr to device data used for various data look-ups - const core_validation::layer_data *device_data_; + core_validation::layer_data *const device_data_; const VkPhysicalDeviceLimits limits_; + + // Cached binding and validation support: + // + // For the lifespan of a given command buffer recording, do lazy evaluation, caching, and dirtying of + // expensive validation operation (typically per-draw) + typedef std::unordered_map TrackedBindingMap; + typedef std::unordered_map ValidatedBindings; + // Track the validation caching of bindings vs. the command buffer and draw state + typedef std::unordered_map VersionedBindings; + struct CachedValidation { + TrackedBindings command_binding_and_usage; // Persistent for the life of the recording + TrackedBindings non_dynamic_buffers; // Persistent for the life of the recording + TrackedBindings dynamic_buffers; // Dirtied (flushed) each BindDescriptorSet + std::unordered_map image_samplers; // Tested vs. changes to CB's ImageLayout + }; + typedef std::unordered_map CachedValidationMap; + // Image and ImageView bindings are validated per pipeline and not invalidate by repeated binding + CachedValidationMap cached_validation_; +}; +// For the "bindless" style resource usage with many descriptors, need to optimize binding and validation +class PrefilterBindRequestMap { + public: + static const uint32_t kManyDescriptors_ = 64; // TODO base this number on measured data + std::unique_ptr filtered_map_; + const BindingReqMap &orig_map_; + + PrefilterBindRequestMap(DescriptorSet &ds, const BindingReqMap &in_map, GLOBAL_CB_NODE *cb_state); + PrefilterBindRequestMap(DescriptorSet &ds, const BindingReqMap &in_map, GLOBAL_CB_NODE *cb_state, PIPELINE_STATE *); + const BindingReqMap &Map() const { return (filtered_map_) ? *filtered_map_ : orig_map_; } }; -} +} // namespace cvdescriptorset #endif // CORE_VALIDATION_DESCRIPTOR_SETS_H_ diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_core_validation.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_core_validation.json new file mode 100644 index 0000000000000000000000000000000000000000..8c3d81bd41974085c8a56cfbfad3ee30962417e9 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_core_validation.json @@ -0,0 +1,29 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_LUNARG_core_validation", + "type": "GLOBAL", + "library_path": "./libVkLayer_core_validation.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Validation Layer", + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "6" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "4", + "entrypoints": ["vkDebugMarkerSetObjectTagEXT", + "vkDebugMarkerSetObjectNameEXT", + "vkCmdDebugMarkerBeginEXT", + "vkCmdDebugMarkerEndEXT", + "vkCmdDebugMarkerInsertEXT" + ] + } + ] + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_device_simulation.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_device_simulation.json new file mode 100644 index 0000000000000000000000000000000000000000..b2eada69198c4aa9a93a33373d019c1d9f080e03 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_device_simulation.json @@ -0,0 +1,11 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_LUNARG_device_simulation", + "type": "GLOBAL", + "library_path": "./libVkLayer_device_simulation.dylib", + "api_version": "1.0.69", + "implementation_version": "1.2.0", + "description": "LunarG device simulation layer" + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_object_tracker.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_object_tracker.json new file mode 100644 index 0000000000000000000000000000000000000000..ba846036491188aea788bc7cce3c1d59945b1a18 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_object_tracker.json @@ -0,0 +1,29 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_LUNARG_object_tracker", + "type": "GLOBAL", + "library_path": "./libVkLayer_object_tracker.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Validation Layer", + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "6" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "4", + "entrypoints": ["vkDebugMarkerSetObjectTagEXT", + "vkDebugMarkerSetObjectNameEXT", + "vkCmdDebugMarkerBeginEXT", + "vkCmdDebugMarkerEndEXT", + "vkCmdDebugMarkerInsertEXT" + ] + } + ] + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_parameter_validation.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_parameter_validation.json new file mode 100644 index 0000000000000000000000000000000000000000..579324af9df20f146498a25c2dd21dfccafdea99 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_parameter_validation.json @@ -0,0 +1,29 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_LUNARG_parameter_validation", + "type": "GLOBAL", + "library_path": "./libVkLayer_parameter_validation.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Validation Layer", + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "6" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "4", + "entrypoints": ["vkDebugMarkerSetObjectTagEXT", + "vkDebugMarkerSetObjectNameEXT", + "vkCmdDebugMarkerBeginEXT", + "vkCmdDebugMarkerEndEXT", + "vkCmdDebugMarkerInsertEXT" + ] + } + ] + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_standard_validation.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_standard_validation.json new file mode 100644 index 0000000000000000000000000000000000000000..1be9feed7ec2d3900f91868a8a876f4af0b676e3 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_standard_validation.json @@ -0,0 +1,17 @@ +{ + "file_format_version": "1.1.1", + "layer": { + "name": "VK_LAYER_LUNARG_standard_validation", + "type": "GLOBAL", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Standard Validation", + "component_layers": [ + "VK_LAYER_GOOGLE_threading", + "VK_LAYER_LUNARG_parameter_validation", + "VK_LAYER_LUNARG_object_tracker", + "VK_LAYER_LUNARG_core_validation", + "VK_LAYER_GOOGLE_unique_objects" + ] + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_threading.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_threading.json new file mode 100644 index 0000000000000000000000000000000000000000..d6af6c045dfb110464514a8a5cd0e728a28b60c6 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_threading.json @@ -0,0 +1,17 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_GOOGLE_threading", + "type": "GLOBAL", + "library_path": "./libVkLayer_threading.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "Google Validation Layer", + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "6" + } + ] + } +} diff --git a/sources/third_party/vulkan/src/layers/macos/VkLayer_unique_objects.json b/sources/third_party/vulkan/src/layers/macos/VkLayer_unique_objects.json new file mode 100644 index 0000000000000000000000000000000000000000..63c53064f2b9729d49598624290f9bd7ce308bfb --- /dev/null +++ b/sources/third_party/vulkan/src/layers/macos/VkLayer_unique_objects.json @@ -0,0 +1,11 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_GOOGLE_unique_objects", + "type": "GLOBAL", + "library_path": "./libVkLayer_unique_objects.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "Google Validation Layer" + } +} diff --git a/sources/third_party/vulkan/src/layers/object_tracker.h b/sources/third_party/vulkan/src/layers/object_tracker.h index a45d30b333221582ad4109ea2442559fae75bc31..d9fdf8b4c178717a45558c0279e7f2401c1a0340 100644 --- a/sources/third_party/vulkan/src/layers/object_tracker.h +++ b/sources/third_party/vulkan/src/layers/object_tracker.h @@ -145,7 +145,8 @@ void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_pool, co void AllocateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, VkDescriptorSet descriptor_set); void CreateSwapchainImageObject(VkDevice dispatchable_object, VkImage swapchain_image, VkSwapchainKHR swapchain); void ReportUndestroyedObjects(VkDevice device, UNIQUE_VALIDATION_ERROR_CODE error_code); - +bool ValidateDeviceObject(uint64_t device_handle, enum UNIQUE_VALIDATION_ERROR_CODE invalid_handle_code, + enum UNIQUE_VALIDATION_ERROR_CODE wrong_device_code); template bool ValidateObject(T1 dispatchable_object, T2 object, VulkanObjectType object_type, bool null_allowed, @@ -154,6 +155,11 @@ bool ValidateObject(T1 dispatchable_object, T2 object, VulkanObjectType object_t return false; } auto object_handle = HandleToUint64(object); + + if (object_type == kVulkanObjectTypeDevice) { + return ValidateDeviceObject(object_handle, invalid_handle_code, wrong_device_code); + } + VkDebugReportObjectTypeEXT debug_object_type = get_debug_report_enum[object_type]; layer_data *device_data = GetLayerDataPtr(get_dispatch_key(dispatchable_object), layer_data_map); diff --git a/sources/third_party/vulkan/src/layers/object_tracker_utils.cpp b/sources/third_party/vulkan/src/layers/object_tracker_utils.cpp index c9b2700bb7a5af17dea8e421407ed3e818a04dd9..957f347e0cccd7d8c26455ac609a7e0e60ac0d78 100644 --- a/sources/third_party/vulkan/src/layers/object_tracker_utils.cpp +++ b/sources/third_party/vulkan/src/layers/object_tracker_utils.cpp @@ -99,6 +99,26 @@ void ValidateQueueFlags(VkQueue queue, const char *function) { } } +// Look for this device object in any of the instance child devices lists. +// NOTE: This is of dubious value. In most circumstances Vulkan will die a flaming death if a dispatchable object is invalid. +// However, if this layer is loaded first and GetProcAddress is used to make API calls, it will detect bad DOs. +bool ValidateDeviceObject(uint64_t device_handle, enum UNIQUE_VALIDATION_ERROR_CODE invalid_handle_code, + enum UNIQUE_VALIDATION_ERROR_CODE wrong_device_code) { + VkInstance last_instance = nullptr; + for (auto layer_data : layer_data_map) { + for (auto object : layer_data.second->object_map[kVulkanObjectTypeDevice]) { + // Grab last instance to use for possible error message + last_instance = layer_data.second->instance; + if (object.second->handle == device_handle) return false; + } + } + + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(last_instance), layer_data_map); + return log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device_handle, + __LINE__, invalid_handle_code, LayerName, "Invalid Device Object 0x%" PRIxLEAST64 ". %s", device_handle, + validation_error_map[invalid_handle_code]); +} + void AllocateCommandBuffer(VkDevice device, const VkCommandPool command_pool, const VkCommandBuffer command_buffer, VkCommandBufferLevel level) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); @@ -190,6 +210,47 @@ bool ValidateDescriptorSet(VkDevice device, VkDescriptorPool descriptor_pool, Vk return skip; } +template +static bool ValidateDescriptorWrite(DispObj disp, VkWriteDescriptorSet const *desc, bool isPush) { + bool skip = false; + + if (!isPush && desc->dstSet) { + skip |= ValidateObject(disp, desc->dstSet, kVulkanObjectTypeDescriptorSet, false, VALIDATION_ERROR_15c00280, + VALIDATION_ERROR_15c00009); + } + + if ((desc->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)) { + for (uint32_t idx2 = 0; idx2 < desc->descriptorCount; ++idx2) { + skip |= ValidateObject(disp, desc->pTexelBufferView[idx2], kVulkanObjectTypeBufferView, false, + VALIDATION_ERROR_15c00286, VALIDATION_ERROR_15c00009); + } + } + + if ((desc->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || (desc->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) { + for (uint32_t idx3 = 0; idx3 < desc->descriptorCount; ++idx3) { + skip |= ValidateObject(disp, desc->pImageInfo[idx3].imageView, kVulkanObjectTypeImageView, false, + VALIDATION_ERROR_15c0028c, VALIDATION_ERROR_04600009); + } + } + + if ((desc->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || + (desc->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) { + for (uint32_t idx4 = 0; idx4 < desc->descriptorCount; ++idx4) { + if (desc->pBufferInfo[idx4].buffer) { + skip |= ValidateObject(disp, desc->pBufferInfo[idx4].buffer, kVulkanObjectTypeBuffer, false, + VALIDATION_ERROR_04401a01, VALIDATION_ERROR_UNDEFINED); + } + } + } + + return skip; +} + VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites) { @@ -202,30 +263,7 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer VALIDATION_ERROR_1be00009); if (pDescriptorWrites) { for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { - if (pDescriptorWrites[index0].pImageInfo) { - for (uint32_t index1 = 0; index1 < pDescriptorWrites[index0].descriptorCount; ++index1) { - skip |= - ValidateObject(commandBuffer, pDescriptorWrites[index0].pImageInfo[index1].sampler, - kVulkanObjectTypeSampler, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_04600009); - skip |= ValidateObject(commandBuffer, pDescriptorWrites[index0].pImageInfo[index1].imageView, - kVulkanObjectTypeImageView, false, VALIDATION_ERROR_UNDEFINED, - VALIDATION_ERROR_04600009); - } - } - if (pDescriptorWrites[index0].pBufferInfo) { - for (uint32_t index1 = 0; index1 < pDescriptorWrites[index0].descriptorCount; ++index1) { - skip |= - ValidateObject(commandBuffer, pDescriptorWrites[index0].pBufferInfo[index1].buffer, - kVulkanObjectTypeBuffer, false, VALIDATION_ERROR_04401a01, VALIDATION_ERROR_UNDEFINED); - } - } - if (pDescriptorWrites[index0].pTexelBufferView) { - for (uint32_t index1 = 0; index1 < pDescriptorWrites[index0].descriptorCount; ++index1) { - skip |= ValidateObject(commandBuffer, pDescriptorWrites[index0].pTexelBufferView[index1], - kVulkanObjectTypeBufferView, false, VALIDATION_ERROR_UNDEFINED, - VALIDATION_ERROR_15c00009); - } - } + skip |= ValidateDescriptorWrite(commandBuffer, &pDescriptorWrites[index0], true); } } } @@ -305,16 +343,14 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati for (auto iit = instance_data->object_map[kVulkanObjectTypePhysicalDevice].begin(); iit != instance_data->object_map[kVulkanObjectTypePhysicalDevice].end();) { ObjTrackState *pNode = iit->second; - VkPhysicalDevice physical_device = reinterpret_cast(pNode->handle); + DestroyObject(instance, physical_device, kVulkanObjectTypePhysicalDevice, nullptr, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); iit = instance_data->object_map[kVulkanObjectTypePhysicalDevice].begin(); } - DestroyObject(instance, instance, kVulkanObjectTypeInstance, pAllocator, VALIDATION_ERROR_258004ec, VALIDATION_ERROR_258004ee); - // Report any remaining objects in LL - + // Destroy child devices for (auto iit = instance_data->object_map[kVulkanObjectTypeDevice].begin(); iit != instance_data->object_map[kVulkanObjectTypeDevice].end();) { ObjTrackState *pNode = iit->second; @@ -326,8 +362,13 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati OBJTRACK_OBJECT_LEAK, LayerName, "OBJ ERROR : %s object 0x%" PRIxLEAST64 " has not been destroyed.", string_VkDebugReportObjectTypeEXT(debug_object_type), pNode->handle); + // Report any remaining objects in LL ReportUndestroyedObjects(device, VALIDATION_ERROR_258004ea); + + DestroyObject(instance, device, kVulkanObjectTypeDevice, pAllocator, VALIDATION_ERROR_258004ec, VALIDATION_ERROR_258004ee); + iit = instance_data->object_map[kVulkanObjectTypeDevice].begin(); } + instance_data->object_map[kVulkanObjectTypeDevice].clear(); VkLayerInstanceDispatchTable *pInstanceTable = get_dispatch_table(ot_instance_table_map, instance); @@ -359,8 +400,10 @@ VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocati VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { std::unique_lock lock(global_lock); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); ValidateObject(device, device, kVulkanObjectTypeDevice, true, VALIDATION_ERROR_24a05601, VALIDATION_ERROR_UNDEFINED); - DestroyObject(device, device, kVulkanObjectTypeDevice, pAllocator, VALIDATION_ERROR_24a002f6, VALIDATION_ERROR_24a002f8); + DestroyObject(device_data->instance, device, kVulkanObjectTypeDevice, pAllocator, VALIDATION_ERROR_24a002f6, + VALIDATION_ERROR_24a002f8); // Report any remaining objects associated with this VkDevice object in LL ReportUndestroyedObjects(device, VALIDATION_ERROR_24a002f4); @@ -413,39 +456,7 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri } if (pDescriptorWrites) { for (uint32_t idx1 = 0; idx1 < descriptorWriteCount; ++idx1) { - if (pDescriptorWrites[idx1].dstSet) { - skip |= ValidateObject(device, pDescriptorWrites[idx1].dstSet, kVulkanObjectTypeDescriptorSet, false, - VALIDATION_ERROR_15c00280, VALIDATION_ERROR_15c00009); - } - if ((pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)) { - for (uint32_t idx2 = 0; idx2 < pDescriptorWrites[idx1].descriptorCount; ++idx2) { - skip |= ValidateObject(device, pDescriptorWrites[idx1].pTexelBufferView[idx2], kVulkanObjectTypeBufferView, - false, VALIDATION_ERROR_15c00286, VALIDATION_ERROR_15c00009); - } - } - if ((pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT)) { - for (uint32_t idx3 = 0; idx3 < pDescriptorWrites[idx1].descriptorCount; ++idx3) { - skip |= - ValidateObject(device, pDescriptorWrites[idx1].pImageInfo[idx3].imageView, kVulkanObjectTypeImageView, - false, VALIDATION_ERROR_15c0028c, VALIDATION_ERROR_04600009); - } - } - if ((pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) || - (pDescriptorWrites[idx1].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)) { - for (uint32_t idx4 = 0; idx4 < pDescriptorWrites[idx1].descriptorCount; ++idx4) { - if (pDescriptorWrites[idx1].pBufferInfo[idx4].buffer) { - skip |= - ValidateObject(device, pDescriptorWrites[idx1].pBufferInfo[idx4].buffer, kVulkanObjectTypeBuffer, - false, VALIDATION_ERROR_04401a01, VALIDATION_ERROR_UNDEFINED); - } - } - } + skip |= ValidateDescriptorWrite(device, &pDescriptorWrites[idx1], false); } } } @@ -650,10 +661,11 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, con // Add link back to physDev device_data->physical_device = physicalDevice; + device_data->instance = phy_dev_data->instance; initDeviceTable(*pDevice, fpGetDeviceProcAddr, ot_device_table_map); - CreateObject(*pDevice, *pDevice, kVulkanObjectTypeDevice, pAllocator); + CreateObject(phy_dev_data->instance, *pDevice, kVulkanObjectTypeDevice, pAllocator); return result; } @@ -680,6 +692,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai return result; } +VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkDescriptorSetLayout *pSetLayout) { + bool skip = false; + { + std::lock_guard lock(global_lock); + skip |= + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_1f805601, VALIDATION_ERROR_UNDEFINED); + if (pCreateInfo) { + if (pCreateInfo->pBindings) { + for (uint32_t binding_index = 0; binding_index < pCreateInfo->bindingCount; ++binding_index) { + const VkDescriptorSetLayoutBinding &binding = pCreateInfo->pBindings[binding_index]; + const bool is_sampler_type = binding.descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || + binding.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + if (binding.pImmutableSamplers && is_sampler_type) { + for (uint32_t index2 = 0; index2 < binding.descriptorCount; ++index2) { + const VkSampler sampler = binding.pImmutableSamplers[index2]; + skip |= ValidateObject(device, sampler, kVulkanObjectTypeSampler, false, VALIDATION_ERROR_04e00234, + VALIDATION_ERROR_UNDEFINED); + } + } + } + } + } + } + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + VkResult result = + get_dispatch_table(ot_device_table_map, device)->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); + if (VK_SUCCESS == result) { + std::lock_guard lock(global_lock); + CreateObject(device, *pSetLayout, kVulkanObjectTypeDescriptorSetLayout, pAllocator); + } + return result; +} + VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) { diff --git a/sources/third_party/vulkan/src/layers/parameter_name.h b/sources/third_party/vulkan/src/layers/parameter_name.h index 6459b5e57f161cc89b318ac50810a36851b0a9d9..05a1d89e0be4182e30509a54689b1c8b62edd901 100644 --- a/sources/third_party/vulkan/src/layers/parameter_name.h +++ b/sources/third_party/vulkan/src/layers/parameter_name.h @@ -61,43 +61,43 @@ class ParameterName { ParameterName(const char *source) : source_(source) { assert(IsValid()); } /** - * Construct a ParameterName object from a std::string object, without formatting. - * - * @param source Paramater name string without format specifiers. - * - * @pre The source string must not contain the %i format specifier. - */ + * Construct a ParameterName object from a std::string object, without formatting. + * + * @param source Paramater name string without format specifiers. + * + * @pre The source string must not contain the %i format specifier. + */ ParameterName(const std::string &source) : source_(source) { assert(IsValid()); } /** - * Construct a ParameterName object from a std::string object, without formatting. - * - * @param source Paramater name string without format specifiers. - * - * @pre The source string must not contain the %i format specifier. - */ + * Construct a ParameterName object from a std::string object, without formatting. + * + * @param source Paramater name string without format specifiers. + * + * @pre The source string must not contain the %i format specifier. + */ ParameterName(const std::string &&source) : source_(std::move(source)) { assert(IsValid()); } /** - * Construct a ParameterName object from a std::string object, with formatting. - * - * @param source Paramater name string with format specifiers. - * @param args Array index values to be used for formatting. - * - * @pre The number of %i format specifiers contained by the source string must match the number of elements contained - * by the index vector. - */ + * Construct a ParameterName object from a std::string object, with formatting. + * + * @param source Paramater name string with format specifiers. + * @param args Array index values to be used for formatting. + * + * @pre The number of %i format specifiers contained by the source string must match the number of elements contained + * by the index vector. + */ ParameterName(const std::string &source, const IndexVector &args) : source_(source), args_(args) { assert(IsValid()); } /** - * Construct a ParameterName object from a std::string object, with formatting. - * - * @param source Paramater name string with format specifiers. - * @param args Array index values to be used for formatting. - * - * @pre The number of %i format specifiers contained by the source string must match the number of elements contained - * by the index vector. - */ + * Construct a ParameterName object from a std::string object, with formatting. + * + * @param source Paramater name string with format specifiers. + * @param args Array index values to be used for formatting. + * + * @pre The number of %i format specifiers contained by the source string must match the number of elements contained + * by the index vector. + */ ParameterName(const std::string &&source, const IndexVector &&args) : source_(std::move(source)), args_(std::move(args)) { assert(IsValid()); } diff --git a/sources/third_party/vulkan/src/layers/parameter_validation.h b/sources/third_party/vulkan/src/layers/parameter_validation.h index 6ef3de2ec91f331d5df1b409685e510cf8bc6858..82e95eb6b75567df79b5fd7b9f909c9a242b9024 100644 --- a/sources/third_party/vulkan/src/layers/parameter_validation.h +++ b/sources/third_party/vulkan/src/layers/parameter_validation.h @@ -24,8 +24,10 @@ #include #include #include +#include #include #include +#include #include #include "vulkan/vulkan.h" @@ -34,13 +36,12 @@ #include "vk_validation_error_messages.h" #include "vk_extension_helper.h" - #include "parameter_name.h" namespace parameter_validation { extern const uint32_t GeneratedHeaderVersion; -extern const std::unordered_map name_to_funcptr_map; +extern const std::unordered_map name_to_funcptr_map; extern const VkQueryPipelineStatisticFlags AllVkQueryPipelineStatisticFlagBits; extern const VkColorComponentFlags AllVkColorComponentFlagBits; @@ -80,6 +81,13 @@ struct layer_data { VkDevice device = VK_NULL_HANDLE; DeviceExtensions extensions; + struct SubpassesUsageStates { + std::unordered_set subpasses_using_color_attachment; + std::unordered_set subpasses_using_depthstencil_attachment; + }; + + std::unordered_map renderpasses_states; + VkLayerDispatchTable dispatch_table = {}; }; @@ -134,33 +142,48 @@ const uint32_t ExtEnumBaseValue = 1000000000; // The value of all VK_xxx_MAX_ENUM tokens const uint32_t MaxEnumValue = 0x7FFFFFFF; +// Misc parameters of log_msg that are likely constant per command (or low frequency change) +struct LogMiscParams { + const debug_report_data *debug_data; + VkDebugReportObjectTypeEXT objectType; + uint64_t srcObject; + const char *pLayerPrefix; + const char *api_name; +}; /** -* Validate a minimum value. -* -* Verify that the specified value is greater than the specified lower bound. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param parameter_name Name of parameter being validated. -* @param value Value to validate. -* @param lower_bound Lower bound value to use for validation. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate a minimum value. + * + * Verify that the specified value is greater than the specified lower bound. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param parameter_name Name of parameter being validated. + * @param value Value to validate. + * @param lower_bound Lower bound value to use for validation. + * @return Boolean value indicating that the call should be skipped. + */ template -bool ValidateGreaterThan(debug_report_data *report_data, const char *api_name, const ParameterName ¶meter_name, T value, - T lower_bound) { +bool ValidateGreaterThan(const T value, const T lower_bound, const ParameterName ¶meter_name, + const UNIQUE_VALIDATION_ERROR_CODE vuid, const LogMiscParams &misc) { bool skip_call = false; if (value <= lower_bound) { - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, 1, LayerName, - "%s: parameter %s must be greater than %d", api_name, parameter_name.get_name().c_str(), lower_bound); + std::ostringstream ss; + ss << misc.api_name << ": parameter " << parameter_name.get_name() << " (= " << value << ") is greater than " << lower_bound + << ". " << validation_error_map[vuid]; + skip_call |= log_msg(misc.debug_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, misc.objectType, misc.srcObject, __LINE__, vuid, + misc.pLayerPrefix, "%s", ss.str().c_str()); } return skip_call; } +template +bool ValidateGreaterThanZero(const T value, const ParameterName ¶meter_name, const UNIQUE_VALIDATION_ERROR_CODE vuid, + const LogMiscParams &misc) { + return ValidateGreaterThan(value, T{0}, parameter_name, vuid, misc); +} /** * Validate a required pointer. * @@ -177,8 +200,8 @@ static bool validate_required_pointer(debug_report_data *report_data, const char bool skip_call = false; if (value == NULL) { - skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - vuid, LayerName, "%s: required parameter %s specified as NULL. %s", apiName, + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + LayerName, "%s: required parameter %s specified as NULL. %s", apiName, parameterName.get_name().c_str(), validation_error_map[vuid]); } @@ -211,14 +234,14 @@ bool validate_array(debug_report_data *report_data, const char *apiName, const P // Count parameters not tagged as optional cannot be 0 if (countRequired && (count == 0)) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - count_required_vuid, LayerName, "%s: parameter %s must be greater than 0. %s", apiName, + count_required_vuid, LayerName, "%s: parameter %s must be greater than 0. %s", apiName, countName.get_name().c_str(), validation_error_map[count_required_vuid]); } // Array parameters not tagged as optional cannot be NULL, unless the count is 0 if ((array == NULL) && arrayRequired && (count != 0)) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - array_required_vuid, LayerName, "%s: required parameter %s specified as NULL. %s", apiName, + array_required_vuid, LayerName, "%s: required parameter %s specified as NULL. %s", apiName, arrayName.get_name().c_str(), validation_error_map[array_required_vuid]); } @@ -226,25 +249,25 @@ bool validate_array(debug_report_data *report_data, const char *apiName, const P } /** -* Validate pointer to array count and pointer to array. -* -* Verify that required count and array parameters are not NULL. If count -* is not NULL and its value is not optional, verify that it is not 0. If the -* array parameter is NULL, and it is not optional, verify that count is 0. -* The array parameter will typically be optional for this case (where count is -* a pointer), allowing the caller to retrieve the available count. -* -* @param report_data debug_report_data object for routing validation messages. -* @param apiName Name of API call being validated. -* @param countName Name of count parameter. -* @param arrayName Name of array parameter. -* @param count Pointer to the number of elements in the array. -* @param array Array to validate. -* @param countPtrRequired The 'count' parameter may not be NULL when true. -* @param countValueRequired The '*count' value may not be 0 when true. -* @param arrayRequired The 'array' parameter may not be NULL when true. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate pointer to array count and pointer to array. + * + * Verify that required count and array parameters are not NULL. If count + * is not NULL and its value is not optional, verify that it is not 0. If the + * array parameter is NULL, and it is not optional, verify that count is 0. + * The array parameter will typically be optional for this case (where count is + * a pointer), allowing the caller to retrieve the available count. + * + * @param report_data debug_report_data object for routing validation messages. + * @param apiName Name of API call being validated. + * @param countName Name of count parameter. + * @param arrayName Name of array parameter. + * @param count Pointer to the number of elements in the array. + * @param array Array to validate. + * @param countPtrRequired The 'count' parameter may not be NULL when true. + * @param countValueRequired The '*count' value may not be 0 when true. + * @param arrayRequired The 'array' parameter may not be NULL when true. + * @return Boolean value indicating that the call should be skipped. + */ template bool validate_array(debug_report_data *report_data, const char *apiName, const ParameterName &countName, const ParameterName &arrayName, const T *count, const void *array, bool countPtrRequired, @@ -388,16 +411,16 @@ bool validate_struct_type_array(debug_report_data *report_data, const char *apiN } /** -* Validate a Vulkan handle. -* -* Verify that the specified handle is not VK_NULL_HANDLE. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param parameter_name Name of struct parameter being validated. -* @param value Handle to validate. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate a Vulkan handle. + * + * Verify that the specified handle is not VK_NULL_HANDLE. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param parameter_name Name of struct parameter being validated. + * @param value Handle to validate. + * @return Boolean value indicating that the call should be skipped. + */ template bool validate_required_handle(debug_report_data *report_data, const char *api_name, const ParameterName ¶meter_name, T value) { bool skip_call = false; @@ -412,27 +435,27 @@ bool validate_required_handle(debug_report_data *report_data, const char *api_na } /** -* Validate an array of Vulkan handles. -* -* Verify that required count and array parameters are not NULL. If count -* is not NULL and its value is not optional, verify that it is not 0. -* If the array contains 1 or more handles, verify that no handle is set to -* VK_NULL_HANDLE. -* -* @note This function is only intended to validate arrays of handles when none -* of the handles are allowed to be VK_NULL_HANDLE. For arrays of handles -* that are allowed to contain VK_NULL_HANDLE, use validate_array() instead. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param count_name Name of count parameter. -* @param array_name Name of array parameter. -* @param count Number of elements in the array. -* @param array Array to validate. -* @param count_required The 'count' parameter may not be 0 when true. -* @param array_required The 'array' parameter may not be NULL when true. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate an array of Vulkan handles. + * + * Verify that required count and array parameters are not NULL. If count + * is not NULL and its value is not optional, verify that it is not 0. + * If the array contains 1 or more handles, verify that no handle is set to + * VK_NULL_HANDLE. + * + * @note This function is only intended to validate arrays of handles when none + * of the handles are allowed to be VK_NULL_HANDLE. For arrays of handles + * that are allowed to contain VK_NULL_HANDLE, use validate_array() instead. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param count_name Name of count parameter. + * @param array_name Name of array parameter. + * @param count Number of elements in the array. + * @param array Array to validate. + * @param count_required The 'count' parameter may not be 0 when true. + * @param array_required The 'array' parameter may not be NULL when true. + * @return Boolean value indicating that the call should be skipped. + */ template bool validate_handle_array(debug_report_data *report_data, const char *api_name, const ParameterName &count_name, const ParameterName &array_name, uint32_t count, const T *array, bool count_required, @@ -524,10 +547,9 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap std::unordered_set> unique_stype_check; const char disclaimer[] = - "This warning is based on the Valid Usage documentation for version %d of the Vulkan header. It " - "is possible that you are using a struct from a private extension or an extension that was added " - "to a later version of the Vulkan header, in which case your use of %s is perfectly valid but " - "is not guaranteed to work correctly with validation enabled"; + "This warning is based on the Valid Usage documentation for version %d of the Vulkan header. It is possible that you are " + "using a struct from a private extension or an extension that was added to a later version of the Vulkan header, in which " + "case your use of %s is perfectly valid but is not guaranteed to work correctly with validation enabled"; // TODO: The valid pNext structure types are not recursive. Each structure has its own list of valid sTypes for pNext. // Codegen a map of vectors containing the allowable pNext types for each struct and use that here -- also simplifies parms. @@ -595,16 +617,16 @@ static bool validate_struct_pnext(debug_report_data *report_data, const char *ap } /** -* Validate a VkBool32 value. -* -* Generate a warning if a VkBool32 value is neither VK_TRUE nor VK_FALSE. -* -* @param report_data debug_report_data object for routing validation messages. -* @param apiName Name of API call being validated. -* @param parameterName Name of parameter being validated. -* @param value Boolean value to validate. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate a VkBool32 value. + * + * Generate a warning if a VkBool32 value is neither VK_TRUE nor VK_FALSE. + * + * @param report_data debug_report_data object for routing validation messages. + * @param apiName Name of API call being validated. + * @param parameterName Name of parameter being validated. + * @param value Boolean value to validate. + * @return Boolean value indicating that the call should be skipped. + */ static bool validate_bool32(debug_report_data *report_data, const char *apiName, const ParameterName ¶meterName, VkBool32 value) { bool skip_call = false; @@ -619,23 +641,23 @@ static bool validate_bool32(debug_report_data *report_data, const char *apiName, } /** -* Validate a Vulkan enumeration value. -* -* Generate a warning if an enumeration token value does not fall within the core enumeration -* begin and end token values, and was not added to the enumeration by an extension. Extension -* provided enumerations use the equation specified in Appendix C.10 of the Vulkan specification, -* with 1,000,000,000 as the base token value. -* -* @note This function does not expect to process enumerations defining bitmask flag bits. -* -* @param report_data debug_report_data object for routing validation messages. -* @param apiName Name of API call being validated. -* @param parameterName Name of parameter being validated. -* @param enumName Name of the enumeration being validated. -* @param valid_values The list of valid values for the enumeration. -* @param value Enumeration value to validate. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate a Vulkan enumeration value. + * + * Generate a warning if an enumeration token value does not fall within the core enumeration + * begin and end token values, and was not added to the enumeration by an extension. Extension + * provided enumerations use the equation specified in Appendix C.10 of the Vulkan specification, + * with 1,000,000,000 as the base token value. + * + * @note This function does not expect to process enumerations defining bitmask flag bits. + * + * @param report_data debug_report_data object for routing validation messages. + * @param apiName Name of API call being validated. + * @param parameterName Name of parameter being validated. + * @param enumName Name of the enumeration being validated. + * @param valid_values The list of valid values for the enumeration. + * @param value Enumeration value to validate. + * @return Boolean value indicating that the call should be skipped. + */ template bool validate_ranged_enum(debug_report_data *report_data, const char *apiName, const ParameterName ¶meterName, const char *enumName, const std::vector &valid_values, T value, UNIQUE_VALIDATION_ERROR_CODE vuid) { @@ -644,8 +666,8 @@ bool validate_ranged_enum(debug_report_data *report_data, const char *apiName, c if (std::find(valid_values.begin(), valid_values.end(), value) == valid_values.end()) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, LayerName, - "%s: value of %s (%d) does not fall within the begin..end range of the core %s " - "enumeration tokens and is not an extension added token. %s", + "%s: value of %s (%d) does not fall within the begin..end range of the core %s enumeration tokens and is " + "not an extension added token. %s", apiName, parameterName.get_name().c_str(), value, enumName, validation_error_map[vuid]); } @@ -653,27 +675,27 @@ bool validate_ranged_enum(debug_report_data *report_data, const char *apiName, c } /** -* Validate an array of Vulkan enumeration value. -* -* Process all enumeration token values in the specified array and generate a warning if a value -* does not fall within the core enumeration begin and end token values, and was not added to -* the enumeration by an extension. Extension provided enumerations use the equation specified -* in Appendix C.10 of the Vulkan specification, with 1,000,000,000 as the base token value. -* -* @note This function does not expect to process enumerations defining bitmask flag bits. -* -* @param report_data debug_report_data object for routing validation messages. -* @param apiName Name of API call being validated. -* @param countName Name of count parameter. -* @param arrayName Name of array parameter. -* @param enumName Name of the enumeration being validated. -* @param valid_values The list of valid values for the enumeration. -* @param count Number of enumeration values in the array. -* @param array Array of enumeration values to validate. -* @param countRequired The 'count' parameter may not be 0 when true. -* @param arrayRequired The 'array' parameter may not be NULL when true. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate an array of Vulkan enumeration value. + * + * Process all enumeration token values in the specified array and generate a warning if a value + * does not fall within the core enumeration begin and end token values, and was not added to + * the enumeration by an extension. Extension provided enumerations use the equation specified + * in Appendix C.10 of the Vulkan specification, with 1,000,000,000 as the base token value. + * + * @note This function does not expect to process enumerations defining bitmask flag bits. + * + * @param report_data debug_report_data object for routing validation messages. + * @param apiName Name of API call being validated. + * @param countName Name of count parameter. + * @param arrayName Name of array parameter. + * @param enumName Name of the enumeration being validated. + * @param valid_values The list of valid values for the enumeration. + * @param count Number of enumeration values in the array. + * @param array Array of enumeration values to validate. + * @param countRequired The 'count' parameter may not be 0 when true. + * @param arrayRequired The 'array' parameter may not be NULL when true. + * @return Boolean value indicating that the call should be skipped. + */ template static bool validate_ranged_enum_array(debug_report_data *report_data, const char *apiName, const ParameterName &countName, const ParameterName &arrayName, const char *enumName, const std::vector &valid_values, @@ -699,47 +721,46 @@ static bool validate_ranged_enum_array(debug_report_data *report_data, const cha } /** -* Verify that a reserved VkFlags value is zero. -* -* Verify that the specified value is zero, to check VkFlags values that are reserved for -* future use. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param parameter_name Name of parameter being validated. -* @param value Value to validate. -* @return Boolean value indicating that the call should be skipped. -*/ + * Verify that a reserved VkFlags value is zero. + * + * Verify that the specified value is zero, to check VkFlags values that are reserved for + * future use. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param parameter_name Name of parameter being validated. + * @param value Value to validate. + * @return Boolean value indicating that the call should be skipped. + */ static bool validate_reserved_flags(debug_report_data *report_data, const char *api_name, const ParameterName ¶meter_name, VkFlags value, UNIQUE_VALIDATION_ERROR_CODE vuid) { bool skip_call = false; if (value != 0) { - skip_call |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - vuid, LayerName, "%s: parameter %s must be 0. %s", api_name, parameter_name.get_name().c_str(), - validation_error_map[vuid]); + skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, vuid, + LayerName, "%s: parameter %s must be 0. %s", api_name, parameter_name.get_name().c_str(), + validation_error_map[vuid]); } return skip_call; } /** -* Validate a Vulkan bitmask value. -* -* Generate a warning if a value with a VkFlags derived type does not contain valid flag bits -* for that type. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param parameter_name Name of parameter being validated. -* @param flag_bits_name Name of the VkFlags type being validated. -* @param all_flags A bit mask combining all valid flag bits for the VkFlags type being validated. -* @param value VkFlags value to validate. -* @param flags_required The 'value' parameter may not be 0 when true. -* @param singleFlag The 'value' parameter may not contain more than one bit from all_flags. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate a Vulkan bitmask value. + * + * Generate a warning if a value with a VkFlags derived type does not contain valid flag bits + * for that type. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param parameter_name Name of parameter being validated. + * @param flag_bits_name Name of the VkFlags type being validated. + * @param all_flags A bit mask combining all valid flag bits for the VkFlags type being validated. + * @param value VkFlags value to validate. + * @param flags_required The 'value' parameter may not be 0 when true. + * @param singleFlag The 'value' parameter may not contain more than one bit from all_flags. + * @return Boolean value indicating that the call should be skipped. + */ static bool validate_flags(debug_report_data *report_data, const char *api_name, const ParameterName ¶meter_name, const char *flag_bits_name, VkFlags all_flags, VkFlags value, bool flags_required, bool singleFlag, UNIQUE_VALIDATION_ERROR_CODE vuid) { @@ -748,8 +769,8 @@ static bool validate_flags(debug_report_data *report_data, const char *api_name, if (value == 0) { if (flags_required) { skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - vuid, LayerName, "%s: value of %s must not be 0. %s", api_name, - parameter_name.get_name().c_str(), validation_error_map[vuid]); + vuid, LayerName, "%s: value of %s must not be 0. %s", api_name, parameter_name.get_name().c_str(), + validation_error_map[vuid]); } } else if ((value & (~all_flags)) != 0) { skip_call |= @@ -767,23 +788,23 @@ static bool validate_flags(debug_report_data *report_data, const char *api_name, } /** -* Validate an array of Vulkan bitmask values. -* -* Generate a warning if a value with a VkFlags derived type does not contain valid flag bits -* for that type. -* -* @param report_data debug_report_data object for routing validation messages. -* @param api_name Name of API call being validated. -* @param count_name Name of parameter being validated. -* @param array_name Name of parameter being validated. -* @param flag_bits_name Name of the VkFlags type being validated. -* @param all_flags A bitmask combining all valid flag bits for the VkFlags type being validated. -* @param count Number of VkFlags values in the array. -* @param array Array of VkFlags value to validate. -* @param count_required The 'count' parameter may not be 0 when true. -* @param array_required The 'array' parameter may not be NULL when true. -* @return Boolean value indicating that the call should be skipped. -*/ + * Validate an array of Vulkan bitmask values. + * + * Generate a warning if a value with a VkFlags derived type does not contain valid flag bits + * for that type. + * + * @param report_data debug_report_data object for routing validation messages. + * @param api_name Name of API call being validated. + * @param count_name Name of parameter being validated. + * @param array_name Name of parameter being validated. + * @param flag_bits_name Name of the VkFlags type being validated. + * @param all_flags A bitmask combining all valid flag bits for the VkFlags type being validated. + * @param count Number of VkFlags values in the array. + * @param array Array of VkFlags value to validate. + * @param count_required The 'count' parameter may not be 0 when true. + * @param array_required The 'array' parameter may not be NULL when true. + * @return Boolean value indicating that the call should be skipped. + */ static bool validate_flags_array(debug_report_data *report_data, const char *api_name, const ParameterName &count_name, const ParameterName &array_name, const char *flag_bits_name, VkFlags all_flags, uint32_t count, const VkFlags *array, bool count_required, bool array_required) { @@ -816,14 +837,14 @@ static bool validate_flags_array(debug_report_data *report_data, const char *api } /** -* Get VkResult code description. -* -* Returns a string describing the specified VkResult code. The description is based on the language in the Vulkan API -* specification. -* -* @param value VkResult code to process. -* @return String describing the specified VkResult code. -*/ + * Get VkResult code description. + * + * Returns a string describing the specified VkResult code. The description is based on the language in the Vulkan API + * specification. + * + * @param value VkResult code to process. + * @return String describing the specified VkResult code. + */ static std::string get_result_description(VkResult result) { // clang-format off switch (result) { @@ -863,15 +884,15 @@ static std::string get_result_description(VkResult result) { } /** -* Validate return code. -* -* Print a message describing the reason for failure when an error code is returned. -* -* @param report_data debug_report_data object for routing validation messages. -* @param apiName Name of API call being validated. -* @param ignore vector of VkResult return codes to be ignored -* @param value VkResult value to validate. -*/ + * Validate return code. + * + * Print a message describing the reason for failure when an error code is returned. + * + * @param report_data debug_report_data object for routing validation messages. + * @param apiName Name of API call being validated. + * @param ignore vector of VkResult return codes to be ignored + * @param value VkResult value to validate. + */ static void validate_result(debug_report_data *report_data, const char *apiName, std::vector const &ignore, VkResult result) { if (result < 0 && result != VK_ERROR_VALIDATION_FAILED_EXT) { diff --git a/sources/third_party/vulkan/src/layers/parameter_validation_utils.cpp b/sources/third_party/vulkan/src/layers/parameter_validation_utils.cpp index d40c7eaf1302a9cc14066022ac69a1854407fded..569626548518e521dcf69e85c3f72c9cc9a5fc42 100644 --- a/sources/third_party/vulkan/src/layers/parameter_validation_utils.cpp +++ b/sources/third_party/vulkan/src/layers/parameter_validation_utils.cpp @@ -39,6 +39,7 @@ #include "vulkan/vk_layer.h" #include "vk_layer_config.h" #include "vk_dispatch_table_helper.h" +#include "vk_typemap_helper.h" #include "vk_layer_table.h" #include "vk_layer_data.h" @@ -49,19 +50,6 @@ #include "parameter_name.h" #include "parameter_validation.h" -// TODO: remove on NDK update (r15 will probably have proper STL impl) -#ifdef __ANDROID__ -namespace std { - -template -std::string to_string(T var) { - std::ostringstream ss; - ss << var; - return ss.str(); -} -} // namespace std -#endif - namespace parameter_validation { extern std::unordered_map custom_functions; @@ -82,6 +70,10 @@ extern bool parameter_validation_vkDestroyDebugReportCallbackEXT(VkInstance inst const VkAllocationCallbacks *pAllocator); extern bool parameter_validation_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool); +extern bool parameter_validation_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass); +extern bool parameter_validation_vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, + const VkAllocationCallbacks *pAllocator); // TODO : This can be much smarter, using separate locks for separate global data std::mutex global_lock; @@ -99,11 +91,20 @@ static void init_parameter_validation(instance_layer_data *instance_data, const static const VkExtensionProperties instance_extensions[] = {{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}}; static const VkLayerProperties global_layer = { - "VK_LAYER_LUNARG_parameter_validation", VK_LAYER_API_VERSION, 1, "LunarG Validation Layer", + "VK_LAYER_LUNARG_parameter_validation", + VK_LAYER_API_VERSION, + 1, + "LunarG Validation Layer", }; static const int MaxParamCheckerStringLength = 256; +template +static inline bool in_inclusive_range(const T &value, const T &min, const T &max) { + // Using only < for generality and || for early abort + return !((value < min) || (max < value)); +} + static bool validate_string(debug_report_data *report_data, const char *apiName, const ParameterName &stringName, const char *validateString) { assert(apiName != nullptr); @@ -139,12 +140,12 @@ static bool ValidateDeviceQueueFamily(layer_data *device_data, uint32_t queue_fa "%s: %s is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family index value. %s", cmd_name, parameter_name, vu_note); } else if (device_data->queueFamilyIndexMap.find(queue_family) == device_data->queueFamilyIndexMap.end()) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - HandleToUint64(device_data->device), __LINE__, error_code, LayerName, - "%s: %s (= %" PRIu32 - ") is not one of the queue families given via VkDeviceQueueCreateInfo structures when " - "the device was created. %s", - cmd_name, parameter_name, queue_family, vu_note); + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + HandleToUint64(device_data->device), __LINE__, error_code, LayerName, + "%s: %s (= %" PRIu32 + ") is not one of the queue families given via VkDeviceQueueCreateInfo structures when the device was created. %s", + cmd_name, parameter_name, queue_family, vu_note); } return skip; @@ -354,40 +355,13 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi if (pCreateInfo->pNext != NULL && pCreateInfo->pEnabledFeatures) { // Check for get_physical_device_properties2 struct - struct std_header { - VkStructureType sType; - const void *pNext; - }; - std_header *cur_pnext = (std_header *)pCreateInfo->pNext; - while (cur_pnext) { - if (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR == cur_pnext->sType) { - // Cannot include VkPhysicalDeviceFeatures2KHR and have non-null pEnabledFeatures - skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, __LINE__, INVALID_USAGE, LayerName, - "VkDeviceCreateInfo->pNext includes a VkPhysicalDeviceFeatures2KHR struct when " - "pCreateInfo->pEnabledFeatures is non-NULL."); - break; - } - cur_pnext = (std_header *)cur_pnext->pNext; - } - } - if (pCreateInfo->pNext != NULL && pCreateInfo->pEnabledFeatures) { - // Check for get_physical_device_properties2 struct - struct std_header { - VkStructureType sType; - const void *pNext; - }; - std_header *cur_pnext = (std_header *)pCreateInfo->pNext; - while (cur_pnext) { - if (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR == cur_pnext->sType) { - // Cannot include VkPhysicalDeviceFeatures2KHR and have non-null pEnabledFeatures - skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, __LINE__, INVALID_USAGE, LayerName, - "VkDeviceCreateInfo->pNext includes a VkPhysicalDeviceFeatures2KHR struct when " - "pCreateInfo->pEnabledFeatures is non-NULL."); - break; - } - cur_pnext = (std_header *)cur_pnext->pNext; + const auto *features2 = lvl_find_in_chain(pCreateInfo->pNext); + if (features2) { + // Cannot include VkPhysicalDeviceFeatures2KHR and have non-null pEnabledFeatures + skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, INVALID_USAGE, LayerName, + "VkDeviceCreateInfo->pNext includes a VkPhysicalDeviceFeatures2KHR struct when " + "pCreateInfo->pEnabledFeatures is non-NULL."); } } @@ -402,16 +376,15 @@ static bool ValidateDeviceCreateInfo(instance_layer_data *instance_data, VkPhysi VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, VALIDATION_ERROR_06c002fa, LayerName, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 - "].queueFamilyIndex is " - "VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family index value. %s", + "].queueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, but it is required to provide a valid queue family " + "index value. %s", i, validation_error_map[VALIDATION_ERROR_06c002fa]); } else if (set.count(requested_queue_family)) { skip |= log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, HandleToUint64(physicalDevice), __LINE__, VALIDATION_ERROR_056002e8, LayerName, "vkCreateDevice: pCreateInfo->pQueueCreateInfos[%" PRIu32 "].queueFamilyIndex (=%" PRIu32 - ") is " - "not unique within pCreateInfo->pQueueCreateInfos array. %s", + ") is not unique within pCreateInfo->pQueueCreateInfos array. %s", i, requested_queue_family, validation_error_map[VALIDATION_ERROR_056002e8]); } else { set.insert(requested_queue_family); @@ -471,8 +444,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c lock.lock(); - validate_result(my_instance_data->report_data, "vkCreateDevice", {}, result); - if (result == VK_SUCCESS) { layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map); assert(my_device_data != nullptr); @@ -498,8 +469,16 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c my_device_data->device = *pDevice; // Save app-enabled features in this device's layer_data structure - if (pCreateInfo->pEnabledFeatures) { - my_device_data->physical_device_features = *pCreateInfo->pEnabledFeatures; + // The enabled features can come from either pEnabledFeatures, or from the pNext chain + const VkPhysicalDeviceFeatures *enabled_features_found = pCreateInfo->pEnabledFeatures; + if ((nullptr == enabled_features_found) && my_device_data->extensions.vk_khr_get_physical_device_properties_2) { + const auto *features2 = lvl_find_in_chain(pCreateInfo->pNext); + if (features2) { + enabled_features_found = &(features2->features); + } + } + if (enabled_features_found) { + my_device_data->physical_device_features = *enabled_features_found; } else { memset(&my_device_data->physical_device_features, 0, sizeof(VkPhysicalDeviceFeatures)); } @@ -536,8 +515,8 @@ bool pv_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t qu skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, HandleToUint64(device), __LINE__, VALIDATION_ERROR_29600302, LayerName, "vkGetDeviceQueue: queueIndex (=%" PRIu32 - ") is not less than the number of queues requested from " - "queueFamilyIndex (=%" PRIu32 ") when the device was created (i.e. is not less than %" PRIu32 "). %s", + ") is not less than the number of queues requested from queueFamilyIndex (=%" PRIu32 + ") when the device was created (i.e. is not less than %" PRIu32 "). %s", queueIndex, queueFamilyIndex, queue_data->second, validation_error_map[VALIDATION_ERROR_29600302]); } return skip; @@ -578,9 +557,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP ((pCreateInfo->pipelineStatistics & (~AllVkQueryPipelineStatisticFlagBits)) != 0)) { skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_11c00630, LayerName, - "vkCreateQueryPool(): if pCreateInfo->queryType is " - "VK_QUERY_TYPE_PIPELINE_STATISTICS, pCreateInfo->pipelineStatistics must be " - "a valid combination of VkQueryPipelineStatisticFlagBits values. %s", + "vkCreateQueryPool(): if pCreateInfo->queryType is VK_QUERY_TYPE_PIPELINE_STATISTICS, " + "pCreateInfo->pipelineStatistics must be a valid combination of VkQueryPipelineStatisticFlagBits " + "values. %s", validation_error_map[VALIDATION_ERROR_11c00630]); } } @@ -590,16 +569,88 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryP return result; } +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + + { + std::unique_lock lock(global_lock); + skip |= parameter_validation_vkCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + + typedef bool (*PFN_manual_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass); + PFN_manual_vkCreateRenderPass custom_func = (PFN_manual_vkCreateRenderPass)custom_functions["vkCreateRenderPass"]; + if (custom_func != nullptr) { + skip |= custom_func(device, pCreateInfo, pAllocator, pRenderPass); + } + } + + if (!skip) { + result = device_data->dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + + // track the state necessary for checking vkCreateGraphicsPipeline (subpass usage of depth and color attachments) + if (result == VK_SUCCESS) { + std::unique_lock lock(global_lock); + const auto renderPass = *pRenderPass; + auto &renderpass_state = device_data->renderpasses_states[renderPass]; + + for (uint32_t subpass = 0; subpass < pCreateInfo->subpassCount; ++subpass) { + bool uses_color = false; + for (uint32_t i = 0; i < pCreateInfo->pSubpasses[subpass].colorAttachmentCount && !uses_color; ++i) + if (pCreateInfo->pSubpasses[subpass].pColorAttachments[i].attachment != VK_ATTACHMENT_UNUSED) uses_color = true; + + bool uses_depthstencil = false; + if (pCreateInfo->pSubpasses[subpass].pDepthStencilAttachment) + if (pCreateInfo->pSubpasses[subpass].pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) + uses_depthstencil = true; + + if (uses_color) renderpass_state.subpasses_using_color_attachment.insert(subpass); + if (uses_depthstencil) renderpass_state.subpasses_using_depthstencil_attachment.insert(subpass); + } + } + } + return result; +} + +VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + + { + std::unique_lock lock(global_lock); + skip |= parameter_validation_vkDestroyRenderPass(device, renderPass, pAllocator); + + typedef bool (*PFN_manual_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, + const VkAllocationCallbacks *pAllocator); + PFN_manual_vkDestroyRenderPass custom_func = (PFN_manual_vkDestroyRenderPass)custom_functions["vkDestroyRenderPass"]; + if (custom_func != nullptr) { + skip |= custom_func(device, renderPass, pAllocator); + } + } + + if (!skip) { + device_data->dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); + + // track the state necessary for checking vkCreateGraphicsPipeline (subpass usage of depth and color attachments) + { + std::unique_lock lock(global_lock); + device_data->renderpasses_states.erase(renderPass); + } + } +} + bool pv_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) { bool skip = false; layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, VK_NULL_HANDLE, LayerName, "vkCreateBuffer"}; + if (pCreateInfo != nullptr) { - // Buffer size must be greater than 0 (error 00663) - skip |= - ValidateGreaterThan(report_data, "vkCreateBuffer", "pCreateInfo->size", static_cast(pCreateInfo->size), 0u); + skip |= ValidateGreaterThanZero(pCreateInfo->size, "pCreateInfo->size", VALIDATION_ERROR_01400720, log_misc); // Validation for parameters excluded from the generated validation code due to a 'noautovalidity' tag in vk.xml if (pCreateInfo->sharingMode == VK_SHARING_MODE_CONCURRENT) { @@ -650,6 +701,8 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, VK_NULL_HANDLE, LayerName, "vkCreateImage"}; + if (pCreateInfo != nullptr) { if ((device_data->physical_device_features.textureCompressionETC2 == false) && FormatIsCompressed_ETC2_EAC(pCreateInfo->format)) { @@ -662,19 +715,18 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if ((device_data->physical_device_features.textureCompressionASTC_LDR == false) && FormatIsCompressed_ASTC_LDR(pCreateInfo->format)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionASTC_LDR feature is " - "not enabled: ASTC formats cannot be used to create images.", - string_VkFormat(pCreateInfo->format)); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + DEVICE_FEATURE, LayerName, + "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionASTC_LDR feature " + "is not enabled: ASTC formats cannot be used to create images.", + string_VkFormat(pCreateInfo->format)); } if ((device_data->physical_device_features.textureCompressionBC == false) && FormatIsCompressed_BC(pCreateInfo->format)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, DEVICE_FEATURE, LayerName, - "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionBC feature is " - "not enabled: BC compressed formats cannot be used to create images.", + "vkCreateImage(): Attempting to create VkImage with format %s. The textureCompressionBC feature is not " + "enabled: BC compressed formats cannot be used to create images.", string_VkFormat(pCreateInfo->format)); } @@ -706,23 +758,32 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con } } - // width, height, and depth members of extent must be greater than 0 - skip |= ValidateGreaterThan(report_data, "vkCreateImage", "pCreateInfo->extent.width", pCreateInfo->extent.width, 0u); - skip |= ValidateGreaterThan(report_data, "vkCreateImage", "pCreateInfo->extent.height", pCreateInfo->extent.height, 0u); - skip |= ValidateGreaterThan(report_data, "vkCreateImage", "pCreateInfo->extent.depth", pCreateInfo->extent.depth, 0u); + skip |= + ValidateGreaterThanZero(pCreateInfo->extent.width, "pCreateInfo->extent.width", VALIDATION_ERROR_09e00760, log_misc); + skip |= + ValidateGreaterThanZero(pCreateInfo->extent.height, "pCreateInfo->extent.height", VALIDATION_ERROR_09e00762, log_misc); + skip |= + ValidateGreaterThanZero(pCreateInfo->extent.depth, "pCreateInfo->extent.depth", VALIDATION_ERROR_09e00764, log_misc); - // mipLevels must be greater than 0 - skip |= ValidateGreaterThan(report_data, "vkCreateImage", "pCreateInfo->mipLevels", pCreateInfo->mipLevels, 0u); + skip |= ValidateGreaterThanZero(pCreateInfo->mipLevels, "pCreateInfo->mipLevels", VALIDATION_ERROR_09e00766, log_misc); + skip |= ValidateGreaterThanZero(pCreateInfo->arrayLayers, "pCreateInfo->arrayLayers", VALIDATION_ERROR_09e00768, log_misc); - // arrayLayers must be greater than 0 - skip |= ValidateGreaterThan(report_data, "vkCreateImage", "pCreateInfo->arrayLayers", pCreateInfo->arrayLayers, 0u); + // InitialLayout must be PREINITIALIZED or UNDEFINED + if ((pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_UNDEFINED) && + (pCreateInfo->initialLayout != VK_IMAGE_LAYOUT_PREINITIALIZED)) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e007c2, LayerName, + "vkCreateImage(): initialLayout is %s, must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED. %s", + string_VkImageLayout(pCreateInfo->initialLayout), validation_error_map[VALIDATION_ERROR_09e007c2]); + } // If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1 if ((pCreateInfo->imageType == VK_IMAGE_TYPE_1D) && (pCreateInfo->extent.height != 1) && (pCreateInfo->extent.depth != 1)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00778, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both " - "pCreateInfo->extent.height and pCreateInfo->extent.depth must be 1. %s", + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_1D, both pCreateInfo->extent.height and " + "pCreateInfo->extent.depth must be 1. %s", validation_error_map[VALIDATION_ERROR_09e00778]); } @@ -733,9 +794,9 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con (pCreateInfo->extent.width != pCreateInfo->extent.height)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e00774, LayerName, - "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D and " - "pCreateInfo->flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, " - "pCreateInfo->extent.width and pCreateInfo->extent.height must be equal. %s", + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_2D and pCreateInfo->flags contains " + "VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, pCreateInfo->extent.width and pCreateInfo->extent.height " + "must be equal. %s", validation_error_map[VALIDATION_ERROR_09e00774]); } @@ -748,9 +809,48 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con } } + // 3D image may have only 1 layer + if ((pCreateInfo->imageType == VK_IMAGE_TYPE_3D) && (pCreateInfo->arrayLayers != 1)) { + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00782, LayerName, + "vkCreateImage(): if pCreateInfo->imageType is VK_IMAGE_TYPE_3D, pCreateInfo->arrayLayers must be 1. %s", + validation_error_map[VALIDATION_ERROR_09e00782]); + } + + // If multi-sample, validate type, usage, tiling and mip levels. + if ((pCreateInfo->samples != VK_SAMPLE_COUNT_1_BIT) && + ((pCreateInfo->imageType != VK_IMAGE_TYPE_2D) || (pCreateInfo->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) || + (pCreateInfo->tiling != VK_IMAGE_TILING_OPTIMAL) || (pCreateInfo->mipLevels != 1))) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00784, LayerName, + "vkCreateImage(): Multi-sample image with incompatible type, usage, tiling, or mips. %s", + validation_error_map[VALIDATION_ERROR_09e00784]); + } + + if (0 != (pCreateInfo->usage & VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)) { + VkImageUsageFlags legal_flags = (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | + VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT); + // At least one of the legal attachment bits must be set + if (0 == (pCreateInfo->usage & legal_flags)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e0078c, LayerName, + "vkCreateImage(): Transient attachment image without a compatible attachment flag set. %s", + validation_error_map[VALIDATION_ERROR_09e0078c]); + } + // No flags other than the legal attachment bits may be set + legal_flags |= VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + if (0 != (pCreateInfo->usage & ~legal_flags)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_09e00786, LayerName, + "vkCreateImage(): Transient attachment image with incompatible usage flags set. %s", + validation_error_map[VALIDATION_ERROR_09e00786]); + } + } + // mipLevels must be less than or equal to floor(log2(max(extent.width,extent.height,extent.depth)))+1 uint32_t maxDim = std::max(std::max(pCreateInfo->extent.width, pCreateInfo->extent.height), pCreateInfo->extent.depth); - if (pCreateInfo->mipLevels > (floor(log2(maxDim)) + 1)) { + if (maxDim > 0 && pCreateInfo->mipLevels > (floor(log2(maxDim)) + 1)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_09e0077c, LayerName, @@ -776,8 +876,8 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if (VK_IMAGE_TILING_LINEAR == pCreateInfo->tiling) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, INVALID_USAGE, LayerName, - "vkCreateImage: if pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT " - "then image tiling of VK_IMAGE_TILING_LINEAR is not supported"); + "vkCreateImage: if pCreateInfo->flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT then image " + "tiling of VK_IMAGE_TILING_LINEAR is not supported"); } // Sparse 1D image isn't valid @@ -812,36 +912,32 @@ bool pv_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, con if (VK_IMAGE_TYPE_2D == pCreateInfo->imageType) { if ((VK_FALSE == device_data->physical_device_features.sparseResidency2Samples) && (VK_SAMPLE_COUNT_2_BIT == pCreateInfo->samples)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e0079a, LayerName, - "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2-sample image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079a]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_09e0079a, LayerName, + "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 2-sample image if " + "corresponding feature is not enabled on the device. %s", + validation_error_map[VALIDATION_ERROR_09e0079a]); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency4Samples) && (VK_SAMPLE_COUNT_4_BIT == pCreateInfo->samples)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e0079c, LayerName, - "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 4-sample image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079c]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_09e0079c, LayerName, + "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 4-sample image if " + "corresponding feature is not enabled on the device. %s", + validation_error_map[VALIDATION_ERROR_09e0079c]); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency8Samples) && (VK_SAMPLE_COUNT_8_BIT == pCreateInfo->samples)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e0079e, LayerName, - "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 8-sample image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e0079e]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_09e0079e, LayerName, + "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 8-sample image if " + "corresponding feature is not enabled on the device. %s", + validation_error_map[VALIDATION_ERROR_09e0079e]); } else if ((VK_FALSE == device_data->physical_device_features.sparseResidency16Samples) && (VK_SAMPLE_COUNT_16_BIT == pCreateInfo->samples)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_09e007a0, LayerName, - "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 16-sample image if corresponding " - "feature is not enabled on the device. %s", - validation_error_map[VALIDATION_ERROR_09e007a0]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_09e007a0, LayerName, + "vkCreateImage: cannot specify VK_IMAGE_CREATE_SPARSE_BINDING_BIT for 16-sample image if " + "corresponding feature is not enabled on the device. %s", + validation_error_map[VALIDATION_ERROR_09e007a0]); } } } @@ -915,6 +1011,169 @@ bool pv_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateI return skip; } +bool pv_VkViewport(const layer_data *device_data, const VkViewport &viewport, const char *fn_name, const char *param_name, + VkDebugReportObjectTypeEXT object_type, uint64_t object = 0) { + bool skip = false; + debug_report_data *report_data = device_data->report_data; + + // Note: for numerical correctness + // - float comparisons should expect NaN (comparison always false). + // - VkPhysicalDeviceLimits::maxViewportDimensions is uint32_t, not float -> careful. + + const auto f_lte_u32_exact = [](const float v1_f, const uint32_t v2_u32) { + if (std::isnan(v1_f)) return false; + if (v1_f <= 0.0f) return true; + + float intpart; + const float fract = modff(v1_f, &intpart); + + assert(std::numeric_limits::radix == 2); + const float u32_max_plus1 = ldexpf(1.0f, 32); // hopefully exact + if (intpart >= u32_max_plus1) return false; + + uint32_t v1_u32 = static_cast(intpart); + if (v1_u32 < v2_u32) + return true; + else if (v1_u32 == v2_u32 && fract == 0.0f) + return true; + else + return false; + }; + + const auto f_lte_u32_direct = [](const float v1_f, const uint32_t v2_u32) { + const float v2_f = static_cast(v2_u32); // not accurate for > radix^digits; and undefined rounding mode + return (v1_f <= v2_f); + }; + + // width + bool width_healthy = true; + const auto max_w = device_data->device_limits.maxViewportDimensions[0]; + + if (!(viewport.width > 0.0f)) { + width_healthy = false; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd4, + LayerName, "%s: %s.width (=%f) is not greater than 0.0. %s", fn_name, param_name, viewport.width, + validation_error_map[VALIDATION_ERROR_15000dd4]); + } else if (!(f_lte_u32_exact(viewport.width, max_w) || f_lte_u32_direct(viewport.width, max_w))) { + width_healthy = false; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd6, + LayerName, "%s: %s.width (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 "). %s", + fn_name, param_name, viewport.width, max_w, validation_error_map[VALIDATION_ERROR_15000dd6]); + } else if (!f_lte_u32_exact(viewport.width, max_w) && f_lte_u32_direct(viewport.width, max_w)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, __LINE__, NONE, LayerName, + "%s: %s.width (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[0] (=%" PRIu32 + "), but it is within the static_cast(maxViewportDimensions[0]) limit. %s", + fn_name, param_name, viewport.width, max_w, validation_error_map[VALIDATION_ERROR_15000dd6]); + } + + // height + bool height_healthy = true; + const bool negative_height_enabled = + device_data->extensions.vk_khr_maintenance1 || device_data->extensions.vk_amd_negative_viewport_height; + const auto max_h = device_data->device_limits.maxViewportDimensions[1]; + + if (!negative_height_enabled && !(viewport.height > 0.0f)) { + height_healthy = false; + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dd8, + LayerName, "%s: %s.height (=%f) is not greater 0.0. %s", fn_name, param_name, viewport.height, + validation_error_map[VALIDATION_ERROR_15000dd8]); + } else if (!(f_lte_u32_exact(fabsf(viewport.height), max_h) || f_lte_u32_direct(fabsf(viewport.height), max_h))) { + height_healthy = false; + + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dda, LayerName, + "%s: Absolute value of %s.height (=%f) exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 "). %s", + fn_name, param_name, viewport.height, max_h, validation_error_map[VALIDATION_ERROR_15000dda]); + } else if (!f_lte_u32_exact(fabsf(viewport.height), max_h) && f_lte_u32_direct(fabsf(viewport.height), max_h)) { + height_healthy = false; + + skip |= log_msg( + report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, object_type, object, __LINE__, NONE, LayerName, + "%s: Absolute value of %s.height (=%f) technically exceeds VkPhysicalDeviceLimits::maxViewportDimensions[1] (=%" PRIu32 + "), but it is within the static_cast(maxViewportDimensions[1]) limit. %s", + fn_name, param_name, viewport.height, max_h, validation_error_map[VALIDATION_ERROR_15000dda]); + } + + // x + bool x_healthy = true; + if (!(viewport.x >= device_data->device_limits.viewportBoundsRange[0])) { + x_healthy = false; + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000ddc, LayerName, + "%s: %s.x (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", fn_name, param_name, + viewport.x, device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000ddc]); + } + + // x + width + if (x_healthy && width_healthy) { + const float right_bound = viewport.x + viewport.width; + if (!(right_bound <= device_data->device_limits.viewportBoundsRange[1])) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a0, LayerName, + "%s: %s.x + %s.width (=%f + %f = %f) is greater than VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", + fn_name, param_name, param_name, viewport.x, viewport.width, right_bound, + device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a0]); + } + } + + // y + bool y_healthy = true; + if (!(viewport.y >= device_data->device_limits.viewportBoundsRange[0])) { + y_healthy = false; + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000dde, LayerName, + "%s: %s.y (=%f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", fn_name, param_name, + viewport.y, device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000dde]); + } else if (negative_height_enabled && !(viewport.y <= device_data->device_limits.viewportBoundsRange[1])) { + y_healthy = false; + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000de0, LayerName, + "%s: %s.y (=%f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", fn_name, param_name, + viewport.y, device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_15000de0]); + } + + // y + height + if (y_healthy && height_healthy) { + const float boundary = viewport.y + viewport.height; + + if (!(boundary <= device_data->device_limits.viewportBoundsRange[1])) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a2, + LayerName, + "%s: %s.y + %s.height (=%f + %f = %f) exceeds VkPhysicalDeviceLimits::viewportBoundsRange[1] (=%f). %s", + fn_name, param_name, param_name, viewport.y, viewport.height, boundary, + device_data->device_limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a2]); + } else if (negative_height_enabled && !(boundary >= device_data->device_limits.viewportBoundsRange[0])) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_15000de2, LayerName, + "%s: %s.y + %s.height (=%f + %f = %f) is less than VkPhysicalDeviceLimits::viewportBoundsRange[0] (=%f). %s", + fn_name, param_name, param_name, viewport.y, viewport.height, boundary, + device_data->device_limits.viewportBoundsRange[0], validation_error_map[VALIDATION_ERROR_15000de2]); + } + } + + if (!device_data->extensions.vk_ext_depth_range_unrestricted) { + // minDepth + if (!(viewport.minDepth >= 0.0) || !(viewport.minDepth <= 1.0)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a4, + LayerName, + "%s: VK_EXT_depth_range_unrestricted extension is not enabled and %s.minDepth (=%f) is not within the " + "[0.0, 1.0] range. %s", + fn_name, param_name, viewport.minDepth, validation_error_map[VALIDATION_ERROR_150009a4]); + } + + // maxDepth + if (!(viewport.maxDepth >= 0.0) || !(viewport.maxDepth <= 1.0)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, object, __LINE__, VALIDATION_ERROR_150009a6, + LayerName, + "%s: VK_EXT_depth_range_unrestricted extension is not enabled and %s.maxDepth (=%f) is not within the " + "[0.0, 1.0] range. %s", + fn_name, param_name, viewport.maxDepth, validation_error_map[VALIDATION_ERROR_150009a6]); + } + } + + return skip; +} + bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { @@ -924,6 +1183,25 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if (pCreateInfos != nullptr) { for (uint32_t i = 0; i < createInfoCount; ++i) { + bool has_dynamic_viewport = false; + bool has_dynamic_scissor = false; + bool has_dynamic_line_width = false; + bool has_dynamic_viewport_w_scaling_nv = false; + bool has_dynamic_discard_rectangle_ext = false; + bool has_dynamic_sample_locations_ext = false; + if (pCreateInfos[i].pDynamicState != nullptr) { + const auto &dynamic_state_info = *pCreateInfos[i].pDynamicState; + for (uint32_t state_index = 0; state_index < dynamic_state_info.dynamicStateCount; ++state_index) { + const auto &dynamic_state = dynamic_state_info.pDynamicStates[state_index]; + if (dynamic_state == VK_DYNAMIC_STATE_VIEWPORT) has_dynamic_viewport = true; + if (dynamic_state == VK_DYNAMIC_STATE_SCISSOR) has_dynamic_scissor = true; + if (dynamic_state == VK_DYNAMIC_STATE_LINE_WIDTH) has_dynamic_line_width = true; + if (dynamic_state == VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV) has_dynamic_viewport_w_scaling_nv = true; + if (dynamic_state == VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT) has_dynamic_discard_rectangle_ext = true; + if (dynamic_state == VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT) has_dynamic_sample_locations_ext = true; + } + } + // Validation for parameters excluded from the generated validation code due to a 'noautovalidity' tag in vk.xml if (pCreateInfos[i].pVertexInputState != nullptr) { auto const &vertex_input_state = pCreateInfos[i].pVertexInputState; @@ -1045,118 +1323,158 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache if ((pCreateInfos[i].pRasterizationState != nullptr) && (pCreateInfos[i].pRasterizationState->rasterizerDiscardEnable == VK_FALSE)) { if (pCreateInfos[i].pViewportState == nullptr) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_096005dc, LayerName, - "vkCreateGraphicsPipelines: if pCreateInfos[%d].pRasterizationState->rasterizerDiscardEnable " - "is VK_FALSE, pCreateInfos[%d].pViewportState must be a pointer to a valid " - "VkPipelineViewportStateCreateInfo structure. %s", + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_096005dc, LayerName, + "vkCreateGraphicsPipelines: Rasterization is enabled (pCreateInfos[%" PRIu32 + "].pRasterizationState->rasterizerDiscardEnable is VK_FALSE), but pCreateInfos[%" PRIu32 + "].pViewportState (=NULL) is not a valid pointer. %s", i, i, validation_error_map[VALIDATION_ERROR_096005dc]); } else { - if (pCreateInfos[i].pViewportState->scissorCount != pCreateInfos[i].pViewportState->viewportCount) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_10c00988, LayerName, - "Graphics Pipeline viewport count (%u) must match scissor count (%u). %s", - pCreateInfos[i].pViewportState->viewportCount, pCreateInfos[i].pViewportState->scissorCount, - validation_error_map[VALIDATION_ERROR_10c00988]); + const auto &viewport_state = *pCreateInfos[i].pViewportState; + + if (viewport_state.sType != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c2b00b, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->sType is not VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO. %s", + i, validation_error_map[VALIDATION_ERROR_10c2b00b]); } + const VkStructureType allowed_structs_VkPipelineViewportStateCreateInfo[] = { + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV, + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV}; skip |= validate_struct_pnext( report_data, "vkCreateGraphicsPipelines", - ParameterName("pCreateInfos[%i].pViewportState->pNext", ParameterName::IndexVector{i}), NULL, - pCreateInfos[i].pViewportState->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_10c1c40d); + ParameterName("pCreateInfos[%i].pViewportState->pNext", ParameterName::IndexVector{i}), + "VkPipelineViewportSwizzleStateCreateInfoNV, VkPipelineViewportWScalingStateCreateInfoNV", + viewport_state.pNext, ARRAY_SIZE(allowed_structs_VkPipelineViewportStateCreateInfo), + allowed_structs_VkPipelineViewportStateCreateInfo, 65, VALIDATION_ERROR_10c1c40d); skip |= validate_reserved_flags( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pViewportState->flags", ParameterName::IndexVector{i}), - pCreateInfos[i].pViewportState->flags, VALIDATION_ERROR_10c09005); - - if (pCreateInfos[i].pViewportState->sType != VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, INVALID_STRUCT_STYPE, LayerName, - "vkCreateGraphicsPipelines: parameter pCreateInfos[%d].pViewportState->sType must be " - "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO", - i); - } + viewport_state.flags, VALIDATION_ERROR_10c09005); + + if (!device_data->physical_device_features.multiViewport) { + if (viewport_state.viewportCount != 1) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00980, LayerName, + "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " + "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->viewportCount (=%" PRIu32 + ") is not 1. %s", + i, viewport_state.viewportCount, validation_error_map[VALIDATION_ERROR_10c00980]); + } - if (device_data->physical_device_features.multiViewport == false) { - if (pCreateInfos[i].pViewportState->viewportCount != 1) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_10c00980, LayerName, - "vkCreateGraphicsPipelines: The multiViewport feature is not enabled, so " - "pCreateInfos[%d].pViewportState->viewportCount must be 1 but is %d. %s", - i, pCreateInfos[i].pViewportState->viewportCount, - validation_error_map[VALIDATION_ERROR_10c00980]); + if (viewport_state.scissorCount != 1) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00982, LayerName, + "vkCreateGraphicsPipelines: The VkPhysicalDeviceFeatures::multiViewport feature is " + "disabled, but pCreateInfos[%" PRIu32 "].pViewportState->scissorCount (=%" PRIu32 + ") is not 1. %s", + i, viewport_state.scissorCount, validation_error_map[VALIDATION_ERROR_10c00982]); } - if (pCreateInfos[i].pViewportState->scissorCount != 1) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_10c00982, LayerName, - "vkCreateGraphicsPipelines: The multiViewport feature is not enabled, so " - "pCreateInfos[%d].pViewportState->scissorCount must be 1 but is %d. %s", - i, pCreateInfos[i].pViewportState->scissorCount, - validation_error_map[VALIDATION_ERROR_10c00982]); + } else { // multiViewport enabled + if (viewport_state.viewportCount == 0) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c30a1b, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->viewportCount is 0. %s", + i, validation_error_map[VALIDATION_ERROR_10c30a1b]); + } else if (viewport_state.viewportCount > device_data->device_limits.maxViewports) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00984, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->viewportCount (=%" PRIu32 + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", + i, viewport_state.viewportCount, device_data->device_limits.maxViewports, + validation_error_map[VALIDATION_ERROR_10c00984]); } - } else { - if ((pCreateInfos[i].pViewportState->viewportCount < 1) || - (pCreateInfos[i].pViewportState->viewportCount > device_data->device_limits.maxViewports)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_10c00984, LayerName, - "vkCreateGraphicsPipelines: multiViewport feature is enabled; " - "pCreateInfos[%d].pViewportState->viewportCount is %d but must be between 1 and " - "maxViewports (%d), inclusive. %s", - i, pCreateInfos[i].pViewportState->viewportCount, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_10c00984]); - } - if ((pCreateInfos[i].pViewportState->scissorCount < 1) || - (pCreateInfos[i].pViewportState->scissorCount > device_data->device_limits.maxViewports)) { - skip |= - log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_10c00986, LayerName, - "vkCreateGraphicsPipelines: multiViewport feature is enabled; " - "pCreateInfos[%d].pViewportState->scissorCount is %d but must be between 1 and " - "maxViewports (%d), inclusive. %s", - i, pCreateInfos[i].pViewportState->scissorCount, device_data->device_limits.maxViewports, - validation_error_map[VALIDATION_ERROR_10c00986]); + + if (viewport_state.scissorCount == 0) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c2b61b, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->scissorCount is 0. %s", + i, validation_error_map[VALIDATION_ERROR_10c2b61b]); + } else if (viewport_state.scissorCount > device_data->device_limits.maxViewports) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00986, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->scissorCount (=%" PRIu32 + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", + i, viewport_state.scissorCount, device_data->device_limits.maxViewports, + validation_error_map[VALIDATION_ERROR_10c00986]); } } - if (pCreateInfos[i].pDynamicState != nullptr) { - bool has_dynamic_viewport = false; - bool has_dynamic_scissor = false; - - for (uint32_t state_index = 0; state_index < pCreateInfos[i].pDynamicState->dynamicStateCount; - ++state_index) { - if (pCreateInfos[i].pDynamicState->pDynamicStates[state_index] == VK_DYNAMIC_STATE_VIEWPORT) { - has_dynamic_viewport = true; - } else if (pCreateInfos[i].pDynamicState->pDynamicStates[state_index] == VK_DYNAMIC_STATE_SCISSOR) { - has_dynamic_scissor = true; - } - } + if (viewport_state.scissorCount != viewport_state.viewportCount) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, VALIDATION_ERROR_10c00988, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pViewportState->scissorCount (=%" PRIu32 ") is not identical to pCreateInfos[%" PRIu32 + "].pViewportState->viewportCount (=%" PRIu32 "). %s", + i, viewport_state.scissorCount, i, viewport_state.viewportCount, + validation_error_map[VALIDATION_ERROR_10c00988]); + } - // If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports - // member of pViewportState must be a pointer to an array of pViewportState->viewportCount VkViewport - // structures - if (!has_dynamic_viewport && (pCreateInfos[i].pViewportState->pViewports == nullptr)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_096005d6, LayerName, - "vkCreateGraphicsPipelines: if pCreateInfos[%d].pDynamicState->pDynamicStates does not " - "contain VK_DYNAMIC_STATE_VIEWPORT, pCreateInfos[%d].pViewportState->pViewports must " - "not be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005d6]); - } + if (!has_dynamic_viewport && viewport_state.viewportCount > 0 && viewport_state.pViewports == nullptr) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, + __LINE__, VALIDATION_ERROR_096005d6, LayerName, + "vkCreateGraphicsPipelines: The viewport state is static (pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_VIEWPORT), but pCreateInfos[%" PRIu32 + "].pViewportState->pViewports (=NULL) is an invalid pointer. %s", + i, i, validation_error_map[VALIDATION_ERROR_096005d6]); + } - // If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors - // member - // of pViewportState must be a pointer to an array of pViewportState->scissorCount VkRect2D structures - if (!has_dynamic_scissor && (pCreateInfos[i].pViewportState->pScissors == nullptr)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_096005d8, LayerName, - "vkCreateGraphicsPipelines: if pCreateInfos[%d].pDynamicState->pDynamicStates does not " - "contain VK_DYNAMIC_STATE_SCISSOR, pCreateInfos[%d].pViewportState->pScissors must not " - "be NULL. %s", - i, i, validation_error_map[VALIDATION_ERROR_096005d8]); + if (!has_dynamic_scissor && viewport_state.scissorCount > 0 && viewport_state.pScissors == nullptr) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, VK_NULL_HANDLE, + __LINE__, VALIDATION_ERROR_096005d8, LayerName, + "vkCreateGraphicsPipelines: The scissor state is static (pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_SCISSOR), but pCreateInfos[%" PRIu32 + "].pViewportState->pScissors (=NULL) is an invalid pointer. %s", + i, i, validation_error_map[VALIDATION_ERROR_096005d8]); + } + + // validate the VkViewports + if (!has_dynamic_viewport && viewport_state.pViewports) { + for (uint32_t viewport_i = 0; viewport_i < viewport_state.viewportCount; ++viewport_i) { + const auto &viewport = viewport_state.pViewports[viewport_i]; // will crash on invalid ptr + const char fn_name[] = "vkCreateGraphicsPipelines"; + const std::string param_name = "pCreateInfos[" + std::to_string(i) + "].pViewportState->pViewports[" + + std::to_string(viewport_i) + "]"; + skip |= pv_VkViewport(device_data, viewport, fn_name, param_name.c_str(), + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT); } } + + if (has_dynamic_viewport_w_scaling_nv && !device_data->extensions.vk_nv_clip_space_w_scaling) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, EXTENSION_NOT_ENABLED, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, but " + "VK_NV_clip_space_w_scaling extension is not enabled.", + i); + } + + if (has_dynamic_discard_rectangle_ext && !device_data->extensions.vk_ext_discard_rectangles) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, EXTENSION_NOT_ENABLED, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, but " + "VK_EXT_discard_rectangles extension is not enabled.", + i); + } + + if (has_dynamic_sample_locations_ext && !device_data->extensions.vk_ext_sample_locations) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, + VK_NULL_HANDLE, __LINE__, EXTENSION_NOT_ENABLED, LayerName, + "vkCreateGraphicsPipelines: pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates contains VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, but " + "VK_EXT_sample_locations extension is not enabled.", + i); + } } if (pCreateInfos[i].pMultisampleState == nullptr) { @@ -1166,10 +1484,17 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache "is VK_FALSE, pCreateInfos[%d].pMultisampleState must not be NULL. %s", i, i, validation_error_map[VALIDATION_ERROR_096005de]); } else { + const VkStructureType valid_next_stypes[] = {LvlTypeMap::kSType, + LvlTypeMap::kSType, + LvlTypeMap::kSType}; + const char *valid_struct_names = + "VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, " + "VkPipelineSampleLocationsStateCreateInfoEXT"; skip |= validate_struct_pnext( report_data, "vkCreateGraphicsPipelines", - ParameterName("pCreateInfos[%i].pMultisampleState->pNext", ParameterName::IndexVector{i}), NULL, - pCreateInfos[i].pMultisampleState->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_1001c40d); + ParameterName("pCreateInfos[%i].pMultisampleState->pNext", ParameterName::IndexVector{i}), + valid_struct_names, pCreateInfos[i].pMultisampleState->pNext, 3, valid_next_stypes, GeneratedHeaderVersion, + VALIDATION_ERROR_1001c40d); skip |= validate_reserved_flags( report_data, "vkCreateGraphicsPipelines", @@ -1205,10 +1530,40 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache "VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO", i); } + if (pCreateInfos[i].pMultisampleState->sampleShadingEnable == VK_TRUE) { + if (!device_data->physical_device_features.sampleRateShading) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_10000620, LayerName, + "vkCreateGraphicsPipelines(): parameter " + "pCreateInfos[%d].pMultisampleState->sampleShadingEnable: %s", + i, validation_error_map[VALIDATION_ERROR_10000620]); + } + // TODO Add documentation issue about when minSampleShading must be in range and when it is ignored + // For now a "least noise" test *only* when sampleShadingEnable is VK_TRUE. + if (!in_inclusive_range(pCreateInfos[i].pMultisampleState->minSampleShading, 0.F, 1.0F)) { + skip |= log_msg( + report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_10000624, LayerName, + "vkCreateGraphicsPipelines(): parameter pCreateInfos[%d].pMultisampleState->minSampleShading: %s", + i, validation_error_map[VALIDATION_ERROR_10000624]); + } + } + } + + bool uses_color_attachment = false; + bool uses_depthstencil_attachment = false; + { + const auto subpasses_uses_it = device_data->renderpasses_states.find(pCreateInfos[i].renderPass); + if (subpasses_uses_it != device_data->renderpasses_states.end()) { + const auto &subpasses_uses = subpasses_uses_it->second; + if (subpasses_uses.subpasses_using_color_attachment.count(pCreateInfos[i].subpass)) + uses_color_attachment = true; + if (subpasses_uses.subpasses_using_depthstencil_attachment.count(pCreateInfos[i].subpass)) + uses_depthstencil_attachment = true; + } } - // TODO: Conditional NULL check based on subpass depth/stencil attachment - if (pCreateInfos[i].pDepthStencilState != nullptr) { + if (pCreateInfos[i].pDepthStencilState != nullptr && uses_depthstencil_attachment) { skip |= validate_struct_pnext( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pDepthStencilState->pNext", ParameterName::IndexVector{i}), NULL, @@ -1302,8 +1657,7 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } - // TODO: Conditional NULL check based on subpass color attachment - if (pCreateInfos[i].pColorBlendState != nullptr) { + if (pCreateInfos[i].pColorBlendState != nullptr && uses_color_attachment) { skip |= validate_struct_pnext( report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pColorBlendState->pNext", ParameterName::IndexVector{i}), NULL, @@ -1409,57 +1763,54 @@ bool pv_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache } } } - } - if (pCreateInfos != nullptr) { - if (pCreateInfos->flags & VK_PIPELINE_CREATE_DERIVATIVE_BIT) { - if (pCreateInfos->basePipelineIndex != -1) { - if (pCreateInfos->basePipelineHandle != VK_NULL_HANDLE) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_096005a8, LayerName, - "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineHandle, must be VK_NULL_HANDLE if " - "pCreateInfos->flags " - "contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag and pCreateInfos->basePipelineIndex is not -1. %s", - validation_error_map[VALIDATION_ERROR_096005a8]); + if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_DERIVATIVE_BIT) { + if (pCreateInfos[i].basePipelineIndex != -1) { + if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_096005a8, LayerName, + "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineHandle, must be " + "VK_NULL_HANDLE if pCreateInfos->flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag " + "and pCreateInfos->basePipelineIndex is not -1. %s", + validation_error_map[VALIDATION_ERROR_096005a8]); } } - if (pCreateInfos->basePipelineHandle != VK_NULL_HANDLE) { - if (pCreateInfos->basePipelineIndex != -1) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_096005aa, LayerName, - "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineIndex, must be -1 if " - "pCreateInfos->flags " - "contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag and pCreateInfos->basePipelineHandle is not " - "VK_NULL_HANDLE. %s", - validation_error_map[VALIDATION_ERROR_096005aa]); + if (pCreateInfos[i].basePipelineHandle != VK_NULL_HANDLE) { + if (pCreateInfos[i].basePipelineIndex != -1) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_096005aa, LayerName, + "vkCreateGraphicsPipelines parameter, pCreateInfos->basePipelineIndex, must be -1 if " + "pCreateInfos->flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag and " + "pCreateInfos->basePipelineHandle is not VK_NULL_HANDLE. %s", + validation_error_map[VALIDATION_ERROR_096005aa]); } } } - if (pCreateInfos->pRasterizationState != nullptr) { - if (pCreateInfos->pRasterizationState->cullMode & ~VK_CULL_MODE_FRONT_AND_BACK) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - UNRECOGNIZED_VALUE, LayerName, - "vkCreateGraphicsPipelines parameter, VkCullMode pCreateInfos->pRasterizationState->cullMode, is an " - "unrecognized enumerator"); + if (pCreateInfos[i].pRasterizationState) { + if ((pCreateInfos[i].pRasterizationState->polygonMode != VK_POLYGON_MODE_FILL) && + (device_data->physical_device_features.fillModeNonSolid == false)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, DEVICE_FEATURE, LayerName, + "vkCreateGraphicsPipelines parameter, VkPolygonMode " + "pCreateInfos->pRasterizationState->polygonMode cannot be VK_POLYGON_MODE_POINT or " + "VK_POLYGON_MODE_LINE if VkPhysicalDeviceFeatures->fillModeNonSolid is false."); } - if ((pCreateInfos->pRasterizationState->polygonMode != VK_POLYGON_MODE_FILL) && - (device_data->physical_device_features.fillModeNonSolid == false)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCreateGraphicsPipelines parameter, VkPolygonMode pCreateInfos->pRasterizationState->polygonMode cannot " - "be " - "VK_POLYGON_MODE_POINT or VK_POLYGON_MODE_LINE if VkPhysicalDeviceFeatures->fillModeNonSolid is false."); + if (!has_dynamic_line_width && !device_data->physical_device_features.wideLines && + (pCreateInfos[i].pRasterizationState->lineWidth != 1.0f)) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, 0, __LINE__, VALIDATION_ERROR_096005da, LayerName, + "The line width state is static (pCreateInfos[%" PRIu32 + "].pDynamicState->pDynamicStates does not contain VK_DYNAMIC_STATE_LINE_WIDTH) and " + "VkPhysicalDeviceFeatures::wideLines is disabled, but pCreateInfos[%" PRIu32 + "].pRasterizationState->lineWidth (=%f) is not 1.0. %s", + i, i, pCreateInfos[i].pRasterizationState->lineWidth, + validation_error_map[VALIDATION_ERROR_096005da]); } } - size_t i = 0; for (size_t j = 0; j < pCreateInfos[i].stageCount; j++) { skip |= validate_string(device_data->report_data, "vkCreateGraphicsPipelines", ParameterName("pCreateInfos[%i].pStages[%i].pName", ParameterName::IndexVector{i, j}), @@ -1493,12 +1844,34 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, debug_report_data *report_data = device_data->report_data; if (pCreateInfo != nullptr) { - if ((device_data->physical_device_features.samplerAnisotropy == false) && (pCreateInfo->maxAnisotropy != 1.0)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCreateSampler(): The samplerAnisotropy feature was not enabled at device-creation time, so the " - "maxAnisotropy member of the VkSamplerCreateInfo structure must be 1.0 but is %f.", - pCreateInfo->maxAnisotropy); + const auto &features = device_data->physical_device_features; + const auto &limits = device_data->device_limits; + if (pCreateInfo->anisotropyEnable == VK_TRUE) { + if (!in_inclusive_range(pCreateInfo->maxAnisotropy, 1.0F, limits.maxSamplerAnisotropy)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_1260085e, LayerName, + "vkCreateSampler(): value of %s must be in range [1.0, %f] %s, but %f found. %s", + "pCreateInfo->maxAnisotropy", limits.maxSamplerAnisotropy, + "VkPhysicalDeviceLimits::maxSamplerAnistropy", pCreateInfo->maxAnisotropy, + validation_error_map[VALIDATION_ERROR_1260085e]); + } + + // Anistropy cannot be enabled in sampler unless enabled as a feature + if (features.samplerAnisotropy == VK_FALSE) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_1260085c, LayerName, + "vkCreateSampler(): Anisotropic sampling feature is not enabled, %s must be VK_FALSE. %s", + "pCreateInfo->anisotropyEnable", validation_error_map[VALIDATION_ERROR_1260085c]); + } + + // Anistropy and unnormalized coordinates cannot be enabled simultaneously + if (pCreateInfo->unnormalizedCoordinates == VK_TRUE) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_12600868, LayerName, + "vkCreateSampler(): pCreateInfo->anisotropyEnable and pCreateInfo->unnormalizedCoordinates must " + "not both be VK_TRUE. %s", + validation_error_map[VALIDATION_ERROR_12600868]); + } } // If compareEnable is VK_TRUE, compareOp must be a valid VkCompareOp value @@ -1529,6 +1902,18 @@ bool pv_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, "but the VK_KHR_sampler_mirror_clamp_to_edge extension has not been enabled. %s", validation_error_map[VALIDATION_ERROR_1260086e]); } + + // Checks for the IMG cubic filtering extension + if (device_data->extensions.vk_img_filter_cubic) { + if ((pCreateInfo->anisotropyEnable == VK_TRUE) && + ((pCreateInfo->minFilter == VK_FILTER_CUBIC_IMG) || (pCreateInfo->magFilter == VK_FILTER_CUBIC_IMG))) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_12600872, LayerName, + "vkCreateSampler(): Anisotropic sampling must not be VK_TRUE when either minFilter or magFilter " + "are VK_FILTER_CUBIC_IMG. %s", + validation_error_map[VALIDATION_ERROR_12600872]); + } + } } return skip; @@ -1556,8 +1941,7 @@ bool pv_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, REQUIRED_PARAMETER, LayerName, "vkCreateDescriptorSetLayout: required parameter " - "pCreateInfo->pBindings[%d].pImmutableSamplers[%d]" - " specified as VK_NULL_HANDLE", + "pCreateInfo->pBindings[%d].pImmutableSamplers[%d] specified as VK_NULL_HANDLE", i, descriptor_index); } } @@ -1566,12 +1950,12 @@ bool pv_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout // If descriptorCount is not 0, stageFlags must be a valid combination of VkShaderStageFlagBits values if ((pCreateInfo->pBindings[i].stageFlags != 0) && ((pCreateInfo->pBindings[i].stageFlags & (~AllVkShaderStageFlagBits)) != 0)) { - skip |= log_msg( - report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_04e00236, LayerName, - "vkCreateDescriptorSetLayout(): if pCreateInfo->pBindings[%d].descriptorCount is not 0, " - "pCreateInfo->pBindings[%d].stageFlags must be a valid combination of VkShaderStageFlagBits values. %s", - i, i, validation_error_map[VALIDATION_ERROR_04e00236]); + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, VALIDATION_ERROR_04e00236, LayerName, + "vkCreateDescriptorSetLayout(): if pCreateInfo->pBindings[%d].descriptorCount is not 0, " + "pCreateInfo->pBindings[%d].stageFlags must be a valid combination of VkShaderStageFlagBits " + "values. %s", + i, i, validation_error_map[VALIDATION_ERROR_04e00236]); } } } @@ -1837,139 +2221,131 @@ bool pv_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, bool skip = false; layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); - skip |= validate_array(device_data->report_data, "vkCmdSetViewport", "viewportCount", "pViewports", viewportCount, pViewports, - true, true, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + if (!device_data->physical_device_features.multiViewport) { + if (firstViewport != 0) { + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000990, LayerName, + "vkCmdSetViewport: The multiViewport feature is disabled, but firstViewport (=%" PRIu32 ") is not 0. %s", + firstViewport, validation_error_map[VALIDATION_ERROR_1e000990]); + } + if (viewportCount > 1) { + skip |= + log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e000992, LayerName, + "vkCmdSetViewport: The multiViewport feature is disabled, but viewportCount (=%" PRIu32 ") is not 1. %s", + viewportCount, validation_error_map[VALIDATION_ERROR_1e000992]); + } + } else { // multiViewport enabled + const uint64_t sum = static_cast(firstViewport) + static_cast(viewportCount); + if (sum > device_data->device_limits.maxViewports) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1e00098e, LayerName, + "vkCmdSetViewport: firstViewport + viewportCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", + firstViewport, viewportCount, sum, device_data->device_limits.maxViewports, + validation_error_map[VALIDATION_ERROR_1e00098e]); + } + } - if (viewportCount > 0 && pViewports != nullptr) { - const VkPhysicalDeviceLimits &limits = device_data->device_limits; - for (uint32_t viewportIndex = 0; viewportIndex < viewportCount; ++viewportIndex) { - const VkViewport &viewport = pViewports[viewportIndex]; + if (pViewports) { + for (uint32_t viewport_i = 0; viewport_i < viewportCount; ++viewport_i) { + const auto &viewport = pViewports[viewport_i]; // will crash on invalid ptr + const char fn_name[] = "vkCmdSetViewport"; + const std::string param_name = "pViewports[" + std::to_string(viewport_i) + "]"; + skip |= pv_VkViewport(device_data, viewport, fn_name, param_name.c_str(), + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, HandleToUint64(commandBuffer)); + } + } - if (device_data->physical_device_features.multiViewport == false) { - if (viewportCount != 1) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, DEVICE_FEATURE, LayerName, - "vkCmdSetViewport(): The multiViewport feature is not enabled, so viewportCount must be 1 but is %d.", - viewportCount); - } - if (firstViewport != 0) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, DEVICE_FEATURE, LayerName, - "vkCmdSetViewport(): The multiViewport feature is not enabled, so firstViewport must be 0 but is %d.", - firstViewport); - } - } + return skip; +} - if (viewport.width <= 0 || viewport.width > limits.maxViewportDimensions[0]) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_15000996, LayerName, - "vkCmdSetViewport %d: width (%f) exceeds permitted bounds (0,%u). %s", viewportIndex, - viewport.width, limits.maxViewportDimensions[0], validation_error_map[VALIDATION_ERROR_15000996]); - } +bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors) { + bool skip = false; + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + debug_report_data *report_data = device_data->report_data; - if (device_data->extensions.vk_amd_negative_viewport_height || device_data->extensions.vk_khr_maintenance1) { - // Check lower bound against negative viewport height instead of zero - if (viewport.height <= -(static_cast(limits.maxViewportDimensions[1])) || - (viewport.height > limits.maxViewportDimensions[1])) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_1500099a, LayerName, - "vkCmdSetViewport %d: height (%f) exceeds permitted bounds (-%u,%u). %s", viewportIndex, - viewport.height, limits.maxViewportDimensions[1], limits.maxViewportDimensions[1], - validation_error_map[VALIDATION_ERROR_1500099a]); - } - } else { - if ((viewport.height <= 0) || (viewport.height > limits.maxViewportDimensions[1])) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_15000998, LayerName, - "vkCmdSetViewport %d: height (%f) exceeds permitted bounds (0,%u). %s", viewportIndex, - viewport.height, limits.maxViewportDimensions[1], validation_error_map[VALIDATION_ERROR_15000998]); - } - } + if (!device_data->physical_device_features.multiViewport) { + if (firstScissor != 0) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a2, LayerName, + "vkCmdSetScissor: The multiViewport feature is disabled, but firstScissor (=%" PRIu32 ") is not 0. %s", + firstScissor, validation_error_map[VALIDATION_ERROR_1d8004a2]); + } + if (scissorCount > 1) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a4, LayerName, + "vkCmdSetScissor: The multiViewport feature is disabled, but scissorCount (=%" PRIu32 ") is not 1. %s", + scissorCount, validation_error_map[VALIDATION_ERROR_1d8004a4]); + } + } else { // multiViewport enabled + const uint64_t sum = static_cast(firstScissor) + static_cast(scissorCount); + if (sum > device_data->device_limits.maxViewports) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a0, LayerName, + "vkCmdSetScissor: firstScissor + scissorCount (=%" PRIu32 " + %" PRIu32 " = %" PRIu64 + ") is greater than VkPhysicalDeviceLimits::maxViewports (=%" PRIu32 "). %s", + firstScissor, scissorCount, sum, device_data->device_limits.maxViewports, + validation_error_map[VALIDATION_ERROR_1d8004a0]); + } + } - if (viewport.x < limits.viewportBoundsRange[0] || viewport.x > limits.viewportBoundsRange[1]) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1500099e, LayerName, - "vkCmdSetViewport %d: x (%f) exceeds permitted bounds (%f,%f). %s", viewportIndex, viewport.x, - limits.viewportBoundsRange[0], limits.viewportBoundsRange[1], - validation_error_map[VALIDATION_ERROR_1500099e]); + if (pScissors) { + for (uint32_t scissor_i = 0; scissor_i < scissorCount; ++scissor_i) { + const auto &scissor = pScissors[scissor_i]; // will crash on invalid ptr + + if (scissor.offset.x < 0) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a6, LayerName, + "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.x (=%" PRIi32 ") is negative. %s", scissor_i, + scissor.offset.x, validation_error_map[VALIDATION_ERROR_1d8004a6]); } - if (viewport.y < limits.viewportBoundsRange[0] || viewport.y > limits.viewportBoundsRange[1]) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_1500099e, LayerName, - "vkCmdSetViewport %d: y (%f) exceeds permitted bounds (%f,%f). %s", viewportIndex, viewport.y, - limits.viewportBoundsRange[0], limits.viewportBoundsRange[1], - validation_error_map[VALIDATION_ERROR_1500099e]); + if (scissor.offset.y < 0) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a6, LayerName, + "vkCmdSetScissor: pScissors[%" PRIu32 "].offset.y (=%" PRIi32 ") is negative. %s", scissor_i, + scissor.offset.y, validation_error_map[VALIDATION_ERROR_1d8004a6]); } - if (viewport.x + viewport.width > limits.viewportBoundsRange[1]) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_150009a0, LayerName, - "vkCmdSetViewport %d: x (%f) + width (%f) exceeds permitted bound (%f). %s", viewportIndex, viewport.x, - viewport.width, limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a0]); + const int64_t x_sum = static_cast(scissor.offset.x) + static_cast(scissor.extent.width); + if (x_sum > INT32_MAX) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004a8, LayerName, + "vkCmdSetScissor: offset.x + extent.width (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 + ") of pScissors[%" PRIu32 "] will overflow int32_t. %s", + scissor.offset.x, scissor.extent.width, x_sum, scissor_i, + validation_error_map[VALIDATION_ERROR_1d8004a8]); } - if (viewport.y + viewport.height > limits.viewportBoundsRange[1]) { - skip |= - log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_150009a2, LayerName, - "vkCmdSetViewport %d: y (%f) + height (%f) exceeds permitted bound (%f). %s", viewportIndex, viewport.y, - viewport.height, limits.viewportBoundsRange[1], validation_error_map[VALIDATION_ERROR_150009a2]); + const int64_t y_sum = static_cast(scissor.offset.y) + static_cast(scissor.extent.height); + if (y_sum > INT32_MAX) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d8004aa, LayerName, + "vkCmdSetScissor: offset.y + extent.height (=%" PRIi32 " + %" PRIu32 " = %" PRIi64 + ") of pScissors[%" PRIu32 "] will overflow int32_t. %s", + scissor.offset.y, scissor.extent.height, y_sum, scissor_i, + validation_error_map[VALIDATION_ERROR_1d8004aa]); } } } + return skip; } -bool pv_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors) { +bool pv_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { bool skip = false; layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); debug_report_data *report_data = device_data->report_data; - if (device_data->physical_device_features.multiViewport == false) { - if (scissorCount != 1) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCmdSetScissor(): The multiViewport feature is not enabled, so scissorCount must be 1 but is %d.", - scissorCount); - } - if (firstScissor != 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCmdSetScissor(): The multiViewport feature is not enabled, so firstScissor must be 0 but is %d.", - firstScissor); - } + if (!device_data->physical_device_features.wideLines && (lineWidth != 1.0f)) { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d600628, LayerName, + "VkPhysicalDeviceFeatures::wideLines is disabled, but lineWidth (=%f) is not 1.0. %s", lineWidth, + validation_error_map[VALIDATION_ERROR_1d600628]); } - for (uint32_t scissorIndex = 0; scissorIndex < scissorCount; ++scissorIndex) { - const VkRect2D &pScissor = pScissors[scissorIndex]; - - if (pScissor.offset.x < 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_1d8004a6, LayerName, "vkCmdSetScissor %d: offset.x (%d) must not be negative. %s", - scissorIndex, pScissor.offset.x, validation_error_map[VALIDATION_ERROR_1d8004a6]); - } else if (static_cast(pScissor.extent.width) > (INT_MAX - pScissor.offset.x)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_1d8004a8, LayerName, - "vkCmdSetScissor %d: adding offset.x (%d) and extent.width (%u) will overflow. %s", scissorIndex, - pScissor.offset.x, pScissor.extent.width, validation_error_map[VALIDATION_ERROR_1d8004a8]); - } - - if (pScissor.offset.y < 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_1d8004a6, LayerName, "vkCmdSetScissor %d: offset.y (%d) must not be negative. %s", - scissorIndex, pScissor.offset.y, validation_error_map[VALIDATION_ERROR_1d8004a6]); - } else if (static_cast(pScissor.extent.height) > (INT_MAX - pScissor.offset.y)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - VALIDATION_ERROR_1d8004aa, LayerName, - "vkCmdSetScissor %d: adding offset.y (%d) and extent.height (%u) will overflow. %s", scissorIndex, - pScissor.offset.y, pScissor.extent.height, validation_error_map[VALIDATION_ERROR_1d8004aa]); - } - } return skip; } @@ -2076,11 +2452,10 @@ bool pv_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer if (pRegions != nullptr) { if ((pRegions->imageSubresource.aspectMask & (VK_IMAGE_ASPECT_COLOR_BIT | VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_METADATA_BIT)) == 0) { - skip |= log_msg( - device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - UNRECOGNIZED_VALUE, LayerName, - "vkCmdCopyBufferToImage() parameter, VkImageAspect pRegions->imageSubresource.aspectMask, is an unrecognized " - "enumerator"); + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, UNRECOGNIZED_VALUE, LayerName, + "vkCmdCopyBufferToImage() parameter, VkImageAspect pRegions->imageSubresource.aspectMask, is an " + "unrecognized enumerator"); } } return skip; @@ -2207,15 +2582,18 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); debug_report_data *report_data = device_data->report_data; + const LogMiscParams log_misc{report_data, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, VK_NULL_HANDLE, LayerName, + "vkCreateSwapchainKHR"}; + if (pCreateInfo != nullptr) { if ((device_data->physical_device_features.textureCompressionETC2 == false) && FormatIsCompressed_ETC2_EAC(pCreateInfo->imageFormat)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - DEVICE_FEATURE, LayerName, - "vkCreateSwapchainKHR(): Attempting to create swapchain VkImage with format %s. The " - "textureCompressionETC2 feature is not enabled: neither ETC2 nor EAC formats can be used to create " - "images.", - string_VkFormat(pCreateInfo->imageFormat)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + DEVICE_FEATURE, LayerName, + "vkCreateSwapchainKHR(): Attempting to create swapchain VkImage with format %s. The textureCompressionETC2 " + "feature is not enabled: neither ETC2 nor EAC formats can be used to create images.", + string_VkFormat(pCreateInfo->imageFormat)); } if ((device_data->physical_device_features.textureCompressionASTC_LDR == false) && @@ -2264,9 +2642,8 @@ bool pv_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pC } } - // imageArrayLayers must be greater than 0 - skip |= ValidateGreaterThan(report_data, "vkCreateSwapchainKHR", "pCreateInfo->imageArrayLayers", - pCreateInfo->imageArrayLayers, 0u); + skip |= ValidateGreaterThanZero(pCreateInfo->imageArrayLayers, "pCreateInfo->imageArrayLayers", VALIDATION_ERROR_146009f6, + log_misc); } return skip; @@ -2277,39 +2654,29 @@ bool pv_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { layer_data *device_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); if (pPresentInfo && pPresentInfo->pNext) { - // Verify ext struct - struct std_header { - VkStructureType sType; - const void *pNext; - }; - std_header *pnext = (std_header *)pPresentInfo->pNext; - while (pnext) { - if (VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR == pnext->sType) { - // TODO: This and all other pNext extension dependencies should be added to code-generation - skip |= require_device_extension(device_data, device_data->extensions.vk_khr_incremental_present, - "vkQueuePresentKHR", VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME); - VkPresentRegionsKHR *present_regions = (VkPresentRegionsKHR *)pnext; - if (present_regions->swapchainCount != pPresentInfo->swapchainCount) { - skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, INVALID_USAGE, LayerName, - "QueuePresentKHR(): pPresentInfo->swapchainCount has a value of %i" - " but VkPresentRegionsKHR extension swapchainCount is %i. These values must be equal.", - pPresentInfo->swapchainCount, present_regions->swapchainCount); - } - skip |= validate_struct_pnext(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->pNext", NULL, - present_regions->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_1121c40d); - skip |= validate_array(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->swapchainCount", - "pCreateInfo->pNext->pRegions", present_regions->swapchainCount, present_regions->pRegions, - true, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); - for (uint32_t i = 0; i < present_regions->swapchainCount; ++i) { - skip |= - validate_array(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->pRegions[].rectangleCount", + const auto *present_regions = lvl_find_in_chain(pPresentInfo->pNext); + if (present_regions) { + // TODO: This and all other pNext extension dependencies should be added to code-generation + skip |= require_device_extension(device_data, device_data->extensions.vk_khr_incremental_present, "vkQueuePresentKHR", + VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME); + if (present_regions->swapchainCount != pPresentInfo->swapchainCount) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, INVALID_USAGE, LayerName, + "QueuePresentKHR(): pPresentInfo->swapchainCount has a value of %i but VkPresentRegionsKHR " + "extension swapchainCount is %i. These values must be equal.", + pPresentInfo->swapchainCount, present_regions->swapchainCount); + } + skip |= validate_struct_pnext(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->pNext", NULL, + present_regions->pNext, 0, NULL, GeneratedHeaderVersion, VALIDATION_ERROR_1121c40d); + skip |= validate_array(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->swapchainCount", + "pCreateInfo->pNext->pRegions", present_regions->swapchainCount, present_regions->pRegions, true, + false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + for (uint32_t i = 0; i < present_regions->swapchainCount; ++i) { + skip |= validate_array(device_data->report_data, "QueuePresentKHR", "pCreateInfo->pNext->pRegions[].rectangleCount", "pCreateInfo->pNext->pRegions[].pRectangles", present_regions->pRegions[i].rectangleCount, present_regions->pRegions[i].pRectangles, true, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); - } } - pnext = (std_header *)pnext->pNext; } } @@ -2373,6 +2740,91 @@ bool pv_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo return skip; } +bool pv_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + bool skip = false; + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + + if (groupCountX > device_data->device_limits.maxComputeWorkGroupCount[0]) { + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00304, LayerName, + "vkCmdDispatch(): groupCountX (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", + groupCountX, device_data->device_limits.maxComputeWorkGroupCount[0], validation_error_map[VALIDATION_ERROR_19c00304]); + } + + if (groupCountY > device_data->device_limits.maxComputeWorkGroupCount[1]) { + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00306, LayerName, + "vkCmdDispatch(): groupCountY (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", + groupCountY, device_data->device_limits.maxComputeWorkGroupCount[1], validation_error_map[VALIDATION_ERROR_19c00306]); + } + + if (groupCountZ > device_data->device_limits.maxComputeWorkGroupCount[2]) { + skip |= log_msg( + device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19c00308, LayerName, + "vkCmdDispatch(): groupCountZ (%" PRIu32 ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", + groupCountZ, device_data->device_limits.maxComputeWorkGroupCount[2], validation_error_map[VALIDATION_ERROR_19c00308]); + } + + return skip; +} + +bool pv_vkCmdDispatchBaseKHX(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, + uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + bool skip = false; + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + + // Paired if {} else if {} tests used to avoid any possible uint underflow + uint32_t limit = device_data->device_limits.maxComputeWorkGroupCount[0]; + if (baseGroupX >= limit) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034a, LayerName, + "vkCmdDispatch(): baseGroupX (%" PRIu32 + ") equals or exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", + baseGroupX, limit, validation_error_map[VALIDATION_ERROR_19e0034a]); + } else if (groupCountX > (limit - baseGroupX)) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00350, LayerName, + "vkCmdDispatchBaseKHX(): baseGroupX (%" PRIu32 ") + groupCountX (%" PRIu32 + ") exceeds device limit maxComputeWorkGroupCount[0] (%" PRIu32 "). %s", + baseGroupX, groupCountX, limit, validation_error_map[VALIDATION_ERROR_19e00350]); + } + + limit = device_data->device_limits.maxComputeWorkGroupCount[1]; + if (baseGroupY >= limit) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034c, LayerName, + "vkCmdDispatch(): baseGroupY (%" PRIu32 + ") equals or exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", + baseGroupY, limit, validation_error_map[VALIDATION_ERROR_19e0034c]); + } else if (groupCountY > (limit - baseGroupY)) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00352, LayerName, + "vkCmdDispatchBaseKHX(): baseGroupY (%" PRIu32 ") + groupCountY (%" PRIu32 + ") exceeds device limit maxComputeWorkGroupCount[1] (%" PRIu32 "). %s", + baseGroupY, groupCountY, limit, validation_error_map[VALIDATION_ERROR_19e00352]); + } + + limit = device_data->device_limits.maxComputeWorkGroupCount[2]; + if (baseGroupZ >= limit) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e0034e, LayerName, + "vkCmdDispatch(): baseGroupZ (%" PRIu32 + ") equals or exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", + baseGroupZ, limit, validation_error_map[VALIDATION_ERROR_19e0034e]); + } else if (groupCountZ > (limit - baseGroupZ)) { + skip |= log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_19e00354, LayerName, + "vkCmdDispatchBaseKHX(): baseGroupZ (%" PRIu32 ") + groupCountZ (%" PRIu32 + ") exceeds device limit maxComputeWorkGroupCount[2] (%" PRIu32 "). %s", + baseGroupZ, groupCountZ, limit, validation_error_map[VALIDATION_ERROR_19e00354]); + } + + return skip; +} + VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *funcName) { const auto item = name_to_funcptr_map.find(funcName); if (item != name_to_funcptr_map.end()) { @@ -2408,32 +2860,35 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetPhysicalDeviceProcAddr(VkInstance // If additional validation is needed outside of the generated checks, a manual routine can be added to this file // and the address filled in here. The autogenerated source will call these routines if the pointers are not NULL. void InitializeManualParameterValidationFunctionPointers() { - custom_functions["vkGetDeviceQueue"] = (void*)pv_vkGetDeviceQueue; - custom_functions["vkCreateBuffer"] = (void*)pv_vkCreateBuffer; - custom_functions["vkCreateImage"] = (void*)pv_vkCreateImage; - custom_functions["vkCreateImageView"] = (void*)pv_vkCreateImageView; - custom_functions["vkCreateGraphicsPipelines"] = (void*)pv_vkCreateGraphicsPipelines; - custom_functions["vkCreateComputePipelines"] = (void*)pv_vkCreateComputePipelines; - custom_functions["vkCreateSampler"] = (void*)pv_vkCreateSampler; - custom_functions["vkCreateDescriptorSetLayout"] = (void*)pv_vkCreateDescriptorSetLayout; - custom_functions["vkFreeDescriptorSets"] = (void*)pv_vkFreeDescriptorSets; - custom_functions["vkUpdateDescriptorSets"] = (void*)pv_vkUpdateDescriptorSets; - custom_functions["vkCreateRenderPass"] = (void*)pv_vkCreateRenderPass; - custom_functions["vkBeginCommandBuffer"] = (void*)pv_vkBeginCommandBuffer; - custom_functions["vkCmdSetViewport"] = (void*)pv_vkCmdSetViewport; - custom_functions["vkCmdSetScissor"] = (void*)pv_vkCmdSetScissor; - custom_functions["vkCmdDraw"] = (void*)pv_vkCmdDraw; - custom_functions["vkCmdDrawIndirect"] = (void*)pv_vkCmdDrawIndirect; - custom_functions["vkCmdDrawIndexedIndirect"] = (void*)pv_vkCmdDrawIndexedIndirect; - custom_functions["vkCmdCopyImage"] = (void*)pv_vkCmdCopyImage; - custom_functions["vkCmdBlitImage"] = (void*)pv_vkCmdBlitImage; - custom_functions["vkCmdCopyBufferToImage"] = (void*)pv_vkCmdCopyBufferToImage; - custom_functions["vkCmdCopyImageToBuffer"] = (void*)pv_vkCmdCopyImageToBuffer; - custom_functions["vkCmdUpdateBuffer"] = (void*)pv_vkCmdUpdateBuffer; - custom_functions["vkCmdFillBuffer"] = (void*)pv_vkCmdFillBuffer; - custom_functions["vkCreateSwapchainKHR"] = (void*)pv_vkCreateSwapchainKHR; - custom_functions["vkQueuePresentKHR"] = (void*)pv_vkQueuePresentKHR; - custom_functions["vkCreateDescriptorPool"] = (void*)pv_vkCreateDescriptorPool; + custom_functions["vkGetDeviceQueue"] = (void *)pv_vkGetDeviceQueue; + custom_functions["vkCreateBuffer"] = (void *)pv_vkCreateBuffer; + custom_functions["vkCreateImage"] = (void *)pv_vkCreateImage; + custom_functions["vkCreateImageView"] = (void *)pv_vkCreateImageView; + custom_functions["vkCreateGraphicsPipelines"] = (void *)pv_vkCreateGraphicsPipelines; + custom_functions["vkCreateComputePipelines"] = (void *)pv_vkCreateComputePipelines; + custom_functions["vkCreateSampler"] = (void *)pv_vkCreateSampler; + custom_functions["vkCreateDescriptorSetLayout"] = (void *)pv_vkCreateDescriptorSetLayout; + custom_functions["vkFreeDescriptorSets"] = (void *)pv_vkFreeDescriptorSets; + custom_functions["vkUpdateDescriptorSets"] = (void *)pv_vkUpdateDescriptorSets; + custom_functions["vkCreateRenderPass"] = (void *)pv_vkCreateRenderPass; + custom_functions["vkBeginCommandBuffer"] = (void *)pv_vkBeginCommandBuffer; + custom_functions["vkCmdSetViewport"] = (void *)pv_vkCmdSetViewport; + custom_functions["vkCmdSetScissor"] = (void *)pv_vkCmdSetScissor; + custom_functions["vkCmdSetLineWidth"] = (void *)pv_vkCmdSetLineWidth; + custom_functions["vkCmdDraw"] = (void *)pv_vkCmdDraw; + custom_functions["vkCmdDrawIndirect"] = (void *)pv_vkCmdDrawIndirect; + custom_functions["vkCmdDrawIndexedIndirect"] = (void *)pv_vkCmdDrawIndexedIndirect; + custom_functions["vkCmdCopyImage"] = (void *)pv_vkCmdCopyImage; + custom_functions["vkCmdBlitImage"] = (void *)pv_vkCmdBlitImage; + custom_functions["vkCmdCopyBufferToImage"] = (void *)pv_vkCmdCopyBufferToImage; + custom_functions["vkCmdCopyImageToBuffer"] = (void *)pv_vkCmdCopyImageToBuffer; + custom_functions["vkCmdUpdateBuffer"] = (void *)pv_vkCmdUpdateBuffer; + custom_functions["vkCmdFillBuffer"] = (void *)pv_vkCmdFillBuffer; + custom_functions["vkCreateSwapchainKHR"] = (void *)pv_vkCreateSwapchainKHR; + custom_functions["vkQueuePresentKHR"] = (void *)pv_vkQueuePresentKHR; + custom_functions["vkCreateDescriptorPool"] = (void *)pv_vkCreateDescriptorPool; + custom_functions["vkCmdDispatch"] = (void *)pv_vkCmdDispatch; + custom_functions["vkCmdDispatchBaseKHX"] = (void *)pv_vkCmdDispatchBaseKHX; } } // namespace parameter_validation diff --git a/sources/third_party/vulkan/src/layers/shader_validation.cpp b/sources/third_party/vulkan/src/layers/shader_validation.cpp index ff3a84b8716ba93320ac0f0c734223a59d108580..8cbc2407dab70b21b5ee889ad3c2a5609bc82c04 100644 --- a/sources/third_party/vulkan/src/layers/shader_validation.cpp +++ b/sources/third_party/vulkan/src/layers/shader_validation.cpp @@ -35,6 +35,7 @@ #include "core_validation_types.h" #include "shader_validation.h" #include "spirv-tools/libspirv.h" +#include "xxhash.h" enum FORMAT_TYPE { FORMAT_TYPE_FLOAT = 1, // UNORM, SNORM, FLOAT, USCALED, SSCALED, SRGB -- anything we consider float in the shader @@ -313,27 +314,27 @@ static bool types_match(shader_module const *a, shader_module const *b, unsigned case spv::OpTypeMatrix: // Match on element type, count. return types_match(a, b, a_insn.word(2), b_insn.word(2), a_arrayed, b_arrayed, false) && - a_insn.word(3) == b_insn.word(3); + a_insn.word(3) == b_insn.word(3); case spv::OpTypeArray: // Match on element type, count. these all have the same layout. we don't get here if b_arrayed. This differs from // vector & matrix types in that the array size is the id of a constant instruction, * not a literal within OpTypeArray return types_match(a, b, a_insn.word(2), b_insn.word(2), a_arrayed, b_arrayed, false) && - get_constant_value(a, a_insn.word(3)) == get_constant_value(b, b_insn.word(3)); + get_constant_value(a, a_insn.word(3)) == get_constant_value(b, b_insn.word(3)); case spv::OpTypeStruct: // Match on all element types - { - if (a_insn.len() != b_insn.len()) { - return false; // Structs cannot match if member counts differ - } + { + if (a_insn.len() != b_insn.len()) { + return false; // Structs cannot match if member counts differ + } - for (unsigned i = 2; i < a_insn.len(); i++) { - if (!types_match(a, b, a_insn.word(i), b_insn.word(i), a_arrayed, b_arrayed, false)) { - return false; + for (unsigned i = 2; i < a_insn.len(); i++) { + if (!types_match(a, b, a_insn.word(i), b_insn.word(i), a_arrayed, b_arrayed, false)) { + return false; + } } - } - return true; - } + return true; + } default: // Remaining types are CLisms, or may not appear in the interfaces we are interested in. Just claim no match. return false; @@ -397,14 +398,10 @@ static unsigned get_locations_consumed_by_format(VkFormat format) { } static unsigned get_format_type(VkFormat fmt) { - if (FormatIsSInt(fmt)) - return FORMAT_TYPE_SINT; - if (FormatIsUInt(fmt)) - return FORMAT_TYPE_UINT; - if (FormatIsDepthAndStencil(fmt)) - return FORMAT_TYPE_FLOAT | FORMAT_TYPE_UINT; - if (fmt == VK_FORMAT_UNDEFINED) - return 0; + if (FormatIsSInt(fmt)) return FORMAT_TYPE_SINT; + if (FormatIsUInt(fmt)) return FORMAT_TYPE_UINT; + if (FormatIsDepthAndStencil(fmt)) return FORMAT_TYPE_FLOAT | FORMAT_TYPE_UINT; + if (fmt == VK_FORMAT_UNDEFINED) return 0; // everything else -- UNORM/SNORM/FLOAT/USCALED/SSCALED is all float in the shader. return FORMAT_TYPE_FLOAT; } @@ -503,7 +500,7 @@ static bool collect_interface_block_members(shader_module const *src, std::mapsecond; bool is_relaxed_precision = member_relaxed_precision.find(member_index) != member_relaxed_precision.end(); - bool member_is_patch = is_patch || member_patch.count(member_index)>0; + bool member_is_patch = is_patch || member_patch.count(member_index) > 0; for (unsigned int offset = 0; offset < num_locations; offset++) { interface_var v = {}; @@ -584,13 +581,14 @@ static std::map collect_interface_by_location(shader_ unsigned id = insn.word(2); unsigned type = insn.word(1); - int location = value_or_default(var_locations, id, -1); - int builtin = value_or_default(var_builtins, id, -1); + int location = value_or_default(var_locations, id, static_cast(-1)); + int builtin = value_or_default(var_builtins, id, static_cast(-1)); unsigned component = value_or_default(var_components, id, 0); // Unspecified is OK, is 0 bool is_patch = var_patch.find(id) != var_patch.end(); bool is_relaxed_precision = var_relaxed_precision.find(id) != var_relaxed_precision.end(); - if (builtin != -1) continue; + if (builtin != -1) + continue; else if (!collect_interface_block_members(src, &out, blocks, is_array_of_verts, id, type, is_patch, location)) { // A user-defined interface variable, with a location. Where a variable occupied multiple locations, emit // one result for each. @@ -683,8 +681,6 @@ static std::vector> collect_interfac return out; } - - static bool validate_vi_consistency(debug_report_data const *report_data, VkPipelineVertexInputStateCreateInfo const *vi) { // Walk the binding descriptions, which describe the step rate and stride of each vertex buffer. Each binding should // be specified only once. @@ -770,7 +766,7 @@ static bool validate_vi_against_vs_inputs(debug_report_data const *report_data, static bool validate_fs_outputs_against_render_pass(debug_report_data const *report_data, shader_module const *fs, spirv_inst_iter entrypoint, PIPELINE_STATE const *pipeline, uint32_t subpass_index) { - auto rpci = pipeline->render_pass_ci.ptr(); + auto rpci = pipeline->rp_state->createInfo.ptr(); std::map color_attachments; auto subpass = rpci->pSubpasses[subpass_index]; @@ -974,11 +970,11 @@ static bool validate_push_constant_block_against_pipeline(debug_report_data cons found_range = true; if ((range.stageFlags & stage) == 0) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, SHADER_CHECKER_PUSH_CONSTANT_NOT_ACCESSIBLE_FROM_STAGE, "SC", - "Push constant range covering variable starting at " - "offset %u not accessible from stage %s", - offset, string_VkShaderStageFlagBits(stage)); + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, + __LINE__, SHADER_CHECKER_PUSH_CONSTANT_NOT_ACCESSIBLE_FROM_STAGE, "SC", + "Push constant range covering variable starting at offset %u not accessible from stage %s", + offset, string_VkShaderStageFlagBits(stage)); } break; @@ -988,9 +984,7 @@ static bool validate_push_constant_block_against_pipeline(debug_report_data cons if (!found_range) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_PUSH_CONSTANT_OUT_OF_RANGE, "SC", - "Push constant range covering variable starting at " - "offset %u not declared in layout", - offset); + "Push constant range covering variable starting at offset %u not declared in layout", offset); } } } @@ -1027,12 +1021,11 @@ static bool validate_specialization_offsets(debug_report_data const *report_data if (spec->pMapEntries[i].offset + spec->pMapEntries[i].size > spec->dataSize) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, __LINE__, VALIDATION_ERROR_1360060c, "SC", - "Specialization entry %u (for constant id %u) references memory outside provided " - "specialization data (bytes %u.." PRINTF_SIZE_T_SPECIFIER "; " PRINTF_SIZE_T_SPECIFIER - " bytes provided). %s.", - i, spec->pMapEntries[i].constantID, spec->pMapEntries[i].offset, - spec->pMapEntries[i].offset + spec->pMapEntries[i].size - 1, spec->dataSize, - validation_error_map[VALIDATION_ERROR_1360060c]); + "Specialization entry %u (for constant id %u) references memory outside provided specialization " + "data (bytes %u.." PRINTF_SIZE_T_SPECIFIER "; " PRINTF_SIZE_T_SPECIFIER " bytes provided). %s.", + i, spec->pMapEntries[i].constantID, spec->pMapEntries[i].offset, + spec->pMapEntries[i].offset + spec->pMapEntries[i].size - 1, spec->dataSize, + validation_error_map[VALIDATION_ERROR_1360060c]); } } } @@ -1062,10 +1055,10 @@ static bool descriptor_type_match(shader_module const *module, uint32_t type_id, if (insn.opcode() == spv::OpDecorate && insn.word(1) == type.word(1)) { if (insn.word(2) == spv::DecorationBlock) { return descriptor_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER || - descriptor_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; + descriptor_type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; } else if (insn.word(2) == spv::DecorationBufferBlock) { return descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || - descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; + descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; } } } @@ -1104,7 +1097,7 @@ static bool descriptor_type_match(shader_module const *module, uint32_t type_id, } } else if (sampled == 1) { return descriptor_type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || - descriptor_type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + descriptor_type == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; } else { return descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; } @@ -1120,9 +1113,7 @@ static bool require_feature(debug_report_data const *report_data, VkBool32 featu if (!feature) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_FEATURE_NOT_ENABLED, "SC", - "Shader requires VkPhysicalDeviceFeatures::%s but is not " - "enabled on the device", - feature_name)) { + "Shader requires VkPhysicalDeviceFeatures::%s but is not enabled on the device", feature_name)) { return true; } } @@ -1133,9 +1124,7 @@ static bool require_feature(debug_report_data const *report_data, VkBool32 featu static bool require_extension(debug_report_data const *report_data, bool extension, char const *extension_name) { if (!extension) { if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, - SHADER_CHECKER_FEATURE_NOT_ENABLED, "SC", - "Shader requires extension %s but is not " - "enabled on the device", + SHADER_CHECKER_FEATURE_NOT_ENABLED, "SC", "Shader requires extension %s but is not enabled on the device", extension_name)) { return true; } @@ -1148,8 +1137,8 @@ static bool validate_shader_capabilities(layer_data *dev_data, shader_module con bool skip = false; auto report_data = GetReportData(dev_data); - auto const & enabledFeatures = GetEnabledFeatures(dev_data); - auto const & extensions = GetEnabledExtensions(dev_data); + auto const &enabledFeatures = GetEnabledFeatures(dev_data); + auto const &extensions = GetEnabledExtensions(dev_data); struct CapabilityInfo { char const *name; @@ -1161,7 +1150,7 @@ static bool validate_shader_capabilities(layer_data *dev_data, shader_module con using E = DeviceExtensions; // clang-format off - static const std::unordered_map capabilities = { + static const std::unordered_multimap capabilities = { // Capabilities always supported by a Vulkan 1.0 implementation -- no // feature bits. {spv::CapabilityMatrix, {nullptr}}, @@ -1205,6 +1194,7 @@ static bool validate_shader_capabilities(layer_data *dev_data, shader_module con {spv::CapabilityDrawParameters, {VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, nullptr, &E::vk_khr_shader_draw_parameters}}, {spv::CapabilityGeometryShaderPassthroughNV, {VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, nullptr, &E::vk_nv_geometry_shader_passthrough}}, {spv::CapabilitySampleMaskOverrideCoverageNV, {VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, nullptr, &E::vk_nv_sample_mask_override_coverage}}, + {spv::CapabilityShaderViewportIndexLayerEXT, {VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME, nullptr, &E::vk_ext_shader_viewport_index_layer}}, {spv::CapabilityShaderViewportIndexLayerNV, {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, nullptr, &E::vk_nv_viewport_array2}}, {spv::CapabilityShaderViewportMaskNV, {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, nullptr, &E::vk_nv_viewport_array2}}, {spv::CapabilitySubgroupBallotKHR, {VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, nullptr, &E::vk_ext_shader_subgroup_ballot }}, @@ -1214,13 +1204,44 @@ static bool validate_shader_capabilities(layer_data *dev_data, shader_module con for (auto insn : *src) { if (insn.opcode() == spv::OpCapability) { - auto it = capabilities.find(insn.word(1)); - if (it != capabilities.end()) { - if (it->second.feature) { - skip |= require_feature(report_data, enabledFeatures->*(it->second.feature), it->second.name); + size_t n = capabilities.count(insn.word(1)); + if (1 == n) { // key occurs exactly once + auto it = capabilities.find(insn.word(1)); + if (it != capabilities.end()) { + if (it->second.feature) { + skip |= require_feature(report_data, enabledFeatures->*(it->second.feature), it->second.name); + } + if (it->second.extension) { + skip |= require_extension(report_data, extensions->*(it->second.extension), it->second.name); + } + } + } else if (1 < n) { // key occurs multiple times, at least one must be enabled + bool needs_feature = false, has_feature = false; + bool needs_ext = false, has_ext = false; + std::string feature_names = "(one of) [ "; + std::string extension_names = feature_names; + auto caps = capabilities.equal_range(insn.word(1)); + for (auto it = caps.first; it != caps.second; ++it) { + if (it->second.feature) { + needs_feature = true; + has_feature = has_feature || enabledFeatures->*(it->second.feature); + feature_names += it->second.name; + feature_names += " "; + } + if (it->second.extension) { + needs_ext = true; + has_ext = has_ext || extensions->*(it->second.extension); + extension_names += it->second.name; + extension_names += " "; + } } - if (it->second.extension) { - skip |= require_extension(report_data, extensions->*(it->second.extension), it->second.name); + if (needs_feature) { + feature_names += "]"; + skip |= require_feature(report_data, has_feature, feature_names.c_str()); + } + if (needs_ext) { + extension_names += "]"; + skip |= require_extension(report_data, has_ext, extension_names.c_str()); } } } @@ -1251,7 +1272,7 @@ static uint32_t descriptor_type_to_reqs(shader_module const *module, uint32_t ty return arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_1D_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_1D; case spv::Dim2D: return (msaa ? DESCRIPTOR_REQ_MULTI_SAMPLE : DESCRIPTOR_REQ_SINGLE_SAMPLE) | - (arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_2D_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_2D); + (arrayed ? DESCRIPTOR_REQ_VIEW_TYPE_2D_ARRAY : DESCRIPTOR_REQ_VIEW_TYPE_2D); case spv::Dim3D: return DESCRIPTOR_REQ_VIEW_TYPE_3D; case spv::DimCube: @@ -1279,10 +1300,9 @@ static VkDescriptorSetLayoutBinding const *get_descriptor_binding(PIPELINE_LAYOU return pipelineLayout->set_layouts[slot.first]->GetDescriptorSetLayoutBindingPtrFromBinding(slot.second); } - -static bool validate_pipeline_shader_stage( - layer_data *dev_data, VkPipelineShaderStageCreateInfo const *pStage, PIPELINE_STATE *pipeline, - shader_module const **out_module, spirv_inst_iter *out_entrypoint) { +static bool validate_pipeline_shader_stage(layer_data *dev_data, VkPipelineShaderStageCreateInfo const *pStage, + PIPELINE_STATE *pipeline, shader_module const **out_module, + spirv_inst_iter *out_entrypoint) { bool skip = false; auto module = *out_module = GetShaderModuleState(dev_data, pStage->module); auto report_data = GetReportData(dev_data); @@ -1309,7 +1329,8 @@ static bool validate_pipeline_shader_stage( auto descriptor_uses = collect_interface_by_descriptor_slot(report_data, module, accessible_ids); skip |= validate_specialization_offsets(report_data, pStage); - skip |= validate_push_constant_usage(report_data, &pipeline->pipeline_layout.push_constant_ranges, module, accessible_ids, pStage->stage); + skip |= validate_push_constant_usage(report_data, &pipeline->pipeline_layout.push_constant_ranges, module, accessible_ids, + pStage->stage); // Validate descriptor use for (auto use : descriptor_uses) { @@ -1329,18 +1350,14 @@ static bool validate_pipeline_shader_stage( } else if (~binding->stageFlags & pStage->stage) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, __LINE__, SHADER_CHECKER_DESCRIPTOR_NOT_ACCESSIBLE_FROM_STAGE, "SC", - "Shader uses descriptor slot %u.%u (used " - "as type `%s`) but descriptor not " - "accessible from stage %s", + "Shader uses descriptor slot %u.%u (used as type `%s`) but descriptor not accessible from stage %s", use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str(), string_VkShaderStageFlagBits(pStage->stage)); } else if (!descriptor_type_match(module, use.second.type_id, binding->descriptorType, required_descriptor_count)) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_DESCRIPTOR_TYPE_MISMATCH, "SC", - "Type mismatch on descriptor slot " - "%u.%u (used as type `%s`) but " - "descriptor of type %s", - use.first.first, use.first.second, describe_type(module, use.second.type_id).c_str(), + "Type mismatch on descriptor slot %u.%u (used as type `%s`) but descriptor of type %s", use.first.first, + use.first.second, describe_type(module, use.second.type_id).c_str(), string_VkDescriptorType(binding->descriptorType)); } else if (binding->descriptorCount < required_descriptor_count) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, @@ -1355,14 +1372,14 @@ static bool validate_pipeline_shader_stage( if (pStage->stage == VK_SHADER_STAGE_FRAGMENT_BIT) { auto input_attachment_uses = collect_interface_by_input_attachment_index(module, accessible_ids); - auto rpci = pipeline->render_pass_ci.ptr(); + auto rpci = pipeline->rp_state->createInfo.ptr(); auto subpass = pipeline->graphicsPipelineCI.subpass; for (auto use : input_attachment_uses) { auto input_attachments = rpci->pSubpasses[subpass].pInputAttachments; auto index = (input_attachments && use.first < rpci->pSubpasses[subpass].inputAttachmentCount) - ? input_attachments[use.first].attachment - : VK_ATTACHMENT_UNUSED; + ? input_attachments[use.first].attachment + : VK_ATTACHMENT_UNUSED; if (index == VK_ATTACHMENT_UNUSED) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, @@ -1429,8 +1446,7 @@ static bool validate_interface_between_stages(debug_report_data const *report_da if (a_it->second.is_patch != b_it->second.is_patch) { skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, 0, __LINE__, SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", - "Decoration mismatch on location %u.%u: is per-%s in %s stage but " - "per-%s in %s stage", + "Decoration mismatch on location %u.%u: is per-%s in %s stage but per-%s in %s stage", a_first.first, a_first.second, a_it->second.is_patch ? "patch" : "vertex", producer_stage->name, b_it->second.is_patch ? "patch" : "vertex", consumer_stage->name); } @@ -1491,18 +1507,20 @@ bool validate_and_capture_pipeline_shader_state(layer_data *dev_data, PIPELINE_S for (; producer != fragment_stage && consumer <= fragment_stage; consumer++) { assert(shaders[producer]); - if (shaders[consumer] && shaders[consumer]->has_valid_spirv && shaders[producer]->has_valid_spirv) { - skip |= validate_interface_between_stages(report_data, shaders[producer], entrypoints[producer], - &shader_stage_attribs[producer], shaders[consumer], entrypoints[consumer], - &shader_stage_attribs[consumer]); + if (shaders[consumer]) { + if (shaders[consumer]->has_valid_spirv && shaders[producer]->has_valid_spirv) { + skip |= validate_interface_between_stages(report_data, shaders[producer], entrypoints[producer], + &shader_stage_attribs[producer], shaders[consumer], entrypoints[consumer], + &shader_stage_attribs[consumer]); + } producer = consumer; } } if (shaders[fragment_stage] && shaders[fragment_stage]->has_valid_spirv) { - skip |= validate_fs_outputs_against_render_pass(report_data, shaders[fragment_stage], entrypoints[fragment_stage], - pipeline, pCreateInfo->subpass); + skip |= validate_fs_outputs_against_render_pass(report_data, shaders[fragment_stage], entrypoints[fragment_stage], pipeline, + pCreateInfo->subpass); } return skip; @@ -1517,6 +1535,17 @@ bool validate_compute_pipeline(layer_data *dev_data, PIPELINE_STATE *pipeline) { return validate_pipeline_shader_stage(dev_data, &pCreateInfo->stage, pipeline, &module, &entrypoint); } +uint32_t ValidationCache::MakeShaderHash(VkShaderModuleCreateInfo const *smci) { return XXH32(smci->pCode, smci->codeSize, 0); } + +static ValidationCache *GetValidationCacheInfo(VkShaderModuleCreateInfo const *pCreateInfo) { + while ((pCreateInfo = (VkShaderModuleCreateInfo const *)pCreateInfo->pNext) != nullptr) { + if (pCreateInfo->sType == VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT) + return (ValidationCache *)((VkShaderModuleValidationCacheCreateInfoEXT const *)pCreateInfo)->validationCache; + } + + return nullptr; +} + bool PreCallValidateCreateShaderModule(layer_data *dev_data, VkShaderModuleCreateInfo const *pCreateInfo, bool *spirv_valid) { bool skip = false; spv_result_t spv_valid = SPV_SUCCESS; @@ -1529,23 +1558,34 @@ bool PreCallValidateCreateShaderModule(layer_data *dev_data, VkShaderModuleCreat auto have_glsl_shader = GetEnabledExtensions(dev_data)->vk_nv_glsl_shader; if (!have_glsl_shader && (pCreateInfo->codeSize % 4)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, - __LINE__, VALIDATION_ERROR_12a00ac0, "SC", + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + VALIDATION_ERROR_12a00ac0, "SC", "SPIR-V module not valid: Codesize must be a multiple of 4 but is " PRINTF_SIZE_T_SPECIFIER ". %s", pCreateInfo->codeSize, validation_error_map[VALIDATION_ERROR_12a00ac0]); } else { + auto cache = GetValidationCacheInfo(pCreateInfo); + uint32_t hash = 0; + if (cache) { + hash = ValidationCache::MakeShaderHash(pCreateInfo); + if (cache->Contains(hash)) return false; + } + // Use SPIRV-Tools validator to try and catch any issues with the module itself spv_context ctx = spvContextCreate(SPV_ENV_VULKAN_1_0); - spv_const_binary_t binary{ pCreateInfo->pCode, pCreateInfo->codeSize / sizeof(uint32_t) }; + spv_const_binary_t binary{pCreateInfo->pCode, pCreateInfo->codeSize / sizeof(uint32_t)}; spv_diagnostic diag = nullptr; spv_valid = spvValidate(ctx, &binary, &diag); if (spv_valid != SPV_SUCCESS) { if (!have_glsl_shader || (pCreateInfo->pCode[0] == spv::MagicNumber)) { - skip |= log_msg(report_data, - spv_valid == SPV_WARNING ? VK_DEBUG_REPORT_WARNING_BIT_EXT : VK_DEBUG_REPORT_ERROR_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_INCONSISTENT_SPIRV, "SC", - "SPIR-V module not valid: %s", diag && diag->error ? diag->error : "(no error text)"); + skip |= + log_msg(report_data, spv_valid == SPV_WARNING ? VK_DEBUG_REPORT_WARNING_BIT_EXT : VK_DEBUG_REPORT_ERROR_BIT_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_INCONSISTENT_SPIRV, "SC", + "SPIR-V module not valid: %s", diag && diag->error ? diag->error : "(no error text)"); + } + } else { + if (cache) { + cache->Insert(hash); } } diff --git a/sources/third_party/vulkan/src/layers/shader_validation.h b/sources/third_party/vulkan/src/layers/shader_validation.h index a6eecff4b2238c9f57b4e16d991304c15d9a2d07..10d97655ac74c23069d2c33616ce5925187a5977 100644 --- a/sources/third_party/vulkan/src/layers/shader_validation.h +++ b/sources/third_party/vulkan/src/layers/shader_validation.h @@ -20,6 +20,8 @@ #ifndef VULKAN_SHADER_VALIDATION_H #define VULKAN_SHADER_VALIDATION_H +#include + // A forward iterator over spirv instructions. Provides easy access to len, opcode, and content words // without the caller needing to care too much about the physical SPIRV module layout. struct spirv_inst_iter { @@ -100,9 +102,99 @@ struct shader_module { void build_def_index(); }; +class ValidationCache { + // hashes of shaders that have passed validation before, and can be skipped. + // we don't store negative results, as we would have to also store what was + // wrong with them; also, we expect they will get fixed, so we're less + // likely to see them again. + std::unordered_set good_shader_hashes; + ValidationCache() {} + + public: + static VkValidationCacheEXT Create(VkValidationCacheCreateInfoEXT const *pCreateInfo) { + auto cache = new ValidationCache(); + cache->Load(pCreateInfo); + return VkValidationCacheEXT(cache); + } + + void Load(VkValidationCacheCreateInfoEXT const *pCreateInfo) { + const auto headerSize = 2 * sizeof(uint32_t) + VK_UUID_SIZE; + auto size = headerSize; + if (!pCreateInfo->pInitialData || pCreateInfo->initialDataSize < size) return; + + uint32_t const *data = (uint32_t const *)pCreateInfo->pInitialData; + if (data[0] != size) return; + if (data[1] != VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT) return; + uint8_t expected_uuid[VK_UUID_SIZE]; + Sha1ToVkUuid(SPIRV_TOOLS_COMMIT_ID, expected_uuid); + if (memcmp(&data[2], expected_uuid, VK_UUID_SIZE) != 0) return; // different version + + data = (uint32_t const *)(reinterpret_cast(data) + headerSize); + + for (; size < pCreateInfo->initialDataSize; data++, size += sizeof(uint32_t)) { + good_shader_hashes.insert(*data); + } + } + + void Write(size_t *pDataSize, void *pData) { + const auto headerSize = 2 * sizeof(uint32_t) + VK_UUID_SIZE; // 4 bytes for header size + 4 bytes for version number + UUID + if (!pData) { + *pDataSize = headerSize + good_shader_hashes.size() * sizeof(uint32_t); + return; + } + + if (*pDataSize < headerSize) { + *pDataSize = 0; + return; // Too small for even the header! + } + + uint32_t *out = (uint32_t *)pData; + size_t actualSize = headerSize; + + // Write the header + *out++ = headerSize; + *out++ = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT; + Sha1ToVkUuid(SPIRV_TOOLS_COMMIT_ID, reinterpret_cast(out)); + out = (uint32_t *)(reinterpret_cast(out) + VK_UUID_SIZE); + + for (auto it = good_shader_hashes.begin(); it != good_shader_hashes.end() && actualSize < *pDataSize; + it++, out++, actualSize += sizeof(uint32_t)) { + *out = *it; + } + + *pDataSize = actualSize; + } + + void Merge(ValidationCache const *other) { + good_shader_hashes.reserve(good_shader_hashes.size() + other->good_shader_hashes.size()); + for (auto h : other->good_shader_hashes) good_shader_hashes.insert(h); + } + + static uint32_t MakeShaderHash(VkShaderModuleCreateInfo const *smci); + + bool Contains(uint32_t hash) { return good_shader_hashes.count(hash) != 0; } + + void Insert(uint32_t hash) { good_shader_hashes.insert(hash); } + + private: + void Sha1ToVkUuid(const char *sha1_str, uint8_t uuid[VK_UUID_SIZE]) { + // Convert sha1_str from a hex string to binary. We only need VK_UUID_BYTES of + // output, so pad with zeroes if the input string is shorter than that, and truncate + // if it's longer. + char padded_sha1_str[2 * VK_UUID_SIZE + 1] = {}; + strncpy(padded_sha1_str, sha1_str, 2 * VK_UUID_SIZE + 1); + char byte_str[3] = {}; + for (uint32_t i = 0; i < VK_UUID_SIZE; ++i) { + byte_str[0] = padded_sha1_str[2 * i + 0]; + byte_str[1] = padded_sha1_str[2 * i + 1]; + uuid[i] = static_cast(strtol(byte_str, NULL, 16)); + } + } +}; + bool validate_and_capture_pipeline_shader_state(layer_data *dev_data, PIPELINE_STATE *pPipeline); bool validate_compute_pipeline(layer_data *dev_data, PIPELINE_STATE *pPipeline); typedef std::pair descriptor_slot_t; bool PreCallValidateCreateShaderModule(layer_data *dev_data, VkShaderModuleCreateInfo const *pCreateInfo, bool *spirv_valid); -#endif //VULKAN_SHADER_VALIDATION_H +#endif // VULKAN_SHADER_VALIDATION_H diff --git a/sources/third_party/vulkan/src/layers/threading.cpp b/sources/third_party/vulkan/src/layers/threading.cpp index b3e2a17ce7b74f7383fc16832a2fdf0784c615dd..d27d75f3c3912e12dc16bd7aedb60bc129aba9f2 100644 --- a/sources/third_party/vulkan/src/layers/threading.cpp +++ b/sources/third_party/vulkan/src/layers/threading.cpp @@ -200,7 +200,8 @@ static const VkExtensionProperties threading_extensions[] = { static const VkLayerProperties layerProps = { "VK_LAYER_GOOGLE_threading", VK_LAYER_API_VERSION, // specVersion - 1, "Google Validation Layer", + 1, + "Google Validation Layer", }; VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t *pCount, VkLayerProperties *pProperties) { diff --git a/sources/third_party/vulkan/src/layers/threading.h b/sources/third_party/vulkan/src/layers/threading.h index 9d6a6546b2cc2a7b6bc41be79259a924e0b615a1..e2301d000a7d44d803421c6e743efbdaff018c6c 100644 --- a/sources/third_party/vulkan/src/layers/threading.h +++ b/sources/third_party/vulkan/src/layers/threading.h @@ -96,8 +96,9 @@ class counter { if (use_data->thread != tid) { skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", - "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", - typeName, use_data->thread, tid); + "THREADING ERROR : object of type %s is simultaneously used in " + "thread 0x%" PRIx64 " and thread 0x%" PRIx64, + typeName, (uint64_t)use_data->thread, (uint64_t)tid); if (skipCall) { // Wait for thread-safe access to object instead of skipping call. while (uses.find(object) != uses.end()) { @@ -123,8 +124,9 @@ class counter { if (use_data->thread != tid) { skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", - "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", - typeName, use_data->thread, tid); + "THREADING ERROR : object of type %s is simultaneously used in " + "thread 0x%" PRIx64 " and thread 0x%" PRIx64, + typeName, (uint64_t)use_data->thread, (uint64_t)tid); if (skipCall) { // Wait for thread-safe access to object instead of skipping call. while (uses.find(object) != uses.end()) { @@ -181,8 +183,9 @@ class counter { // There is a writer of the object. skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", - "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", typeName, - uses[object].thread, tid); + "THREADING ERROR : object of type %s is simultaneously used in " + "thread 0x%" PRIx64 " and thread 0x%" PRIx64, + typeName, (uint64_t)uses[object].thread, (uint64_t)tid); if (skipCall) { // Wait for thread-safe access to object instead of skipping call. while (uses.find(object) != uses.end()) { @@ -303,12 +306,14 @@ struct layer_data { c_VkShaderModule("VkShaderModule", VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT), c_VkDebugReportCallbackEXT("VkDebugReportCallbackEXT", VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT), c_VkObjectTableNVX("VkObjectTableNVX", VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT), - c_VkIndirectCommandsLayoutNVX("VkIndirectCommandsLayoutNVX", VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT), + c_VkIndirectCommandsLayoutNVX("VkIndirectCommandsLayoutNVX", + VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT), c_VkDisplayKHR("VkDisplayKHR", VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT), c_VkDisplayModeKHR("VkDisplayModeKHR", VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT), c_VkSurfaceKHR("VkSurfaceKHR", VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT), c_VkSwapchainKHR("VkSwapchainKHR", VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT), - c_VkDescriptorUpdateTemplateKHR("VkDescriptorUpdateTemplateKHR", VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT), + c_VkDescriptorUpdateTemplateKHR("VkDescriptorUpdateTemplateKHR", + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT), c_VkSamplerYcbcrConversionKHR("VkSamplerYcbcrConversionKHR", VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT) #else // DISTINCT_NONDISPATCHABLE_HANDLES c_uint64_t("NON_DISPATCHABLE_HANDLE", VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT) diff --git a/sources/third_party/vulkan/src/layers/unique_objects.cpp b/sources/third_party/vulkan/src/layers/unique_objects.cpp index d324ce49105e23180a968dbb223779ffeb83c2c4..e45b672f90b8f52553b3fae9e21c97e2382d19f5 100644 --- a/sources/third_party/vulkan/src/layers/unique_objects.cpp +++ b/sources/third_party/vulkan/src/layers/unique_objects.cpp @@ -46,6 +46,7 @@ #include "vk_enum_string_helper.h" #include "vk_validation_error_messages.h" #include "vk_object_types.h" +#include "vk_extension_helper.h" #include "vulkan/vk_layer.h" // This intentionally includes a cpp file @@ -67,11 +68,11 @@ static void InstanceExtensionWhitelist(const VkInstanceCreateInfo *pCreateInfo, for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { // Check for recognized instance extensions - if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kUniqueObjectsSupportedInstanceExtensions)) { + if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kInstanceExtensionNames)) { log_msg(instance_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_UNDEFINED, "UniqueObjects", - "Instance Extension %s is not supported by this layer. Using this extension may adversely affect " - "validation results and/or produce undefined behavior.", + "Instance Extension %s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); } } @@ -83,11 +84,11 @@ static void DeviceExtensionWhitelist(const VkDeviceCreateInfo *pCreateInfo, VkDe for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { // Check for recognized device extensions - if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kUniqueObjectsSupportedDeviceExtensions)) { + if (!white_list(pCreateInfo->ppEnabledExtensionNames[i], kDeviceExtensionNames)) { log_msg(device_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, VALIDATION_ERROR_UNDEFINED, "UniqueObjects", - "Device Extension %s is not supported by this layer. Using this extension may adversely affect " - "validation results and/or produce undefined behavior.", + "Device Extension %s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); } } @@ -117,9 +118,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreat layer_init_instance_dispatch_table(*pInstance, &instance_data->dispatch_table, fpGetInstanceProcAddr); instance_data->instance = *pInstance; - instance_data->report_data = - debug_report_create_instance(&instance_data->dispatch_table, *pInstance, pCreateInfo->enabledExtensionCount, - pCreateInfo->ppEnabledExtensionNames); + instance_data->report_data = debug_report_create_instance( + &instance_data->dispatch_table, *pInstance, pCreateInfo->enabledExtensionCount, pCreateInfo->ppEnabledExtensionNames); // Set up temporary debug callbacks to output messages at CreateInstance-time if (!layer_copy_tmp_callbacks(pCreateInfo->pNext, &instance_data->num_tmp_callbacks, &instance_data->tmp_dbg_create_infos, @@ -269,7 +269,6 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance return table.GetInstanceProcAddr(instance, funcName); } - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { instance_layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(instance), instance_layer_data_map); VkLayerInstanceDispatchTable *disp_table = &instance_data->dispatch_table; @@ -290,29 +289,29 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelin for (uint32_t idx0 = 0; idx0 < createInfoCount; ++idx0) { local_pCreateInfos[idx0].initialize(&pCreateInfos[idx0]); if (pCreateInfos[idx0].basePipelineHandle) { - local_pCreateInfos[idx0].basePipelineHandle = Unwrap(device_data, pCreateInfos[idx0].basePipelineHandle); + local_pCreateInfos[idx0].basePipelineHandle = Unwrap(pCreateInfos[idx0].basePipelineHandle); } if (pCreateInfos[idx0].layout) { - local_pCreateInfos[idx0].layout = Unwrap(device_data, pCreateInfos[idx0].layout); + local_pCreateInfos[idx0].layout = Unwrap(pCreateInfos[idx0].layout); } if (pCreateInfos[idx0].stage.module) { - local_pCreateInfos[idx0].stage.module = Unwrap(device_data, pCreateInfos[idx0].stage.module); + local_pCreateInfos[idx0].stage.module = Unwrap(pCreateInfos[idx0].stage.module); } } } if (pipelineCache) { std::lock_guard lock(global_lock); - pipelineCache = Unwrap(device_data, pipelineCache); + pipelineCache = Unwrap(pipelineCache); } - VkResult result = device_data->dispatch_table.CreateComputePipelines( - device, pipelineCache, createInfoCount, local_pCreateInfos->ptr(), pAllocator, pPipelines); + VkResult result = device_data->dispatch_table.CreateComputePipelines(device, pipelineCache, createInfoCount, + local_pCreateInfos->ptr(), pAllocator, pPipelines); delete[] local_pCreateInfos; { std::lock_guard lock(global_lock); for (uint32_t i = 0; i < createInfoCount; ++i) { if (pPipelines[i] != VK_NULL_HANDLE) { - pPipelines[i] = WrapNew(device_data, pPipelines[i]); + pPipelines[i] = WrapNew(pPipelines[i]); } } } @@ -328,44 +327,107 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipeli local_pCreateInfos = new safe_VkGraphicsPipelineCreateInfo[createInfoCount]; std::lock_guard lock(global_lock); for (uint32_t idx0 = 0; idx0 < createInfoCount; ++idx0) { - local_pCreateInfos[idx0].initialize(&pCreateInfos[idx0]); + bool uses_color_attachment = false; + bool uses_depthstencil_attachment = false; + { + const auto subpasses_uses_it = device_data->renderpasses_states.find(Unwrap(pCreateInfos[idx0].renderPass)); + if (subpasses_uses_it != device_data->renderpasses_states.end()) { + const auto &subpasses_uses = subpasses_uses_it->second; + if (subpasses_uses.subpasses_using_color_attachment.count(pCreateInfos[idx0].subpass)) + uses_color_attachment = true; + if (subpasses_uses.subpasses_using_depthstencil_attachment.count(pCreateInfos[idx0].subpass)) + uses_depthstencil_attachment = true; + } + } + + local_pCreateInfos[idx0].initialize(&pCreateInfos[idx0], uses_color_attachment, uses_depthstencil_attachment); + if (pCreateInfos[idx0].basePipelineHandle) { - local_pCreateInfos[idx0].basePipelineHandle = Unwrap(device_data, pCreateInfos[idx0].basePipelineHandle); + local_pCreateInfos[idx0].basePipelineHandle = Unwrap(pCreateInfos[idx0].basePipelineHandle); } if (pCreateInfos[idx0].layout) { - local_pCreateInfos[idx0].layout = Unwrap(device_data, pCreateInfos[idx0].layout); + local_pCreateInfos[idx0].layout = Unwrap(pCreateInfos[idx0].layout); } if (pCreateInfos[idx0].pStages) { for (uint32_t idx1 = 0; idx1 < pCreateInfos[idx0].stageCount; ++idx1) { if (pCreateInfos[idx0].pStages[idx1].module) { - local_pCreateInfos[idx0].pStages[idx1].module = Unwrap(device_data, pCreateInfos[idx0].pStages[idx1].module); + local_pCreateInfos[idx0].pStages[idx1].module = Unwrap(pCreateInfos[idx0].pStages[idx1].module); } } } if (pCreateInfos[idx0].renderPass) { - local_pCreateInfos[idx0].renderPass = Unwrap(device_data, pCreateInfos[idx0].renderPass); + local_pCreateInfos[idx0].renderPass = Unwrap(pCreateInfos[idx0].renderPass); } } } if (pipelineCache) { std::lock_guard lock(global_lock); - pipelineCache = Unwrap(device_data, pipelineCache); + pipelineCache = Unwrap(pipelineCache); } - VkResult result = device_data->dispatch_table.CreateGraphicsPipelines( - device, pipelineCache, createInfoCount, local_pCreateInfos->ptr(), pAllocator, pPipelines); + VkResult result = device_data->dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, + local_pCreateInfos->ptr(), pAllocator, pPipelines); delete[] local_pCreateInfos; { std::lock_guard lock(global_lock); for (uint32_t i = 0; i < createInfoCount; ++i) { if (pPipelines[i] != VK_NULL_HANDLE) { - pPipelines[i] = WrapNew(device_data, pPipelines[i]); + pPipelines[i] = WrapNew(pPipelines[i]); } } } return result; } +static void PostCallCreateRenderPass(layer_data *dev_data, const VkRenderPassCreateInfo *pCreateInfo, VkRenderPass renderPass) { + auto &renderpass_state = dev_data->renderpasses_states[renderPass]; + + for (uint32_t subpass = 0; subpass < pCreateInfo->subpassCount; ++subpass) { + bool uses_color = false; + for (uint32_t i = 0; i < pCreateInfo->pSubpasses[subpass].colorAttachmentCount && !uses_color; ++i) + if (pCreateInfo->pSubpasses[subpass].pColorAttachments[i].attachment != VK_ATTACHMENT_UNUSED) uses_color = true; + + bool uses_depthstencil = false; + if (pCreateInfo->pSubpasses[subpass].pDepthStencilAttachment) + if (pCreateInfo->pSubpasses[subpass].pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) + uses_depthstencil = true; + + if (uses_color) renderpass_state.subpasses_using_color_attachment.insert(subpass); + if (uses_depthstencil) renderpass_state.subpasses_using_depthstencil_attachment.insert(subpass); + } +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + if (VK_SUCCESS == result) { + std::lock_guard lock(global_lock); + + PostCallCreateRenderPass(dev_data, pCreateInfo, *pRenderPass); + + *pRenderPass = WrapNew(*pRenderPass); + } + return result; +} + +static void PostCallDestroyRenderPass(layer_data *dev_data, VkRenderPass renderPass) { + dev_data->renderpasses_states.erase(renderPass); +} + +VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + std::unique_lock lock(global_lock); + uint64_t renderPass_id = reinterpret_cast(renderPass); + renderPass = (VkRenderPass)unique_id_mapping[renderPass_id]; + unique_id_mapping.erase(renderPass_id); + lock.unlock(); + dev_data->dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); + + lock.lock(); + PostCallDestroyRenderPass(dev_data, renderPass); +} + VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) { layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); @@ -373,19 +435,18 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc if (pCreateInfo) { std::lock_guard lock(global_lock); local_pCreateInfo = new safe_VkSwapchainCreateInfoKHR(pCreateInfo); - local_pCreateInfo->oldSwapchain = Unwrap(my_map_data, pCreateInfo->oldSwapchain); + local_pCreateInfo->oldSwapchain = Unwrap(pCreateInfo->oldSwapchain); // Surface is instance-level object - local_pCreateInfo->surface = Unwrap(my_map_data->instance_data, pCreateInfo->surface); + local_pCreateInfo->surface = Unwrap(pCreateInfo->surface); } - VkResult result = my_map_data->dispatch_table.CreateSwapchainKHR( - device, local_pCreateInfo->ptr(), pAllocator, pSwapchain); + VkResult result = my_map_data->dispatch_table.CreateSwapchainKHR(device, local_pCreateInfo->ptr(), pAllocator, pSwapchain); if (local_pCreateInfo) { delete local_pCreateInfo; } if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pSwapchain = WrapNew(my_map_data, *pSwapchain); + *pSwapchain = WrapNew(*pSwapchain); } return result; } @@ -403,21 +464,21 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 local_pCreateInfos[i].initialize(&pCreateInfos[i]); if (pCreateInfos[i].surface) { // Surface is instance-level object - local_pCreateInfos[i].surface = Unwrap(dev_data->instance_data, pCreateInfos[i].surface); + local_pCreateInfos[i].surface = Unwrap(pCreateInfos[i].surface); } if (pCreateInfos[i].oldSwapchain) { - local_pCreateInfos[i].oldSwapchain = Unwrap(dev_data, pCreateInfos[i].oldSwapchain); + local_pCreateInfos[i].oldSwapchain = Unwrap(pCreateInfos[i].oldSwapchain); } } } } - VkResult result = dev_data->dispatch_table.CreateSharedSwapchainsKHR( - device, swapchainCount, local_pCreateInfos->ptr(), pAllocator, pSwapchains); + VkResult result = dev_data->dispatch_table.CreateSharedSwapchainsKHR(device, swapchainCount, local_pCreateInfos->ptr(), + pAllocator, pSwapchains); if (local_pCreateInfos) delete[] local_pCreateInfos; if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); for (uint32_t i = 0; i < swapchainCount; i++) { - pSwapchains[i] = WrapNew(dev_data, pSwapchains[i]); + pSwapchains[i] = WrapNew(pSwapchains[i]); } } return result; @@ -426,24 +487,45 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) { layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkSwapchainKHR wrapped_swapchain_handle = swapchain; if (VK_NULL_HANDLE != swapchain) { std::lock_guard lock(global_lock); - swapchain = Unwrap(my_device_data, swapchain); + swapchain = Unwrap(swapchain); } VkResult result = my_device_data->dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); - // TODO : Need to add corresponding code to delete these images - if (VK_SUCCESS == result) { + if ((VK_SUCCESS == result) || (VK_INCOMPLETE == result)) { if ((*pSwapchainImageCount > 0) && pSwapchainImages) { std::lock_guard lock(global_lock); - for (uint32_t i = 0; i < *pSwapchainImageCount; ++i) { - pSwapchainImages[i] = WrapNew(my_device_data, pSwapchainImages[i]); + auto &wrapped_swapchain_image_handles = my_device_data->swapchain_wrapped_image_handle_map[wrapped_swapchain_handle]; + for (uint32_t i = static_cast(wrapped_swapchain_image_handles.size()); i < *pSwapchainImageCount; i++) { + wrapped_swapchain_image_handles.emplace_back(WrapNew(pSwapchainImages[i])); + } + for (uint32_t i = 0; i < *pSwapchainImageCount; i++) { + pSwapchainImages[i] = wrapped_swapchain_image_handles[i]; } } } return result; } +VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + std::unique_lock lock(global_lock); + + auto &image_array = dev_data->swapchain_wrapped_image_handle_map[swapchain]; + for (auto &image_handle : image_array) { + unique_id_mapping.erase(HandleToUint64(image_handle)); + } + dev_data->swapchain_wrapped_image_handle_map.erase(swapchain); + + uint64_t swapchain_id = HandleToUint64(swapchain); + swapchain = (VkSwapchainKHR)unique_id_mapping[swapchain_id]; + unique_id_mapping.erase(swapchain_id); + lock.unlock(); + dev_data->dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); +} + VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); safe_VkPresentInfoKHR *local_pPresentInfo = NULL; @@ -453,12 +535,12 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf local_pPresentInfo = new safe_VkPresentInfoKHR(pPresentInfo); if (local_pPresentInfo->pWaitSemaphores) { for (uint32_t index1 = 0; index1 < local_pPresentInfo->waitSemaphoreCount; ++index1) { - local_pPresentInfo->pWaitSemaphores[index1] = Unwrap(dev_data, pPresentInfo->pWaitSemaphores[index1]); + local_pPresentInfo->pWaitSemaphores[index1] = Unwrap(pPresentInfo->pWaitSemaphores[index1]); } } if (local_pPresentInfo->pSwapchains) { for (uint32_t index1 = 0; index1 < local_pPresentInfo->swapchainCount; ++index1) { - local_pPresentInfo->pSwapchains[index1] = Unwrap(dev_data, pPresentInfo->pSwapchains[index1]); + local_pPresentInfo->pSwapchains[index1] = Unwrap(pPresentInfo->pSwapchains[index1]); } } } @@ -488,18 +570,18 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR(VkDevice device if (pCreateInfo) { local_create_info = new safe_VkDescriptorUpdateTemplateCreateInfoKHR(pCreateInfo); if (pCreateInfo->descriptorSetLayout) { - local_create_info->descriptorSetLayout = Unwrap(dev_data, pCreateInfo->descriptorSetLayout); + local_create_info->descriptorSetLayout = Unwrap(pCreateInfo->descriptorSetLayout); } if (pCreateInfo->pipelineLayout) { - local_create_info->pipelineLayout = Unwrap(dev_data, pCreateInfo->pipelineLayout); + local_create_info->pipelineLayout = Unwrap(pCreateInfo->pipelineLayout); } } } - VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplateKHR( - device, local_create_info->ptr(), pAllocator, pDescriptorUpdateTemplate); + VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplateKHR(device, local_create_info->ptr(), pAllocator, + pDescriptorUpdateTemplate); if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); - *pDescriptorUpdateTemplate = WrapNew(dev_data, *pDescriptorUpdateTemplate); + *pDescriptorUpdateTemplate = WrapNew(*pDescriptorUpdateTemplate); // Shadow template createInfo for later updates std::unique_ptr template_state(new TEMPLATE_STATE(*pDescriptorUpdateTemplate, local_create_info)); @@ -515,8 +597,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR(VkDevice device, std::unique_lock lock(global_lock); uint64_t descriptor_update_template_id = reinterpret_cast(descriptorUpdateTemplate); dev_data->desc_template_map.erase(descriptor_update_template_id); - descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)dev_data->unique_id_mapping[descriptor_update_template_id]; - dev_data->unique_id_mapping.erase(descriptor_update_template_id); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)unique_id_mapping[descriptor_update_template_id]; + unique_id_mapping.erase(descriptor_update_template_id); lock.unlock(); dev_data->dispatch_table.DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); } @@ -545,8 +627,8 @@ void *BuildUnwrappedUpdateTemplateBuffer(layer_data *dev_data, uint64_t descript allocation_size = std::max(allocation_size, offset + sizeof(VkDescriptorImageInfo)); VkDescriptorImageInfo *wrapped_entry = new VkDescriptorImageInfo(*image_entry); - wrapped_entry->sampler = Unwrap(dev_data, image_entry->sampler); - wrapped_entry->imageView = Unwrap(dev_data, image_entry->imageView); + wrapped_entry->sampler = Unwrap(image_entry->sampler); + wrapped_entry->imageView = Unwrap(image_entry->imageView); template_entries.emplace_back(offset, kVulkanObjectTypeImage, reinterpret_cast(wrapped_entry)); } break; @@ -558,7 +640,7 @@ void *BuildUnwrappedUpdateTemplateBuffer(layer_data *dev_data, uint64_t descript allocation_size = std::max(allocation_size, offset + sizeof(VkDescriptorBufferInfo)); VkDescriptorBufferInfo *wrapped_entry = new VkDescriptorBufferInfo(*buffer_entry); - wrapped_entry->buffer = Unwrap(dev_data, buffer_entry->buffer); + wrapped_entry->buffer = Unwrap(buffer_entry->buffer); template_entries.emplace_back(offset, kVulkanObjectTypeBuffer, reinterpret_cast(wrapped_entry)); } break; @@ -567,7 +649,7 @@ void *BuildUnwrappedUpdateTemplateBuffer(layer_data *dev_data, uint64_t descript auto buffer_view_handle = reinterpret_cast(update_entry); allocation_size = std::max(allocation_size, offset + sizeof(VkBufferView)); - VkBufferView wrapped_entry = Unwrap(dev_data, *buffer_view_handle); + VkBufferView wrapped_entry = Unwrap(*buffer_view_handle); template_entries.emplace_back(offset, kVulkanObjectTypeBufferView, reinterpret_cast(wrapped_entry)); } break; default: @@ -608,14 +690,14 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(VkDevice device, V const void *pData) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); uint64_t template_handle = reinterpret_cast(descriptorUpdateTemplate); + void *unwrapped_buffer = nullptr; { std::lock_guard lock(global_lock); - descriptorSet = Unwrap(dev_data, descriptorSet); - descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)dev_data->unique_id_mapping[template_handle]; + descriptorSet = Unwrap(descriptorSet); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)unique_id_mapping[template_handle]; + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); } - void *unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); - dev_data->dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, - unwrapped_buffer); + dev_data->dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, unwrapped_buffer); free(unwrapped_buffer); } @@ -624,14 +706,15 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer c VkPipelineLayout layout, uint32_t set, const void *pData) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); uint64_t template_handle = reinterpret_cast(descriptorUpdateTemplate); + void *unwrapped_buffer = nullptr; { std::lock_guard lock(global_lock); - descriptorUpdateTemplate = Unwrap(dev_data, descriptorUpdateTemplate); - layout = Unwrap(dev_data, layout); + descriptorUpdateTemplate = Unwrap(descriptorUpdateTemplate); + layout = Unwrap(layout); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); } - void *unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); dev_data->dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, - unwrapped_buffer); + unwrapped_buffer); free(unwrapped_buffer); } @@ -640,12 +723,12 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VkDisplayPropertiesKHR *pProperties) { instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); - VkResult result = my_map_data->dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR( - physicalDevice, pPropertyCount, pProperties); + VkResult result = + my_map_data->dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { std::lock_guard lock(global_lock); for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].display = WrapNew(my_map_data, pProperties[idx0].display); + pProperties[idx0].display = WrapNew(pProperties[idx0].display); } } return result; @@ -654,15 +737,15 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); - VkResult result = my_map_data->dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, - pDisplayCount, pDisplays); + VkResult result = + my_map_data->dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); if (VK_SUCCESS == result) { if ((*pDisplayCount > 0) && pDisplays) { std::lock_guard lock(global_lock); for (uint32_t i = 0; i < *pDisplayCount; i++) { // TODO: this looks like it really wants a /reverse/ mapping. What's going on here? - auto it = my_map_data->unique_id_mapping.find(reinterpret_cast(pDisplays[i])); - assert(it != my_map_data->unique_id_mapping.end()); + auto it = unique_id_mapping.find(reinterpret_cast(pDisplays[i])); + assert(it != unique_id_mapping.end()); pDisplays[i] = reinterpret_cast(it->second); } } @@ -675,15 +758,14 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice phys instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - display = Unwrap(my_map_data, display); + display = Unwrap(display); } - VkResult result = my_map_data->dispatch_table.GetDisplayModePropertiesKHR( - physicalDevice, display, pPropertyCount, pProperties); + VkResult result = my_map_data->dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); if (result == VK_SUCCESS && pProperties) { std::lock_guard lock(global_lock); for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].displayMode = WrapNew(my_map_data, pProperties[idx0].displayMode); + pProperties[idx0].displayMode = WrapNew(pProperties[idx0].displayMode); } } return result; @@ -694,10 +776,9 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); { std::lock_guard lock(global_lock); - mode = Unwrap(dev_data, mode); + mode = Unwrap(mode); } - VkResult result = - dev_data->dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + VkResult result = dev_data->dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); return result; } #endif @@ -707,8 +788,8 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, const auto local_tag_info = new safe_VkDebugMarkerObjectTagInfoEXT(pTagInfo); { std::lock_guard lock(global_lock); - auto it = device_data->unique_id_mapping.find(reinterpret_cast(local_tag_info->object)); - if (it != device_data->unique_id_mapping.end()) { + auto it = unique_id_mapping.find(reinterpret_cast(local_tag_info->object)); + if (it != unique_id_mapping.end()) { local_tag_info->object = it->second; } } @@ -722,8 +803,8 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, cons auto local_name_info = new safe_VkDebugMarkerObjectNameInfoEXT(pNameInfo); { std::lock_guard lock(global_lock); - auto it = device_data->unique_id_mapping.find(reinterpret_cast(local_name_info->object)); - if (it != device_data->unique_id_mapping.end()) { + auto it = unique_id_mapping.find(reinterpret_cast(local_name_info->object)); + if (it != unique_id_mapping.end()) { local_name_info->object = it->second; } } diff --git a/sources/third_party/vulkan/src/layers/unique_objects.h b/sources/third_party/vulkan/src/layers/unique_objects.h index 57b9dbf3e127e59b58b7f2f08b404ff833cf9145..27eb34f922640bfeef168d15799f505f6fe41452 100644 --- a/sources/third_party/vulkan/src/layers/unique_objects.h +++ b/sources/third_party/vulkan/src/layers/unique_objects.h @@ -21,6 +21,9 @@ #include "vulkan/vulkan.h" +#include +#include + #include "vk_layer_data.h" #include "vk_safe_struct.h" #include "vk_layer_utils.h" @@ -32,6 +35,7 @@ namespace unique_objects { // All increments must be guarded by global_lock static uint64_t global_unique_id = 1; +static std::unordered_map unique_id_mapping; // Map uniqueID to actual object handle struct TEMPLATE_STATE { VkDescriptorUpdateTemplateKHR desc_update_template; @@ -48,13 +52,10 @@ struct instance_layer_data { std::vector logging_callback; VkLayerInstanceDispatchTable dispatch_table = {}; - // The following are for keeping track of the temporary callbacks that can - // be used in vkCreateInstance and vkDestroyInstance: + // The following are for keeping track of the temporary callbacks that can be used in vkCreateInstance and vkDestroyInstance: uint32_t num_tmp_callbacks; VkDebugReportCallbackCreateInfoEXT *tmp_dbg_create_infos; VkDebugReportCallbackEXT *tmp_callbacks; - - std::unordered_map unique_id_mapping; // Map uniqueID to actual object handle }; struct layer_data { @@ -66,9 +67,19 @@ struct layer_data { std::unordered_map> desc_template_map; bool wsi_enabled; - std::unordered_map unique_id_mapping; // Map uniqueID to actual object handle VkPhysicalDevice gpu; + struct SubpassesUsageStates { + std::unordered_set subpasses_using_color_attachment; + std::unordered_set subpasses_using_depthstencil_attachment; + }; + // Uses unwrapped handles + std::unordered_map renderpasses_states; + + // Map of wrapped swapchain handles to arrays of wrapped swapchain image IDs + // Each swapchain has an immutable list of wrapped swapchain image IDs -- always return these IDs if they exist + std::unordered_map> swapchain_wrapped_image_handle_map; + layer_data() : wsi_enabled(false), gpu(VK_NULL_HANDLE){}; }; @@ -99,21 +110,19 @@ bool ContainsExtStruct(const T *target, VkStructureType ext_type) { return false; } - /* Unwrap a handle. */ // must hold lock! -template -HandleType Unwrap(MapType *layer_data, HandleType wrappedHandle) { +template +HandleType Unwrap(HandleType wrappedHandle) { // TODO: don't use operator[] here. - return (HandleType)layer_data->unique_id_mapping[reinterpret_cast(wrappedHandle)]; + return (HandleType)unique_id_mapping[reinterpret_cast(wrappedHandle)]; } -/* Wrap a newly created handle with a new unique ID, and return the new ID. */ -// must hold lock! -template -HandleType WrapNew(MapType *layer_data, HandleType newlyCreatedHandle) { +// Wrap a newly created handle with a new unique ID, and return the new ID -- must hold lock! +template +HandleType WrapNew(HandleType newlyCreatedHandle) { auto unique_id = global_unique_id++; - layer_data->unique_id_mapping[unique_id] = reinterpret_cast(newlyCreatedHandle); + unique_id_mapping[unique_id] = reinterpret_cast(newlyCreatedHandle); return (HandleType)unique_id; } diff --git a/sources/third_party/vulkan/src/layers/vk_format_utils.cpp b/sources/third_party/vulkan/src/layers/vk_format_utils.cpp index 374cc602878aa85930110dfd6d6532b9acd58fd1..83029fe7f62c8047a7df1d2acd5b260339049b1b 100644 --- a/sources/third_party/vulkan/src/layers/vk_format_utils.cpp +++ b/sources/third_party/vulkan/src/layers/vk_format_utils.cpp @@ -351,9 +351,7 @@ VK_LAYER_EXPORT bool FormatIsCompressed_PVRTC(VkFormat format) { // Return true if format is compressed VK_LAYER_EXPORT bool FormatIsCompressed(VkFormat format) { - return (FormatIsCompressed_ASTC_LDR(format) || - FormatIsCompressed_BC(format) || - FormatIsCompressed_ETC2_EAC(format) || + return (FormatIsCompressed_ASTC_LDR(format) || FormatIsCompressed_BC(format) || FormatIsCompressed_ETC2_EAC(format) || FormatIsCompressed_PVRTC(format)); } @@ -471,7 +469,7 @@ VK_LAYER_EXPORT bool FormatIsNorm(VkFormat format) { } return is_norm; -}; +} // Return true if format is of type UNORM VK_LAYER_EXPORT bool FormatIsUNorm(VkFormat format) { @@ -529,7 +527,7 @@ VK_LAYER_EXPORT bool FormatIsUNorm(VkFormat format) { } return is_unorm; -}; +} // Return true if format is of type SNORM VK_LAYER_EXPORT bool FormatIsSNorm(VkFormat format) { @@ -560,7 +558,7 @@ VK_LAYER_EXPORT bool FormatIsSNorm(VkFormat format) { } return is_snorm; -}; +} // Return true if format is an integer format VK_LAYER_EXPORT bool FormatIsInt(VkFormat format) { return (FormatIsSInt(format) || FormatIsUInt(format)); } @@ -866,6 +864,38 @@ VK_LAYER_EXPORT VkExtent3D FormatCompressedTexelBlockExtent(VkFormat format) { return block_size; } +VK_LAYER_EXPORT uint32_t FormatPlaneCount(VkFormat format) { + switch (format) { + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR: + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR: + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR: + case VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR: + case VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR: + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR: + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR: + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR: + return 3u; + break; + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR: + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR: + case VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR: + case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR: + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR: + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR: + return 2u; + break; + default: + return 1u; + break; + } +} + // Return format class of the specified format VK_LAYER_EXPORT VkFormatCompatibilityClass FormatCompatibilityClass(VkFormat format) { auto item = vk_format_table.find(format); @@ -885,7 +915,7 @@ VK_LAYER_EXPORT size_t FormatSize(VkFormat format) { } // Return the number of channels for a given format -unsigned int FormatChannelCount(VkFormat format) { +uint32_t FormatChannelCount(VkFormat format) { auto item = vk_format_table.find(format); if (item != vk_format_table.end()) { return item->second.channel_count; diff --git a/sources/third_party/vulkan/src/layers/vk_format_utils.h b/sources/third_party/vulkan/src/layers/vk_format_utils.h index 7420a9373752b3f46bf08190ffc7ee87eb364265..8ffa231c7d81d10cce773431eb2205e60230a49e 100644 --- a/sources/third_party/vulkan/src/layers/vk_format_utils.h +++ b/sources/third_party/vulkan/src/layers/vk_format_utils.h @@ -111,17 +111,19 @@ VK_LAYER_EXPORT bool FormatIsUScaled(VkFormat format); VK_LAYER_EXPORT bool FormatIsSScaled(VkFormat format); VK_LAYER_EXPORT bool FormatIsCompressed(VkFormat format); -static inline bool FormatIsUndef(VkFormat format) { return (format == VK_FORMAT_UNDEFINED); } -static inline bool FormatIsColor(VkFormat format) { return !(FormatIsUndef(format) || FormatIsDepthOrStencil(format)); } -static inline bool FormatHasDepth(VkFormat format) { return (FormatIsDepthOnly(format) || FormatIsDepthAndStencil(format)); } -static inline bool FormatHasStencil(VkFormat format) { return (FormatIsStencilOnly(format) || FormatIsDepthAndStencil(format)); } - +VK_LAYER_EXPORT uint32_t FormatPlaneCount(VkFormat format); +VK_LAYER_EXPORT uint32_t FormatChannelCount(VkFormat format); VK_LAYER_EXPORT VkExtent3D FormatCompressedTexelBlockExtent(VkFormat format); VK_LAYER_EXPORT size_t FormatSize(VkFormat format); -VK_LAYER_EXPORT unsigned int FormatChannelCount(VkFormat format); VK_LAYER_EXPORT VkFormatCompatibilityClass FormatCompatibilityClass(VkFormat format); VK_LAYER_EXPORT VkDeviceSize SafeModulo(VkDeviceSize dividend, VkDeviceSize divisor); +static inline bool FormatIsUndef(VkFormat format) { return (format == VK_FORMAT_UNDEFINED); } +static inline bool FormatIsColor(VkFormat format) { return !(FormatIsUndef(format) || FormatIsDepthOrStencil(format)); } +static inline bool FormatHasDepth(VkFormat format) { return (FormatIsDepthOnly(format) || FormatIsDepthAndStencil(format)); } +static inline bool FormatHasStencil(VkFormat format) { return (FormatIsStencilOnly(format) || FormatIsDepthAndStencil(format)); } +static inline bool FormatIsMultiplane(VkFormat format) { return ((FormatPlaneCount(format)) > 1u); } + #ifdef __cplusplus } #endif diff --git a/sources/third_party/vulkan/src/layers/vk_layer_config.cpp b/sources/third_party/vulkan/src/layers/vk_layer_config.cpp index 55c4b76e76c418d73d85d0b10310926de74f6c81..7d60570fec8f1a6ef558131767a2a4e52a4fe7b4 100644 --- a/sources/third_party/vulkan/src/layers/vk_layer_config.cpp +++ b/sources/third_party/vulkan/src/layers/vk_layer_config.cpp @@ -31,6 +31,10 @@ #include #include +#if defined(_WIN32) +#include +#endif + #define MAX_CHARS_PER_LINE 4096 class ConfigFile { @@ -69,11 +73,11 @@ std::string getEnvironment(const char *variable) { #endif } -const char *getLayerOption(const char *_option) { return g_configFileObj.getOption(_option); } +VK_LAYER_EXPORT const char *getLayerOption(const char *_option) { return g_configFileObj.getOption(_option); } // If option is NULL or stdout, return stdout, otherwise try to open option // as a filename. If successful, return file handle, otherwise stdout -FILE *getLayerLogOutput(const char *_option, const char *layerName) { +VK_LAYER_EXPORT FILE *getLayerLogOutput(const char *_option, const char *layerName) { FILE *log_output = NULL; if (!_option || !strcmp("stdout", _option)) log_output = stdout; @@ -92,8 +96,8 @@ FILE *getLayerLogOutput(const char *_option, const char *layerName) { } // Map option strings to flag enum values -VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map const &enum_data, - uint32_t option_default) { +VK_LAYER_EXPORT VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map const &enum_data, + uint32_t option_default) { VkDebugReportFlagsEXT flags = option_default; std::string option_list = g_configFileObj.getOption(_option.c_str()); @@ -128,7 +132,7 @@ VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map report_flags_option_definitions = {std::string("error"), VK_DEBUG_REPORT_ERROR_BIT_EXT}, {std::string("debug"), VK_DEBUG_REPORT_DEBUG_BIT_EXT}}; -const char *getLayerOption(const char *_option); -FILE *getLayerLogOutput(const char *_option, const char *layerName); -VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map const &enum_data, - uint32_t option_default); +VK_LAYER_EXPORT const char *getLayerOption(const char *_option); +VK_LAYER_EXPORT FILE *getLayerLogOutput(const char *_option, const char *layerName); +VK_LAYER_EXPORT VkFlags GetLayerOptionFlags(std::string _option, std::unordered_map const &enum_data, + uint32_t option_default); -void setLayerOption(const char *_option, const char *_val); -void print_msg_flags(VkFlags msgFlags, char *msg_flags); +VK_LAYER_EXPORT void setLayerOption(const char *_option, const char *_val); +VK_LAYER_EXPORT void print_msg_flags(VkFlags msgFlags, char *msg_flags); #ifdef __cplusplus } diff --git a/sources/third_party/vulkan/src/layers/vk_layer_logging.h b/sources/third_party/vulkan/src/layers/vk_layer_logging.h index 7a565645227e2c33052482067d252af08204b7d7..559b5a45ad11a5e08f3e3e2da9d16eeda89dd460 100644 --- a/sources/third_party/vulkan/src/layers/vk_layer_logging.h +++ b/sources/third_party/vulkan/src/layers/vk_layer_logging.h @@ -36,7 +36,6 @@ #include #include - typedef struct _debug_report_data { VkLayerDbgFunctionNode *debug_callback_list; VkLayerDbgFunctionNode *default_debug_callback_list; @@ -236,8 +235,8 @@ static inline PFN_vkVoidFunction debug_report_get_instance_proc_addr(debug_repor // then allocates an array that can hold that many structs, as well as that // many VkDebugReportCallbackEXT handles. It then copies each // VkDebugReportCallbackCreateInfoEXT, and initializes each handle. -static VkResult layer_copy_tmp_callbacks(const void *pChain, uint32_t *num_callbacks, VkDebugReportCallbackCreateInfoEXT **infos, - VkDebugReportCallbackEXT **callbacks) { +static inline VkResult layer_copy_tmp_callbacks(const void *pChain, uint32_t *num_callbacks, + VkDebugReportCallbackCreateInfoEXT **infos, VkDebugReportCallbackEXT **callbacks) { uint32_t n = *num_callbacks = 0; const void *pNext = pChain; @@ -281,15 +280,15 @@ static VkResult layer_copy_tmp_callbacks(const void *pChain, uint32_t *num_callb } // This utility frees the arrays allocated by layer_copy_tmp_callbacks() -static void layer_free_tmp_callbacks(VkDebugReportCallbackCreateInfoEXT *infos, VkDebugReportCallbackEXT *callbacks) { +static inline void layer_free_tmp_callbacks(VkDebugReportCallbackCreateInfoEXT *infos, VkDebugReportCallbackEXT *callbacks) { free(infos); free(callbacks); } // This utility enables all of the VkDebugReportCallbackCreateInfoEXT structs // that were copied by layer_copy_tmp_callbacks() -static VkResult layer_enable_tmp_callbacks(debug_report_data *debug_data, uint32_t num_callbacks, - VkDebugReportCallbackCreateInfoEXT *infos, VkDebugReportCallbackEXT *callbacks) { +static inline VkResult layer_enable_tmp_callbacks(debug_report_data *debug_data, uint32_t num_callbacks, + VkDebugReportCallbackCreateInfoEXT *infos, VkDebugReportCallbackEXT *callbacks) { VkResult rtn = VK_SUCCESS; for (uint32_t i = 0; i < num_callbacks; i++) { rtn = layer_create_msg_callback(debug_data, false, &infos[i], NULL, &callbacks[i]); @@ -305,8 +304,8 @@ static VkResult layer_enable_tmp_callbacks(debug_report_data *debug_data, uint32 // This utility disables all of the VkDebugReportCallbackCreateInfoEXT structs // that were copied by layer_copy_tmp_callbacks() -static void layer_disable_tmp_callbacks(debug_report_data *debug_data, uint32_t num_callbacks, - VkDebugReportCallbackEXT *callbacks) { +static inline void layer_disable_tmp_callbacks(debug_report_data *debug_data, uint32_t num_callbacks, + VkDebugReportCallbackEXT *callbacks) { for (uint32_t i = 0; i < num_callbacks; i++) { layer_destroy_msg_callback(debug_data, callbacks[i], NULL); } @@ -323,6 +322,22 @@ static inline bool will_log_msg(debug_report_data *debug_data, VkFlags msgFlags) return true; } +#ifndef WIN32 +static inline int string_sprintf(std::string *output, const char *fmt, ...) __attribute__((format(printf, 2, 3))); +#endif +static inline int string_sprintf(std::string *output, const char *fmt, ...) { + std::string &formatted = *output; + va_list argptr; + va_start(argptr, fmt); + int reserve = vsnprintf(nullptr, 0, fmt, argptr); + va_end(argptr); + formatted.reserve(reserve + 1); + va_start(argptr, fmt); + int result = vsnprintf((char *)formatted.data(), formatted.capacity(), fmt, argptr); + va_end(argptr); + assert(result == reserve); + return result; +} #ifdef WIN32 static inline int vasprintf(char **strp, char const *fmt, va_list ap) { @@ -402,8 +417,8 @@ static inline VKAPI_ATTR VkBool32 VKAPI_CALL win32_debug_output_msg(VkFlags msgF } static inline VKAPI_ATTR VkBool32 VKAPI_CALL DebugBreakCallback(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType, - uint64_t srcObject, size_t location, int32_t msgCode, - const char *pLayerPrefix, const char *pMsg, void *pUserData) { + uint64_t srcObject, size_t location, int32_t msgCode, + const char *pLayerPrefix, const char *pMsg, void *pUserData) { #ifdef WIN32 DebugBreak(); #else @@ -413,7 +428,6 @@ static inline VKAPI_ATTR VkBool32 VKAPI_CALL DebugBreakCallback(VkFlags msgFlags return false; } - // TODO: Could be autogenerated for the specific handles for extra type safety... template static inline uint64_t HandleToUint64(HANDLE_T *h) { diff --git a/sources/third_party/vulkan/src/layers/vk_layer_utils.cpp b/sources/third_party/vulkan/src/layers/vk_layer_utils.cpp index 367c0bf1758fb4a2d8309068f75e13d17e484afb..d788daf76b0c5e0caf2f3e0874b3f5043dd0a03c 100644 --- a/sources/third_party/vulkan/src/layers/vk_layer_utils.cpp +++ b/sources/third_party/vulkan/src/layers/vk_layer_utils.cpp @@ -146,5 +146,4 @@ VK_LAYER_EXPORT void layer_debug_actions(debug_report_data *report_data, std::ve layer_create_msg_callback(report_data, default_layer_callback, &dbgCreateInfo, pAllocator, &callback); logging_callback.push_back(callback); } - } diff --git a/sources/third_party/vulkan/src/layers/vk_validation_error_database.txt b/sources/third_party/vulkan/src/layers/vk_validation_error_database.txt index 149bc6431fe1e1e049deb65ee2e4453ea6959397..d71ef064d5b857dd3e83e00b0a32fa1a2752fb6b 100644 --- a/sources/third_party/vulkan/src/layers/vk_validation_error_database.txt +++ b/sources/third_party/vulkan/src/layers/vk_validation_error_database.txt @@ -10,25 +10,28 @@ # core|ext: Either 'core' for core spec or some extension string that indicates the extension required for this VU to be relevant # errormsg: The unique error message for this check that includes spec language and link # note: Free txt field with any custom notes related to the check in question -VALIDATION_ERROR_00000009~^~Y~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-commonparent~^~core~^~The spec valid usage text states 'Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-commonparent)~^~implicit -VALIDATION_ERROR_00000a10~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-01288~^~core~^~The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01288)~^~ -VALIDATION_ERROR_00000a12~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-fence-01289~^~core~^~The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-01289)~^~ -VALIDATION_ERROR_00000a14~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-deviceMask-01290~^~core~^~The spec valid usage text states 'deviceMask must be a valid device mask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01290)~^~ -VALIDATION_ERROR_00000a16~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-deviceMask-01291~^~core~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01291)~^~ -VALIDATION_ERROR_00000d16~^~N~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-swapchain-01675~^~core~^~The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-01675)~^~ -VALIDATION_ERROR_00008801~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-fence-parameter~^~core~^~The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-parameter)~^~implicit -VALIDATION_ERROR_0001c40d~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-pNext-pNext)~^~implicit -VALIDATION_ERROR_0002b00b~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_0002b801~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-parameter~^~core~^~The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-parameter)~^~implicit -VALIDATION_ERROR_0002f001~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-swapchain-parameter~^~core~^~The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-parameter)~^~implicit -VALIDATION_ERROR_002004f0~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnAllocation-00632~^~core~^~The spec valid usage text states 'pfnAllocation must be a pointer to a valid user-defined PFN_vkAllocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnAllocation-00632)~^~ -VALIDATION_ERROR_002004f2~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnReallocation-00633~^~core~^~The spec valid usage text states 'pfnReallocation must be a pointer to a valid user-defined PFN_vkReallocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnReallocation-00633)~^~ -VALIDATION_ERROR_002004f4~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnFree-00634~^~core~^~The spec valid usage text states 'pfnFree must be a pointer to a valid user-defined PFN_vkFreeFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnFree-00634)~^~ +VALIDATION_ERROR_00000009~^~Y~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-commonparent~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-commonparent)~^~implicit +VALIDATION_ERROR_00000a10~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-01288~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01288)~^~ +VALIDATION_ERROR_00000a12~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-fence-01289~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-01289)~^~ +VALIDATION_ERROR_00000a14~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-deviceMask-01290~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must be a valid device mask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01290)~^~ +VALIDATION_ERROR_00000a16~^~N~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-deviceMask-01291~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01291)~^~ +VALIDATION_ERROR_00000d16~^~N~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-swapchain-01675~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-01675)~^~ +VALIDATION_ERROR_00000dea~^~N~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-01781~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01781)~^~ +VALIDATION_ERROR_00000dec~^~N~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-01782~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'semaphore and fence must not both be equal to VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01782)~^~ +VALIDATION_ERROR_00000e18~^~N~^~None~^~VkAcquireNextImageInfoKHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-01804~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'semaphore and fence must not both be equal to VK_NULL_HANDLE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01804)~^~ +VALIDATION_ERROR_00008801~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-fence-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-parameter)~^~implicit +VALIDATION_ERROR_0001c40d~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-pNext-pNext~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-pNext-pNext)~^~implicit +VALIDATION_ERROR_0002b00b~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-sType-sType~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_0002b801~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-semaphore-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-parameter)~^~implicit +VALIDATION_ERROR_0002f001~^~Y~^~Unknown~^~vkAcquireNextImage2KHX~^~VUID-VkAcquireNextImageInfoKHX-swapchain-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-parameter)~^~implicit +VALIDATION_ERROR_002004f0~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnAllocation-00632~^~core~^~The spec valid usage text states 'pfnAllocation must be a valid pointer to a valid user-defined PFN_vkAllocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnAllocation-00632)~^~ +VALIDATION_ERROR_002004f2~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnReallocation-00633~^~core~^~The spec valid usage text states 'pfnReallocation must be a valid pointer to a valid user-defined PFN_vkReallocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnReallocation-00633)~^~ +VALIDATION_ERROR_002004f4~^~Y~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnFree-00634~^~core~^~The spec valid usage text states 'pfnFree must be a valid pointer to a valid user-defined PFN_vkFreeFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnFree-00634)~^~ VALIDATION_ERROR_002004f6~^~N~^~Unknown~^~vkCmdBindPipeline~^~VUID-VkAllocationCallbacks-pfnInternalAllocation-00635~^~core~^~The spec valid usage text states 'If either of pfnInternalAllocation or pfnInternalFree is not NULL, both must be valid callbacks' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnInternalAllocation-00635)~^~ -VALIDATION_ERROR_004009c0~^~N~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-window-01248~^~core~^~The spec valid usage text states 'window must point to a valid Android ANativeWindow.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-window-01248)~^~TBD in parameter validation layer. -VALIDATION_ERROR_00409005~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask)~^~implicit -VALIDATION_ERROR_0041c40d~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0042b00b~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_004009c0~^~N~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-window-01248~^~(VK_KHR_surface)+(VK_KHR_android_surface)~^~The spec valid usage text states 'window must point to a valid Android ANativeWindow.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-window-01248)~^~TBD in parameter validation layer. +VALIDATION_ERROR_00409005~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask~^~(VK_KHR_surface)+(VK_KHR_android_surface)~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask)~^~implicit +VALIDATION_ERROR_0041c40d~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext~^~(VK_KHR_surface)+(VK_KHR_android_surface)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0042b00b~^~Y~^~Unknown~^~vkCreateAndroidSurfaceKHR~^~VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType~^~(VK_KHR_surface)+(VK_KHR_android_surface)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0060f001~^~N~^~Unknown~^~vkCreateInstance~^~VUID-VkApplicationInfo-pApplicationName-parameter~^~core~^~The spec valid usage text states 'If pApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pApplicationName-parameter)~^~implicit VALIDATION_ERROR_00615c01~^~N~^~Unknown~^~vkCreateInstance~^~VUID-VkApplicationInfo-pEngineName-parameter~^~core~^~The spec valid usage text states 'If pEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pEngineName-parameter)~^~implicit VALIDATION_ERROR_0061c40d~^~Y~^~Unknown~^~vkCreateInstance~^~VUID-VkApplicationInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. @@ -45,30 +48,30 @@ VALIDATION_ERROR_0082e201~^~Y~^~Unknown~^~vkCreateRenderPass~^~VUID-VkAttachment VALIDATION_ERROR_0082e401~^~Y~^~Unknown~^~vkCreateRenderPass~^~VUID-VkAttachmentDescription-storeOp-parameter~^~core~^~The spec valid usage text states 'storeOp must be a valid VkAttachmentStoreOp value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentDescription-storeOp-parameter)~^~implicit VALIDATION_ERROR_00a006b2~^~N~^~Unknown~^~vkCreateRenderPass~^~VUID-VkAttachmentReference-layout-00857~^~core~^~The spec valid usage text states 'layout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentReference-layout-00857)~^~ VALIDATION_ERROR_00a0be01~^~Y~^~Unknown~^~vkCreateRenderPass~^~VUID-VkAttachmentReference-layout-parameter~^~core~^~The spec valid usage text states 'layout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentReference-layout-parameter)~^~implicit -VALIDATION_ERROR_00c00009~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-commonparent~^~core~^~The spec valid usage text states 'Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-commonparent)~^~implicit +VALIDATION_ERROR_00c00009~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-commonparent~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-commonparent)~^~implicit VALIDATION_ERROR_00c00820~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-None-01040~^~core~^~The spec valid usage text states 'All valid usage rules from vkBindBufferMemory apply to the identically named members of VkBindBufferMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-None-01040)~^~ VALIDATION_ERROR_00c00822~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-deviceIndexCount-01041~^~core~^~The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-deviceIndexCount-01041)~^~ VALIDATION_ERROR_00c00824~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-01042~^~core~^~The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-01042)~^~ VALIDATION_ERROR_00c00826~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-None-01043~^~core~^~The spec valid usage text states 'All instances of memory that are bound to must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-None-01043)~^~ -VALIDATION_ERROR_00c00c72~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01593~^~core~^~The spec valid usage text states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01593)~^~ -VALIDATION_ERROR_00c00c74~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01594~^~core~^~The spec valid usage text states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01594)~^~ -VALIDATION_ERROR_00c00c76~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595~^~core~^~The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595)~^~ -VALIDATION_ERROR_00c00c78~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01596~^~core~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01596)~^~ -VALIDATION_ERROR_00c00c7a~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01597~^~core~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01597)~^~ -VALIDATION_ERROR_00c00c7c~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01598~^~core~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01598)~^~ -VALIDATION_ERROR_00c00c7e~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memory-01599~^~core~^~The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-01599)~^~ -VALIDATION_ERROR_00c00c80~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600~^~core~^~The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600)~^~ -VALIDATION_ERROR_00c00c82~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-size-01601~^~core~^~The spec valid usage text states 'The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-size-01601)~^~ -VALIDATION_ERROR_00c00c84~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01602~^~(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01602)~^~ -VALIDATION_ERROR_00c00c86~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01603~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01603)~^~ -VALIDATION_ERROR_00c00c88~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01604~^~(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01604)~^~ -VALIDATION_ERROR_00c00c8a~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-pNext-01605~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindBufferMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindBufferMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-01605)~^~ -VALIDATION_ERROR_00c01a01~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-parameter~^~core~^~The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-parameter)~^~implicit -VALIDATION_ERROR_00c0c601~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memory-parameter~^~core~^~The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-parameter)~^~implicit +VALIDATION_ERROR_00c00c72~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01593~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01593)~^~ +VALIDATION_ERROR_00c00c74~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01594~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01594)~^~ +VALIDATION_ERROR_00c00c76~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595)~^~ +VALIDATION_ERROR_00c00c78~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01596~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01596)~^~ +VALIDATION_ERROR_00c00c7a~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01597~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01597)~^~ +VALIDATION_ERROR_00c00c7c~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01598~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01598)~^~ +VALIDATION_ERROR_00c00c7e~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memory-01599~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-01599)~^~ +VALIDATION_ERROR_00c00c80~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600)~^~ +VALIDATION_ERROR_00c00c82~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-size-01601~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-size-01601)~^~ +VALIDATION_ERROR_00c00c84~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01602~^~(VK_KHR_bind_memory2)+(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01602)~^~ +VALIDATION_ERROR_00c00c86~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01603~^~(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01603)~^~ +VALIDATION_ERROR_00c00c88~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-01604~^~(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01604)~^~ +VALIDATION_ERROR_00c00c8a~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-pNext-01605~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindBufferMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindBufferMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-01605)~^~ +VALIDATION_ERROR_00c01a01~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-buffer-parameter~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-parameter)~^~implicit +VALIDATION_ERROR_00c0c601~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-memory-parameter~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-parameter)~^~implicit VALIDATION_ERROR_00c13e01~^~N~^~Unknown~^~vkBindBufferMemory2KHR~^~VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-parameter~^~core~^~The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-parameter)~^~implicit -VALIDATION_ERROR_00c1c40d~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_00c2b00b~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_00e00009~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-commonparent~^~core~^~The spec valid usage text states 'Both of image, and memory that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-commonparent)~^~implicit +VALIDATION_ERROR_00c1c40d~^~Y~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-pNext-pNext~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_00c2b00b~^~N~^~None~^~VkBindBufferMemoryInfoKHR~^~VUID-VkBindBufferMemoryInfoKHR-sType-sType~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_00e00009~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-commonparent~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'Both of image, and memory that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-commonparent)~^~implicit VALIDATION_ERROR_00e00838~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-None-01052~^~core~^~The spec valid usage text states 'All valid usage rules from vkBindImageMemory apply to the identically named members of VkBindImageMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-None-01052)~^~ VALIDATION_ERROR_00e0083a~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01053~^~core~^~The spec valid usage text states 'At least one of deviceIndexCount and SFRRectCount must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01053)~^~ VALIDATION_ERROR_00e0083c~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01054~^~core~^~The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01054)~^~ @@ -83,59 +86,59 @@ VALIDATION_ERROR_00e0084e~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindIma VALIDATION_ERROR_00e00850~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-extent-01064~^~core~^~The spec valid usage text states 'For each element of pSFRRects, extent.height must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else (extent.height + offset.y) must equal the height of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-extent-01064)~^~ VALIDATION_ERROR_00e00852~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-None-01065~^~core~^~The spec valid usage text states 'All instances of memory that are bound must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-None-01065)~^~ VALIDATION_ERROR_00e00854~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01066~^~core~^~The spec valid usage text states 'If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the image must be bound to memory from that swapchain (using VkBindImageMemorySwapchainInfoKHX).' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01066)~^~ -VALIDATION_ERROR_00e00c92~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01609~^~core~^~The spec valid usage text states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01609)~^~ -VALIDATION_ERROR_00e00c94~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01610~^~core~^~The spec valid usage text states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01610)~^~ -VALIDATION_ERROR_00e00c96~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611~^~core~^~The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611)~^~ -VALIDATION_ERROR_00e00c98~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01612~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01612)~^~ -VALIDATION_ERROR_00e00c9a~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613)~^~ -VALIDATION_ERROR_00e00c9c~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01614~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'The difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the same image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01614)~^~ -VALIDATION_ERROR_00e00c9e~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01615~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01615)~^~ -VALIDATION_ERROR_00e00ca0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01616~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01616)~^~ -VALIDATION_ERROR_00e00ca2~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01617~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01617)~^~ -VALIDATION_ERROR_00e00ca4~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01618~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, image must have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01618)~^~ -VALIDATION_ERROR_00e00ca6~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01619~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01619)~^~ -VALIDATION_ERROR_00e00ca8~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01620~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01620)~^~ -VALIDATION_ERROR_00e00caa~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01621~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01621)~^~ -VALIDATION_ERROR_00e00cac~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01622~^~(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If image requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::image equal to image and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01622)~^~ -VALIDATION_ERROR_00e00cae~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01623~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If image was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image equal to image and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01623)~^~ -VALIDATION_ERROR_00e00cb0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01624~^~(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If image was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01624)~^~ -VALIDATION_ERROR_00e00cb2~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01625~^~!(VK_KHX_device_group)~^~The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01625)~^~ -VALIDATION_ERROR_00e00cb4~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01626~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindImageMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01626)~^~ -VALIDATION_ERROR_00e00cb6~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01627~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, and VkBindImageMemoryDeviceGroupInfoKHX::SFRRectCount is not zero, then image must have been created with the VK_IMAGE_CREATE_BIND_SFR_BIT_KHX bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01627)~^~ -VALIDATION_ERROR_00e00cb8~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01628~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects must be valid rectangles contained within the dimensions of image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01628)~^~ -VALIDATION_ERROR_00e00cba~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01629~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects that correspond to the same instance of pname: image must cover the entire image.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01629)~^~ -VALIDATION_ERROR_00e00cbc~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01630~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the pNext chain must include a valid instance of VkBindImageMemorySwapchainInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01630)~^~ -VALIDATION_ERROR_00e00cbe~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01631~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes an instance of VkBindImageMemorySwapchainInfoKHX, memory must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01631)~^~ -VALIDATION_ERROR_00e00cc0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01632~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain does not include an instance of VkBindImageMemorySwapchainInfoKHX, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01632)~^~ -VALIDATION_ERROR_00e0a001~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-parameter~^~core~^~The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-parameter)~^~implicit +VALIDATION_ERROR_00e00c92~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01609~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01609)~^~ +VALIDATION_ERROR_00e00c94~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01610~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01610)~^~ +VALIDATION_ERROR_00e00c96~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611)~^~ +VALIDATION_ERROR_00e00c98~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01612~^~(VK_KHR_bind_memory2)+!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01612)~^~ +VALIDATION_ERROR_00e00c9a~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613~^~(VK_KHR_bind_memory2)+!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613)~^~ +VALIDATION_ERROR_00e00c9c~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01614~^~(VK_KHR_bind_memory2)+!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'The difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the same image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01614)~^~ +VALIDATION_ERROR_00e00c9e~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01615~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01615)~^~ +VALIDATION_ERROR_00e00ca0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01616~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01616)~^~ +VALIDATION_ERROR_00e00ca2~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01617~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01617)~^~ +VALIDATION_ERROR_00e00ca4~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01618~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, image must have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01618)~^~ +VALIDATION_ERROR_00e00ca6~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01619~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01619)~^~ +VALIDATION_ERROR_00e00ca8~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01620~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01620)~^~ +VALIDATION_ERROR_00e00caa~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01621~^~(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR's pNext chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01621)~^~ +VALIDATION_ERROR_00e00cac~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01622~^~(VK_KHR_bind_memory2)+(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If image requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::image equal to image and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01622)~^~ +VALIDATION_ERROR_00e00cae~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01623~^~(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If image was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image equal to image and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01623)~^~ +VALIDATION_ERROR_00e00cb0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01624~^~(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)~^~The spec valid usage text states 'If image was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01624)~^~ +VALIDATION_ERROR_00e00cb2~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-memory-01625~^~(VK_KHR_bind_memory2)+!(VK_KHX_device_group)~^~The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01625)~^~ +VALIDATION_ERROR_00e00cb4~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01626~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindImageMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01626)~^~ +VALIDATION_ERROR_00e00cb6~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01627~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, and VkBindImageMemoryDeviceGroupInfoKHX::SFRRectCount is not zero, then image must have been created with the VK_IMAGE_CREATE_BIND_SFR_BIT_KHX bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01627)~^~ +VALIDATION_ERROR_00e00cb8~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01628~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects must be valid rectangles contained within the dimensions of image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01628)~^~ +VALIDATION_ERROR_00e00cba~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01629~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects that correspond to the same instance of image must cover the entire image.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01629)~^~ +VALIDATION_ERROR_00e00cbc~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-01630~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the pNext chain must include a valid instance of VkBindImageMemorySwapchainInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01630)~^~ +VALIDATION_ERROR_00e00cbe~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01631~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain includes an instance of VkBindImageMemorySwapchainInfoKHX, memory must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01631)~^~ +VALIDATION_ERROR_00e00cc0~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-01632~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'If the pNext chain does not include an instance of VkBindImageMemorySwapchainInfoKHX, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01632)~^~ +VALIDATION_ERROR_00e0a001~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-image-parameter~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-parameter)~^~implicit VALIDATION_ERROR_00e0c601~^~Y~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemoryInfoKHR-memory-parameter~^~core~^~The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-parameter)~^~implicit VALIDATION_ERROR_00e13e01~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemoryInfoKHR-pDeviceIndices-parameter~^~core~^~The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pDeviceIndices-parameter)~^~implicit -VALIDATION_ERROR_00e1c40d~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfoKHX, VkBindImageMemorySwapchainInfoKHX, or VkBindImagePlaneMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_00e1c40d~^~Y~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-pNext-pNext~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfoKHX, VkBindImageMemorySwapchainInfoKHX, or VkBindImagePlaneMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-pNext)~^~implicit VALIDATION_ERROR_00e22001~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemoryInfoKHR-pSFRRects-parameter~^~core~^~The spec valid usage text states 'If SFRRectCount is not 0, pSFRRects must be a pointer to an array of SFRRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pSFRRects-parameter)~^~implicit -VALIDATION_ERROR_00e2b00b~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_00e2b00f~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-sType-unique~^~core~^~The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-unique)~^~implicit +VALIDATION_ERROR_00e2b00b~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-sType-sType~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_00e2b00f~^~N~^~None~^~VkBindImageMemoryInfoKHR~^~VUID-VkBindImageMemoryInfoKHR-sType-unique~^~(VK_KHR_bind_memory2)~^~The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-unique)~^~implicit VALIDATION_ERROR_01000856~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-01067~^~core~^~The spec valid usage text states 'At least one of swapchain and VkBindImageMemoryInfoKHR::memory must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-01067)~^~ VALIDATION_ERROR_01000858~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01068~^~core~^~The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01068)~^~ -VALIDATION_ERROR_01000cd8~^~N~^~None~^~VkBindImageMemorySwapchainInfoKHX~^~VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644~^~core~^~The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644)~^~ -VALIDATION_ERROR_0102b00b~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_0102f001~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter~^~core~^~The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter)~^~implicit +VALIDATION_ERROR_01000cd8~^~N~^~None~^~VkBindImageMemorySwapchainInfoKHX~^~VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644)~^~ +VALIDATION_ERROR_0102b00b~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_0102f001~^~N~^~Unknown~^~vkBindImageMemory2KHR~^~VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter~^~(VK_KHR_bind_memory2)+(VK_KHX_device_group)~^~The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter)~^~implicit VALIDATION_ERROR_01200009~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-commonparent~^~core~^~The spec valid usage text states 'Both of the elements of pSignalSemaphores, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-commonparent)~^~implicit -VALIDATION_ERROR_01210201~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pBufferBinds-parameter~^~core~^~The spec valid usage text states 'If bufferBindCount is not 0, pBufferBinds must be a pointer to an array of bufferBindCount valid VkSparseBufferMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pBufferBinds-parameter)~^~implicit -VALIDATION_ERROR_01218001~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pImageBinds-parameter~^~core~^~The spec valid usage text states 'If imageBindCount is not 0, pImageBinds must be a pointer to an array of imageBindCount valid VkSparseImageMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageBinds-parameter)~^~implicit -VALIDATION_ERROR_01218c01~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter~^~core~^~The spec valid usage text states 'If imageOpaqueBindCount is not 0, pImageOpaqueBinds must be a pointer to an array of imageOpaqueBindCount valid VkSparseImageOpaqueMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter)~^~implicit +VALIDATION_ERROR_01210201~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pBufferBinds-parameter~^~core~^~The spec valid usage text states 'If bufferBindCount is not 0, pBufferBinds must be a valid pointer to an array of bufferBindCount valid VkSparseBufferMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pBufferBinds-parameter)~^~implicit +VALIDATION_ERROR_01218001~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pImageBinds-parameter~^~core~^~The spec valid usage text states 'If imageBindCount is not 0, pImageBinds must be a valid pointer to an array of imageBindCount valid VkSparseImageMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageBinds-parameter)~^~implicit +VALIDATION_ERROR_01218c01~^~Y~^~None~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter~^~core~^~The spec valid usage text states 'If imageOpaqueBindCount is not 0, pImageOpaqueBinds must be a valid pointer to an array of imageOpaqueBindCount valid VkSparseImageOpaqueMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter)~^~implicit VALIDATION_ERROR_0121c40d~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkDeviceGroupBindSparseInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pNext-pNext)~^~implicit -VALIDATION_ERROR_01223401~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pSignalSemaphores-parameter~^~core~^~The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pSignalSemaphores-parameter)~^~implicit -VALIDATION_ERROR_01227601~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pWaitSemaphores-parameter~^~core~^~The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pWaitSemaphores-parameter)~^~implicit +VALIDATION_ERROR_01223401~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pSignalSemaphores-parameter~^~core~^~The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a valid pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pSignalSemaphores-parameter)~^~implicit +VALIDATION_ERROR_01227601~^~Y~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-pWaitSemaphores-parameter~^~core~^~The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pWaitSemaphores-parameter)~^~implicit VALIDATION_ERROR_0122b00b~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkBindSparseInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_01400720~^~N~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-size-00912~^~core~^~The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-size-00912)~^~ -VALIDATION_ERROR_01400722~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-sharingMode-00913~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00913)~^~ +VALIDATION_ERROR_01400720~^~Y~^~InvalidCreateBufferSize~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-size-00912~^~core~^~The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-size-00912)~^~ +VALIDATION_ERROR_01400722~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-sharingMode-00913~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00913)~^~ VALIDATION_ERROR_01400724~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-sharingMode-00914~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00914)~^~ VALIDATION_ERROR_01400726~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-flags-00915~^~core~^~The spec valid usage text states 'If the sparse bindings feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00915)~^~ VALIDATION_ERROR_01400728~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-flags-00916~^~core~^~The spec valid usage text states 'If the sparse buffer residency feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00916)~^~ VALIDATION_ERROR_0140072a~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-flags-00917~^~core~^~The spec valid usage text states 'If the sparse aliased residency feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00917)~^~ VALIDATION_ERROR_0140072c~^~Y~^~SparseBindingImageBufferCreate~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-flags-00918~^~core~^~The spec valid usage text states 'If flags contains VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00918)~^~ VALIDATION_ERROR_0140072e~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-handleTypes-00919~^~core~^~The spec valid usage text states 'If any of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes requires dedicated allocation, as reported by vkGetPhysicalDeviceExternalBufferPropertiesKHR in VkExternalBufferPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of VkDedicatedAllocationBufferCreateInfoNV with its dedicatedAllocation field set to VK_TRUE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-handleTypes-00919)~^~ -VALIDATION_ERROR_01400730~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-pNext-00920~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryBufferCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalBufferPropertiesKHR::externalMemoryProperties.pname:compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferPropertiesKHR with pExternalBufferInfo->handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-00920)~^~ +VALIDATION_ERROR_01400730~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-pNext-00920~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryBufferCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalBufferPropertiesKHR::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferPropertiesKHR with pExternalBufferInfo-&gt;handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-00920)~^~ VALIDATION_ERROR_01400ade~^~N~^~None~^~VkBufferCreateInfo~^~VUID-VkBufferCreateInfo-sharingMode-01391~^~!(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-01391)~^~ VALIDATION_ERROR_01400b16~^~N~^~None~^~VkBufferCreateInfo~^~VUID-VkBufferCreateInfo-sharingMode-01419~^~(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-01419)~^~ VALIDATION_ERROR_01400c46~^~N~^~None~^~VkBufferCreateInfo~^~VUID-VkBufferCreateInfo-pNext-01571~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkDedicatedAllocationBufferCreateInfoNV, and the dedicatedAllocation member of the chained structure is VK_TRUE, then flags must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-01571)~^~ @@ -146,7 +149,7 @@ VALIDATION_ERROR_0142b00f~^~N~^~None~^~VkBufferCreateInfo~^~VUID-VkBufferCreateI VALIDATION_ERROR_0142c001~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-sharingMode-parameter~^~core~^~The spec valid usage text states 'sharingMode must be a valid VkSharingMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-parameter)~^~implicit VALIDATION_ERROR_01430601~^~N~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-usage-parameter~^~core~^~The spec valid usage text states 'usage must be a valid combination of VkBufferUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-usage-parameter)~^~implicit VALIDATION_ERROR_01430603~^~Y~^~None~^~vkCreateBuffer~^~VUID-VkBufferCreateInfo-usage-requiredbitmask~^~core~^~The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-usage-requiredbitmask)~^~implicit -VALIDATION_ERROR_01600182~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00193~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the the calling command's VkImage parameter's format is not a depth/stencil format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00193)~^~ +VALIDATION_ERROR_01600182~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00193~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00193)~^~ VALIDATION_ERROR_01600184~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00194~^~core~^~The spec valid usage text states 'bufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00194)~^~ VALIDATION_ERROR_01600186~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferRowLength-00195~^~core~^~The spec valid usage text states 'bufferRowLength must be 0, or greater than or equal to the width member of imageExtent' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00195)~^~ VALIDATION_ERROR_01600188~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferImageHeight-00196~^~core~^~The spec valid usage text states 'bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00196)~^~ @@ -155,33 +158,43 @@ VALIDATION_ERROR_0160018c~^~N~^~Unknown~^~vkCmdCopyImageToBuffer~^~VUID-VkBuffer VALIDATION_ERROR_0160018e~^~Y~^~None~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-srcImage-00199~^~core~^~The spec valid usage text states 'If the calling command's srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D, then imageOffset.y must be 0 and imageExtent.height must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-srcImage-00199)~^~ VALIDATION_ERROR_01600190~^~N~^~Unknown~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageOffset-00200~^~core~^~The spec valid usage text states 'imageOffset.z and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00200)~^~This VU has two distinct conditions and the implemented check looks at both, but there are two distinct test cases for this enum VALIDATION_ERROR_01600192~^~Y~^~MiscImageLayerTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-srcImage-00201~^~core~^~The spec valid usage text states 'If the calling command's srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then imageOffset.z must be 0 and imageExtent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-srcImage-00201)~^~ -VALIDATION_ERROR_01600196~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferRowLength-00203~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00203)~^~ -VALIDATION_ERROR_01600198~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferImageHeight-00204~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00204)~^~ -VALIDATION_ERROR_0160019a~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageOffset-00205~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00205)~^~ -VALIDATION_ERROR_0160019c~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00206~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00206)~^~ -VALIDATION_ERROR_0160019e~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00207~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00207)~^~ -VALIDATION_ERROR_016001a0~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00208~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00208)~^~ -VALIDATION_ERROR_016001a2~^~Y~^~None~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00209~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00209)~^~ +VALIDATION_ERROR_01600196~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferRowLength-00203~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferRowLength must be a multiple of the compressed texel block width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00203)~^~ +VALIDATION_ERROR_01600198~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferImageHeight-00204~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferImageHeight must be a multiple of the compressed texel block height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00204)~^~ +VALIDATION_ERROR_0160019a~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageOffset-00205~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00205)~^~ +VALIDATION_ERROR_0160019c~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00206~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferOffset must be a multiple of the compressed texel block size in bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00206)~^~ +VALIDATION_ERROR_0160019e~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00207~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00207)~^~ +VALIDATION_ERROR_016001a0~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00208~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00208)~^~ +VALIDATION_ERROR_016001a2~^~Y~^~None~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageExtent-00209~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00209)~^~ VALIDATION_ERROR_016001a4~^~N~^~Unknown~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-bufferOffset-00210~^~core~^~The spec valid usage text states 'bufferOffset, bufferRowLength, bufferImageHeight and all members of imageOffset and imageExtent must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00210)~^~ VALIDATION_ERROR_016001a6~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-aspectMask-00211~^~core~^~The spec valid usage text states 'The aspectMask member of imageSubresource must specify aspects present in the calling command's VkImage parameter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-00211)~^~ VALIDATION_ERROR_016001a8~^~Y~^~ImageBufferCopyTests~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-aspectMask-00212~^~core~^~The spec valid usage text states 'The aspectMask member of imageSubresource must only have a single bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-00212)~^~ VALIDATION_ERROR_016001aa~^~Y~^~None~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-baseArrayLayer-00213~^~core~^~The spec valid usage text states 'If the calling command's VkImage parameter is of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of imageSubresource must be 0 and 1, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-baseArrayLayer-00213)~^~ VALIDATION_ERROR_016001ac~^~N~^~Unknown~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-None-00214~^~core~^~The spec valid usage text states 'When copying to the depth aspect of an image subresource, the data in the source buffer must be in the range [0,1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-None-00214)~^~ -VALIDATION_ERROR_01600c2c~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-bufferOffset-01558~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format or a multi-planar format,cthen bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01558)~^~ -VALIDATION_ERROR_01600c2e~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-bufferOffset-01559~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in Compatible formats of planes of multi-planar formats' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01559)~^~ +VALIDATION_ERROR_01600c2c~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-bufferOffset-01558~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format or a multi-planar format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01558)~^~ +VALIDATION_ERROR_01600c2e~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-bufferOffset-01559~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in features-formats-compatible-planes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01559)~^~ VALIDATION_ERROR_01600c30~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-aspectMask-01560~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then the aspectMask member of imageSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR (with VK_IMAGE_ASPECT_PLANE_2_BIT_KHR valid only for image formats with three planes)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-01560)~^~ +VALIDATION_ERROR_01600d8e~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01735~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, bufferRowLength must be a multiple of the compressed texel block width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01735)~^~ +VALIDATION_ERROR_01600d90~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01736~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, bufferImageHeight must be a multiple of the compressed texel block height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01736)~^~ +VALIDATION_ERROR_01600d92~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01737~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01737)~^~ +VALIDATION_ERROR_01600d94~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01738~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, bufferOffset must be a multiple of the compressed texel block size in bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01738)~^~ +VALIDATION_ERROR_01600d96~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01739~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01739)~^~ +VALIDATION_ERROR_01600d98~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01740~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01740)~^~ +VALIDATION_ERROR_01600d9a~^~N~^~None~^~VkBufferImageCopy~^~VUID-VkBufferImageCopy-None-01741~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, "_422" image format, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01741)~^~ VALIDATION_ERROR_0160aa01~^~N~^~Unknown~^~vkCmdCopyImageToBuffer~^~VUID-VkBufferImageCopy-imageSubresource-parameter~^~core~^~The spec valid usage text states 'imageSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageSubresource-parameter)~^~implicit -VALIDATION_ERROR_01800946~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-offset-01187~^~core~^~The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-offset-01187)~^~ +VALIDATION_ERROR_01800946~^~Y~^~InvalidBarriers~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-offset-01187~^~core~^~The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-offset-01187)~^~ VALIDATION_ERROR_01800948~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-size-01188~^~core~^~The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-size-01188)~^~ -VALIDATION_ERROR_0180094a~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-size-01189~^~core~^~The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-size-01189)~^~ -VALIDATION_ERROR_0180094c~^~N~^~None~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01190~^~!(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01190)~^~ -VALIDATION_ERROR_0180094e~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01191~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01191)~^~ -VALIDATION_ERROR_01800950~^~N~^~None~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01192~^~!(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01192)~^~ -VALIDATION_ERROR_01800952~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01193~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01193)~^~ -VALIDATION_ERROR_01800954~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01194~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01194)~^~ -VALIDATION_ERROR_01800956~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01195~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01195)~^~ -VALIDATION_ERROR_01800958~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01196~^~core~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01196)~^~ -VALIDATION_ERROR_01800ac8~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01380~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01380)~^~ +VALIDATION_ERROR_0180094a~^~Y~^~InvalidBarriers~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-size-01189~^~core~^~The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-size-01189)~^~ +VALIDATION_ERROR_0180094c~^~Y~^~InvalidBarrierQueueFamily~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01190~^~!(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01190)~^~ +VALIDATION_ERROR_0180094e~^~Y~^~InvalidBarrierQueueFamilyWithMemExt~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01191~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01191)~^~ +VALIDATION_ERROR_01800950~^~Y~^~InvalidBarrierQueueFamily~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01192~^~!(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see devsandqueues-queueprops)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01192)~^~ +VALIDATION_ERROR_01800952~^~Y~^~InvalidBarrierQueueFamilyWithMemExt~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01193~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01193)~^~ +VALIDATION_ERROR_01800954~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01194~^~core~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01194)~^~ +VALIDATION_ERROR_01800956~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01195~^~core~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01195)~^~ +VALIDATION_ERROR_01800958~^~Y~^~InvalidBarrierQueueFamily~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01196~^~core~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01196)~^~ +VALIDATION_ERROR_01800ac8~^~N~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01380~^~core~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01380)~^~ +VALIDATION_ERROR_01800dc6~^~Y~^~InvalidBarrierQueueFamilyWithMemExt~^~VkBufferMemoryBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01763~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory ownership transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01763)~^~ +VALIDATION_ERROR_01800dc8~^~Y~^~InvalidBarrierQueueFamilyWithMemExt~^~VkBufferMemoryBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01764~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01764)~^~ +VALIDATION_ERROR_01800dca~^~Y~^~InvalidBarrierQueueFamilyWithMemExt~^~VkBufferMemoryBarrier~^~VUID-VkBufferMemoryBarrier-buffer-01765~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01765)~^~ VALIDATION_ERROR_01801a01~^~Y~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-buffer-parameter~^~core~^~The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-parameter)~^~implicit VALIDATION_ERROR_01806801~^~Y~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-dstAccessMask-parameter~^~core~^~The spec valid usage text states 'dstAccessMask must be a valid combination of VkAccessFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-dstAccessMask-parameter)~^~implicit VALIDATION_ERROR_0181c40d~^~Y~^~Unknown~^~vkCmdPipelineBarrier~^~VUID-VkBufferMemoryBarrier-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-pNext-pNext)~^~implicit, TBD in parameter validation layer. @@ -207,34 +220,34 @@ VALIDATION_ERROR_01c00028~^~Y~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearAt VALIDATION_ERROR_01c0002a~^~N~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearAttachment-clearValue-00021~^~core~^~The spec valid usage text states 'clearValue must be a valid VkClearValue union' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-clearValue-00021)~^~ VALIDATION_ERROR_01c00c01~^~Y~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearAttachment-aspectMask-parameter~^~core~^~The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-aspectMask-parameter)~^~implicit VALIDATION_ERROR_01c00c03~^~Y~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearAttachment-aspectMask-requiredbitmask~^~core~^~The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-aspectMask-requiredbitmask)~^~implicit -VALIDATION_ERROR_01e0002c~^~N~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearDepthStencilValue-depth-00022~^~core~^~The spec valid usage text states 'depth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearDepthStencilValue-depth-00022)~^~ +VALIDATION_ERROR_01e0002c~^~N~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearDepthStencilValue-depth-00022~^~(VK_EXT_depth_range_unrestricted)~^~The spec valid usage text states 'Unless the VK_EXT_depth_range_unrestricted extension is enabled depth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkClearDepthStencilValue-depth-00022)~^~ VALIDATION_ERROR_0200002e~^~N~^~Unknown~^~vkCmdClearAttachments~^~VUID-VkClearValue-depthStencil-00023~^~core~^~The spec valid usage text states 'depthStencil must be a valid VkClearDepthStencilValue structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearValue-depthStencil-00023)~^~ -VALIDATION_ERROR_02200009~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-commonparent~^~core~^~The spec valid usage text states 'Each of indirectCommandsLayout, objectTable, sequencesCountBuffer, sequencesIndexBuffer, and targetCommandBuffer that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-commonparent)~^~implicit -VALIDATION_ERROR_02200a66~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331~^~core~^~The spec valid usage text states 'The provided objectTable must include all objects referenced by the generation process.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331)~^~ -VALIDATION_ERROR_02200a68~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332~^~core~^~The spec valid usage text states 'indirectCommandsTokenCount must match the indirectCommandsLayout's tokenCount.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332)~^~ -VALIDATION_ERROR_02200a6a~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333~^~core~^~The spec valid usage text states 'The tokenType member of each entry in the pIndirectCommandsTokens array must match the values used at creation time of indirectCommandsLayout' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333)~^~ -VALIDATION_ERROR_02200a6c~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334~^~core~^~The spec valid usage text states 'If targetCommandBuffer is provided, it must have reserved command space.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334)~^~ -VALIDATION_ERROR_02200a6e~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335~^~core~^~The spec valid usage text states 'If targetCommandBuffer is provided, the objectTable must match the reservation's objectTable and must have had all referenced objects registered at reservation time.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335)~^~ -VALIDATION_ERROR_02200a70~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336~^~core~^~The spec valid usage text states 'If targetCommandBuffer is provided, the indirectCommandsLayout must match the reservation's indirectCommandsLayout.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336)~^~ -VALIDATION_ERROR_02200a72~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337~^~core~^~The spec valid usage text states 'If targetCommandBuffer is provided, the maxSequencesCount must not exceed the reservation's maxSequencesCount.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337)~^~ -VALIDATION_ERROR_02200a74~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338~^~core~^~The spec valid usage text states 'If sequencesCountBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338)~^~ -VALIDATION_ERROR_02200a76~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339~^~core~^~The spec valid usage text states 'If sequencesCountBuffer is used, sequencesCountOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceCountBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339)~^~ -VALIDATION_ERROR_02200a78~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340~^~core~^~The spec valid usage text states 'If sequencesIndexBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340)~^~ -VALIDATION_ERROR_02200a7a~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341~^~core~^~The spec valid usage text states 'If sequencesIndexBuffer is used, sequencesIndexOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceIndexBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341)~^~ -VALIDATION_ERROR_0220b401~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter~^~core~^~The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter)~^~implicit -VALIDATION_ERROR_0220b61b~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength~^~core~^~The spec valid usage text states 'indirectCommandsTokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength)~^~implicit -VALIDATION_ERROR_0220d801~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter~^~core~^~The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter)~^~implicit -VALIDATION_ERROR_02219401~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter~^~core~^~The spec valid usage text states 'pIndirectCommandsTokens must be a pointer to an array of indirectCommandsTokenCount valid VkIndirectCommandsTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter)~^~implicit -VALIDATION_ERROR_0221c40d~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext)~^~implicit -VALIDATION_ERROR_0222b00b~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sType-sType)~^~implicit -VALIDATION_ERROR_0222ba01~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter~^~core~^~The spec valid usage text states 'If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter)~^~implicit -VALIDATION_ERROR_0222bc01~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter~^~core~^~The spec valid usage text states 'If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter)~^~implicit -VALIDATION_ERROR_0222f601~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter~^~core~^~The spec valid usage text states 'If targetCommandBuffer is not NULL, targetCommandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter)~^~implicit -VALIDATION_ERROR_02400009~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent~^~core~^~The spec valid usage text states 'Both of indirectCommandsLayout, and objectTable must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent)~^~implicit -VALIDATION_ERROR_0240b401~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter~^~core~^~The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter)~^~implicit -VALIDATION_ERROR_0240d801~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter~^~core~^~The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter)~^~implicit -VALIDATION_ERROR_0241c40d~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext)~^~implicit -VALIDATION_ERROR_0242b00b~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType)~^~implicit +VALIDATION_ERROR_02200009~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-commonparent~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'Each of indirectCommandsLayout, objectTable, sequencesCountBuffer, sequencesIndexBuffer, and targetCommandBuffer that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-commonparent)~^~implicit +VALIDATION_ERROR_02200a66~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'The provided objectTable must include all objects referenced by the generation process.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331)~^~ +VALIDATION_ERROR_02200a68~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'indirectCommandsTokenCount must match the indirectCommandsLayout's tokenCount.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332)~^~ +VALIDATION_ERROR_02200a6a~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'The tokenType member of each entry in the pIndirectCommandsTokens array must match the values used at creation time of indirectCommandsLayout' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333)~^~ +VALIDATION_ERROR_02200a6c~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If targetCommandBuffer is provided, it must have reserved command space.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334)~^~ +VALIDATION_ERROR_02200a6e~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If targetCommandBuffer is provided, the objectTable must match the reservation's objectTable and must have had all referenced objects registered at reservation time.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335)~^~ +VALIDATION_ERROR_02200a70~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If targetCommandBuffer is provided, the indirectCommandsLayout must match the reservation's indirectCommandsLayout.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336)~^~ +VALIDATION_ERROR_02200a72~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If targetCommandBuffer is provided, the maxSequencesCount must not exceed the reservation's maxSequencesCount.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337)~^~ +VALIDATION_ERROR_02200a74~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesCountBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338)~^~ +VALIDATION_ERROR_02200a76~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesCountBuffer is used, sequencesCountOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceCountBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339)~^~ +VALIDATION_ERROR_02200a78~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesIndexBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340)~^~ +VALIDATION_ERROR_02200a7a~^~N~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesIndexBuffer is used, sequencesIndexOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceIndexBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341)~^~ +VALIDATION_ERROR_0220b401~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter)~^~implicit +VALIDATION_ERROR_0220b61b~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'indirectCommandsTokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength)~^~implicit +VALIDATION_ERROR_0220d801~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter)~^~implicit +VALIDATION_ERROR_02219401~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'pIndirectCommandsTokens must be a valid pointer to an array of indirectCommandsTokenCount valid VkIndirectCommandsTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter)~^~implicit +VALIDATION_ERROR_0221c40d~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext)~^~implicit +VALIDATION_ERROR_0222b00b~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sType-sType~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sType-sType)~^~implicit +VALIDATION_ERROR_0222ba01~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter)~^~implicit +VALIDATION_ERROR_0222bc01~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter)~^~implicit +VALIDATION_ERROR_0222f601~^~Y~^~Unknown~^~vkCmdProcessCommandsNVX~^~VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'If targetCommandBuffer is not NULL, targetCommandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter)~^~implicit +VALIDATION_ERROR_02400009~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'Both of indirectCommandsLayout, and objectTable must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent)~^~implicit +VALIDATION_ERROR_0240b401~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter)~^~implicit +VALIDATION_ERROR_0240d801~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter)~^~implicit +VALIDATION_ERROR_0241c40d~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext)~^~implicit +VALIDATION_ERROR_0242b00b~^~Y~^~Unknown~^~vkCmdReserveSpaceForCommandsNVX~^~VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType)~^~implicit VALIDATION_ERROR_02600058~^~N~^~Unknown~^~vkAllocateCommandBuffers~^~VUID-VkCommandBufferAllocateInfo-commandBufferCount-00044~^~core~^~The spec valid usage text states 'commandBufferCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-commandBufferCount-00044)~^~ VALIDATION_ERROR_02602801~^~Y~^~None~^~vkAllocateCommandBuffers~^~VUID-VkCommandBufferAllocateInfo-commandPool-parameter~^~core~^~The spec valid usage text states 'commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-commandPool-parameter)~^~implicit VALIDATION_ERROR_0260c001~^~Y~^~Unknown~^~vkAllocateCommandBuffers~^~VUID-VkCommandBufferAllocateInfo-level-parameter~^~core~^~The spec valid usage text states 'level must be a valid VkCommandBufferLevel value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-level-parameter)~^~implicit @@ -268,6 +281,7 @@ VALIDATION_ERROR_03000578~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComp VALIDATION_ERROR_0300057a~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-stage-00701~^~core~^~The spec valid usage text states 'The stage member of stage must be VK_SHADER_STAGE_COMPUTE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-00701)~^~ VALIDATION_ERROR_0300057c~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-stage-00702~^~core~^~The spec valid usage text states 'The shader code for the entry point identified by stage and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-00702)~^~ VALIDATION_ERROR_0300057e~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-layout-00703~^~core~^~The spec valid usage text states 'layout must be consistent with the layout of the compute shader specified in stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-00703)~^~ +VALIDATION_ERROR_03000d2e~^~N~^~None~^~VkComputePipelineCreateInfo~^~VUID-VkComputePipelineCreateInfo-layout-01687~^~core~^~The spec valid usage text states 'The number of resources in layout accessible to the compute shader stage must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-01687)~^~ VALIDATION_ERROR_03009001~^~Y~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkPipelineCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-flags-parameter)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0300be01~^~Y~^~None~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-layout-parameter~^~core~^~The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-parameter)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0301c40d~^~Y~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-pNext-pNext)~^~implicit, TBD parameter validation layer. @@ -275,58 +289,58 @@ VALIDATION_ERROR_0302b00b~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComp VALIDATION_ERROR_0302d801~^~N~^~Unknown~^~vkCreateComputePipelines~^~VUID-VkComputePipelineCreateInfo-stage-parameter~^~core~^~The spec valid usage text states 'stage must be a valid VkPipelineShaderStageCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-parameter)~^~implicit VALIDATION_ERROR_03200009~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-commonparent~^~core~^~The spec valid usage text states 'Both of dstSet, and srcSet must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-commonparent)~^~implicit VALIDATION_ERROR_032002b2~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcBinding-00345~^~core~^~The spec valid usage text states 'srcBinding must be a valid binding within srcSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcBinding-00345)~^~ -VALIDATION_ERROR_032002b4~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcArrayElement-00346~^~core~^~The spec valid usage text states 'The sum of srcArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by srcBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcArrayElement-00346)~^~ +VALIDATION_ERROR_032002b4~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcArrayElement-00346~^~core~^~The spec valid usage text states 'The sum of srcArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by srcBinding, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcArrayElement-00346)~^~ VALIDATION_ERROR_032002b6~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstBinding-00347~^~core~^~The spec valid usage text states 'dstBinding must be a valid binding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstBinding-00347)~^~ -VALIDATION_ERROR_032002b8~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstArrayElement-00348~^~core~^~The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstArrayElement-00348)~^~ -VALIDATION_ERROR_032002ba~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-00349~^~core~^~The spec valid usage text states 'If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-00349)~^~ -VALIDATION_ERROR_03207601~^~Y~^~None~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstSet-parameter~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstSet-parameter)~^~implicit +VALIDATION_ERROR_032002b8~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstArrayElement-00348~^~core~^~The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstArrayElement-00348)~^~ +VALIDATION_ERROR_032002ba~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-00349~^~core~^~The spec valid usage text states 'If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-00349)~^~ +VALIDATION_ERROR_03207601~^~Y~^~UpdateDestroyDescriptorSetLayout~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-dstSet-parameter~^~core~^~The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstSet-parameter)~^~implicit VALIDATION_ERROR_0321c40d~^~Y~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0322b00b~^~N~^~Unknown~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0322d201~^~Y~^~None~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-parameter~^~core~^~The spec valid usage text states 'srcSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-parameter)~^~implicit -VALIDATION_ERROR_0340009e~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079~^~core~^~The spec valid usage text states 'waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079)~^~ -VALIDATION_ERROR_034000a0~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080~^~core~^~The spec valid usage text states 'signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080)~^~ -VALIDATION_ERROR_03423201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter~^~core~^~The spec valid usage text states 'If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a pointer to an array of signalSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter)~^~implicit -VALIDATION_ERROR_03427401~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter~^~core~^~The spec valid usage text states 'If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a pointer to an array of waitSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter)~^~implicit -VALIDATION_ERROR_0342b00b~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_0361a801~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter~^~core~^~The spec valid usage text states 'pMarkerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter)~^~implicit -VALIDATION_ERROR_0361c40d~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0362b00b~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03800ba4~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490~^~core~^~The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490)~^~ -VALIDATION_ERROR_03800ba6~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-object-01491~^~core~^~The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01491)~^~ -VALIDATION_ERROR_03800ba8~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-object-01492~^~core~^~The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01492)~^~ -VALIDATION_ERROR_0380da01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter~^~core~^~The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter)~^~implicit -VALIDATION_ERROR_0381c40d~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0381ce01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter~^~core~^~The spec valid usage text states 'pObjectName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter)~^~implicit -VALIDATION_ERROR_0382b00b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03a00baa~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493~^~core~^~The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493)~^~ -VALIDATION_ERROR_03a00bac~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-object-01494~^~core~^~The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01494)~^~ -VALIDATION_ERROR_03a00bae~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-object-01495~^~core~^~The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01495)~^~ -VALIDATION_ERROR_03a0da01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter~^~core~^~The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter)~^~implicit -VALIDATION_ERROR_03a1c40d~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03a25a01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter~^~core~^~The spec valid usage text states 'pTag must be a pointer to an array of tagSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter)~^~implicit -VALIDATION_ERROR_03a2b00b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03a2f41b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength~^~core~^~The spec valid usage text states 'tagSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength)~^~implicit -VALIDATION_ERROR_03c00ad2~^~N~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385~^~core~^~The spec valid usage text states 'pfnCallback must be a valid PFN_vkDebugReportCallbackEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385)~^~ +VALIDATION_ERROR_0322d201~^~Y~^~UpdateDestroyDescriptorSetLayout~^~vkUpdateDescriptorSets~^~VUID-VkCopyDescriptorSet-srcSet-parameter~^~core~^~The spec valid usage text states 'srcSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-parameter)~^~implicit +VALIDATION_ERROR_0340009e~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079)~^~ +VALIDATION_ERROR_034000a0~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080)~^~ +VALIDATION_ERROR_03423201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a valid pointer to an array of signalSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter)~^~implicit +VALIDATION_ERROR_03427401~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a valid pointer to an array of waitSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter)~^~implicit +VALIDATION_ERROR_0342b00b~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkD3D12FenceSubmitInfoKHR-sType-sType~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_0361a801~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pMarkerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter)~^~implicit +VALIDATION_ERROR_0361c40d~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0362b00b~^~Y~^~Unknown~^~vkCmdDebugMarkerBeginEXT~^~VUID-VkDebugMarkerMarkerInfoEXT-sType-sType~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03800ba4~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490)~^~ +VALIDATION_ERROR_03800ba6~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-object-01491~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01491)~^~ +VALIDATION_ERROR_03800ba8~^~N~^~None~^~VkDebugMarkerObjectNameInfoEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-object-01492~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in debug-report-object-types.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01492)~^~ +VALIDATION_ERROR_0380da01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter)~^~implicit +VALIDATION_ERROR_0381c40d~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0381ce01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pObjectName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter)~^~implicit +VALIDATION_ERROR_0382b00b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectNameEXT~^~VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03a00baa~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493)~^~ +VALIDATION_ERROR_03a00bac~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-object-01494~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01494)~^~ +VALIDATION_ERROR_03a00bae~^~N~^~None~^~VkDebugMarkerObjectTagInfoEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-object-01495~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in debug-report-object-types.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01495)~^~ +VALIDATION_ERROR_03a0da01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter)~^~implicit +VALIDATION_ERROR_03a1c40d~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03a25a01~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'pTag must be a valid pointer to an array of tagSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter)~^~implicit +VALIDATION_ERROR_03a2b00b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03a2f41b~^~Y~^~Unknown~^~vkDebugMarkerSetObjectTagEXT~^~VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength~^~(VK_EXT_debug_marker)~^~The spec valid usage text states 'tagSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength)~^~implicit +VALIDATION_ERROR_03c00ad2~^~N~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385~^~(VK_EXT_debug_report)~^~The spec valid usage text states 'pfnCallback must be a valid PFN_vkDebugReportCallbackEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385)~^~ VALIDATION_ERROR_03c00bb0~^~N~^~None~^~VkDebugReportCallbackCreateInfoEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-object-01496~^~core~^~The spec valid usage text states 'object must be a Vulkan object or VK_NULL_HANDLE.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-object-01496)~^~ VALIDATION_ERROR_03c00bb2~^~N~^~None~^~VkDebugReportCallbackCreateInfoEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-objectType-01497~^~core~^~The spec valid usage text states 'If objectType is not VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and object is not VK_NULL_HANDLE, object must be a Vulkan object of the corresponding type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-objectType-01497)~^~ -VALIDATION_ERROR_03c09001~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03c1c40d~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_03c2b00b~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03c09001~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter~^~(VK_EXT_debug_report)~^~The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03c1c40d~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext~^~(VK_EXT_debug_report)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03c2b00b~^~Y~^~Unknown~^~vkCreateDebugReportCallbackEXT~^~VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType~^~(VK_EXT_debug_report)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_03e00732~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkDedicatedAllocationBufferCreateInfoNV-dedicatedAllocation-00921~^~core~^~The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkBufferCreateInfo::flags must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-dedicatedAllocation-00921)~^~ -VALIDATION_ERROR_03e2b00b~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_040007c4~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994~^~core~^~The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkImageCreateInfo::flags must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994)~^~ -VALIDATION_ERROR_0402b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_04200009~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent~^~core~^~The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent)~^~implicit -VALIDATION_ERROR_04200512~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649~^~core~^~The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649)~^~ -VALIDATION_ERROR_04200514~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650~^~core~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650)~^~ -VALIDATION_ERROR_04200516~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651~^~core~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651)~^~ -VALIDATION_ERROR_04200518~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652~^~core~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652)~^~ -VALIDATION_ERROR_0420051a~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653~^~core~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653)~^~ -VALIDATION_ERROR_0420051c~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654~^~(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654)~^~ -VALIDATION_ERROR_0420051e~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655~^~(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655)~^~ -VALIDATION_ERROR_04201a01~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter~^~core~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter)~^~implicit -VALIDATION_ERROR_0420a001~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter~^~core~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter)~^~implicit -VALIDATION_ERROR_0422b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_03e2b00b~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_040007c4~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkImageCreateInfo::flags must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994)~^~ +VALIDATION_ERROR_0402b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_04200009~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent)~^~implicit +VALIDATION_ERROR_04200512~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649)~^~ +VALIDATION_ERROR_04200514~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650)~^~ +VALIDATION_ERROR_04200516~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651)~^~ +VALIDATION_ERROR_04200518~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652)~^~ +VALIDATION_ERROR_0420051a~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653)~^~ +VALIDATION_ERROR_0420051c~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654~^~(VK_NV_dedicated_allocation)+(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654)~^~ +VALIDATION_ERROR_0420051e~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655~^~(VK_NV_dedicated_allocation)+(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655)~^~ +VALIDATION_ERROR_04201a01~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter)~^~implicit +VALIDATION_ERROR_0420a001~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter)~^~implicit +VALIDATION_ERROR_0422b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType~^~(VK_NV_dedicated_allocation)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_044002a8~^~Y~^~DSBufferInfoErrors~^~vkUpdateDescriptorSets~^~VUID-VkDescriptorBufferInfo-offset-00340~^~core~^~The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-offset-00340)~^~ VALIDATION_ERROR_044002aa~^~Y~^~DSBufferInfoErrors~^~vkUpdateDescriptorSets~^~VUID-VkDescriptorBufferInfo-range-00341~^~core~^~The spec valid usage text states 'If range is not equal to VK_WHOLE_SIZE, range must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-range-00341)~^~ VALIDATION_ERROR_044002ac~^~Y~^~DSBufferInfoErrors~^~vkUpdateDescriptorSets~^~VUID-VkDescriptorBufferInfo-range-00342~^~core~^~The spec valid usage text states 'If range is not equal to VK_WHOLE_SIZE, range must be less than or equal to the size of buffer minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-range-00342)~^~ @@ -339,7 +353,7 @@ VALIDATION_ERROR_04600c38~^~N~^~None~^~VkDescriptorImageInfo~^~VUID-VkDescriptor VALIDATION_ERROR_0480025a~^~Y~^~InvalidCreateDescriptorPool~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-maxSets-00301~^~core~^~The spec valid usage text states 'maxSets must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-maxSets-00301)~^~ VALIDATION_ERROR_04809001~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkDescriptorPoolCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-flags-parameter)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0481c40d~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0481e401~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter~^~core~^~The spec valid usage text states 'pPoolSizes must be a pointer to an array of poolSizeCount valid VkDescriptorPoolSize structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter)~^~implicit +VALIDATION_ERROR_0481e401~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter~^~core~^~The spec valid usage text states 'pPoolSizes must be a valid pointer to an array of poolSizeCount valid VkDescriptorPoolSize structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter)~^~implicit VALIDATION_ERROR_0482881b~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength~^~core~^~The spec valid usage text states 'poolSizeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength)~^~implicit VALIDATION_ERROR_0482b00b~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_04a0025c~^~Y~^~InvalidCreateDescriptorPool~^~vkCreateDescriptorPool~^~VUID-VkDescriptorPoolSize-descriptorCount-00302~^~core~^~The spec valid usage text states 'descriptorCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolSize-descriptorCount-00302)~^~ @@ -347,175 +361,175 @@ VALIDATION_ERROR_04a30401~^~Y~^~Unknown~^~vkCreateDescriptorPool~^~VUID-VkDescri VALIDATION_ERROR_04c00009~^~Y~^~Unknown~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-commonparent~^~core~^~The spec valid usage text states 'Both of descriptorPool, and the elements of pSetLayouts must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-commonparent)~^~implicit VALIDATION_ERROR_04c00264~^~Y~^~AllocDescriptorFromEmptyPool~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-00306~^~!(VK_KHR_maintenance1)~^~The spec valid usage text states 'descriptorSetCount must not be greater than the number of sets that are currently available for allocation in descriptorPool' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-00306)~^~ VALIDATION_ERROR_04c00266~^~Y~^~AllocDescriptorFromEmptyPool~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307~^~!(VK_KHR_maintenance1)~^~The spec valid usage text states 'descriptorPool must have enough free descriptor capacity remaining to allocate the descriptor sets of the specified layouts' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307)~^~ -VALIDATION_ERROR_04c00268~^~N~^~None~^~VkDescriptorSetAllocateInfo~^~VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'Each element of pSetLayouts must not have been created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308)~^~ +VALIDATION_ERROR_04c00268~^~Y~^~AllocatePushDescriptorSet~^~VkDescriptorSetAllocateInfo~^~VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'Each element of pSetLayouts must not have been created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308)~^~ VALIDATION_ERROR_04c04601~^~Y~^~None~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-descriptorPool-parameter~^~core~^~The spec valid usage text states 'descriptorPool must be a valid VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorPool-parameter)~^~implicit VALIDATION_ERROR_04c04a1b~^~N~^~Unknown~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-arraylength~^~core~^~The spec valid usage text states 'descriptorSetCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-arraylength)~^~implicit VALIDATION_ERROR_04c1c40d~^~Y~^~Unknown~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_04c22c01~^~Y~^~None~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter~^~core~^~The spec valid usage text states 'pSetLayouts must be a pointer to an array of descriptorSetCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter)~^~implicit +VALIDATION_ERROR_04c22c01~^~Y~^~None~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter~^~core~^~The spec valid usage text states 'pSetLayouts must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter)~^~implicit VALIDATION_ERROR_04c2b00b~^~Y~^~Unknown~^~vkAllocateDescriptorSets~^~VUID-VkDescriptorSetAllocateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_04e00234~^~N~^~None~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutBinding-descriptorType-00282~^~core~^~The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL, pImmutableSamplers must be a pointer to an array of descriptorCount valid VkSampler handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-00282)~^~ +VALIDATION_ERROR_04e00234~^~Y~^~None~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutBinding-descriptorType-00282~^~core~^~The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL, pImmutableSamplers must be a valid pointer to an array of descriptorCount valid VkSampler handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-00282)~^~ VALIDATION_ERROR_04e00236~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutBinding-descriptorCount-00283~^~core~^~The spec valid usage text states 'If descriptorCount is not 0, stageFlags must be a valid combination of VkShaderStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorCount-00283)~^~ VALIDATION_ERROR_04e00bcc~^~N~^~None~^~VkDescriptorSetLayoutBinding~^~VUID-VkDescriptorSetLayoutBinding-descriptorType-01510~^~core~^~The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and descriptorCount is not 0, then stageFlags must be 0 or VK_SHADER_STAGE_FRAGMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-01510)~^~ VALIDATION_ERROR_04e04e01~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutBinding-descriptorType-parameter~^~core~^~The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-parameter)~^~implicit VALIDATION_ERROR_0500022e~^~Y~^~DuplicateDescriptorBinding~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-binding-00279~^~core~^~The spec valid usage text states 'The VkDescriptorSetLayoutBinding::binding members of the elements of the pBindings array must each have different values.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-binding-00279)~^~ -VALIDATION_ERROR_05000230~^~N~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-flags-00280~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all elements of pBindings must not have a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00280)~^~ -VALIDATION_ERROR_05000232~^~N~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-flags-00281~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then the total number of elements of all bindings must be less than or equal to VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00281)~^~ +VALIDATION_ERROR_05000230~^~Y~^~InvalidPushDescriptorSetLayout~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-flags-00280~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all elements of pBindings must not have a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00280)~^~ +VALIDATION_ERROR_05000232~^~Y~^~InvalidPushDescriptorSetLayout~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-flags-00281~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then the total number of elements of all bindings must be less than or equal to VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00281)~^~ VALIDATION_ERROR_05009001~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkDescriptorSetLayoutCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-parameter)~^~implicit -VALIDATION_ERROR_0500fc01~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter~^~core~^~The spec valid usage text states 'If bindingCount is not 0, pBindings must be a pointer to an array of bindingCount valid VkDescriptorSetLayoutBinding structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter)~^~implicit +VALIDATION_ERROR_0500fc01~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter~^~core~^~The spec valid usage text states 'If bindingCount is not 0, pBindings must be a valid pointer to an array of bindingCount valid VkDescriptorSetLayoutBinding structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter)~^~implicit VALIDATION_ERROR_0501c40d~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0502b00b~^~Y~^~Unknown~^~vkCreateDescriptorSetLayout~^~VUID-VkDescriptorSetLayoutCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_05200009~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent~^~core~^~The spec valid usage text states 'Both of descriptorSetLayout, and pipelineLayout that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent)~^~implicit -VALIDATION_ERROR_052002bc~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350~^~core~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350)~^~ -VALIDATION_ERROR_052002be~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351)~^~ -VALIDATION_ERROR_052002c0~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352)~^~ -VALIDATION_ERROR_052002c2~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353~^~(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353)~^~ -VALIDATION_ERROR_05204c01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter~^~core~^~The spec valid usage text states 'If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter)~^~implicit -VALIDATION_ERROR_0520501b~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength~^~core~^~The spec valid usage text states 'descriptorUpdateEntryCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength)~^~implicit -VALIDATION_ERROR_05209005~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask)~^~implicit -VALIDATION_ERROR_05213201~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter~^~core~^~The spec valid usage text states 'pDescriptorUpdateEntries must be a pointer to an array of descriptorUpdateEntryCount valid VkDescriptorUpdateTemplateEntryKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter)~^~implicit -VALIDATION_ERROR_0521c40d~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_05227e01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter~^~core~^~The spec valid usage text states 'If pipelineBindPoint is not 0, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter)~^~implicit -VALIDATION_ERROR_05228201~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter~^~core~^~The spec valid usage text states 'If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter)~^~implicit -VALIDATION_ERROR_0522b00b~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_0522f801~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter~^~core~^~The spec valid usage text states 'templateType must be a valid VkDescriptorUpdateTemplateTypeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter)~^~implicit -VALIDATION_ERROR_054002c4~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354~^~core~^~The spec valid usage text states 'dstBinding must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354)~^~ -VALIDATION_ERROR_054002c6~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355~^~core~^~The spec valid usage text states 'dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355)~^~ -VALIDATION_ERROR_05404e01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter~^~core~^~The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter)~^~implicit +VALIDATION_ERROR_05200009~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'Both of descriptorSetLayout, and pipelineLayout that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent)~^~implicit +VALIDATION_ERROR_052002bc~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350)~^~ +VALIDATION_ERROR_052002be~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351~^~(VK_KHR_descriptor_update_template)+(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351)~^~ +VALIDATION_ERROR_052002c0~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352~^~(VK_KHR_descriptor_update_template)+(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352)~^~ +VALIDATION_ERROR_052002c2~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353~^~(VK_KHR_descriptor_update_template)+(VK_KHR_push_descriptor)~^~The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353)~^~ +VALIDATION_ERROR_05204c01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter)~^~implicit +VALIDATION_ERROR_0520501b~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'descriptorUpdateEntryCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength)~^~implicit +VALIDATION_ERROR_05209005~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask)~^~implicit +VALIDATION_ERROR_05213201~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'pDescriptorUpdateEntries must be a valid pointer to an array of descriptorUpdateEntryCount valid VkDescriptorUpdateTemplateEntryKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter)~^~implicit +VALIDATION_ERROR_0521c40d~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_05227e01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'If pipelineBindPoint is not 0, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter)~^~implicit +VALIDATION_ERROR_05228201~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter)~^~implicit +VALIDATION_ERROR_0522b00b~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_0522f801~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'templateType must be a valid VkDescriptorUpdateTemplateTypeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter)~^~implicit +VALIDATION_ERROR_054002c4~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'dstBinding must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354)~^~ +VALIDATION_ERROR_054002c6~^~N~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355)~^~ +VALIDATION_ERROR_05404e01~^~Y~^~Unknown~^~vkCreateDescriptorUpdateTemplateKHR~^~VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter~^~(VK_KHR_descriptor_update_template)~^~The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter)~^~implicit VALIDATION_ERROR_056002e8~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-queueFamilyIndex-00372~^~core~^~The spec valid usage text states 'The queueFamilyIndex member of each element of pQueueCreateInfos must be unique within pQueueCreateInfos' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-queueFamilyIndex-00372)~^~ VALIDATION_ERROR_056002ea~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pNext-00373~^~(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If the pNext chain includes a VkPhysicalDeviceFeatures2KHR structure, then pEnabledFeatures must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-00373)~^~ VALIDATION_ERROR_056002ec~^~Y~^~Maintenance1AndNegativeViewport~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374~^~(VK_KHR_maintenance1)+(VK_AMD_negative_viewport_height)~^~The spec valid usage text states 'ppEnabledExtensionNames must not contain both VK_KHR_maintenance1 and VK_AMD_negative_viewport_height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374)~^~ VALIDATION_ERROR_05609005~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_05615a01~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter~^~core~^~The spec valid usage text states 'If pEnabledFeatures is not NULL, pEnabledFeatures must be a pointer to a valid VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter)~^~implicit +VALIDATION_ERROR_05615a01~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter~^~core~^~The spec valid usage text states 'If pEnabledFeatures is not NULL, pEnabledFeatures must be a valid pointer to a valid VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter)~^~implicit VALIDATION_ERROR_0561c40d~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupDeviceCreateInfoKHX, VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceFeatures2KHR, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-pNext)~^~implicit -VALIDATION_ERROR_0561fe01~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter~^~core~^~The spec valid usage text states 'pQueueCreateInfos must be a pointer to an array of queueCreateInfoCount valid VkDeviceQueueCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter)~^~implicit -VALIDATION_ERROR_05628e01~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter~^~core~^~The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter)~^~implicit -VALIDATION_ERROR_05629001~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter~^~core~^~The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter)~^~implicit +VALIDATION_ERROR_0561fe01~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter~^~core~^~The spec valid usage text states 'pQueueCreateInfos must be a valid pointer to an array of queueCreateInfoCount valid VkDeviceQueueCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter)~^~implicit +VALIDATION_ERROR_05628e01~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter~^~core~^~The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter)~^~implicit +VALIDATION_ERROR_05629001~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter~^~core~^~The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter)~^~implicit VALIDATION_ERROR_0562a01b~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-queueCreateInfoCount-arraylength~^~core~^~The spec valid usage text states 'queueCreateInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-queueCreateInfoCount-arraylength)~^~implicit VALIDATION_ERROR_0562b00b~^~Y~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0562b00f~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceCreateInfo-sType-unique~^~core~^~The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-sType-unique)~^~implicit -VALIDATION_ERROR_05805801~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-deviceEvent-parameter~^~core~^~The spec valid usage text states 'deviceEvent must be a valid VkDeviceEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-deviceEvent-parameter)~^~implicit -VALIDATION_ERROR_0581c40d~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-pNext-pNext)~^~implicit -VALIDATION_ERROR_0582b00b~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-sType-sType)~^~implicit -VALIDATION_ERROR_05a1c40d~^~N~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext)~^~implicit -VALIDATION_ERROR_05a2b00b~^~Y~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType)~^~implicit -VALIDATION_ERROR_05c1c40d~^~N~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext)~^~implicit -VALIDATION_ERROR_05c2b00b~^~Y~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType)~^~implicit -VALIDATION_ERROR_05e008bc~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118~^~core~^~The spec valid usage text states 'resourceDeviceIndex and memoryDeviceIndex must both be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118)~^~ -VALIDATION_ERROR_05e008be~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119~^~core~^~The spec valid usage text states 'Each memory allocation bound in this batch must have allocated an instance for memoryDeviceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119)~^~ -VALIDATION_ERROR_05e2b00b~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_060000d4~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106~^~core~^~The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106)~^~ -VALIDATION_ERROR_060000d6~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107~^~core~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107)~^~ -VALIDATION_ERROR_0602b00b~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_062002ee~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375~^~core~^~The spec valid usage text states 'Each element of pPhysicalDevices must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375)~^~ -VALIDATION_ERROR_062002f0~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376~^~core~^~The spec valid usage text states 'All elements of pPhysicalDevices must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroupsKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376)~^~ -VALIDATION_ERROR_062002f2~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377~^~core~^~The spec valid usage text states 'If physicalDeviceCount is not 0, the physicalDevice parameter of vkCreateDevice must be an element of pPhysicalDevices.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377)~^~ -VALIDATION_ERROR_0621dc01~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter~^~core~^~The spec valid usage text states 'If physicalDeviceCount is not 0, pPhysicalDevices must be a pointer to an array of physicalDeviceCount valid VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter)~^~implicit -VALIDATION_ERROR_0622b00b~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_06400a22~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297~^~core~^~The spec valid usage text states 'swapchainCount must equal 0 or VkPresentInfoKHR::swapchainCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297)~^~ -VALIDATION_ERROR_06400a24~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01298~^~core~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01298)~^~ -VALIDATION_ERROR_06400a26~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01299~^~core~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHX::presentMask.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01299)~^~ -VALIDATION_ERROR_06400a28~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01300~^~core~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX, then each element of pDeviceMasks must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHX::presentMask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01300)~^~ -VALIDATION_ERROR_06400a2a~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01301~^~core~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX, then for each bit set in each element of pDeviceMasks, the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01301)~^~ -VALIDATION_ERROR_06400a2c~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302~^~core~^~The spec valid usage text states 'The value of each element of pDeviceMasks must be equal to the device mask passed in VkAcquireNextImageInfoKHX::deviceMask when the image index was last acquired' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302)~^~ -VALIDATION_ERROR_06400a2e~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01303~^~core~^~The spec valid usage text states 'mode must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHX::modes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01303)~^~ -VALIDATION_ERROR_0640ce01~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-parameter~^~core~^~The spec valid usage text states 'mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-parameter)~^~implicit -VALIDATION_ERROR_06414001~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter~^~core~^~The spec valid usage text states 'If swapchainCount is not 0, pDeviceMasks must be a pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter)~^~implicit -VALIDATION_ERROR_0642b00b~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_06600712~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905~^~core~^~The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905)~^~ -VALIDATION_ERROR_06600714~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906~^~core~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906)~^~ -VALIDATION_ERROR_06600716~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907~^~core~^~The spec valid usage text states 'deviceMask must be a subset of the command buffer's initial device mask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907)~^~ -VALIDATION_ERROR_06600718~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908~^~core~^~The spec valid usage text states 'deviceRenderAreaCount must either be zero or equal to the number of physical devices in the logical device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908)~^~ -VALIDATION_ERROR_06614201~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter~^~core~^~The spec valid usage text states 'If deviceRenderAreaCount is not 0, pDeviceRenderAreas must be a pointer to an array of deviceRenderAreaCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter)~^~implicit -VALIDATION_ERROR_0662b00b~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_068000a4~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082~^~core~^~The spec valid usage text states 'waitSemaphoreCount must equal VkSubmitInfo::waitSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082)~^~ -VALIDATION_ERROR_068000a6~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083~^~core~^~The spec valid usage text states 'commandBufferCount must equal VkSubmitInfo::commandBufferCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083)~^~ -VALIDATION_ERROR_068000a8~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084~^~core~^~The spec valid usage text states 'signalSemaphoreCount must equal VkSubmitInfo::signalSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084)~^~ -VALIDATION_ERROR_068000aa~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085~^~core~^~The spec valid usage text states 'All elements of pWaitSemaphoreDeviceIndices and pSignalSemaphoreDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085)~^~ -VALIDATION_ERROR_068000ac~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086~^~core~^~The spec valid usage text states 'All elements of pCommandBufferDeviceMasks must be valid device masks' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086)~^~ -VALIDATION_ERROR_06811201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter~^~core~^~The spec valid usage text states 'If commandBufferCount is not 0, pCommandBufferDeviceMasks must be a pointer to an array of commandBufferCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter)~^~implicit -VALIDATION_ERROR_06823001~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter~^~core~^~The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphoreDeviceIndices must be a pointer to an array of signalSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter)~^~implicit -VALIDATION_ERROR_06827201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter~^~core~^~The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphoreDeviceIndices must be a pointer to an array of waitSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter)~^~implicit -VALIDATION_ERROR_0682b00b~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-sType-sType)~^~implicit -VALIDATION_ERROR_06a0d001~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter~^~core~^~The spec valid usage text states 'modes must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter)~^~implicit -VALIDATION_ERROR_06a0d003~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask~^~core~^~The spec valid usage text states 'modes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask)~^~implicit -VALIDATION_ERROR_06a2b00b~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_05805801~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-deviceEvent-parameter~^~(VK_EXT_display_control)~^~The spec valid usage text states 'deviceEvent must be a valid VkDeviceEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-deviceEvent-parameter)~^~implicit +VALIDATION_ERROR_0581c40d~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-pNext-pNext~^~(VK_EXT_display_control)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-pNext-pNext)~^~implicit +VALIDATION_ERROR_0582b00b~^~Y~^~Unknown~^~vkRegisterDeviceEventEXT~^~VUID-VkDeviceEventInfoEXT-sType-sType~^~(VK_EXT_display_control)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-sType-sType)~^~implicit +VALIDATION_ERROR_05a1c40d~^~N~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext)~^~implicit +VALIDATION_ERROR_05a2b00b~^~Y~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType)~^~implicit +VALIDATION_ERROR_05c1c40d~^~N~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext)~^~implicit +VALIDATION_ERROR_05c2b00b~^~Y~^~Unknown~^~vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX~^~VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType~^~(VK_NVX_device_generated_commands)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType)~^~implicit +VALIDATION_ERROR_05e008bc~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118~^~(VK_KHX_device_group)~^~The spec valid usage text states 'resourceDeviceIndex and memoryDeviceIndex must both be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118)~^~ +VALIDATION_ERROR_05e008be~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119~^~(VK_KHX_device_group)~^~The spec valid usage text states 'Each memory allocation bound in this batch must have allocated an instance for memoryDeviceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119)~^~ +VALIDATION_ERROR_05e2b00b~^~N~^~Unknown~^~vkQueueBindSparse~^~VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType~^~(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_060000d4~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106)~^~ +VALIDATION_ERROR_060000d6~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107)~^~ +VALIDATION_ERROR_0602b00b~^~N~^~Unknown~^~vkCmdExecuteCommands~^~VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType~^~(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_062002ee~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375~^~(VK_KHX_device_group_creation)~^~The spec valid usage text states 'Each element of pPhysicalDevices must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375)~^~ +VALIDATION_ERROR_062002f0~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376~^~(VK_KHX_device_group_creation)~^~The spec valid usage text states 'All elements of pPhysicalDevices must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroupsKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376)~^~ +VALIDATION_ERROR_062002f2~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377~^~(VK_KHX_device_group_creation)~^~The spec valid usage text states 'If physicalDeviceCount is not 0, the physicalDevice parameter of vkCreateDevice must be an element of pPhysicalDevices.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377)~^~ +VALIDATION_ERROR_0621dc01~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter~^~(VK_KHX_device_group_creation)~^~The spec valid usage text states 'If physicalDeviceCount is not 0, pPhysicalDevices must be a valid pointer to an array of physicalDeviceCount valid VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter)~^~implicit +VALIDATION_ERROR_0622b00b~^~N~^~Unknown~^~vkCreateDevice~^~VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType~^~(VK_KHX_device_group_creation)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_06400a22~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'swapchainCount must equal 0 or VkPresentInfoKHR::swapchainCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297)~^~ +VALIDATION_ERROR_06400a24~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01298~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01298)~^~ +VALIDATION_ERROR_06400a26~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01299~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHX::presentMask.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01299)~^~ +VALIDATION_ERROR_06400a28~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01300~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX, then each element of pDeviceMasks must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHX::presentMask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01300)~^~ +VALIDATION_ERROR_06400a2a~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01301~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX, then for each bit set in each element of pDeviceMasks, the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01301)~^~ +VALIDATION_ERROR_06400a2c~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'The value of each element of pDeviceMasks must be equal to the device mask passed in VkAcquireNextImageInfoKHX::deviceMask when the image index was last acquired' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302)~^~ +VALIDATION_ERROR_06400a2e~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-01303~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'mode must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHX::modes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01303)~^~ +VALIDATION_ERROR_0640ce01~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-mode-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-parameter)~^~implicit +VALIDATION_ERROR_06414001~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'If swapchainCount is not 0, pDeviceMasks must be a valid pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter)~^~implicit +VALIDATION_ERROR_0642b00b~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDeviceGroupPresentInfoKHX-sType-sType~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_06600712~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905)~^~ +VALIDATION_ERROR_06600714~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906)~^~ +VALIDATION_ERROR_06600716~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceMask must be a subset of the command buffer's initial device mask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907)~^~ +VALIDATION_ERROR_06600718~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908~^~(VK_KHX_device_group)~^~The spec valid usage text states 'deviceRenderAreaCount must either be zero or equal to the number of physical devices in the logical device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908)~^~ +VALIDATION_ERROR_06614201~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If deviceRenderAreaCount is not 0, pDeviceRenderAreas must be a valid pointer to an array of deviceRenderAreaCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter)~^~implicit +VALIDATION_ERROR_0662b00b~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType~^~(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_068000a4~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082~^~(VK_KHX_device_group)~^~The spec valid usage text states 'waitSemaphoreCount must equal VkSubmitInfo::waitSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082)~^~ +VALIDATION_ERROR_068000a6~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083~^~(VK_KHX_device_group)~^~The spec valid usage text states 'commandBufferCount must equal VkSubmitInfo::commandBufferCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083)~^~ +VALIDATION_ERROR_068000a8~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084~^~(VK_KHX_device_group)~^~The spec valid usage text states 'signalSemaphoreCount must equal VkSubmitInfo::signalSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084)~^~ +VALIDATION_ERROR_068000aa~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085~^~(VK_KHX_device_group)~^~The spec valid usage text states 'All elements of pWaitSemaphoreDeviceIndices and pSignalSemaphoreDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085)~^~ +VALIDATION_ERROR_068000ac~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086~^~(VK_KHX_device_group)~^~The spec valid usage text states 'All elements of pCommandBufferDeviceMasks must be valid device masks' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086)~^~ +VALIDATION_ERROR_06811201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If commandBufferCount is not 0, pCommandBufferDeviceMasks must be a valid pointer to an array of commandBufferCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter)~^~implicit +VALIDATION_ERROR_06823001~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphoreDeviceIndices must be a valid pointer to an array of signalSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter)~^~implicit +VALIDATION_ERROR_06827201~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphoreDeviceIndices must be a valid pointer to an array of waitSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter)~^~implicit +VALIDATION_ERROR_0682b00b~^~N~^~Unknown~^~vkQueueSubmit~^~VUID-VkDeviceGroupSubmitInfoKHX-sType-sType~^~(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-sType-sType)~^~implicit +VALIDATION_ERROR_06a0d001~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'modes must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter)~^~implicit +VALIDATION_ERROR_06a0d003~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'modes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask)~^~implicit +VALIDATION_ERROR_06a2b00b~^~N~^~Unknown~^~vkCreateSwapchainKHR~^~VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType)~^~implicit VALIDATION_ERROR_06c002fa~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381~^~core~^~The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381)~^~ VALIDATION_ERROR_06c002fc~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-queueCount-00382~^~core~^~The spec valid usage text states 'queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueCount-00382)~^~ VALIDATION_ERROR_06c002fe~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383~^~core~^~The spec valid usage text states 'Each element of pQueuePriorities must be between 0.0 and 1.0 inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383)~^~ VALIDATION_ERROR_06c09005~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-flags-zerobitmask)~^~implicit -VALIDATION_ERROR_06c1c40d~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pNext-pNext)~^~implicit -VALIDATION_ERROR_06c20401~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter~^~core~^~The spec valid usage text states 'pQueuePriorities must be a pointer to an array of queueCount float values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter)~^~implicit +VALIDATION_ERROR_06c1c40d~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkDeviceQueueGlobalPriorityCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pNext-pNext)~^~implicit +VALIDATION_ERROR_06c20401~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter~^~core~^~The spec valid usage text states 'pQueuePriorities must be a valid pointer to an array of queueCount float values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter)~^~implicit VALIDATION_ERROR_06c29e1b~^~Y~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-queueCount-arraylength~^~core~^~The spec valid usage text states 'queueCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueCount-arraylength)~^~implicit VALIDATION_ERROR_06c2b00b~^~N~^~Unknown~^~vkDestroyDevice~^~VUID-VkDeviceQueueCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-sType-sType)~^~implicit VALIDATION_ERROR_06e00342~^~N~^~Unknown~^~vkCmdDispatchIndirect~^~VUID-VkDispatchIndirectCommand-x-00417~^~core~^~The spec valid usage text states 'x must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-x-00417)~^~ VALIDATION_ERROR_06e00344~^~N~^~Unknown~^~vkCmdDispatchIndirect~^~VUID-VkDispatchIndirectCommand-y-00418~^~core~^~The spec valid usage text states 'y must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-y-00418)~^~ VALIDATION_ERROR_06e00346~^~N~^~Unknown~^~vkCmdDispatchIndirect~^~VUID-VkDispatchIndirectCommand-z-00419~^~core~^~The spec valid usage text states 'z must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-z-00419)~^~ -VALIDATION_ERROR_07006201~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-displayEvent-parameter~^~core~^~The spec valid usage text states 'displayEvent must be a valid VkDisplayEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-displayEvent-parameter)~^~implicit -VALIDATION_ERROR_0701c40d~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-pNext-pNext)~^~implicit -VALIDATION_ERROR_0702b00b~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-sType-sType)~^~implicit -VALIDATION_ERROR_072009c4~^~N~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-width-01250~^~core~^~The spec valid usage text states 'The width and height members of the visibleRegion member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-width-01250)~^~ -VALIDATION_ERROR_072009c6~^~N~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251~^~core~^~The spec valid usage text states 'The refreshRate member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251)~^~ -VALIDATION_ERROR_07209005~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0721c40d~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0722b00b~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0741c40d~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-pNext-pNext)~^~implicit -VALIDATION_ERROR_07428a01~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-powerState-parameter~^~core~^~The spec valid usage text states 'powerState must be a valid VkDisplayPowerStateEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-powerState-parameter)~^~implicit -VALIDATION_ERROR_0742b00b~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-sType-sType)~^~implicit -VALIDATION_ERROR_076009d2~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-srcRect-01257~^~core~^~The spec valid usage text states 'srcRect must specify a rectangular region that is a subset of the image being presented' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-srcRect-01257)~^~ -VALIDATION_ERROR_076009d4~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-dstRect-01258~^~core~^~The spec valid usage text states 'dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-dstRect-01258)~^~ -VALIDATION_ERROR_076009d6~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-persistentContent-01259~^~core~^~The spec valid usage text states 'If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-persistentContent-01259)~^~ -VALIDATION_ERROR_0762b00b~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_078009c8~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252~^~core~^~The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252)~^~ -VALIDATION_ERROR_078009ca~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253~^~core~^~The spec valid usage text states 'If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is VK_TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253)~^~ -VALIDATION_ERROR_078009cc~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254~^~core~^~The spec valid usage text states 'If alphaMode is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254)~^~ -VALIDATION_ERROR_078009ce~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255~^~core~^~The spec valid usage text states 'alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255)~^~ -VALIDATION_ERROR_078009d0~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-width-01256~^~core~^~The spec valid usage text states 'The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-width-01256)~^~ -VALIDATION_ERROR_07800a01~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter~^~core~^~The spec valid usage text states 'alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter)~^~implicit -VALIDATION_ERROR_07806401~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter~^~core~^~The spec valid usage text states 'displayMode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter)~^~implicit -VALIDATION_ERROR_07809005~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0781c40d~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0782b00b~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_07830201~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter~^~core~^~The spec valid usage text states 'transform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter)~^~implicit -VALIDATION_ERROR_07a00450~^~N~^~Unknown~^~vkCmdDrawIndexedIndirect~^~VUID-VkDrawIndexedIndirectCommand-None-00552~^~core~^~The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-None-00552)~^~ +VALIDATION_ERROR_07006201~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-displayEvent-parameter~^~(VK_EXT_display_control)~^~The spec valid usage text states 'displayEvent must be a valid VkDisplayEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-displayEvent-parameter)~^~implicit +VALIDATION_ERROR_0701c40d~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-pNext-pNext~^~(VK_EXT_display_control)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-pNext-pNext)~^~implicit +VALIDATION_ERROR_0702b00b~^~Y~^~Unknown~^~vkRegisterDisplayEventEXT~^~VUID-VkDisplayEventInfoEXT-sType-sType~^~(VK_EXT_display_control)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-sType-sType)~^~implicit +VALIDATION_ERROR_072009c4~^~N~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-width-01250~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'The width and height members of the visibleRegion member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-width-01250)~^~ +VALIDATION_ERROR_072009c6~^~N~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'The refreshRate member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251)~^~ +VALIDATION_ERROR_07209005~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0721c40d~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-pNext-pNext~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0722b00b~^~Y~^~Unknown~^~vkCreateDisplayModeKHR~^~VUID-VkDisplayModeCreateInfoKHR-sType-sType~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0741c40d~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-pNext-pNext~^~(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_display_control)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-pNext-pNext)~^~implicit +VALIDATION_ERROR_07428a01~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-powerState-parameter~^~(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_display_control)~^~The spec valid usage text states 'powerState must be a valid VkDisplayPowerStateEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-powerState-parameter)~^~implicit +VALIDATION_ERROR_0742b00b~^~Y~^~Unknown~^~vkDisplayPowerControlEXT~^~VUID-VkDisplayPowerInfoEXT-sType-sType~^~(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_display_control)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-sType-sType)~^~implicit +VALIDATION_ERROR_076009d2~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-srcRect-01257~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)~^~The spec valid usage text states 'srcRect must specify a rectangular region that is a subset of the image being presented' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-srcRect-01257)~^~ +VALIDATION_ERROR_076009d4~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-dstRect-01258~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)~^~The spec valid usage text states 'dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-dstRect-01258)~^~ +VALIDATION_ERROR_076009d6~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-persistentContent-01259~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)~^~The spec valid usage text states 'If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-persistentContent-01259)~^~ +VALIDATION_ERROR_0762b00b~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkDisplayPresentInfoKHR-sType-sType~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_078009c8~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252)~^~ +VALIDATION_ERROR_078009ca~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is VK_TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253)~^~ +VALIDATION_ERROR_078009cc~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'If alphaMode is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254)~^~ +VALIDATION_ERROR_078009ce~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255)~^~ +VALIDATION_ERROR_078009d0~^~N~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-width-01256~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-width-01256)~^~ +VALIDATION_ERROR_07800a01~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter)~^~implicit +VALIDATION_ERROR_07806401~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'displayMode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter)~^~implicit +VALIDATION_ERROR_07809005~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0781c40d~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0782b00b~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_07830201~^~Y~^~Unknown~^~vkCreateDisplayPlaneSurfaceKHR~^~VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter~^~(VK_KHR_surface)+(VK_KHR_display)~^~The spec valid usage text states 'transform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter)~^~implicit +VALIDATION_ERROR_07a00450~^~N~^~Unknown~^~vkCmdDrawIndexedIndirect~^~VUID-VkDrawIndexedIndirectCommand-None-00552~^~core~^~The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-None-00552)~^~ VALIDATION_ERROR_07a00452~^~N~^~Unknown~^~vkCmdDrawIndexedIndirect~^~VUID-VkDrawIndexedIndirectCommand-indexSize-00553~^~core~^~The spec valid usage text states '(indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-indexSize-00553)~^~ VALIDATION_ERROR_07a00454~^~N~^~Unknown~^~vkCmdDrawIndexedIndirect~^~VUID-VkDrawIndexedIndirectCommand-firstInstance-00554~^~core~^~The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, firstInstance must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-firstInstance-00554)~^~ -VALIDATION_ERROR_07c003e8~^~N~^~Unknown~^~vkCmdDrawIndirect~^~VUID-VkDrawIndirectCommand-None-00500~^~core~^~The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-None-00500)~^~ +VALIDATION_ERROR_07c003e8~^~N~^~Unknown~^~vkCmdDrawIndirect~^~VUID-VkDrawIndirectCommand-None-00500~^~core~^~The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-None-00500)~^~ VALIDATION_ERROR_07c003ea~^~N~^~Unknown~^~vkCmdDrawIndirect~^~VUID-VkDrawIndirectCommand-firstInstance-00501~^~core~^~The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, firstInstance must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-firstInstance-00501)~^~ VALIDATION_ERROR_07e09005~^~Y~^~Unknown~^~vkCreateEvent~^~VUID-VkEventCreateInfo-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_07e1c40d~^~Y~^~Unknown~^~vkCreateEvent~^~VUID-VkEventCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_07e2b00b~^~Y~^~Unknown~^~vkCreateEvent~^~VUID-VkEventCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_08000520~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656~^~core~^~The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656)~^~ -VALIDATION_ERROR_08009e01~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_0801c40d~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_0802b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_08209e01~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_0821c40d~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-pNext-pNext)~^~implicit -VALIDATION_ERROR_0822b00b~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-sType-sType)~^~implicit -VALIDATION_ERROR_08400522~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657~^~core~^~The spec valid usage text states 'If VkExportMemoryAllocateInfoKHR::handleTypes does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, VkExportMemoryWin32HandleInfoKHR must not be in the pNext chain of VkMemoryAllocateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657)~^~ -VALIDATION_ERROR_0840f401~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter~^~core~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter)~^~implicit -VALIDATION_ERROR_0841c40d~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_0842b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_0860f401~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter~^~core~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter)~^~implicit -VALIDATION_ERROR_0861c40d~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext)~^~implicit -VALIDATION_ERROR_0862b00b~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-sType-sType)~^~implicit -VALIDATION_ERROR_088008c8~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124~^~core~^~The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalSemaphorePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124)~^~ -VALIDATION_ERROR_08809e01~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalSemaphoreHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_0881c40d~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_0882b00b~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_08a008ca~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125~^~core~^~The spec valid usage text states 'If VkExportSemaphoreCreateInfoKHR::handleTypes does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, VkExportSemaphoreWin32HandleInfoKHR must not be in the pNext chain of VkSemaphoreCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125)~^~ -VALIDATION_ERROR_08a0f401~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter~^~core~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter)~^~implicit -VALIDATION_ERROR_08a1c40d~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_08a2b00b~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_08c09e01~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_08c1c40d~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_08c2b00b~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_08e09e01~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_08e09e03~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask~^~core~^~The spec valid usage text states 'handleTypes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask)~^~implicit -VALIDATION_ERROR_08e1c40d~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext)~^~implicit -VALIDATION_ERROR_08e2b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType)~^~implicit -VALIDATION_ERROR_09009e01~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter~^~core~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter)~^~implicit -VALIDATION_ERROR_0901c40d~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0902b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_08000520~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656)~^~ +VALIDATION_ERROR_08009e01~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_0801c40d~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_0802b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryAllocateInfoKHR-sType-sType~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_08209e01~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter~^~(VK_NV_external_memory)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_0821c40d~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-pNext-pNext~^~(VK_NV_external_memory)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-pNext-pNext)~^~implicit +VALIDATION_ERROR_0822b00b~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryAllocateInfoNV-sType-sType~^~(VK_NV_external_memory)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-sType-sType)~^~implicit +VALIDATION_ERROR_08400522~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657~^~(VK_KHR_external_memory_win32)~^~The spec valid usage text states 'If VkExportMemoryAllocateInfoKHR::handleTypes does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, VkExportMemoryWin32HandleInfoKHR must not be in the pNext chain of VkMemoryAllocateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657)~^~ +VALIDATION_ERROR_0840f401~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter~^~(VK_KHR_external_memory_win32)~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter)~^~implicit +VALIDATION_ERROR_0841c40d~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext~^~(VK_KHR_external_memory_win32)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_0842b00b~^~N~^~Unknown~^~vkAllocateMemory~^~VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType~^~(VK_KHR_external_memory_win32)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_0860f401~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter~^~(VK_NV_external_memory_win32)~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter)~^~implicit +VALIDATION_ERROR_0861c40d~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext~^~(VK_NV_external_memory_win32)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext)~^~implicit +VALIDATION_ERROR_0862b00b~^~N~^~Unknown~^~vkGetMemoryFdPropertiesKHR~^~VUID-VkExportMemoryWin32HandleInfoNV-sType-sType~^~(VK_NV_external_memory_win32)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-sType-sType)~^~implicit +VALIDATION_ERROR_088008c8~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124~^~(VK_KHR_external_semaphore)~^~The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalSemaphorePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124)~^~ +VALIDATION_ERROR_08809e01~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter~^~(VK_KHR_external_semaphore)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalSemaphoreHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_0881c40d~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext~^~(VK_KHR_external_semaphore)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_0882b00b~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreCreateInfoKHR-sType-sType~^~(VK_KHR_external_semaphore)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_08a008ca~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'If VkExportSemaphoreCreateInfoKHR::handleTypes does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, VkExportSemaphoreWin32HandleInfoKHR must not be in the pNext chain of VkSemaphoreCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125)~^~ +VALIDATION_ERROR_08a0f401~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter)~^~implicit +VALIDATION_ERROR_08a1c40d~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_08a2b00b~^~N~^~Unknown~^~vkCreateSemaphore~^~VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType~^~(VK_KHR_external_semaphore_win32)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_08c09e01~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_08c1c40d~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_08c2b00b~^~N~^~Unknown~^~vkCreateBuffer~^~VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_08e09e01~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_08e09e03~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'handleTypes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask)~^~implicit +VALIDATION_ERROR_08e1c40d~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext)~^~implicit +VALIDATION_ERROR_08e2b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType)~^~implicit +VALIDATION_ERROR_09009e01~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter~^~(VK_NV_external_memory)~^~The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter)~^~implicit +VALIDATION_ERROR_0901c40d~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext~^~(VK_NV_external_memory)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext)~^~implicit, TBD in parameter validation layer. +VALIDATION_ERROR_0902b00b~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkExternalMemoryImageCreateInfoNV-sType-sType~^~(VK_NV_external_memory)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_09209001~^~Y~^~Unknown~^~vkCreateFence~^~VUID-VkFenceCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkFenceCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-flags-parameter)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0921c40d~^~Y~^~Unknown~^~vkCreateFence~^~VUID-VkFenceCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExportFenceCreateInfoKHR or VkExportFenceWin32HandleInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0922b00b~^~Y~^~Unknown~^~vkCreateFence~^~VUID-VkFenceCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. @@ -538,7 +552,7 @@ VALIDATION_ERROR_094006f2~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~ VALIDATION_ERROR_094006f4~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-layers-00890~^~core~^~The spec valid usage text states 'layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-layers-00890)~^~ VALIDATION_ERROR_094006f6~^~N~^~Unknown~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-pAttachments-00891~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'Each element of pAttachments that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00891)~^~ VALIDATION_ERROR_09409005~^~Y~^~Unknown~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-flags-zerobitmask)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_0940f201~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-pAttachments-parameter~^~core~^~The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-parameter)~^~implicit +VALIDATION_ERROR_0940f201~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-pAttachments-parameter~^~core~^~The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-parameter)~^~implicit VALIDATION_ERROR_0941c40d~^~Y~^~Unknown~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0942ae01~^~Y~^~FramebufferCreateErrors~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-renderPass-parameter~^~core~^~The spec valid usage text states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-renderPass-parameter)~^~implicit VALIDATION_ERROR_0942b00b~^~Y~^~Unknown~^~vkCreateFramebuffer~^~VUID-VkFramebufferCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. @@ -552,7 +566,7 @@ VALIDATION_ERROR_096005ae~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGra VALIDATION_ERROR_096005b0~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-stage-00728~^~core~^~The spec valid usage text states 'The stage member of each element of pStages must not be VK_SHADER_STAGE_COMPUTE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-stage-00728)~^~ VALIDATION_ERROR_096005b2~^~Y~^~CreatePipelineTessErrors~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00729~^~core~^~The spec valid usage text states 'If pStages includes a tessellation control shader stage, it must include a tessellation evaluation shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00729)~^~ VALIDATION_ERROR_096005b4~^~Y~^~CreatePipelineTessErrors~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00730~^~core~^~The spec valid usage text states 'If pStages includes a tessellation evaluation shader stage, it must include a tessellation control shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00730)~^~ -VALIDATION_ERROR_096005b6~^~Y~^~CreatePipelineTessErrors~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00731~^~core~^~The spec valid usage text states 'If pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pTessellationState must be a pointer to a valid VkPipelineTessellationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00731)~^~ +VALIDATION_ERROR_096005b6~^~Y~^~CreatePipelineTessErrors~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00731~^~core~^~The spec valid usage text states 'If pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pTessellationState must be a valid pointer to a valid VkPipelineTessellationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00731)~^~ VALIDATION_ERROR_096005b8~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00732~^~core~^~The spec valid usage text states 'If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00732)~^~ VALIDATION_ERROR_096005ba~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00733~^~core~^~The spec valid usage text states 'If pStages includes tessellation shader stages, and the shader code of both stages contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must both specify the same subdivision mode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00733)~^~ VALIDATION_ERROR_096005bc~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00734~^~core~^~The spec valid usage text states 'If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the output patch size in the pipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00734)~^~ @@ -564,23 +578,23 @@ VALIDATION_ERROR_096005c6~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGra VALIDATION_ERROR_096005c8~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00740~^~core~^~The spec valid usage text states 'If pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with PrimitiveID, then the geometry shader code must write to a matching output variable, decorated with PrimitiveID, in all execution paths' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00740)~^~ VALIDATION_ERROR_096005ca~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00741~^~core~^~The spec valid usage text states 'If pStages includes a fragment shader stage, its shader code must not read from any input attachment that is defined as VK_ATTACHMENT_UNUSED in subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00741)~^~ VALIDATION_ERROR_096005cc~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-00742~^~core~^~The spec valid usage text states 'The shader code for the entry points identified by pStages, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00742)~^~ -VALIDATION_ERROR_096005ce~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00743~^~core~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderpass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00743)~^~ -VALIDATION_ERROR_096005d0~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00744~^~core~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderpass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00744)~^~ -VALIDATION_ERROR_096005d2~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-blendEnable-00745~^~core~^~The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the blendEnable member of the corresponding element of the pAttachment member of pColorBlendState must be VK_FALSE if the format of the attachment does not support color blend operations, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in VkFormatProperties::linearTilingFeatures or VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-blendEnable-00745)~^~ +VALIDATION_ERROR_096005ce~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00743~^~!(VK_KHR_maintenance2)~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00743)~^~ +VALIDATION_ERROR_096005d0~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00744~^~!(VK_KHR_maintenance2)~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00744)~^~ +VALIDATION_ERROR_096005d2~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00745~^~core~^~The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the blendEnable member of the corresponding element of the pAttachment member of pColorBlendState must be VK_FALSE if the format of the attachment does not support color blend operations, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in VkFormatProperties::linearTilingFeatures or VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00745)~^~ VALIDATION_ERROR_096005d4~^~Y~^~NumBlendAttachMismatch~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-attachmentCount-00746~^~core~^~The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, the attachmentCount member of pColorBlendState must be equal to the colorAttachmentCount used to create subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-attachmentCount-00746)~^~ -VALIDATION_ERROR_096005d6~^~Y~^~PSOViewportCountWithoutDataAndDynScissorMismatch~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747~^~core~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports member of pViewportState must be a pointer to an array of pViewportState::viewportCount VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747)~^~ -VALIDATION_ERROR_096005d8~^~Y~^~PSOScissorCountWithoutDataAndDynViewportMismatch~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748~^~core~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member of pViewportState must be a pointer to an array of pViewportState::scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748)~^~ -VALIDATION_ERROR_096005da~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749~^~core~^~The spec valid usage text states 'If the wide lines feature is not enabled, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_WIDTH, the lineWidth member of pRasterizationState must be 1.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749)~^~ -VALIDATION_ERROR_096005dc~^~Y~^~PSOViewportStateNotSet~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a pointer to a valid VkPipelineViewportStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750)~^~ -VALIDATION_ERROR_096005de~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pMultisampleState must be a pointer to a valid VkPipelineMultisampleStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751)~^~ -VALIDATION_ERROR_096005e0~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses a depth/stencil attachment, pDepthStencilState must be a pointer to a valid VkPipelineDepthStencilStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752)~^~ -VALIDATION_ERROR_096005e2~^~Y~^~PipelineRenderpassCompatibility~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses color attachments, pColorBlendState must be a pointer to a valid VkPipelineColorBlendStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753)~^~ -VALIDATION_ERROR_096005e4~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754~^~core~^~The spec valid usage text states 'If the depth bias clamping feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pDepthStencil is VK_TRUE, the depthBiasClamp member of pDepthStencil must be 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754)~^~ -VALIDATION_ERROR_096005e6~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755~^~!(VK_EXT_depth_range_unrestricted)~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencil is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencil must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755)~^~ +VALIDATION_ERROR_096005d6~^~Y~^~PSOViewportStateTests,PSOViewportStateMultiViewportTests~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747~^~core~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports member of pViewportState must be a valid pointer to an array of pViewportState::viewportCount VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747)~^~ +VALIDATION_ERROR_096005d8~^~Y~^~PSOViewportStateTests,PSOViewportStateMultiViewportTests~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748~^~core~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member of pViewportState must be a valid pointer to an array of pViewportState::scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748)~^~ +VALIDATION_ERROR_096005da~^~Y~^~PSOLineWidthInvalid~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749~^~core~^~The spec valid usage text states 'If the wide lines feature is not enabled, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_WIDTH, the lineWidth member of pRasterizationState must be 1.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749)~^~ +VALIDATION_ERROR_096005dc~^~Y~^~PSOViewportStateTests~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750)~^~ +VALIDATION_ERROR_096005de~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pMultisampleState must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751)~^~ +VALIDATION_ERROR_096005e0~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses a depth/stencil attachment, pDepthStencilState must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752)~^~ +VALIDATION_ERROR_096005e2~^~Y~^~PipelineRenderpassCompatibility~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753~^~core~^~The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses color attachments, pColorBlendState must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753)~^~ +VALIDATION_ERROR_096005e4~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754~^~core~^~The spec valid usage text states 'If the depth bias clamping feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pRasterizationState is VK_TRUE, the depthBiasClamp member of pRasterizationState must be 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754)~^~ +VALIDATION_ERROR_096005e6~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755~^~(VK_EXT_depth_range_unrestricted)~^~The spec valid usage text states 'If the VK_EXT_depth_range_unrestricted extension is not enabled and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencilState is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencilState must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755)~^~ VALIDATION_ERROR_096005e8~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-layout-00756~^~core~^~The spec valid usage text states 'layout must be consistent with all shaders specified in pStages' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-00756)~^~ VALIDATION_ERROR_096005ea~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00757~^~!(VK_AMD_mixed_attachment_samples)+!(VK_NV_framebuffer_mixed_samples)~^~The spec valid usage text states 'If subpass uses color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must be the same as the sample count for those subpass attachments' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00757)~^~ VALIDATION_ERROR_096005ec~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00758~^~core~^~The spec valid usage text states 'If subpass does not use any color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must follow the rules for a zero-attachment subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00758)~^~ -VALIDATION_ERROR_096005ee~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00759~^~core~^~The spec valid usage text states 'subpass must be a valid subpass within renderpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00759)~^~ +VALIDATION_ERROR_096005ee~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-subpass-00759~^~core~^~The spec valid usage text states 'subpass must be a valid subpass within renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00759)~^~ VALIDATION_ERROR_096005f0~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-renderPass-00760~^~(VK_KHX_multiview)~^~The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewTessellationShader is not enabled, then pStages must not include tessellation shaders.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00760)~^~ VALIDATION_ERROR_096005f2~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-renderPass-00761~^~(VK_KHX_multiview)~^~The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewGeometryShader is not enabled, then pStages must not include a geometry shader.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00761)~^~ VALIDATION_ERROR_096005f4~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-renderPass-00762~^~(VK_KHX_multiview)~^~The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask, shaders in the pipeline must not write to the Layer built-in output' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00762)~^~ @@ -593,23 +607,27 @@ VALIDATION_ERROR_09600be2~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGra VALIDATION_ERROR_09600be4~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01522~^~(VK_EXT_sample_locations)~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationGridSize.height must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.height as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01522)~^~ VALIDATION_ERROR_09600be6~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01523~^~(VK_EXT_sample_locations)~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationsPerPixel must equal rasterizationSamples' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01523)~^~ VALIDATION_ERROR_09600be8~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524~^~(VK_EXT_sample_locations)~^~The spec valid usage text states 'If the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, the fragment shader code must not statically use the extended instruction InterpolateAtSample' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524)~^~ -VALIDATION_ERROR_09600c3a~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-pStages-01565~^~(VK_KHR_maintenance2)~^~The spec valid usage text states 'If pStages includes a fragment shader stage and an input attachment was referenced by the VkRenderPassInputAttachmentAspectCreateInfoKHR at renderpass create time, its shader code must not read from any aspect that was not specified in the aspectMask of the corresponding VkInputAttachmentAspectReferenceKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-01565)~^~ +VALIDATION_ERROR_09600c3a~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-pStages-01565~^~(VK_KHR_maintenance2)~^~The spec valid usage text states 'If pStages includes a fragment shader stage and an input attachment was referenced by the VkRenderPassInputAttachmentAspectCreateInfoKHR at renderPass create time, its shader code must not read from any aspect that was not specified in the aspectMask of the corresponding VkInputAttachmentAspectReferenceKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-01565)~^~ +VALIDATION_ERROR_09600d30~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-layout-01688~^~core~^~The spec valid usage text states 'The number of resources in layout accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-01688)~^~ +VALIDATION_ERROR_09600d66~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715~^~(VK_NV_clip_space_w_scaling)~^~The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the viewportWScalingEnable member of a VkPipelineViewportWScalingStateCreateInfoNV structure, chained to the pNext chain of pViewportState, is VK_TRUE, the pViewportWScalings member of the VkPipelineViewportWScalingStateCreateInfoNV must be a pointer to an array of VkPipelineViewportWScalingStateCreateInfoNV::viewportCount valid VkViewportWScalingNV structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715)~^~ +VALIDATION_ERROR_09600db8~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-subpass-01756~^~(VK_KHR_maintenance2)~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-01756)~^~ +VALIDATION_ERROR_09600dba~^~N~^~None~^~VkGraphicsPipelineCreateInfo~^~VUID-VkGraphicsPipelineCreateInfo-subpass-01757~^~(VK_KHR_maintenance2)~^~The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-01757)~^~ VALIDATION_ERROR_09609001~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-flags-parameter~^~core~^~The spec valid usage text states 'flags must be a valid combination of VkPipelineCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-flags-parameter)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0960be01~^~Y~^~None~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-layout-parameter~^~core~^~The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-parameter)~^~implicit -VALIDATION_ERROR_09615601~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter~^~core~^~The spec valid usage text states 'If pDynamicState is not NULL, pDynamicState must be a pointer to a valid VkPipelineDynamicStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter)~^~implicit -VALIDATION_ERROR_09619801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter~^~core~^~The spec valid usage text states 'pInputAssemblyState must be a pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter)~^~implicit +VALIDATION_ERROR_09615601~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter~^~core~^~The spec valid usage text states 'If pDynamicState is not NULL, pDynamicState must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter)~^~implicit +VALIDATION_ERROR_09619801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter~^~core~^~The spec valid usage text states 'pInputAssemblyState must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter)~^~implicit VALIDATION_ERROR_0961c40d~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPipelineDiscardRectangleStateCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer. -VALIDATION_ERROR_09620801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter~^~core~^~The spec valid usage text states 'pRasterizationState must be a pointer to a valid VkPipelineRasterizationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter)~^~implicit -VALIDATION_ERROR_09623e01~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-parameter~^~core~^~The spec valid usage text states 'pStages must be a pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-parameter)~^~implicit -VALIDATION_ERROR_09626801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter~^~core~^~The spec valid usage text states 'pVertexInputState must be a pointer to a valid VkPipelineVertexInputStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter)~^~implicit +VALIDATION_ERROR_09620801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter~^~core~^~The spec valid usage text states 'pRasterizationState must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter)~^~implicit +VALIDATION_ERROR_09623e01~^~Y~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pStages-parameter~^~core~^~The spec valid usage text states 'pStages must be a valid pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-parameter)~^~implicit +VALIDATION_ERROR_09626801~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter~^~core~^~The spec valid usage text states 'pVertexInputState must be a valid pointer to a valid VkPipelineVertexInputStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter)~^~implicit VALIDATION_ERROR_0962ae01~^~Y~^~None~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter~^~core~^~The spec valid usage text states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter)~^~implicit VALIDATION_ERROR_0962b00b~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer. VALIDATION_ERROR_0962da1b~^~N~^~Unknown~^~vkCreateGraphicsPipelines~^~VUID-VkGraphicsPipelineCreateInfo-stageCount-arraylength~^~core~^~The spec valid usage text states 'stageCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-stageCount-arraylength)~^~implicit -VALIDATION_ERROR_09800a48~^~N~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pView-01316~^~core~^~The spec valid usage text states 'pView must be a valid UIView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-01316)~^~ -VALIDATION_ERROR_09809005~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask~^~core~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask)~^~implicit -VALIDATION_ERROR_0981c40d~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext)~^~implicit -VALIDATION_ERROR_09826a01~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pView-parameter~^~core~^~The spec valid usage text states 'pView must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-parameter)~^~implicit -VALIDATION_ERROR_0982b00b~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-sType-sType)~^~implicit +VALIDATION_ERROR_09800a48~^~N~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pView-01316~^~(VK_KHR_surface)+(VK_MVK_ios_surface)~^~The spec valid usage text states 'pView must be a valid UIView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-01316)~^~ +VALIDATION_ERROR_09809005~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask~^~(VK_KHR_surface)+(VK_MVK_ios_surface)~^~The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask)~^~implicit +VALIDATION_ERROR_0981c40d~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext~^~(VK_KHR_surface)+(VK_MVK_ios_surface)~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext)~^~implicit +VALIDATION_ERROR_09826a01~^~N~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-pView-parameter~^~core~^~The spec valid usage text states 'pView must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-parameter)~^~implicit +VALIDATION_ERROR_0982b00b~^~Y~^~Unknown~^~vkCreateIOSSurfaceMVK~^~VUID-VkIOSSurfaceCreateInfoMVK-sType-sType~^~(VK_KHR_surface)+(VK_MVK_ios_surface)~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-sType-sType)~^~implicit VALIDATION_ERROR_09a001dc~^~Y~^~Unknown~^~vkCmdBlitImage~^~VUID-VkImageBlit-aspectMask-00238~^~core~^~The spec valid usage text states 'The aspectMask member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-aspectMask-00238)~^~ VALIDATION_ERROR_09a001de~^~Y~^~Unknown~^~vkCmdBlitImage~^~VUID-VkImageBlit-layerCount-00239~^~core~^~The spec valid usage text states 'The layerCount member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-layerCount-00239)~^~ VALIDATION_ERROR_09a001e0~^~Y~^~MiscBlitImageTests~^~vkCmdBlitImage~^~VUID-VkImageBlit-srcImage-00240~^~core~^~The spec valid usage text states 'If either of the calling command's srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-srcImage-00240)~^~ @@ -639,21 +657,21 @@ VALIDATION_ERROR_09c00122~^~Y~^~CopyImageSrcSizeExceeded~^~vkCmdCopyImage~^~VUID VALIDATION_ERROR_09c00124~^~Y~^~CopyImageTypeExtentMismatch~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcImage-00146~^~core~^~The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.y must be 0 and extent.height must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-00146)~^~ VALIDATION_ERROR_09c00126~^~Y~^~CopyImageSrcSizeExceeded~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcOffset-00147~^~core~^~The spec valid usage text states 'srcOffset.z and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the source image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00147)~^~ VALIDATION_ERROR_09c00128~^~Y~^~CopyImageTypeExtentMismatch~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcImage-00148~^~core~^~The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then srcOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-00148)~^~ -VALIDATION_ERROR_09c0012a~^~Y~^~CopyImageTypeExtentMismatch~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcSubresource-00149~^~core~^~The spec valid usage text states 'srcSubresource.baseArrayLayer must be less than and (srcSubresource.layerCount + srcSubresource.baseArrayLayer) must be less than or equal to the number of layers in the source image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcSubresource-00149)~^~ +VALIDATION_ERROR_09c0012a~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcSubresource-00149~^~core~^~The spec valid usage text states 'srcSubresource.baseArrayLayer must be less than and (srcSubresource.layerCount + srcSubresource.baseArrayLayer) must be less than or equal to the number of layers in the source image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcSubresource-00149)~^~ VALIDATION_ERROR_09c0012c~^~Y~^~CopyImageDstSizeExceeded~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstOffset-00150~^~core~^~The spec valid usage text states 'dstOffset.x and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the destination image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00150)~^~ VALIDATION_ERROR_09c0012e~^~Y~^~CopyImageDstSizeExceeded~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstOffset-00151~^~core~^~The spec valid usage text states 'dstOffset.y and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the destination image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00151)~^~ VALIDATION_ERROR_09c00130~^~Y~^~CopyImageTypeExtentMismatch~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstImage-00152~^~core~^~The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.y must be 0 and extent.height must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-00152)~^~ VALIDATION_ERROR_09c00132~^~Y~^~CopyImageDstSizeExceeded~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstOffset-00153~^~core~^~The spec valid usage text states 'dstOffset.z and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00153)~^~ VALIDATION_ERROR_09c00134~^~Y~^~CopyImageTypeExtentMismatch~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstImage-00154~^~core~^~The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then dstOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-00154)~^~ -VALIDATION_ERROR_09c00136~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstSubresource-00155~^~core~^~The spec valid usage text states 'dstSubresource.baseArrayLayer must be less than and (dstSubresource.layerCount + dstSubresource.baseArrayLayer) must be less than or equal to the number of layers in the destination image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-00155)~^~ -VALIDATION_ERROR_09c0013a~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcOffset-00157~^~core~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00157)~^~ -VALIDATION_ERROR_09c0013c~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00158~^~core~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00158)~^~ -VALIDATION_ERROR_09c0013e~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00159~^~core~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00159)~^~ -VALIDATION_ERROR_09c00140~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00160~^~core~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00160)~^~ -VALIDATION_ERROR_09c00144~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstOffset-00162~^~core~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00162)~^~ -VALIDATION_ERROR_09c00146~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00163~^~core~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00163)~^~ -VALIDATION_ERROR_09c00148~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00164~^~core~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00164)~^~ -VALIDATION_ERROR_09c0014a~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00165~^~core~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00165)~^~ +VALIDATION_ERROR_09c00136~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstSubresource-00155~^~core~^~The spec valid usage text states 'dstSubresource.baseArrayLayer must be less than and (dstSubresource.layerCount + dstSubresource.baseArrayLayer) must be less than or equal to the number of layers in the destination image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-00155)~^~ +VALIDATION_ERROR_09c0013a~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcOffset-00157~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00157)~^~ +VALIDATION_ERROR_09c0013c~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00158~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00158)~^~ +VALIDATION_ERROR_09c0013e~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00159~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00159)~^~ +VALIDATION_ERROR_09c00140~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00160~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00160)~^~ +VALIDATION_ERROR_09c00144~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstOffset-00162~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00162)~^~ +VALIDATION_ERROR_09c00146~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00163~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00163)~^~ +VALIDATION_ERROR_09c00148~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00164~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00164)~^~ +VALIDATION_ERROR_09c0014a~^~Y~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-extent-00165~^~!(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00165)~^~ VALIDATION_ERROR_09c0014c~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcOffset-00166~^~core~^~The spec valid usage text states 'srcOffset, dstOffset, and extent must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00166)~^~ VALIDATION_ERROR_09c00c1e~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01551~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If neither the calling command's srcImage nor the calling command's dstImage has a multi-planar image format then the aspectMask member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01551)~^~ VALIDATION_ERROR_09c00c20~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01552~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage has a VkFormat with two planes then the srcSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01552)~^~ @@ -662,36 +680,52 @@ VALIDATION_ERROR_09c00c24~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-0 VALIDATION_ERROR_09c00c26~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01555~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage has a VkFormat with three planes then the dstSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01555)~^~ VALIDATION_ERROR_09c00c28~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01556~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage has a multi-planar image format and the dstImage does not have a multi-planar image format, the dstSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01556)~^~ VALIDATION_ERROR_09c00c2a~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01557~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage has a multi-planar image format and the srcImage does not have a multi-planar image format, the srcSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01557)~^~ +VALIDATION_ERROR_09c00d7e~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01727~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, "_422" image format, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01727)~^~ +VALIDATION_ERROR_09c00d80~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01728~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, "_422" image format, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01728)~^~ +VALIDATION_ERROR_09c00d82~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01729~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, "_422" image format, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01729)~^~ +VALIDATION_ERROR_09c00d84~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01730~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, "_422" image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01730)~^~ +VALIDATION_ERROR_09c00d86~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01731~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, "_422" image format, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01731)~^~ +VALIDATION_ERROR_09c00d88~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01732~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, "_422" image format, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01732)~^~ +VALIDATION_ERROR_09c00d8a~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01733~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, "_422" image format, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01733)~^~ +VALIDATION_ERROR_09c00d8c~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01734~^~(VK_KHR_sampler_ycbcr_conversion)~^~The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, "_422" image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01734)~^~ +VALIDATION_ERROR_09c00df2~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01785~^~core~^~The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01785)~^~ +VALIDATION_ERROR_09c00df4~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01786~^~core~^~The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-01786)~^~ +VALIDATION_ERROR_09c00df6~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01787~^~core~^~The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_2D, then srcOffset.z must be 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01787)~^~ +VALIDATION_ERROR_09c00df8~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01788~^~core~^~The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_2D, then dstOffset.z must be 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-01788)~^~ +VALIDATION_ERROR_09c00dfa~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01789~^~!(VK_KHR_maintenance1)~^~The spec valid usage text states 'If the calling command's srcImage or dstImage is of type VK_IMAGE_TYPE_2D, then extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01789)~^~ +VALIDATION_ERROR_09c00dfc~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01790~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'If both srcImage and dstImage are of type VK_IMAGE_TYPE_2D then then extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01790)~^~ +VALIDATION_ERROR_09c00dfe~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-srcImage-01791~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_2D, and the dstImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of srcSubresource.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01791)~^~ +VALIDATION_ERROR_09c00e00~^~N~^~None~^~VkImageCopy~^~VUID-VkImageCopy-dstImage-01792~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_2D, and the srcImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of dstSubresource.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01792)~^~ VALIDATION_ERROR_09c07a01~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-dstSubresource-parameter~^~core~^~The spec valid usage text states 'dstSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-parameter)~^~implicit VALIDATION_ERROR_09c2d601~^~N~^~Unknown~^~vkCmdCopyImage~^~VUID-VkImageCopy-srcSubresource-parameter~^~core~^~The spec valid usage text states 'srcSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcSubresource-parameter)~^~implicit -VALIDATION_ERROR_09e00758~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00940~^~core~^~The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)~^~ -VALIDATION_ERROR_09e0075a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sharingMode-00941~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00941)~^~ +VALIDATION_ERROR_09e00758~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00940~^~core~^~The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)~^~ +VALIDATION_ERROR_09e0075a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sharingMode-00941~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00941)~^~ VALIDATION_ERROR_09e0075c~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-sharingMode-00942~^~core~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00942)~^~ VALIDATION_ERROR_09e0075e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-format-00943~^~core~^~The spec valid usage text states 'format must not be VK_FORMAT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00943)~^~ -VALIDATION_ERROR_09e00760~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00944~^~core~^~The spec valid usage text states 'extent::width must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00944)~^~ -VALIDATION_ERROR_09e00762~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00945~^~core~^~The spec valid usage text states 'extent::height must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00945)~^~ -VALIDATION_ERROR_09e00764~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00946~^~core~^~The spec valid usage text states 'extent::depth must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00946)~^~ -VALIDATION_ERROR_09e00766~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-mipLevels-00947~^~core~^~The spec valid usage text states 'mipLevels must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00947)~^~ -VALIDATION_ERROR_09e00768~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00948~^~core~^~The spec valid usage text states 'arrayLayers must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00948)~^~ -VALIDATION_ERROR_09e0076a~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00949~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be VK_IMAGE_TYPE_2D' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00949)~^~ +VALIDATION_ERROR_09e00760~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00944~^~core~^~The spec valid usage text states 'extent::width must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00944)~^~ +VALIDATION_ERROR_09e00762~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00945~^~core~^~The spec valid usage text states 'extent::height must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00945)~^~ +VALIDATION_ERROR_09e00764~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00946~^~core~^~The spec valid usage text states 'extent::depth must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00946)~^~ +VALIDATION_ERROR_09e00766~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-mipLevels-00947~^~core~^~The spec valid usage text states 'mipLevels must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00947)~^~ +VALIDATION_ERROR_09e00768~^~Y~^~CreateImageMinLimitsViolation~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00948~^~core~^~The spec valid usage text states 'arrayLayers must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00948)~^~ +VALIDATION_ERROR_09e0076a~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00949~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be VK_IMAGE_TYPE_2D' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00949)~^~ VALIDATION_ERROR_09e0076c~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00950~^~(VK_KHR_maintenance1)~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, imageType must be VK_IMAGE_TYPE_3D' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-00950)~^~ -VALIDATION_ERROR_09e0076e~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00951~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension1D, or VkImageFormatProperties::maxExtent.width (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00951)~^~ -VALIDATION_ERROR_09e00770~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00952~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension2D, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00952)~^~ -VALIDATION_ERROR_09e00772~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00953~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimensionCube, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00953)~^~ +VALIDATION_ERROR_09e0076e~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00951~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension1D, or VkImageFormatProperties::maxExtent.width (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00951)~^~ +VALIDATION_ERROR_09e00770~^~Y~^~ImageFormatLimits~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00952~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension2D, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00952)~^~ +VALIDATION_ERROR_09e00772~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00953~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimensionCube, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00953)~^~ VALIDATION_ERROR_09e00774~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00954~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00954)~^~ -VALIDATION_ERROR_09e00776~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00955~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, extent.width, extent.height and extent.depth must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension3D, or VkImageFormatProperties::maxExtent.width/height/depth (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00955)~^~ +VALIDATION_ERROR_09e00776~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00955~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, extent.width, extent.height and extent.depth must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension3D, or VkImageFormatProperties::maxExtent.width/height/depth (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00955)~^~ VALIDATION_ERROR_09e00778~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00956~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00956)~^~ VALIDATION_ERROR_09e0077a~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00957~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D, extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00957)~^~ VALIDATION_ERROR_09e0077c~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-mipLevels-00958~^~core~^~The spec valid usage text states 'mipLevels must be less than or equal to {lfloor}log2(max(extent.width, extent.height, extent.depth)){rfloor} + 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00958)~^~ -VALIDATION_ERROR_09e0077e~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00959~^~core~^~The spec valid usage text states 'If any of extent.width, extent.height, or extent.depth are greater than the equivalently named members of VkPhysicalDeviceLimits::maxImageDimension3D, mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)~^~ -VALIDATION_ERROR_09e00780~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00960~^~core~^~The spec valid usage text states 'arrayLayers must be less than or equal to VkImageFormatProperties::maxArrayLayers (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00960)~^~ -VALIDATION_ERROR_09e00782~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00961~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00961)~^~ -VALIDATION_ERROR_09e00784~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00962~^~core~^~The spec valid usage text states 'If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00962)~^~ -VALIDATION_ERROR_09e00786~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00963~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00963)~^~ -VALIDATION_ERROR_09e00788~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00964~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00964)~^~ -VALIDATION_ERROR_09e0078a~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00965~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00965)~^~ -VALIDATION_ERROR_09e0078c~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00966~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00966)~^~ -VALIDATION_ERROR_09e0078e~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00967~^~core~^~The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00967)~^~ +VALIDATION_ERROR_09e0077e~^~Y~^~ImageFormatLimits~^~vkCreateImage~^~VUID-VkImageCreateInfo-extent-00959~^~core~^~The spec valid usage text states 'mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)~^~ +VALIDATION_ERROR_09e00780~^~Y~^~ImageFormatLimits~^~vkCreateImage~^~VUID-VkImageCreateInfo-arrayLayers-00960~^~core~^~The spec valid usage text states 'arrayLayers must be less than or equal to VkImageFormatProperties::maxArrayLayers (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00960)~^~ +VALIDATION_ERROR_09e00782~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00961~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00961)~^~ +VALIDATION_ERROR_09e00784~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00962~^~core~^~The spec valid usage text states 'If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00962)~^~ +VALIDATION_ERROR_09e00786~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00963~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00963)~^~ +VALIDATION_ERROR_09e00788~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00964~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00964)~^~ +VALIDATION_ERROR_09e0078a~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00965~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00965)~^~ +VALIDATION_ERROR_09e0078c~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00966~^~core~^~The spec valid usage text states 'If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00966)~^~ +VALIDATION_ERROR_09e0078e~^~Y~^~ImageFormatLimits~^~vkCreateImage~^~VUID-VkImageCreateInfo-samples-00967~^~core~^~The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00967)~^~ VALIDATION_ERROR_09e00790~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-usage-00968~^~core~^~The spec valid usage text states 'If the multisampled storage images feature is not enabled, and usage contains VK_IMAGE_USAGE_STORAGE_BIT, samples must be VK_SAMPLE_COUNT_1_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-usage-00968)~^~ VALIDATION_ERROR_09e00792~^~Y~^~None~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00969~^~core~^~The spec valid usage text states 'If the sparse bindings feature is not enabled, flags must not contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00969)~^~ VALIDATION_ERROR_09e00794~^~Y~^~SparseResidencyImageCreateUnsupportedTypes~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00970~^~core~^~The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00970)~^~ @@ -702,37 +736,37 @@ VALIDATION_ERROR_09e0079c~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~v VALIDATION_ERROR_09e0079e~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00975~^~core~^~The spec valid usage text states 'If the sparse residency for images with 8 samples feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_8_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00975)~^~ VALIDATION_ERROR_09e007a0~^~Y~^~SparseResidencyImageCreateUnsupportedSamples~^~vkCreateImage~^~VUID-VkImageCreateInfo-imageType-00976~^~core~^~The spec valid usage text states 'If the sparse residency for images with 16 samples feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_16_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00976)~^~ VALIDATION_ERROR_09e007a2~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00977~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00977)~^~ -VALIDATION_ERROR_09e007a4~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00978~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00978)~^~ -VALIDATION_ERROR_09e007a6~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00979~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)~^~ +VALIDATION_ERROR_09e007a4~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00978~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00978)~^~ +VALIDATION_ERROR_09e007a6~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00979~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00979)~^~ VALIDATION_ERROR_09e007a8~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00980~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00980)~^~ VALIDATION_ERROR_09e007aa~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00981~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00981)~^~ VALIDATION_ERROR_09e007ac~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00982~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00982)~^~ -VALIDATION_ERROR_09e007ae~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00983~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00983)~^~ -VALIDATION_ERROR_09e007b0~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00984~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00984)~^~ +VALIDATION_ERROR_09e007ae~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00983~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00983)~^~ +VALIDATION_ERROR_09e007b0~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00984~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00984)~^~ VALIDATION_ERROR_09e007b2~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00985~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00985)~^~ VALIDATION_ERROR_09e007b4~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-tiling-00986~^~core~^~The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00986)~^~ VALIDATION_ERROR_09e007b6~^~Y~^~SparseBindingImageBufferCreate~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00987~^~core~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-flags-00987)~^~ -VALIDATION_ERROR_09e007b8~^~Y~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00988~^~(VK_NV_external_memory+VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, it must not contain an instance of VkExternalMemoryImageCreateInfoKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00988)~^~ +VALIDATION_ERROR_09e007b8~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00988~^~(VK_NV_external_memory+VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, it must not contain an instance of VkExternalMemoryImageCreateInfoKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00988)~^~ VALIDATION_ERROR_09e007ba~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00989~^~core~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoKHR, and any of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2KHR in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of VkDedicatedAllocationImageCreateInfoNV with its dedicatedAllocation field set to VK_TRUE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00989)~^~ VALIDATION_ERROR_09e007bc~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00990~^~(VK_KHR_external_memory)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceImageFormatProperties2KHR with format, imageType, tiling, usage, and flags equal to those in this structure, and with an instance of VkPhysicalDeviceExternalImageFormatInfoKHR in the pNext chain, with a handleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00990)~^~ VALIDATION_ERROR_09e007be~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-pNext-00991~^~(VK_NV_external_memory+VK_NV_external_memory_capabilities)~^~The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesNV::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV with format, imageType, tiling, usage, and flags equal to those in this structure, and with externalHandleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00991)~^~ VALIDATION_ERROR_09e007c0~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-flags-00992~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_BIND_SFR_BIT_KHX, then mipLevels must be one, arrayLayers must be one, imageType must be VK_IMAGE_TYPE_2D, and tiling must be VK_IMAGE_TILING_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-00992)~^~ -VALIDATION_ERROR_09e007c2~^~N~^~Unknown~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-00993~^~core~^~The spec valid usage text states 'initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-00993)~^~ +VALIDATION_ERROR_09e007c2~^~Y~^~ImageCreateInfoStructErrors~^~vkCreateImage~^~VUID-VkImageCreateInfo-initialLayout-00993~^~core~^~The spec valid usage text states 'initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-initialLayout-00993)~^~ VALIDATION_ERROR_09e00ae0~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-sharingMode-01392~^~!(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01392)~^~ VALIDATION_ERROR_09e00b18~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-sharingMode-01420~^~(VK_KHR_get_physical_device_properties2)~^~The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01420)~^~ VALIDATION_ERROR_09e00b1a~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-physicalDeviceCount-01421~^~(VK_KHX_device_group)~^~The spec valid usage text states 'If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_IMAGE_CREATE_BIND_SFR_BIT_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-physicalDeviceCount-01421)~^~ -VALIDATION_ERROR_09e00b46~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-pNext-01443~^~(VK_KHR_external_memory,VK_NV_external_memory)~^~The spec valid usage text states 'If the pNext chain includes a' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)~^~ -VALIDATION_ERROR_09e00bfa~^~N~^~None~^~VkImageCreateInfo~^~VUID-VkImageCreateInfo-flags-01533~^~(VK_KHR_external_memory,VK_NV_external_memory)+(VK_KHR_external_memory[VkExternalMemoryImageCreateInfoKHRVkExternalMemoryImageCreateInfoKHRVkExternalMemoryImageCreateInfoKHRVkExternalMemoryImageCreateInfoKHRVkExternalMemoryImageCreateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHRVkMemoryDedicatedAllocateInfoKHR validation_error_map{ - {VALIDATION_ERROR_00000009, "The spec valid usage text states 'Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-commonparent)"}, - {VALIDATION_ERROR_00000a10, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01288)"}, - {VALIDATION_ERROR_00000a12, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-01289)"}, - {VALIDATION_ERROR_00000a14, "The spec valid usage text states 'deviceMask must be a valid device mask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01290)"}, - {VALIDATION_ERROR_00000a16, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01291)"}, - {VALIDATION_ERROR_00000d16, "The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-01675)"}, - {VALIDATION_ERROR_00008801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-parameter)"}, - {VALIDATION_ERROR_0001c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-pNext-pNext)"}, - {VALIDATION_ERROR_0002b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_0002b801, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-parameter)"}, - {VALIDATION_ERROR_0002f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-parameter)"}, - {VALIDATION_ERROR_002004f0, "The spec valid usage text states 'pfnAllocation must be a pointer to a valid user-defined PFN_vkAllocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnAllocation-00632)"}, - {VALIDATION_ERROR_002004f2, "The spec valid usage text states 'pfnReallocation must be a pointer to a valid user-defined PFN_vkReallocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnReallocation-00633)"}, - {VALIDATION_ERROR_002004f4, "The spec valid usage text states 'pfnFree must be a pointer to a valid user-defined PFN_vkFreeFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnFree-00634)"}, + {VALIDATION_ERROR_00000009, "The spec valid usage text states 'Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-commonparent)"}, + {VALIDATION_ERROR_00000a10, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01288)"}, + {VALIDATION_ERROR_00000a12, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-01289)"}, + {VALIDATION_ERROR_00000a14, "The spec valid usage text states 'deviceMask must be a valid device mask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01290)"}, + {VALIDATION_ERROR_00000a16, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-deviceMask-01291)"}, + {VALIDATION_ERROR_00000d16, "The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-01675)"}, + {VALIDATION_ERROR_00000dea, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01781)"}, + {VALIDATION_ERROR_00000dec, "The spec valid usage text states 'semaphore and fence must not both be equal to VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01782)"}, + {VALIDATION_ERROR_00000e18, "The spec valid usage text states 'semaphore and fence must not both be equal to VK_NULL_HANDLE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-01804)"}, + {VALIDATION_ERROR_00008801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-fence-parameter)"}, + {VALIDATION_ERROR_0001c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-pNext-pNext)"}, + {VALIDATION_ERROR_0002b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_0002b801, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-semaphore-parameter)"}, + {VALIDATION_ERROR_0002f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAcquireNextImageInfoKHX-swapchain-parameter)"}, + {VALIDATION_ERROR_002004f0, "The spec valid usage text states 'pfnAllocation must be a valid pointer to a valid user-defined PFN_vkAllocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnAllocation-00632)"}, + {VALIDATION_ERROR_002004f2, "The spec valid usage text states 'pfnReallocation must be a valid pointer to a valid user-defined PFN_vkReallocationFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnReallocation-00633)"}, + {VALIDATION_ERROR_002004f4, "The spec valid usage text states 'pfnFree must be a valid pointer to a valid user-defined PFN_vkFreeFunction' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnFree-00634)"}, {VALIDATION_ERROR_002004f6, "The spec valid usage text states 'If either of pfnInternalAllocation or pfnInternalFree is not NULL, both must be valid callbacks' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAllocationCallbacks-pfnInternalAllocation-00635)"}, - {VALIDATION_ERROR_004009c0, "The spec valid usage text states 'window must point to a valid Android ANativeWindow.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-window-01248)"}, - {VALIDATION_ERROR_00409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_0041c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0042b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_004009c0, "The spec valid usage text states 'window must point to a valid Android ANativeWindow.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-window-01248)"}, + {VALIDATION_ERROR_00409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_0041c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0042b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType)"}, {VALIDATION_ERROR_0060f001, "The spec valid usage text states 'If pApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pApplicationName-parameter)"}, {VALIDATION_ERROR_00615c01, "The spec valid usage text states 'If pEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pEngineName-parameter)"}, {VALIDATION_ERROR_0061c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkApplicationInfo-pNext-pNext)"}, @@ -3737,30 +3918,30 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0082e401, "The spec valid usage text states 'storeOp must be a valid VkAttachmentStoreOp value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentDescription-storeOp-parameter)"}, {VALIDATION_ERROR_00a006b2, "The spec valid usage text states 'layout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentReference-layout-00857)"}, {VALIDATION_ERROR_00a0be01, "The spec valid usage text states 'layout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentReference-layout-parameter)"}, - {VALIDATION_ERROR_00c00009, "The spec valid usage text states 'Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-commonparent)"}, + {VALIDATION_ERROR_00c00009, "The spec valid usage text states 'Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-commonparent)"}, {VALIDATION_ERROR_00c00820, "The spec valid usage text states 'All valid usage rules from vkBindBufferMemory apply to the identically named members of VkBindBufferMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-None-01040)"}, {VALIDATION_ERROR_00c00822, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-deviceIndexCount-01041)"}, {VALIDATION_ERROR_00c00824, "The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-01042)"}, {VALIDATION_ERROR_00c00826, "The spec valid usage text states 'All instances of memory that are bound to must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-None-01043)"}, - {VALIDATION_ERROR_00c00c72, "The spec valid usage text states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01593)"}, - {VALIDATION_ERROR_00c00c74, "The spec valid usage text states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01594)"}, - {VALIDATION_ERROR_00c00c76, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595)"}, - {VALIDATION_ERROR_00c00c78, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01596)"}, - {VALIDATION_ERROR_00c00c7a, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01597)"}, - {VALIDATION_ERROR_00c00c7c, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01598)"}, - {VALIDATION_ERROR_00c00c7e, "The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-01599)"}, - {VALIDATION_ERROR_00c00c80, "The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600)"}, - {VALIDATION_ERROR_00c00c82, "The spec valid usage text states 'The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-size-01601)"}, + {VALIDATION_ERROR_00c00c72, "The spec valid usage text states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01593)"}, + {VALIDATION_ERROR_00c00c74, "The spec valid usage text states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01594)"}, + {VALIDATION_ERROR_00c00c76, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595)"}, + {VALIDATION_ERROR_00c00c78, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01596)"}, + {VALIDATION_ERROR_00c00c7a, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01597)"}, + {VALIDATION_ERROR_00c00c7c, "The spec valid usage text states 'If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01598)"}, + {VALIDATION_ERROR_00c00c7e, "The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-01599)"}, + {VALIDATION_ERROR_00c00c80, "The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600)"}, + {VALIDATION_ERROR_00c00c82, "The spec valid usage text states 'The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-size-01601)"}, {VALIDATION_ERROR_00c00c84, "The spec valid usage text states 'If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01602)"}, {VALIDATION_ERROR_00c00c86, "The spec valid usage text states 'If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01603)"}, {VALIDATION_ERROR_00c00c88, "The spec valid usage text states 'If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-01604)"}, {VALIDATION_ERROR_00c00c8a, "The spec valid usage text states 'If the pNext chain includes VkBindBufferMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindBufferMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-01605)"}, - {VALIDATION_ERROR_00c01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-parameter)"}, - {VALIDATION_ERROR_00c0c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-parameter)"}, + {VALIDATION_ERROR_00c01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-buffer-parameter)"}, + {VALIDATION_ERROR_00c0c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-memory-parameter)"}, {VALIDATION_ERROR_00c13e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pDeviceIndices-parameter)"}, - {VALIDATION_ERROR_00c1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_00c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_00e00009, "The spec valid usage text states 'Both of image, and memory that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-commonparent)"}, + {VALIDATION_ERROR_00c1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_00c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_00e00009, "The spec valid usage text states 'Both of image, and memory that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-commonparent)"}, {VALIDATION_ERROR_00e00838, "The spec valid usage text states 'All valid usage rules from vkBindImageMemory apply to the identically named members of VkBindImageMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-None-01052)"}, {VALIDATION_ERROR_00e0083a, "The spec valid usage text states 'At least one of deviceIndexCount and SFRRectCount must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01053)"}, {VALIDATION_ERROR_00e0083c, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-deviceIndexCount-01054)"}, @@ -3775,9 +3956,9 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_00e00850, "The spec valid usage text states 'For each element of pSFRRects, extent.height must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else (extent.height + offset.y) must equal the height of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-extent-01064)"}, {VALIDATION_ERROR_00e00852, "The spec valid usage text states 'All instances of memory that are bound must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-None-01065)"}, {VALIDATION_ERROR_00e00854, "The spec valid usage text states 'If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the image must be bound to memory from that swapchain (using VkBindImageMemorySwapchainInfoKHX).' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01066)"}, - {VALIDATION_ERROR_00e00c92, "The spec valid usage text states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01609)"}, - {VALIDATION_ERROR_00e00c94, "The spec valid usage text states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01610)"}, - {VALIDATION_ERROR_00e00c96, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611)"}, + {VALIDATION_ERROR_00e00c92, "The spec valid usage text states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01609)"}, + {VALIDATION_ERROR_00e00c94, "The spec valid usage text states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01610)"}, + {VALIDATION_ERROR_00e00c96, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611)"}, {VALIDATION_ERROR_00e00c98, "The spec valid usage text states 'memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01612)"}, {VALIDATION_ERROR_00e00c9a, "The spec valid usage text states 'memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613)"}, {VALIDATION_ERROR_00e00c9c, "The spec valid usage text states 'The difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the same image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-01614)"}, @@ -3795,39 +3976,39 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_00e00cb4, "The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindImageMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01626)"}, {VALIDATION_ERROR_00e00cb6, "The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, and VkBindImageMemoryDeviceGroupInfoKHX::SFRRectCount is not zero, then image must have been created with the VK_IMAGE_CREATE_BIND_SFR_BIT_KHX bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01627)"}, {VALIDATION_ERROR_00e00cb8, "The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects must be valid rectangles contained within the dimensions of image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01628)"}, - {VALIDATION_ERROR_00e00cba, "The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects that correspond to the same instance of pname: image must cover the entire image.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01629)"}, + {VALIDATION_ERROR_00e00cba, "The spec valid usage text states 'If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects that correspond to the same instance of image must cover the entire image.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01629)"}, {VALIDATION_ERROR_00e00cbc, "The spec valid usage text states 'If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the pNext chain must include a valid instance of VkBindImageMemorySwapchainInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-01630)"}, {VALIDATION_ERROR_00e00cbe, "The spec valid usage text states 'If the pNext chain includes an instance of VkBindImageMemorySwapchainInfoKHX, memory must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01631)"}, {VALIDATION_ERROR_00e00cc0, "The spec valid usage text states 'If the pNext chain does not include an instance of VkBindImageMemorySwapchainInfoKHX, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-01632)"}, - {VALIDATION_ERROR_00e0a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-parameter)"}, + {VALIDATION_ERROR_00e0a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-image-parameter)"}, {VALIDATION_ERROR_00e0c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-memory-parameter)"}, {VALIDATION_ERROR_00e13e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pDeviceIndices-parameter)"}, - {VALIDATION_ERROR_00e1c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfoKHX, VkBindImageMemorySwapchainInfoKHX, or VkBindImagePlaneMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_00e1c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfoKHX, VkBindImageMemorySwapchainInfoKHX, or VkBindImagePlaneMemoryInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pNext-pNext)"}, {VALIDATION_ERROR_00e22001, "The spec valid usage text states 'If SFRRectCount is not 0, pSFRRects must be a pointer to an array of SFRRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-pSFRRects-parameter)"}, - {VALIDATION_ERROR_00e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_00e2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-unique)"}, + {VALIDATION_ERROR_00e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_00e2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryInfoKHR-sType-unique)"}, {VALIDATION_ERROR_01000856, "The spec valid usage text states 'At least one of swapchain and VkBindImageMemoryInfoKHR::memory must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-01067)"}, {VALIDATION_ERROR_01000858, "The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01068)"}, - {VALIDATION_ERROR_01000cd8, "The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644)"}, - {VALIDATION_ERROR_0102b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_0102f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter)"}, + {VALIDATION_ERROR_01000cd8, "The spec valid usage text states 'imageIndex must be less than the number of images in swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644)"}, + {VALIDATION_ERROR_0102b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_0102f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter)"}, {VALIDATION_ERROR_01200009, "The spec valid usage text states 'Both of the elements of pSignalSemaphores, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-commonparent)"}, - {VALIDATION_ERROR_01210201, "The spec valid usage text states 'If bufferBindCount is not 0, pBufferBinds must be a pointer to an array of bufferBindCount valid VkSparseBufferMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pBufferBinds-parameter)"}, - {VALIDATION_ERROR_01218001, "The spec valid usage text states 'If imageBindCount is not 0, pImageBinds must be a pointer to an array of imageBindCount valid VkSparseImageMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageBinds-parameter)"}, - {VALIDATION_ERROR_01218c01, "The spec valid usage text states 'If imageOpaqueBindCount is not 0, pImageOpaqueBinds must be a pointer to an array of imageOpaqueBindCount valid VkSparseImageOpaqueMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter)"}, + {VALIDATION_ERROR_01210201, "The spec valid usage text states 'If bufferBindCount is not 0, pBufferBinds must be a valid pointer to an array of bufferBindCount valid VkSparseBufferMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pBufferBinds-parameter)"}, + {VALIDATION_ERROR_01218001, "The spec valid usage text states 'If imageBindCount is not 0, pImageBinds must be a valid pointer to an array of imageBindCount valid VkSparseImageMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageBinds-parameter)"}, + {VALIDATION_ERROR_01218c01, "The spec valid usage text states 'If imageOpaqueBindCount is not 0, pImageOpaqueBinds must be a valid pointer to an array of imageOpaqueBindCount valid VkSparseImageOpaqueMemoryBindInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter)"}, {VALIDATION_ERROR_0121c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkDeviceGroupBindSparseInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pNext-pNext)"}, - {VALIDATION_ERROR_01223401, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pSignalSemaphores-parameter)"}, - {VALIDATION_ERROR_01227601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pWaitSemaphores-parameter)"}, + {VALIDATION_ERROR_01223401, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a valid pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pSignalSemaphores-parameter)"}, + {VALIDATION_ERROR_01227601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-pWaitSemaphores-parameter)"}, {VALIDATION_ERROR_0122b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindSparseInfo-sType-sType)"}, {VALIDATION_ERROR_01400720, "The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-size-00912)"}, - {VALIDATION_ERROR_01400722, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00913)"}, + {VALIDATION_ERROR_01400722, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00913)"}, {VALIDATION_ERROR_01400724, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00914)"}, {VALIDATION_ERROR_01400726, "The spec valid usage text states 'If the sparse bindings feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00915)"}, {VALIDATION_ERROR_01400728, "The spec valid usage text states 'If the sparse buffer residency feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00916)"}, {VALIDATION_ERROR_0140072a, "The spec valid usage text states 'If the sparse aliased residency feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00917)"}, {VALIDATION_ERROR_0140072c, "The spec valid usage text states 'If flags contains VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-flags-00918)"}, {VALIDATION_ERROR_0140072e, "The spec valid usage text states 'If any of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes requires dedicated allocation, as reported by vkGetPhysicalDeviceExternalBufferPropertiesKHR in VkExternalBufferPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of VkDedicatedAllocationBufferCreateInfoNV with its dedicatedAllocation field set to VK_TRUE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-handleTypes-00919)"}, - {VALIDATION_ERROR_01400730, "The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryBufferCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalBufferPropertiesKHR::externalMemoryProperties.pname:compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferPropertiesKHR with pExternalBufferInfo->handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-00920)"}, + {VALIDATION_ERROR_01400730, "The spec valid usage text states 'If the pNext chain contains an instance of VkExternalMemoryBufferCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalBufferPropertiesKHR::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferPropertiesKHR with pExternalBufferInfo-&gt;handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfoKHR::handleTypes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-00920)"}, {VALIDATION_ERROR_01400ade, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-01391)"}, {VALIDATION_ERROR_01400b16, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-01419)"}, {VALIDATION_ERROR_01400c46, "The spec valid usage text states 'If the pNext chain contains an instance of VkDedicatedAllocationBufferCreateInfoNV, and the dedicatedAllocation member of the chained structure is VK_TRUE, then flags must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-pNext-01571)"}, @@ -3838,7 +4019,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0142c001, "The spec valid usage text states 'sharingMode must be a valid VkSharingMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-parameter)"}, {VALIDATION_ERROR_01430601, "The spec valid usage text states 'usage must be a valid combination of VkBufferUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-usage-parameter)"}, {VALIDATION_ERROR_01430603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferCreateInfo-usage-requiredbitmask)"}, - {VALIDATION_ERROR_01600182, "The spec valid usage text states 'If the the calling command's VkImage parameter's format is not a depth/stencil format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00193)"}, + {VALIDATION_ERROR_01600182, "The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00193)"}, {VALIDATION_ERROR_01600184, "The spec valid usage text states 'bufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00194)"}, {VALIDATION_ERROR_01600186, "The spec valid usage text states 'bufferRowLength must be 0, or greater than or equal to the width member of imageExtent' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00195)"}, {VALIDATION_ERROR_01600188, "The spec valid usage text states 'bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00196)"}, @@ -3847,33 +4028,43 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0160018e, "The spec valid usage text states 'If the calling command's srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D, then imageOffset.y must be 0 and imageExtent.height must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-srcImage-00199)"}, {VALIDATION_ERROR_01600190, "The spec valid usage text states 'imageOffset.z and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00200)"}, {VALIDATION_ERROR_01600192, "The spec valid usage text states 'If the calling command's srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then imageOffset.z must be 0 and imageExtent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-srcImage-00201)"}, - {VALIDATION_ERROR_01600196, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00203)"}, - {VALIDATION_ERROR_01600198, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00204)"}, - {VALIDATION_ERROR_0160019a, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00205)"}, - {VALIDATION_ERROR_0160019c, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00206)"}, - {VALIDATION_ERROR_0160019e, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00207)"}, - {VALIDATION_ERROR_016001a0, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00208)"}, - {VALIDATION_ERROR_016001a2, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00209)"}, + {VALIDATION_ERROR_01600196, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferRowLength must be a multiple of the compressed texel block width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferRowLength-00203)"}, + {VALIDATION_ERROR_01600198, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferImageHeight must be a multiple of the compressed texel block height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferImageHeight-00204)"}, + {VALIDATION_ERROR_0160019a, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageOffset-00205)"}, + {VALIDATION_ERROR_0160019c, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, bufferOffset must be a multiple of the compressed texel block size in bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00206)"}, + {VALIDATION_ERROR_0160019e, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00207)"}, + {VALIDATION_ERROR_016001a0, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00208)"}, + {VALIDATION_ERROR_016001a2, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageExtent-00209)"}, {VALIDATION_ERROR_016001a4, "The spec valid usage text states 'bufferOffset, bufferRowLength, bufferImageHeight and all members of imageOffset and imageExtent must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-00210)"}, {VALIDATION_ERROR_016001a6, "The spec valid usage text states 'The aspectMask member of imageSubresource must specify aspects present in the calling command's VkImage parameter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-00211)"}, {VALIDATION_ERROR_016001a8, "The spec valid usage text states 'The aspectMask member of imageSubresource must only have a single bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-00212)"}, {VALIDATION_ERROR_016001aa, "The spec valid usage text states 'If the calling command's VkImage parameter is of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of imageSubresource must be 0 and 1, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-baseArrayLayer-00213)"}, {VALIDATION_ERROR_016001ac, "The spec valid usage text states 'When copying to the depth aspect of an image subresource, the data in the source buffer must be in the range [0,1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-None-00214)"}, - {VALIDATION_ERROR_01600c2c, "The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format or a multi-planar format,cthen bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01558)"}, - {VALIDATION_ERROR_01600c2e, "The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in Compatible formats of planes of multi-planar formats' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01559)"}, + {VALIDATION_ERROR_01600c2c, "The spec valid usage text states 'If the calling command's VkImage parameter's format is not a depth/stencil format or a multi-planar format, then bufferOffset must be a multiple of the format's element size' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01558)"}, + {VALIDATION_ERROR_01600c2e, "The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in features-formats-compatible-planes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-bufferOffset-01559)"}, {VALIDATION_ERROR_01600c30, "The spec valid usage text states 'If the calling command's VkImage parameter's format is a multi-planar format, then the aspectMask member of imageSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR (with VK_IMAGE_ASPECT_PLANE_2_BIT_KHR valid only for image formats with three planes)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-aspectMask-01560)"}, + {VALIDATION_ERROR_01600d8e, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, bufferRowLength must be a multiple of the compressed texel block width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01735)"}, + {VALIDATION_ERROR_01600d90, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, bufferImageHeight must be a multiple of the compressed texel block height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01736)"}, + {VALIDATION_ERROR_01600d92, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01737)"}, + {VALIDATION_ERROR_01600d94, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, bufferOffset must be a multiple of the compressed texel block size in bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01738)"}, + {VALIDATION_ERROR_01600d96, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01739)"}, + {VALIDATION_ERROR_01600d98, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01740)"}, + {VALIDATION_ERROR_01600d9a, "The spec valid usage text states 'If the calling command's VkImage parameter is a compressed image, or a single-plane, \"_422\" image format, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferImageCopy-None-01741)"}, {VALIDATION_ERROR_0160aa01, "The spec valid usage text states 'imageSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferImageCopy-imageSubresource-parameter)"}, {VALIDATION_ERROR_01800946, "The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-offset-01187)"}, {VALIDATION_ERROR_01800948, "The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-size-01188)"}, {VALIDATION_ERROR_0180094a, "The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-size-01189)"}, {VALIDATION_ERROR_0180094c, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01190)"}, {VALIDATION_ERROR_0180094e, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01191)"}, - {VALIDATION_ERROR_01800950, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01192)"}, + {VALIDATION_ERROR_01800950, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see devsandqueues-queueprops)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01192)"}, {VALIDATION_ERROR_01800952, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01193)"}, {VALIDATION_ERROR_01800954, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01194)"}, {VALIDATION_ERROR_01800956, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01195)"}, {VALIDATION_ERROR_01800958, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01196)"}, {VALIDATION_ERROR_01800ac8, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01380)"}, + {VALIDATION_ERROR_01800dc6, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory ownership transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01763)"}, + {VALIDATION_ERROR_01800dc8, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01764)"}, + {VALIDATION_ERROR_01800dca, "The spec valid usage text states 'If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-01765)"}, {VALIDATION_ERROR_01801a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-buffer-parameter)"}, {VALIDATION_ERROR_01806801, "The spec valid usage text states 'dstAccessMask must be a valid combination of VkAccessFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-dstAccessMask-parameter)"}, {VALIDATION_ERROR_0181c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryBarrier-pNext-pNext)"}, @@ -3899,34 +4090,34 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_01c0002a, "The spec valid usage text states 'clearValue must be a valid VkClearValue union' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-clearValue-00021)"}, {VALIDATION_ERROR_01c00c01, "The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-aspectMask-parameter)"}, {VALIDATION_ERROR_01c00c03, "The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearAttachment-aspectMask-requiredbitmask)"}, - {VALIDATION_ERROR_01e0002c, "The spec valid usage text states 'depth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearDepthStencilValue-depth-00022)"}, + {VALIDATION_ERROR_01e0002c, "The spec valid usage text states 'Unless the VK_EXT_depth_range_unrestricted extension is enabled depth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkClearDepthStencilValue-depth-00022)"}, {VALIDATION_ERROR_0200002e, "The spec valid usage text states 'depthStencil must be a valid VkClearDepthStencilValue structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkClearValue-depthStencil-00023)"}, - {VALIDATION_ERROR_02200009, "The spec valid usage text states 'Each of indirectCommandsLayout, objectTable, sequencesCountBuffer, sequencesIndexBuffer, and targetCommandBuffer that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-commonparent)"}, - {VALIDATION_ERROR_02200a66, "The spec valid usage text states 'The provided objectTable must include all objects referenced by the generation process.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331)"}, - {VALIDATION_ERROR_02200a68, "The spec valid usage text states 'indirectCommandsTokenCount must match the indirectCommandsLayout's tokenCount.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332)"}, - {VALIDATION_ERROR_02200a6a, "The spec valid usage text states 'The tokenType member of each entry in the pIndirectCommandsTokens array must match the values used at creation time of indirectCommandsLayout' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333)"}, - {VALIDATION_ERROR_02200a6c, "The spec valid usage text states 'If targetCommandBuffer is provided, it must have reserved command space.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334)"}, - {VALIDATION_ERROR_02200a6e, "The spec valid usage text states 'If targetCommandBuffer is provided, the objectTable must match the reservation's objectTable and must have had all referenced objects registered at reservation time.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335)"}, - {VALIDATION_ERROR_02200a70, "The spec valid usage text states 'If targetCommandBuffer is provided, the indirectCommandsLayout must match the reservation's indirectCommandsLayout.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336)"}, - {VALIDATION_ERROR_02200a72, "The spec valid usage text states 'If targetCommandBuffer is provided, the maxSequencesCount must not exceed the reservation's maxSequencesCount.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337)"}, - {VALIDATION_ERROR_02200a74, "The spec valid usage text states 'If sequencesCountBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338)"}, - {VALIDATION_ERROR_02200a76, "The spec valid usage text states 'If sequencesCountBuffer is used, sequencesCountOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceCountBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339)"}, - {VALIDATION_ERROR_02200a78, "The spec valid usage text states 'If sequencesIndexBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340)"}, - {VALIDATION_ERROR_02200a7a, "The spec valid usage text states 'If sequencesIndexBuffer is used, sequencesIndexOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceIndexBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341)"}, - {VALIDATION_ERROR_0220b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter)"}, - {VALIDATION_ERROR_0220b61b, "The spec valid usage text states 'indirectCommandsTokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength)"}, - {VALIDATION_ERROR_0220d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter)"}, - {VALIDATION_ERROR_02219401, "The spec valid usage text states 'pIndirectCommandsTokens must be a pointer to an array of indirectCommandsTokenCount valid VkIndirectCommandsTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter)"}, - {VALIDATION_ERROR_0221c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext)"}, - {VALIDATION_ERROR_0222b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sType-sType)"}, - {VALIDATION_ERROR_0222ba01, "The spec valid usage text states 'If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter)"}, - {VALIDATION_ERROR_0222bc01, "The spec valid usage text states 'If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter)"}, - {VALIDATION_ERROR_0222f601, "The spec valid usage text states 'If targetCommandBuffer is not NULL, targetCommandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter)"}, - {VALIDATION_ERROR_02400009, "The spec valid usage text states 'Both of indirectCommandsLayout, and objectTable must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent)"}, - {VALIDATION_ERROR_0240b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter)"}, - {VALIDATION_ERROR_0240d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter)"}, - {VALIDATION_ERROR_0241c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext)"}, - {VALIDATION_ERROR_0242b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType)"}, + {VALIDATION_ERROR_02200009, "The spec valid usage text states 'Each of indirectCommandsLayout, objectTable, sequencesCountBuffer, sequencesIndexBuffer, and targetCommandBuffer that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-commonparent)"}, + {VALIDATION_ERROR_02200a66, "The spec valid usage text states 'The provided objectTable must include all objects referenced by the generation process.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331)"}, + {VALIDATION_ERROR_02200a68, "The spec valid usage text states 'indirectCommandsTokenCount must match the indirectCommandsLayout's tokenCount.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332)"}, + {VALIDATION_ERROR_02200a6a, "The spec valid usage text states 'The tokenType member of each entry in the pIndirectCommandsTokens array must match the values used at creation time of indirectCommandsLayout' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333)"}, + {VALIDATION_ERROR_02200a6c, "The spec valid usage text states 'If targetCommandBuffer is provided, it must have reserved command space.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334)"}, + {VALIDATION_ERROR_02200a6e, "The spec valid usage text states 'If targetCommandBuffer is provided, the objectTable must match the reservation's objectTable and must have had all referenced objects registered at reservation time.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335)"}, + {VALIDATION_ERROR_02200a70, "The spec valid usage text states 'If targetCommandBuffer is provided, the indirectCommandsLayout must match the reservation's indirectCommandsLayout.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336)"}, + {VALIDATION_ERROR_02200a72, "The spec valid usage text states 'If targetCommandBuffer is provided, the maxSequencesCount must not exceed the reservation's maxSequencesCount.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337)"}, + {VALIDATION_ERROR_02200a74, "The spec valid usage text states 'If sequencesCountBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338)"}, + {VALIDATION_ERROR_02200a76, "The spec valid usage text states 'If sequencesCountBuffer is used, sequencesCountOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceCountBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339)"}, + {VALIDATION_ERROR_02200a78, "The spec valid usage text states 'If sequencesIndexBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340)"}, + {VALIDATION_ERROR_02200a7a, "The spec valid usage text states 'If sequencesIndexBuffer is used, sequencesIndexOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceIndexBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341)"}, + {VALIDATION_ERROR_0220b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter)"}, + {VALIDATION_ERROR_0220b61b, "The spec valid usage text states 'indirectCommandsTokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength)"}, + {VALIDATION_ERROR_0220d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter)"}, + {VALIDATION_ERROR_02219401, "The spec valid usage text states 'pIndirectCommandsTokens must be a valid pointer to an array of indirectCommandsTokenCount valid VkIndirectCommandsTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter)"}, + {VALIDATION_ERROR_0221c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext)"}, + {VALIDATION_ERROR_0222b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sType-sType)"}, + {VALIDATION_ERROR_0222ba01, "The spec valid usage text states 'If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter)"}, + {VALIDATION_ERROR_0222bc01, "The spec valid usage text states 'If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter)"}, + {VALIDATION_ERROR_0222f601, "The spec valid usage text states 'If targetCommandBuffer is not NULL, targetCommandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter)"}, + {VALIDATION_ERROR_02400009, "The spec valid usage text states 'Both of indirectCommandsLayout, and objectTable must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent)"}, + {VALIDATION_ERROR_0240b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter)"}, + {VALIDATION_ERROR_0240d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter)"}, + {VALIDATION_ERROR_0241c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext)"}, + {VALIDATION_ERROR_0242b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType)"}, {VALIDATION_ERROR_02600058, "The spec valid usage text states 'commandBufferCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-commandBufferCount-00044)"}, {VALIDATION_ERROR_02602801, "The spec valid usage text states 'commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-commandPool-parameter)"}, {VALIDATION_ERROR_0260c001, "The spec valid usage text states 'level must be a valid VkCommandBufferLevel value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCommandBufferAllocateInfo-level-parameter)"}, @@ -3960,6 +4151,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0300057a, "The spec valid usage text states 'The stage member of stage must be VK_SHADER_STAGE_COMPUTE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-00701)"}, {VALIDATION_ERROR_0300057c, "The spec valid usage text states 'The shader code for the entry point identified by stage and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-00702)"}, {VALIDATION_ERROR_0300057e, "The spec valid usage text states 'layout must be consistent with the layout of the compute shader specified in stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-00703)"}, + {VALIDATION_ERROR_03000d2e, "The spec valid usage text states 'The number of resources in layout accessible to the compute shader stage must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-01687)"}, {VALIDATION_ERROR_03009001, "The spec valid usage text states 'flags must be a valid combination of VkPipelineCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-flags-parameter)"}, {VALIDATION_ERROR_0300be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-layout-parameter)"}, {VALIDATION_ERROR_0301c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-pNext-pNext)"}, @@ -3967,58 +4159,58 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0302d801, "The spec valid usage text states 'stage must be a valid VkPipelineShaderStageCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkComputePipelineCreateInfo-stage-parameter)"}, {VALIDATION_ERROR_03200009, "The spec valid usage text states 'Both of dstSet, and srcSet must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-commonparent)"}, {VALIDATION_ERROR_032002b2, "The spec valid usage text states 'srcBinding must be a valid binding within srcSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcBinding-00345)"}, - {VALIDATION_ERROR_032002b4, "The spec valid usage text states 'The sum of srcArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by srcBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcArrayElement-00346)"}, + {VALIDATION_ERROR_032002b4, "The spec valid usage text states 'The sum of srcArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by srcBinding, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcArrayElement-00346)"}, {VALIDATION_ERROR_032002b6, "The spec valid usage text states 'dstBinding must be a valid binding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstBinding-00347)"}, - {VALIDATION_ERROR_032002b8, "The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstArrayElement-00348)"}, - {VALIDATION_ERROR_032002ba, "The spec valid usage text states 'If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-00349)"}, + {VALIDATION_ERROR_032002b8, "The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstArrayElement-00348)"}, + {VALIDATION_ERROR_032002ba, "The spec valid usage text states 'If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-00349)"}, {VALIDATION_ERROR_03207601, "The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-dstSet-parameter)"}, {VALIDATION_ERROR_0321c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-pNext-pNext)"}, {VALIDATION_ERROR_0322b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-sType-sType)"}, {VALIDATION_ERROR_0322d201, "The spec valid usage text states 'srcSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkCopyDescriptorSet-srcSet-parameter)"}, - {VALIDATION_ERROR_0340009e, "The spec valid usage text states 'waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079)"}, - {VALIDATION_ERROR_034000a0, "The spec valid usage text states 'signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080)"}, - {VALIDATION_ERROR_03423201, "The spec valid usage text states 'If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a pointer to an array of signalSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter)"}, - {VALIDATION_ERROR_03427401, "The spec valid usage text states 'If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a pointer to an array of waitSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter)"}, - {VALIDATION_ERROR_0342b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0361a801, "The spec valid usage text states 'pMarkerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter)"}, - {VALIDATION_ERROR_0361c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0362b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_03800ba4, "The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490)"}, - {VALIDATION_ERROR_03800ba6, "The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01491)"}, - {VALIDATION_ERROR_03800ba8, "The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01492)"}, - {VALIDATION_ERROR_0380da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter)"}, - {VALIDATION_ERROR_0381c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0381ce01, "The spec valid usage text states 'pObjectName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter)"}, - {VALIDATION_ERROR_0382b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_03a00baa, "The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493)"}, - {VALIDATION_ERROR_03a00bac, "The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01494)"}, - {VALIDATION_ERROR_03a00bae, "The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01495)"}, - {VALIDATION_ERROR_03a0da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter)"}, - {VALIDATION_ERROR_03a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_03a25a01, "The spec valid usage text states 'pTag must be a pointer to an array of tagSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter)"}, - {VALIDATION_ERROR_03a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_03a2f41b, "The spec valid usage text states 'tagSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength)"}, - {VALIDATION_ERROR_03c00ad2, "The spec valid usage text states 'pfnCallback must be a valid PFN_vkDebugReportCallbackEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385)"}, + {VALIDATION_ERROR_0340009e, "The spec valid usage text states 'waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079)"}, + {VALIDATION_ERROR_034000a0, "The spec valid usage text states 'signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080)"}, + {VALIDATION_ERROR_03423201, "The spec valid usage text states 'If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a valid pointer to an array of signalSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter)"}, + {VALIDATION_ERROR_03427401, "The spec valid usage text states 'If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a valid pointer to an array of waitSemaphoreValuesCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter)"}, + {VALIDATION_ERROR_0342b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkD3D12FenceSubmitInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0361a801, "The spec valid usage text states 'pMarkerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter)"}, + {VALIDATION_ERROR_0361c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0362b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerMarkerInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_03800ba4, "The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490)"}, + {VALIDATION_ERROR_03800ba6, "The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01491)"}, + {VALIDATION_ERROR_03800ba8, "The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in debug-report-object-types.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-object-01492)"}, + {VALIDATION_ERROR_0380da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter)"}, + {VALIDATION_ERROR_0381c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0381ce01, "The spec valid usage text states 'pObjectName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter)"}, + {VALIDATION_ERROR_0382b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_03a00baa, "The spec valid usage text states 'objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493)"}, + {VALIDATION_ERROR_03a00bac, "The spec valid usage text states 'object must not be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01494)"}, + {VALIDATION_ERROR_03a00bae, "The spec valid usage text states 'object must be a Vulkan object of the type associated with objectType as defined in debug-report-object-types.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-object-01495)"}, + {VALIDATION_ERROR_03a0da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter)"}, + {VALIDATION_ERROR_03a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_03a25a01, "The spec valid usage text states 'pTag must be a valid pointer to an array of tagSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter)"}, + {VALIDATION_ERROR_03a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_03a2f41b, "The spec valid usage text states 'tagSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength)"}, + {VALIDATION_ERROR_03c00ad2, "The spec valid usage text states 'pfnCallback must be a valid PFN_vkDebugReportCallbackEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385)"}, {VALIDATION_ERROR_03c00bb0, "The spec valid usage text states 'object must be a Vulkan object or VK_NULL_HANDLE.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-object-01496)"}, {VALIDATION_ERROR_03c00bb2, "The spec valid usage text states 'If objectType is not VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and object is not VK_NULL_HANDLE, object must be a Vulkan object of the corresponding type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-objectType-01497)"}, - {VALIDATION_ERROR_03c09001, "The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter)"}, - {VALIDATION_ERROR_03c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_03c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_03c09001, "The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter)"}, + {VALIDATION_ERROR_03c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_03c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType)"}, {VALIDATION_ERROR_03e00732, "The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkBufferCreateInfo::flags must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-dedicatedAllocation-00921)"}, - {VALIDATION_ERROR_03e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_040007c4, "The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkImageCreateInfo::flags must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994)"}, - {VALIDATION_ERROR_0402b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_04200009, "The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent)"}, - {VALIDATION_ERROR_04200512, "The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649)"}, - {VALIDATION_ERROR_04200514, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650)"}, - {VALIDATION_ERROR_04200516, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651)"}, - {VALIDATION_ERROR_04200518, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652)"}, - {VALIDATION_ERROR_0420051a, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653)"}, + {VALIDATION_ERROR_03e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_040007c4, "The spec valid usage text states 'If dedicatedAllocation is VK_TRUE, VkImageCreateInfo::flags must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994)"}, + {VALIDATION_ERROR_0402b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_04200009, "The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent)"}, + {VALIDATION_ERROR_04200512, "The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649)"}, + {VALIDATION_ERROR_04200514, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650)"}, + {VALIDATION_ERROR_04200516, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651)"}, + {VALIDATION_ERROR_04200518, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652)"}, + {VALIDATION_ERROR_0420051a, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653)"}, {VALIDATION_ERROR_0420051c, "The spec valid usage text states 'If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654)"}, {VALIDATION_ERROR_0420051e, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655)"}, - {VALIDATION_ERROR_04201a01, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter)"}, - {VALIDATION_ERROR_0420a001, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter)"}, - {VALIDATION_ERROR_0422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_04201a01, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter)"}, + {VALIDATION_ERROR_0420a001, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter)"}, + {VALIDATION_ERROR_0422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType)"}, {VALIDATION_ERROR_044002a8, "The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-offset-00340)"}, {VALIDATION_ERROR_044002aa, "The spec valid usage text states 'If range is not equal to VK_WHOLE_SIZE, range must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-range-00341)"}, {VALIDATION_ERROR_044002ac, "The spec valid usage text states 'If range is not equal to VK_WHOLE_SIZE, range must be less than or equal to the size of buffer minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorBufferInfo-range-00342)"}, @@ -4031,7 +4223,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0480025a, "The spec valid usage text states 'maxSets must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-maxSets-00301)"}, {VALIDATION_ERROR_04809001, "The spec valid usage text states 'flags must be a valid combination of VkDescriptorPoolCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-flags-parameter)"}, {VALIDATION_ERROR_0481c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_0481e401, "The spec valid usage text states 'pPoolSizes must be a pointer to an array of poolSizeCount valid VkDescriptorPoolSize structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter)"}, + {VALIDATION_ERROR_0481e401, "The spec valid usage text states 'pPoolSizes must be a valid pointer to an array of poolSizeCount valid VkDescriptorPoolSize structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter)"}, {VALIDATION_ERROR_0482881b, "The spec valid usage text states 'poolSizeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength)"}, {VALIDATION_ERROR_0482b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolCreateInfo-sType-sType)"}, {VALIDATION_ERROR_04a0025c, "The spec valid usage text states 'descriptorCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorPoolSize-descriptorCount-00302)"}, @@ -4043,9 +4235,9 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_04c04601, "The spec valid usage text states 'descriptorPool must be a valid VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorPool-parameter)"}, {VALIDATION_ERROR_04c04a1b, "The spec valid usage text states 'descriptorSetCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-arraylength)"}, {VALIDATION_ERROR_04c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_04c22c01, "The spec valid usage text states 'pSetLayouts must be a pointer to an array of descriptorSetCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter)"}, + {VALIDATION_ERROR_04c22c01, "The spec valid usage text states 'pSetLayouts must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter)"}, {VALIDATION_ERROR_04c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetAllocateInfo-sType-sType)"}, - {VALIDATION_ERROR_04e00234, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL, pImmutableSamplers must be a pointer to an array of descriptorCount valid VkSampler handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-00282)"}, + {VALIDATION_ERROR_04e00234, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL, pImmutableSamplers must be a valid pointer to an array of descriptorCount valid VkSampler handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-00282)"}, {VALIDATION_ERROR_04e00236, "The spec valid usage text states 'If descriptorCount is not 0, stageFlags must be a valid combination of VkShaderStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorCount-00283)"}, {VALIDATION_ERROR_04e00bcc, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and descriptorCount is not 0, then stageFlags must be 0 or VK_SHADER_STAGE_FRAGMENT_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-01510)"}, {VALIDATION_ERROR_04e04e01, "The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutBinding-descriptorType-parameter)"}, @@ -4053,161 +4245,161 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_05000230, "The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all elements of pBindings must not have a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00280)"}, {VALIDATION_ERROR_05000232, "The spec valid usage text states 'If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then the total number of elements of all bindings must be less than or equal to VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-00281)"}, {VALIDATION_ERROR_05009001, "The spec valid usage text states 'flags must be a valid combination of VkDescriptorSetLayoutCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-flags-parameter)"}, - {VALIDATION_ERROR_0500fc01, "The spec valid usage text states 'If bindingCount is not 0, pBindings must be a pointer to an array of bindingCount valid VkDescriptorSetLayoutBinding structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter)"}, + {VALIDATION_ERROR_0500fc01, "The spec valid usage text states 'If bindingCount is not 0, pBindings must be a valid pointer to an array of bindingCount valid VkDescriptorSetLayoutBinding structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter)"}, {VALIDATION_ERROR_0501c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0502b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorSetLayoutCreateInfo-sType-sType)"}, - {VALIDATION_ERROR_05200009, "The spec valid usage text states 'Both of descriptorSetLayout, and pipelineLayout that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent)"}, - {VALIDATION_ERROR_052002bc, "The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350)"}, + {VALIDATION_ERROR_05200009, "The spec valid usage text states 'Both of descriptorSetLayout, and pipelineLayout that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent)"}, + {VALIDATION_ERROR_052002bc, "The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350)"}, {VALIDATION_ERROR_052002be, "The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351)"}, {VALIDATION_ERROR_052002c0, "The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352)"}, {VALIDATION_ERROR_052002c2, "The spec valid usage text states 'If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353)"}, - {VALIDATION_ERROR_05204c01, "The spec valid usage text states 'If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter)"}, - {VALIDATION_ERROR_0520501b, "The spec valid usage text states 'descriptorUpdateEntryCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength)"}, - {VALIDATION_ERROR_05209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_05213201, "The spec valid usage text states 'pDescriptorUpdateEntries must be a pointer to an array of descriptorUpdateEntryCount valid VkDescriptorUpdateTemplateEntryKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter)"}, - {VALIDATION_ERROR_0521c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_05227e01, "The spec valid usage text states 'If pipelineBindPoint is not 0, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter)"}, - {VALIDATION_ERROR_05228201, "The spec valid usage text states 'If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter)"}, - {VALIDATION_ERROR_0522b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0522f801, "The spec valid usage text states 'templateType must be a valid VkDescriptorUpdateTemplateTypeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter)"}, - {VALIDATION_ERROR_054002c4, "The spec valid usage text states 'dstBinding must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354)"}, - {VALIDATION_ERROR_054002c6, "The spec valid usage text states 'dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355)"}, - {VALIDATION_ERROR_05404e01, "The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter)"}, + {VALIDATION_ERROR_05204c01, "The spec valid usage text states 'If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter)"}, + {VALIDATION_ERROR_0520501b, "The spec valid usage text states 'descriptorUpdateEntryCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength)"}, + {VALIDATION_ERROR_05209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_05213201, "The spec valid usage text states 'pDescriptorUpdateEntries must be a valid pointer to an array of descriptorUpdateEntryCount valid VkDescriptorUpdateTemplateEntryKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter)"}, + {VALIDATION_ERROR_0521c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_05227e01, "The spec valid usage text states 'If pipelineBindPoint is not 0, pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter)"}, + {VALIDATION_ERROR_05228201, "The spec valid usage text states 'If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter)"}, + {VALIDATION_ERROR_0522b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0522f801, "The spec valid usage text states 'templateType must be a valid VkDescriptorUpdateTemplateTypeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter)"}, + {VALIDATION_ERROR_054002c4, "The spec valid usage text states 'dstBinding must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354)"}, + {VALIDATION_ERROR_054002c6, "The spec valid usage text states 'dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355)"}, + {VALIDATION_ERROR_05404e01, "The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter)"}, {VALIDATION_ERROR_056002e8, "The spec valid usage text states 'The queueFamilyIndex member of each element of pQueueCreateInfos must be unique within pQueueCreateInfos' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-queueFamilyIndex-00372)"}, {VALIDATION_ERROR_056002ea, "The spec valid usage text states 'If the pNext chain includes a VkPhysicalDeviceFeatures2KHR structure, then pEnabledFeatures must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-00373)"}, {VALIDATION_ERROR_056002ec, "The spec valid usage text states 'ppEnabledExtensionNames must not contain both VK_KHR_maintenance1 and VK_AMD_negative_viewport_height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374)"}, {VALIDATION_ERROR_05609005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_05615a01, "The spec valid usage text states 'If pEnabledFeatures is not NULL, pEnabledFeatures must be a pointer to a valid VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter)"}, + {VALIDATION_ERROR_05615a01, "The spec valid usage text states 'If pEnabledFeatures is not NULL, pEnabledFeatures must be a valid pointer to a valid VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter)"}, {VALIDATION_ERROR_0561c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupDeviceCreateInfoKHX, VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceFeatures2KHR, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_0561fe01, "The spec valid usage text states 'pQueueCreateInfos must be a pointer to an array of queueCreateInfoCount valid VkDeviceQueueCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter)"}, - {VALIDATION_ERROR_05628e01, "The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter)"}, - {VALIDATION_ERROR_05629001, "The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter)"}, + {VALIDATION_ERROR_0561fe01, "The spec valid usage text states 'pQueueCreateInfos must be a valid pointer to an array of queueCreateInfoCount valid VkDeviceQueueCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter)"}, + {VALIDATION_ERROR_05628e01, "The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter)"}, + {VALIDATION_ERROR_05629001, "The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter)"}, {VALIDATION_ERROR_0562a01b, "The spec valid usage text states 'queueCreateInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-queueCreateInfoCount-arraylength)"}, {VALIDATION_ERROR_0562b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0562b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceCreateInfo-sType-unique)"}, - {VALIDATION_ERROR_05805801, "The spec valid usage text states 'deviceEvent must be a valid VkDeviceEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-deviceEvent-parameter)"}, - {VALIDATION_ERROR_0581c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceEventInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_05a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext)"}, - {VALIDATION_ERROR_05a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType)"}, - {VALIDATION_ERROR_05c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext)"}, - {VALIDATION_ERROR_05c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType)"}, - {VALIDATION_ERROR_05e008bc, "The spec valid usage text states 'resourceDeviceIndex and memoryDeviceIndex must both be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118)"}, - {VALIDATION_ERROR_05e008be, "The spec valid usage text states 'Each memory allocation bound in this batch must have allocated an instance for memoryDeviceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119)"}, - {VALIDATION_ERROR_05e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_060000d4, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106)"}, - {VALIDATION_ERROR_060000d6, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107)"}, - {VALIDATION_ERROR_0602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_062002ee, "The spec valid usage text states 'Each element of pPhysicalDevices must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375)"}, - {VALIDATION_ERROR_062002f0, "The spec valid usage text states 'All elements of pPhysicalDevices must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroupsKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376)"}, - {VALIDATION_ERROR_062002f2, "The spec valid usage text states 'If physicalDeviceCount is not 0, the physicalDevice parameter of vkCreateDevice must be an element of pPhysicalDevices.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377)"}, - {VALIDATION_ERROR_0621dc01, "The spec valid usage text states 'If physicalDeviceCount is not 0, pPhysicalDevices must be a pointer to an array of physicalDeviceCount valid VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter)"}, - {VALIDATION_ERROR_0622b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_06400a22, "The spec valid usage text states 'swapchainCount must equal 0 or VkPresentInfoKHR::swapchainCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297)"}, - {VALIDATION_ERROR_06400a24, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01298)"}, - {VALIDATION_ERROR_06400a26, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHX::presentMask.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01299)"}, - {VALIDATION_ERROR_06400a28, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX, then each element of pDeviceMasks must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHX::presentMask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01300)"}, - {VALIDATION_ERROR_06400a2a, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX, then for each bit set in each element of pDeviceMasks, the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01301)"}, - {VALIDATION_ERROR_06400a2c, "The spec valid usage text states 'The value of each element of pDeviceMasks must be equal to the device mask passed in VkAcquireNextImageInfoKHX::deviceMask when the image index was last acquired' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302)"}, - {VALIDATION_ERROR_06400a2e, "The spec valid usage text states 'mode must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHX::modes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01303)"}, - {VALIDATION_ERROR_0640ce01, "The spec valid usage text states 'mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-parameter)"}, - {VALIDATION_ERROR_06414001, "The spec valid usage text states 'If swapchainCount is not 0, pDeviceMasks must be a pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter)"}, - {VALIDATION_ERROR_0642b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_06600712, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905)"}, - {VALIDATION_ERROR_06600714, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906)"}, - {VALIDATION_ERROR_06600716, "The spec valid usage text states 'deviceMask must be a subset of the command buffer's initial device mask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907)"}, - {VALIDATION_ERROR_06600718, "The spec valid usage text states 'deviceRenderAreaCount must either be zero or equal to the number of physical devices in the logical device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908)"}, - {VALIDATION_ERROR_06614201, "The spec valid usage text states 'If deviceRenderAreaCount is not 0, pDeviceRenderAreas must be a pointer to an array of deviceRenderAreaCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter)"}, - {VALIDATION_ERROR_0662b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_068000a4, "The spec valid usage text states 'waitSemaphoreCount must equal VkSubmitInfo::waitSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082)"}, - {VALIDATION_ERROR_068000a6, "The spec valid usage text states 'commandBufferCount must equal VkSubmitInfo::commandBufferCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083)"}, - {VALIDATION_ERROR_068000a8, "The spec valid usage text states 'signalSemaphoreCount must equal VkSubmitInfo::signalSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084)"}, - {VALIDATION_ERROR_068000aa, "The spec valid usage text states 'All elements of pWaitSemaphoreDeviceIndices and pSignalSemaphoreDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085)"}, - {VALIDATION_ERROR_068000ac, "The spec valid usage text states 'All elements of pCommandBufferDeviceMasks must be valid device masks' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086)"}, - {VALIDATION_ERROR_06811201, "The spec valid usage text states 'If commandBufferCount is not 0, pCommandBufferDeviceMasks must be a pointer to an array of commandBufferCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter)"}, - {VALIDATION_ERROR_06823001, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphoreDeviceIndices must be a pointer to an array of signalSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter)"}, - {VALIDATION_ERROR_06827201, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphoreDeviceIndices must be a pointer to an array of waitSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter)"}, - {VALIDATION_ERROR_0682b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_06a0d001, "The spec valid usage text states 'modes must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter)"}, - {VALIDATION_ERROR_06a0d003, "The spec valid usage text states 'modes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask)"}, - {VALIDATION_ERROR_06a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_05805801, "The spec valid usage text states 'deviceEvent must be a valid VkDeviceEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-deviceEvent-parameter)"}, + {VALIDATION_ERROR_0581c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceEventInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_05a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext)"}, + {VALIDATION_ERROR_05a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType)"}, + {VALIDATION_ERROR_05c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext)"}, + {VALIDATION_ERROR_05c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType)"}, + {VALIDATION_ERROR_05e008bc, "The spec valid usage text states 'resourceDeviceIndex and memoryDeviceIndex must both be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118)"}, + {VALIDATION_ERROR_05e008be, "The spec valid usage text states 'Each memory allocation bound in this batch must have allocated an instance for memoryDeviceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119)"}, + {VALIDATION_ERROR_05e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_060000d4, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106)"}, + {VALIDATION_ERROR_060000d6, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107)"}, + {VALIDATION_ERROR_0602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_062002ee, "The spec valid usage text states 'Each element of pPhysicalDevices must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375)"}, + {VALIDATION_ERROR_062002f0, "The spec valid usage text states 'All elements of pPhysicalDevices must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroupsKHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376)"}, + {VALIDATION_ERROR_062002f2, "The spec valid usage text states 'If physicalDeviceCount is not 0, the physicalDevice parameter of vkCreateDevice must be an element of pPhysicalDevices.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377)"}, + {VALIDATION_ERROR_0621dc01, "The spec valid usage text states 'If physicalDeviceCount is not 0, pPhysicalDevices must be a valid pointer to an array of physicalDeviceCount valid VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter)"}, + {VALIDATION_ERROR_0622b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_06400a22, "The spec valid usage text states 'swapchainCount must equal 0 or VkPresentInfoKHR::swapchainCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297)"}, + {VALIDATION_ERROR_06400a24, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01298)"}, + {VALIDATION_ERROR_06400a26, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHX::presentMask.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01299)"}, + {VALIDATION_ERROR_06400a28, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX, then each element of pDeviceMasks must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHX::presentMask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01300)"}, + {VALIDATION_ERROR_06400a2a, "The spec valid usage text states 'If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX, then for each bit set in each element of pDeviceMasks, the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01301)"}, + {VALIDATION_ERROR_06400a2c, "The spec valid usage text states 'The value of each element of pDeviceMasks must be equal to the device mask passed in VkAcquireNextImageInfoKHX::deviceMask when the image index was last acquired' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302)"}, + {VALIDATION_ERROR_06400a2e, "The spec valid usage text states 'mode must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHX::modes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-01303)"}, + {VALIDATION_ERROR_0640ce01, "The spec valid usage text states 'mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-mode-parameter)"}, + {VALIDATION_ERROR_06414001, "The spec valid usage text states 'If swapchainCount is not 0, pDeviceMasks must be a valid pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter)"}, + {VALIDATION_ERROR_0642b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_06600712, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905)"}, + {VALIDATION_ERROR_06600714, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906)"}, + {VALIDATION_ERROR_06600716, "The spec valid usage text states 'deviceMask must be a subset of the command buffer's initial device mask' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907)"}, + {VALIDATION_ERROR_06600718, "The spec valid usage text states 'deviceRenderAreaCount must either be zero or equal to the number of physical devices in the logical device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908)"}, + {VALIDATION_ERROR_06614201, "The spec valid usage text states 'If deviceRenderAreaCount is not 0, pDeviceRenderAreas must be a valid pointer to an array of deviceRenderAreaCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter)"}, + {VALIDATION_ERROR_0662b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_068000a4, "The spec valid usage text states 'waitSemaphoreCount must equal VkSubmitInfo::waitSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082)"}, + {VALIDATION_ERROR_068000a6, "The spec valid usage text states 'commandBufferCount must equal VkSubmitInfo::commandBufferCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083)"}, + {VALIDATION_ERROR_068000a8, "The spec valid usage text states 'signalSemaphoreCount must equal VkSubmitInfo::signalSemaphoreCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084)"}, + {VALIDATION_ERROR_068000aa, "The spec valid usage text states 'All elements of pWaitSemaphoreDeviceIndices and pSignalSemaphoreDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085)"}, + {VALIDATION_ERROR_068000ac, "The spec valid usage text states 'All elements of pCommandBufferDeviceMasks must be valid device masks' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086)"}, + {VALIDATION_ERROR_06811201, "The spec valid usage text states 'If commandBufferCount is not 0, pCommandBufferDeviceMasks must be a valid pointer to an array of commandBufferCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter)"}, + {VALIDATION_ERROR_06823001, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphoreDeviceIndices must be a valid pointer to an array of signalSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter)"}, + {VALIDATION_ERROR_06827201, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphoreDeviceIndices must be a valid pointer to an array of waitSemaphoreCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter)"}, + {VALIDATION_ERROR_0682b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSubmitInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_06a0d001, "The spec valid usage text states 'modes must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter)"}, + {VALIDATION_ERROR_06a0d003, "The spec valid usage text states 'modes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask)"}, + {VALIDATION_ERROR_06a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType)"}, {VALIDATION_ERROR_06c002fa, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381)"}, {VALIDATION_ERROR_06c002fc, "The spec valid usage text states 'queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueCount-00382)"}, {VALIDATION_ERROR_06c002fe, "The spec valid usage text states 'Each element of pQueuePriorities must be between 0.0 and 1.0 inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383)"}, {VALIDATION_ERROR_06c09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_06c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_06c20401, "The spec valid usage text states 'pQueuePriorities must be a pointer to an array of queueCount float values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter)"}, + {VALIDATION_ERROR_06c1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkDeviceQueueGlobalPriorityCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pNext-pNext)"}, + {VALIDATION_ERROR_06c20401, "The spec valid usage text states 'pQueuePriorities must be a valid pointer to an array of queueCount float values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter)"}, {VALIDATION_ERROR_06c29e1b, "The spec valid usage text states 'queueCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueCount-arraylength)"}, {VALIDATION_ERROR_06c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-sType-sType)"}, {VALIDATION_ERROR_06e00342, "The spec valid usage text states 'x must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-x-00417)"}, {VALIDATION_ERROR_06e00344, "The spec valid usage text states 'y must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-y-00418)"}, {VALIDATION_ERROR_06e00346, "The spec valid usage text states 'z must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDispatchIndirectCommand-z-00419)"}, - {VALIDATION_ERROR_07006201, "The spec valid usage text states 'displayEvent must be a valid VkDisplayEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-displayEvent-parameter)"}, - {VALIDATION_ERROR_0701c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0702b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayEventInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_072009c4, "The spec valid usage text states 'The width and height members of the visibleRegion member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-width-01250)"}, - {VALIDATION_ERROR_072009c6, "The spec valid usage text states 'The refreshRate member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251)"}, - {VALIDATION_ERROR_07209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_0721c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0722b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0741c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_07428a01, "The spec valid usage text states 'powerState must be a valid VkDisplayPowerStateEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-powerState-parameter)"}, - {VALIDATION_ERROR_0742b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_076009d2, "The spec valid usage text states 'srcRect must specify a rectangular region that is a subset of the image being presented' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-srcRect-01257)"}, - {VALIDATION_ERROR_076009d4, "The spec valid usage text states 'dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-dstRect-01258)"}, - {VALIDATION_ERROR_076009d6, "The spec valid usage text states 'If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-persistentContent-01259)"}, - {VALIDATION_ERROR_0762b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_078009c8, "The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252)"}, - {VALIDATION_ERROR_078009ca, "The spec valid usage text states 'If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is VK_TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253)"}, - {VALIDATION_ERROR_078009cc, "The spec valid usage text states 'If alphaMode is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254)"}, - {VALIDATION_ERROR_078009ce, "The spec valid usage text states 'alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255)"}, - {VALIDATION_ERROR_078009d0, "The spec valid usage text states 'The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-width-01256)"}, - {VALIDATION_ERROR_07800a01, "The spec valid usage text states 'alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter)"}, - {VALIDATION_ERROR_07806401, "The spec valid usage text states 'displayMode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter)"}, - {VALIDATION_ERROR_07809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_0781c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0782b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_07830201, "The spec valid usage text states 'transform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter)"}, - {VALIDATION_ERROR_07a00450, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-None-00552)"}, + {VALIDATION_ERROR_07006201, "The spec valid usage text states 'displayEvent must be a valid VkDisplayEventTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-displayEvent-parameter)"}, + {VALIDATION_ERROR_0701c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0702b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayEventInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_072009c4, "The spec valid usage text states 'The width and height members of the visibleRegion member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-width-01250)"}, + {VALIDATION_ERROR_072009c6, "The spec valid usage text states 'The refreshRate member of parameters must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251)"}, + {VALIDATION_ERROR_07209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_0721c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0722b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayModeCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0741c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_07428a01, "The spec valid usage text states 'powerState must be a valid VkDisplayPowerStateEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-powerState-parameter)"}, + {VALIDATION_ERROR_0742b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPowerInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_076009d2, "The spec valid usage text states 'srcRect must specify a rectangular region that is a subset of the image being presented' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-srcRect-01257)"}, + {VALIDATION_ERROR_076009d4, "The spec valid usage text states 'dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-dstRect-01258)"}, + {VALIDATION_ERROR_076009d6, "The spec valid usage text states 'If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-persistentContent-01259)"}, + {VALIDATION_ERROR_0762b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplayPresentInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_078009c8, "The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252)"}, + {VALIDATION_ERROR_078009ca, "The spec valid usage text states 'If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is VK_TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253)"}, + {VALIDATION_ERROR_078009cc, "The spec valid usage text states 'If alphaMode is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254)"}, + {VALIDATION_ERROR_078009ce, "The spec valid usage text states 'alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255)"}, + {VALIDATION_ERROR_078009d0, "The spec valid usage text states 'The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-width-01256)"}, + {VALIDATION_ERROR_07800a01, "The spec valid usage text states 'alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter)"}, + {VALIDATION_ERROR_07806401, "The spec valid usage text states 'displayMode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter)"}, + {VALIDATION_ERROR_07809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_0781c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0782b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_07830201, "The spec valid usage text states 'transform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter)"}, + {VALIDATION_ERROR_07a00450, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-None-00552)"}, {VALIDATION_ERROR_07a00452, "The spec valid usage text states '(indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-indexSize-00553)"}, {VALIDATION_ERROR_07a00454, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, firstInstance must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndexedIndirectCommand-firstInstance-00554)"}, - {VALIDATION_ERROR_07c003e8, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-None-00500)"}, + {VALIDATION_ERROR_07c003e8, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-None-00500)"}, {VALIDATION_ERROR_07c003ea, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, firstInstance must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDrawIndirectCommand-firstInstance-00501)"}, {VALIDATION_ERROR_07e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_07e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_07e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkEventCreateInfo-sType-sType)"}, - {VALIDATION_ERROR_08000520, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656)"}, - {VALIDATION_ERROR_08009e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter)"}, - {VALIDATION_ERROR_0801c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0802b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_08209e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter)"}, - {VALIDATION_ERROR_0821c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_0822b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_08400522, "The spec valid usage text states 'If VkExportMemoryAllocateInfoKHR::handleTypes does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, VkExportMemoryWin32HandleInfoKHR must not be in the pNext chain of VkMemoryAllocateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657)"}, - {VALIDATION_ERROR_0840f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter)"}, - {VALIDATION_ERROR_0841c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0842b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0860f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter)"}, - {VALIDATION_ERROR_0861c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_0862b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-sType-sType)"}, - {VALIDATION_ERROR_088008c8, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalSemaphorePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124)"}, - {VALIDATION_ERROR_08809e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalSemaphoreHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter)"}, - {VALIDATION_ERROR_0881c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0882b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_08a008ca, "The spec valid usage text states 'If VkExportSemaphoreCreateInfoKHR::handleTypes does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, VkExportSemaphoreWin32HandleInfoKHR must not be in the pNext chain of VkSemaphoreCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125)"}, - {VALIDATION_ERROR_08a0f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter)"}, - {VALIDATION_ERROR_08a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_08a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_08c09e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter)"}, - {VALIDATION_ERROR_08c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_08c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_08e09e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter)"}, - {VALIDATION_ERROR_08e09e03, "The spec valid usage text states 'handleTypes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask)"}, - {VALIDATION_ERROR_08e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_08e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_09009e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter)"}, - {VALIDATION_ERROR_0901c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_0902b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_08000520, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656)"}, + {VALIDATION_ERROR_08009e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter)"}, + {VALIDATION_ERROR_0801c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0802b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_08209e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter)"}, + {VALIDATION_ERROR_0821c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_0822b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryAllocateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_08400522, "The spec valid usage text states 'If VkExportMemoryAllocateInfoKHR::handleTypes does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, VkExportMemoryWin32HandleInfoKHR must not be in the pNext chain of VkMemoryAllocateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657)"}, + {VALIDATION_ERROR_0840f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter)"}, + {VALIDATION_ERROR_0841c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0842b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0860f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter)"}, + {VALIDATION_ERROR_0861c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_0862b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportMemoryWin32HandleInfoNV-sType-sType)"}, + {VALIDATION_ERROR_088008c8, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalSemaphorePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124)"}, + {VALIDATION_ERROR_08809e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalSemaphoreHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter)"}, + {VALIDATION_ERROR_0881c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0882b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_08a008ca, "The spec valid usage text states 'If VkExportSemaphoreCreateInfoKHR::handleTypes does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, VkExportSemaphoreWin32HandleInfoKHR must not be in the pNext chain of VkSemaphoreCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125)"}, + {VALIDATION_ERROR_08a0f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter)"}, + {VALIDATION_ERROR_08a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_08a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_08c09e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter)"}, + {VALIDATION_ERROR_08c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_08c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_08e09e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter)"}, + {VALIDATION_ERROR_08e09e03, "The spec valid usage text states 'handleTypes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask)"}, + {VALIDATION_ERROR_08e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_08e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_09009e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter)"}, + {VALIDATION_ERROR_0901c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_0902b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalMemoryImageCreateInfoNV-sType-sType)"}, {VALIDATION_ERROR_09209001, "The spec valid usage text states 'flags must be a valid combination of VkFenceCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-flags-parameter)"}, {VALIDATION_ERROR_0921c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExportFenceCreateInfoKHR or VkExportFenceWin32HandleInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0922b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceCreateInfo-sType-sType)"}, @@ -4230,7 +4422,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_094006f4, "The spec valid usage text states 'layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-layers-00890)"}, {VALIDATION_ERROR_094006f6, "The spec valid usage text states 'Each element of pAttachments that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00891)"}, {VALIDATION_ERROR_09409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_0940f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-parameter)"}, + {VALIDATION_ERROR_0940f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkImageView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-parameter)"}, {VALIDATION_ERROR_0941c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0942ae01, "The spec valid usage text states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-renderPass-parameter)"}, {VALIDATION_ERROR_0942b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFramebufferCreateInfo-sType-sType)"}, @@ -4244,7 +4436,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_096005b0, "The spec valid usage text states 'The stage member of each element of pStages must not be VK_SHADER_STAGE_COMPUTE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-stage-00728)"}, {VALIDATION_ERROR_096005b2, "The spec valid usage text states 'If pStages includes a tessellation control shader stage, it must include a tessellation evaluation shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00729)"}, {VALIDATION_ERROR_096005b4, "The spec valid usage text states 'If pStages includes a tessellation evaluation shader stage, it must include a tessellation control shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00730)"}, - {VALIDATION_ERROR_096005b6, "The spec valid usage text states 'If pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pTessellationState must be a pointer to a valid VkPipelineTessellationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00731)"}, + {VALIDATION_ERROR_096005b6, "The spec valid usage text states 'If pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pTessellationState must be a valid pointer to a valid VkPipelineTessellationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00731)"}, {VALIDATION_ERROR_096005b8, "The spec valid usage text states 'If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00732)"}, {VALIDATION_ERROR_096005ba, "The spec valid usage text states 'If pStages includes tessellation shader stages, and the shader code of both stages contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must both specify the same subdivision mode' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00733)"}, {VALIDATION_ERROR_096005bc, "The spec valid usage text states 'If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the output patch size in the pipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00734)"}, @@ -4256,23 +4448,23 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_096005c8, "The spec valid usage text states 'If pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with PrimitiveID, then the geometry shader code must write to a matching output variable, decorated with PrimitiveID, in all execution paths' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00740)"}, {VALIDATION_ERROR_096005ca, "The spec valid usage text states 'If pStages includes a fragment shader stage, its shader code must not read from any input attachment that is defined as VK_ATTACHMENT_UNUSED in subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00741)"}, {VALIDATION_ERROR_096005cc, "The spec valid usage text states 'The shader code for the entry points identified by pStages, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-00742)"}, - {VALIDATION_ERROR_096005ce, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderpass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00743)"}, - {VALIDATION_ERROR_096005d0, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderpass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00744)"}, - {VALIDATION_ERROR_096005d2, "The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the blendEnable member of the corresponding element of the pAttachment member of pColorBlendState must be VK_FALSE if the format of the attachment does not support color blend operations, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in VkFormatProperties::linearTilingFeatures or VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-blendEnable-00745)"}, + {VALIDATION_ERROR_096005ce, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00743)"}, + {VALIDATION_ERROR_096005d0, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00744)"}, + {VALIDATION_ERROR_096005d2, "The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the blendEnable member of the corresponding element of the pAttachment member of pColorBlendState must be VK_FALSE if the format of the attachment does not support color blend operations, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in VkFormatProperties::linearTilingFeatures or VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00745)"}, {VALIDATION_ERROR_096005d4, "The spec valid usage text states 'If rasterization is not disabled and the subpass uses color attachments, the attachmentCount member of pColorBlendState must be equal to the colorAttachmentCount used to create subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-attachmentCount-00746)"}, - {VALIDATION_ERROR_096005d6, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports member of pViewportState must be a pointer to an array of pViewportState::viewportCount VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747)"}, - {VALIDATION_ERROR_096005d8, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member of pViewportState must be a pointer to an array of pViewportState::scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748)"}, + {VALIDATION_ERROR_096005d6, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports member of pViewportState must be a valid pointer to an array of pViewportState::viewportCount VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747)"}, + {VALIDATION_ERROR_096005d8, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member of pViewportState must be a valid pointer to an array of pViewportState::scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748)"}, {VALIDATION_ERROR_096005da, "The spec valid usage text states 'If the wide lines feature is not enabled, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_WIDTH, the lineWidth member of pRasterizationState must be 1.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749)"}, - {VALIDATION_ERROR_096005dc, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a pointer to a valid VkPipelineViewportStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750)"}, - {VALIDATION_ERROR_096005de, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pMultisampleState must be a pointer to a valid VkPipelineMultisampleStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751)"}, - {VALIDATION_ERROR_096005e0, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses a depth/stencil attachment, pDepthStencilState must be a pointer to a valid VkPipelineDepthStencilStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752)"}, - {VALIDATION_ERROR_096005e2, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses color attachments, pColorBlendState must be a pointer to a valid VkPipelineColorBlendStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753)"}, - {VALIDATION_ERROR_096005e4, "The spec valid usage text states 'If the depth bias clamping feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pDepthStencil is VK_TRUE, the depthBiasClamp member of pDepthStencil must be 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754)"}, - {VALIDATION_ERROR_096005e6, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencil is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencil must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755)"}, + {VALIDATION_ERROR_096005dc, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750)"}, + {VALIDATION_ERROR_096005de, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pMultisampleState must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751)"}, + {VALIDATION_ERROR_096005e0, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses a depth/stencil attachment, pDepthStencilState must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752)"}, + {VALIDATION_ERROR_096005e2, "The spec valid usage text states 'If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses color attachments, pColorBlendState must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753)"}, + {VALIDATION_ERROR_096005e4, "The spec valid usage text states 'If the depth bias clamping feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pRasterizationState is VK_TRUE, the depthBiasClamp member of pRasterizationState must be 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754)"}, + {VALIDATION_ERROR_096005e6, "The spec valid usage text states 'If the VK_EXT_depth_range_unrestricted extension is not enabled and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencilState is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencilState must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755)"}, {VALIDATION_ERROR_096005e8, "The spec valid usage text states 'layout must be consistent with all shaders specified in pStages' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-00756)"}, {VALIDATION_ERROR_096005ea, "The spec valid usage text states 'If subpass uses color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must be the same as the sample count for those subpass attachments' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00757)"}, {VALIDATION_ERROR_096005ec, "The spec valid usage text states 'If subpass does not use any color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must follow the rules for a zero-attachment subpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00758)"}, - {VALIDATION_ERROR_096005ee, "The spec valid usage text states 'subpass must be a valid subpass within renderpass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00759)"}, + {VALIDATION_ERROR_096005ee, "The spec valid usage text states 'subpass must be a valid subpass within renderPass' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-00759)"}, {VALIDATION_ERROR_096005f0, "The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewTessellationShader is not enabled, then pStages must not include tessellation shaders.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00760)"}, {VALIDATION_ERROR_096005f2, "The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewGeometryShader is not enabled, then pStages must not include a geometry shader.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00761)"}, {VALIDATION_ERROR_096005f4, "The spec valid usage text states 'If the renderPass has multiview enabled and subpass has more than one bit set in the view mask, shaders in the pipeline must not write to the Layer built-in output' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-00762)"}, @@ -4285,23 +4477,27 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_09600be4, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationGridSize.height must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.height as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01522)"}, {VALIDATION_ERROR_09600be6, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationsPerPixel must equal rasterizationSamples' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01523)"}, {VALIDATION_ERROR_09600be8, "The spec valid usage text states 'If the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, the fragment shader code must not statically use the extended instruction InterpolateAtSample' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524)"}, - {VALIDATION_ERROR_09600c3a, "The spec valid usage text states 'If pStages includes a fragment shader stage and an input attachment was referenced by the VkRenderPassInputAttachmentAspectCreateInfoKHR at renderpass create time, its shader code must not read from any aspect that was not specified in the aspectMask of the corresponding VkInputAttachmentAspectReferenceKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-01565)"}, + {VALIDATION_ERROR_09600c3a, "The spec valid usage text states 'If pStages includes a fragment shader stage and an input attachment was referenced by the VkRenderPassInputAttachmentAspectCreateInfoKHR at renderPass create time, its shader code must not read from any aspect that was not specified in the aspectMask of the corresponding VkInputAttachmentAspectReferenceKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-01565)"}, + {VALIDATION_ERROR_09600d30, "The spec valid usage text states 'The number of resources in layout accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-01688)"}, + {VALIDATION_ERROR_09600d66, "The spec valid usage text states 'If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the viewportWScalingEnable member of a VkPipelineViewportWScalingStateCreateInfoNV structure, chained to the pNext chain of pViewportState, is VK_TRUE, the pViewportWScalings member of the VkPipelineViewportWScalingStateCreateInfoNV must be a pointer to an array of VkPipelineViewportWScalingStateCreateInfoNV::viewportCount valid VkViewportWScalingNV structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715)"}, + {VALIDATION_ERROR_09600db8, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-01756)"}, + {VALIDATION_ERROR_09600dba, "The spec valid usage text states 'If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-subpass-01757)"}, {VALIDATION_ERROR_09609001, "The spec valid usage text states 'flags must be a valid combination of VkPipelineCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-flags-parameter)"}, {VALIDATION_ERROR_0960be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-parameter)"}, - {VALIDATION_ERROR_09615601, "The spec valid usage text states 'If pDynamicState is not NULL, pDynamicState must be a pointer to a valid VkPipelineDynamicStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter)"}, - {VALIDATION_ERROR_09619801, "The spec valid usage text states 'pInputAssemblyState must be a pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter)"}, + {VALIDATION_ERROR_09615601, "The spec valid usage text states 'If pDynamicState is not NULL, pDynamicState must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter)"}, + {VALIDATION_ERROR_09619801, "The spec valid usage text states 'pInputAssemblyState must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter)"}, {VALIDATION_ERROR_0961c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPipelineDiscardRectangleStateCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_09620801, "The spec valid usage text states 'pRasterizationState must be a pointer to a valid VkPipelineRasterizationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter)"}, - {VALIDATION_ERROR_09623e01, "The spec valid usage text states 'pStages must be a pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-parameter)"}, - {VALIDATION_ERROR_09626801, "The spec valid usage text states 'pVertexInputState must be a pointer to a valid VkPipelineVertexInputStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter)"}, + {VALIDATION_ERROR_09620801, "The spec valid usage text states 'pRasterizationState must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter)"}, + {VALIDATION_ERROR_09623e01, "The spec valid usage text states 'pStages must be a valid pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pStages-parameter)"}, + {VALIDATION_ERROR_09626801, "The spec valid usage text states 'pVertexInputState must be a valid pointer to a valid VkPipelineVertexInputStateCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter)"}, {VALIDATION_ERROR_0962ae01, "The spec valid usage text states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter)"}, {VALIDATION_ERROR_0962b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0962da1b, "The spec valid usage text states 'stageCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-stageCount-arraylength)"}, - {VALIDATION_ERROR_09800a48, "The spec valid usage text states 'pView must be a valid UIView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-01316)"}, - {VALIDATION_ERROR_09809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask)"}, - {VALIDATION_ERROR_0981c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext)"}, + {VALIDATION_ERROR_09800a48, "The spec valid usage text states 'pView must be a valid UIView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-01316)"}, + {VALIDATION_ERROR_09809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask)"}, + {VALIDATION_ERROR_0981c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext)"}, {VALIDATION_ERROR_09826a01, "The spec valid usage text states 'pView must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-pView-parameter)"}, - {VALIDATION_ERROR_0982b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-sType-sType)"}, + {VALIDATION_ERROR_0982b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIOSSurfaceCreateInfoMVK-sType-sType)"}, {VALIDATION_ERROR_09a001dc, "The spec valid usage text states 'The aspectMask member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-aspectMask-00238)"}, {VALIDATION_ERROR_09a001de, "The spec valid usage text states 'The layerCount member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-layerCount-00239)"}, {VALIDATION_ERROR_09a001e0, "The spec valid usage text states 'If either of the calling command's srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageBlit-srcImage-00240)"}, @@ -4338,14 +4534,14 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_09c00132, "The spec valid usage text states 'dstOffset.z and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00153)"}, {VALIDATION_ERROR_09c00134, "The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then dstOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-00154)"}, {VALIDATION_ERROR_09c00136, "The spec valid usage text states 'dstSubresource.baseArrayLayer must be less than and (dstSubresource.layerCount + dstSubresource.baseArrayLayer) must be less than or equal to the number of layers in the destination image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-00155)"}, - {VALIDATION_ERROR_09c0013a, "The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00157)"}, - {VALIDATION_ERROR_09c0013c, "The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00158)"}, - {VALIDATION_ERROR_09c0013e, "The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00159)"}, - {VALIDATION_ERROR_09c00140, "The spec valid usage text states 'If the calling command's srcImage is a compressed image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00160)"}, - {VALIDATION_ERROR_09c00144, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00162)"}, - {VALIDATION_ERROR_09c00146, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00163)"}, - {VALIDATION_ERROR_09c00148, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00164)"}, - {VALIDATION_ERROR_09c0014a, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00165)"}, + {VALIDATION_ERROR_09c0013a, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00157)"}, + {VALIDATION_ERROR_09c0013c, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00158)"}, + {VALIDATION_ERROR_09c0013e, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00159)"}, + {VALIDATION_ERROR_09c00140, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00160)"}, + {VALIDATION_ERROR_09c00144, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstOffset-00162)"}, + {VALIDATION_ERROR_09c00146, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00163)"}, + {VALIDATION_ERROR_09c00148, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00164)"}, + {VALIDATION_ERROR_09c0014a, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-extent-00165)"}, {VALIDATION_ERROR_09c0014c, "The spec valid usage text states 'srcOffset, dstOffset, and extent must respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in Physical Device Enumeration' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcOffset-00166)"}, {VALIDATION_ERROR_09c00c1e, "The spec valid usage text states 'If neither the calling command's srcImage nor the calling command's dstImage has a multi-planar image format then the aspectMask member of srcSubresource and dstSubresource must match' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01551)"}, {VALIDATION_ERROR_09c00c20, "The spec valid usage text states 'If the calling command's srcImage has a VkFormat with two planes then the srcSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01552)"}, @@ -4354,10 +4550,26 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_09c00c26, "The spec valid usage text states 'If the calling command's dstImage has a VkFormat with three planes then the dstSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01555)"}, {VALIDATION_ERROR_09c00c28, "The spec valid usage text states 'If the calling command's srcImage has a multi-planar image format and the dstImage does not have a multi-planar image format, the dstSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01556)"}, {VALIDATION_ERROR_09c00c2a, "The spec valid usage text states 'If the calling command's dstImage has a multi-planar image format and the srcImage does not have a multi-planar image format, the srcSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01557)"}, + {VALIDATION_ERROR_09c00d7e, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, \"_422\" image format, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01727)"}, + {VALIDATION_ERROR_09c00d80, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, \"_422\" image format, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01728)"}, + {VALIDATION_ERROR_09c00d82, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, \"_422\" image format, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01729)"}, + {VALIDATION_ERROR_09c00d84, "The spec valid usage text states 'If the calling command's srcImage is a compressed image, or a single-plane, \"_422\" image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01730)"}, + {VALIDATION_ERROR_09c00d86, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, \"_422\" image format, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01731)"}, + {VALIDATION_ERROR_09c00d88, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, \"_422\" image format, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01732)"}, + {VALIDATION_ERROR_09c00d8a, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, \"_422\" image format, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01733)"}, + {VALIDATION_ERROR_09c00d8c, "The spec valid usage text states 'If the calling command's dstImage is a compressed format image, or a single-plane, \"_422\" image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01734)"}, + {VALIDATION_ERROR_09c00df2, "The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01785)"}, + {VALIDATION_ERROR_09c00df4, "The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.z must be 0 and extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-01786)"}, + {VALIDATION_ERROR_09c00df6, "The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_2D, then srcOffset.z must be 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01787)"}, + {VALIDATION_ERROR_09c00df8, "The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_2D, then dstOffset.z must be 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstImage-01788)"}, + {VALIDATION_ERROR_09c00dfa, "The spec valid usage text states 'If the calling command's srcImage or dstImage is of type VK_IMAGE_TYPE_2D, then extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcImage-01789)"}, + {VALIDATION_ERROR_09c00dfc, "The spec valid usage text states 'If both srcImage and dstImage are of type VK_IMAGE_TYPE_2D then then extent.depth must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01790)"}, + {VALIDATION_ERROR_09c00dfe, "The spec valid usage text states 'If the calling command's srcImage is of type VK_IMAGE_TYPE_2D, and the dstImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of srcSubresource.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-srcImage-01791)"}, + {VALIDATION_ERROR_09c00e00, "The spec valid usage text states 'If the calling command's dstImage is of type VK_IMAGE_TYPE_2D, and the srcImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of dstSubresource.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCopy-dstImage-01792)"}, {VALIDATION_ERROR_09c07a01, "The spec valid usage text states 'dstSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-dstSubresource-parameter)"}, {VALIDATION_ERROR_09c2d601, "The spec valid usage text states 'srcSubresource must be a valid VkImageSubresourceLayers structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCopy-srcSubresource-parameter)"}, {VALIDATION_ERROR_09e00758, "The spec valid usage text states 'The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00940)"}, - {VALIDATION_ERROR_09e0075a, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00941)"}, + {VALIDATION_ERROR_09e0075a, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00941)"}, {VALIDATION_ERROR_09e0075c, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-00942)"}, {VALIDATION_ERROR_09e0075e, "The spec valid usage text states 'format must not be VK_FORMAT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-format-00943)"}, {VALIDATION_ERROR_09e00760, "The spec valid usage text states 'extent::width must be greater than 0.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00944)"}, @@ -4375,7 +4587,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_09e00778, "The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00956)"}, {VALIDATION_ERROR_09e0077a, "The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_2D, extent.depth must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00957)"}, {VALIDATION_ERROR_09e0077c, "The spec valid usage text states 'mipLevels must be less than or equal to {lfloor}log2(max(extent.width, extent.height, extent.depth)){rfloor} + 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-mipLevels-00958)"}, - {VALIDATION_ERROR_09e0077e, "The spec valid usage text states 'If any of extent.width, extent.height, or extent.depth are greater than the equivalently named members of VkPhysicalDeviceLimits::maxImageDimension3D, mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)"}, + {VALIDATION_ERROR_09e0077e, "The spec valid usage text states 'mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)"}, {VALIDATION_ERROR_09e00780, "The spec valid usage text states 'arrayLayers must be less than or equal to VkImageFormatProperties::maxArrayLayers (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-arrayLayers-00960)"}, {VALIDATION_ERROR_09e00782, "The spec valid usage text states 'If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-imageType-00961)"}, {VALIDATION_ERROR_09e00784, "The spec valid usage text states 'If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-samples-00962)"}, @@ -4413,11 +4625,11 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_09e00ae0, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01392)"}, {VALIDATION_ERROR_09e00b18, "The spec valid usage text states 'If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-sharingMode-01420)"}, {VALIDATION_ERROR_09e00b1a, "The spec valid usage text states 'If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_IMAGE_CREATE_BIND_SFR_BIT_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-physicalDeviceCount-01421)"}, - {VALIDATION_ERROR_09e00b46, "The spec valid usage text states 'If the pNext chain includes a' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)"}, + {VALIDATION_ERROR_09e00b46, "The spec valid usage text states 'If the pNext chain includes a ifdef::VK_KHR_external_memory[VkExternalMemoryImageCreateInfoKHR] ifdef::VK_KHR_external_memory+VK_NV_external_memory[or] ifdef::VK_NV_external_memory[VkExternalMemoryImageCreateInfoNV] structure whose handleTypes member is not 0, initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)"}, {VALIDATION_ERROR_09e00bfa, "The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT format must be a depth or depth/stencil format' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-01533)"}, {VALIDATION_ERROR_09e00c48, "The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, then format must be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-01572)"}, {VALIDATION_ERROR_09e00c4a, "The spec valid usage text states 'If flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, then flags must also contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-flags-01573)"}, - {VALIDATION_ERROR_09e00c4c, "The spec valid usage text states 'If the image format is one of those listed in Formats requiring sampler Y'CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views:' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-format-01574)"}, + {VALIDATION_ERROR_09e00c4c, "The spec valid usage text states 'If the image format is one of those listed in features-formats-requiring-sampler-ycbcr-conversion:' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-format-01574)"}, {VALIDATION_ERROR_09e00c4e, "The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, format is a multi-planar format, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-tiling-01575)"}, {VALIDATION_ERROR_09e00c50, "The spec valid usage text states 'If tiling is VK_IMAGE_TILING_LINEAR, format is a multi-planar format, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-tiling-01576)"}, {VALIDATION_ERROR_09e00c52, "The spec valid usage text states 'If format is not a multi-planar format, and flags does not include VK_IMAGE_CREATE_ALIAS_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageCreateInfo-format-01577)"}, @@ -4436,7 +4648,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0a00095a, "The spec valid usage text states 'oldLayout must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-oldLayout-01197)"}, {VALIDATION_ERROR_0a00095c, "The spec valid usage text states 'newLayout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-newLayout-01198)"}, {VALIDATION_ERROR_0a00095e, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01199)"}, - {VALIDATION_ERROR_0a000960, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see Queue Family Properties).' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01200)"}, + {VALIDATION_ERROR_0a000960, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see devsandqueues-queueprops).' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01200)"}, {VALIDATION_ERROR_0a000962, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01201)"}, {VALIDATION_ERROR_0a000964, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties).' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01202)"}, {VALIDATION_ERROR_0a000966, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or VK_QUEUE_FAMILY_EXTERNAL_KHR (see Queue Family Properties).' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01203)"}, @@ -4451,15 +4663,20 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0a00097a, "The spec valid usage text states 'If either oldLayout or newLayout is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then image must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-oldLayout-01213)"}, {VALIDATION_ERROR_0a000aca, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01381)"}, {VALIDATION_ERROR_0a000acc, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or VK_QUEUE_FAMILY_EXTERNAL_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01382)"}, - {VALIDATION_ERROR_0a000b9c, "The spec valid usage text states 'subresourceRange::baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01486)"}, + {VALIDATION_ERROR_0a000b9c, "The spec valid usage text states 'subresourceRange.baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01486)"}, {VALIDATION_ERROR_0a000b9e, "The spec valid usage text states 'If subresourceRange::levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange::levelCount must be non-zero and subresourceRange::baseMipLevel + subresourceRange::levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01487)"}, - {VALIDATION_ERROR_0a000ba0, "The spec valid usage text states 'subresourceRange::baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01488)"}, + {VALIDATION_ERROR_0a000ba0, "The spec valid usage text states 'subresourceRange.baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01488)"}, {VALIDATION_ERROR_0a000ba2, "The spec valid usage text states 'If subresourceRange::layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange::layerCount must be non-zero and subresourceRange::baseArrayLayer + subresourceRange::layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01489)"}, {VALIDATION_ERROR_0a000cf4, "The spec valid usage text states 'If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-oldLayout-01658)"}, {VALIDATION_ERROR_0a000cf6, "The spec valid usage text states 'If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-oldLayout-01659)"}, {VALIDATION_ERROR_0a000d0e, "The spec valid usage text states 'If image has a single-plane color format or is not disjoint, then the aspectMask member of subresourceRange must be VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01671)"}, {VALIDATION_ERROR_0a000d10, "The spec valid usage text states 'If image has a multi-planar format and the image is disjoint, then the aspectMask member of subresourceRange must include either at least one of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, and VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; or must include VK_IMAGE_ASPECT_COLOR_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01672)"}, {VALIDATION_ERROR_0a000d12, "The spec valid usage text states 'If image has a multi-planar format with only two planes, then the aspectMask member of subresourceRange must not include VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01673)"}, + {VALIDATION_ERROR_0a000d78, "The spec valid usage text states 'If subresourceRange.levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange.baseMipLevel + subresourceRange.levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01724)"}, + {VALIDATION_ERROR_0a000d7a, "The spec valid usage text states 'If subresourceRange.layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange.baseArrayLayer + subresourceRange.layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-subresourceRange-01725)"}, + {VALIDATION_ERROR_0a000dcc, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01766)"}, + {VALIDATION_ERROR_0a000dce, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01767)"}, + {VALIDATION_ERROR_0a000dd0, "The spec valid usage text states 'If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in synchronization-queue-transfers.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-image-01768)"}, {VALIDATION_ERROR_0a006801, "The spec valid usage text states 'dstAccessMask must be a valid combination of VkAccessFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-dstAccessMask-parameter)"}, {VALIDATION_ERROR_0a00a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-image-parameter)"}, {VALIDATION_ERROR_0a00d401, "The spec valid usage text states 'newLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryBarrier-newLayout-parameter)"}, @@ -4493,16 +4710,19 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0a600154, "The spec valid usage text states '(baseArrayLayer + layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceLayers-baseArrayLayer-00170)"}, {VALIDATION_ERROR_0a600c01, "The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceLayers-aspectMask-parameter)"}, {VALIDATION_ERROR_0a600c03, "The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceLayers-aspectMask-requiredbitmask)"}, + {VALIDATION_ERROR_0a600d48, "The spec valid usage text states 'layerCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceLayers-layerCount-01700)"}, {VALIDATION_ERROR_0a8007fc, "The spec valid usage text states 'If levelCount is not VK_REMAINING_MIP_LEVELS, levelCount must be non-zero and (baseMipLevel + levelCount) must be less than or equal to the mipLevels specified in VkImageCreateInfo when the image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-levelCount-01022)"}, {VALIDATION_ERROR_0a8007fe, "The spec valid usage text states 'If layerCount is not VK_REMAINING_ARRAY_LAYERS, layerCount must be non-zero and (baseArrayLayer + layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-layerCount-01023)"}, {VALIDATION_ERROR_0a800800, "The spec valid usage text states 'If the imageType specified in VkImageCreateInfo when the image was created was VK_IMAGE_TYPE_3D and the image view is created with the viewType of VkImageViewCreateInfo set to VK_IMAGE_VIEW_TYPE_2D_ARRAY then layerCount must be VK_REMAINING_ARRAY_LAYERS, or layerCount must be non-zero and (baseArrayLayer + layerCount) must be less than or equal to the extent.depth specified in VkImageCreateInfo when the image was created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSubresourceRange-imageType-01024)"}, {VALIDATION_ERROR_0a800802, "The spec valid usage text states 'If the imageType specified in VkImageCreateInfo when the image was created was not VK_IMAGE_TYPE_3D or the image view is not created with the viewType of VkImageViewCreateInfo set to VK_IMAGE_VIEW_TYPE_2D_ARRAY then layerCount must be VK_REMAINING_ARRAY_LAYERS, or layerCount must be non-zero and (baseArrayLayer + layerCount) must be less than or equal to the arrayLayers specified in VkImageCreateInfo when the image was created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSubresourceRange-imageType-01025)"}, {VALIDATION_ERROR_0a800c01, "The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-aspectMask-parameter)"}, {VALIDATION_ERROR_0a800c03, "The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-aspectMask-requiredbitmask)"}, - {VALIDATION_ERROR_0a800d0c, "The spec valid usage text states 'If aspectMask includes VK_IMAGE_ASPECT_COLOR_BIT, then it must not include any of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-aspectMask-01670)"}, - {VALIDATION_ERROR_0aa007c6, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, the fields of VkImageCreateInfo must match the implied image creation parameters of the swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-swapchain-00995)"}, - {VALIDATION_ERROR_0aa2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_0aa2f001, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-swapchain-parameter)"}, + {VALIDATION_ERROR_0a800d0c, "The spec valid usage text states 'If aspectMask includes VK_IMAGE_ASPECT_COLOR_BIT, then it must not include any of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSubresourceRange-aspectMask-01670)"}, + {VALIDATION_ERROR_0a800d70, "The spec valid usage text states 'If levelCount is not VK_REMAINING_MIP_LEVELS, it must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-levelCount-01720)"}, + {VALIDATION_ERROR_0a800d72, "The spec valid usage text states 'If layerCount is not VK_REMAINING_ARRAY_LAYERS, it must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageSubresourceRange-layerCount-01721)"}, + {VALIDATION_ERROR_0aa007c6, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, the fields of VkImageCreateInfo must match the implied image creation parameters of the swapchain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-swapchain-00995)"}, + {VALIDATION_ERROR_0aa2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_0aa2f001, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageSwapchainCreateInfoKHX-swapchain-parameter)"}, {VALIDATION_ERROR_0ac007d6, "The spec valid usage text states 'If image was not created with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then viewType must not be VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01003)"}, {VALIDATION_ERROR_0ac007d8, "The spec valid usage text states 'If the image cubemap arrays feature is not enabled, viewType must not be VK_IMAGE_VIEW_TYPE_CUBE_ARRAY' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-viewType-01004)"}, {VALIDATION_ERROR_0ac007da, "The spec valid usage text states 'If image was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set then viewType must not be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01005)"}, @@ -4518,13 +4738,13 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0ac007ee, "The spec valid usage text states 'If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, format must be supported for color attachments, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01015)"}, {VALIDATION_ERROR_0ac007f0, "The spec valid usage text states 'If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, format must be supported for depth/stencil attachments, as specified by the VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01016)"}, {VALIDATION_ERROR_0ac007f2, "The spec valid usage text states 'subresourceRange must be a valid image subresource range for image (see Image Views)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01017)"}, - {VALIDATION_ERROR_0ac007f4, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01018)"}, - {VALIDATION_ERROR_0ac007f6, "The spec valid usage text states 'If image was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag,' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01019)"}, + {VALIDATION_ERROR_0ac007f4, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, format must be compatible with the format used to create image, as defined in Format Compatibility Classes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01018)"}, + {VALIDATION_ERROR_0ac007f6, "The spec valid usage text states 'If image was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, format must be identical to the format used to create image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01019)"}, {VALIDATION_ERROR_0ac007f8, "The spec valid usage text states 'If image is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01020)"}, {VALIDATION_ERROR_0ac007fa, "The spec valid usage text states 'subresourceRange and viewType must be compatible with the image, as described in the compatibility table' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subResourceRange-01021)"}, - {VALIDATION_ERROR_0ac00b8c, "The spec valid usage text states 'subresourceRange::baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01478)"}, + {VALIDATION_ERROR_0ac00b8c, "The spec valid usage text states 'subresourceRange.baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01478)"}, {VALIDATION_ERROR_0ac00b8e, "The spec valid usage text states 'If subresourceRange::levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange::levelCount must be non-zero and subresourceRange::baseMipLevel + subresourceRange::levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01479)"}, - {VALIDATION_ERROR_0ac00b90, "The spec valid usage text states 'subresourceRange::baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01480)"}, + {VALIDATION_ERROR_0ac00b90, "The spec valid usage text states 'subresourceRange.baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01480)"}, {VALIDATION_ERROR_0ac00b92, "The spec valid usage text states 'If subresourceRange::layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange::layerCount must be non-zero and subresourceRange::baseArrayLayer + subresourceRange::layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01481)"}, {VALIDATION_ERROR_0ac00b94, "The spec valid usage text states 'If image is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, or viewType is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01482)"}, {VALIDATION_ERROR_0ac00b96, "The spec valid usage text states 'If subresourceRange::layerCount is not VK_REMAINING_ARRAY_LAYERS, image is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, or viewType is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::layerCount must be non-zero and subresourceRange::baseArrayLayer + subresourceRange::layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01483)"}, @@ -4533,7 +4753,13 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0ac00c5e, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, format must be compatible with, or must be an uncompressed format that is size-compatible with, the format used to create image.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01583)"}, {VALIDATION_ERROR_0ac00c60, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, the levelCount and layerCount members of subresourceRange must both be 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01584)"}, {VALIDATION_ERROR_0ac00c62, "The spec valid usage text states 'If a VkImageFormatListCreateInfoKHR structure was included in the pNext chain of the VkImageCreateInfo struct used when creating image and the viewFormatCount field of VkImageFormatListCreateInfoKHR is not zero then format must be one of the formats in VkImageFormatListCreateInfoKHR::pViewFormats.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-pNext-01585)"}, - {VALIDATION_ERROR_0ac00c64, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the format of the image is a multi-planar format, and if subresourceRange.aspectMask is one of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR, then format must be compatible with the VkFormat for the plane of the image format indicated by subresourceRange.aspectMask, as defined in Compatible formats of planes of multi-planar formats' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01586)"}, + {VALIDATION_ERROR_0ac00c64, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the format of the image is a multi-planar format, and if subresourceRange.aspectMask is one of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR, then format must be compatible with the VkFormat for the plane of the image format indicated by subresourceRange.aspectMask, as defined in features-formats-compatible-planes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01586)"}, + {VALIDATION_ERROR_0ac00d6c, "The spec valid usage text states 'If subresourceRange.levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange.baseMipLevel + subresourceRange.levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01718)"}, + {VALIDATION_ERROR_0ac00d6e, "The spec valid usage text states 'If subresourceRange.layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange.baseArrayLayer + subresourceRange.layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-01719)"}, + {VALIDATION_ERROR_0ac00dbe, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, format must be compatible with the format used to create image, as defined in Format Compatibility Classes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01759)"}, + {VALIDATION_ERROR_0ac00dc0, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the format of the image is not a multi-planar format, format must be compatible with the format used to create image, as defined in Format Compatibility Classes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01760)"}, + {VALIDATION_ERROR_0ac00dc2, "The spec valid usage text states 'If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, and if the format of the image is not a multi-planar format, format must be compatible with the format used to create image, as defined in Format Compatibility Classes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01761)"}, + {VALIDATION_ERROR_0ac00dc4, "The spec valid usage text states 'If image was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag,' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01762)"}, {VALIDATION_ERROR_0ac02c01, "The spec valid usage text states 'components must be a valid VkComponentMapping structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-components-parameter)"}, {VALIDATION_ERROR_0ac09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_0ac09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-format-parameter)"}, @@ -4543,85 +4769,86 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0ac2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-sType-unique)"}, {VALIDATION_ERROR_0ac2ea01, "The spec valid usage text states 'subresourceRange must be a valid VkImageSubresourceRange structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-subresourceRange-parameter)"}, {VALIDATION_ERROR_0ac30801, "The spec valid usage text states 'viewType must be a valid VkImageViewType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-viewType-parameter)"}, - {VALIDATION_ERROR_0ae00536, "The spec valid usage text states 'If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00667)"}, + {VALIDATION_ERROR_0ae00536, "The spec valid usage text states 'If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00667)"}, {VALIDATION_ERROR_0ae00538, "The spec valid usage text states 'The memory from which fd was exported must have been created on the same underlying physical device as device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-fd-00668)"}, - {VALIDATION_ERROR_0ae0053a, "The spec valid usage text states 'If handleType is not 0, it must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00669)"}, - {VALIDATION_ERROR_0ae0053c, "The spec valid usage text states 'If handleType is not 0, fd must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00670)"}, - {VALIDATION_ERROR_0ae00be0, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-fd-01520)"}, - {VALIDATION_ERROR_0ae09c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0ae1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0ae2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0b000524, "The spec valid usage text states 'If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00658)"}, - {VALIDATION_ERROR_0b000526, "The spec valid usage text states 'The memory from which handle was exported, or the memory named by name must have been created on the same underlying physical device as device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-00659)"}, - {VALIDATION_ERROR_0b000528, "The spec valid usage text states 'If handleType is not 0, it must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00660)"}, - {VALIDATION_ERROR_0b00052a, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00661)"}, - {VALIDATION_ERROR_0b000b3e, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01439)"}, - {VALIDATION_ERROR_0b000b40, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid memory resource of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01440)"}, - {VALIDATION_ERROR_0b000b42, "The spec valid usage text states 'if handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-01441)"}, - {VALIDATION_ERROR_0b000bdc, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-01518)"}, - {VALIDATION_ERROR_0b000bde, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-name-01519)"}, - {VALIDATION_ERROR_0b009c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0b01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0b02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0b200a5e, "The spec valid usage text states 'handleType must not have more than one bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handleType-01327)"}, - {VALIDATION_ERROR_0b200a60, "The spec valid usage text states 'handle must be a valid handle to memory, obtained as specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handle-01328)"}, - {VALIDATION_ERROR_0b209c01, "The spec valid usage text states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter)"}, - {VALIDATION_ERROR_0b21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_0b22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-sType-sType)"}, - {VALIDATION_ERROR_0b4008ee, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportSemaphoreFdInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-handleType-01143)"}, + {VALIDATION_ERROR_0ae0053a, "The spec valid usage text states 'If handleType is not 0, it must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00669)"}, + {VALIDATION_ERROR_0ae0053c, "The spec valid usage text states 'If handleType is not 0, fd must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-00670)"}, + {VALIDATION_ERROR_0ae00be0, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-fd-01520)"}, + {VALIDATION_ERROR_0ae00da4, "The spec valid usage text states 'The memory represented by fd must have been created from a physical device and driver that is compatible with device and handleType, as described in external-memory-handle-types-compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-fd-01746)"}, + {VALIDATION_ERROR_0ae09c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0ae1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0ae2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0b000524, "The spec valid usage text states 'If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00658)"}, + {VALIDATION_ERROR_0b000526, "The spec valid usage text states 'The memory from which handle was exported, or the memory named by name must have been created on the same underlying physical device as device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-00659)"}, + {VALIDATION_ERROR_0b000528, "The spec valid usage text states 'If handleType is not 0, it must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00660)"}, + {VALIDATION_ERROR_0b00052a, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00661)"}, + {VALIDATION_ERROR_0b000b3e, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01439)"}, + {VALIDATION_ERROR_0b000b40, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid memory resource of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01440)"}, + {VALIDATION_ERROR_0b000b42, "The spec valid usage text states 'if handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-01441)"}, + {VALIDATION_ERROR_0b000bdc, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handle-01518)"}, + {VALIDATION_ERROR_0b000bde, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-name-01519)"}, + {VALIDATION_ERROR_0b009c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0b01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0b02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0b200a5e, "The spec valid usage text states 'handleType must not have more than one bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handleType-01327)"}, + {VALIDATION_ERROR_0b200a60, "The spec valid usage text states 'handle must be a valid handle to memory, obtained as specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handle-01328)"}, + {VALIDATION_ERROR_0b209c01, "The spec valid usage text states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter)"}, + {VALIDATION_ERROR_0b21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_0b22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryWin32HandleInfoNV-sType-sType)"}, + {VALIDATION_ERROR_0b4008ee, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportSemaphoreFdInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-handleType-01143)"}, {VALIDATION_ERROR_0b4008f0, "The spec valid usage text states 'The semaphore from which handleType was exported must have been created on the same underlying physical device as semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-handleType-01144)"}, - {VALIDATION_ERROR_0b400c10, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-fd-01544)"}, - {VALIDATION_ERROR_0b409001, "The spec valid usage text states 'flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_0b409c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0b41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0b42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0b42b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-semaphore-parameter)"}, - {VALIDATION_ERROR_0b6008e8, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportSemaphoreWin32HandleInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01140)"}, + {VALIDATION_ERROR_0b400c10, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-fd-01544)"}, + {VALIDATION_ERROR_0b409001, "The spec valid usage text states 'flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_0b409c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0b41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0b42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0b42b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreFdInfoKHR-semaphore-parameter)"}, + {VALIDATION_ERROR_0b6008e8, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportSemaphoreWin32HandleInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01140)"}, {VALIDATION_ERROR_0b6008ea, "The spec valid usage text states 'The semaphore from which handleType or name was exported must have been created on the same underlying physical device as semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01141)"}, - {VALIDATION_ERROR_0b600b74, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01466)"}, - {VALIDATION_ERROR_0b600b76, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01467)"}, - {VALIDATION_ERROR_0b600b78, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01468)"}, - {VALIDATION_ERROR_0b600b7a, "The spec valid usage text states 'If handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01469)"}, - {VALIDATION_ERROR_0b600c0c, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01542)"}, - {VALIDATION_ERROR_0b600c0e, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-name-01543)"}, - {VALIDATION_ERROR_0b609001, "The spec valid usage text states 'flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_0b609c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0b600b74, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01466)"}, + {VALIDATION_ERROR_0b600b76, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01467)"}, + {VALIDATION_ERROR_0b600b78, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01468)"}, + {VALIDATION_ERROR_0b600b7a, "The spec valid usage text states 'If handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01469)"}, + {VALIDATION_ERROR_0b600c0c, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01542)"}, + {VALIDATION_ERROR_0b600c0e, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-name-01543)"}, + {VALIDATION_ERROR_0b609001, "The spec valid usage text states 'flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_0b609c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-parameter)"}, {VALIDATION_ERROR_0b609c03, "The spec valid usage text states 'handleType must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-requiredbitmask)"}, - {VALIDATION_ERROR_0b61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0b62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0b62b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-semaphore-parameter)"}, - {VALIDATION_ERROR_0b800a86, "The spec valid usage text states 'tokenCount must be greater than 0 and below VkDeviceGeneratedCommandsLimitsNVX::maxIndirectCommandsLayoutTokenCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-01347)"}, - {VALIDATION_ERROR_0b800a88, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, then pipelineBindPoint must not be VK_PIPELINE_BIND_POINT_COMPUTE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-computeBindingPointSupport-01348)"}, - {VALIDATION_ERROR_0b800a8a, "The spec valid usage text states 'If pTokens contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX it must be the first element of the array and there must be only a single element of such token type.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01349)"}, - {VALIDATION_ERROR_0b800a8c, "The spec valid usage text states 'All state binding tokens in pTokens must occur prior work provoking tokens (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX).' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01350)"}, - {VALIDATION_ERROR_0b800a8e, "The spec valid usage text states 'The content of pTokens must include one single work provoking token that is compatible with the pipelineBindPoint.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01351)"}, - {VALIDATION_ERROR_0b809001, "The spec valid usage text states 'flags must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-parameter)"}, - {VALIDATION_ERROR_0b809003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0b81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pNext-pNext)"}, - {VALIDATION_ERROR_0b826001, "The spec valid usage text states 'pTokens must be a pointer to an array of tokenCount valid VkIndirectCommandsLayoutTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-parameter)"}, - {VALIDATION_ERROR_0b827e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pipelineBindPoint-parameter)"}, - {VALIDATION_ERROR_0b82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-sType-sType)"}, - {VALIDATION_ERROR_0b82fc1b, "The spec valid usage text states 'tokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-arraylength)"}, - {VALIDATION_ERROR_0ba00a7c, "The spec valid usage text states 'bindingUnit must stay within device supported limits for the appropriate commands.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-bindingUnit-01342)"}, - {VALIDATION_ERROR_0ba00a7e, "The spec valid usage text states 'dynamicCount must stay within device supported limits for the appropriate commands.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-dynamicCount-01343)"}, - {VALIDATION_ERROR_0ba00a80, "The spec valid usage text states 'divisor must be greater than 0 and a power of two.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-divisor-01344)"}, - {VALIDATION_ERROR_0ba2fe01, "The spec valid usage text states 'tokenType must be a valid VkIndirectCommandsTokenTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-tokenType-parameter)"}, - {VALIDATION_ERROR_0bc00a82, "The spec valid usage text states 'The buffer's usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-buffer-01345)"}, - {VALIDATION_ERROR_0bc00a84, "The spec valid usage text states 'The offset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minCommandsTokenBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-offset-01346)"}, - {VALIDATION_ERROR_0bc01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-buffer-parameter)"}, - {VALIDATION_ERROR_0bc2fe01, "The spec valid usage text states 'tokenType must be a valid VkIndirectCommandsTokenTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-tokenType-parameter)"}, + {VALIDATION_ERROR_0b61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0b62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0b62b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportSemaphoreWin32HandleInfoKHR-semaphore-parameter)"}, + {VALIDATION_ERROR_0b800a86, "The spec valid usage text states 'tokenCount must be greater than 0 and below VkDeviceGeneratedCommandsLimitsNVX::maxIndirectCommandsLayoutTokenCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-01347)"}, + {VALIDATION_ERROR_0b800a88, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, then pipelineBindPoint must not be VK_PIPELINE_BIND_POINT_COMPUTE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-computeBindingPointSupport-01348)"}, + {VALIDATION_ERROR_0b800a8a, "The spec valid usage text states 'If pTokens contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX it must be the first element of the array and there must be only a single element of such token type.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01349)"}, + {VALIDATION_ERROR_0b800a8c, "The spec valid usage text states 'All state binding tokens in pTokens must occur prior work provoking tokens (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX).' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01350)"}, + {VALIDATION_ERROR_0b800a8e, "The spec valid usage text states 'The content of pTokens must include one single work provoking token that is compatible with the pipelineBindPoint.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01351)"}, + {VALIDATION_ERROR_0b809001, "The spec valid usage text states 'flags must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-parameter)"}, + {VALIDATION_ERROR_0b809003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0b81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pNext-pNext)"}, + {VALIDATION_ERROR_0b826001, "The spec valid usage text states 'pTokens must be a valid pointer to an array of tokenCount valid VkIndirectCommandsLayoutTokenNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-parameter)"}, + {VALIDATION_ERROR_0b827e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-pipelineBindPoint-parameter)"}, + {VALIDATION_ERROR_0b82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-sType-sType)"}, + {VALIDATION_ERROR_0b82fc1b, "The spec valid usage text states 'tokenCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-arraylength)"}, + {VALIDATION_ERROR_0ba00a7c, "The spec valid usage text states 'bindingUnit must stay within device supported limits for the appropriate commands.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-bindingUnit-01342)"}, + {VALIDATION_ERROR_0ba00a7e, "The spec valid usage text states 'dynamicCount must stay within device supported limits for the appropriate commands.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-dynamicCount-01343)"}, + {VALIDATION_ERROR_0ba00a80, "The spec valid usage text states 'divisor must be greater than 0 and a power of two.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-divisor-01344)"}, + {VALIDATION_ERROR_0ba2fe01, "The spec valid usage text states 'tokenType must be a valid VkIndirectCommandsTokenTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsLayoutTokenNVX-tokenType-parameter)"}, + {VALIDATION_ERROR_0bc00a82, "The spec valid usage text states 'The buffer's usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-buffer-01345)"}, + {VALIDATION_ERROR_0bc00a84, "The spec valid usage text states 'The offset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minCommandsTokenBufferOffsetAlignment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-offset-01346)"}, + {VALIDATION_ERROR_0bc01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-buffer-parameter)"}, + {VALIDATION_ERROR_0bc2fe01, "The spec valid usage text states 'tokenType must be a valid VkIndirectCommandsTokenTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkIndirectCommandsTokenNVX-tokenType-parameter)"}, {VALIDATION_ERROR_0be09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_0be0ee01, "The spec valid usage text states 'If pApplicationInfo is not NULL, pApplicationInfo must be a pointer to a valid VkApplicationInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-pApplicationInfo-parameter)"}, + {VALIDATION_ERROR_0be0ee01, "The spec valid usage text states 'If pApplicationInfo is not NULL, pApplicationInfo must be a valid pointer to a valid VkApplicationInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-pApplicationInfo-parameter)"}, {VALIDATION_ERROR_0be1c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDebugReportCallbackCreateInfoEXT or VkValidationFlagsEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_0be28e01, "The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter)"}, - {VALIDATION_ERROR_0be29001, "The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter)"}, + {VALIDATION_ERROR_0be28e01, "The spec valid usage text states 'If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter)"}, + {VALIDATION_ERROR_0be29001, "The spec valid usage text states 'If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter)"}, {VALIDATION_ERROR_0be2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0be2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInstanceCreateInfo-sType-unique)"}, - {VALIDATION_ERROR_0c000a4a, "The spec valid usage text states 'pView must be a valid NSView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-pView-01317)"}, - {VALIDATION_ERROR_0c009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-flags-zerobitmask)"}, - {VALIDATION_ERROR_0c01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-pNext-pNext)"}, + {VALIDATION_ERROR_0c000a4a, "The spec valid usage text states 'pView must be a valid NSView and must be backed by a CALayer instance of type CAMetalLayer.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-pView-01317)"}, + {VALIDATION_ERROR_0c009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-flags-zerobitmask)"}, + {VALIDATION_ERROR_0c01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-pNext-pNext)"}, {VALIDATION_ERROR_0c026a01, "The spec valid usage text states 'pView must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-pView-parameter)"}, - {VALIDATION_ERROR_0c02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-sType-sType)"}, + {VALIDATION_ERROR_0c02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMacOSSurfaceCreateInfoMVK-sType-sType)"}, {VALIDATION_ERROR_0c200558, "The spec valid usage text states 'memory must be currently mapped' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-memory-00684)"}, {VALIDATION_ERROR_0c20055a, "The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, offset and size must specify a range contained within the currently mapped range of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-size-00685)"}, {VALIDATION_ERROR_0c20055c, "The spec valid usage text states 'If size is equal to VK_WHOLE_SIZE, offset must be within the currently mapped range of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-size-00686)"}, @@ -4632,13 +4859,13 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0c20c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-memory-parameter)"}, {VALIDATION_ERROR_0c21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-pNext-pNext)"}, {VALIDATION_ERROR_0c22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMappedMemoryRange-sType-sType)"}, - {VALIDATION_ERROR_0c400546, "The spec valid usage text states 'If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must be a valid device mask.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00675)"}, - {VALIDATION_ERROR_0c400548, "The spec valid usage text states 'If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00676)"}, - {VALIDATION_ERROR_0c409001, "The spec valid usage text states 'flags must be a valid combination of VkMemoryAllocateFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-flags-parameter)"}, - {VALIDATION_ERROR_0c42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_0c400546, "The spec valid usage text states 'If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must be a valid device mask.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00675)"}, + {VALIDATION_ERROR_0c400548, "The spec valid usage text states 'If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00676)"}, + {VALIDATION_ERROR_0c409001, "The spec valid usage text states 'flags must be a valid combination of VkMemoryAllocateFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-flags-parameter)"}, + {VALIDATION_ERROR_0c42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateFlagsInfoKHX-sType-sType)"}, {VALIDATION_ERROR_0c6004fa, "The spec valid usage text states 'allocationSize must be less than or equal to the amount of memory available to the VkMemoryHeap specified by memoryTypeIndex and the calling command's VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-00637)"}, {VALIDATION_ERROR_0c6004fc, "The spec valid usage text states 'allocationSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-00638)"}, - {VALIDATION_ERROR_0c6004fe, "The spec valid usage text states 'If the pNext chain contains an instance of VkExportMemoryAllocateInfoKHR, and any of the handle types specified in VkExportMemoryAllocateInfoKHR::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2KHR in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::externalMemoryFeatures or VkExternalBufferPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00639)"}, + {VALIDATION_ERROR_0c6004fe, "The spec valid usage text states 'If the pNext chain contains an instance of VkExportMemoryAllocateInfoKHR, and any of the handle types specified in VkExportMemoryAllocateInfoKHR::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2KHR in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::externalMemoryFeatures or VkExternalBufferPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of ifdef::VK_KHR_dedicated_allocation[VkMemoryDedicatedAllocateInfoKHR] ifdef::VK_KHR_dedicated_allocation+VK_NV_dedicated_allocation[or] ifdef::VK_NV_dedicated_allocation[VkDedicatedAllocationMemoryAllocateInfoNV] with either its image or buffer field set to a value other than VK_NULL_HANDLE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00639)"}, {VALIDATION_ERROR_0c600500, "The spec valid usage text states 'If the pNext chain contains an instance of VkExportMemoryAllocateInfoKHR, it must not contain an instance of VkExportMemoryAllocateInfoNV or VkExportMemoryWin32HandleInfoNV.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00640)"}, {VALIDATION_ERROR_0c600502, "The spec valid usage text states 'If the pNext chain contains an instance of VkImportMemoryWin32HandleInfoKHR, it must not contain an instance of VkImportMemoryWin32HandleInfoNV.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00641)"}, {VALIDATION_ERROR_0c600504, "The spec valid usage text states 'If the parameters define an import operation and the external handle specified was created by the Vulkan API, the values of allocationSize and memoryTypeIndex must match those specified when the memory object being imported was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-00642)"}, @@ -4648,111 +4875,115 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0c60050c, "The spec valid usage text states 'If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, allocationSize must match the size reported in the memory requirements of the image or buffer member of the instance of VkDedicatedAllocationMemoryAllocateInfoNV included in the pNext chain.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-00646)"}, {VALIDATION_ERROR_0c60050e, "The spec valid usage text states 'If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, allocationSize must match the size specified when creating the Direct3D 12 heap from which the external handle was extracted.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-00647)"}, {VALIDATION_ERROR_0c600510, "The spec valid usage text states 'If the parameters define an import operation and the external handle is a POSIX file descriptor created outside of the Vulkan API, the value of memoryTypeIndex must be one of those returned by vkGetMemoryFdPropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-memoryTypeIndex-00648)"}, - {VALIDATION_ERROR_0c61c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfoKHR, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportMemoryFdInfoKHR, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfoKHX, or VkMemoryDedicatedAllocateInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-pNext)"}, + {VALIDATION_ERROR_0c600d9c, "The spec valid usage text states 'If the parameters define an import operation, the external handle specified was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, then the values of allocationSize and memoryTypeIndex must match those specified when the memory object being imported was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-01742)"}, + {VALIDATION_ERROR_0c600d9e, "The spec valid usage text states 'If the parameters define an import operation, the external handle was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR, then the values of allocationSize and memoryTypeIndex must match those specified when the memory object being imported was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-01743)"}, + {VALIDATION_ERROR_0c600da0, "The spec valid usage text states 'If the parameters define an import operation and the external handle is a host pointer, the value of memoryTypeIndex must be one of those returned by vkGetMemoryHostPointerPropertiesEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-memoryTypeIndex-01744)"}, + {VALIDATION_ERROR_0c600da2, "The spec valid usage text states 'If the parameters define an import operation and the external handle is a host pointer, allocationSize must be an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryAllocateInfo-allocationSize-01745)"}, + {VALIDATION_ERROR_0c61c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfoKHR, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfoKHX, or VkMemoryDedicatedAllocateInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0c62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-sType-sType)"}, {VALIDATION_ERROR_0c62b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-sType-unique)"}, {VALIDATION_ERROR_0c806801, "The spec valid usage text states 'dstAccessMask must be a valid combination of VkAccessFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryBarrier-dstAccessMask-parameter)"}, {VALIDATION_ERROR_0c81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryBarrier-pNext-pNext)"}, {VALIDATION_ERROR_0c82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_BARRIER' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryBarrier-sType-sType)"}, {VALIDATION_ERROR_0c82c401, "The spec valid usage text states 'srcAccessMask must be a valid combination of VkAccessFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryBarrier-srcAccessMask-parameter)"}, - {VALIDATION_ERROR_0ca009de, "The spec valid usage text states 'connection must point to a valid MirConnection.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-connection-01263)"}, - {VALIDATION_ERROR_0ca009e0, "The spec valid usage text states 'surface must point to a valid MirSurface.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-surface-01264)"}, - {VALIDATION_ERROR_0ca09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_0ca1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0ca2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0cc00a96, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, pObjectEntryUsageFlags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-computeBindingPointSupport-01355)"}, - {VALIDATION_ERROR_0cc00a98, "The spec valid usage text states 'Any value within pObjectEntryCounts must not exceed VkDeviceGeneratedCommandsLimitsNVX::maxObjectEntryCounts' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-01356)"}, - {VALIDATION_ERROR_0cc00a9a, "The spec valid usage text states 'maxUniformBuffersPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxUniformBuffersPerDescriptor-01357)"}, - {VALIDATION_ERROR_0cc00a9c, "The spec valid usage text states 'maxStorageBuffersPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxStorageBuffersPerDescriptor-01358)"}, - {VALIDATION_ERROR_0cc00a9e, "The spec valid usage text states 'maxStorageImagesPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxStorageImagesPerDescriptor-01359)"}, - {VALIDATION_ERROR_0cc00aa0, "The spec valid usage text states 'maxSampledImagesPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxSampledImagesPerDescriptor-01360)"}, - {VALIDATION_ERROR_0cc0d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-objectCount-arraylength)"}, - {VALIDATION_ERROR_0cc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pNext-pNext)"}, - {VALIDATION_ERROR_0cc1c601, "The spec valid usage text states 'pObjectEntryCounts must be a pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-parameter)"}, - {VALIDATION_ERROR_0cc1c801, "The spec valid usage text states 'pObjectEntryTypes must be a pointer to an array of objectCount valid VkObjectEntryTypeNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryTypes-parameter)"}, - {VALIDATION_ERROR_0cc1ca01, "The spec valid usage text states 'pObjectEntryUsageFlags must be a pointer to an array of objectCount valid combinations of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-parameter)"}, - {VALIDATION_ERROR_0cc1ca03, "The spec valid usage text states 'Each element of pObjectEntryUsageFlags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-requiredbitmask)"}, - {VALIDATION_ERROR_0cc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-sType-sType)"}, - {VALIDATION_ERROR_0ce00009, "The spec valid usage text states 'Both of descriptorSet, and pipelineLayout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-commonparent)"}, - {VALIDATION_ERROR_0ce00ab2, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-type-01369)"}, - {VALIDATION_ERROR_0ce04801, "The spec valid usage text states 'descriptorSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-descriptorSet-parameter)"}, - {VALIDATION_ERROR_0ce09001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0ce09003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0ce28201, "The spec valid usage text states 'pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-pipelineLayout-parameter)"}, - {VALIDATION_ERROR_0ce30401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0d000aae, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, flags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableEntryNVX-computeBindingPointSupport-01367)"}, - {VALIDATION_ERROR_0d009001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0d009003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0d030401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0d200ab6, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-type-01371)"}, - {VALIDATION_ERROR_0d201a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-buffer-parameter)"}, - {VALIDATION_ERROR_0d209001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0d209003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0d20b201, "The spec valid usage text states 'indexType must be a valid VkIndexType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-indexType-parameter)"}, - {VALIDATION_ERROR_0d230401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0d400ab0, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-type-01368)"}, - {VALIDATION_ERROR_0d409001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0d409003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0d427c01, "The spec valid usage text states 'pipeline must be a valid VkPipeline handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-pipeline-parameter)"}, - {VALIDATION_ERROR_0d430401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0d600ab8, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-type-01372)"}, - {VALIDATION_ERROR_0d609001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0d609003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0d628201, "The spec valid usage text states 'pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-pipelineLayout-parameter)"}, - {VALIDATION_ERROR_0d62dc01, "The spec valid usage text states 'stageFlags must be a valid combination of VkShaderStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-stageFlags-parameter)"}, - {VALIDATION_ERROR_0d62dc03, "The spec valid usage text states 'stageFlags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-stageFlags-requiredbitmask)"}, - {VALIDATION_ERROR_0d630401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0d800ab4, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-type-01370)"}, - {VALIDATION_ERROR_0d801a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-buffer-parameter)"}, - {VALIDATION_ERROR_0d809001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-flags-parameter)"}, - {VALIDATION_ERROR_0d809003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-flags-requiredbitmask)"}, - {VALIDATION_ERROR_0d830401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-type-parameter)"}, - {VALIDATION_ERROR_0da1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0da2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-sType-sType)"}, - {VALIDATION_ERROR_0dc09001, "The spec valid usage text states 'flags must be a valid combination of VkBufferCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_0dc09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0dc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0dc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0dc30601, "The spec valid usage text states 'usage must be a valid combination of VkBufferUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-parameter)"}, - {VALIDATION_ERROR_0dc30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-requiredbitmask)"}, - {VALIDATION_ERROR_0de09c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0de2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_0e009c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_0e01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0e02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0ca009de, "The spec valid usage text states 'connection must point to a valid MirConnection.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-connection-01263)"}, + {VALIDATION_ERROR_0ca009e0, "The spec valid usage text states 'surface must point to a valid MirSurface.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-surface-01264)"}, + {VALIDATION_ERROR_0ca09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_0ca1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0ca2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMirSurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0cc00a96, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, pObjectEntryUsageFlags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-computeBindingPointSupport-01355)"}, + {VALIDATION_ERROR_0cc00a98, "The spec valid usage text states 'Any value within pObjectEntryCounts must not exceed VkDeviceGeneratedCommandsLimitsNVX::maxObjectEntryCounts' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-01356)"}, + {VALIDATION_ERROR_0cc00a9a, "The spec valid usage text states 'maxUniformBuffersPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxUniformBuffersPerDescriptor-01357)"}, + {VALIDATION_ERROR_0cc00a9c, "The spec valid usage text states 'maxStorageBuffersPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxStorageBuffersPerDescriptor-01358)"}, + {VALIDATION_ERROR_0cc00a9e, "The spec valid usage text states 'maxStorageImagesPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxStorageImagesPerDescriptor-01359)"}, + {VALIDATION_ERROR_0cc00aa0, "The spec valid usage text states 'maxSampledImagesPerDescriptor must be within the limits supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-maxSampledImagesPerDescriptor-01360)"}, + {VALIDATION_ERROR_0cc0d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-objectCount-arraylength)"}, + {VALIDATION_ERROR_0cc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pNext-pNext)"}, + {VALIDATION_ERROR_0cc1c601, "The spec valid usage text states 'pObjectEntryCounts must be a valid pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-parameter)"}, + {VALIDATION_ERROR_0cc1c801, "The spec valid usage text states 'pObjectEntryTypes must be a valid pointer to an array of objectCount valid VkObjectEntryTypeNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryTypes-parameter)"}, + {VALIDATION_ERROR_0cc1ca01, "The spec valid usage text states 'pObjectEntryUsageFlags must be a valid pointer to an array of objectCount valid combinations of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-parameter)"}, + {VALIDATION_ERROR_0cc1ca03, "The spec valid usage text states 'Each element of pObjectEntryUsageFlags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-requiredbitmask)"}, + {VALIDATION_ERROR_0cc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableCreateInfoNVX-sType-sType)"}, + {VALIDATION_ERROR_0ce00009, "The spec valid usage text states 'Both of descriptorSet, and pipelineLayout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-commonparent)"}, + {VALIDATION_ERROR_0ce00ab2, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-type-01369)"}, + {VALIDATION_ERROR_0ce04801, "The spec valid usage text states 'descriptorSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-descriptorSet-parameter)"}, + {VALIDATION_ERROR_0ce09001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0ce09003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0ce28201, "The spec valid usage text states 'pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-pipelineLayout-parameter)"}, + {VALIDATION_ERROR_0ce30401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableDescriptorSetEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0d000aae, "The spec valid usage text states 'If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, flags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableEntryNVX-computeBindingPointSupport-01367)"}, + {VALIDATION_ERROR_0d009001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0d009003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0d030401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0d200ab6, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-type-01371)"}, + {VALIDATION_ERROR_0d201a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-buffer-parameter)"}, + {VALIDATION_ERROR_0d209001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0d209003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0d20b201, "The spec valid usage text states 'indexType must be a valid VkIndexType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-indexType-parameter)"}, + {VALIDATION_ERROR_0d230401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableIndexBufferEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0d400ab0, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-type-01368)"}, + {VALIDATION_ERROR_0d409001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0d409003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0d427c01, "The spec valid usage text states 'pipeline must be a valid VkPipeline handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-pipeline-parameter)"}, + {VALIDATION_ERROR_0d430401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePipelineEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0d600ab8, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-type-01372)"}, + {VALIDATION_ERROR_0d609001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0d609003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0d628201, "The spec valid usage text states 'pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-pipelineLayout-parameter)"}, + {VALIDATION_ERROR_0d62dc01, "The spec valid usage text states 'stageFlags must be a valid combination of VkShaderStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-stageFlags-parameter)"}, + {VALIDATION_ERROR_0d62dc03, "The spec valid usage text states 'stageFlags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-stageFlags-requiredbitmask)"}, + {VALIDATION_ERROR_0d630401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTablePushConstantEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0d800ab4, "The spec valid usage text states 'type must be VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-type-01370)"}, + {VALIDATION_ERROR_0d801a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-buffer-parameter)"}, + {VALIDATION_ERROR_0d809001, "The spec valid usage text states 'flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-flags-parameter)"}, + {VALIDATION_ERROR_0d809003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-flags-requiredbitmask)"}, + {VALIDATION_ERROR_0d830401, "The spec valid usage text states 'type must be a valid VkObjectEntryTypeNVX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkObjectTableVertexBufferEntryNVX-type-parameter)"}, + {VALIDATION_ERROR_0da1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0da2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_0dc09001, "The spec valid usage text states 'flags must be a valid combination of VkBufferCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_0dc09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0dc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0dc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0dc30601, "The spec valid usage text states 'usage must be a valid combination of VkBufferUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-parameter)"}, + {VALIDATION_ERROR_0dc30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-requiredbitmask)"}, + {VALIDATION_ERROR_0de09c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0de2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_0e009c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_0e01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0e02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-sType-sType)"}, {VALIDATION_ERROR_0e200486, "The spec valid usage text states 'If any member of this structure is VK_FALSE, as returned by vkGetPhysicalDeviceFeatures, then it must be VK_FALSE when passed as part of the VkDeviceCreateInfo struct when creating a device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceFeatures-None-00579)"}, - {VALIDATION_ERROR_0e41c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_0e42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-sType-sType)"}, - {VALIDATION_ERROR_0e42b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-sType-unique)"}, - {VALIDATION_ERROR_0e609001, "The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-flags-parameter)"}, - {VALIDATION_ERROR_0e609201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-format-parameter)"}, - {VALIDATION_ERROR_0e61c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPhysicalDeviceExternalImageFormatInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_0e62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-sType-sType)"}, - {VALIDATION_ERROR_0e62fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-tiling-parameter)"}, - {VALIDATION_ERROR_0e630401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-type-parameter)"}, - {VALIDATION_ERROR_0e630601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-parameter)"}, - {VALIDATION_ERROR_0e630603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-requiredbitmask)"}, - {VALIDATION_ERROR_0e800488, "The spec valid usage text states 'If multiviewGeometryShader is enabled then multiview must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewGeometryShader-00580)"}, - {VALIDATION_ERROR_0e80048a, "The spec valid usage text states 'If multiviewTessellationShader is enabled then multiview must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewTessellationShader-00581)"}, - {VALIDATION_ERROR_0e82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-sType-sType)"}, - {VALIDATION_ERROR_0ea1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_0ea2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_0ec0088e, "The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, type, tiling, and usage equal to those in this command and flags equal to the value that is set in VkImageCreateInfo::flags when the image is created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-01095)"}, - {VALIDATION_ERROR_0ec09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-format-parameter)"}, - {VALIDATION_ERROR_0ec1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_0ec2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-sType-sType)"}, - {VALIDATION_ERROR_0ec2b401, "The spec valid usage text states 'samples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-parameter)"}, - {VALIDATION_ERROR_0ec2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-tiling-parameter)"}, - {VALIDATION_ERROR_0ec30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-type-parameter)"}, - {VALIDATION_ERROR_0ec30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-parameter)"}, - {VALIDATION_ERROR_0ec30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-requiredbitmask)"}, - {VALIDATION_ERROR_0ee1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_0ee2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType)"}, - {VALIDATION_ERROR_0ee2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter)"}, + {VALIDATION_ERROR_0e41c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_0e42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-sType-sType)"}, + {VALIDATION_ERROR_0e42b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceFeatures2KHR-sType-unique)"}, + {VALIDATION_ERROR_0e609001, "The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-flags-parameter)"}, + {VALIDATION_ERROR_0e609201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-format-parameter)"}, + {VALIDATION_ERROR_0e61c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPhysicalDeviceExternalImageFormatInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_0e62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-sType-sType)"}, + {VALIDATION_ERROR_0e62fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-tiling-parameter)"}, + {VALIDATION_ERROR_0e630401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-type-parameter)"}, + {VALIDATION_ERROR_0e630601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-parameter)"}, + {VALIDATION_ERROR_0e630603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-requiredbitmask)"}, + {VALIDATION_ERROR_0e800488, "The spec valid usage text states 'If multiviewGeometryShader is enabled then multiview must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewGeometryShader-00580)"}, + {VALIDATION_ERROR_0e80048a, "The spec valid usage text states 'If multiviewTessellationShader is enabled then multiview must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewTessellationShader-00581)"}, + {VALIDATION_ERROR_0e82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewFeaturesKHX-sType-sType)"}, + {VALIDATION_ERROR_0ea1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_0ea2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_0ec0088e, "The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, type, tiling, and usage equal to those in this command and flags equal to the value that is set in VkImageCreateInfo::flags when the image is created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-01095)"}, + {VALIDATION_ERROR_0ec09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-format-parameter)"}, + {VALIDATION_ERROR_0ec1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_0ec2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-sType-sType)"}, + {VALIDATION_ERROR_0ec2b401, "The spec valid usage text states 'samples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-parameter)"}, + {VALIDATION_ERROR_0ec2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-tiling-parameter)"}, + {VALIDATION_ERROR_0ec30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-type-parameter)"}, + {VALIDATION_ERROR_0ec30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-parameter)"}, + {VALIDATION_ERROR_0ec30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-requiredbitmask)"}, + {VALIDATION_ERROR_0ee1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_0ee2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType)"}, + {VALIDATION_ERROR_0ee2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter)"}, {VALIDATION_ERROR_0f000600, "The spec valid usage text states 'If initialDataSize is not 0, it must be equal to the size of pInitialData, as returned by vkGetPipelineCacheData when pInitialData was originally retrieved' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-initialDataSize-00768)"}, {VALIDATION_ERROR_0f000602, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must have been retrieved from a previous call to vkGetPipelineCacheData' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-initialDataSize-00769)"}, {VALIDATION_ERROR_0f009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_0f019601, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must be a pointer to an array of initialDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-pInitialData-parameter)"}, + {VALIDATION_ERROR_0f019601, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must be a valid pointer to an array of initialDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-pInitialData-parameter)"}, {VALIDATION_ERROR_0f01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0f02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCacheCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0f2004c0, "The spec valid usage text states 'If the dual source blending feature is not enabled, srcColorBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608)"}, @@ -4775,7 +5006,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0f4004bc, "The spec valid usage text states 'If the logic operations feature is not enabled, logicOpEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606)"}, {VALIDATION_ERROR_0f4004be, "The spec valid usage text states 'If logicOpEnable is VK_TRUE, logicOp must be a valid VkLogicOp value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00607)"}, {VALIDATION_ERROR_0f409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_0f40f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkPipelineColorBlendAttachmentState structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-parameter)"}, + {VALIDATION_ERROR_0f40f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkPipelineColorBlendAttachmentState structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-parameter)"}, {VALIDATION_ERROR_0f41c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPipelineColorBlendAdvancedStateCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0f42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendStateCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0f6004ac, "The spec valid usage text states 'If the depth bounds testing feature is not enabled, depthBoundsTestEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598)"}, @@ -4785,15 +5016,15 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0f609601, "The spec valid usage text states 'front must be a valid VkStencilOpState structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-front-parameter)"}, {VALIDATION_ERROR_0f61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0f62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType)"}, - {VALIDATION_ERROR_0f80048c, "The spec valid usage text states 'discardRectangleCount must be between 0 and VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleCount-00582)"}, - {VALIDATION_ERROR_0f805e01, "The spec valid usage text states 'discardRectangleMode must be a valid VkDiscardRectangleModeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter)"}, - {VALIDATION_ERROR_0f809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask)"}, - {VALIDATION_ERROR_0f81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_0f82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_0f80048c, "The spec valid usage text states 'discardRectangleCount must be between 0 and VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleCount-00582)"}, + {VALIDATION_ERROR_0f805e01, "The spec valid usage text states 'discardRectangleMode must be a valid VkDiscardRectangleModeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter)"}, + {VALIDATION_ERROR_0f809005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask)"}, + {VALIDATION_ERROR_0f81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_0f82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType)"}, {VALIDATION_ERROR_0fa00b44, "The spec valid usage text states 'Each element of pDynamicStates must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442)"}, {VALIDATION_ERROR_0fa07c1b, "The spec valid usage text states 'dynamicStateCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-dynamicStateCount-arraylength)"}, {VALIDATION_ERROR_0fa09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_0fa15801, "The spec valid usage text states 'pDynamicStates must be a pointer to an array of dynamicStateCount valid VkDynamicState values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter)"}, + {VALIDATION_ERROR_0fa15801, "The spec valid usage text states 'pDynamicStates must be a valid pointer to an array of dynamicStateCount valid VkDynamicState values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter)"}, {VALIDATION_ERROR_0fa1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_0fa2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-sType-sType)"}, {VALIDATION_ERROR_0fc00358, "The spec valid usage text states 'If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428)"}, @@ -4811,18 +5042,27 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_0fe00246, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorStorageImages' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00291)"}, {VALIDATION_ERROR_0fe00248, "The spec valid usage text states 'Any two elements of pPushConstantRanges must not include the same stage in stageFlags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-00292)"}, {VALIDATION_ERROR_0fe0024a, "The spec valid usage text states 'pSetLayouts must not contain more than one descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00293)"}, + {VALIDATION_ERROR_0fe00d18, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorInputAttachments' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01676)"}, + {VALIDATION_ERROR_0fe00d1a, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSamplers' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01677)"}, + {VALIDATION_ERROR_0fe00d1c, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stagess and and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetUniformBuffers' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01678)"}, + {VALIDATION_ERROR_0fe00d1e, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetUniformBuffersDynamic' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01679)"}, + {VALIDATION_ERROR_0fe00d20, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageBuffers' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01680)"}, + {VALIDATION_ERROR_0fe00d22, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageBuffersDynamic' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01681)"}, + {VALIDATION_ERROR_0fe00d24, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSampledImages' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01682)"}, + {VALIDATION_ERROR_0fe00d26, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageImages' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01683)"}, + {VALIDATION_ERROR_0fe00d28, "The spec valid usage text states 'The total number of descriptors of the type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetInputAttachments' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01684)"}, {VALIDATION_ERROR_0fe09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_0fe1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_0fe1f801, "The spec valid usage text states 'If pushConstantRangeCount is not 0, pPushConstantRanges must be a pointer to an array of pushConstantRangeCount valid VkPushConstantRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter)"}, - {VALIDATION_ERROR_0fe22c01, "The spec valid usage text states 'If setLayoutCount is not 0, pSetLayouts must be a pointer to an array of setLayoutCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter)"}, + {VALIDATION_ERROR_0fe1f801, "The spec valid usage text states 'If pushConstantRangeCount is not 0, pPushConstantRanges must be a valid pointer to an array of pushConstantRangeCount valid VkPushConstantRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter)"}, + {VALIDATION_ERROR_0fe22c01, "The spec valid usage text states 'If setLayoutCount is not 0, pSetLayouts must be a valid pointer to an array of setLayoutCount valid VkDescriptorSetLayout handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter)"}, {VALIDATION_ERROR_0fe2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineLayoutCreateInfo-sType-sType)"}, {VALIDATION_ERROR_10000620, "The spec valid usage text states 'If the sample rate shading feature is not enabled, sampleShadingEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784)"}, {VALIDATION_ERROR_10000622, "The spec valid usage text states 'If the alpha to one feature is not enabled, alphaToOneEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785)"}, {VALIDATION_ERROR_10000624, "The spec valid usage text states 'minSampleShading must be in the range [0,1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786)"}, - {VALIDATION_ERROR_10000b0e, "The spec valid usage text states 'If the subpass has any color attachments and rasterizationSamples is greater than the number of color samples, then minSampleShading must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415)"}, + {VALIDATION_ERROR_10000b0e, "The spec valid usage text states 'If the subpass has any color attachments and rasterizationSamples is greater than the number of color samples, then sampleShadingEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415)"}, {VALIDATION_ERROR_10009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_1001c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, or VkPipelineSampleLocationsStateCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_10022201, "The spec valid usage text states 'If pSampleMask is not NULL, pSampleMask must be a pointer to an array of (lceil{mathit{rasterizationSamples} over 32}rceil) VkSampleMask values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-pSampleMask-parameter)"}, + {VALIDATION_ERROR_10022201, "The spec valid usage text states 'If pSampleMask is not NULL, pSampleMask must be a valid pointer to an array of (lceil{mathit{rasterizationSamples} over 32}rceil) VkSampleMask values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-pSampleMask-parameter)"}, {VALIDATION_ERROR_1002a801, "The spec valid usage text states 'rasterizationSamples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter)"}, {VALIDATION_ERROR_1002b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-sType-sType)"}, {VALIDATION_ERROR_1002b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineMultisampleStateCreateInfo-sType-unique)"}, @@ -4834,11 +5074,12 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_10203a01, "The spec valid usage text states 'cullMode must be a valid combination of VkCullModeFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-cullMode-parameter)"}, {VALIDATION_ERROR_10209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_10209801, "The spec valid usage text states 'frontFace must be a valid VkFrontFace value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-frontFace-parameter)"}, - {VALIDATION_ERROR_1021c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkPipelineRasterizationStateRasterizationOrderAMD' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-pNext-pNext)"}, + {VALIDATION_ERROR_1021c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineRasterizationConservativeStateCreateInfoEXT or VkPipelineRasterizationStateRasterizationOrderAMD' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_10228601, "The spec valid usage text states 'polygonMode must be a valid VkPolygonMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-parameter)"}, {VALIDATION_ERROR_1022b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-sType-sType)"}, - {VALIDATION_ERROR_1042a601, "The spec valid usage text states 'rasterizationOrder must be a valid VkRasterizationOrderAMD value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter)"}, - {VALIDATION_ERROR_1042b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType)"}, + {VALIDATION_ERROR_1022b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-sType-unique)"}, + {VALIDATION_ERROR_1042a601, "The spec valid usage text states 'rasterizationOrder must be a valid VkRasterizationOrderAMD value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter)"}, + {VALIDATION_ERROR_1042b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType)"}, {VALIDATION_ERROR_10600580, "The spec valid usage text states 'If the geometry shaders feature is not enabled, stage must not be VK_SHADER_STAGE_GEOMETRY_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-stage-00704)"}, {VALIDATION_ERROR_10600582, "The spec valid usage text states 'If the tessellation shaders feature is not enabled, stage must not be VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-stage-00705)"}, {VALIDATION_ERROR_10600584, "The spec valid usage text states 'stage must not be VK_SHADER_STAGE_ALL_GRAPHICS, or VK_SHADER_STAGE_ALL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-stage-00706)"}, @@ -4860,7 +5101,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1060d201, "The spec valid usage text states 'module must be a valid VkShaderModule handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-module-parameter)"}, {VALIDATION_ERROR_1061c001, "The spec valid usage text states 'pName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pName-parameter)"}, {VALIDATION_ERROR_1061c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_10623a01, "The spec valid usage text states 'If pSpecializationInfo is not NULL, pSpecializationInfo must be a pointer to a valid VkSpecializationInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-parameter)"}, + {VALIDATION_ERROR_10623a01, "The spec valid usage text states 'If pSpecializationInfo is not NULL, pSpecializationInfo must be a valid pointer to a valid VkSpecializationInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-parameter)"}, {VALIDATION_ERROR_1062b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-sType-sType)"}, {VALIDATION_ERROR_1062d801, "The spec valid usage text states 'stage must be a valid VkShaderStageFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-stage-parameter)"}, {VALIDATION_ERROR_1080097c, "The spec valid usage text states 'patchControlPoints must be greater than zero and less than or equal to VkPhysicalDeviceLimits::maxTessellationPatchSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineTessellationStateCreateInfo-patchControlPoints-01214)"}, @@ -4874,50 +5115,51 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_10a004d2, "The spec valid usage text states 'All elements of pVertexAttributeDescriptions must describe distinct attribute locations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-00617)"}, {VALIDATION_ERROR_10a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_10a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_10a26401, "The spec valid usage text states 'If vertexAttributeDescriptionCount is not 0, pVertexAttributeDescriptions must be a pointer to an array of vertexAttributeDescriptionCount valid VkVertexInputAttributeDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-parameter)"}, - {VALIDATION_ERROR_10a26601, "The spec valid usage text states 'If vertexBindingDescriptionCount is not 0, pVertexBindingDescriptions must be a pointer to an array of vertexBindingDescriptionCount valid VkVertexInputBindingDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-parameter)"}, + {VALIDATION_ERROR_10a26401, "The spec valid usage text states 'If vertexAttributeDescriptionCount is not 0, pVertexAttributeDescriptions must be a valid pointer to an array of vertexAttributeDescriptionCount valid VkVertexInputAttributeDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-parameter)"}, + {VALIDATION_ERROR_10a26601, "The spec valid usage text states 'If vertexBindingDescriptionCount is not 0, pVertexBindingDescriptions must be a valid pointer to an array of vertexBindingDescriptionCount valid VkVertexInputBindingDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-parameter)"}, {VALIDATION_ERROR_10a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineVertexInputStateCreateInfo-sType-sType)"}, {VALIDATION_ERROR_10c00980, "The spec valid usage text states 'If the multiple viewports feature is not enabled, viewportCount must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216)"}, {VALIDATION_ERROR_10c00982, "The spec valid usage text states 'If the multiple viewports feature is not enabled, scissorCount must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217)"}, {VALIDATION_ERROR_10c00984, "The spec valid usage text states 'viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-viewportCount-01218)"}, {VALIDATION_ERROR_10c00986, "The spec valid usage text states 'scissorCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-scissorCount-01219)"}, {VALIDATION_ERROR_10c00988, "The spec valid usage text states 'scissorCount and viewportCount must be identical' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-scissorCount-01220)"}, + {VALIDATION_ERROR_10c00d7c, "The spec valid usage text states 'If the viewportWScalingEnable member of a VkPipelineViewportWScalingStateCreateInfoNV structure chained to the pNext chain is VK_TRUE, the viewportCount member of the VkPipelineViewportWScalingStateCreateInfoNV structure must be equal to viewportCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-viewportWScalingEnable-01726)"}, {VALIDATION_ERROR_10c09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-flags-zerobitmask)"}, {VALIDATION_ERROR_10c1c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineViewportSwizzleStateCreateInfoNV or VkPipelineViewportWScalingStateCreateInfoNV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_10c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-sType-sType)"}, {VALIDATION_ERROR_10c2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-sType-unique)"}, {VALIDATION_ERROR_10c2b61b, "The spec valid usage text states 'scissorCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-scissorCount-arraylength)"}, {VALIDATION_ERROR_10c30a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportStateCreateInfo-viewportCount-arraylength)"}, - {VALIDATION_ERROR_10e0097e, "The spec valid usage text states 'viewportCount must match the viewportCount set in VkPipelineViewportStateCreateInfo' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-01215)"}, - {VALIDATION_ERROR_10e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask)"}, - {VALIDATION_ERROR_10e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_10e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_10e30a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength)"}, + {VALIDATION_ERROR_10e0097e, "The spec valid usage text states 'viewportCount must match the viewportCount set in VkPipelineViewportStateCreateInfo' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-01215)"}, + {VALIDATION_ERROR_10e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask)"}, + {VALIDATION_ERROR_10e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_10e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_10e30a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength)"}, {VALIDATION_ERROR_11000a4e, "The spec valid usage text states 'If the multiple viewports feature is not enabled and viewportWScalingEnable is VK_TRUE, viewportCount must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportWScalingEnable-01319)"}, {VALIDATION_ERROR_11000a50, "The spec valid usage text states 'viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive if viewportWScalingEnable is VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-01320)"}, {VALIDATION_ERROR_11000a52, "The spec valid usage text states 'viewportCount and VkPipelineViewportStateCreateInfo::viewportCount must be identical if viewportWScalingEnable is VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-01321)"}, - {VALIDATION_ERROR_1102b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_11030a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength)"}, - {VALIDATION_ERROR_11200009, "The spec valid usage text states 'Both of the elements of pSwapchains, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-commonparent)"}, + {VALIDATION_ERROR_1102b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_11030a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength)"}, + {VALIDATION_ERROR_11200009, "The spec valid usage text states 'Both of the elements of pSwapchains, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-commonparent)"}, {VALIDATION_ERROR_11200a20, "The spec valid usage text states 'Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pImageIndices-01296)"}, {VALIDATION_ERROR_11200b2c, "The spec valid usage text states 'Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout at the time the operation is executed on a VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pImageIndices-01430)"}, - {VALIDATION_ERROR_11218801, "The spec valid usage text states 'pImageIndices must be a pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pImageIndices-parameter)"}, - {VALIDATION_ERROR_1121c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHX, VkDisplayPresentInfoKHR, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_11221e01, "The spec valid usage text states 'If pResults is not NULL, pResults must be a pointer to an array of swapchainCount VkResult values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pResults-parameter)"}, - {VALIDATION_ERROR_11225801, "The spec valid usage text states 'pSwapchains must be a pointer to an array of swapchainCount valid VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pSwapchains-parameter)"}, - {VALIDATION_ERROR_11227601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-pWaitSemaphores-parameter)"}, - {VALIDATION_ERROR_1122b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_1122b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-sType-unique)"}, - {VALIDATION_ERROR_1122f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentInfoKHR-swapchainCount-arraylength)"}, - {VALIDATION_ERROR_11420c01, "The spec valid usage text states 'If rectangleCount is not 0, and pRectangles is not NULL, pRectangles must be a pointer to an array of rectangleCount VkRectLayerKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentRegionKHR-pRectangles-parameter)"}, - {VALIDATION_ERROR_116009d8, "The spec valid usage text states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext-chain of this VkPresentRegionsKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentRegionsKHR-swapchainCount-01260)"}, - {VALIDATION_ERROR_11621001, "The spec valid usage text states 'If pRegions is not NULL, pRegions must be a pointer to an array of swapchainCount valid VkPresentRegionKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentRegionsKHR-pRegions-parameter)"}, - {VALIDATION_ERROR_1162b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentRegionsKHR-sType-sType)"}, - {VALIDATION_ERROR_1162f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentRegionsKHR-swapchainCount-arraylength)"}, - {VALIDATION_ERROR_118009be, "The spec valid usage text states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext chain of this VkPresentTimesInfoGOOGLE structure.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247)"}, - {VALIDATION_ERROR_11825e01, "The spec valid usage text states 'If pTimes is not NULL, pTimes must be a pointer to an array of swapchainCount VkPresentTimeGOOGLE structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter)"}, - {VALIDATION_ERROR_1182b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-sType-sType)"}, - {VALIDATION_ERROR_1182f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength)"}, + {VALIDATION_ERROR_11218801, "The spec valid usage text states 'pImageIndices must be a valid pointer to an array of swapchainCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pImageIndices-parameter)"}, + {VALIDATION_ERROR_1121c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHX, VkDisplayPresentInfoKHR, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_11221e01, "The spec valid usage text states 'If pResults is not NULL, pResults must be a valid pointer to an array of swapchainCount VkResult values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pResults-parameter)"}, + {VALIDATION_ERROR_11225801, "The spec valid usage text states 'pSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pSwapchains-parameter)"}, + {VALIDATION_ERROR_11227601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pWaitSemaphores-parameter)"}, + {VALIDATION_ERROR_1122b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_1122b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-sType-unique)"}, + {VALIDATION_ERROR_1122f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-swapchainCount-arraylength)"}, + {VALIDATION_ERROR_11420c01, "The spec valid usage text states 'If rectangleCount is not 0, and pRectangles is not NULL, pRectangles must be a valid pointer to an array of rectangleCount VkRectLayerKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentRegionKHR-pRectangles-parameter)"}, + {VALIDATION_ERROR_116009d8, "The spec valid usage text states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext-chain of this VkPresentRegionsKHR structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentRegionsKHR-swapchainCount-01260)"}, + {VALIDATION_ERROR_11621001, "The spec valid usage text states 'If pRegions is not NULL, pRegions must be a valid pointer to an array of swapchainCount valid VkPresentRegionKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentRegionsKHR-pRegions-parameter)"}, + {VALIDATION_ERROR_1162b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentRegionsKHR-sType-sType)"}, + {VALIDATION_ERROR_1162f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentRegionsKHR-swapchainCount-arraylength)"}, + {VALIDATION_ERROR_118009be, "The spec valid usage text states 'swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext chain of this VkPresentTimesInfoGOOGLE structure.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247)"}, + {VALIDATION_ERROR_11825e01, "The spec valid usage text states 'If pTimes is not NULL, pTimes must be a valid pointer to an array of swapchainCount VkPresentTimeGOOGLE structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter)"}, + {VALIDATION_ERROR_1182b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-sType-sType)"}, + {VALIDATION_ERROR_1182f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength)"}, {VALIDATION_ERROR_11a0024c, "The spec valid usage text states 'offset must be less than VkPhysicalDeviceLimits::maxPushConstantsSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPushConstantRange-offset-00294)"}, {VALIDATION_ERROR_11a0024e, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPushConstantRange-offset-00295)"}, {VALIDATION_ERROR_11a00250, "The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPushConstantRange-size-00296)"}, @@ -4931,11 +5173,11 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_11c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_11c29a01, "The spec valid usage text states 'queryType must be a valid VkQueryType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-queryType-parameter)"}, {VALIDATION_ERROR_11c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-sType-sType)"}, - {VALIDATION_ERROR_11e009da, "The spec valid usage text states 'The sum of offset and extent must be no greater than the imageExtent member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRectLayerKHR-offset-01261)"}, - {VALIDATION_ERROR_11e009dc, "The spec valid usage text states 'layer must be less than imageArrayLayers member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRectLayerKHR-layer-01262)"}, + {VALIDATION_ERROR_11e009da, "The spec valid usage text states 'The sum of offset and extent must be no greater than the imageExtent member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-offset-01261)"}, + {VALIDATION_ERROR_11e009dc, "The spec valid usage text states 'layer must be less than imageArrayLayers member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-layer-01262)"}, {VALIDATION_ERROR_12000009, "The spec valid usage text states 'Both of framebuffer, and renderPass must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-commonparent)"}, {VALIDATION_ERROR_1200070c, "The spec valid usage text states 'clearValueCount must be greater than the largest attachment index in renderPass that specifies a loadOp (or stencilLoadOp, if the attachment has a depth/stencil format) of VK_ATTACHMENT_LOAD_OP_CLEAR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-clearValueCount-00902)"}, - {VALIDATION_ERROR_1200070e, "The spec valid usage text states 'If clearValueCount is not 0, pClearValues must be a pointer to an array of clearValueCount valid VkClearValue unions' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-clearValueCount-00903)"}, + {VALIDATION_ERROR_1200070e, "The spec valid usage text states 'If clearValueCount is not 0, pClearValues must be a valid pointer to an array of clearValueCount valid VkClearValue unions' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-clearValueCount-00903)"}, {VALIDATION_ERROR_12000710, "The spec valid usage text states 'renderPass must be compatible with the renderPass member of the VkFramebufferCreateInfo structure specified when creating framebuffer.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-renderPass-00904)"}, {VALIDATION_ERROR_12009401, "The spec valid usage text states 'framebuffer must be a valid VkFramebuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-parameter)"}, {VALIDATION_ERROR_1201c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfoKHX or VkRenderPassSampleLocationsBeginInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-pNext-pNext)"}, @@ -4952,22 +5194,22 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_12200c3c, "The spec valid usage text states 'For any member of pAttachments with a loadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassCreateInfo-pAttachments-01566)"}, {VALIDATION_ERROR_12200c3e, "The spec valid usage text states 'For any member of pAttachments with a stencilLoadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassCreateInfo-pAttachments-01567)"}, {VALIDATION_ERROR_12209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_1220f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a pointer to an array of attachmentCount valid VkAttachmentDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pAttachments-parameter)"}, - {VALIDATION_ERROR_12212601, "The spec valid usage text states 'If dependencyCount is not 0, pDependencies must be a pointer to an array of dependencyCount valid VkSubpassDependency structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pDependencies-parameter)"}, + {VALIDATION_ERROR_1220f201, "The spec valid usage text states 'If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkAttachmentDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pAttachments-parameter)"}, + {VALIDATION_ERROR_12212601, "The spec valid usage text states 'If dependencyCount is not 0, pDependencies must be a valid pointer to an array of dependencyCount valid VkSubpassDependency structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pDependencies-parameter)"}, {VALIDATION_ERROR_1221c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkRenderPassInputAttachmentAspectCreateInfoKHR or VkRenderPassMultiviewCreateInfoKHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pNext-pNext)"}, - {VALIDATION_ERROR_12224201, "The spec valid usage text states 'pSubpasses must be a pointer to an array of subpassCount valid VkSubpassDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pSubpasses-parameter)"}, + {VALIDATION_ERROR_12224201, "The spec valid usage text states 'pSubpasses must be a valid pointer to an array of subpassCount valid VkSubpassDescription structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-pSubpasses-parameter)"}, {VALIDATION_ERROR_1222b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-sType-sType)"}, {VALIDATION_ERROR_1222b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-sType-unique)"}, {VALIDATION_ERROR_1222e61b, "The spec valid usage text states 'subpassCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassCreateInfo-subpassCount-arraylength)"}, - {VALIDATION_ERROR_1240068e, "The spec valid usage text states 'If subpassCount is not zero, subpassCount must be equal to the subpassCount in the VkRenderPassCreateInfo structure at the start of the chain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-subpassCount-00839)"}, - {VALIDATION_ERROR_12400690, "The spec valid usage text states 'If dependencyCount is not zero, dependencyCount must be equal to the dependencyCount in the VkRenderPassCreateInfo structure at the start of the chain' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-dependencyCount-00840)"}, - {VALIDATION_ERROR_12400692, "The spec valid usage text states 'Each view index must not be set in more than one element of pCorrelationMasks' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-00841)"}, - {VALIDATION_ERROR_12400694, "The spec valid usage text states 'If an element of pViewOffsets is non-zero, the corresponding VkSubpassDependency structure must have different values of srcSubpass and dstSubpass.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-00842)"}, - {VALIDATION_ERROR_12411a01, "The spec valid usage text states 'If correlationMaskCount is not 0, pCorrelationMasks must be a pointer to an array of correlationMaskCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-parameter)"}, - {VALIDATION_ERROR_1241c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pNext-pNext)"}, - {VALIDATION_ERROR_12426c01, "The spec valid usage text states 'If subpassCount is not 0, pViewMasks must be a pointer to an array of subpassCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewMasks-parameter)"}, - {VALIDATION_ERROR_12426e01, "The spec valid usage text states 'If dependencyCount is not 0, pViewOffsets must be a pointer to an array of dependencyCount int32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-parameter)"}, - {VALIDATION_ERROR_1242b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_1240068e, "The spec valid usage text states 'If subpassCount is not zero, subpassCount must be equal to the subpassCount in the VkRenderPassCreateInfo structure at the start of the chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-subpassCount-00839)"}, + {VALIDATION_ERROR_12400690, "The spec valid usage text states 'If dependencyCount is not zero, dependencyCount must be equal to the dependencyCount in the VkRenderPassCreateInfo structure at the start of the chain' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-dependencyCount-00840)"}, + {VALIDATION_ERROR_12400692, "The spec valid usage text states 'Each view index must not be set in more than one element of pCorrelationMasks' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-00841)"}, + {VALIDATION_ERROR_12400694, "The spec valid usage text states 'If an element of pViewOffsets is non-zero, the corresponding VkSubpassDependency structure must have different values of srcSubpass and dstSubpass.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-00842)"}, + {VALIDATION_ERROR_12411a01, "The spec valid usage text states 'If correlationMaskCount is not 0, pCorrelationMasks must be a valid pointer to an array of correlationMaskCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-parameter)"}, + {VALIDATION_ERROR_1241c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pNext-pNext)"}, + {VALIDATION_ERROR_12426c01, "The spec valid usage text states 'If subpassCount is not 0, pViewMasks must be a valid pointer to an array of subpassCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewMasks-parameter)"}, + {VALIDATION_ERROR_12426e01, "The spec valid usage text states 'If dependencyCount is not 0, pViewOffsets must be a valid pointer to an array of dependencyCount int32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-parameter)"}, + {VALIDATION_ERROR_1242b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassMultiviewCreateInfoKHX-sType-sType)"}, {VALIDATION_ERROR_12600201, "The spec valid usage text states 'addressModeU must be a valid VkSamplerAddressMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerCreateInfo-addressModeU-parameter)"}, {VALIDATION_ERROR_12600401, "The spec valid usage text states 'addressModeV must be a valid VkSamplerAddressMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerCreateInfo-addressModeV-parameter)"}, {VALIDATION_ERROR_12600601, "The spec valid usage text states 'addressModeW must be a valid VkSamplerAddressMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerCreateInfo-addressModeW-parameter)"}, @@ -5012,15 +5254,15 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_12a00ac4, "The spec valid usage text states 'If pCode points to SPIR-V code, that code must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01378)"}, {VALIDATION_ERROR_12a00ac6, "The spec valid usage text states 'If pCode points to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)"}, {VALIDATION_ERROR_12a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleCreateInfo-flags-zerobitmask)"}, - {VALIDATION_ERROR_12a10c01, "The spec valid usage text states 'pCode must be a pointer to an array of (codeSize over 4) uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-parameter)"}, + {VALIDATION_ERROR_12a10c01, "The spec valid usage text states 'pCode must be a valid pointer to an array of (codeSize over 4) uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-parameter)"}, {VALIDATION_ERROR_12a1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkShaderModuleValidationCacheCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pNext-pNext)"}, {VALIDATION_ERROR_12a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleCreateInfo-sType-sType)"}, {VALIDATION_ERROR_12c0141b, "The spec valid usage text states 'bindCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseBufferMemoryBindInfo-bindCount-arraylength)"}, {VALIDATION_ERROR_12c01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseBufferMemoryBindInfo-buffer-parameter)"}, - {VALIDATION_ERROR_12c0fe01, "The spec valid usage text states 'pBinds must be a pointer to an array of bindCount valid VkSparseMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseBufferMemoryBindInfo-pBinds-parameter)"}, + {VALIDATION_ERROR_12c0fe01, "The spec valid usage text states 'pBinds must be a valid pointer to an array of bindCount valid VkSparseMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseBufferMemoryBindInfo-pBinds-parameter)"}, {VALIDATION_ERROR_12e008a0, "The spec valid usage text states 'If the sparse aliased residency feature is not enabled, and if any other resources are bound to ranges of memory, the range of memory being bound must not overlap with those bound ranges' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-memory-01104)"}, - {VALIDATION_ERROR_12e008a2, "The spec valid usage text states 'memory and memoryOffset must match the memory requirements of the calling command's image, as described in section Resource Memory Association' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-memory-01105)"}, - {VALIDATION_ERROR_12e008a4, "The spec valid usage text states 'subresource must be a valid image subresource for image (see Image Views)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-subresource-01106)"}, + {VALIDATION_ERROR_12e008a2, "The spec valid usage text states 'memory and memoryOffset must match the memory requirements of the calling command's image, as described in section resources-association' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-memory-01105)"}, + {VALIDATION_ERROR_12e008a4, "The spec valid usage text states 'subresource must be a valid image subresource for image (see resources-image-views)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-subresource-01106)"}, {VALIDATION_ERROR_12e008a6, "The spec valid usage text states 'offset.x must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-offset-01107)"}, {VALIDATION_ERROR_12e008a8, "The spec valid usage text states 'extent.width must either be a multiple of the sparse image block width of the image, or else (extent.width + offset.x) must equal the width of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-extent-01108)"}, {VALIDATION_ERROR_12e008aa, "The spec valid usage text states 'offset.y must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-offset-01109)"}, @@ -5030,14 +5272,16 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_12e09001, "The spec valid usage text states 'flags must be a valid combination of VkSparseMemoryBindFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-flags-parameter)"}, {VALIDATION_ERROR_12e0c601, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-memory-parameter)"}, {VALIDATION_ERROR_12e2e801, "The spec valid usage text states 'subresource must be a valid VkImageSubresource structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBind-subresource-parameter)"}, + {VALIDATION_ERROR_13000d74, "The spec valid usage text states 'The subresource.mipLevel member of each element of pBinds must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-subresource-01722)"}, + {VALIDATION_ERROR_13000d76, "The spec valid usage text states 'The subresource.arrayLayer member of each element of pBinds must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-subresource-01723)"}, {VALIDATION_ERROR_1300141b, "The spec valid usage text states 'bindCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-bindCount-arraylength)"}, {VALIDATION_ERROR_1300a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-image-parameter)"}, - {VALIDATION_ERROR_1300fe01, "The spec valid usage text states 'pBinds must be a pointer to an array of bindCount valid VkSparseImageMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-pBinds-parameter)"}, + {VALIDATION_ERROR_1300fe01, "The spec valid usage text states 'pBinds must be a valid pointer to an array of bindCount valid VkSparseImageMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageMemoryBindInfo-pBinds-parameter)"}, {VALIDATION_ERROR_1320089e, "The spec valid usage text states 'If the flags member of any element of pBinds contains VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range defined must be within the mip tail region of the metadata aspect of image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-01103)"}, {VALIDATION_ERROR_1320141b, "The spec valid usage text states 'bindCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageOpaqueMemoryBindInfo-bindCount-arraylength)"}, {VALIDATION_ERROR_1320a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageOpaqueMemoryBindInfo-image-parameter)"}, - {VALIDATION_ERROR_1320fe01, "The spec valid usage text states 'pBinds must be a pointer to an array of bindCount valid VkSparseMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-parameter)"}, - {VALIDATION_ERROR_13400890, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory and memoryOffset must match the memory requirements of the resource, as described in section Resource Memory Association' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-memory-01096)"}, + {VALIDATION_ERROR_1320fe01, "The spec valid usage text states 'pBinds must be a valid pointer to an array of bindCount valid VkSparseMemoryBind structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-parameter)"}, + {VALIDATION_ERROR_13400890, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory and memoryOffset must match the memory requirements of the resource, as described in section resources-association' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-memory-01096)"}, {VALIDATION_ERROR_13400892, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory must not have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-memory-01097)"}, {VALIDATION_ERROR_13400894, "The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-size-01098)"}, {VALIDATION_ERROR_13400896, "The spec valid usage text states 'resourceOffset must be less than the size of the resource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-resourceOffset-01099)"}, @@ -5048,8 +5292,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1340c601, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseMemoryBind-memory-parameter)"}, {VALIDATION_ERROR_1360060a, "The spec valid usage text states 'The offset member of each element of pMapEntries must be less than dataSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-offset-00773)"}, {VALIDATION_ERROR_1360060c, "The spec valid usage text states 'The size member of each element of pMapEntries must be less than or equal to dataSize minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-pMapEntries-00774)"}, - {VALIDATION_ERROR_1360060e, "The spec valid usage text states 'If mapEntryCount is not 0, pMapEntries must be a pointer to an array of mapEntryCount valid VkSpecializationMapEntry structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-mapEntryCount-00775)"}, - {VALIDATION_ERROR_13612201, "The spec valid usage text states 'If dataSize is not 0, pData must be a pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-pData-parameter)"}, + {VALIDATION_ERROR_1360060e, "The spec valid usage text states 'If mapEntryCount is not 0, pMapEntries must be a valid pointer to an array of mapEntryCount valid VkSpecializationMapEntry structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-mapEntryCount-00775)"}, + {VALIDATION_ERROR_13612201, "The spec valid usage text states 'If dataSize is not 0, pData must be a valid pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationInfo-pData-parameter)"}, {VALIDATION_ERROR_13800610, "The spec valid usage text states 'For a constantID specialization constant declared in a shader, size must match the byte size of the constantID. If the specialization constant is of type boolean, size must be the byte size of VkBool32' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSpecializationMapEntry-constantID-00776)"}, {VALIDATION_ERROR_13a02a01, "The spec valid usage text states 'compareOp must be a valid VkCompareOp value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkStencilOpState-compareOp-parameter)"}, {VALIDATION_ERROR_13a04201, "The spec valid usage text states 'depthFailOp must be a valid VkStencilOp value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkStencilOpState-depthFailOp-parameter)"}, @@ -5060,12 +5304,12 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_13c00098, "The spec valid usage text states 'If the geometry shaders feature is not enabled, each element of pWaitDstStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-00076)"}, {VALIDATION_ERROR_13c0009a, "The spec valid usage text states 'If the tessellation shaders feature is not enabled, each element of pWaitDstStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-00077)"}, {VALIDATION_ERROR_13c0009c, "The spec valid usage text states 'Each element of pWaitDstStageMask must not include VK_PIPELINE_STAGE_HOST_BIT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-00078)"}, - {VALIDATION_ERROR_13c11401, "The spec valid usage text states 'If commandBufferCount is not 0, pCommandBuffers must be a pointer to an array of commandBufferCount valid VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pCommandBuffers-parameter)"}, + {VALIDATION_ERROR_13c11401, "The spec valid usage text states 'If commandBufferCount is not 0, pCommandBuffers must be a valid pointer to an array of commandBufferCount valid VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pCommandBuffers-parameter)"}, {VALIDATION_ERROR_13c1c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkD3D12FenceSubmitInfoKHR, VkDeviceGroupSubmitInfoKHX, VkWin32KeyedMutexAcquireReleaseInfoKHR, or VkWin32KeyedMutexAcquireReleaseInfoNV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pNext-pNext)"}, - {VALIDATION_ERROR_13c23401, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pSignalSemaphores-parameter)"}, - {VALIDATION_ERROR_13c27001, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitDstStageMask must be a pointer to an array of waitSemaphoreCount valid combinations of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-parameter)"}, + {VALIDATION_ERROR_13c23401, "The spec valid usage text states 'If signalSemaphoreCount is not 0, pSignalSemaphores must be a valid pointer to an array of signalSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pSignalSemaphores-parameter)"}, + {VALIDATION_ERROR_13c27001, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitDstStageMask must be a valid pointer to an array of waitSemaphoreCount valid combinations of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-parameter)"}, {VALIDATION_ERROR_13c27003, "The spec valid usage text states 'Each element of pWaitDstStageMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitDstStageMask-requiredbitmask)"}, - {VALIDATION_ERROR_13c27601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitSemaphores-parameter)"}, + {VALIDATION_ERROR_13c27601, "The spec valid usage text states 'If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-pWaitSemaphores-parameter)"}, {VALIDATION_ERROR_13c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SUBMIT_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-sType-sType)"}, {VALIDATION_ERROR_13c2b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubmitInfo-sType-unique)"}, {VALIDATION_ERROR_13e006b4, "The spec valid usage text states 'If srcSubpass is not VK_SUBPASS_EXTERNAL, srcStageMask must not include VK_PIPELINE_STAGE_HOST_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcSubpass-00858)"}, @@ -5107,58 +5351,60 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_14000b14, "The spec valid usage text states 'If pDepthStencilAttachment is not VK_ATTACHMENT_UNUSED and any attachments in pColorAttachments are not VK_ATTACHMENT_UNUSED, they must have the same sample count' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pDepthStencilAttachment-01418)"}, {VALIDATION_ERROR_14000bc4, "The spec valid usage text states 'All attachments in pColorAttachments that are not VK_ATTACHMENT_UNUSED must have a sample count that is smaller than or equal to the sample count of pDepthStencilAttachment if it is not VK_ATTACHMENT_UNUSED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassDescription-pColorAttachments-01506)"}, {VALIDATION_ERROR_14009001, "The spec valid usage text states 'flags must be a valid combination of VkSubpassDescriptionFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-flags-parameter)"}, - {VALIDATION_ERROR_14011001, "The spec valid usage text states 'If colorAttachmentCount is not 0, pColorAttachments must be a pointer to an array of colorAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pColorAttachments-parameter)"}, - {VALIDATION_ERROR_14012a01, "The spec valid usage text states 'If pDepthStencilAttachment is not NULL, pDepthStencilAttachment must be a pointer to a valid VkAttachmentReference structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pDepthStencilAttachment-parameter)"}, - {VALIDATION_ERROR_14019a01, "The spec valid usage text states 'If inputAttachmentCount is not 0, pInputAttachments must be a pointer to an array of inputAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pInputAttachments-parameter)"}, - {VALIDATION_ERROR_1401f001, "The spec valid usage text states 'If preserveAttachmentCount is not 0, pPreserveAttachments must be a pointer to an array of preserveAttachmentCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pPreserveAttachments-parameter)"}, - {VALIDATION_ERROR_14021c01, "The spec valid usage text states 'If colorAttachmentCount is not 0, and pResolveAttachments is not NULL, pResolveAttachments must be a pointer to an array of colorAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pResolveAttachments-parameter)"}, + {VALIDATION_ERROR_14011001, "The spec valid usage text states 'If colorAttachmentCount is not 0, pColorAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pColorAttachments-parameter)"}, + {VALIDATION_ERROR_14012a01, "The spec valid usage text states 'If pDepthStencilAttachment is not NULL, pDepthStencilAttachment must be a valid pointer to a valid VkAttachmentReference structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pDepthStencilAttachment-parameter)"}, + {VALIDATION_ERROR_14019a01, "The spec valid usage text states 'If inputAttachmentCount is not 0, pInputAttachments must be a valid pointer to an array of inputAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pInputAttachments-parameter)"}, + {VALIDATION_ERROR_1401f001, "The spec valid usage text states 'If preserveAttachmentCount is not 0, pPreserveAttachments must be a valid pointer to an array of preserveAttachmentCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pPreserveAttachments-parameter)"}, + {VALIDATION_ERROR_14021c01, "The spec valid usage text states 'If colorAttachmentCount is not 0, and pResolveAttachments is not NULL, pResolveAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pResolveAttachments-parameter)"}, {VALIDATION_ERROR_14027e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDescription-pipelineBindPoint-parameter)"}, - {VALIDATION_ERROR_142009bc, "The spec valid usage text states 'supportedSurfaceCounters must not include VK_SURFACE_COUNTER_VBLANK_EXT unless the surface queried is a display surface.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246)"}, - {VALIDATION_ERROR_1421c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-pNext-pNext)"}, - {VALIDATION_ERROR_1422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-sType-sType)"}, - {VALIDATION_ERROR_144009b8, "The spec valid usage text states 'The bits in surfaceCounters must be supported by VkSwapchainCreateInfoKHR::surface, as reported by vkGetPhysicalDeviceSurfaceCapabilities2EXT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-01244)"}, - {VALIDATION_ERROR_1441c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_1442b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_1442ee01, "The spec valid usage text states 'surfaceCounters must be a valid combination of VkSurfaceCounterFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter)"}, - {VALIDATION_ERROR_14600009, "The spec valid usage text states 'Both of oldSwapchain, and surface that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-commonparent)"}, - {VALIDATION_ERROR_146009ec, "The spec valid usage text states 'surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-01270)"}, - {VALIDATION_ERROR_146009ee, "The spec valid usage text states 'minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-minImageCount-01271)"}, - {VALIDATION_ERROR_146009f0, "The spec valid usage text states 'minImageCount must be less than or equal to the value returned in the maxImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface if the returned maxImageCount is not zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-minImageCount-01272)"}, - {VALIDATION_ERROR_146009f2, "The spec valid usage text states 'imageFormat and imageColorSpace must match the format and colorSpace members, respectively, of one of the VkSurfaceFormatKHR structures returned by vkGetPhysicalDeviceSurfaceFormatsKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01273)"}, - {VALIDATION_ERROR_146009f4, "The spec valid usage text states 'imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)"}, - {VALIDATION_ERROR_146009f6, "The spec valid usage text states 'imageArrayLayers must be greater than 0 and less than or equal to the maxImageArrayLayers member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageArrayLayers-01275)"}, + {VALIDATION_ERROR_142009bc, "The spec valid usage text states 'supportedSurfaceCounters must not include VK_SURFACE_COUNTER_VBLANK_EXT unless the surface queried is a display surface.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246)"}, + {VALIDATION_ERROR_1421c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-pNext-pNext)"}, + {VALIDATION_ERROR_1422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceCapabilities2EXT-sType-sType)"}, + {VALIDATION_ERROR_144009b8, "The spec valid usage text states 'The bits in surfaceCounters must be supported by VkSwapchainCreateInfoKHR::surface, as reported by vkGetPhysicalDeviceSurfaceCapabilities2EXT.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-01244)"}, + {VALIDATION_ERROR_1441c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_1442b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_1442ee01, "The spec valid usage text states 'surfaceCounters must be a valid combination of VkSurfaceCounterFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter)"}, + {VALIDATION_ERROR_14600009, "The spec valid usage text states 'Both of oldSwapchain, and surface that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-commonparent)"}, + {VALIDATION_ERROR_146009ec, "The spec valid usage text states 'surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-01270)"}, + {VALIDATION_ERROR_146009ee, "The spec valid usage text states 'minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-minImageCount-01271)"}, + {VALIDATION_ERROR_146009f0, "The spec valid usage text states 'minImageCount must be less than or equal to the value returned in the maxImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface if the returned maxImageCount is not zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-minImageCount-01272)"}, + {VALIDATION_ERROR_146009f2, "The spec valid usage text states 'imageFormat and imageColorSpace must match the format and colorSpace members, respectively, of one of the VkSurfaceFormatKHR structures returned by vkGetPhysicalDeviceSurfaceFormatsKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01273)"}, + {VALIDATION_ERROR_146009f4, "The spec valid usage text states 'imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)"}, + {VALIDATION_ERROR_146009f6, "The spec valid usage text states 'imageArrayLayers must be greater than 0 and less than or equal to the maxImageArrayLayers member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageArrayLayers-01275)"}, {VALIDATION_ERROR_146009f8, "The spec valid usage text states 'imageUsage must be a subset of the supported usage flags present in the supportedUsageFlags member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-01276)"}, - {VALIDATION_ERROR_146009fa, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01277)"}, - {VALIDATION_ERROR_146009fc, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01278)"}, - {VALIDATION_ERROR_146009fe, "The spec valid usage text states 'preTransform must be one of the bits present in the supportedTransforms member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-preTransform-01279)"}, - {VALIDATION_ERROR_14600a00, "The spec valid usage text states 'compositeAlpha must be one of the bits present in the supportedCompositeAlpha member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-compositeAlpha-01280)"}, - {VALIDATION_ERROR_14600a02, "The spec valid usage text states 'presentMode must be one of the VkPresentModeKHR values returned by vkGetPhysicalDeviceSurfacePresentModesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-01281)"}, + {VALIDATION_ERROR_146009fa, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01277)"}, + {VALIDATION_ERROR_146009fc, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01278)"}, + {VALIDATION_ERROR_146009fe, "The spec valid usage text states 'preTransform must be one of the bits present in the supportedTransforms member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-preTransform-01279)"}, + {VALIDATION_ERROR_14600a00, "The spec valid usage text states 'compositeAlpha must be one of the bits present in the supportedCompositeAlpha member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-compositeAlpha-01280)"}, + {VALIDATION_ERROR_14600a02, "The spec valid usage text states 'presentMode must be one of the VkPresentModeKHR values returned by vkGetPhysicalDeviceSurfacePresentModesKHR for the surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-01281)"}, {VALIDATION_ERROR_14600ace, "The spec valid usage text states 'minImageCount must be 1 if presentMode is either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-minImageCount-01383)"}, {VALIDATION_ERROR_14600ad0, "The spec valid usage text states 'If presentMode is VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, imageUsage must be a subset of the supported usage flags present in the sharedPresentSupportedUsageFlags member of the VkSharedPresentSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-01384)"}, {VALIDATION_ERROR_14600ae2, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01393)"}, {VALIDATION_ERROR_14600b26, "The spec valid usage text states 'If presentMode is VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR, imageUsage must be a subset of the supported usage flags present in the supportedUsageFlags member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-01427)"}, {VALIDATION_ERROR_14600b28, "The spec valid usage text states 'If imageSharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01428)"}, {VALIDATION_ERROR_14600b2a, "The spec valid usage text states 'If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-physicalDeviceCount-01429)"}, - {VALIDATION_ERROR_14600d14, "The spec valid usage text states 'oldSwapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01674)"}, - {VALIDATION_ERROR_14602e01, "The spec valid usage text states 'compositeAlpha must be a valid VkCompositeAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-compositeAlpha-parameter)"}, - {VALIDATION_ERROR_14609001, "The spec valid usage text states 'flags must be a valid combination of VkSwapchainCreateFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_1460a201, "The spec valid usage text states 'imageColorSpace must be a valid VkColorSpaceKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageColorSpace-parameter)"}, - {VALIDATION_ERROR_1460a401, "The spec valid usage text states 'imageFormat must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-parameter)"}, - {VALIDATION_ERROR_1460a801, "The spec valid usage text states 'imageSharingMode must be a valid VkSharingMode value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-parameter)"}, - {VALIDATION_ERROR_1460ae01, "The spec valid usage text states 'imageUsage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-parameter)"}, - {VALIDATION_ERROR_1460ae03, "The spec valid usage text states 'imageUsage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-requiredbitmask)"}, - {VALIDATION_ERROR_1460de01, "The spec valid usage text states 'If oldSwapchain is not VK_NULL_HANDLE, oldSwapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter)"}, - {VALIDATION_ERROR_1460de07, "The spec valid usage text states 'If oldSwapchain is a valid handle, it must have been created, allocated, or retrieved from surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parent)"}, - {VALIDATION_ERROR_1461c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHX or VkSwapchainCounterCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_14629401, "The spec valid usage text states 'preTransform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-preTransform-parameter)"}, - {VALIDATION_ERROR_14629601, "The spec valid usage text states 'presentMode must be a valid VkPresentModeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-parameter)"}, - {VALIDATION_ERROR_1462b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_1462b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-sType-unique)"}, - {VALIDATION_ERROR_1462ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-parameter)"}, - {VALIDATION_ERROR_14805a1b, "The spec valid usage text states 'disabledValidationCheckCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength)"}, - {VALIDATION_ERROR_14814401, "The spec valid usage text states 'pDisabledValidationChecks must be a pointer to an array of disabledValidationCheckCount VkValidationCheckEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter)"}, - {VALIDATION_ERROR_1481c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationFlagsEXT-pNext-pNext)"}, - {VALIDATION_ERROR_1482b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationFlagsEXT-sType-sType)"}, + {VALIDATION_ERROR_14600d14, "The spec valid usage text states 'oldSwapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01674)"}, + {VALIDATION_ERROR_14600d32, "The spec valid usage text states 'imageExtent members width and height must both be non-zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01689)"}, + {VALIDATION_ERROR_14600de4, "The spec valid usage text states 'imageFormat, imageUsage, imageExtent, and imageArrayLayers must be supported for VK_IMAGE_TYPE_2D VK_IMAGE_TILING_OPTIMAL images as reported by vkGetPhysicalDeviceImageFormatProperties.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)"}, + {VALIDATION_ERROR_14602e01, "The spec valid usage text states 'compositeAlpha must be a valid VkCompositeAlphaFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-compositeAlpha-parameter)"}, + {VALIDATION_ERROR_14609001, "The spec valid usage text states 'flags must be a valid combination of VkSwapchainCreateFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_1460a201, "The spec valid usage text states 'imageColorSpace must be a valid VkColorSpaceKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageColorSpace-parameter)"}, + {VALIDATION_ERROR_1460a401, "The spec valid usage text states 'imageFormat must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-parameter)"}, + {VALIDATION_ERROR_1460a801, "The spec valid usage text states 'imageSharingMode must be a valid VkSharingMode value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageSharingMode-parameter)"}, + {VALIDATION_ERROR_1460ae01, "The spec valid usage text states 'imageUsage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-parameter)"}, + {VALIDATION_ERROR_1460ae03, "The spec valid usage text states 'imageUsage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageUsage-requiredbitmask)"}, + {VALIDATION_ERROR_1460de01, "The spec valid usage text states 'If oldSwapchain is not VK_NULL_HANDLE, oldSwapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter)"}, + {VALIDATION_ERROR_1460de07, "The spec valid usage text states 'If oldSwapchain is a valid handle, it must have been created, allocated, or retrieved from surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parent)"}, + {VALIDATION_ERROR_1461c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHX or VkSwapchainCounterCreateInfoEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_14629401, "The spec valid usage text states 'preTransform must be a valid VkSurfaceTransformFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-preTransform-parameter)"}, + {VALIDATION_ERROR_14629601, "The spec valid usage text states 'presentMode must be a valid VkPresentModeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-parameter)"}, + {VALIDATION_ERROR_1462b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_1462b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-sType-unique)"}, + {VALIDATION_ERROR_1462ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-surface-parameter)"}, + {VALIDATION_ERROR_14805a1b, "The spec valid usage text states 'disabledValidationCheckCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength)"}, + {VALIDATION_ERROR_14814401, "The spec valid usage text states 'pDisabledValidationChecks must be a valid pointer to an array of disabledValidationCheckCount VkValidationCheckEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter)"}, + {VALIDATION_ERROR_1481c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationFlagsEXT-pNext-pNext)"}, + {VALIDATION_ERROR_1482b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationFlagsEXT-sType-sType)"}, {VALIDATION_ERROR_14a004d8, "The spec valid usage text states 'location must be less than VkPhysicalDeviceLimits::maxVertexInputAttributes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputAttributeDescription-location-00620)"}, {VALIDATION_ERROR_14a004da, "The spec valid usage text states 'binding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputAttributeDescription-binding-00621)"}, {VALIDATION_ERROR_14a004dc, "The spec valid usage text states 'offset must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributeOffset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputAttributeDescription-offset-00622)"}, @@ -5167,10 +5413,10 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_14c004d4, "The spec valid usage text states 'binding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputBindingDescription-binding-00618)"}, {VALIDATION_ERROR_14c004d6, "The spec valid usage text states 'stride must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindingStride' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputBindingDescription-stride-00619)"}, {VALIDATION_ERROR_14c0ba01, "The spec valid usage text states 'inputRate must be a valid VkVertexInputRate value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkVertexInputBindingDescription-inputRate-parameter)"}, - {VALIDATION_ERROR_14e00a4c, "The spec valid usage text states 'window must be a valid nn::vi::NativeWindowHandle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-window-01318)"}, - {VALIDATION_ERROR_14e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-flags-zerobitmask)"}, - {VALIDATION_ERROR_14e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-pNext-pNext)"}, - {VALIDATION_ERROR_14e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-sType-sType)"}, + {VALIDATION_ERROR_14e00a4c, "The spec valid usage text states 'window must be a valid nn::vi::NativeWindowHandle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-window-01318)"}, + {VALIDATION_ERROR_14e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-flags-zerobitmask)"}, + {VALIDATION_ERROR_14e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-pNext-pNext)"}, + {VALIDATION_ERROR_14e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-sType-sType)"}, {VALIDATION_ERROR_14e30e01, "The spec valid usage text states 'window must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViSurfaceCreateInfoNN-window-parameter)"}, {VALIDATION_ERROR_15000996, "The spec valid usage text states 'width must be greater than 0.0 and less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-width-01227)"}, {VALIDATION_ERROR_15000998, "The spec valid usage text states 'height must be greater than 0.0 and less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-height-01228)"}, @@ -5179,37 +5425,45 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1500099e, "The spec valid usage text states 'x and y must each be between viewportBoundsRange[0] and viewportBoundsRange[1], inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-x-01231)"}, {VALIDATION_ERROR_150009a0, "The spec valid usage text states '(x + width) must be less than or equal to viewportBoundsRange[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-x-01232)"}, {VALIDATION_ERROR_150009a2, "The spec valid usage text states '(y + height) must be less than or equal to viewportBoundsRange[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-y-01233)"}, - {VALIDATION_ERROR_150009a4, "The spec valid usage text states 'minDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-minDepth-01234)"}, - {VALIDATION_ERROR_150009a6, "The spec valid usage text states 'maxDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-maxDepth-01235)"}, - {VALIDATION_ERROR_15230c01, "The spec valid usage text states 'w must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewportSwizzleNV-w-parameter)"}, - {VALIDATION_ERROR_15231001, "The spec valid usage text states 'x must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewportSwizzleNV-x-parameter)"}, - {VALIDATION_ERROR_15231201, "The spec valid usage text states 'y must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewportSwizzleNV-y-parameter)"}, - {VALIDATION_ERROR_15231401, "The spec valid usage text states 'z must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewportSwizzleNV-z-parameter)"}, - {VALIDATION_ERROR_15400a30, "The spec valid usage text states 'display must point to a valid Wayland wl_display.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-display-01304)"}, - {VALIDATION_ERROR_15400a32, "The spec valid usage text states 'surface must point to a valid Wayland wl_surface.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-surface-01305)"}, - {VALIDATION_ERROR_15409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_1541c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_1542b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_15600009, "The spec valid usage text states 'Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-commonparent)"}, - {VALIDATION_ERROR_156000a2, "The spec valid usage text states 'Each member of pAcquireSyncs and pReleaseSyncs must be a device memory object imported by setting VkImportMemoryWin32HandleInfoKHR::handleType to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-00081)"}, - {VALIDATION_ERROR_1560e201, "The spec valid usage text states 'If acquireCount is not 0, pAcquireKeys must be a pointer to an array of acquireCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter)"}, - {VALIDATION_ERROR_1560e401, "The spec valid usage text states 'If acquireCount is not 0, pAcquireSyncs must be a pointer to an array of acquireCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter)"}, - {VALIDATION_ERROR_1560e801, "The spec valid usage text states 'If acquireCount is not 0, pAcquireTimeouts must be a pointer to an array of acquireCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter)"}, - {VALIDATION_ERROR_15621201, "The spec valid usage text states 'If releaseCount is not 0, pReleaseKeys must be a pointer to an array of releaseCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter)"}, - {VALIDATION_ERROR_15621401, "The spec valid usage text states 'If releaseCount is not 0, pReleaseSyncs must be a pointer to an array of releaseCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter)"}, - {VALIDATION_ERROR_1562b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_15800009, "The spec valid usage text states 'Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-commonparent)"}, - {VALIDATION_ERROR_1580e201, "The spec valid usage text states 'If acquireCount is not 0, pAcquireKeys must be a pointer to an array of acquireCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter)"}, - {VALIDATION_ERROR_1580e401, "The spec valid usage text states 'If acquireCount is not 0, pAcquireSyncs must be a pointer to an array of acquireCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter)"}, - {VALIDATION_ERROR_1580e601, "The spec valid usage text states 'If acquireCount is not 0, pAcquireTimeoutMilliseconds must be a pointer to an array of acquireCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter)"}, - {VALIDATION_ERROR_15821201, "The spec valid usage text states 'If releaseCount is not 0, pReleaseKeys must be a pointer to an array of releaseCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter)"}, - {VALIDATION_ERROR_15821401, "The spec valid usage text states 'If releaseCount is not 0, pReleaseSyncs must be a pointer to an array of releaseCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter)"}, - {VALIDATION_ERROR_1582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType)"}, - {VALIDATION_ERROR_15a00a36, "The spec valid usage text states 'hinstance must be a valid Win32 HINSTANCE.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-hinstance-01307)"}, - {VALIDATION_ERROR_15a00a38, "The spec valid usage text states 'hwnd must be a valid Win32 HWND.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-hwnd-01308)"}, - {VALIDATION_ERROR_15a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_15a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_15a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_150009a4, "The spec valid usage text states 'Unless VK_EXT_depth_range_unrestricted extension is enabled minDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewport-minDepth-01234)"}, + {VALIDATION_ERROR_150009a6, "The spec valid usage text states 'Unless VK_EXT_depth_range_unrestricted extension is enabled maxDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewport-maxDepth-01235)"}, + {VALIDATION_ERROR_15000dd4, "The spec valid usage text states 'width must be greater than 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-width-01770)"}, + {VALIDATION_ERROR_15000dd6, "The spec valid usage text states 'width must be less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-width-01771)"}, + {VALIDATION_ERROR_15000dd8, "The spec valid usage text states 'height must be greater than 0.0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-height-01772)"}, + {VALIDATION_ERROR_15000dda, "The spec valid usage text states 'The absolute value of height must be less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-height-01773)"}, + {VALIDATION_ERROR_15000ddc, "The spec valid usage text states 'x must be greater than or equal to viewportBoundsRange[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-x-01774)"}, + {VALIDATION_ERROR_15000dde, "The spec valid usage text states 'y must be greater than or equal to viewportBoundsRange[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkViewport-y-01775)"}, + {VALIDATION_ERROR_15000de0, "The spec valid usage text states 'y must be less than or equal to viewportBoundsRange[1]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewport-y-01776)"}, + {VALIDATION_ERROR_15000de2, "The spec valid usage text states '(y + height) must be greater than or equal to viewportBoundsRange[0]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewport-y-01777)"}, + {VALIDATION_ERROR_15230c01, "The spec valid usage text states 'w must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewportSwizzleNV-w-parameter)"}, + {VALIDATION_ERROR_15231001, "The spec valid usage text states 'x must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewportSwizzleNV-x-parameter)"}, + {VALIDATION_ERROR_15231201, "The spec valid usage text states 'y must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewportSwizzleNV-y-parameter)"}, + {VALIDATION_ERROR_15231401, "The spec valid usage text states 'z must be a valid VkViewportCoordinateSwizzleNV value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkViewportSwizzleNV-z-parameter)"}, + {VALIDATION_ERROR_15400a30, "The spec valid usage text states 'display must point to a valid Wayland wl_display.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-display-01304)"}, + {VALIDATION_ERROR_15400a32, "The spec valid usage text states 'surface must point to a valid Wayland wl_surface.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-surface-01305)"}, + {VALIDATION_ERROR_15409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_1541c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_1542b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWaylandSurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_15600009, "The spec valid usage text states 'Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-commonparent)"}, + {VALIDATION_ERROR_156000a2, "The spec valid usage text states 'Each member of pAcquireSyncs and pReleaseSyncs must be a device memory object imported by setting VkImportMemoryWin32HandleInfoKHR::handleType to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-00081)"}, + {VALIDATION_ERROR_1560e201, "The spec valid usage text states 'If acquireCount is not 0, pAcquireKeys must be a valid pointer to an array of acquireCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter)"}, + {VALIDATION_ERROR_1560e401, "The spec valid usage text states 'If acquireCount is not 0, pAcquireSyncs must be a valid pointer to an array of acquireCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter)"}, + {VALIDATION_ERROR_1560e801, "The spec valid usage text states 'If acquireCount is not 0, pAcquireTimeouts must be a valid pointer to an array of acquireCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter)"}, + {VALIDATION_ERROR_15621201, "The spec valid usage text states 'If releaseCount is not 0, pReleaseKeys must be a valid pointer to an array of releaseCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter)"}, + {VALIDATION_ERROR_15621401, "The spec valid usage text states 'If releaseCount is not 0, pReleaseSyncs must be a valid pointer to an array of releaseCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter)"}, + {VALIDATION_ERROR_1562b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_15800009, "The spec valid usage text states 'Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-commonparent)"}, + {VALIDATION_ERROR_1580e201, "The spec valid usage text states 'If acquireCount is not 0, pAcquireKeys must be a valid pointer to an array of acquireCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter)"}, + {VALIDATION_ERROR_1580e401, "The spec valid usage text states 'If acquireCount is not 0, pAcquireSyncs must be a valid pointer to an array of acquireCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter)"}, + {VALIDATION_ERROR_1580e601, "The spec valid usage text states 'If acquireCount is not 0, pAcquireTimeoutMilliseconds must be a valid pointer to an array of acquireCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter)"}, + {VALIDATION_ERROR_15821201, "The spec valid usage text states 'If releaseCount is not 0, pReleaseKeys must be a valid pointer to an array of releaseCount uint64_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter)"}, + {VALIDATION_ERROR_15821401, "The spec valid usage text states 'If releaseCount is not 0, pReleaseSyncs must be a valid pointer to an array of releaseCount valid VkDeviceMemory handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter)"}, + {VALIDATION_ERROR_1582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType)"}, + {VALIDATION_ERROR_15a00a36, "The spec valid usage text states 'hinstance must be a valid Win32 HINSTANCE.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-hinstance-01307)"}, + {VALIDATION_ERROR_15a00a38, "The spec valid usage text states 'hwnd must be a valid Win32 HWND.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-hwnd-01308)"}, + {VALIDATION_ERROR_15a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_15a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_15a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkWin32SurfaceCreateInfoKHR-sType-sType)"}, {VALIDATION_ERROR_15c00009, "The spec valid usage text states 'Both of dstSet, and the elements of pTexelBufferView that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-commonparent)"}, {VALIDATION_ERROR_15c00276, "The spec valid usage text states 'dstBinding must be less than or equal to the maximum value of binding of all VkDescriptorSetLayoutBinding structures specified when dstSet's descriptor set layout was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstBinding-00315)"}, {VALIDATION_ERROR_15c00278, "The spec valid usage text states 'dstBinding must be a binding with a non-zero descriptorCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstBinding-00316)"}, @@ -5217,10 +5471,10 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_15c0027c, "The spec valid usage text states 'All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those with a descriptorCount of zero, must all either use immutable samplers or must all not use immutable samplers.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorCount-00318)"}, {VALIDATION_ERROR_15c0027e, "The spec valid usage text states 'descriptorType must match the type of dstBinding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00319)"}, {VALIDATION_ERROR_15c00280, "The spec valid usage text states 'dstSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstSet-00320)"}, - {VALIDATION_ERROR_15c00282, "The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updates' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstArrayElement-00321)"}, - {VALIDATION_ERROR_15c00284, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pImageInfo must be a pointer to an array of descriptorCount valid VkDescriptorImageInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00322)"}, - {VALIDATION_ERROR_15c00286, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a pointer to an array of descriptorCount valid VkBufferView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00323)"}, - {VALIDATION_ERROR_15c00288, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pBufferInfo must be a pointer to an array of descriptorCount valid VkDescriptorBufferInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00324)"}, + {VALIDATION_ERROR_15c00282, "The spec valid usage text states 'The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by descriptorsets-updates-consecutive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-dstArrayElement-00321)"}, + {VALIDATION_ERROR_15c00284, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pImageInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorImageInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00322)"}, + {VALIDATION_ERROR_15c00286, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a valid pointer to an array of descriptorCount valid VkBufferView handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00323)"}, + {VALIDATION_ERROR_15c00288, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pBufferInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorBufferInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00324)"}, {VALIDATION_ERROR_15c0028a, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and dstSet was not allocated with a layout that included immutable samplers for dstBinding with descriptorType, the sampler member of each element of pImageInfo must be a valid VkSampler object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00325)"}, {VALIDATION_ERROR_15c0028c, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView and imageLayout members of each element of pImageInfo must be a valid VkImageView and VkImageLayout, respectively' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00326)"}, {VALIDATION_ERROR_15c0028e, "The spec valid usage text states 'If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the offset member of each element of pBufferInfo must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-00327)"}, @@ -5242,50 +5496,56 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_15c04e01, "The spec valid usage text states 'descriptorType must be a valid VkDescriptorType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-descriptorType-parameter)"}, {VALIDATION_ERROR_15c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-pNext-pNext)"}, {VALIDATION_ERROR_15c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkWriteDescriptorSet-sType-sType)"}, - {VALIDATION_ERROR_15e00a3c, "The spec valid usage text states 'connection must point to a valid X11 xcb_connection_t.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-connection-01310)"}, - {VALIDATION_ERROR_15e00a3e, "The spec valid usage text states 'window must be a valid X11 xcb_window_t.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-window-01311)"}, - {VALIDATION_ERROR_15e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_15e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_15e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_16000a42, "The spec valid usage text states 'dpy must point to a valid Xlib Display.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-dpy-01313)"}, - {VALIDATION_ERROR_16000a44, "The spec valid usage text states 'window must be a valid Xlib Window.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-window-01314)"}, - {VALIDATION_ERROR_16009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-flags-zerobitmask)"}, - {VALIDATION_ERROR_1601c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_1602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_16205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImage2KHX-device-parameter)"}, - {VALIDATION_ERROR_1620e001, "The spec valid usage text states 'pAcquireInfo must be a pointer to a valid VkAcquireNextImageInfoKHX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImage2KHX-pAcquireInfo-parameter)"}, - {VALIDATION_ERROR_16218601, "The spec valid usage text states 'pImageIndex must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImage2KHX-pImageIndex-parameter)"}, - {VALIDATION_ERROR_16400009, "The spec valid usage text states 'Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-commonparent)"}, - {VALIDATION_ERROR_16400a0a, "The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-01285)"}, - {VALIDATION_ERROR_16400a0c, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286)"}, - {VALIDATION_ERROR_16400a0e, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-01287)"}, - {VALIDATION_ERROR_16405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-device-parameter)"}, - {VALIDATION_ERROR_16408801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-parameter)"}, - {VALIDATION_ERROR_16408807, "The spec valid usage text states 'If fence is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-parent)"}, - {VALIDATION_ERROR_16418601, "The spec valid usage text states 'pImageIndex must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-pImageIndex-parameter)"}, - {VALIDATION_ERROR_1642b801, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parameter)"}, - {VALIDATION_ERROR_1642b807, "The spec valid usage text states 'If semaphore is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parent)"}, - {VALIDATION_ERROR_1642f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-parameter)"}, - {VALIDATION_ERROR_16606001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-display-parameter)"}, - {VALIDATION_ERROR_16606601, "The spec valid usage text states 'dpy must be a pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-dpy-parameter)"}, - {VALIDATION_ERROR_16627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter)"}, + {VALIDATION_ERROR_15e00a3c, "The spec valid usage text states 'connection must point to a valid X11 xcb_connection_t.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-connection-01310)"}, + {VALIDATION_ERROR_15e00a3e, "The spec valid usage text states 'window must be a valid X11 xcb_window_t.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-window-01311)"}, + {VALIDATION_ERROR_15e09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_15e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_15e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXcbSurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_16000a42, "The spec valid usage text states 'dpy must point to a valid Xlib Display.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-dpy-01313)"}, + {VALIDATION_ERROR_16000a44, "The spec valid usage text states 'window must be a valid Xlib Window.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-window-01314)"}, + {VALIDATION_ERROR_16009005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_1601c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_1602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkXlibSurfaceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_16200e16, "The spec valid usage text states 'If the number of currently acquired images is greater than the difference between the number of images in the swapchain member of pAcquireInfo and the value of VkSurfaceCapabilitiesKHR::minImageCount as returned by a call to vkGetPhysicalDeviceSurfaceCapabilities2KHR with the surface used to create swapchain, the timeout member of pAcquireInfo must not be UINT64_MAX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImage2KHX-swapchain-01803)"}, + {VALIDATION_ERROR_16205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImage2KHX-device-parameter)"}, + {VALIDATION_ERROR_1620e001, "The spec valid usage text states 'pAcquireInfo must be a valid pointer to a valid VkAcquireNextImageInfoKHX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImage2KHX-pAcquireInfo-parameter)"}, + {VALIDATION_ERROR_16218601, "The spec valid usage text states 'pImageIndex must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImage2KHX-pImageIndex-parameter)"}, + {VALIDATION_ERROR_16400009, "The spec valid usage text states 'Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-commonparent)"}, + {VALIDATION_ERROR_16400a0a, "The spec valid usage text states 'swapchain must not be in the retired state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-01285)"}, + {VALIDATION_ERROR_16400a0c, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286)"}, + {VALIDATION_ERROR_16400a0e, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-01287)"}, + {VALIDATION_ERROR_16400de6, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01779)"}, + {VALIDATION_ERROR_16400de8, "The spec valid usage text states 'semaphore and fence must not both be equal to VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01780)"}, + {VALIDATION_ERROR_16400e14, "The spec valid usage text states 'If the number of currently acquired images is greater than the difference between the number of images in swapchain and the value of VkSurfaceCapabilitiesKHR::minImageCount as returned by a call to vkGetPhysicalDeviceSurfaceCapabilities2KHR with the surface used to create swapchain, timeout must not be UINT64_MAX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-01802)"}, + {VALIDATION_ERROR_16405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-device-parameter)"}, + {VALIDATION_ERROR_16408801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-parameter)"}, + {VALIDATION_ERROR_16408807, "The spec valid usage text states 'If fence is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-fence-parent)"}, + {VALIDATION_ERROR_16418601, "The spec valid usage text states 'pImageIndex must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-pImageIndex-parameter)"}, + {VALIDATION_ERROR_1642b801, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parameter)"}, + {VALIDATION_ERROR_1642b807, "The spec valid usage text states 'If semaphore is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-parent)"}, + {VALIDATION_ERROR_1642f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-parameter)"}, + {VALIDATION_ERROR_16606001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-display-parameter)"}, + {VALIDATION_ERROR_16606601, "The spec valid usage text states 'dpy must be a valid pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-dpy-parameter)"}, + {VALIDATION_ERROR_16627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter)"}, {VALIDATION_ERROR_16805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateCommandBuffers-device-parameter)"}, - {VALIDATION_ERROR_1680ea01, "The spec valid usage text states 'pAllocateInfo must be a pointer to a valid VkCommandBufferAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateCommandBuffers-pAllocateInfo-parameter)"}, - {VALIDATION_ERROR_16811401, "The spec valid usage text states 'pCommandBuffers must be a pointer to an array of pAllocateInfo::commandBufferCount VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateCommandBuffers-pCommandBuffers-parameter)"}, + {VALIDATION_ERROR_1680ea01, "The spec valid usage text states 'pAllocateInfo must be a valid pointer to a valid VkCommandBufferAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateCommandBuffers-pAllocateInfo-parameter)"}, + {VALIDATION_ERROR_16811401, "The spec valid usage text states 'pCommandBuffers must be a valid pointer to an array of pAllocateInfo::commandBufferCount VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateCommandBuffers-pCommandBuffers-parameter)"}, {VALIDATION_ERROR_16a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateDescriptorSets-device-parameter)"}, - {VALIDATION_ERROR_16a0ea01, "The spec valid usage text states 'pAllocateInfo must be a pointer to a valid VkDescriptorSetAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateDescriptorSets-pAllocateInfo-parameter)"}, - {VALIDATION_ERROR_16a13001, "The spec valid usage text states 'pDescriptorSets must be a pointer to an array of pAllocateInfo::descriptorSetCount VkDescriptorSet handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateDescriptorSets-pDescriptorSets-parameter)"}, + {VALIDATION_ERROR_16a0ea01, "The spec valid usage text states 'pAllocateInfo must be a valid pointer to a valid VkDescriptorSetAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateDescriptorSets-pAllocateInfo-parameter)"}, + {VALIDATION_ERROR_16a13001, "The spec valid usage text states 'pDescriptorSets must be a valid pointer to an array of pAllocateInfo::descriptorSetCount VkDescriptorSet handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateDescriptorSets-pDescriptorSets-parameter)"}, {VALIDATION_ERROR_16c004f8, "The spec valid usage text states 'The number of currently valid memory objects, allocated from device, must be less than VkPhysicalDeviceLimits::maxMemoryAllocationCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-device-00636)"}, + {VALIDATION_ERROR_16c00d62, "The spec valid usage text states 'pAllocateInfo-&gt;allocationSize must be less than or equal to VkPhysicalDeviceMemoryProperties::memoryHeaps[pAllocateInfo-&gt;memoryTypeIndex].size as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that device was created from.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocateInfo-01713)"}, + {VALIDATION_ERROR_16c00d64, "The spec valid usage text states 'pAllocateInfo-&gt;memoryTypeIndex must be less than VkPhysicalDeviceMemoryProperties::memoryTypeCount as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that device was created from.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocateInfo-01714)"}, {VALIDATION_ERROR_16c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-device-parameter)"}, - {VALIDATION_ERROR_16c0ea01, "The spec valid usage text states 'pAllocateInfo must be a pointer to a valid VkMemoryAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocateInfo-parameter)"}, - {VALIDATION_ERROR_16c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocator-parameter)"}, - {VALIDATION_ERROR_16c1aa01, "The spec valid usage text states 'pMemory must be a pointer to a VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pMemory-parameter)"}, + {VALIDATION_ERROR_16c0ea01, "The spec valid usage text states 'pAllocateInfo must be a valid pointer to a valid VkMemoryAllocateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocateInfo-parameter)"}, + {VALIDATION_ERROR_16c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pAllocator-parameter)"}, + {VALIDATION_ERROR_16c1aa01, "The spec valid usage text states 'pMemory must be a valid pointer to a VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkAllocateMemory-pMemory-parameter)"}, {VALIDATION_ERROR_16e00062, "The spec valid usage text states 'commandBuffer must not be in the recording or pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00049)"}, {VALIDATION_ERROR_16e00064, "The spec valid usage text states 'If commandBuffer was allocated from a VkCommandPool which did not have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, commandBuffer must be in the initial state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00050)"}, {VALIDATION_ERROR_16e00066, "The spec valid usage text states 'If commandBuffer is a secondary command buffer, the pInheritanceInfo member of pBeginInfo must be a valid VkCommandBufferInheritanceInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00051)"}, {VALIDATION_ERROR_16e00068, "The spec valid usage text states 'If commandBuffer is a secondary command buffer and either the occlusionQueryEnable member of the pInheritanceInfo member of pBeginInfo is VK_FALSE, or the precise occlusion queries feature is not enabled, the queryFlags member of the pInheritanceInfo member pBeginInfo must not contain VK_QUERY_CONTROL_PRECISE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00052)"}, {VALIDATION_ERROR_16e02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-parameter)"}, - {VALIDATION_ERROR_16e0f601, "The spec valid usage text states 'pBeginInfo must be a pointer to a valid VkCommandBufferBeginInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-pBeginInfo-parameter)"}, + {VALIDATION_ERROR_16e0f601, "The spec valid usage text states 'pBeginInfo must be a valid pointer to a valid VkCommandBufferBeginInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBeginCommandBuffer-pBeginInfo-parameter)"}, {VALIDATION_ERROR_1700080a, "The spec valid usage text states 'buffer must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-buffer-01029)"}, {VALIDATION_ERROR_1700080c, "The spec valid usage text states 'buffer must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-buffer-01030)"}, {VALIDATION_ERROR_1700080e, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-memoryOffset-01031)"}, @@ -5298,15 +5558,15 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1700081c, "The spec valid usage text states 'If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to a buffer handle created with identical creation parameters to buffer and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory-buffer-01038)"}, {VALIDATION_ERROR_1700081e, "The spec valid usage text states 'If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-buffer-01039)"}, {VALIDATION_ERROR_17000b48, "The spec valid usage text states 'If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory-buffer-01444)"}, - {VALIDATION_ERROR_17000bc8, "The spec valid usage text states 'If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfo in its pNext chain, and VkMemoryDedicatedAllocateInfo::buffer was not VK_NULL_HANDLE, then buffer must equal VkMemoryDedicatedAllocateInfo::buffer and memoryOffset must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-01508)"}, + {VALIDATION_ERROR_17000bc8, "The spec valid usage text states 'If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfoKHR in its pNext chain, and VkMemoryDedicatedAllocateInfoKHR::buffer was not VK_NULL_HANDLE, then buffer must equal VkMemoryDedicatedAllocateInfoKHR::buffer and memoryOffset must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory-memory-01508)"}, {VALIDATION_ERROR_17001a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-buffer-parameter)"}, {VALIDATION_ERROR_17001a07, "The spec valid usage text states 'buffer must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-buffer-parent)"}, {VALIDATION_ERROR_17005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-device-parameter)"}, {VALIDATION_ERROR_1700c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-memory-parameter)"}, {VALIDATION_ERROR_1700c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory-memory-parent)"}, - {VALIDATION_ERROR_1720161b, "The spec valid usage text states 'bindInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory2KHR-bindInfoCount-arraylength)"}, - {VALIDATION_ERROR_17205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory2KHR-device-parameter)"}, - {VALIDATION_ERROR_1720fa01, "The spec valid usage text states 'pBindInfos must be a pointer to an array of bindInfoCount valid VkBindBufferMemoryInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindBufferMemory2KHR-pBindInfos-parameter)"}, + {VALIDATION_ERROR_1720161b, "The spec valid usage text states 'bindInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory2KHR-bindInfoCount-arraylength)"}, + {VALIDATION_ERROR_17205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory2KHR-device-parameter)"}, + {VALIDATION_ERROR_1720fa01, "The spec valid usage text states 'pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindBufferMemoryInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindBufferMemory2KHR-pBindInfos-parameter)"}, {VALIDATION_ERROR_17400828, "The spec valid usage text states 'image must not already be backed by a memory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-image-01044)"}, {VALIDATION_ERROR_1740082a, "The spec valid usage text states 'image must not have been created with any sparse memory binding flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-image-01045)"}, {VALIDATION_ERROR_1740082c, "The spec valid usage text states 'memoryOffset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-memoryOffset-01046)"}, @@ -5316,16 +5576,16 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_17400834, "The spec valid usage text states 'If image was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image equal to an image handle created with identical creation parameters to image and memoryOffset must be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory-image-01050)"}, {VALIDATION_ERROR_17400836, "The spec valid usage text states 'If image was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-image-01051)"}, {VALIDATION_ERROR_17400b4a, "The spec valid usage text states 'If image requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::image equal to image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory-image-01445)"}, - {VALIDATION_ERROR_17400bca, "The spec valid usage text states 'If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfo in its pNext chain, and VkMemoryDedicatedAllocateInfo::image was not VK_NULL_HANDLE, then image must equal VkMemoryDedicatedAllocateInfo::image and memoryOffset must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory-memory-01509)"}, + {VALIDATION_ERROR_17400bca, "The spec valid usage text states 'If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfoKHR in its pNext chain, and VkMemoryDedicatedAllocateInfoKHR::image was not VK_NULL_HANDLE, then image must equal VkMemoryDedicatedAllocateInfoKHR::image and memoryOffset must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory-memory-01509)"}, {VALIDATION_ERROR_17400c90, "The spec valid usage text states 'image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR set.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory-image-01608)"}, {VALIDATION_ERROR_17405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-device-parameter)"}, {VALIDATION_ERROR_1740a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-image-parameter)"}, {VALIDATION_ERROR_1740a007, "The spec valid usage text states 'image must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-image-parent)"}, {VALIDATION_ERROR_1740c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-memory-parameter)"}, {VALIDATION_ERROR_1740c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory-memory-parent)"}, - {VALIDATION_ERROR_1760161b, "The spec valid usage text states 'bindInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory2KHR-bindInfoCount-arraylength)"}, - {VALIDATION_ERROR_17605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory2KHR-device-parameter)"}, - {VALIDATION_ERROR_1760fa01, "The spec valid usage text states 'pBindInfos must be a pointer to an array of bindInfoCount valid VkBindImageMemoryInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkBindImageMemory2KHR-pBindInfos-parameter)"}, + {VALIDATION_ERROR_1760161b, "The spec valid usage text states 'bindInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory2KHR-bindInfoCount-arraylength)"}, + {VALIDATION_ERROR_17605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory2KHR-device-parameter)"}, + {VALIDATION_ERROR_1760fa01, "The spec valid usage text states 'pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindImageMemoryInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkBindImageMemory2KHR-pBindInfos-parameter)"}, {VALIDATION_ERROR_17800009, "The spec valid usage text states 'Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginQuery-commonparent)"}, {VALIDATION_ERROR_1780063c, "The spec valid usage text states 'The query identified by queryPool and query must currently not be active' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginQuery-queryPool-00798)"}, {VALIDATION_ERROR_1780063e, "The spec valid usage text states 'The query identified by queryPool and query must be unavailable' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginQuery-queryPool-00799)"}, @@ -5346,17 +5606,18 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_17a00017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-renderpass)"}, {VALIDATION_ERROR_17a00019, "The spec valid usage text states 'commandBuffer must be a primary VkCommandBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-bufferlevel)"}, {VALIDATION_ERROR_17a006fe, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00895)"}, - {VALIDATION_ERROR_17a00700, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00896)"}, + {VALIDATION_ERROR_17a00700, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00896)"}, {VALIDATION_ERROR_17a00702, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00897)"}, {VALIDATION_ERROR_17a00704, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00898)"}, {VALIDATION_ERROR_17a00706, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00899)"}, {VALIDATION_ERROR_17a00708, "The spec valid usage text states 'If any of the initialLayout members of the VkAttachmentDescription structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is not VK_IMAGE_LAYOUT_UNDEFINED, then each such initialLayout must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-00900)"}, - {VALIDATION_ERROR_17a0070a, "The spec valid usage text states 'The srcStageMask and dstStageMask members of any element of the pDependencies member of VkRenderPassCreateInfo used to create renderpass must be supported by the capabilities of the queue family identified by the queueFamilyIndex member of the VkCommandPoolCreateInfo used to create the command pool which commandBuffer was allocated from.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-srcStageMask-00901)"}, + {VALIDATION_ERROR_17a0070a, "The spec valid usage text states 'The srcStageMask and dstStageMask members of any element of the pDependencies member of VkRenderPassCreateInfo used to create renderPass must be supported by the capabilities of the queue family identified by the queueFamilyIndex member of the VkCommandPoolCreateInfo used to create the command pool which commandBuffer was allocated from.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-srcStageMask-00901)"}, + {VALIDATION_ERROR_17a00dbc, "The spec valid usage text states 'If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBeginRenderPass-initialLayout-01758)"}, {VALIDATION_ERROR_17a02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-commandBuffer-parameter)"}, {VALIDATION_ERROR_17a02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-commandBuffer-recording)"}, {VALIDATION_ERROR_17a02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_17a03201, "The spec valid usage text states 'contents must be a valid VkSubpassContents value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-contents-parameter)"}, - {VALIDATION_ERROR_17a21801, "The spec valid usage text states 'pRenderPassBegin must be a pointer to a valid VkRenderPassBeginInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-pRenderPassBegin-parameter)"}, + {VALIDATION_ERROR_17a21801, "The spec valid usage text states 'pRenderPassBegin must be a valid pointer to a valid VkRenderPassBeginInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBeginRenderPass-pRenderPassBegin-parameter)"}, {VALIDATION_ERROR_17c00009, "The spec valid usage text states 'Each of commandBuffer, layout, and the elements of pDescriptorSets must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-commonparent)"}, {VALIDATION_ERROR_17c002cc, "The spec valid usage text states 'Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout that matches (is the same as, or identically defined as) the VkDescriptorSetLayout at set n in layout, where n is the sum of firstSet and the index into pDescriptorSets' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358)"}, {VALIDATION_ERROR_17c002ce, "The spec valid usage text states 'dynamicOffsetCount must be equal to the total number of dynamic descriptors in pDescriptorSets' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-dynamicOffsetCount-00359)"}, @@ -5368,8 +5629,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_17c02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_17c04a1b, "The spec valid usage text states 'descriptorSetCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-descriptorSetCount-arraylength)"}, {VALIDATION_ERROR_17c0be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-layout-parameter)"}, - {VALIDATION_ERROR_17c13001, "The spec valid usage text states 'pDescriptorSets must be a pointer to an array of descriptorSetCount valid VkDescriptorSet handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)"}, - {VALIDATION_ERROR_17c15401, "The spec valid usage text states 'If dynamicOffsetCount is not 0, pDynamicOffsets must be a pointer to an array of dynamicOffsetCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDynamicOffsets-parameter)"}, + {VALIDATION_ERROR_17c13001, "The spec valid usage text states 'pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter)"}, + {VALIDATION_ERROR_17c15401, "The spec valid usage text states 'If dynamicOffsetCount is not 0, pDynamicOffsets must be a valid pointer to an array of dynamicOffsetCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDynamicOffsets-parameter)"}, {VALIDATION_ERROR_17c27e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pipelineBindPoint-parameter)"}, {VALIDATION_ERROR_17e00009, "The spec valid usage text states 'Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindIndexBuffer-commonparent)"}, {VALIDATION_ERROR_17e0035e, "The spec valid usage text states 'offset must be less than the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindIndexBuffer-offset-00431)"}, @@ -5403,8 +5664,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-commandBuffer-parameter)"}, {VALIDATION_ERROR_18202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-commandBuffer-recording)"}, {VALIDATION_ERROR_18202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_18210601, "The spec valid usage text states 'pBuffers must be a pointer to an array of bindingCount valid VkBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-pBuffers-parameter)"}, - {VALIDATION_ERROR_1821d201, "The spec valid usage text states 'pOffsets must be a pointer to an array of bindingCount VkDeviceSize values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-pOffsets-parameter)"}, + {VALIDATION_ERROR_18210601, "The spec valid usage text states 'pBuffers must be a valid pointer to an array of bindingCount valid VkBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-pBuffers-parameter)"}, + {VALIDATION_ERROR_1821d201, "The spec valid usage text states 'pOffsets must be a valid pointer to an array of bindingCount VkDeviceSize values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBindVertexBuffers-pOffsets-parameter)"}, {VALIDATION_ERROR_18400009, "The spec valid usage text states 'Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-commonparent)"}, {VALIDATION_ERROR_18400017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-renderpass)"}, {VALIDATION_ERROR_184001ae, "The spec valid usage text states 'The source region specified by each element of pRegions must be a region that is contained within srcImage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-pRegions-00215)"}, @@ -5432,15 +5693,19 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_184001da, "The spec valid usage text states 'If filter is VK_FILTER_CUBIC_IMG, srcImage must have a VkImageType of VK_IMAGE_TYPE_3D' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-filter-00237)"}, {VALIDATION_ERROR_18400aec, "The spec valid usage text states 'srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-srcImageLayout-01398)"}, {VALIDATION_ERROR_18400aee, "The spec valid usage text states 'dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-dstImageLayout-01399)"}, - {VALIDATION_ERROR_18400c32, "The spec valid usage text states 'srcImage must not use a format listed in Formats requiring sampler Y'CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-srcImage-01561)"}, - {VALIDATION_ERROR_18400c34, "The spec valid usage text states 'dstImage must not use a format listed in Formats requiring sampler Y'CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-dstImage-01562)"}, + {VALIDATION_ERROR_18400c32, "The spec valid usage text states 'srcImage must not use a format listed in features-formats-requiring-sampler-ycbcr-conversion' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-srcImage-01561)"}, + {VALIDATION_ERROR_18400c34, "The spec valid usage text states 'dstImage must not use a format listed in features-formats-requiring-sampler-ycbcr-conversion' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdBlitImage-dstImage-01562)"}, + {VALIDATION_ERROR_18400d52, "The spec valid usage text states 'The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-srcSubresource-01705)"}, + {VALIDATION_ERROR_18400d54, "The spec valid usage text states 'The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-dstSubresource-01706)"}, + {VALIDATION_ERROR_18400d56, "The spec valid usage text states 'The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-srcSubresource-01707)"}, + {VALIDATION_ERROR_18400d58, "The spec valid usage text states 'The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-dstSubresource-01708)"}, {VALIDATION_ERROR_18402401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_18402413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-commandBuffer-recording)"}, {VALIDATION_ERROR_18402415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_18407201, "The spec valid usage text states 'dstImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-dstImage-parameter)"}, {VALIDATION_ERROR_18407401, "The spec valid usage text states 'dstImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-dstImageLayout-parameter)"}, {VALIDATION_ERROR_18408c01, "The spec valid usage text states 'filter must be a valid VkFilter value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-filter-parameter)"}, - {VALIDATION_ERROR_18421001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount valid VkImageBlit structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-pRegions-parameter)"}, + {VALIDATION_ERROR_18421001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount valid VkImageBlit structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-pRegions-parameter)"}, {VALIDATION_ERROR_1842ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-regionCount-arraylength)"}, {VALIDATION_ERROR_1842ce01, "The spec valid usage text states 'srcImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-srcImage-parameter)"}, {VALIDATION_ERROR_1842d001, "The spec valid usage text states 'srcImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdBlitImage-srcImageLayout-parameter)"}, @@ -5453,8 +5718,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18602401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-commandBuffer-parameter)"}, {VALIDATION_ERROR_18602413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-commandBuffer-recording)"}, {VALIDATION_ERROR_18602415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1860f201, "The spec valid usage text states 'pAttachments must be a pointer to an array of attachmentCount valid VkClearAttachment structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-pAttachments-parameter)"}, - {VALIDATION_ERROR_18620e01, "The spec valid usage text states 'pRects must be a pointer to an array of rectCount VkClearRect structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-pRects-parameter)"}, + {VALIDATION_ERROR_1860f201, "The spec valid usage text states 'pAttachments must be a valid pointer to an array of attachmentCount valid VkClearAttachment structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-pAttachments-parameter)"}, + {VALIDATION_ERROR_18620e01, "The spec valid usage text states 'pRects must be a valid pointer to an array of rectCount VkClearRect structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-pRects-parameter)"}, {VALIDATION_ERROR_1862aa1b, "The spec valid usage text states 'rectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearAttachments-rectCount-arraylength)"}, {VALIDATION_ERROR_18800002, "The spec valid usage text states 'image must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdClearColorImage-image-00001)"}, {VALIDATION_ERROR_18800004, "The spec valid usage text states 'image must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-image-00002)"}, @@ -5470,14 +5735,16 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18800b7e, "The spec valid usage text states 'If the VkImageSubresourceRange::levelCount member of any element of the pRanges array is not VK_REMAINING_MIP_LEVELS, it must be non-zero and VkImageSubresourceRange::baseMipLevel + VkImageSubresourceRange::levelCount for that element of the pRanges array must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-levelCount-01471)"}, {VALIDATION_ERROR_18800b80, "The spec valid usage text states 'The VkImageSubresourceRange::baseArrayLayer members of the elements of the pRanges array must each be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-baseArrayLayer-01472)"}, {VALIDATION_ERROR_18800b82, "The spec valid usage text states 'If the VkImageSubresourceRange::layerCount member of any element of the pRanges array is not VK_REMAINING_ARRAY_LAYERS, it must be non-zero and VkImageSubresourceRange::baseArrayLayer + VkImageSubresourceRange::layerCount for that element of the pRanges array must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-layerCount-01473)"}, - {VALIDATION_ERROR_18800c12, "The spec valid usage text states 'image must not use a format listed in Formats requiring sampler Y'CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdClearColorImage-image-01545)"}, + {VALIDATION_ERROR_18800c12, "The spec valid usage text states 'image must not use a format listed in features-formats-requiring-sampler-ycbcr-conversion' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdClearColorImage-image-01545)"}, + {VALIDATION_ERROR_18800d38, "The spec valid usage text states 'For each VkImageSubresourceRange element of pRanges, if the levelCount member is not VK_REMAINING_MIP_LEVELS, then baseMipLevel + levelCount must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pRanges-01692)"}, + {VALIDATION_ERROR_18800d3a, "The spec valid usage text states 'For each VkImageSubresourceRange element of pRanges, if the layerCount member is not VK_REMAINING_ARRAY_LAYERS, then baseArrayLayer + layerCount must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pRanges-01693)"}, {VALIDATION_ERROR_18802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_18802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-commandBuffer-recording)"}, {VALIDATION_ERROR_18802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1880a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-image-parameter)"}, {VALIDATION_ERROR_1880a601, "The spec valid usage text states 'imageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-imageLayout-parameter)"}, - {VALIDATION_ERROR_18810e01, "The spec valid usage text states 'pColor must be a pointer to a valid VkClearColorValue union' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pColor-parameter)"}, - {VALIDATION_ERROR_18820601, "The spec valid usage text states 'pRanges must be a pointer to an array of rangeCount valid VkImageSubresourceRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pRanges-parameter)"}, + {VALIDATION_ERROR_18810e01, "The spec valid usage text states 'pColor must be a valid pointer to a valid VkClearColorValue union' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pColor-parameter)"}, + {VALIDATION_ERROR_18820601, "The spec valid usage text states 'pRanges must be a valid pointer to an array of rangeCount valid VkImageSubresourceRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-pRanges-parameter)"}, {VALIDATION_ERROR_1882a41b, "The spec valid usage text states 'rangeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearColorImage-rangeCount-arraylength)"}, {VALIDATION_ERROR_18a00009, "The spec valid usage text states 'Both of commandBuffer, and image must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-commonparent)"}, {VALIDATION_ERROR_18a00010, "The spec valid usage text states 'image must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-image-00008)"}, @@ -5492,13 +5759,15 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18a00b86, "The spec valid usage text states 'If the VkImageSubresourceRange::levelCount member of any element of the pRanges array is not VK_REMAINING_MIP_LEVELS, it must be non-zero and VkImageSubresourceRange::baseMipLevel + VkImageSubresourceRange::levelCount for that element of the pRanges array must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-levelCount-01475)"}, {VALIDATION_ERROR_18a00b88, "The spec valid usage text states 'The VkImageSubresourceRange::baseArrayLayer members of the elements of the pRanges array must each be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-baseArrayLayer-01476)"}, {VALIDATION_ERROR_18a00b8a, "The spec valid usage text states 'If the VkImageSubresourceRange::layerCount member of any element of the pRanges array is not VK_REMAINING_ARRAY_LAYERS, it must be non-zero and VkImageSubresourceRange::baseArrayLayer + VkImageSubresourceRange::layerCount for that element of the pRanges array must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-layerCount-01477)"}, + {VALIDATION_ERROR_18a00d3c, "The spec valid usage text states 'For each VkImageSubresourceRange element of pRanges, if the levelCount member is not VK_REMAINING_MIP_LEVELS, then baseMipLevel + levelCount must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pRanges-01694)"}, + {VALIDATION_ERROR_18a00d3e, "The spec valid usage text states 'For each VkImageSubresourceRange element of pRanges, if the layerCount member is not VK_REMAINING_ARRAY_LAYERS, then baseArrayLayer + layerCount must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pRanges-01695)"}, {VALIDATION_ERROR_18a02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_18a02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-commandBuffer-recording)"}, {VALIDATION_ERROR_18a02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_18a0a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-image-parameter)"}, {VALIDATION_ERROR_18a0a601, "The spec valid usage text states 'imageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-imageLayout-parameter)"}, - {VALIDATION_ERROR_18a12801, "The spec valid usage text states 'pDepthStencil must be a pointer to a valid VkClearDepthStencilValue structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pDepthStencil-parameter)"}, - {VALIDATION_ERROR_18a20601, "The spec valid usage text states 'pRanges must be a pointer to an array of rangeCount valid VkImageSubresourceRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pRanges-parameter)"}, + {VALIDATION_ERROR_18a12801, "The spec valid usage text states 'pDepthStencil must be a valid pointer to a valid VkClearDepthStencilValue structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pDepthStencil-parameter)"}, + {VALIDATION_ERROR_18a20601, "The spec valid usage text states 'pRanges must be a valid pointer to an array of rangeCount valid VkImageSubresourceRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-pRanges-parameter)"}, {VALIDATION_ERROR_18a2a41b, "The spec valid usage text states 'rangeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdClearDepthStencilImage-rangeCount-arraylength)"}, {VALIDATION_ERROR_18c00009, "The spec valid usage text states 'Each of commandBuffer, dstBuffer, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-commonparent)"}, {VALIDATION_ERROR_18c00017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-renderpass)"}, @@ -5516,7 +5785,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18c02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-commandBuffer-recording)"}, {VALIDATION_ERROR_18c02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_18c06c01, "The spec valid usage text states 'dstBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-parameter)"}, - {VALIDATION_ERROR_18c21001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount VkBufferCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-pRegions-parameter)"}, + {VALIDATION_ERROR_18c21001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount VkBufferCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-pRegions-parameter)"}, {VALIDATION_ERROR_18c2ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-regionCount-arraylength)"}, {VALIDATION_ERROR_18c2c801, "The spec valid usage text states 'srcBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBuffer-srcBuffer-parameter)"}, {VALIDATION_ERROR_18e00009, "The spec valid usage text states 'Each of commandBuffer, dstImage, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-commonparent)"}, @@ -5533,12 +5802,15 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_18e00168, "The spec valid usage text states 'dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-dstImageLayout-00180)"}, {VALIDATION_ERROR_18e0016a, "The spec valid usage text states 'dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-dstImageLayout-00181)"}, {VALIDATION_ERROR_18e00ae8, "The spec valid usage text states 'dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyBufferToImage-dstImageLayout-01396)"}, + {VALIDATION_ERROR_18e00d4a, "The spec valid usage text states 'The imageSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-imageSubresource-01701)"}, + {VALIDATION_ERROR_18e00d4c, "The spec valid usage text states 'The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-imageSubresource-01702)"}, + {VALIDATION_ERROR_18e00e02, "The spec valid usage text states 'The imageOffset and and imageExtent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer's command pool's queue family, as described in VkQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-imageOffset-01793)"}, {VALIDATION_ERROR_18e02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_18e02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-commandBuffer-recording)"}, {VALIDATION_ERROR_18e02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_18e07201, "The spec valid usage text states 'dstImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-dstImage-parameter)"}, {VALIDATION_ERROR_18e07401, "The spec valid usage text states 'dstImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-dstImageLayout-parameter)"}, - {VALIDATION_ERROR_18e21001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount valid VkBufferImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-pRegions-parameter)"}, + {VALIDATION_ERROR_18e21001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount valid VkBufferImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-pRegions-parameter)"}, {VALIDATION_ERROR_18e2ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-regionCount-arraylength)"}, {VALIDATION_ERROR_18e2c801, "The spec valid usage text states 'srcBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyBufferToImage-srcBuffer-parameter)"}, {VALIDATION_ERROR_19000009, "The spec valid usage text states 'Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-commonparent)"}, @@ -5550,7 +5822,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_190000fc, "The spec valid usage text states 'srcImage must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImage-00126)"}, {VALIDATION_ERROR_190000fe, "The spec valid usage text states 'If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImage-00127)"}, {VALIDATION_ERROR_19000100, "The spec valid usage text states 'srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImageLayout-00128)"}, - {VALIDATION_ERROR_19000102, "The spec valid usage text states 'srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImage-srcImageLayout-00129)"}, + {VALIDATION_ERROR_19000102, "The spec valid usage text states 'srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImageLayout-00129)"}, {VALIDATION_ERROR_19000104, "The spec valid usage text states 'dstImage must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImage-dstImage-00130)"}, {VALIDATION_ERROR_19000106, "The spec valid usage text states 'dstImage must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstImage-00131)"}, {VALIDATION_ERROR_19000108, "The spec valid usage text states 'If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstImage-00132)"}, @@ -5564,12 +5836,18 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_19000c18, "The spec valid usage text states 'If the VkFormat of each of srcImage and dstImage is not a multi-planar format, the VkFormat of each of srcImage and dstImage must be compatible, as defined below' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImage-srcImage-01548)"}, {VALIDATION_ERROR_19000c1a, "The spec valid usage text states 'In a copy to or from a plane of a multi-planar image, the VkFormat of the image and plane must be compatible according to the description of compatible planes for the plane being copied' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImage-None-01549)"}, {VALIDATION_ERROR_19000c1c, "The spec valid usage text states 'When a copy is performed to or from an image with a multi-planar format, the aspectMask of the srcSubresource and/or dstSubresource that refers to the multi-planar image must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR (with VK_IMAGE_ASPECT_PLANE_2_BIT_KHR valid only for a VkFormat with three planes)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImage-aspectMask-01550)"}, + {VALIDATION_ERROR_19000d40, "The spec valid usage text states 'The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcSubresource-01696)"}, + {VALIDATION_ERROR_19000d42, "The spec valid usage text states 'The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstSubresource-01697)"}, + {VALIDATION_ERROR_19000d44, "The spec valid usage text states 'The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcSubresource-01698)"}, + {VALIDATION_ERROR_19000d46, "The spec valid usage text states 'The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstSubresource-01699)"}, + {VALIDATION_ERROR_19000dee, "The spec valid usage text states 'The srcOffset and and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer's command pool's queue family, as described in VkQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcOffset-01783)"}, + {VALIDATION_ERROR_19000df0, "The spec valid usage text states 'The dstOffset and and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer's command pool's queue family, as described in VkQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstOffset-01784)"}, {VALIDATION_ERROR_19002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_19002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-commandBuffer-recording)"}, {VALIDATION_ERROR_19002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_19007201, "The spec valid usage text states 'dstImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstImage-parameter)"}, {VALIDATION_ERROR_19007401, "The spec valid usage text states 'dstImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-dstImageLayout-parameter)"}, - {VALIDATION_ERROR_19021001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount valid VkImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-pRegions-parameter)"}, + {VALIDATION_ERROR_19021001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount valid VkImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-pRegions-parameter)"}, {VALIDATION_ERROR_1902ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-regionCount-arraylength)"}, {VALIDATION_ERROR_1902ce01, "The spec valid usage text states 'srcImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImage-parameter)"}, {VALIDATION_ERROR_1902d001, "The spec valid usage text states 'srcImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImage-srcImageLayout-parameter)"}, @@ -5587,11 +5865,14 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1920017e, "The spec valid usage text states 'dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-dstBuffer-00191)"}, {VALIDATION_ERROR_19200180, "The spec valid usage text states 'If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-dstBuffer-00192)"}, {VALIDATION_ERROR_19200aea, "The spec valid usage text states 'srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-srcImageLayout-01397)"}, + {VALIDATION_ERROR_19200d4e, "The spec valid usage text states 'The imageSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-imageSubresource-01703)"}, + {VALIDATION_ERROR_19200d50, "The spec valid usage text states 'The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-imageSubresource-01704)"}, + {VALIDATION_ERROR_19200e04, "The spec valid usage text states 'The imageOffset and and imageExtent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer's command pool's queue family, as described in VkQueueFamilyProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-imageOffset-01794)"}, {VALIDATION_ERROR_19202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-commandBuffer-parameter)"}, {VALIDATION_ERROR_19202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-commandBuffer-recording)"}, {VALIDATION_ERROR_19202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_19206c01, "The spec valid usage text states 'dstBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-dstBuffer-parameter)"}, - {VALIDATION_ERROR_19221001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount valid VkBufferImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-pRegions-parameter)"}, + {VALIDATION_ERROR_19221001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount valid VkBufferImageCopy structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-pRegions-parameter)"}, {VALIDATION_ERROR_1922ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-regionCount-arraylength)"}, {VALIDATION_ERROR_1922ce01, "The spec valid usage text states 'srcImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-srcImage-parameter)"}, {VALIDATION_ERROR_1922d001, "The spec valid usage text states 'srcImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyImageToBuffer-srcImageLayout-parameter)"}, @@ -5612,27 +5893,27 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_19406c01, "The spec valid usage text states 'dstBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyQueryPoolResults-dstBuffer-parameter)"}, {VALIDATION_ERROR_19409001, "The spec valid usage text states 'flags must be a valid combination of VkQueryResultFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyQueryPoolResults-flags-parameter)"}, {VALIDATION_ERROR_19429801, "The spec valid usage text states 'queryPool must be a valid VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdCopyQueryPoolResults-queryPool-parameter)"}, - {VALIDATION_ERROR_19602401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter)"}, - {VALIDATION_ERROR_19602413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-recording)"}, - {VALIDATION_ERROR_19602415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1961a601, "The spec valid usage text states 'pMarkerInfo must be a pointer to a valid VkDebugMarkerMarkerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-pMarkerInfo-parameter)"}, - {VALIDATION_ERROR_198009ae, "The spec valid usage text states 'There must be an outstanding vkCmdDebugMarkerBeginEXT command prior to the vkCmdDebugMarkerEndEXT on the queue that commandBuffer is submitted to' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01239)"}, - {VALIDATION_ERROR_198009b0, "The spec valid usage text states 'If commandBuffer is a secondary command buffer, there must be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01240)"}, - {VALIDATION_ERROR_19802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-parameter)"}, - {VALIDATION_ERROR_19802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-recording)"}, - {VALIDATION_ERROR_19802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_19a02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-parameter)"}, - {VALIDATION_ERROR_19a02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-recording)"}, - {VALIDATION_ERROR_19a02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_19a1a601, "The spec valid usage text states 'pMarkerInfo must be a pointer to a valid VkDebugMarkerMarkerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-pMarkerInfo-parameter)"}, + {VALIDATION_ERROR_19602401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter)"}, + {VALIDATION_ERROR_19602413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-recording)"}, + {VALIDATION_ERROR_19602415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1961a601, "The spec valid usage text states 'pMarkerInfo must be a valid pointer to a valid VkDebugMarkerMarkerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerBeginEXT-pMarkerInfo-parameter)"}, + {VALIDATION_ERROR_198009ae, "The spec valid usage text states 'There must be an outstanding vkCmdDebugMarkerBeginEXT command prior to the vkCmdDebugMarkerEndEXT on the queue that commandBuffer is submitted to' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01239)"}, + {VALIDATION_ERROR_198009b0, "The spec valid usage text states 'If commandBuffer is a secondary command buffer, there must be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01240)"}, + {VALIDATION_ERROR_19802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-parameter)"}, + {VALIDATION_ERROR_19802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-recording)"}, + {VALIDATION_ERROR_19802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerEndEXT-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_19a02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-parameter)"}, + {VALIDATION_ERROR_19a02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-recording)"}, + {VALIDATION_ERROR_19a02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_19a1a601, "The spec valid usage text states 'pMarkerInfo must be a valid pointer to a valid VkDebugMarkerMarkerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDebugMarkerInsertEXT-pMarkerInfo-parameter)"}, {VALIDATION_ERROR_19c00017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-renderpass)"}, {VALIDATION_ERROR_19c00304, "The spec valid usage text states 'groupCountX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-groupCountX-00386)"}, {VALIDATION_ERROR_19c00306, "The spec valid usage text states 'groupCountY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-groupCountY-00387)"}, {VALIDATION_ERROR_19c00308, "The spec valid usage text states 'groupCountZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-groupCountZ-00388)"}, - {VALIDATION_ERROR_19c0030a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00389)"}, + {VALIDATION_ERROR_19c0030a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00389)"}, {VALIDATION_ERROR_19c0030c, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00390)"}, {VALIDATION_ERROR_19c0030e, "The spec valid usage text states 'A valid compute pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_COMPUTE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00391)"}, - {VALIDATION_ERROR_19c00310, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00392)"}, + {VALIDATION_ERROR_19c00310, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00392)"}, {VALIDATION_ERROR_19c00312, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00393)"}, {VALIDATION_ERROR_19c00314, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00394)"}, {VALIDATION_ERROR_19c00316, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-None-00395)"}, @@ -5644,28 +5925,28 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_19c02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-commandBuffer-parameter)"}, {VALIDATION_ERROR_19c02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-commandBuffer-recording)"}, {VALIDATION_ERROR_19c02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatch-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_19e00017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-renderpass)"}, - {VALIDATION_ERROR_19e00348, "The spec valid usage text states 'All valid usage rules from vkCmdDispatch apply' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-None-00420)"}, - {VALIDATION_ERROR_19e0034a, "The spec valid usage text states 'baseGroupX must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00421)"}, - {VALIDATION_ERROR_19e0034c, "The spec valid usage text states 'baseGroupX must be less than VkPhysicaYDeviceLimits::maxComputeWorkGroupCount[1]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00422)"}, - {VALIDATION_ERROR_19e0034e, "The spec valid usage text states 'baseGroupZ must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupZ-00423)"}, - {VALIDATION_ERROR_19e00350, "The spec valid usage text states 'groupCountX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] minus baseGroupX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountX-00424)"}, - {VALIDATION_ERROR_19e00352, "The spec valid usage text states 'groupCountY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] minus baseGroupY' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountY-00425)"}, - {VALIDATION_ERROR_19e00354, "The spec valid usage text states 'groupCountZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] minus baseGroupZ' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountZ-00426)"}, - {VALIDATION_ERROR_19e00356, "The spec valid usage text states 'If any of baseGroupX, baseGroupY, or baseGroupZ are not zero, then the currently bound compute pipeline must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE_KHX flag.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00427)"}, - {VALIDATION_ERROR_19e02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-parameter)"}, - {VALIDATION_ERROR_19e02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-recording)"}, - {VALIDATION_ERROR_19e02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_19e00017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-renderpass)"}, + {VALIDATION_ERROR_19e00348, "The spec valid usage text states 'All valid usage rules from vkCmdDispatch apply' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-None-00420)"}, + {VALIDATION_ERROR_19e0034a, "The spec valid usage text states 'baseGroupX must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00421)"}, + {VALIDATION_ERROR_19e0034c, "The spec valid usage text states 'baseGroupX must be less than VkPhysicaYDeviceLimits::maxComputeWorkGroupCount[1]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00422)"}, + {VALIDATION_ERROR_19e0034e, "The spec valid usage text states 'baseGroupZ must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupZ-00423)"}, + {VALIDATION_ERROR_19e00350, "The spec valid usage text states 'groupCountX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] minus baseGroupX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountX-00424)"}, + {VALIDATION_ERROR_19e00352, "The spec valid usage text states 'groupCountY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] minus baseGroupY' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountY-00425)"}, + {VALIDATION_ERROR_19e00354, "The spec valid usage text states 'groupCountZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] minus baseGroupZ' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-groupCountZ-00426)"}, + {VALIDATION_ERROR_19e00356, "The spec valid usage text states 'If any of baseGroupX, baseGroupY, or baseGroupZ are not zero, then the currently bound compute pipeline must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE_KHX flag.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-baseGroupX-00427)"}, + {VALIDATION_ERROR_19e02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-parameter)"}, + {VALIDATION_ERROR_19e02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-recording)"}, + {VALIDATION_ERROR_19e02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDispatchBaseKHX-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1a000009, "The spec valid usage text states 'Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-commonparent)"}, {VALIDATION_ERROR_1a000017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-renderpass)"}, {VALIDATION_ERROR_1a000322, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-buffer-00401)"}, - {VALIDATION_ERROR_1a000324, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00402)"}, + {VALIDATION_ERROR_1a000324, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00402)"}, {VALIDATION_ERROR_1a000326, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00403)"}, {VALIDATION_ERROR_1a000328, "The spec valid usage text states 'A valid compute pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_COMPUTE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00404)"}, {VALIDATION_ERROR_1a00032a, "The spec valid usage text states 'buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-buffer-00405)"}, {VALIDATION_ERROR_1a00032c, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-offset-00406)"}, {VALIDATION_ERROR_1a00032e, "The spec valid usage text states 'The sum of offset and the size of VkDispatchIndirectCommand must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-offset-00407)"}, - {VALIDATION_ERROR_1a000330, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00408)"}, + {VALIDATION_ERROR_1a000330, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00408)"}, {VALIDATION_ERROR_1a000332, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00409)"}, {VALIDATION_ERROR_1a000334, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00410)"}, {VALIDATION_ERROR_1a000336, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDispatchIndirect-None-00411)"}, @@ -5681,11 +5962,11 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1a200017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-renderpass)"}, {VALIDATION_ERROR_1a200366, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-renderPass-00435)"}, {VALIDATION_ERROR_1a200368, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-subpass-00436)"}, - {VALIDATION_ERROR_1a20036a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00437)"}, - {VALIDATION_ERROR_1a20036c, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00438)"}, + {VALIDATION_ERROR_1a20036a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00437)"}, + {VALIDATION_ERROR_1a20036c, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00438)"}, {VALIDATION_ERROR_1a20036e, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00439)"}, {VALIDATION_ERROR_1a200370, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00440)"}, - {VALIDATION_ERROR_1a200372, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00441)"}, + {VALIDATION_ERROR_1a200372, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00441)"}, {VALIDATION_ERROR_1a200374, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00442)"}, {VALIDATION_ERROR_1a200376, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00443)"}, {VALIDATION_ERROR_1a200378, "The spec valid usage text states 'Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDraw-None-00444)"}, @@ -5706,11 +5987,11 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1a400017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-renderpass)"}, {VALIDATION_ERROR_1a40038c, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-renderPass-00454)"}, {VALIDATION_ERROR_1a40038e, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-subpass-00455)"}, - {VALIDATION_ERROR_1a400390, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00456)"}, - {VALIDATION_ERROR_1a400392, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00457)"}, + {VALIDATION_ERROR_1a400390, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00456)"}, + {VALIDATION_ERROR_1a400392, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00457)"}, {VALIDATION_ERROR_1a400394, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00458)"}, {VALIDATION_ERROR_1a400396, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00459)"}, - {VALIDATION_ERROR_1a400398, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00460)"}, + {VALIDATION_ERROR_1a400398, "The spec valid usage text states 'For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in fxvertex-input' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00460)"}, {VALIDATION_ERROR_1a40039a, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00461)"}, {VALIDATION_ERROR_1a40039c, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-None-00462)"}, {VALIDATION_ERROR_1a40039e, "The spec valid usage text states '(indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexed-indexSize-00463)"}, @@ -5738,8 +6019,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1a600424, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndexedIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-firstInstance-00530)"}, {VALIDATION_ERROR_1a600426, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-renderPass-00531)"}, {VALIDATION_ERROR_1a600428, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-subpass-00532)"}, - {VALIDATION_ERROR_1a60042a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00533)"}, - {VALIDATION_ERROR_1a60042c, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00534)"}, + {VALIDATION_ERROR_1a60042a, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00533)"}, + {VALIDATION_ERROR_1a60042c, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00534)"}, {VALIDATION_ERROR_1a60042e, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00535)"}, {VALIDATION_ERROR_1a600430, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00536)"}, {VALIDATION_ERROR_1a600432, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-None-00537)"}, @@ -5764,43 +6045,43 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1a602401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter)"}, {VALIDATION_ERROR_1a602413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-commandBuffer-recording)"}, {VALIDATION_ERROR_1a602415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirect-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1a800009, "The spec valid usage text states 'Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commonparent)"}, - {VALIDATION_ERROR_1a800017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-renderpass)"}, - {VALIDATION_ERROR_1a800456, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-offset-00555)"}, - {VALIDATION_ERROR_1a800458, "The spec valid usage text states 'countBufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBufferOffset-00556)"}, - {VALIDATION_ERROR_1a80045a, "The spec valid usage text states 'stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-stride-00557)"}, - {VALIDATION_ERROR_1a80045c, "The spec valid usage text states 'If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-maxDrawCount-00558)"}, - {VALIDATION_ERROR_1a80045e, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndexedIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-firstInstance-00559)"}, - {VALIDATION_ERROR_1a800460, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-renderPass-00560)"}, - {VALIDATION_ERROR_1a800462, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-subpass-00561)"}, - {VALIDATION_ERROR_1a800464, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00562)"}, - {VALIDATION_ERROR_1a800466, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00563)"}, - {VALIDATION_ERROR_1a800468, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00564)"}, - {VALIDATION_ERROR_1a80046a, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00565)"}, - {VALIDATION_ERROR_1a80046c, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00566)"}, - {VALIDATION_ERROR_1a80046e, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00567)"}, - {VALIDATION_ERROR_1a800470, "The spec valid usage text states 'If count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00568)"}, - {VALIDATION_ERROR_1a800472, "The spec valid usage text states 'If count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00569)"}, - {VALIDATION_ERROR_1a800474, "The spec valid usage text states 'drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-drawCount-00570)"}, - {VALIDATION_ERROR_1a800476, "The spec valid usage text states 'Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00571)"}, - {VALIDATION_ERROR_1a800478, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00572)"}, - {VALIDATION_ERROR_1a80047a, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00573)"}, - {VALIDATION_ERROR_1a80047c, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00574)"}, - {VALIDATION_ERROR_1a80047e, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00575)"}, - {VALIDATION_ERROR_1a800480, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00576)"}, - {VALIDATION_ERROR_1a800482, "The spec valid usage text states 'Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-linearTilingFeatures-00577)"}, + {VALIDATION_ERROR_1a800009, "The spec valid usage text states 'Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commonparent)"}, + {VALIDATION_ERROR_1a800017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-renderpass)"}, + {VALIDATION_ERROR_1a800456, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-offset-00555)"}, + {VALIDATION_ERROR_1a800458, "The spec valid usage text states 'countBufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBufferOffset-00556)"}, + {VALIDATION_ERROR_1a80045a, "The spec valid usage text states 'stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-stride-00557)"}, + {VALIDATION_ERROR_1a80045c, "The spec valid usage text states 'If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-maxDrawCount-00558)"}, + {VALIDATION_ERROR_1a80045e, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndexedIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-firstInstance-00559)"}, + {VALIDATION_ERROR_1a800460, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-renderPass-00560)"}, + {VALIDATION_ERROR_1a800462, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-subpass-00561)"}, + {VALIDATION_ERROR_1a800464, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00562)"}, + {VALIDATION_ERROR_1a800466, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00563)"}, + {VALIDATION_ERROR_1a800468, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00564)"}, + {VALIDATION_ERROR_1a80046a, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00565)"}, + {VALIDATION_ERROR_1a80046c, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00566)"}, + {VALIDATION_ERROR_1a80046e, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00567)"}, + {VALIDATION_ERROR_1a800470, "The spec valid usage text states 'If count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00568)"}, + {VALIDATION_ERROR_1a800472, "The spec valid usage text states 'If count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00569)"}, + {VALIDATION_ERROR_1a800474, "The spec valid usage text states 'drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-drawCount-00570)"}, + {VALIDATION_ERROR_1a800476, "The spec valid usage text states 'Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00571)"}, + {VALIDATION_ERROR_1a800478, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00572)"}, + {VALIDATION_ERROR_1a80047a, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00573)"}, + {VALIDATION_ERROR_1a80047c, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00574)"}, + {VALIDATION_ERROR_1a80047e, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00575)"}, + {VALIDATION_ERROR_1a800480, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-00576)"}, + {VALIDATION_ERROR_1a800482, "The spec valid usage text states 'Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-linearTilingFeatures-00577)"}, {VALIDATION_ERROR_1a800484, "The spec valid usage text states 'If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-maxMultiviewInstanceIndex-00578)"}, - {VALIDATION_ERROR_1a800bc0, "The spec valid usage text states 'Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-01504)"}, + {VALIDATION_ERROR_1a800bc0, "The spec valid usage text states 'Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-None-01504)"}, {VALIDATION_ERROR_1a800bda, "The spec valid usage text states 'If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-sampleLocationsEnable-01517)"}, - {VALIDATION_ERROR_1a800d04, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01666)"}, - {VALIDATION_ERROR_1a800d06, "The spec valid usage text states 'buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01667)"}, - {VALIDATION_ERROR_1a800d08, "The spec valid usage text states 'If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01668)"}, - {VALIDATION_ERROR_1a800d0a, "The spec valid usage text states 'countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01669)"}, - {VALIDATION_ERROR_1a801a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-parameter)"}, - {VALIDATION_ERROR_1a802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1a802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-recording)"}, - {VALIDATION_ERROR_1a802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1a803401, "The spec valid usage text states 'countBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-parameter)"}, + {VALIDATION_ERROR_1a800d04, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01666)"}, + {VALIDATION_ERROR_1a800d06, "The spec valid usage text states 'buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01667)"}, + {VALIDATION_ERROR_1a800d08, "The spec valid usage text states 'If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01668)"}, + {VALIDATION_ERROR_1a800d0a, "The spec valid usage text states 'countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01669)"}, + {VALIDATION_ERROR_1a801a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-parameter)"}, + {VALIDATION_ERROR_1a802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1a802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-recording)"}, + {VALIDATION_ERROR_1a802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1a803401, "The spec valid usage text states 'countBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-parameter)"}, {VALIDATION_ERROR_1aa00009, "The spec valid usage text states 'Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-commonparent)"}, {VALIDATION_ERROR_1aa00017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-renderpass)"}, {VALIDATION_ERROR_1aa003b4, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-buffer-00474)"}, @@ -5810,8 +6091,8 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1aa003bc, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-firstInstance-00478)"}, {VALIDATION_ERROR_1aa003be, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-renderPass-00479)"}, {VALIDATION_ERROR_1aa003c0, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-subpass-00480)"}, - {VALIDATION_ERROR_1aa003c2, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00481)"}, - {VALIDATION_ERROR_1aa003c4, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00482)"}, + {VALIDATION_ERROR_1aa003c2, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00481)"}, + {VALIDATION_ERROR_1aa003c4, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00482)"}, {VALIDATION_ERROR_1aa003c6, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00483)"}, {VALIDATION_ERROR_1aa003c8, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00484)"}, {VALIDATION_ERROR_1aa003ca, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-None-00485)"}, @@ -5836,43 +6117,43 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1aa02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-commandBuffer-parameter)"}, {VALIDATION_ERROR_1aa02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-commandBuffer-recording)"}, {VALIDATION_ERROR_1aa02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirect-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1ac00009, "The spec valid usage text states 'Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commonparent)"}, - {VALIDATION_ERROR_1ac00017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-renderpass)"}, - {VALIDATION_ERROR_1ac003ec, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-offset-00502)"}, - {VALIDATION_ERROR_1ac003ee, "The spec valid usage text states 'countBufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBufferOffset-00503)"}, - {VALIDATION_ERROR_1ac003f0, "The spec valid usage text states 'stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-stride-00504)"}, - {VALIDATION_ERROR_1ac003f2, "The spec valid usage text states 'If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-maxDrawCount-00505)"}, - {VALIDATION_ERROR_1ac003f4, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-firstInstance-00506)"}, - {VALIDATION_ERROR_1ac003f6, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-renderPass-00507)"}, - {VALIDATION_ERROR_1ac003f8, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-subpass-00508)"}, - {VALIDATION_ERROR_1ac003fa, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00509)"}, - {VALIDATION_ERROR_1ac003fc, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00510)"}, - {VALIDATION_ERROR_1ac003fe, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00511)"}, - {VALIDATION_ERROR_1ac00400, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00512)"}, - {VALIDATION_ERROR_1ac00402, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00513)"}, - {VALIDATION_ERROR_1ac00404, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00514)"}, - {VALIDATION_ERROR_1ac00406, "The spec valid usage text states 'If the count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00515)"}, - {VALIDATION_ERROR_1ac00408, "The spec valid usage text states 'If the count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00516)"}, - {VALIDATION_ERROR_1ac0040a, "The spec valid usage text states 'The count stored in countBuffer must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00517)"}, - {VALIDATION_ERROR_1ac0040c, "The spec valid usage text states 'Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00518)"}, - {VALIDATION_ERROR_1ac0040e, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00519)"}, - {VALIDATION_ERROR_1ac00410, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00520)"}, - {VALIDATION_ERROR_1ac00412, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00521)"}, - {VALIDATION_ERROR_1ac00414, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00522)"}, - {VALIDATION_ERROR_1ac00416, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00523)"}, - {VALIDATION_ERROR_1ac00418, "The spec valid usage text states 'Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-linearTilingFeatures-00524)"}, + {VALIDATION_ERROR_1ac00009, "The spec valid usage text states 'Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commonparent)"}, + {VALIDATION_ERROR_1ac00017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-renderpass)"}, + {VALIDATION_ERROR_1ac003ec, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-offset-00502)"}, + {VALIDATION_ERROR_1ac003ee, "The spec valid usage text states 'countBufferOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBufferOffset-00503)"}, + {VALIDATION_ERROR_1ac003f0, "The spec valid usage text states 'stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-stride-00504)"}, + {VALIDATION_ERROR_1ac003f2, "The spec valid usage text states 'If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-maxDrawCount-00505)"}, + {VALIDATION_ERROR_1ac003f4, "The spec valid usage text states 'If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndirectCommand structures accessed by this command must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-firstInstance-00506)"}, + {VALIDATION_ERROR_1ac003f6, "The spec valid usage text states 'The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-renderPass-00507)"}, + {VALIDATION_ERROR_1ac003f8, "The spec valid usage text states 'The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-subpass-00508)"}, + {VALIDATION_ERROR_1ac003fa, "The spec valid usage text states 'For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00509)"}, + {VALIDATION_ERROR_1ac003fc, "The spec valid usage text states 'For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in descriptorsets-compatibility' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00510)"}, + {VALIDATION_ERROR_1ac003fe, "The spec valid usage text states 'Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00511)"}, + {VALIDATION_ERROR_1ac00400, "The spec valid usage text states 'All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must have valid buffers bound' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00512)"}, + {VALIDATION_ERROR_1ac00402, "The spec valid usage text states 'A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00513)"}, + {VALIDATION_ERROR_1ac00404, "The spec valid usage text states 'If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00514)"}, + {VALIDATION_ERROR_1ac00406, "The spec valid usage text states 'If the count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00515)"}, + {VALIDATION_ERROR_1ac00408, "The spec valid usage text states 'If the count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00516)"}, + {VALIDATION_ERROR_1ac0040a, "The spec valid usage text states 'The count stored in countBuffer must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-00517)"}, + {VALIDATION_ERROR_1ac0040c, "The spec valid usage text states 'Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00518)"}, + {VALIDATION_ERROR_1ac0040e, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00519)"}, + {VALIDATION_ERROR_1ac00410, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00520)"}, + {VALIDATION_ERROR_1ac00412, "The spec valid usage text states 'If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00521)"}, + {VALIDATION_ERROR_1ac00414, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00522)"}, + {VALIDATION_ERROR_1ac00416, "The spec valid usage text states 'If the robust buffer access feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-00523)"}, + {VALIDATION_ERROR_1ac00418, "The spec valid usage text states 'Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-linearTilingFeatures-00524)"}, {VALIDATION_ERROR_1ac0041a, "The spec valid usage text states 'If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-maxMultiviewInstanceIndex-00525)"}, - {VALIDATION_ERROR_1ac00bbc, "The spec valid usage text states 'Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-01502)"}, + {VALIDATION_ERROR_1ac00bbc, "The spec valid usage text states 'Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-None-01502)"}, {VALIDATION_ERROR_1ac00bd6, "The spec valid usage text states 'If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-sampleLocationsEnable-01515)"}, - {VALIDATION_ERROR_1ac00cfa, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-01661)"}, - {VALIDATION_ERROR_1ac00cfc, "The spec valid usage text states 'buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-01662)"}, - {VALIDATION_ERROR_1ac00cfe, "The spec valid usage text states 'If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-01663)"}, - {VALIDATION_ERROR_1ac00d00, "The spec valid usage text states 'countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-01664)"}, - {VALIDATION_ERROR_1ac01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-parameter)"}, - {VALIDATION_ERROR_1ac02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1ac02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-recording)"}, - {VALIDATION_ERROR_1ac02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1ac03401, "The spec valid usage text states 'countBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-parameter)"}, + {VALIDATION_ERROR_1ac00cfa, "The spec valid usage text states 'If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-01661)"}, + {VALIDATION_ERROR_1ac00cfc, "The spec valid usage text states 'buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-01662)"}, + {VALIDATION_ERROR_1ac00cfe, "The spec valid usage text states 'If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-01663)"}, + {VALIDATION_ERROR_1ac00d00, "The spec valid usage text states 'countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-01664)"}, + {VALIDATION_ERROR_1ac01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-buffer-parameter)"}, + {VALIDATION_ERROR_1ac02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1ac02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-recording)"}, + {VALIDATION_ERROR_1ac02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1ac03401, "The spec valid usage text states 'countBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdDrawIndirectCountAMD-countBuffer-parameter)"}, {VALIDATION_ERROR_1ae00009, "The spec valid usage text states 'Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdEndQuery-commonparent)"}, {VALIDATION_ERROR_1ae00652, "The spec valid usage text states 'The query identified by queryPool and query must currently be active' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdEndQuery-queryPool-00809)"}, {VALIDATION_ERROR_1ae00654, "The spec valid usage text states 'query must be less than the number of queries in queryPool' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdEndQuery-query-00810)"}, @@ -5913,7 +6194,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1b202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdExecuteCommands-commandBuffer-recording)"}, {VALIDATION_ERROR_1b202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdExecuteCommands-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1b20261b, "The spec valid usage text states 'commandBufferCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdExecuteCommands-commandBufferCount-arraylength)"}, - {VALIDATION_ERROR_1b211401, "The spec valid usage text states 'pCommandBuffers must be a pointer to an array of commandBufferCount valid VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdExecuteCommands-pCommandBuffers-parameter)"}, + {VALIDATION_ERROR_1b211401, "The spec valid usage text states 'pCommandBuffers must be a valid pointer to an array of commandBufferCount valid VkCommandBuffer handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdExecuteCommands-pCommandBuffers-parameter)"}, {VALIDATION_ERROR_1b400009, "The spec valid usage text states 'Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdFillBuffer-commonparent)"}, {VALIDATION_ERROR_1b400017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdFillBuffer-renderpass)"}, {VALIDATION_ERROR_1b400030, "The spec valid usage text states 'dstOffset must be less than the size of dstBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdFillBuffer-dstOffset-00024)"}, @@ -5960,57 +6241,60 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1b803e01, "The spec valid usage text states 'dependencyFlags must be a valid combination of VkDependencyFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-dependencyFlags-parameter)"}, {VALIDATION_ERROR_1b807801, "The spec valid usage text states 'dstStageMask must be a valid combination of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-dstStageMask-parameter)"}, {VALIDATION_ERROR_1b807803, "The spec valid usage text states 'dstStageMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-dstStageMask-requiredbitmask)"}, - {VALIDATION_ERROR_1b810401, "The spec valid usage text states 'If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-parameter)"}, - {VALIDATION_ERROR_1b818a01, "The spec valid usage text states 'If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-parameter)"}, - {VALIDATION_ERROR_1b81ac01, "The spec valid usage text states 'If memoryBarrierCount is not 0, pMemoryBarriers must be a pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1b810401, "The spec valid usage text states 'If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a valid pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1b818a01, "The spec valid usage text states 'If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a valid pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1b81ac01, "The spec valid usage text states 'If memoryBarrierCount is not 0, pMemoryBarriers must be a valid pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-pMemoryBarriers-parameter)"}, {VALIDATION_ERROR_1b82d401, "The spec valid usage text states 'srcStageMask must be a valid combination of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcStageMask-parameter)"}, {VALIDATION_ERROR_1b82d403, "The spec valid usage text states 'srcStageMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPipelineBarrier-srcStageMask-requiredbitmask)"}, - {VALIDATION_ERROR_1ba00017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-renderpass)"}, - {VALIDATION_ERROR_1ba02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1ba02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-recording)"}, - {VALIDATION_ERROR_1ba02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1ba1f201, "The spec valid usage text states 'pProcessCommandsInfo must be a pointer to a valid VkCmdProcessCommandsInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-pProcessCommandsInfo-parameter)"}, + {VALIDATION_ERROR_1ba00017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-renderpass)"}, + {VALIDATION_ERROR_1ba02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1ba02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-recording)"}, + {VALIDATION_ERROR_1ba02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1ba1f201, "The spec valid usage text states 'pProcessCommandsInfo must be a valid pointer to a valid VkCmdProcessCommandsInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdProcessCommandsNVX-pProcessCommandsInfo-parameter)"}, {VALIDATION_ERROR_1bc00009, "The spec valid usage text states 'Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-commonparent)"}, {VALIDATION_ERROR_1bc002de, "The spec valid usage text states 'stageFlags must match exactly the shader stages used in layout for the range specified by offset and size' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-stageFlags-00367)"}, {VALIDATION_ERROR_1bc002e0, "The spec valid usage text states 'offset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-offset-00368)"}, {VALIDATION_ERROR_1bc002e2, "The spec valid usage text states 'size must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-size-00369)"}, {VALIDATION_ERROR_1bc002e4, "The spec valid usage text states 'offset must be less than VkPhysicalDeviceLimits::maxPushConstantsSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-offset-00370)"}, {VALIDATION_ERROR_1bc002e6, "The spec valid usage text states 'size must be less than or equal to VkPhysicalDeviceLimits::maxPushConstantsSize minus offset' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-size-00371)"}, + {VALIDATION_ERROR_1bc00e06, "The spec valid usage text states 'For each byte in the range specified by offset and size and for each shader stage in stageFlags, there must be a push constant range in layout that includes that byte and that stage' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-offset-01795)"}, + {VALIDATION_ERROR_1bc00e08, "The spec valid usage text states 'For each byte in the range specified by offset and size and for each push constant range that overlaps that byte, stageFlags must include all stages in that push constant range's VkPushConstantRange::stageFlags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-offset-01796)"}, {VALIDATION_ERROR_1bc02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-commandBuffer-parameter)"}, {VALIDATION_ERROR_1bc02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-commandBuffer-recording)"}, {VALIDATION_ERROR_1bc02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1bc0be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-layout-parameter)"}, - {VALIDATION_ERROR_1bc26201, "The spec valid usage text states 'pValues must be a pointer to an array of size bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-pValues-parameter)"}, + {VALIDATION_ERROR_1bc26201, "The spec valid usage text states 'pValues must be a valid pointer to an array of size bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-pValues-parameter)"}, {VALIDATION_ERROR_1bc2c21b, "The spec valid usage text states 'size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-size-arraylength)"}, {VALIDATION_ERROR_1bc2dc01, "The spec valid usage text states 'stageFlags must be a valid combination of VkShaderStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-stageFlags-parameter)"}, {VALIDATION_ERROR_1bc2dc03, "The spec valid usage text states 'stageFlags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushConstants-stageFlags-requiredbitmask)"}, - {VALIDATION_ERROR_1be00009, "The spec valid usage text states 'Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commonparent)"}, - {VALIDATION_ERROR_1be002d6, "The spec valid usage text states 'pipelineBindPoint must be supported by the commandBuffer's parent VkCommandPool's queue family' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-00363)"}, - {VALIDATION_ERROR_1be002d8, "The spec valid usage text states 'set must be less than VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-set-00364)"}, - {VALIDATION_ERROR_1be002da, "The spec valid usage text states 'set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-set-00365)"}, - {VALIDATION_ERROR_1be02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1be02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording)"}, - {VALIDATION_ERROR_1be02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1be0541b, "The spec valid usage text states 'descriptorWriteCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-descriptorWriteCount-arraylength)"}, - {VALIDATION_ERROR_1be0be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-layout-parameter)"}, - {VALIDATION_ERROR_1be13601, "The spec valid usage text states 'pDescriptorWrites must be a pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pDescriptorWrites-parameter)"}, - {VALIDATION_ERROR_1be27e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-parameter)"}, - {VALIDATION_ERROR_1c000009, "The spec valid usage text states 'Each of commandBuffer, descriptorUpdateTemplate, and layout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent)"}, - {VALIDATION_ERROR_1c0002dc, "The spec valid usage text states 'The pipelineBindPoint specified during the creation of the descriptor update template must be supported by the commandBuffer's parent VkCommandPool's queue family' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-00366)"}, - {VALIDATION_ERROR_1c002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1c002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-recording)"}, - {VALIDATION_ERROR_1c002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1c005201, "The spec valid usage text states 'descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter)"}, - {VALIDATION_ERROR_1c00be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-parameter)"}, + {VALIDATION_ERROR_1be00009, "The spec valid usage text states 'Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commonparent)"}, + {VALIDATION_ERROR_1be002d6, "The spec valid usage text states 'pipelineBindPoint must be supported by the commandBuffer's parent VkCommandPool's queue family' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-00363)"}, + {VALIDATION_ERROR_1be002d8, "The spec valid usage text states 'set must be less than VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-set-00364)"}, + {VALIDATION_ERROR_1be002da, "The spec valid usage text states 'set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-set-00365)"}, + {VALIDATION_ERROR_1be02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1be02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording)"}, + {VALIDATION_ERROR_1be02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1be0541b, "The spec valid usage text states 'descriptorWriteCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-descriptorWriteCount-arraylength)"}, + {VALIDATION_ERROR_1be0be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-layout-parameter)"}, + {VALIDATION_ERROR_1be13601, "The spec valid usage text states 'pDescriptorWrites must be a valid pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pDescriptorWrites-parameter)"}, + {VALIDATION_ERROR_1be27e01, "The spec valid usage text states 'pipelineBindPoint must be a valid VkPipelineBindPoint value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-parameter)"}, + {VALIDATION_ERROR_1c000009, "The spec valid usage text states 'Each of commandBuffer, descriptorUpdateTemplate, and layout must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent)"}, + {VALIDATION_ERROR_1c0002dc, "The spec valid usage text states 'The pipelineBindPoint specified during the creation of the descriptor update template must be supported by the commandBuffer's parent VkCommandPool's queue family' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-00366)"}, + {VALIDATION_ERROR_1c000d2c, "The spec valid usage text states 'pData must be a valid pointer to a memory that contains one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by descriptorUpdateTemplate when it was created with vkCreateDescriptorUpdateTemplateKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-pData-01686)"}, + {VALIDATION_ERROR_1c002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1c002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-recording)"}, + {VALIDATION_ERROR_1c002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1c005201, "The spec valid usage text states 'descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter)"}, + {VALIDATION_ERROR_1c00be01, "The spec valid usage text states 'layout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-parameter)"}, {VALIDATION_ERROR_1c012201, "The spec valid usage text states 'pData must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdPushDescriptorSetWithTemplateKHR-pData-parameter)"}, - {VALIDATION_ERROR_1c200017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-renderpass)"}, - {VALIDATION_ERROR_1c200019, "The spec valid usage text states 'commandBuffer must be a secondary VkCommandBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-bufferlevel)"}, - {VALIDATION_ERROR_1c200a62, "The spec valid usage text states 'The provided commandBuffer must not have had a prior space reservation since its creation or the last reset.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01329)"}, - {VALIDATION_ERROR_1c200a64, "The spec valid usage text states 'The state of the commandBuffer must be legal to execute all commands within the sequence provided by the indirectCommandsLayout member of pProcessCommandsInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01330)"}, - {VALIDATION_ERROR_1c202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1c202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-recording)"}, - {VALIDATION_ERROR_1c202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1c221a01, "The spec valid usage text states 'pReserveSpaceInfo must be a pointer to a valid VkCmdReserveSpaceForCommandsInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-pReserveSpaceInfo-parameter)"}, + {VALIDATION_ERROR_1c200017, "The spec valid usage text states 'This command must only be called inside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-renderpass)"}, + {VALIDATION_ERROR_1c200019, "The spec valid usage text states 'commandBuffer must be a secondary VkCommandBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-bufferlevel)"}, + {VALIDATION_ERROR_1c200a62, "The spec valid usage text states 'The provided commandBuffer must not have had a prior space reservation since its creation or the last reset.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01329)"}, + {VALIDATION_ERROR_1c200a64, "The spec valid usage text states 'The state of the commandBuffer must be legal to execute all commands within the sequence provided by the indirectCommandsLayout member of pProcessCommandsInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01330)"}, + {VALIDATION_ERROR_1c202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1c202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-recording)"}, + {VALIDATION_ERROR_1c202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1c221a01, "The spec valid usage text states 'pReserveSpaceInfo must be a valid pointer to a valid VkCmdReserveSpaceForCommandsInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdReserveSpaceForCommandsNVX-pReserveSpaceInfo-parameter)"}, {VALIDATION_ERROR_1c400009, "The spec valid usage text states 'Both of commandBuffer, and event must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResetEvent-commonparent)"}, {VALIDATION_ERROR_1c400017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResetEvent-renderpass)"}, {VALIDATION_ERROR_1c400902, "The spec valid usage text states 'stageMask must not include VK_PIPELINE_STAGE_HOST_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResetEvent-stageMask-01153)"}, @@ -6050,12 +6334,16 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1c800ad4, "The spec valid usage text states 'srcImage and dstImage must have been created with the same image format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-srcImage-01386)"}, {VALIDATION_ERROR_1c800af0, "The spec valid usage text states 'srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdResolveImage-srcImageLayout-01400)"}, {VALIDATION_ERROR_1c800af2, "The spec valid usage text states 'dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdResolveImage-dstImageLayout-01401)"}, + {VALIDATION_ERROR_1c800d5a, "The spec valid usage text states 'The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-srcSubresource-01709)"}, + {VALIDATION_ERROR_1c800d5c, "The spec valid usage text states 'The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-dstSubresource-01710)"}, + {VALIDATION_ERROR_1c800d5e, "The spec valid usage text states 'The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-srcSubresource-01711)"}, + {VALIDATION_ERROR_1c800d60, "The spec valid usage text states 'The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-dstSubresource-01712)"}, {VALIDATION_ERROR_1c802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-commandBuffer-parameter)"}, {VALIDATION_ERROR_1c802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-commandBuffer-recording)"}, {VALIDATION_ERROR_1c802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1c807201, "The spec valid usage text states 'dstImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-dstImage-parameter)"}, {VALIDATION_ERROR_1c807401, "The spec valid usage text states 'dstImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-dstImageLayout-parameter)"}, - {VALIDATION_ERROR_1c821001, "The spec valid usage text states 'pRegions must be a pointer to an array of regionCount valid VkImageResolve structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-pRegions-parameter)"}, + {VALIDATION_ERROR_1c821001, "The spec valid usage text states 'pRegions must be a valid pointer to an array of regionCount valid VkImageResolve structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-pRegions-parameter)"}, {VALIDATION_ERROR_1c82ac1b, "The spec valid usage text states 'regionCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-regionCount-arraylength)"}, {VALIDATION_ERROR_1c82ce01, "The spec valid usage text states 'srcImage must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-srcImage-parameter)"}, {VALIDATION_ERROR_1c82d001, "The spec valid usage text states 'srcImageLayout must be a valid VkImageLayout value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdResolveImage-srcImageLayout-parameter)"}, @@ -6069,30 +6357,30 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1cc02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBias-commandBuffer-recording)"}, {VALIDATION_ERROR_1cc02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBias-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1ce004ae, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-None-00599)"}, - {VALIDATION_ERROR_1ce004b0, "The spec valid usage text states 'minDepthBounds must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-minDepthBounds-00600)"}, - {VALIDATION_ERROR_1ce004b2, "The spec valid usage text states 'maxDepthBounds must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-maxDepthBounds-00601)"}, + {VALIDATION_ERROR_1ce004b0, "The spec valid usage text states 'Unless the VK_EXT_depth_range_unrestricted extension is enabled minDepthBounds must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDepthBounds-minDepthBounds-00600)"}, + {VALIDATION_ERROR_1ce004b2, "The spec valid usage text states 'Unless the VK_EXT_depth_range_unrestricted extension is enabled maxDepthBounds must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDepthBounds-maxDepthBounds-00601)"}, {VALIDATION_ERROR_1ce02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-commandBuffer-parameter)"}, {VALIDATION_ERROR_1ce02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-commandBuffer-recording)"}, {VALIDATION_ERROR_1ce02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDepthBounds-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1d0000d8, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00108)"}, - {VALIDATION_ERROR_1d0000da, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00109)"}, - {VALIDATION_ERROR_1d0000dc, "The spec valid usage text states 'deviceMask must not include any set bits that were not in the VkDeviceGroupCommandBufferBeginInfoKHX::deviceMask value when the command buffer began recording.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00110)"}, - {VALIDATION_ERROR_1d0000de, "The spec valid usage text states 'If vkCmdSetDeviceMaskKHX is called inside a render pass instance, deviceMask must not include any set bits that were not in the VkDeviceGroupRenderPassBeginInfoKHX::deviceMask value when the render pass instance began recording.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00111)"}, - {VALIDATION_ERROR_1d002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1d002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-recording)"}, - {VALIDATION_ERROR_1d002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, compute, or transfer operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1d20048e, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-None-00583)"}, - {VALIDATION_ERROR_1d200490, "The spec valid usage text states 'firstDiscardRectangle must be less than VkPhysicalDeviceDiscardRectanglePropertiesEXT.maxDiscardRectangles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00584)"}, - {VALIDATION_ERROR_1d200492, "The spec valid usage text states 'The sum of firstDiscardRectangle and discardRectangleCount must be between 1 and VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00585)"}, - {VALIDATION_ERROR_1d200494, "The spec valid usage text states 'pDiscardRectangles must be a pointer to an array of discardRectangleCount valid VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-00586)"}, - {VALIDATION_ERROR_1d200496, "The spec valid usage text states 'The x and y members of offset in VkRect2D must be greater than or equal to 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-x-00587)"}, - {VALIDATION_ERROR_1d200498, "The spec valid usage text states 'Evaluation of (offset.x + extent.width) in VkRect2D must not cause a signed integer addition overflow' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-offset-00588)"}, - {VALIDATION_ERROR_1d20049a, "The spec valid usage text states 'Evaluation of (offset.y + extent.height) in VkRect2D must not cause a signed integer addition overflow' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-offset-00589)"}, - {VALIDATION_ERROR_1d202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1d202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-recording)"}, - {VALIDATION_ERROR_1d202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1d205c1b, "The spec valid usage text states 'discardRectangleCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-discardRectangleCount-arraylength)"}, - {VALIDATION_ERROR_1d214601, "The spec valid usage text states 'pDiscardRectangles must be a pointer to an array of discardRectangleCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-parameter)"}, + {VALIDATION_ERROR_1d0000d8, "The spec valid usage text states 'deviceMask must be a valid device mask value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00108)"}, + {VALIDATION_ERROR_1d0000da, "The spec valid usage text states 'deviceMask must not be zero' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00109)"}, + {VALIDATION_ERROR_1d0000dc, "The spec valid usage text states 'deviceMask must not include any set bits that were not in the VkDeviceGroupCommandBufferBeginInfoKHX::deviceMask value when the command buffer began recording.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00110)"}, + {VALIDATION_ERROR_1d0000de, "The spec valid usage text states 'If vkCmdSetDeviceMaskKHX is called inside a render pass instance, deviceMask must not include any set bits that were not in the VkDeviceGroupRenderPassBeginInfoKHX::deviceMask value when the render pass instance began recording.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-deviceMask-00111)"}, + {VALIDATION_ERROR_1d002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1d002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-recording)"}, + {VALIDATION_ERROR_1d002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, compute, or transfer operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDeviceMaskKHX-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1d20048e, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-None-00583)"}, + {VALIDATION_ERROR_1d200490, "The spec valid usage text states 'firstDiscardRectangle must be less than VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00584)"}, + {VALIDATION_ERROR_1d200492, "The spec valid usage text states 'The sum of firstDiscardRectangle and discardRectangleCount must be less than or equal to VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00585)"}, + {VALIDATION_ERROR_1d200494, "The spec valid usage text states 'pDiscardRectangles must be a valid pointer to an array of discardRectangleCount valid VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-00586)"}, + {VALIDATION_ERROR_1d200496, "The spec valid usage text states 'The x and y member of offset in each VkRect2D element of pDiscardRectangles must be greater than or equal to 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-x-00587)"}, + {VALIDATION_ERROR_1d200498, "The spec valid usage text states 'Evaluation of (offset.x + extent.width) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflow' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-offset-00588)"}, + {VALIDATION_ERROR_1d20049a, "The spec valid usage text states 'Evaluation of (offset.y + extent.height) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflow' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-offset-00589)"}, + {VALIDATION_ERROR_1d202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1d202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-recording)"}, + {VALIDATION_ERROR_1d202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1d205c1b, "The spec valid usage text states 'discardRectangleCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-discardRectangleCount-arraylength)"}, + {VALIDATION_ERROR_1d214601, "The spec valid usage text states 'pDiscardRectangles must be a valid pointer to an array of discardRectangleCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-parameter)"}, {VALIDATION_ERROR_1d400009, "The spec valid usage text states 'Both of commandBuffer, and event must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetEvent-commonparent)"}, {VALIDATION_ERROR_1d400017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetEvent-renderpass)"}, {VALIDATION_ERROR_1d4008fa, "The spec valid usage text states 'stageMask must not include VK_PIPELINE_STAGE_HOST_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetEvent-stageMask-01149)"}, @@ -6121,7 +6409,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1d802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-commandBuffer-parameter)"}, {VALIDATION_ERROR_1d802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-commandBuffer-recording)"}, {VALIDATION_ERROR_1d802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1d822601, "The spec valid usage text states 'pScissors must be a pointer to an array of scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-pScissors-parameter)"}, + {VALIDATION_ERROR_1d822601, "The spec valid usage text states 'pScissors must be a valid pointer to an array of scissorCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-pScissors-parameter)"}, {VALIDATION_ERROR_1d82b61b, "The spec valid usage text states 'scissorCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-scissorCount-arraylength)"}, {VALIDATION_ERROR_1da004b4, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetStencilCompareMask-None-00602)"}, {VALIDATION_ERROR_1da02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetStencilCompareMask-commandBuffer-parameter)"}, @@ -6146,19 +6434,21 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1e00098e, "The spec valid usage text states 'The sum of firstViewport and viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-firstViewport-01223)"}, {VALIDATION_ERROR_1e000990, "The spec valid usage text states 'If the multiple viewports feature is not enabled, firstViewport must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-firstViewport-01224)"}, {VALIDATION_ERROR_1e000992, "The spec valid usage text states 'If the multiple viewports feature is not enabled, viewportCount must be 1' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-viewportCount-01225)"}, - {VALIDATION_ERROR_1e000994, "The spec valid usage text states 'pViewports must be a pointer to an array of viewportCount valid VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-pViewports-01226)"}, + {VALIDATION_ERROR_1e000994, "The spec valid usage text states 'pViewports must be a valid pointer to an array of viewportCount valid VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-pViewports-01226)"}, {VALIDATION_ERROR_1e002401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-commandBuffer-parameter)"}, {VALIDATION_ERROR_1e002413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-commandBuffer-recording)"}, {VALIDATION_ERROR_1e002415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1e030a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-viewportCount-arraylength)"}, - {VALIDATION_ERROR_1e200a54, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-None-01322)"}, - {VALIDATION_ERROR_1e200a56, "The spec valid usage text states 'firstViewport must be less than VkPhysicalDeviceLimits::maxViewports' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-firstViewport-01323)"}, - {VALIDATION_ERROR_1e200a58, "The spec valid usage text states 'The sum of firstViewport and viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-firstViewport-01324)"}, + {VALIDATION_ERROR_1e03fa01, "The spec valid usage text states 'pViewports must be a valid pointer to an array of viewportCount VkViewport structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-pViewports-parameter)"}, + {VALIDATION_ERROR_1e200a54, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-None-01322)"}, + {VALIDATION_ERROR_1e200a56, "The spec valid usage text states 'firstViewport must be less than VkPhysicalDeviceLimits::maxViewports' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-firstViewport-01323)"}, + {VALIDATION_ERROR_1e200a58, "The spec valid usage text states 'The sum of firstViewport and viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-firstViewport-01324)"}, {VALIDATION_ERROR_1e200a5a, "The spec valid usage text states 'pViewportScalings must be a pointer to an array of viewportCount valid VkViewportWScalingNV structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-pViewportScalings-01325)"}, - {VALIDATION_ERROR_1e202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter)"}, - {VALIDATION_ERROR_1e202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-recording)"}, - {VALIDATION_ERROR_1e202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_1e230a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-viewportCount-arraylength)"}, + {VALIDATION_ERROR_1e202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter)"}, + {VALIDATION_ERROR_1e202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-recording)"}, + {VALIDATION_ERROR_1e202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1e230a1b, "The spec valid usage text states 'viewportCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-viewportCount-arraylength)"}, + {VALIDATION_ERROR_1e23fc01, "The spec valid usage text states 'pViewportWScalings must be a valid pointer to an array of viewportCount VkViewportWScalingNV structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetViewportWScalingNV-pViewportWScalings-parameter)"}, {VALIDATION_ERROR_1e400009, "The spec valid usage text states 'Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-commonparent)"}, {VALIDATION_ERROR_1e400017, "The spec valid usage text states 'This command must only be called outside of a render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-renderpass)"}, {VALIDATION_ERROR_1e400040, "The spec valid usage text states 'dstOffset must be less than the size of dstBuffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-dstOffset-00032)"}, @@ -6173,7 +6463,7 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1e402415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1e403c1b, "The spec valid usage text states 'dataSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-dataSize-arraylength)"}, {VALIDATION_ERROR_1e406c01, "The spec valid usage text states 'dstBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-dstBuffer-parameter)"}, - {VALIDATION_ERROR_1e412201, "The spec valid usage text states 'pData must be a pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-pData-parameter)"}, + {VALIDATION_ERROR_1e412201, "The spec valid usage text states 'pData must be a valid pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdUpdateBuffer-pData-parameter)"}, {VALIDATION_ERROR_1e600009, "The spec valid usage text states 'Both of commandBuffer, and the elements of pEvents must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-commonparent)"}, {VALIDATION_ERROR_1e60090c, "The spec valid usage text states 'srcStageMask must be the bitwise OR of the stageMask parameter used in previous calls to vkCmdSetEvent with any of the members of pEvents and VK_PIPELINE_STAGE_HOST_BIT if any of the members of pEvents was set using vkSetEvent' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-srcStageMask-01158)"}, {VALIDATION_ERROR_1e60090e, "The spec valid usage text states 'If the geometry shaders feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-srcStageMask-01159)"}, @@ -6191,10 +6481,10 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1e607801, "The spec valid usage text states 'dstStageMask must be a valid combination of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-dstStageMask-parameter)"}, {VALIDATION_ERROR_1e607803, "The spec valid usage text states 'dstStageMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-dstStageMask-requiredbitmask)"}, {VALIDATION_ERROR_1e60801b, "The spec valid usage text states 'eventCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-eventCount-arraylength)"}, - {VALIDATION_ERROR_1e610401, "The spec valid usage text states 'If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pBufferMemoryBarriers-parameter)"}, - {VALIDATION_ERROR_1e616001, "The spec valid usage text states 'pEvents must be a pointer to an array of eventCount valid VkEvent handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pEvents-parameter)"}, - {VALIDATION_ERROR_1e618a01, "The spec valid usage text states 'If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pImageMemoryBarriers-parameter)"}, - {VALIDATION_ERROR_1e61ac01, "The spec valid usage text states 'If memoryBarrierCount is not 0, pMemoryBarriers must be a pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1e610401, "The spec valid usage text states 'If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a valid pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pBufferMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1e616001, "The spec valid usage text states 'pEvents must be a valid pointer to an array of eventCount valid VkEvent handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pEvents-parameter)"}, + {VALIDATION_ERROR_1e618a01, "The spec valid usage text states 'If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a valid pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pImageMemoryBarriers-parameter)"}, + {VALIDATION_ERROR_1e61ac01, "The spec valid usage text states 'If memoryBarrierCount is not 0, pMemoryBarriers must be a valid pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-pMemoryBarriers-parameter)"}, {VALIDATION_ERROR_1e62d401, "The spec valid usage text states 'srcStageMask must be a valid combination of VkPipelineStageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-srcStageMask-parameter)"}, {VALIDATION_ERROR_1e62d403, "The spec valid usage text states 'srcStageMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWaitEvents-srcStageMask-requiredbitmask)"}, {VALIDATION_ERROR_1e800009, "The spec valid usage text states 'Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-commonparent)"}, @@ -6205,402 +6495,402 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_1e800b10, "The spec valid usage text states 'queryPool must have been created with a queryType of VK_QUERY_TYPE_TIMESTAMP' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-queryPool-01416)"}, {VALIDATION_ERROR_1e802401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-commandBuffer-parameter)"}, {VALIDATION_ERROR_1e802413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-commandBuffer-recording)"}, - {VALIDATION_ERROR_1e802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_1e802415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-commandBuffer-cmdpool)"}, {VALIDATION_ERROR_1e828401, "The spec valid usage text states 'pipelineStage must be a valid VkPipelineStageFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-pipelineStage-parameter)"}, {VALIDATION_ERROR_1e829801, "The spec valid usage text states 'queryPool must be a valid VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdWriteTimestamp-queryPool-parameter)"}, - {VALIDATION_ERROR_1ea0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_1ea0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_1ea11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkAndroidSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1ea24801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_1ea0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_1ea0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_1ea11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkAndroidSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1ea24801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateAndroidSurfaceKHR-pSurface-parameter)"}, {VALIDATION_ERROR_1ec0071e, "The spec valid usage text states 'If the flags member of pCreateInfo includes VK_BUFFER_CREATE_SPARSE_BINDING_BIT, creating this VkBuffer must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed VkPhysicalDeviceLimits::sparseAddressSpaceSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-flags-00911)"}, {VALIDATION_ERROR_1ec05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-device-parameter)"}, - {VALIDATION_ERROR_1ec0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pAllocator-parameter)"}, - {VALIDATION_ERROR_1ec10001, "The spec valid usage text states 'pBuffer must be a pointer to a VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pBuffer-parameter)"}, - {VALIDATION_ERROR_1ec11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkBufferCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1ec0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pAllocator-parameter)"}, + {VALIDATION_ERROR_1ec10001, "The spec valid usage text states 'pBuffer must be a valid pointer to a VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pBuffer-parameter)"}, + {VALIDATION_ERROR_1ec11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkBufferCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBuffer-pCreateInfo-parameter)"}, {VALIDATION_ERROR_1ee05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-device-parameter)"}, - {VALIDATION_ERROR_1ee0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pAllocator-parameter)"}, - {VALIDATION_ERROR_1ee11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkBufferViewCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1ee26a01, "The spec valid usage text states 'pView must be a pointer to a VkBufferView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pView-parameter)"}, + {VALIDATION_ERROR_1ee0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pAllocator-parameter)"}, + {VALIDATION_ERROR_1ee11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkBufferViewCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1ee26a01, "The spec valid usage text states 'pView must be a valid pointer to a VkBufferView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateBufferView-pView-parameter)"}, {VALIDATION_ERROR_1f005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-device-parameter)"}, - {VALIDATION_ERROR_1f00ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pAllocator-parameter)"}, - {VALIDATION_ERROR_1f011601, "The spec valid usage text states 'pCommandPool must be a pointer to a VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pCommandPool-parameter)"}, - {VALIDATION_ERROR_1f011e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkCommandPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1f00ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_1f011601, "The spec valid usage text states 'pCommandPool must be a valid pointer to a VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pCommandPool-parameter)"}, + {VALIDATION_ERROR_1f011e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkCommandPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateCommandPool-pCreateInfo-parameter)"}, {VALIDATION_ERROR_1f20056e, "The spec valid usage text states 'If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that element' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-flags-00695)"}, {VALIDATION_ERROR_1f200570, "The spec valid usage text states 'If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-flags-00696)"}, {VALIDATION_ERROR_1f20381b, "The spec valid usage text states 'createInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-createInfoCount-arraylength)"}, {VALIDATION_ERROR_1f205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-device-parameter)"}, - {VALIDATION_ERROR_1f20ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pAllocator-parameter)"}, - {VALIDATION_ERROR_1f212001, "The spec valid usage text states 'pCreateInfos must be a pointer to an array of createInfoCount valid VkComputePipelineCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pCreateInfos-parameter)"}, - {VALIDATION_ERROR_1f21e201, "The spec valid usage text states 'pPipelines must be a pointer to an array of createInfoCount VkPipeline handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pPipelines-parameter)"}, + {VALIDATION_ERROR_1f20ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pAllocator-parameter)"}, + {VALIDATION_ERROR_1f212001, "The spec valid usage text states 'pCreateInfos must be a valid pointer to an array of createInfoCount valid VkComputePipelineCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pCreateInfos-parameter)"}, + {VALIDATION_ERROR_1f21e201, "The spec valid usage text states 'pPipelines must be a valid pointer to an array of createInfoCount VkPipeline handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pPipelines-parameter)"}, {VALIDATION_ERROR_1f228001, "The spec valid usage text states 'If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pipelineCache-parameter)"}, {VALIDATION_ERROR_1f228007, "The spec valid usage text states 'If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateComputePipelines-pipelineCache-parent)"}, - {VALIDATION_ERROR_1f40bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-instance-parameter)"}, - {VALIDATION_ERROR_1f40ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pAllocator-parameter)"}, - {VALIDATION_ERROR_1f410801, "The spec valid usage text states 'pCallback must be a pointer to a VkDebugReportCallbackEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pCallback-parameter)"}, - {VALIDATION_ERROR_1f411e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDebugReportCallbackCreateInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1f40bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-instance-parameter)"}, + {VALIDATION_ERROR_1f40ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_1f410801, "The spec valid usage text states 'pCallback must be a valid pointer to a VkDebugReportCallbackEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pCallback-parameter)"}, + {VALIDATION_ERROR_1f411e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDebugReportCallbackCreateInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDebugReportCallbackEXT-pCreateInfo-parameter)"}, {VALIDATION_ERROR_1f605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-device-parameter)"}, - {VALIDATION_ERROR_1f60ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pAllocator-parameter)"}, - {VALIDATION_ERROR_1f611e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDescriptorPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1f612e01, "The spec valid usage text states 'pDescriptorPool must be a pointer to a VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pDescriptorPool-parameter)"}, + {VALIDATION_ERROR_1f60ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_1f611e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDescriptorPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1f612e01, "The spec valid usage text states 'pDescriptorPool must be a valid pointer to a VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorPool-pDescriptorPool-parameter)"}, {VALIDATION_ERROR_1f805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-device-parameter)"}, - {VALIDATION_ERROR_1f80ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pAllocator-parameter)"}, - {VALIDATION_ERROR_1f811e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDescriptorSetLayoutCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1f822a01, "The spec valid usage text states 'pSetLayout must be a pointer to a VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pSetLayout-parameter)"}, - {VALIDATION_ERROR_1fa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-device-parameter)"}, - {VALIDATION_ERROR_1fa0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_1fa11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDescriptorUpdateTemplateCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1fa13401, "The spec valid usage text states 'pDescriptorUpdateTemplate must be a pointer to a VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pDescriptorUpdateTemplate-parameter)"}, + {VALIDATION_ERROR_1f80ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pAllocator-parameter)"}, + {VALIDATION_ERROR_1f811e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDescriptorSetLayoutCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1f822a01, "The spec valid usage text states 'pSetLayout must be a valid pointer to a VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDescriptorSetLayout-pSetLayout-parameter)"}, + {VALIDATION_ERROR_1fa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-device-parameter)"}, + {VALIDATION_ERROR_1fa0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_1fa11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDescriptorUpdateTemplateCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1fa13401, "The spec valid usage text states 'pDescriptorUpdateTemplate must be a valid pointer to a VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDescriptorUpdateTemplateKHR-pDescriptorUpdateTemplate-parameter)"}, {VALIDATION_ERROR_1fc00ad6, "The spec valid usage text states 'All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)"}, - {VALIDATION_ERROR_1fc0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pAllocator-parameter)"}, - {VALIDATION_ERROR_1fc11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDeviceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1fc13801, "The spec valid usage text states 'pDevice must be a pointer to a VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pDevice-parameter)"}, + {VALIDATION_ERROR_1fc0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pAllocator-parameter)"}, + {VALIDATION_ERROR_1fc11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDeviceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1fc13801, "The spec valid usage text states 'pDevice must be a valid pointer to a VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-pDevice-parameter)"}, {VALIDATION_ERROR_1fc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDevice-physicalDevice-parameter)"}, - {VALIDATION_ERROR_1fe06001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayModeKHR-display-parameter)"}, - {VALIDATION_ERROR_1fe0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_1fe11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDisplayModeCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_1fe1bc01, "The spec valid usage text states 'pMode must be a pointer to a VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pMode-parameter)"}, - {VALIDATION_ERROR_1fe27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayModeKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2000bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_2000ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_20011e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkDisplaySurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20024801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_1fe06001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayModeKHR-display-parameter)"}, + {VALIDATION_ERROR_1fe0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_1fe11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDisplayModeCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_1fe1bc01, "The spec valid usage text states 'pMode must be a valid pointer to a VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayModeKHR-pMode-parameter)"}, + {VALIDATION_ERROR_1fe27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayModeKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2000bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_2000ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_20011e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkDisplaySurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20024801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateDisplayPlaneSurfaceKHR-pSurface-parameter)"}, {VALIDATION_ERROR_20205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-device-parameter)"}, - {VALIDATION_ERROR_2020ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pAllocator-parameter)"}, - {VALIDATION_ERROR_20211e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkEventCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20215e01, "The spec valid usage text states 'pEvent must be a pointer to a VkEvent handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pEvent-parameter)"}, + {VALIDATION_ERROR_2020ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pAllocator-parameter)"}, + {VALIDATION_ERROR_20211e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkEventCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20215e01, "The spec valid usage text states 'pEvent must be a valid pointer to a VkEvent handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateEvent-pEvent-parameter)"}, {VALIDATION_ERROR_20405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-device-parameter)"}, - {VALIDATION_ERROR_2040ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pAllocator-parameter)"}, - {VALIDATION_ERROR_20411e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkFenceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20417001, "The spec valid usage text states 'pFence must be a pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pFence-parameter)"}, + {VALIDATION_ERROR_2040ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pAllocator-parameter)"}, + {VALIDATION_ERROR_20411e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkFenceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20417001, "The spec valid usage text states 'pFence must be a valid pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFence-pFence-parameter)"}, {VALIDATION_ERROR_20605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-device-parameter)"}, - {VALIDATION_ERROR_2060ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pAllocator-parameter)"}, - {VALIDATION_ERROR_20611e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkFramebufferCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20617801, "The spec valid usage text states 'pFramebuffer must be a pointer to a VkFramebuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pFramebuffer-parameter)"}, + {VALIDATION_ERROR_2060ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pAllocator-parameter)"}, + {VALIDATION_ERROR_20611e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkFramebufferCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20617801, "The spec valid usage text states 'pFramebuffer must be a valid pointer to a VkFramebuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateFramebuffer-pFramebuffer-parameter)"}, {VALIDATION_ERROR_208005a0, "The spec valid usage text states 'If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that element' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-flags-00720)"}, {VALIDATION_ERROR_208005a2, "The spec valid usage text states 'If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-flags-00721)"}, {VALIDATION_ERROR_2080381b, "The spec valid usage text states 'createInfoCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-createInfoCount-arraylength)"}, {VALIDATION_ERROR_20805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-device-parameter)"}, - {VALIDATION_ERROR_2080ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pAllocator-parameter)"}, - {VALIDATION_ERROR_20812001, "The spec valid usage text states 'pCreateInfos must be a pointer to an array of createInfoCount valid VkGraphicsPipelineCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pCreateInfos-parameter)"}, - {VALIDATION_ERROR_2081e201, "The spec valid usage text states 'pPipelines must be a pointer to an array of createInfoCount VkPipeline handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pPipelines-parameter)"}, + {VALIDATION_ERROR_2080ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pAllocator-parameter)"}, + {VALIDATION_ERROR_20812001, "The spec valid usage text states 'pCreateInfos must be a valid pointer to an array of createInfoCount valid VkGraphicsPipelineCreateInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pCreateInfos-parameter)"}, + {VALIDATION_ERROR_2081e201, "The spec valid usage text states 'pPipelines must be a valid pointer to an array of createInfoCount VkPipeline handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pPipelines-parameter)"}, {VALIDATION_ERROR_20828001, "The spec valid usage text states 'If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pipelineCache-parameter)"}, {VALIDATION_ERROR_20828007, "The spec valid usage text states 'If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateGraphicsPipelines-pipelineCache-parent)"}, - {VALIDATION_ERROR_20a0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-instance-parameter)"}, - {VALIDATION_ERROR_20a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pAllocator-parameter)"}, - {VALIDATION_ERROR_20a11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkIOSSurfaceCreateInfoMVK structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20a24801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pSurface-parameter)"}, + {VALIDATION_ERROR_20a0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-instance-parameter)"}, + {VALIDATION_ERROR_20a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pAllocator-parameter)"}, + {VALIDATION_ERROR_20a11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkIOSSurfaceCreateInfoMVK structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20a24801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIOSSurfaceMVK-pSurface-parameter)"}, {VALIDATION_ERROR_20c00756, "The spec valid usage text states 'If the flags member of pCreateInfo includes VK_IMAGE_CREATE_SPARSE_BINDING_BIT, creating this VkImage must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed VkPhysicalDeviceLimits::sparseAddressSpaceSize' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-flags-00939)"}, {VALIDATION_ERROR_20c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-device-parameter)"}, - {VALIDATION_ERROR_20c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pAllocator-parameter)"}, - {VALIDATION_ERROR_20c11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkImageCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20c17e01, "The spec valid usage text states 'pImage must be a pointer to a VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pImage-parameter)"}, + {VALIDATION_ERROR_20c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pAllocator-parameter)"}, + {VALIDATION_ERROR_20c11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkImageCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20c17e01, "The spec valid usage text states 'pImage must be a valid pointer to a VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImage-pImage-parameter)"}, {VALIDATION_ERROR_20e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-device-parameter)"}, - {VALIDATION_ERROR_20e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pAllocator-parameter)"}, - {VALIDATION_ERROR_20e11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkImageViewCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_20e26a01, "The spec valid usage text states 'pView must be a pointer to a VkImageView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pView-parameter)"}, - {VALIDATION_ERROR_21005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-device-parameter)"}, - {VALIDATION_ERROR_2100ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pAllocator-parameter)"}, - {VALIDATION_ERROR_21011e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkIndirectCommandsLayoutCreateInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21019201, "The spec valid usage text states 'pIndirectCommandsLayout must be a pointer to a VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pIndirectCommandsLayout-parameter)"}, + {VALIDATION_ERROR_20e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pAllocator-parameter)"}, + {VALIDATION_ERROR_20e11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkImageViewCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_20e26a01, "The spec valid usage text states 'pView must be a valid pointer to a VkImageView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateImageView-pView-parameter)"}, + {VALIDATION_ERROR_21005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-device-parameter)"}, + {VALIDATION_ERROR_2100ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pAllocator-parameter)"}, + {VALIDATION_ERROR_21011e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkIndirectCommandsLayoutCreateInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21019201, "The spec valid usage text states 'pIndirectCommandsLayout must be a valid pointer to a VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateIndirectCommandsLayoutNVX-pIndirectCommandsLayout-parameter)"}, {VALIDATION_ERROR_21200ad8, "The spec valid usage text states 'All required extensions for each extension in the VkInstanceCreateInfo::ppEnabledExtensionNames list must also be present in that list.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-ppEnabledExtensionNames-01388)"}, - {VALIDATION_ERROR_2120ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pAllocator-parameter)"}, - {VALIDATION_ERROR_21211e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkInstanceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21219c01, "The spec valid usage text states 'pInstance must be a pointer to a VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pInstance-parameter)"}, - {VALIDATION_ERROR_2140bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-instance-parameter)"}, - {VALIDATION_ERROR_2140ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pAllocator-parameter)"}, - {VALIDATION_ERROR_21411e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkMacOSSurfaceCreateInfoMVK structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21424801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pSurface-parameter)"}, - {VALIDATION_ERROR_2160bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_2160ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_21611e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkMirSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21624801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pSurface-parameter)"}, - {VALIDATION_ERROR_21805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateObjectTableNVX-device-parameter)"}, - {VALIDATION_ERROR_2180ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateObjectTableNVX-pAllocator-parameter)"}, - {VALIDATION_ERROR_21811e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkObjectTableCreateInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateObjectTableNVX-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_2181d001, "The spec valid usage text states 'pObjectTable must be a pointer to a VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateObjectTableNVX-pObjectTable-parameter)"}, + {VALIDATION_ERROR_2120ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pAllocator-parameter)"}, + {VALIDATION_ERROR_21211e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkInstanceCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21219c01, "The spec valid usage text states 'pInstance must be a valid pointer to a VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateInstance-pInstance-parameter)"}, + {VALIDATION_ERROR_2140bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-instance-parameter)"}, + {VALIDATION_ERROR_2140ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pAllocator-parameter)"}, + {VALIDATION_ERROR_21411e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkMacOSSurfaceCreateInfoMVK structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21424801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMacOSSurfaceMVK-pSurface-parameter)"}, + {VALIDATION_ERROR_2160bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_2160ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_21611e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkMirSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21624801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateMirSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_21805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateObjectTableNVX-device-parameter)"}, + {VALIDATION_ERROR_2180ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateObjectTableNVX-pAllocator-parameter)"}, + {VALIDATION_ERROR_21811e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkObjectTableCreateInfoNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateObjectTableNVX-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_2181d001, "The spec valid usage text states 'pObjectTable must be a valid pointer to a VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateObjectTableNVX-pObjectTable-parameter)"}, {VALIDATION_ERROR_21a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-device-parameter)"}, - {VALIDATION_ERROR_21a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pAllocator-parameter)"}, - {VALIDATION_ERROR_21a11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkPipelineCacheCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21a1de01, "The spec valid usage text states 'pPipelineCache must be a pointer to a VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pPipelineCache-parameter)"}, + {VALIDATION_ERROR_21a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pAllocator-parameter)"}, + {VALIDATION_ERROR_21a11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkPipelineCacheCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21a1de01, "The spec valid usage text states 'pPipelineCache must be a valid pointer to a VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineCache-pPipelineCache-parameter)"}, {VALIDATION_ERROR_21c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-device-parameter)"}, - {VALIDATION_ERROR_21c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pAllocator-parameter)"}, - {VALIDATION_ERROR_21c11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkPipelineLayoutCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21c1e001, "The spec valid usage text states 'pPipelineLayout must be a pointer to a VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pPipelineLayout-parameter)"}, + {VALIDATION_ERROR_21c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pAllocator-parameter)"}, + {VALIDATION_ERROR_21c11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkPipelineLayoutCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21c1e001, "The spec valid usage text states 'pPipelineLayout must be a valid pointer to a VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreatePipelineLayout-pPipelineLayout-parameter)"}, {VALIDATION_ERROR_21e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-device-parameter)"}, - {VALIDATION_ERROR_21e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pAllocator-parameter)"}, - {VALIDATION_ERROR_21e11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkQueryPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_21e1fa01, "The spec valid usage text states 'pQueryPool must be a pointer to a VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pQueryPool-parameter)"}, + {VALIDATION_ERROR_21e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_21e11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkQueryPoolCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_21e1fa01, "The spec valid usage text states 'pQueryPool must be a valid pointer to a VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateQueryPool-pQueryPool-parameter)"}, {VALIDATION_ERROR_22005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-device-parameter)"}, - {VALIDATION_ERROR_2200ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pAllocator-parameter)"}, - {VALIDATION_ERROR_22011e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkRenderPassCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22021601, "The spec valid usage text states 'pRenderPass must be a pointer to a VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pRenderPass-parameter)"}, + {VALIDATION_ERROR_2200ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pAllocator-parameter)"}, + {VALIDATION_ERROR_22011e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkRenderPassCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22021601, "The spec valid usage text states 'pRenderPass must be a valid pointer to a VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateRenderPass-pRenderPass-parameter)"}, {VALIDATION_ERROR_22205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-device-parameter)"}, - {VALIDATION_ERROR_2220ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pAllocator-parameter)"}, - {VALIDATION_ERROR_22211e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkSamplerCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22222401, "The spec valid usage text states 'pSampler must be a pointer to a VkSampler handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pSampler-parameter)"}, + {VALIDATION_ERROR_2220ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pAllocator-parameter)"}, + {VALIDATION_ERROR_22211e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkSamplerCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22222401, "The spec valid usage text states 'pSampler must be a valid pointer to a VkSampler handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSampler-pSampler-parameter)"}, {VALIDATION_ERROR_22405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-device-parameter)"}, - {VALIDATION_ERROR_2240ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pAllocator-parameter)"}, - {VALIDATION_ERROR_22411e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkSemaphoreCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22422801, "The spec valid usage text states 'pSemaphore must be a pointer to a VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pSemaphore-parameter)"}, + {VALIDATION_ERROR_2240ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pAllocator-parameter)"}, + {VALIDATION_ERROR_22411e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkSemaphoreCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22422801, "The spec valid usage text states 'pSemaphore must be a valid pointer to a VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSemaphore-pSemaphore-parameter)"}, {VALIDATION_ERROR_22605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-device-parameter)"}, - {VALIDATION_ERROR_2260ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pAllocator-parameter)"}, - {VALIDATION_ERROR_22611e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkShaderModuleCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22622e01, "The spec valid usage text states 'pShaderModule must be a pointer to a VkShaderModule handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pShaderModule-parameter)"}, - {VALIDATION_ERROR_22805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-device-parameter)"}, - {VALIDATION_ERROR_2280ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_22812001, "The spec valid usage text states 'pCreateInfos must be a pointer to an array of swapchainCount valid VkSwapchainCreateInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pCreateInfos-parameter)"}, - {VALIDATION_ERROR_22825801, "The spec valid usage text states 'pSwapchains must be a pointer to an array of swapchainCount VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pSwapchains-parameter)"}, - {VALIDATION_ERROR_2282f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-swapchainCount-arraylength)"}, - {VALIDATION_ERROR_22a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSwapchainKHR-device-parameter)"}, - {VALIDATION_ERROR_22a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSwapchainKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_22a11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkSwapchainCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSwapchainKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22a25201, "The spec valid usage text states 'pSwapchain must be a pointer to a VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSwapchainKHR-pSwapchain-parameter)"}, - {VALIDATION_ERROR_22c0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateViSurfaceNN-instance-parameter)"}, - {VALIDATION_ERROR_22c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateViSurfaceNN-pAllocator-parameter)"}, - {VALIDATION_ERROR_22c11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkViSurfaceCreateInfoNN structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateViSurfaceNN-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22c24801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateViSurfaceNN-pSurface-parameter)"}, - {VALIDATION_ERROR_22e0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_22e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_22e11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkWaylandSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_22e24801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pSurface-parameter)"}, - {VALIDATION_ERROR_2300bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_2300ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_23011e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkWin32SurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_23024801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pSurface-parameter)"}, - {VALIDATION_ERROR_2320bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_2320ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_23211e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkXcbSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_23224801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pSurface-parameter)"}, - {VALIDATION_ERROR_2340bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_2340ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_23411e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkXlibSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_23424801, "The spec valid usage text states 'pSurface must be a pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_2260ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pAllocator-parameter)"}, + {VALIDATION_ERROR_22611e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkShaderModuleCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22622e01, "The spec valid usage text states 'pShaderModule must be a valid pointer to a VkShaderModule handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateShaderModule-pShaderModule-parameter)"}, + {VALIDATION_ERROR_22805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-device-parameter)"}, + {VALIDATION_ERROR_2280ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_22812001, "The spec valid usage text states 'pCreateInfos must be a valid pointer to an array of swapchainCount valid VkSwapchainCreateInfoKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pCreateInfos-parameter)"}, + {VALIDATION_ERROR_22825801, "The spec valid usage text states 'pSwapchains must be a valid pointer to an array of swapchainCount VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-pSwapchains-parameter)"}, + {VALIDATION_ERROR_2282f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSharedSwapchainsKHR-swapchainCount-arraylength)"}, + {VALIDATION_ERROR_22a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSwapchainKHR-device-parameter)"}, + {VALIDATION_ERROR_22a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSwapchainKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_22a11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkSwapchainCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSwapchainKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22a25201, "The spec valid usage text states 'pSwapchain must be a valid pointer to a VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSwapchainKHR-pSwapchain-parameter)"}, + {VALIDATION_ERROR_22c0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateViSurfaceNN-instance-parameter)"}, + {VALIDATION_ERROR_22c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateViSurfaceNN-pAllocator-parameter)"}, + {VALIDATION_ERROR_22c11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkViSurfaceCreateInfoNN structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateViSurfaceNN-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22c24801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateViSurfaceNN-pSurface-parameter)"}, + {VALIDATION_ERROR_22e0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_22e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_22e11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkWaylandSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_22e24801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWaylandSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_2300bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_2300ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_23011e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkWin32SurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_23024801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateWin32SurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_2320bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_2320ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_23211e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkXcbSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_23224801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXcbSurfaceKHR-pSurface-parameter)"}, + {VALIDATION_ERROR_2340bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_2340ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_23411e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkXlibSurfaceCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_23424801, "The spec valid usage text states 'pSurface must be a valid pointer to a VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateXlibSurfaceKHR-pSurface-parameter)"}, {VALIDATION_ERROR_236009a8, "The spec valid usage text states 'pNameInfo.object must be a Vulkan object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectNameEXT-pNameInfo-01236)"}, - {VALIDATION_ERROR_23605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectNameEXT-device-parameter)"}, - {VALIDATION_ERROR_2361c201, "The spec valid usage text states 'pNameInfo must be a pointer to a valid VkDebugMarkerObjectNameInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectNameEXT-pNameInfo-parameter)"}, + {VALIDATION_ERROR_23605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugMarkerSetObjectNameEXT-device-parameter)"}, + {VALIDATION_ERROR_2361c201, "The spec valid usage text states 'pNameInfo must be a valid pointer to a valid VkDebugMarkerObjectNameInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugMarkerSetObjectNameEXT-pNameInfo-parameter)"}, {VALIDATION_ERROR_238009aa, "The spec valid usage text states 'pTagInfo.object must be a Vulkan object' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-pTagInfo-01237)"}, {VALIDATION_ERROR_238009ac, "The spec valid usage text states 'pTagInfo.tagName must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-pTagInfo-01238)"}, - {VALIDATION_ERROR_23805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-device-parameter)"}, - {VALIDATION_ERROR_23825c01, "The spec valid usage text states 'pTagInfo must be a pointer to a valid VkDebugMarkerObjectTagInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-pTagInfo-parameter)"}, - {VALIDATION_ERROR_23a009b2, "The spec valid usage text states 'object must be a Vulkan object or VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-object-01241)"}, - {VALIDATION_ERROR_23a00bb4, "The spec valid usage text states 'If objectType is not VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and object is not VK_NULL_HANDLE, object must be a Vulkan object of the corresponding type associated with objectType as defined in VkDebugReportObjectTypeEXT and Vulkan Handle Relationship.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-objectType-01498)"}, - {VALIDATION_ERROR_23a09001, "The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-flags-parameter)"}, - {VALIDATION_ERROR_23a09003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-flags-requiredbitmask)"}, - {VALIDATION_ERROR_23a0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-instance-parameter)"}, - {VALIDATION_ERROR_23a0da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-objectType-parameter)"}, - {VALIDATION_ERROR_23a1a001, "The spec valid usage text states 'pLayerPrefix must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-pLayerPrefix-parameter)"}, - {VALIDATION_ERROR_23a1b801, "The spec valid usage text states 'pMessage must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDebugReportMessageEXT-pMessage-parameter)"}, + {VALIDATION_ERROR_23805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-device-parameter)"}, + {VALIDATION_ERROR_23825c01, "The spec valid usage text states 'pTagInfo must be a valid pointer to a valid VkDebugMarkerObjectTagInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugMarkerSetObjectTagEXT-pTagInfo-parameter)"}, + {VALIDATION_ERROR_23a009b2, "The spec valid usage text states 'object must be a Vulkan object or VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-object-01241)"}, + {VALIDATION_ERROR_23a00bb4, "The spec valid usage text states 'If objectType is not VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and object is not VK_NULL_HANDLE, object must be a Vulkan object of the corresponding type associated with objectType as defined in debug-report-object-types.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-objectType-01498)"}, + {VALIDATION_ERROR_23a09001, "The spec valid usage text states 'flags must be a valid combination of VkDebugReportFlagBitsEXT values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-flags-parameter)"}, + {VALIDATION_ERROR_23a09003, "The spec valid usage text states 'flags must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-flags-requiredbitmask)"}, + {VALIDATION_ERROR_23a0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-instance-parameter)"}, + {VALIDATION_ERROR_23a0da01, "The spec valid usage text states 'objectType must be a valid VkDebugReportObjectTypeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-objectType-parameter)"}, + {VALIDATION_ERROR_23a1a001, "The spec valid usage text states 'pLayerPrefix must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-pLayerPrefix-parameter)"}, + {VALIDATION_ERROR_23a1b801, "The spec valid usage text states 'pMessage must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDebugReportMessageEXT-pMessage-parameter)"}, {VALIDATION_ERROR_23c00734, "The spec valid usage text states 'All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00922)"}, {VALIDATION_ERROR_23c00736, "The spec valid usage text states 'If VkAllocationCallbacks were provided when buffer was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00923)"}, {VALIDATION_ERROR_23c00738, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when buffer was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-buffer-00924)"}, {VALIDATION_ERROR_23c01a01, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-buffer-parameter)"}, {VALIDATION_ERROR_23c01a07, "The spec valid usage text states 'If buffer is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-buffer-parent)"}, {VALIDATION_ERROR_23c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-device-parameter)"}, - {VALIDATION_ERROR_23c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-pAllocator-parameter)"}, + {VALIDATION_ERROR_23c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBuffer-pAllocator-parameter)"}, {VALIDATION_ERROR_23e00750, "The spec valid usage text states 'All submitted commands that refer to bufferView must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-bufferView-00936)"}, {VALIDATION_ERROR_23e00752, "The spec valid usage text states 'If VkAllocationCallbacks were provided when bufferView was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-bufferView-00937)"}, {VALIDATION_ERROR_23e00754, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when bufferView was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-bufferView-00938)"}, {VALIDATION_ERROR_23e01c01, "The spec valid usage text states 'If bufferView is not VK_NULL_HANDLE, bufferView must be a valid VkBufferView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-bufferView-parameter)"}, {VALIDATION_ERROR_23e01c07, "The spec valid usage text states 'If bufferView is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-bufferView-parent)"}, {VALIDATION_ERROR_23e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-device-parameter)"}, - {VALIDATION_ERROR_23e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-pAllocator-parameter)"}, + {VALIDATION_ERROR_23e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyBufferView-pAllocator-parameter)"}, {VALIDATION_ERROR_24000052, "The spec valid usage text states 'All VkCommandBuffer objects allocated from commandPool must not be in the pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)"}, {VALIDATION_ERROR_24000054, "The spec valid usage text states 'If VkAllocationCallbacks were provided when commandPool was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00042)"}, {VALIDATION_ERROR_24000056, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when commandPool was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00043)"}, {VALIDATION_ERROR_24002801, "The spec valid usage text states 'If commandPool is not VK_NULL_HANDLE, commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-parameter)"}, {VALIDATION_ERROR_24002807, "The spec valid usage text states 'If commandPool is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-parent)"}, {VALIDATION_ERROR_24005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-device-parameter)"}, - {VALIDATION_ERROR_2400ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-pAllocator-parameter)"}, - {VALIDATION_ERROR_242009b4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when callback was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-01242)"}, - {VALIDATION_ERROR_242009b6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when callback was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-01243)"}, - {VALIDATION_ERROR_24201e01, "The spec valid usage text states 'callback must be a valid VkDebugReportCallbackEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-callback-parameter)"}, - {VALIDATION_ERROR_24201e07, "The spec valid usage text states 'callback must have been created, allocated, or retrieved from instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-callback-parent)"}, - {VALIDATION_ERROR_2420bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-parameter)"}, - {VALIDATION_ERROR_2420ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_2400ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyCommandPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_242009b4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when callback was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-01242)"}, + {VALIDATION_ERROR_242009b6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when callback was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-01243)"}, + {VALIDATION_ERROR_24201e01, "The spec valid usage text states 'callback must be a valid VkDebugReportCallbackEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-callback-parameter)"}, + {VALIDATION_ERROR_24201e07, "The spec valid usage text states 'callback must have been created, allocated, or retrieved from instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-callback-parent)"}, + {VALIDATION_ERROR_2420bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-instance-parameter)"}, + {VALIDATION_ERROR_2420ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDebugReportCallbackEXT-pAllocator-parameter)"}, {VALIDATION_ERROR_2440025e, "The spec valid usage text states 'All submitted commands that refer to descriptorPool (via any allocated descriptor sets) must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-descriptorPool-00303)"}, {VALIDATION_ERROR_24400260, "The spec valid usage text states 'If VkAllocationCallbacks were provided when descriptorPool was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-descriptorPool-00304)"}, {VALIDATION_ERROR_24400262, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when descriptorPool was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-descriptorPool-00305)"}, {VALIDATION_ERROR_24404601, "The spec valid usage text states 'If descriptorPool is not VK_NULL_HANDLE, descriptorPool must be a valid VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-descriptorPool-parameter)"}, {VALIDATION_ERROR_24404607, "The spec valid usage text states 'If descriptorPool is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-descriptorPool-parent)"}, {VALIDATION_ERROR_24405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-device-parameter)"}, - {VALIDATION_ERROR_2440ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_2440ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorPool-pAllocator-parameter)"}, {VALIDATION_ERROR_24600238, "The spec valid usage text states 'If VkAllocationCallbacks were provided when descriptorSetLayout was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00284)"}, {VALIDATION_ERROR_2460023a, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when descriptorSetLayout was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00285)"}, {VALIDATION_ERROR_24604c01, "The spec valid usage text states 'If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parameter)"}, {VALIDATION_ERROR_24604c07, "The spec valid usage text states 'If descriptorSetLayout is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parent)"}, {VALIDATION_ERROR_24605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-device-parameter)"}, - {VALIDATION_ERROR_2460ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-pAllocator-parameter)"}, - {VALIDATION_ERROR_248002c8, "The spec valid usage text states 'If VkAllocationCallbacks were provided when descriptorSetLayout was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00356)"}, - {VALIDATION_ERROR_248002ca, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when descriptorSetLayout was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00357)"}, - {VALIDATION_ERROR_24805201, "The spec valid usage text states 'If descriptorUpdateTemplate is not VK_NULL_HANDLE, descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parameter)"}, - {VALIDATION_ERROR_24805207, "The spec valid usage text states 'If descriptorUpdateTemplate is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parent)"}, - {VALIDATION_ERROR_24805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-device-parameter)"}, - {VALIDATION_ERROR_2480ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_2460ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDescriptorSetLayout-pAllocator-parameter)"}, + {VALIDATION_ERROR_248002c8, "The spec valid usage text states 'If VkAllocationCallbacks were provided when descriptorSetLayout was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00356)"}, + {VALIDATION_ERROR_248002ca, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when descriptorSetLayout was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00357)"}, + {VALIDATION_ERROR_24805201, "The spec valid usage text states 'If descriptorUpdateTemplate is not VK_NULL_HANDLE, descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parameter)"}, + {VALIDATION_ERROR_24805207, "The spec valid usage text states 'If descriptorUpdateTemplate is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parent)"}, + {VALIDATION_ERROR_24805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-device-parameter)"}, + {VALIDATION_ERROR_2480ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyDescriptorUpdateTemplateKHR-pAllocator-parameter)"}, {VALIDATION_ERROR_24a002f4, "The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378)"}, {VALIDATION_ERROR_24a002f6, "The spec valid usage text states 'If VkAllocationCallbacks were provided when device was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00379)"}, {VALIDATION_ERROR_24a002f8, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when device was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00380)"}, {VALIDATION_ERROR_24a05601, "The spec valid usage text states 'If device is not NULL, device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-parameter)"}, - {VALIDATION_ERROR_24a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-pAllocator-parameter)"}, + {VALIDATION_ERROR_24a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-pAllocator-parameter)"}, {VALIDATION_ERROR_24c008f2, "The spec valid usage text states 'All submitted commands that refer to event must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-event-01145)"}, {VALIDATION_ERROR_24c008f4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when event was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-event-01146)"}, {VALIDATION_ERROR_24c008f6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when event was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-event-01147)"}, {VALIDATION_ERROR_24c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-device-parameter)"}, {VALIDATION_ERROR_24c07e01, "The spec valid usage text states 'If event is not VK_NULL_HANDLE, event must be a valid VkEvent handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-event-parameter)"}, {VALIDATION_ERROR_24c07e07, "The spec valid usage text states 'If event is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-event-parent)"}, - {VALIDATION_ERROR_24c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-pAllocator-parameter)"}, + {VALIDATION_ERROR_24c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyEvent-pAllocator-parameter)"}, {VALIDATION_ERROR_24e008c0, "The spec valid usage text states 'All queue submission commands that refer to fence must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-fence-01120)"}, {VALIDATION_ERROR_24e008c2, "The spec valid usage text states 'If VkAllocationCallbacks were provided when fence was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-fence-01121)"}, {VALIDATION_ERROR_24e008c4, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when fence was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-fence-01122)"}, {VALIDATION_ERROR_24e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-device-parameter)"}, {VALIDATION_ERROR_24e08801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-fence-parameter)"}, {VALIDATION_ERROR_24e08807, "The spec valid usage text states 'If fence is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-fence-parent)"}, - {VALIDATION_ERROR_24e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-pAllocator-parameter)"}, + {VALIDATION_ERROR_24e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFence-pAllocator-parameter)"}, {VALIDATION_ERROR_250006f8, "The spec valid usage text states 'All submitted commands that refer to framebuffer must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)"}, {VALIDATION_ERROR_250006fa, "The spec valid usage text states 'If VkAllocationCallbacks were provided when framebuffer was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00893)"}, {VALIDATION_ERROR_250006fc, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when framebuffer was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00894)"}, {VALIDATION_ERROR_25005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-device-parameter)"}, {VALIDATION_ERROR_25009401, "The spec valid usage text states 'If framebuffer is not VK_NULL_HANDLE, framebuffer must be a valid VkFramebuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-parameter)"}, {VALIDATION_ERROR_25009407, "The spec valid usage text states 'If framebuffer is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-parent)"}, - {VALIDATION_ERROR_2500ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-pAllocator-parameter)"}, + {VALIDATION_ERROR_2500ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyFramebuffer-pAllocator-parameter)"}, {VALIDATION_ERROR_252007d0, "The spec valid usage text states 'All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-image-01000)"}, {VALIDATION_ERROR_252007d2, "The spec valid usage text states 'If VkAllocationCallbacks were provided when image was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-image-01001)"}, {VALIDATION_ERROR_252007d4, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when image was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-image-01002)"}, {VALIDATION_ERROR_25205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-device-parameter)"}, {VALIDATION_ERROR_2520a001, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-image-parameter)"}, {VALIDATION_ERROR_2520a007, "The spec valid usage text states 'If image is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-image-parent)"}, - {VALIDATION_ERROR_2520ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-pAllocator-parameter)"}, + {VALIDATION_ERROR_2520ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImage-pAllocator-parameter)"}, {VALIDATION_ERROR_25400804, "The spec valid usage text states 'All submitted commands that refer to imageView must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-imageView-01026)"}, {VALIDATION_ERROR_25400806, "The spec valid usage text states 'If VkAllocationCallbacks were provided when imageView was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-imageView-01027)"}, {VALIDATION_ERROR_25400808, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when imageView was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-imageView-01028)"}, {VALIDATION_ERROR_25405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-device-parameter)"}, {VALIDATION_ERROR_2540b001, "The spec valid usage text states 'If imageView is not VK_NULL_HANDLE, imageView must be a valid VkImageView handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-imageView-parameter)"}, {VALIDATION_ERROR_2540b007, "The spec valid usage text states 'If imageView is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-imageView-parent)"}, - {VALIDATION_ERROR_2540ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-pAllocator-parameter)"}, - {VALIDATION_ERROR_25600a90, "The spec valid usage text states 'All submitted commands that refer to indirectCommandsLayout must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-01352)"}, - {VALIDATION_ERROR_25600a92, "The spec valid usage text states 'If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01353)"}, - {VALIDATION_ERROR_25600a94, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01354)"}, - {VALIDATION_ERROR_25605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-device-parameter)"}, - {VALIDATION_ERROR_2560b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parameter)"}, - {VALIDATION_ERROR_2560b407, "The spec valid usage text states 'indirectCommandsLayout must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parent)"}, - {VALIDATION_ERROR_2560ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-pAllocator-parameter)"}, + {VALIDATION_ERROR_2540ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyImageView-pAllocator-parameter)"}, + {VALIDATION_ERROR_25600a90, "The spec valid usage text states 'All submitted commands that refer to indirectCommandsLayout must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-01352)"}, + {VALIDATION_ERROR_25600a92, "The spec valid usage text states 'If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01353)"}, + {VALIDATION_ERROR_25600a94, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01354)"}, + {VALIDATION_ERROR_25605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-device-parameter)"}, + {VALIDATION_ERROR_2560b401, "The spec valid usage text states 'indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parameter)"}, + {VALIDATION_ERROR_2560b407, "The spec valid usage text states 'indirectCommandsLayout must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parent)"}, + {VALIDATION_ERROR_2560ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyIndirectCommandsLayoutNVX-pAllocator-parameter)"}, {VALIDATION_ERROR_258004ea, "The spec valid usage text states 'All child objects created using instance must have been destroyed prior to destroying instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-instance-00629)"}, {VALIDATION_ERROR_258004ec, "The spec valid usage text states 'If VkAllocationCallbacks were provided when instance was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-instance-00630)"}, {VALIDATION_ERROR_258004ee, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when instance was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-instance-00631)"}, {VALIDATION_ERROR_2580bc01, "The spec valid usage text states 'If instance is not NULL, instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-instance-parameter)"}, - {VALIDATION_ERROR_2580ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-pAllocator-parameter)"}, - {VALIDATION_ERROR_25a00aa2, "The spec valid usage text states 'All submitted commands that refer to objectTable must have completed execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01361)"}, - {VALIDATION_ERROR_25a00aa4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01362)"}, - {VALIDATION_ERROR_25a00aa6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01363)"}, - {VALIDATION_ERROR_25a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-device-parameter)"}, - {VALIDATION_ERROR_25a0d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-parameter)"}, - {VALIDATION_ERROR_25a0d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-parent)"}, - {VALIDATION_ERROR_25a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyObjectTableNVX-pAllocator-parameter)"}, + {VALIDATION_ERROR_2580ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyInstance-pAllocator-parameter)"}, + {VALIDATION_ERROR_25a00aa2, "The spec valid usage text states 'All submitted commands that refer to objectTable must have completed execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01361)"}, + {VALIDATION_ERROR_25a00aa4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01362)"}, + {VALIDATION_ERROR_25a00aa6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-01363)"}, + {VALIDATION_ERROR_25a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-device-parameter)"}, + {VALIDATION_ERROR_25a0d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-parameter)"}, + {VALIDATION_ERROR_25a0d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-objectTable-parent)"}, + {VALIDATION_ERROR_25a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyObjectTableNVX-pAllocator-parameter)"}, {VALIDATION_ERROR_25c005fa, "The spec valid usage text states 'All submitted commands that refer to pipeline must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-00765)"}, {VALIDATION_ERROR_25c005fc, "The spec valid usage text states 'If VkAllocationCallbacks were provided when pipeline was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-00766)"}, {VALIDATION_ERROR_25c005fe, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when pipeline was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-00767)"}, {VALIDATION_ERROR_25c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-device-parameter)"}, - {VALIDATION_ERROR_25c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pAllocator-parameter)"}, + {VALIDATION_ERROR_25c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pAllocator-parameter)"}, {VALIDATION_ERROR_25c27c01, "The spec valid usage text states 'If pipeline is not VK_NULL_HANDLE, pipeline must be a valid VkPipeline handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-parameter)"}, {VALIDATION_ERROR_25c27c07, "The spec valid usage text states 'If pipeline is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipeline-pipeline-parent)"}, {VALIDATION_ERROR_25e00606, "The spec valid usage text states 'If VkAllocationCallbacks were provided when pipelineCache was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pipelineCache-00771)"}, {VALIDATION_ERROR_25e00608, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when pipelineCache was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pipelineCache-00772)"}, {VALIDATION_ERROR_25e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-device-parameter)"}, - {VALIDATION_ERROR_25e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pAllocator-parameter)"}, + {VALIDATION_ERROR_25e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pAllocator-parameter)"}, {VALIDATION_ERROR_25e28001, "The spec valid usage text states 'If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pipelineCache-parameter)"}, {VALIDATION_ERROR_25e28007, "The spec valid usage text states 'If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineCache-pipelineCache-parent)"}, {VALIDATION_ERROR_26000256, "The spec valid usage text states 'If VkAllocationCallbacks were provided when pipelineLayout was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pipelineLayout-00299)"}, {VALIDATION_ERROR_26000258, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when pipelineLayout was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pipelineLayout-00300)"}, {VALIDATION_ERROR_26005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-device-parameter)"}, - {VALIDATION_ERROR_2600ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pAllocator-parameter)"}, + {VALIDATION_ERROR_2600ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pAllocator-parameter)"}, {VALIDATION_ERROR_26028201, "The spec valid usage text states 'If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pipelineLayout-parameter)"}, {VALIDATION_ERROR_26028207, "The spec valid usage text states 'If pipelineLayout is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyPipelineLayout-pipelineLayout-parent)"}, {VALIDATION_ERROR_26200632, "The spec valid usage text states 'All submitted commands that refer to queryPool must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-queryPool-00793)"}, {VALIDATION_ERROR_26200634, "The spec valid usage text states 'If VkAllocationCallbacks were provided when queryPool was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-queryPool-00794)"}, {VALIDATION_ERROR_26200636, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when queryPool was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-queryPool-00795)"}, {VALIDATION_ERROR_26205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-device-parameter)"}, - {VALIDATION_ERROR_2620ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-pAllocator-parameter)"}, + {VALIDATION_ERROR_2620ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-pAllocator-parameter)"}, {VALIDATION_ERROR_26229801, "The spec valid usage text states 'If queryPool is not VK_NULL_HANDLE, queryPool must be a valid VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-queryPool-parameter)"}, {VALIDATION_ERROR_26229807, "The spec valid usage text states 'If queryPool is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyQueryPool-queryPool-parent)"}, {VALIDATION_ERROR_264006d2, "The spec valid usage text states 'All submitted commands that refer to renderPass must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-00873)"}, {VALIDATION_ERROR_264006d4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when renderPass was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-00874)"}, {VALIDATION_ERROR_264006d6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when renderPass was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-00875)"}, {VALIDATION_ERROR_26405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-device-parameter)"}, - {VALIDATION_ERROR_2640ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-pAllocator-parameter)"}, + {VALIDATION_ERROR_2640ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-pAllocator-parameter)"}, {VALIDATION_ERROR_2642ae01, "The spec valid usage text states 'If renderPass is not VK_NULL_HANDLE, renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-parameter)"}, {VALIDATION_ERROR_2642ae07, "The spec valid usage text states 'If renderPass is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyRenderPass-renderPass-parent)"}, {VALIDATION_ERROR_26600874, "The spec valid usage text states 'All submitted commands that refer to sampler must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-sampler-01082)"}, {VALIDATION_ERROR_26600876, "The spec valid usage text states 'If VkAllocationCallbacks were provided when sampler was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-sampler-01083)"}, {VALIDATION_ERROR_26600878, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when sampler was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-sampler-01084)"}, {VALIDATION_ERROR_26605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-device-parameter)"}, - {VALIDATION_ERROR_2660ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-pAllocator-parameter)"}, + {VALIDATION_ERROR_2660ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-pAllocator-parameter)"}, {VALIDATION_ERROR_2662b201, "The spec valid usage text states 'If sampler is not VK_NULL_HANDLE, sampler must be a valid VkSampler handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-sampler-parameter)"}, {VALIDATION_ERROR_2662b207, "The spec valid usage text states 'If sampler is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySampler-sampler-parent)"}, {VALIDATION_ERROR_268008e2, "The spec valid usage text states 'All submitted batches that refer to semaphore must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-semaphore-01137)"}, {VALIDATION_ERROR_268008e4, "The spec valid usage text states 'If VkAllocationCallbacks were provided when semaphore was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-semaphore-01138)"}, {VALIDATION_ERROR_268008e6, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when semaphore was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-semaphore-01139)"}, {VALIDATION_ERROR_26805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-device-parameter)"}, - {VALIDATION_ERROR_2680ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-pAllocator-parameter)"}, + {VALIDATION_ERROR_2680ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-pAllocator-parameter)"}, {VALIDATION_ERROR_2682b801, "The spec valid usage text states 'If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-semaphore-parameter)"}, {VALIDATION_ERROR_2682b807, "The spec valid usage text states 'If semaphore is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySemaphore-semaphore-parent)"}, {VALIDATION_ERROR_26a00888, "The spec valid usage text states 'If VkAllocationCallbacks were provided when shaderModule was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-shaderModule-01092)"}, {VALIDATION_ERROR_26a0088a, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when shaderModule was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-shaderModule-01093)"}, {VALIDATION_ERROR_26a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-device-parameter)"}, - {VALIDATION_ERROR_26a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-pAllocator-parameter)"}, + {VALIDATION_ERROR_26a0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-pAllocator-parameter)"}, {VALIDATION_ERROR_26a2be01, "The spec valid usage text states 'If shaderModule is not VK_NULL_HANDLE, shaderModule must be a valid VkShaderModule handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-shaderModule-parameter)"}, {VALIDATION_ERROR_26a2be07, "The spec valid usage text states 'If shaderModule is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyShaderModule-shaderModule-parent)"}, - {VALIDATION_ERROR_26c009e4, "The spec valid usage text states 'All VkSwapchainKHR objects created for surface must have been destroyed prior to destroying surface' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01266)"}, - {VALIDATION_ERROR_26c009e6, "The spec valid usage text states 'If VkAllocationCallbacks were provided when surface was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01267)"}, - {VALIDATION_ERROR_26c009e8, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when surface was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01268)"}, - {VALIDATION_ERROR_26c0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-instance-parameter)"}, - {VALIDATION_ERROR_26c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_26c2ec01, "The spec valid usage text states 'If surface is not VK_NULL_HANDLE, surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-parameter)"}, - {VALIDATION_ERROR_26c2ec07, "The spec valid usage text states 'If surface is a valid handle, it must have been created, allocated, or retrieved from instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-parent)"}, - {VALIDATION_ERROR_26e00009, "The spec valid usage text states 'Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-commonparent)"}, - {VALIDATION_ERROR_26e00a04, "The spec valid usage text states 'All uses of presentable images acquired from swapchain must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01282)"}, - {VALIDATION_ERROR_26e00a06, "The spec valid usage text states 'If VkAllocationCallbacks were provided when swapchain was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01283)"}, - {VALIDATION_ERROR_26e00a08, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when swapchain was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01284)"}, - {VALIDATION_ERROR_26e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-device-parameter)"}, - {VALIDATION_ERROR_26e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_26e2f001, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-parameter)"}, + {VALIDATION_ERROR_26c009e4, "The spec valid usage text states 'All VkSwapchainKHR objects created for surface must have been destroyed prior to destroying surface' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01266)"}, + {VALIDATION_ERROR_26c009e6, "The spec valid usage text states 'If VkAllocationCallbacks were provided when surface was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01267)"}, + {VALIDATION_ERROR_26c009e8, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when surface was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-01268)"}, + {VALIDATION_ERROR_26c0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-instance-parameter)"}, + {VALIDATION_ERROR_26c0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_26c2ec01, "The spec valid usage text states 'If surface is not VK_NULL_HANDLE, surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-parameter)"}, + {VALIDATION_ERROR_26c2ec07, "The spec valid usage text states 'If surface is a valid handle, it must have been created, allocated, or retrieved from instance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySurfaceKHR-surface-parent)"}, + {VALIDATION_ERROR_26e00009, "The spec valid usage text states 'Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-commonparent)"}, + {VALIDATION_ERROR_26e00a04, "The spec valid usage text states 'All uses of presentable images acquired from swapchain must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01282)"}, + {VALIDATION_ERROR_26e00a06, "The spec valid usage text states 'If VkAllocationCallbacks were provided when swapchain was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01283)"}, + {VALIDATION_ERROR_26e00a08, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when swapchain was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-01284)"}, + {VALIDATION_ERROR_26e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-device-parameter)"}, + {VALIDATION_ERROR_26e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_26e2f001, "The spec valid usage text states 'If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySwapchainKHR-swapchain-parameter)"}, {VALIDATION_ERROR_27005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDeviceWaitIdle-device-parameter)"}, - {VALIDATION_ERROR_27205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDisplayPowerControlEXT-device-parameter)"}, - {VALIDATION_ERROR_27206001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDisplayPowerControlEXT-display-parameter)"}, - {VALIDATION_ERROR_27214e01, "The spec valid usage text states 'pDisplayPowerInfo must be a pointer to a valid VkDisplayPowerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDisplayPowerControlEXT-pDisplayPowerInfo-parameter)"}, + {VALIDATION_ERROR_27205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDisplayPowerControlEXT-device-parameter)"}, + {VALIDATION_ERROR_27206001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDisplayPowerControlEXT-display-parameter)"}, + {VALIDATION_ERROR_27214e01, "The spec valid usage text states 'pDisplayPowerInfo must be a valid pointer to a valid VkDisplayPowerInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDisplayPowerControlEXT-pDisplayPowerInfo-parameter)"}, {VALIDATION_ERROR_27400076, "The spec valid usage text states 'commandBuffer must be in the recording state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEndCommandBuffer-commandBuffer-00059)"}, {VALIDATION_ERROR_27400078, "The spec valid usage text states 'If commandBuffer is a primary command buffer, there must not be an active render pass instance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEndCommandBuffer-commandBuffer-00060)"}, {VALIDATION_ERROR_2740007a, "The spec valid usage text states 'All queries made active during the recording of commandBuffer must have been made inactive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEndCommandBuffer-commandBuffer-00061)"}, {VALIDATION_ERROR_2740007c, "The spec valid usage text states 'If commandBuffer is a secondary command buffer, there must not be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkEndCommandBuffer-commandBuffer-00062)"}, {VALIDATION_ERROR_27402401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEndCommandBuffer-commandBuffer-parameter)"}, {VALIDATION_ERROR_27619e01, "The spec valid usage text states 'If pLayerName is not NULL, pLayerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-pLayerName-parameter)"}, - {VALIDATION_ERROR_2761f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkExtensionProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-pProperties-parameter)"}, - {VALIDATION_ERROR_2761f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2761f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkExtensionProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_2761f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-pPropertyCount-parameter)"}, {VALIDATION_ERROR_27627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2781f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkLayerProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceLayerProperties-pProperties-parameter)"}, - {VALIDATION_ERROR_2781f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceLayerProperties-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2781f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkLayerProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceLayerProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_2781f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceLayerProperties-pPropertyCount-parameter)"}, {VALIDATION_ERROR_27827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter)"}, {VALIDATION_ERROR_27a19e01, "The spec valid usage text states 'If pLayerName is not NULL, pLayerName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceExtensionProperties-pLayerName-parameter)"}, - {VALIDATION_ERROR_27a1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkExtensionProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceExtensionProperties-pProperties-parameter)"}, - {VALIDATION_ERROR_27a1f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceExtensionProperties-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_27c1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkLayerProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceLayerProperties-pProperties-parameter)"}, - {VALIDATION_ERROR_27c1f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceLayerProperties-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_27e0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-instance-parameter)"}, - {VALIDATION_ERROR_27e1d801, "The spec valid usage text states 'pPhysicalDeviceGroupCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupCount-parameter)"}, - {VALIDATION_ERROR_27e1da01, "The spec valid usage text states 'If the value referenced by pPhysicalDeviceGroupCount is not 0, and pPhysicalDeviceGroupProperties is not NULL, pPhysicalDeviceGroupProperties must be a pointer to an array of pPhysicalDeviceGroupCount VkPhysicalDeviceGroupPropertiesKHX structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupProperties-parameter)"}, + {VALIDATION_ERROR_27a1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkExtensionProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceExtensionProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_27a1f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceExtensionProperties-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_27c1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkLayerProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceLayerProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_27c1f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumerateInstanceLayerProperties-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_27e0bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-instance-parameter)"}, + {VALIDATION_ERROR_27e1d801, "The spec valid usage text states 'pPhysicalDeviceGroupCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupCount-parameter)"}, + {VALIDATION_ERROR_27e1da01, "The spec valid usage text states 'If the value referenced by pPhysicalDeviceGroupCount is not 0, and pPhysicalDeviceGroupProperties is not NULL, pPhysicalDeviceGroupProperties must be a valid pointer to an array of pPhysicalDeviceGroupCount VkPhysicalDeviceGroupPropertiesKHX structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupProperties-parameter)"}, {VALIDATION_ERROR_2800bc01, "The spec valid usage text states 'instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDevices-instance-parameter)"}, - {VALIDATION_ERROR_2801d601, "The spec valid usage text states 'pPhysicalDeviceCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter)"}, - {VALIDATION_ERROR_2801dc01, "The spec valid usage text states 'If the value referenced by pPhysicalDeviceCount is not 0, and pPhysicalDevices is not NULL, pPhysicalDevices must be a pointer to an array of pPhysicalDeviceCount VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDevices-pPhysicalDevices-parameter)"}, + {VALIDATION_ERROR_2801d601, "The spec valid usage text states 'pPhysicalDeviceCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter)"}, + {VALIDATION_ERROR_2801dc01, "The spec valid usage text states 'If the value referenced by pPhysicalDeviceCount is not 0, and pPhysicalDevices is not NULL, pPhysicalDevices must be a valid pointer to an array of pPhysicalDeviceCount VkPhysicalDevice handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkEnumeratePhysicalDevices-pPhysicalDevices-parameter)"}, {VALIDATION_ERROR_28205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFlushMappedMemoryRanges-device-parameter)"}, {VALIDATION_ERROR_2820c81b, "The spec valid usage text states 'memoryRangeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFlushMappedMemoryRanges-memoryRangeCount-arraylength)"}, - {VALIDATION_ERROR_2821b201, "The spec valid usage text states 'pMemoryRanges must be a pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFlushMappedMemoryRanges-pMemoryRanges-parameter)"}, + {VALIDATION_ERROR_2821b201, "The spec valid usage text states 'pMemoryRanges must be a valid pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFlushMappedMemoryRanges-pMemoryRanges-parameter)"}, {VALIDATION_ERROR_2840005e, "The spec valid usage text states 'All elements of pCommandBuffers must not be in the pending state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)"}, - {VALIDATION_ERROR_28400060, "The spec valid usage text states 'pCommandBuffers must be a pointer to an array of commandBufferCount VkCommandBuffer handles, each element of which must either be a valid handle or NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00048)"}, + {VALIDATION_ERROR_28400060, "The spec valid usage text states 'pCommandBuffers must be a valid pointer to an array of commandBufferCount VkCommandBuffer handles, each element of which must either be a valid handle or NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00048)"}, {VALIDATION_ERROR_2840261b, "The spec valid usage text states 'commandBufferCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-commandBufferCount-arraylength)"}, {VALIDATION_ERROR_28402801, "The spec valid usage text states 'commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-commandPool-parameter)"}, {VALIDATION_ERROR_28402807, "The spec valid usage text states 'commandPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-commandPool-parent)"}, {VALIDATION_ERROR_28405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-device-parameter)"}, {VALIDATION_ERROR_28411407, "The spec valid usage text states 'Each element of pCommandBuffers that is a valid handle must have been created, allocated, or retrieved from commandPool' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-parent)"}, {VALIDATION_ERROR_2860026a, "The spec valid usage text states 'All submitted commands that refer to any element of pDescriptorSets must have completed execution' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00309)"}, - {VALIDATION_ERROR_2860026c, "The spec valid usage text states 'pDescriptorSets must be a pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which must either be a valid handle or VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00310)"}, + {VALIDATION_ERROR_2860026c, "The spec valid usage text states 'pDescriptorSets must be a valid pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which must either be a valid handle or VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00310)"}, {VALIDATION_ERROR_2860026e, "The spec valid usage text states 'Each valid handle in pDescriptorSets must have been allocated from descriptorPool' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00311)"}, {VALIDATION_ERROR_28600270, "The spec valid usage text states 'descriptorPool must have been created with the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-descriptorPool-00312)"}, {VALIDATION_ERROR_28604601, "The spec valid usage text states 'descriptorPool must be a valid VkDescriptorPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeDescriptorSets-descriptorPool-parameter)"}, @@ -6612,238 +6902,240 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_28805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeMemory-device-parameter)"}, {VALIDATION_ERROR_2880c601, "The spec valid usage text states 'If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeMemory-memory-parameter)"}, {VALIDATION_ERROR_2880c607, "The spec valid usage text states 'If memory is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeMemory-memory-parent)"}, - {VALIDATION_ERROR_2880ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeMemory-pAllocator-parameter)"}, + {VALIDATION_ERROR_2880ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkFreeMemory-pAllocator-parameter)"}, {VALIDATION_ERROR_28a01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements-buffer-parameter)"}, {VALIDATION_ERROR_28a01a07, "The spec valid usage text states 'buffer must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements-buffer-parent)"}, {VALIDATION_ERROR_28a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements-device-parameter)"}, - {VALIDATION_ERROR_28a1b401, "The spec valid usage text states 'pMemoryRequirements must be a pointer to a VkMemoryRequirements structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements-pMemoryRequirements-parameter)"}, - {VALIDATION_ERROR_28c00566, "The spec valid usage text states 'heapIndex must be less than memoryHeapCount' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-heapIndex-00691)"}, - {VALIDATION_ERROR_28c00568, "The spec valid usage text states 'localDeviceIndex must be a valid device index' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00692)"}, - {VALIDATION_ERROR_28c0056a, "The spec valid usage text states 'remoteDeviceIndex must be a valid device index' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-remoteDeviceIndex-00693)"}, - {VALIDATION_ERROR_28c0056c, "The spec valid usage text states 'localDeviceIndex must not equal remoteDeviceIndex' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00694)"}, - {VALIDATION_ERROR_28c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-device-parameter)"}, - {VALIDATION_ERROR_28c1d401, "The spec valid usage text states 'pPeerMemoryFeatures must be a pointer to a combination of VkPeerMemoryFeatureFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-pPeerMemoryFeatures-parameter)"}, + {VALIDATION_ERROR_28a1b401, "The spec valid usage text states 'pMemoryRequirements must be a valid pointer to a VkMemoryRequirements structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements-pMemoryRequirements-parameter)"}, + {VALIDATION_ERROR_28c00566, "The spec valid usage text states 'heapIndex must be less than memoryHeapCount' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-heapIndex-00691)"}, + {VALIDATION_ERROR_28c00568, "The spec valid usage text states 'localDeviceIndex must be a valid device index' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00692)"}, + {VALIDATION_ERROR_28c0056a, "The spec valid usage text states 'remoteDeviceIndex must be a valid device index' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-remoteDeviceIndex-00693)"}, + {VALIDATION_ERROR_28c0056c, "The spec valid usage text states 'localDeviceIndex must not equal remoteDeviceIndex' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00694)"}, + {VALIDATION_ERROR_28c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-device-parameter)"}, + {VALIDATION_ERROR_28c1d401, "The spec valid usage text states 'pPeerMemoryFeatures must be a valid pointer to a VkPeerMemoryFeatureFlagsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-pPeerMemoryFeatures-parameter)"}, {VALIDATION_ERROR_28c1d403, "The spec valid usage text states 'pPeerMemoryFeatures must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-pPeerMemoryFeatures-requiredbitmask)"}, - {VALIDATION_ERROR_28e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPresentCapabilitiesKHX-device-parameter)"}, - {VALIDATION_ERROR_28e13c01, "The spec valid usage text states 'pDeviceGroupPresentCapabilities must be a pointer to a VkDeviceGroupPresentCapabilitiesKHX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupPresentCapabilitiesKHX-pDeviceGroupPresentCapabilities-parameter)"}, - {VALIDATION_ERROR_29000009, "The spec valid usage text states 'Both of device, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-commonparent)"}, - {VALIDATION_ERROR_29005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-device-parameter)"}, - {VALIDATION_ERROR_2901be01, "The spec valid usage text states 'pModes must be a pointer to a combination of VkDeviceGroupPresentModeFlagBitsKHX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-pModes-parameter)"}, + {VALIDATION_ERROR_28e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPresentCapabilitiesKHX-device-parameter)"}, + {VALIDATION_ERROR_28e13c01, "The spec valid usage text states 'pDeviceGroupPresentCapabilities must be a valid pointer to a VkDeviceGroupPresentCapabilitiesKHX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupPresentCapabilitiesKHX-pDeviceGroupPresentCapabilities-parameter)"}, + {VALIDATION_ERROR_29000009, "The spec valid usage text states 'Both of device, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-commonparent)"}, + {VALIDATION_ERROR_29005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-device-parameter)"}, + {VALIDATION_ERROR_2901be01, "The spec valid usage text states 'pModes must be a valid pointer to a VkDeviceGroupPresentModeFlagsKHX value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-pModes-parameter)"}, {VALIDATION_ERROR_2901be03, "The spec valid usage text states 'pModes must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-pModes-requiredbitmask)"}, - {VALIDATION_ERROR_2902ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-surface-parameter)"}, + {VALIDATION_ERROR_2902ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDeviceGroupSurfacePresentModesKHX-surface-parameter)"}, {VALIDATION_ERROR_29200564, "The spec valid usage text states 'memory must have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-memory-00690)"}, {VALIDATION_ERROR_29205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-device-parameter)"}, {VALIDATION_ERROR_2920c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-memory-parameter)"}, {VALIDATION_ERROR_2920c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-memory-parent)"}, - {VALIDATION_ERROR_29211801, "The spec valid usage text states 'pCommittedMemoryInBytes must be a pointer to a VkDeviceSize value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-pCommittedMemoryInBytes-parameter)"}, + {VALIDATION_ERROR_29211801, "The spec valid usage text states 'pCommittedMemoryInBytes must be a valid pointer to a VkDeviceSize value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceMemoryCommitment-pCommittedMemoryInBytes-parameter)"}, {VALIDATION_ERROR_29405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceProcAddr-device-parameter)"}, {VALIDATION_ERROR_2941c001, "The spec valid usage text states 'pName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceProcAddr-pName-parameter)"}, {VALIDATION_ERROR_29600300, "The spec valid usage text states 'queueFamilyIndex must be one of the queue family indices specified when device was created, via the VkDeviceQueueCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceQueue-queueFamilyIndex-00384)"}, {VALIDATION_ERROR_29600302, "The spec valid usage text states 'queueIndex must be less than the number of queues created for the specified queue family index when device was created, via the queueCount member of the VkDeviceQueueCreateInfo structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceQueue-queueIndex-00385)"}, {VALIDATION_ERROR_29605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceQueue-device-parameter)"}, - {VALIDATION_ERROR_2961fc01, "The spec valid usage text states 'pQueue must be a pointer to a VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceQueue-pQueue-parameter)"}, - {VALIDATION_ERROR_29806001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-display-parameter)"}, - {VALIDATION_ERROR_2981f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-pProperties-parameter)"}, - {VALIDATION_ERROR_2981f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_29827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_29a0ce01, "The spec valid usage text states 'mode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parameter)"}, - {VALIDATION_ERROR_29a10a01, "The spec valid usage text states 'pCapabilities must be a pointer to a VkDisplayPlaneCapabilitiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-pCapabilities-parameter)"}, - {VALIDATION_ERROR_29a27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_29c009c2, "The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-planeIndex-01249)"}, - {VALIDATION_ERROR_29c14a01, "The spec valid usage text states 'pDisplayCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplayCount-parameter)"}, - {VALIDATION_ERROR_29c15201, "The spec valid usage text states 'If the value referenced by pDisplayCount is not 0, and pDisplays is not NULL, pDisplays must be a pointer to an array of pDisplayCount VkDisplayKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplays-parameter)"}, - {VALIDATION_ERROR_29c27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2961fc01, "The spec valid usage text states 'pQueue must be a valid pointer to a VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetDeviceQueue-pQueue-parameter)"}, + {VALIDATION_ERROR_29806001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-display-parameter)"}, + {VALIDATION_ERROR_2981f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-pProperties-parameter)"}, + {VALIDATION_ERROR_2981f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_29827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_29a0ce01, "The spec valid usage text states 'mode must be a valid VkDisplayModeKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parameter)"}, + {VALIDATION_ERROR_29a10a01, "The spec valid usage text states 'pCapabilities must be a valid pointer to a VkDisplayPlaneCapabilitiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-pCapabilities-parameter)"}, + {VALIDATION_ERROR_29a27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_29c009c2, "The spec valid usage text states 'planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-planeIndex-01249)"}, + {VALIDATION_ERROR_29c14a01, "The spec valid usage text states 'pDisplayCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplayCount-parameter)"}, + {VALIDATION_ERROR_29c15201, "The spec valid usage text states 'If the value referenced by pDisplayCount is not 0, and pDisplays is not NULL, pDisplays must be a valid pointer to an array of pDisplayCount VkDisplayKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplays-parameter)"}, + {VALIDATION_ERROR_29c27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter)"}, {VALIDATION_ERROR_29e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetEventStatus-device-parameter)"}, {VALIDATION_ERROR_29e07e01, "The spec valid usage text states 'event must be a valid VkEvent handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetEventStatus-event-parameter)"}, {VALIDATION_ERROR_29e07e07, "The spec valid usage text states 'event must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetEventStatus-event-parent)"}, {VALIDATION_ERROR_2a005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceStatus-device-parameter)"}, {VALIDATION_ERROR_2a008801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceStatus-fence-parameter)"}, {VALIDATION_ERROR_2a008807, "The spec valid usage text states 'fence must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceStatus-fence-parent)"}, - {VALIDATION_ERROR_2a200c68, "The spec valid usage text states 'image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-image-01588)"}, + {VALIDATION_ERROR_2a200c68, "The spec valid usage text states 'image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag set' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageMemoryRequirements-image-01588)"}, {VALIDATION_ERROR_2a205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-device-parameter)"}, {VALIDATION_ERROR_2a20a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-image-parameter)"}, {VALIDATION_ERROR_2a20a007, "The spec valid usage text states 'image must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-image-parent)"}, - {VALIDATION_ERROR_2a21b401, "The spec valid usage text states 'pMemoryRequirements must be a pointer to a VkMemoryRequirements structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-pMemoryRequirements-parameter)"}, + {VALIDATION_ERROR_2a21b401, "The spec valid usage text states 'pMemoryRequirements must be a valid pointer to a VkMemoryRequirements structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements-pMemoryRequirements-parameter)"}, {VALIDATION_ERROR_2a405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-device-parameter)"}, {VALIDATION_ERROR_2a40a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-image-parameter)"}, {VALIDATION_ERROR_2a40a007, "The spec valid usage text states 'image must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-image-parent)"}, - {VALIDATION_ERROR_2a423601, "The spec valid usage text states 'pSparseMemoryRequirementCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter)"}, - {VALIDATION_ERROR_2a423801, "The spec valid usage text states 'If the value referenced by pSparseMemoryRequirementCount is not 0, and pSparseMemoryRequirements is not NULL, pSparseMemoryRequirements must be a pointer to an array of pSparseMemoryRequirementCount VkSparseImageMemoryRequirements structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter)"}, + {VALIDATION_ERROR_2a423601, "The spec valid usage text states 'pSparseMemoryRequirementCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter)"}, + {VALIDATION_ERROR_2a423801, "The spec valid usage text states 'If the value referenced by pSparseMemoryRequirementCount is not 0, and pSparseMemoryRequirements is not NULL, pSparseMemoryRequirements must be a valid pointer to an array of pSparseMemoryRequirementCount VkSparseImageMemoryRequirements structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter)"}, {VALIDATION_ERROR_2a6007c8, "The spec valid usage text states 'image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-image-00996)"}, {VALIDATION_ERROR_2a6007ca, "The spec valid usage text states 'The aspectMask member of pSubresource must only have a single bit set' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-aspectMask-00997)"}, {VALIDATION_ERROR_2a600c5a, "The spec valid usage text states 'If the format of image is a multi-planar format with two planes, the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageSubresourceLayout-format-01581)"}, {VALIDATION_ERROR_2a600c5c, "The spec valid usage text states 'If the format of image is a multi-planar format with three planes, the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageSubresourceLayout-format-01582)"}, + {VALIDATION_ERROR_2a600d68, "The spec valid usage text states 'The mipLevel member of pSubresource must be less than the mipLevels specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-mipLevel-01716)"}, + {VALIDATION_ERROR_2a600d6a, "The spec valid usage text states 'The arrayLayer member of pSubresource must be less than the arrayLayers specified in VkImageCreateInfo when image was created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-arrayLayer-01717)"}, {VALIDATION_ERROR_2a605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-device-parameter)"}, {VALIDATION_ERROR_2a60a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-image-parameter)"}, {VALIDATION_ERROR_2a60a007, "The spec valid usage text states 'image must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-image-parent)"}, - {VALIDATION_ERROR_2a61a201, "The spec valid usage text states 'pLayout must be a pointer to a VkSubresourceLayout structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-pLayout-parameter)"}, - {VALIDATION_ERROR_2a624401, "The spec valid usage text states 'pSubresource must be a pointer to a valid VkImageSubresource structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-pSubresource-parameter)"}, + {VALIDATION_ERROR_2a61a201, "The spec valid usage text states 'pLayout must be a valid pointer to a VkSubresourceLayout structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-pLayout-parameter)"}, + {VALIDATION_ERROR_2a624401, "The spec valid usage text states 'pSubresource must be a valid pointer to a valid VkImageSubresource structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-pSubresource-parameter)"}, {VALIDATION_ERROR_2a80bc01, "The spec valid usage text states 'If instance is not NULL, instance must be a valid VkInstance handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetInstanceProcAddr-instance-parameter)"}, {VALIDATION_ERROR_2a81c001, "The spec valid usage text states 'pName must be a null-terminated UTF-8 string' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetInstanceProcAddr-pName-parameter)"}, {VALIDATION_ERROR_2aa0053e, "The spec valid usage text states 'handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-handleType-00671)"}, {VALIDATION_ERROR_2aa00540, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-handleType-00672)"}, - {VALIDATION_ERROR_2aa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-device-parameter)"}, + {VALIDATION_ERROR_2aa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdKHR-device-parameter)"}, {VALIDATION_ERROR_2aa09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-handleType-parameter)"}, {VALIDATION_ERROR_2aa0c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-memory-parameter)"}, {VALIDATION_ERROR_2aa0c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-memory-parent)"}, - {VALIDATION_ERROR_2aa16c01, "The spec valid usage text states 'pFd must be a pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-pFd-parameter)"}, - {VALIDATION_ERROR_2aa39e01, "The spec valid usage text states 'pGetFdInfo must be a pointer to a valid VkMemoryGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdKHR-pGetFdInfo-parameter)"}, - {VALIDATION_ERROR_2ac00542, "The spec valid usage text states 'fd must be an external memory handle created outside of the Vulkan API.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-fd-00673)"}, - {VALIDATION_ERROR_2ac00544, "The spec valid usage text states 'handleType must not be one of the handle types defined as opaque.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-handleType-00674)"}, - {VALIDATION_ERROR_2ac05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-device-parameter)"}, - {VALIDATION_ERROR_2ac09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-handleType-parameter)"}, - {VALIDATION_ERROR_2ac1ae01, "The spec valid usage text states 'pMemoryFdProperties must be a pointer to a VkMemoryFdPropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-pMemoryFdProperties-parameter)"}, + {VALIDATION_ERROR_2aa16c01, "The spec valid usage text states 'pFd must be a valid pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdKHR-pFd-parameter)"}, + {VALIDATION_ERROR_2aa39e01, "The spec valid usage text states 'pGetFdInfo must be a valid pointer to a valid VkMemoryGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdKHR-pGetFdInfo-parameter)"}, + {VALIDATION_ERROR_2ac00542, "The spec valid usage text states 'fd must be an external memory handle created outside of the Vulkan API.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-fd-00673)"}, + {VALIDATION_ERROR_2ac00544, "The spec valid usage text states 'handleType must not be VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-handleType-00674)"}, + {VALIDATION_ERROR_2ac05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-device-parameter)"}, + {VALIDATION_ERROR_2ac09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-handleType-parameter)"}, + {VALIDATION_ERROR_2ac1ae01, "The spec valid usage text states 'pMemoryFdProperties must be a valid pointer to a VkMemoryFdPropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryFdPropertiesKHR-pMemoryFdProperties-parameter)"}, {VALIDATION_ERROR_2ae0052c, "The spec valid usage text states 'handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-handleType-00662)"}, {VALIDATION_ERROR_2ae0052e, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetMemoryWin32HandleKHR must be called no more than once for each valid unique combination of memory and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-handleType-00663)"}, {VALIDATION_ERROR_2ae00530, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-handleType-00664)"}, - {VALIDATION_ERROR_2ae05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-device-parameter)"}, + {VALIDATION_ERROR_2ae05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-device-parameter)"}, {VALIDATION_ERROR_2ae09c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-handleType-parameter)"}, {VALIDATION_ERROR_2ae0c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-memory-parameter)"}, {VALIDATION_ERROR_2ae0c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-memory-parent)"}, - {VALIDATION_ERROR_2ae17c01, "The spec valid usage text states 'pHandle must be a pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-pHandle-parameter)"}, - {VALIDATION_ERROR_2ae3a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a pointer to a valid VkMemoryGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, - {VALIDATION_ERROR_2b000a5c, "The spec valid usage text states 'handleType must be a flag specified in VkExportMemoryAllocateInfoNV::handleTypes when allocating memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-01326)"}, - {VALIDATION_ERROR_2b005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-device-parameter)"}, - {VALIDATION_ERROR_2b009c01, "The spec valid usage text states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-parameter)"}, - {VALIDATION_ERROR_2b009c03, "The spec valid usage text states 'handleType must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-requiredbitmask)"}, - {VALIDATION_ERROR_2b00c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-memory-parameter)"}, - {VALIDATION_ERROR_2b00c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-memory-parent)"}, - {VALIDATION_ERROR_2b017c01, "The spec valid usage text states 'pHandle must be a pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-pHandle-parameter)"}, - {VALIDATION_ERROR_2b200532, "The spec valid usage text states 'handle must be an external memory handle created outside of the Vulkan API.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handle-00665)"}, - {VALIDATION_ERROR_2b200534, "The spec valid usage text states 'handleType must not be one of the handle types defined as opaque.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-00666)"}, - {VALIDATION_ERROR_2b205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter)"}, - {VALIDATION_ERROR_2b209c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-parameter)"}, - {VALIDATION_ERROR_2b21b601, "The spec valid usage text states 'pMemoryWin32HandleProperties must be a pointer to a VkMemoryWin32HandlePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-pMemoryWin32HandleProperties-parameter)"}, - {VALIDATION_ERROR_2b400009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-commonparent)"}, - {VALIDATION_ERROR_2b405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-device-parameter)"}, - {VALIDATION_ERROR_2b41ec01, "The spec valid usage text states 'pPresentationTimingCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimingCount-parameter)"}, - {VALIDATION_ERROR_2b41ee01, "The spec valid usage text states 'If the value referenced by pPresentationTimingCount is not 0, and pPresentationTimings is not NULL, pPresentationTimings must be a pointer to an array of pPresentationTimingCount VkPastPresentationTimingGOOGLE structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimings-parameter)"}, - {VALIDATION_ERROR_2b42f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parameter)"}, - {VALIDATION_ERROR_2b61f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayPlanePropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pProperties-parameter)"}, - {VALIDATION_ERROR_2b61f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_2b627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2b81f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayPropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pProperties-parameter)"}, - {VALIDATION_ERROR_2b81f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_2b827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ba16201, "The spec valid usage text states 'pExternalBufferInfo must be a pointer to a valid VkPhysicalDeviceExternalBufferInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferInfo-parameter)"}, - {VALIDATION_ERROR_2ba16401, "The spec valid usage text states 'pExternalBufferProperties must be a pointer to a VkExternalBufferPropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferProperties-parameter)"}, - {VALIDATION_ERROR_2ba27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2bc08201, "The spec valid usage text states 'externalHandleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-externalHandleType-parameter)"}, - {VALIDATION_ERROR_2bc09001, "The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-flags-parameter)"}, - {VALIDATION_ERROR_2bc09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-format-parameter)"}, - {VALIDATION_ERROR_2bc16601, "The spec valid usage text states 'pExternalImageFormatProperties must be a pointer to a VkExternalImageFormatPropertiesNV structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-pExternalImageFormatProperties-parameter)"}, - {VALIDATION_ERROR_2bc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2bc2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-tiling-parameter)"}, - {VALIDATION_ERROR_2bc30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-type-parameter)"}, - {VALIDATION_ERROR_2bc30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-parameter)"}, - {VALIDATION_ERROR_2bc30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-requiredbitmask)"}, - {VALIDATION_ERROR_2be16801, "The spec valid usage text states 'pExternalSemaphoreInfo must be a pointer to a valid VkPhysicalDeviceExternalSemaphoreInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreInfo-parameter)"}, - {VALIDATION_ERROR_2be16a01, "The spec valid usage text states 'pExternalSemaphoreProperties must be a pointer to a VkExternalSemaphorePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreProperties-parameter)"}, - {VALIDATION_ERROR_2be27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2c016e01, "The spec valid usage text states 'pFeatures must be a pointer to a VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter)"}, + {VALIDATION_ERROR_2ae17c01, "The spec valid usage text states 'pHandle must be a valid pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-pHandle-parameter)"}, + {VALIDATION_ERROR_2ae3a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a valid pointer to a valid VkMemoryGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, + {VALIDATION_ERROR_2b000a5c, "The spec valid usage text states 'handleType must be a flag specified in VkExportMemoryAllocateInfoNV::handleTypes when allocating memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-01326)"}, + {VALIDATION_ERROR_2b005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-device-parameter)"}, + {VALIDATION_ERROR_2b009c01, "The spec valid usage text states 'handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-parameter)"}, + {VALIDATION_ERROR_2b009c03, "The spec valid usage text states 'handleType must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-handleType-requiredbitmask)"}, + {VALIDATION_ERROR_2b00c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-memory-parameter)"}, + {VALIDATION_ERROR_2b00c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-memory-parent)"}, + {VALIDATION_ERROR_2b017c01, "The spec valid usage text states 'pHandle must be a valid pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandleNV-pHandle-parameter)"}, + {VALIDATION_ERROR_2b200532, "The spec valid usage text states 'handle must be an external memory handle created outside of the Vulkan API.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handle-00665)"}, + {VALIDATION_ERROR_2b200534, "The spec valid usage text states 'handleType must not be one of the handle types defined as opaque.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-00666)"}, + {VALIDATION_ERROR_2b205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter)"}, + {VALIDATION_ERROR_2b209c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-parameter)"}, + {VALIDATION_ERROR_2b21b601, "The spec valid usage text states 'pMemoryWin32HandleProperties must be a valid pointer to a VkMemoryWin32HandlePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryWin32HandlePropertiesKHR-pMemoryWin32HandleProperties-parameter)"}, + {VALIDATION_ERROR_2b400009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-commonparent)"}, + {VALIDATION_ERROR_2b405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-device-parameter)"}, + {VALIDATION_ERROR_2b41ec01, "The spec valid usage text states 'pPresentationTimingCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimingCount-parameter)"}, + {VALIDATION_ERROR_2b41ee01, "The spec valid usage text states 'If the value referenced by pPresentationTimingCount is not 0, and pPresentationTimings is not NULL, pPresentationTimings must be a valid pointer to an array of pPresentationTimingCount VkPastPresentationTimingGOOGLE structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimings-parameter)"}, + {VALIDATION_ERROR_2b42f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parameter)"}, + {VALIDATION_ERROR_2b61f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayPlanePropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pProperties-parameter)"}, + {VALIDATION_ERROR_2b61f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2b627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2b81f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayPropertiesKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pProperties-parameter)"}, + {VALIDATION_ERROR_2b81f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2b827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ba16201, "The spec valid usage text states 'pExternalBufferInfo must be a valid pointer to a valid VkPhysicalDeviceExternalBufferInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferInfo-parameter)"}, + {VALIDATION_ERROR_2ba16401, "The spec valid usage text states 'pExternalBufferProperties must be a valid pointer to a VkExternalBufferPropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferProperties-parameter)"}, + {VALIDATION_ERROR_2ba27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2bc08201, "The spec valid usage text states 'externalHandleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-externalHandleType-parameter)"}, + {VALIDATION_ERROR_2bc09001, "The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-flags-parameter)"}, + {VALIDATION_ERROR_2bc09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-format-parameter)"}, + {VALIDATION_ERROR_2bc16601, "The spec valid usage text states 'pExternalImageFormatProperties must be a valid pointer to a VkExternalImageFormatPropertiesNV structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-pExternalImageFormatProperties-parameter)"}, + {VALIDATION_ERROR_2bc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2bc2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-tiling-parameter)"}, + {VALIDATION_ERROR_2bc30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-type-parameter)"}, + {VALIDATION_ERROR_2bc30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-parameter)"}, + {VALIDATION_ERROR_2bc30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-requiredbitmask)"}, + {VALIDATION_ERROR_2be16801, "The spec valid usage text states 'pExternalSemaphoreInfo must be a valid pointer to a valid VkPhysicalDeviceExternalSemaphoreInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreInfo-parameter)"}, + {VALIDATION_ERROR_2be16a01, "The spec valid usage text states 'pExternalSemaphoreProperties must be a valid pointer to a VkExternalSemaphorePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreProperties-parameter)"}, + {VALIDATION_ERROR_2be27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2c016e01, "The spec valid usage text states 'pFeatures must be a valid pointer to a VkPhysicalDeviceFeatures structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter)"}, {VALIDATION_ERROR_2c027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2c216e01, "The spec valid usage text states 'pFeatures must be a pointer to a VkPhysicalDeviceFeatures2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures2KHR-pFeatures-parameter)"}, - {VALIDATION_ERROR_2c227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2c216e01, "The spec valid usage text states 'pFeatures must be a valid pointer to a VkPhysicalDeviceFeatures2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures2KHR-pFeatures-parameter)"}, + {VALIDATION_ERROR_2c227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceFeatures2KHR-physicalDevice-parameter)"}, {VALIDATION_ERROR_2c409201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties-format-parameter)"}, - {VALIDATION_ERROR_2c417601, "The spec valid usage text states 'pFormatProperties must be a pointer to a VkFormatProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties-pFormatProperties-parameter)"}, + {VALIDATION_ERROR_2c417601, "The spec valid usage text states 'pFormatProperties must be a valid pointer to a VkFormatProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties-pFormatProperties-parameter)"}, {VALIDATION_ERROR_2c427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2c609201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-format-parameter)"}, - {VALIDATION_ERROR_2c617601, "The spec valid usage text states 'pFormatProperties must be a pointer to a VkFormatProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-pFormatProperties-parameter)"}, - {VALIDATION_ERROR_2c627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2c816e01, "The spec valid usage text states 'pFeatures must be a pointer to a VkDeviceGeneratedCommandsFeaturesNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pFeatures-parameter)"}, - {VALIDATION_ERROR_2c81a401, "The spec valid usage text states 'pLimits must be a pointer to a VkDeviceGeneratedCommandsLimitsNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pLimits-parameter)"}, - {VALIDATION_ERROR_2c827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2c609201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-format-parameter)"}, + {VALIDATION_ERROR_2c617601, "The spec valid usage text states 'pFormatProperties must be a valid pointer to a VkFormatProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-pFormatProperties-parameter)"}, + {VALIDATION_ERROR_2c627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceFormatProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2c816e01, "The spec valid usage text states 'pFeatures must be a valid pointer to a VkDeviceGeneratedCommandsFeaturesNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pFeatures-parameter)"}, + {VALIDATION_ERROR_2c81a401, "The spec valid usage text states 'pLimits must be a valid pointer to a VkDeviceGeneratedCommandsLimitsNVX structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pLimits-parameter)"}, + {VALIDATION_ERROR_2c827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-physicalDevice-parameter)"}, {VALIDATION_ERROR_2ca09001, "The spec valid usage text states 'flags must be a valid combination of VkImageCreateFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-flags-parameter)"}, {VALIDATION_ERROR_2ca09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-format-parameter)"}, - {VALIDATION_ERROR_2ca18401, "The spec valid usage text states 'pImageFormatProperties must be a pointer to a VkImageFormatProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-pImageFormatProperties-parameter)"}, + {VALIDATION_ERROR_2ca18401, "The spec valid usage text states 'pImageFormatProperties must be a valid pointer to a VkImageFormatProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-pImageFormatProperties-parameter)"}, {VALIDATION_ERROR_2ca27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter)"}, {VALIDATION_ERROR_2ca2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-parameter)"}, {VALIDATION_ERROR_2ca30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-type-parameter)"}, {VALIDATION_ERROR_2ca30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-usage-parameter)"}, {VALIDATION_ERROR_2ca30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask)"}, - {VALIDATION_ERROR_2cc18201, "The spec valid usage text states 'pImageFormatInfo must be a pointer to a valid VkPhysicalDeviceImageFormatInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatInfo-parameter)"}, - {VALIDATION_ERROR_2cc18401, "The spec valid usage text states 'pImageFormatProperties must be a pointer to a VkImageFormatProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatProperties-parameter)"}, - {VALIDATION_ERROR_2cc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ce1b001, "The spec valid usage text states 'pMemoryProperties must be a pointer to a VkPhysicalDeviceMemoryProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties-pMemoryProperties-parameter)"}, + {VALIDATION_ERROR_2cc18201, "The spec valid usage text states 'pImageFormatInfo must be a valid pointer to a valid VkPhysicalDeviceImageFormatInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatInfo-parameter)"}, + {VALIDATION_ERROR_2cc18401, "The spec valid usage text states 'pImageFormatProperties must be a valid pointer to a VkImageFormatProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatProperties-parameter)"}, + {VALIDATION_ERROR_2cc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ce1b001, "The spec valid usage text states 'pMemoryProperties must be a valid pointer to a VkPhysicalDeviceMemoryProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties-pMemoryProperties-parameter)"}, {VALIDATION_ERROR_2ce27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2d01b001, "The spec valid usage text states 'pMemoryProperties must be a pointer to a VkPhysicalDeviceMemoryProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties2KHR-pMemoryProperties-parameter)"}, - {VALIDATION_ERROR_2d027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2d2009e2, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-queueFamilyIndex-01265)"}, - {VALIDATION_ERROR_2d203001, "The spec valid usage text states 'connection must be a pointer to a MirConnection value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-connection-parameter)"}, - {VALIDATION_ERROR_2d227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2d400009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-commonparent)"}, - {VALIDATION_ERROR_2d420a01, "The spec valid usage text states 'pRectCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRectCount-parameter)"}, - {VALIDATION_ERROR_2d420e01, "The spec valid usage text states 'If the value referenced by pRectCount is not 0, and pRects is not NULL, pRects must be a pointer to an array of pRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRects-parameter)"}, - {VALIDATION_ERROR_2d427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2d42ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-surface-parameter)"}, - {VALIDATION_ERROR_2d61f401, "The spec valid usage text states 'pProperties must be a pointer to a VkPhysicalDeviceProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_2d01b001, "The spec valid usage text states 'pMemoryProperties must be a valid pointer to a VkPhysicalDeviceMemoryProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties2KHR-pMemoryProperties-parameter)"}, + {VALIDATION_ERROR_2d027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMemoryProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2d2009e2, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-queueFamilyIndex-01265)"}, + {VALIDATION_ERROR_2d203001, "The spec valid usage text states 'connection must be a valid pointer to a MirConnection value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-connection-parameter)"}, + {VALIDATION_ERROR_2d227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2d400009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-commonparent)"}, + {VALIDATION_ERROR_2d420a01, "The spec valid usage text states 'pRectCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRectCount-parameter)"}, + {VALIDATION_ERROR_2d420e01, "The spec valid usage text states 'If the value referenced by pRectCount is not 0, and pRects is not NULL, pRects must be a valid pointer to an array of pRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRects-parameter)"}, + {VALIDATION_ERROR_2d427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2d42ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDevicePresentRectanglesKHX-surface-parameter)"}, + {VALIDATION_ERROR_2d61f401, "The spec valid usage text states 'pProperties must be a valid pointer to a VkPhysicalDeviceProperties structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties-pProperties-parameter)"}, {VALIDATION_ERROR_2d627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2d81f401, "The spec valid usage text states 'pProperties must be a pointer to a VkPhysicalDeviceProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties2KHR-pProperties-parameter)"}, - {VALIDATION_ERROR_2d827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2da20001, "The spec valid usage text states 'If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyProperties-parameter)"}, - {VALIDATION_ERROR_2da20201, "The spec valid usage text states 'pQueueFamilyPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyPropertyCount-parameter)"}, + {VALIDATION_ERROR_2d81f401, "The spec valid usage text states 'pProperties must be a valid pointer to a VkPhysicalDeviceProperties2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties2KHR-pProperties-parameter)"}, + {VALIDATION_ERROR_2d827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2da20001, "The spec valid usage text states 'If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a valid pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyProperties-parameter)"}, + {VALIDATION_ERROR_2da20201, "The spec valid usage text states 'pQueueFamilyPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyPropertyCount-parameter)"}, {VALIDATION_ERROR_2da27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2dc20001, "The spec valid usage text states 'If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyProperties-parameter)"}, - {VALIDATION_ERROR_2dc20201, "The spec valid usage text states 'pQueueFamilyPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyPropertyCount-parameter)"}, - {VALIDATION_ERROR_2dc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2dc20001, "The spec valid usage text states 'If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a valid pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyProperties-parameter)"}, + {VALIDATION_ERROR_2dc20201, "The spec valid usage text states 'pQueueFamilyPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyPropertyCount-parameter)"}, + {VALIDATION_ERROR_2dc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-physicalDevice-parameter)"}, {VALIDATION_ERROR_2de0088c, "The spec valid usage text states 'samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, type, tiling, and usage equal to those in this command and flags equal to the value that is set in VkImageCreateInfo::flags when the image is created' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-01094)"}, {VALIDATION_ERROR_2de09201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-format-parameter)"}, - {VALIDATION_ERROR_2de1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkSparseImageFormatProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pProperties-parameter)"}, - {VALIDATION_ERROR_2de1f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2de1f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkSparseImageFormatProperties structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pProperties-parameter)"}, + {VALIDATION_ERROR_2de1f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pPropertyCount-parameter)"}, {VALIDATION_ERROR_2de27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter)"}, {VALIDATION_ERROR_2de2b401, "The spec valid usage text states 'samples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-parameter)"}, {VALIDATION_ERROR_2de2fa01, "The spec valid usage text states 'tiling must be a valid VkImageTiling value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-tiling-parameter)"}, {VALIDATION_ERROR_2de30401, "The spec valid usage text states 'type must be a valid VkImageType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-type-parameter)"}, {VALIDATION_ERROR_2de30601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-parameter)"}, {VALIDATION_ERROR_2de30603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-requiredbitmask)"}, - {VALIDATION_ERROR_2e017401, "The spec valid usage text states 'pFormatInfo must be a pointer to a valid VkPhysicalDeviceSparseImageFormatInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pFormatInfo-parameter)"}, - {VALIDATION_ERROR_2e01f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkSparseImageFormatProperties2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pProperties-parameter)"}, - {VALIDATION_ERROR_2e01f601, "The spec valid usage text states 'pPropertyCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pPropertyCount-parameter)"}, - {VALIDATION_ERROR_2e027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2e200009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent)"}, - {VALIDATION_ERROR_2e224a01, "The spec valid usage text states 'pSurfaceCapabilities must be a pointer to a VkSurfaceCapabilities2EXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-pSurfaceCapabilities-parameter)"}, - {VALIDATION_ERROR_2e227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2e22ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter)"}, - {VALIDATION_ERROR_2e424a01, "The spec valid usage text states 'pSurfaceCapabilities must be a pointer to a VkSurfaceCapabilities2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceCapabilities-parameter)"}, - {VALIDATION_ERROR_2e425001, "The spec valid usage text states 'pSurfaceInfo must be a pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-parameter)"}, - {VALIDATION_ERROR_2e427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2e600009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent)"}, - {VALIDATION_ERROR_2e624a01, "The spec valid usage text states 'pSurfaceCapabilities must be a pointer to a VkSurfaceCapabilitiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-pSurfaceCapabilities-parameter)"}, - {VALIDATION_ERROR_2e627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2e62ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter)"}, - {VALIDATION_ERROR_2e824c01, "The spec valid usage text states 'pSurfaceFormatCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormatCount-parameter)"}, - {VALIDATION_ERROR_2e824e01, "The spec valid usage text states 'If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a pointer to an array of pSurfaceFormatCount VkSurfaceFormat2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormats-parameter)"}, - {VALIDATION_ERROR_2e825001, "The spec valid usage text states 'pSurfaceInfo must be a pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-parameter)"}, - {VALIDATION_ERROR_2e827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ea00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent)"}, - {VALIDATION_ERROR_2ea24c01, "The spec valid usage text states 'pSurfaceFormatCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormatCount-parameter)"}, - {VALIDATION_ERROR_2ea24e01, "The spec valid usage text states 'If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a pointer to an array of pSurfaceFormatCount VkSurfaceFormatKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormats-parameter)"}, - {VALIDATION_ERROR_2ea27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ea2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter)"}, - {VALIDATION_ERROR_2ec00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent)"}, - {VALIDATION_ERROR_2ec1e801, "The spec valid usage text states 'pPresentModeCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModeCount-parameter)"}, - {VALIDATION_ERROR_2ec1ea01, "The spec valid usage text states 'If the value referenced by pPresentModeCount is not 0, and pPresentModes is not NULL, pPresentModes must be a pointer to an array of pPresentModeCount VkPresentModeKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModes-parameter)"}, - {VALIDATION_ERROR_2ec27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ec2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-parameter)"}, - {VALIDATION_ERROR_2ee00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent)"}, - {VALIDATION_ERROR_2ee009ea, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-queueFamilyIndex-01269)"}, - {VALIDATION_ERROR_2ee24601, "The spec valid usage text states 'pSupported must be a pointer to a VkBool32 value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-pSupported-parameter)"}, - {VALIDATION_ERROR_2ee27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2ee2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter)"}, - {VALIDATION_ERROR_2f000a34, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-queueFamilyIndex-01306)"}, - {VALIDATION_ERROR_2f006001, "The spec valid usage text states 'display must be a pointer to a wl_display value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-display-parameter)"}, - {VALIDATION_ERROR_2f027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2f200a3a, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-queueFamilyIndex-01309)"}, - {VALIDATION_ERROR_2f227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2f400a40, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-queueFamilyIndex-01312)"}, - {VALIDATION_ERROR_2f403001, "The spec valid usage text states 'connection must be a pointer to a xcb_connection_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-connection-parameter)"}, - {VALIDATION_ERROR_2f427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2f600a46, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-queueFamilyIndex-01315)"}, - {VALIDATION_ERROR_2f606601, "The spec valid usage text states 'dpy must be a pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-dpy-parameter)"}, - {VALIDATION_ERROR_2f627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2e017401, "The spec valid usage text states 'pFormatInfo must be a valid pointer to a valid VkPhysicalDeviceSparseImageFormatInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pFormatInfo-parameter)"}, + {VALIDATION_ERROR_2e01f401, "The spec valid usage text states 'If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkSparseImageFormatProperties2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pProperties-parameter)"}, + {VALIDATION_ERROR_2e01f601, "The spec valid usage text states 'pPropertyCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pPropertyCount-parameter)"}, + {VALIDATION_ERROR_2e027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2e200009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent)"}, + {VALIDATION_ERROR_2e224a01, "The spec valid usage text states 'pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilities2EXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-pSurfaceCapabilities-parameter)"}, + {VALIDATION_ERROR_2e227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2e22ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter)"}, + {VALIDATION_ERROR_2e424a01, "The spec valid usage text states 'pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilities2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceCapabilities-parameter)"}, + {VALIDATION_ERROR_2e425001, "The spec valid usage text states 'pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-parameter)"}, + {VALIDATION_ERROR_2e427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2e600009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent)"}, + {VALIDATION_ERROR_2e624a01, "The spec valid usage text states 'pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilitiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-pSurfaceCapabilities-parameter)"}, + {VALIDATION_ERROR_2e627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2e62ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter)"}, + {VALIDATION_ERROR_2e824c01, "The spec valid usage text states 'pSurfaceFormatCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormatCount-parameter)"}, + {VALIDATION_ERROR_2e824e01, "The spec valid usage text states 'If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a valid pointer to an array of pSurfaceFormatCount VkSurfaceFormat2KHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormats-parameter)"}, + {VALIDATION_ERROR_2e825001, "The spec valid usage text states 'pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-parameter)"}, + {VALIDATION_ERROR_2e827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ea00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent)"}, + {VALIDATION_ERROR_2ea24c01, "The spec valid usage text states 'pSurfaceFormatCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormatCount-parameter)"}, + {VALIDATION_ERROR_2ea24e01, "The spec valid usage text states 'If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a valid pointer to an array of pSurfaceFormatCount VkSurfaceFormatKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormats-parameter)"}, + {VALIDATION_ERROR_2ea27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ea2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter)"}, + {VALIDATION_ERROR_2ec00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent)"}, + {VALIDATION_ERROR_2ec1e801, "The spec valid usage text states 'pPresentModeCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModeCount-parameter)"}, + {VALIDATION_ERROR_2ec1ea01, "The spec valid usage text states 'If the value referenced by pPresentModeCount is not 0, and pPresentModes is not NULL, pPresentModes must be a valid pointer to an array of pPresentModeCount VkPresentModeKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModes-parameter)"}, + {VALIDATION_ERROR_2ec27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ec2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-parameter)"}, + {VALIDATION_ERROR_2ee00009, "The spec valid usage text states 'Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent)"}, + {VALIDATION_ERROR_2ee009ea, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-queueFamilyIndex-01269)"}, + {VALIDATION_ERROR_2ee24601, "The spec valid usage text states 'pSupported must be a valid pointer to a VkBool32 value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-pSupported-parameter)"}, + {VALIDATION_ERROR_2ee27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2ee2ec01, "The spec valid usage text states 'surface must be a valid VkSurfaceKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter)"}, + {VALIDATION_ERROR_2f000a34, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-queueFamilyIndex-01306)"}, + {VALIDATION_ERROR_2f006001, "The spec valid usage text states 'display must be a valid pointer to a wl_display value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-display-parameter)"}, + {VALIDATION_ERROR_2f027a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2f200a3a, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-queueFamilyIndex-01309)"}, + {VALIDATION_ERROR_2f227a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2f400a40, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-queueFamilyIndex-01312)"}, + {VALIDATION_ERROR_2f403001, "The spec valid usage text states 'connection must be a valid pointer to a xcb_connection_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-connection-parameter)"}, + {VALIDATION_ERROR_2f427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2f600a46, "The spec valid usage text states 'queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-queueFamilyIndex-01315)"}, + {VALIDATION_ERROR_2f606601, "The spec valid usage text states 'dpy must be a valid pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-dpy-parameter)"}, + {VALIDATION_ERROR_2f627a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter)"}, {VALIDATION_ERROR_2f805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-device-parameter)"}, - {VALIDATION_ERROR_2f812201, "The spec valid usage text states 'If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a pointer to an array of pDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pData-parameter)"}, - {VALIDATION_ERROR_2f812401, "The spec valid usage text states 'pDataSize must be a pointer to a size_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pDataSize-parameter)"}, + {VALIDATION_ERROR_2f812201, "The spec valid usage text states 'If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a valid pointer to an array of pDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pData-parameter)"}, + {VALIDATION_ERROR_2f812401, "The spec valid usage text states 'pDataSize must be a valid pointer to a size_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pDataSize-parameter)"}, {VALIDATION_ERROR_2f828001, "The spec valid usage text states 'pipelineCache must be a valid VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pipelineCache-parameter)"}, {VALIDATION_ERROR_2f828007, "The spec valid usage text states 'pipelineCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPipelineCacheData-pipelineCache-parent)"}, {VALIDATION_ERROR_2fa0065a, "The spec valid usage text states 'firstQuery must be less than the number of queries in queryPool' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-firstQuery-00813)"}, @@ -6855,18 +7147,18 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_2fa03c1b, "The spec valid usage text states 'dataSize must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-dataSize-arraylength)"}, {VALIDATION_ERROR_2fa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-device-parameter)"}, {VALIDATION_ERROR_2fa09001, "The spec valid usage text states 'flags must be a valid combination of VkQueryResultFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-flags-parameter)"}, - {VALIDATION_ERROR_2fa12201, "The spec valid usage text states 'pData must be a pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-pData-parameter)"}, + {VALIDATION_ERROR_2fa12201, "The spec valid usage text states 'pData must be a valid pointer to an array of dataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-pData-parameter)"}, {VALIDATION_ERROR_2fa29801, "The spec valid usage text states 'queryPool must be a valid VkQueryPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-queryPool-parameter)"}, {VALIDATION_ERROR_2fa29807, "The spec valid usage text states 'queryPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetQueryPoolResults-queryPool-parent)"}, - {VALIDATION_ERROR_2fc06601, "The spec valid usage text states 'dpy must be a pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-dpy-parameter)"}, - {VALIDATION_ERROR_2fc14801, "The spec valid usage text states 'pDisplay must be a pointer to a VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-pDisplay-parameter)"}, - {VALIDATION_ERROR_2fc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter)"}, - {VALIDATION_ERROR_2fe00009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-commonparent)"}, - {VALIDATION_ERROR_2fe05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter)"}, - {VALIDATION_ERROR_2fe15001, "The spec valid usage text states 'pDisplayTimingProperties must be a pointer to a VkRefreshCycleDurationGOOGLE structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-pDisplayTimingProperties-parameter)"}, - {VALIDATION_ERROR_2fe2f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parameter)"}, + {VALIDATION_ERROR_2fc06601, "The spec valid usage text states 'dpy must be a valid pointer to a Display value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-dpy-parameter)"}, + {VALIDATION_ERROR_2fc14801, "The spec valid usage text states 'pDisplay must be a valid pointer to a VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-pDisplay-parameter)"}, + {VALIDATION_ERROR_2fc27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter)"}, + {VALIDATION_ERROR_2fe00009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-commonparent)"}, + {VALIDATION_ERROR_2fe05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter)"}, + {VALIDATION_ERROR_2fe15001, "The spec valid usage text states 'pDisplayTimingProperties must be a valid pointer to a VkRefreshCycleDurationGOOGLE structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-pDisplayTimingProperties-parameter)"}, + {VALIDATION_ERROR_2fe2f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parameter)"}, {VALIDATION_ERROR_30005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRenderAreaGranularity-device-parameter)"}, - {VALIDATION_ERROR_30017a01, "The spec valid usage text states 'pGranularity must be a pointer to a VkExtent2D structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRenderAreaGranularity-pGranularity-parameter)"}, + {VALIDATION_ERROR_30017a01, "The spec valid usage text states 'pGranularity must be a valid pointer to a VkExtent2D structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRenderAreaGranularity-pGranularity-parameter)"}, {VALIDATION_ERROR_3002ae01, "The spec valid usage text states 'renderPass must be a valid VkRenderPass handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRenderAreaGranularity-renderPass-parameter)"}, {VALIDATION_ERROR_3002ae07, "The spec valid usage text states 'renderPass must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetRenderAreaGranularity-renderPass-parent)"}, {VALIDATION_ERROR_302008d8, "The spec valid usage text states 'handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when semaphore's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-handleType-01132)"}, @@ -6874,46 +7166,46 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_302008dc, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-handleType-01134)"}, {VALIDATION_ERROR_302008de, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated semaphore signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-handleType-01135)"}, {VALIDATION_ERROR_302008e0, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-handleType-01136)"}, - {VALIDATION_ERROR_30205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-device-parameter)"}, + {VALIDATION_ERROR_30205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-device-parameter)"}, {VALIDATION_ERROR_30209c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-handleType-parameter)"}, - {VALIDATION_ERROR_30216c01, "The spec valid usage text states 'pFd must be a pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-pFd-parameter)"}, + {VALIDATION_ERROR_30216c01, "The spec valid usage text states 'pFd must be a valid pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-pFd-parameter)"}, {VALIDATION_ERROR_3022b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-semaphore-parameter)"}, {VALIDATION_ERROR_3022b807, "The spec valid usage text states 'semaphore must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-semaphore-parent)"}, - {VALIDATION_ERROR_30239e01, "The spec valid usage text states 'pGetFdInfo must be a pointer to a valid VkSemaphoreGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-pGetFdInfo-parameter)"}, + {VALIDATION_ERROR_30239e01, "The spec valid usage text states 'pGetFdInfo must be a valid pointer to a valid VkSemaphoreGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreFdKHR-pGetFdInfo-parameter)"}, {VALIDATION_ERROR_304008cc, "The spec valid usage text states 'handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when the semaphore's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-01126)"}, {VALIDATION_ERROR_304008ce, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetSemaphoreWin32HandleKHR must be called no more than once for each valid unique combination of semaphore and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-01127)"}, {VALIDATION_ERROR_304008d0, "The spec valid usage text states 'semaphore must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload's handle type was included in VkExternalSemaphorePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-semaphore-01128)"}, {VALIDATION_ERROR_304008d2, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-01129)"}, {VALIDATION_ERROR_304008d4, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated semaphore signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-01130)"}, {VALIDATION_ERROR_304008d6, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-01131)"}, - {VALIDATION_ERROR_30405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-device-parameter)"}, + {VALIDATION_ERROR_30405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-device-parameter)"}, {VALIDATION_ERROR_30409c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-handleType-parameter)"}, - {VALIDATION_ERROR_30417c01, "The spec valid usage text states 'pHandle must be a pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-pHandle-parameter)"}, + {VALIDATION_ERROR_30417c01, "The spec valid usage text states 'pHandle must be a valid pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-pHandle-parameter)"}, {VALIDATION_ERROR_3042b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-semaphore-parameter)"}, {VALIDATION_ERROR_3042b807, "The spec valid usage text states 'semaphore must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-semaphore-parent)"}, - {VALIDATION_ERROR_3043a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a pointer to a valid VkSemaphoreGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, - {VALIDATION_ERROR_30600009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-commonparent)"}, - {VALIDATION_ERROR_306009ba, "The spec valid usage text states 'One or more present commands on swapchain must have been processed by the presentation engine.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-swapchain-01245)"}, - {VALIDATION_ERROR_30603601, "The spec valid usage text states 'counter must be a valid VkSurfaceCounterFlagBitsEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-counter-parameter)"}, - {VALIDATION_ERROR_30605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-device-parameter)"}, - {VALIDATION_ERROR_30611c01, "The spec valid usage text states 'pCounterValue must be a pointer to a uint64_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-pCounterValue-parameter)"}, - {VALIDATION_ERROR_3062f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-swapchain-parameter)"}, - {VALIDATION_ERROR_30800009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-commonparent)"}, - {VALIDATION_ERROR_30805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-device-parameter)"}, - {VALIDATION_ERROR_30825401, "The spec valid usage text states 'pSwapchainImageCount must be a pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-pSwapchainImageCount-parameter)"}, - {VALIDATION_ERROR_30825601, "The spec valid usage text states 'If the value referenced by pSwapchainImageCount is not 0, and pSwapchainImages is not NULL, pSwapchainImages must be a pointer to an array of pSwapchainImageCount VkImage handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-pSwapchainImages-parameter)"}, - {VALIDATION_ERROR_3082f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-swapchain-parameter)"}, - {VALIDATION_ERROR_30a00009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-commonparent)"}, - {VALIDATION_ERROR_30a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-device-parameter)"}, - {VALIDATION_ERROR_30a2f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-swapchain-parameter)"}, - {VALIDATION_ERROR_30c008ec, "The spec valid usage text states 'semaphore must not be associated with any queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-semaphore-01142)"}, - {VALIDATION_ERROR_30c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-device-parameter)"}, - {VALIDATION_ERROR_30c18e01, "The spec valid usage text states 'pImportSemaphoreFdInfo must be a pointer to a valid VkImportSemaphoreFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-pImportSemaphoreFdInfo-parameter)"}, - {VALIDATION_ERROR_30e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportSemaphoreWin32HandleKHR-device-parameter)"}, - {VALIDATION_ERROR_30e19001, "The spec valid usage text states 'pImportSemaphoreWin32HandleInfo must be a pointer to a valid VkImportSemaphoreWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportSemaphoreWin32HandleKHR-pImportSemaphoreWin32HandleInfo-parameter)"}, + {VALIDATION_ERROR_3043a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a valid pointer to a valid VkSemaphoreGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSemaphoreWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, + {VALIDATION_ERROR_30600009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-commonparent)"}, + {VALIDATION_ERROR_306009ba, "The spec valid usage text states 'One or more present commands on swapchain must have been processed by the presentation engine.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-swapchain-01245)"}, + {VALIDATION_ERROR_30603601, "The spec valid usage text states 'counter must be a valid VkSurfaceCounterFlagBitsEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-counter-parameter)"}, + {VALIDATION_ERROR_30605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-device-parameter)"}, + {VALIDATION_ERROR_30611c01, "The spec valid usage text states 'pCounterValue must be a valid pointer to a uint64_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-pCounterValue-parameter)"}, + {VALIDATION_ERROR_3062f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainCounterEXT-swapchain-parameter)"}, + {VALIDATION_ERROR_30800009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-commonparent)"}, + {VALIDATION_ERROR_30805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-device-parameter)"}, + {VALIDATION_ERROR_30825401, "The spec valid usage text states 'pSwapchainImageCount must be a valid pointer to a uint32_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-pSwapchainImageCount-parameter)"}, + {VALIDATION_ERROR_30825601, "The spec valid usage text states 'If the value referenced by pSwapchainImageCount is not 0, and pSwapchainImages is not NULL, pSwapchainImages must be a valid pointer to an array of pSwapchainImageCount VkImage handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-pSwapchainImages-parameter)"}, + {VALIDATION_ERROR_3082f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainImagesKHR-swapchain-parameter)"}, + {VALIDATION_ERROR_30a00009, "The spec valid usage text states 'Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-commonparent)"}, + {VALIDATION_ERROR_30a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-device-parameter)"}, + {VALIDATION_ERROR_30a2f001, "The spec valid usage text states 'swapchain must be a valid VkSwapchainKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetSwapchainStatusKHR-swapchain-parameter)"}, + {VALIDATION_ERROR_30c008ec, "The spec valid usage text states 'semaphore must not be associated with any queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-semaphore-01142)"}, + {VALIDATION_ERROR_30c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-device-parameter)"}, + {VALIDATION_ERROR_30c18e01, "The spec valid usage text states 'pImportSemaphoreFdInfo must be a valid pointer to a valid VkImportSemaphoreFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportSemaphoreFdKHR-pImportSemaphoreFdInfo-parameter)"}, + {VALIDATION_ERROR_30e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportSemaphoreWin32HandleKHR-device-parameter)"}, + {VALIDATION_ERROR_30e19001, "The spec valid usage text states 'pImportSemaphoreWin32HandleInfo must be a valid pointer to a valid VkImportSemaphoreWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportSemaphoreWin32HandleKHR-pImportSemaphoreWin32HandleInfo-parameter)"}, {VALIDATION_ERROR_31005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkInvalidateMappedMemoryRanges-device-parameter)"}, {VALIDATION_ERROR_3100c81b, "The spec valid usage text states 'memoryRangeCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkInvalidateMappedMemoryRanges-memoryRangeCount-arraylength)"}, - {VALIDATION_ERROR_3101b201, "The spec valid usage text states 'pMemoryRanges must be a pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkInvalidateMappedMemoryRanges-pMemoryRanges-parameter)"}, + {VALIDATION_ERROR_3101b201, "The spec valid usage text states 'pMemoryRanges must be a valid pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkInvalidateMappedMemoryRanges-pMemoryRanges-parameter)"}, {VALIDATION_ERROR_3120054c, "The spec valid usage text states 'memory must not be currently mapped' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-memory-00678)"}, {VALIDATION_ERROR_3120054e, "The spec valid usage text states 'offset must be less than the size of memory' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-offset-00679)"}, {VALIDATION_ERROR_31200550, "The spec valid usage text states 'If size is not equal to VK_WHOLE_SIZE, size must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-size-00680)"}, @@ -6924,12 +7216,12 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_31209005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-flags-zerobitmask)"}, {VALIDATION_ERROR_3120c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-memory-parameter)"}, {VALIDATION_ERROR_3120c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-memory-parent)"}, - {VALIDATION_ERROR_31228c01, "The spec valid usage text states 'ppData must be a pointer to a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-ppData-parameter)"}, + {VALIDATION_ERROR_31228c01, "The spec valid usage text states 'ppData must be a valid pointer to a pointer value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMapMemory-ppData-parameter)"}, {VALIDATION_ERROR_31400604, "The spec valid usage text states 'dstCache must not appear in the list of source caches' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-dstCache-00770)"}, {VALIDATION_ERROR_31405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-device-parameter)"}, {VALIDATION_ERROR_31406e01, "The spec valid usage text states 'dstCache must be a valid VkPipelineCache handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-dstCache-parameter)"}, {VALIDATION_ERROR_31406e07, "The spec valid usage text states 'dstCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-dstCache-parent)"}, - {VALIDATION_ERROR_31423c01, "The spec valid usage text states 'pSrcCaches must be a pointer to an array of srcCacheCount valid VkPipelineCache handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-pSrcCaches-parameter)"}, + {VALIDATION_ERROR_31423c01, "The spec valid usage text states 'pSrcCaches must be a valid pointer to an array of srcCacheCount valid VkPipelineCache handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-pSrcCaches-parameter)"}, {VALIDATION_ERROR_31423c07, "The spec valid usage text states 'Each element of pSrcCaches must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-pSrcCaches-parent)"}, {VALIDATION_ERROR_3142ca1b, "The spec valid usage text states 'srcCacheCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergePipelineCaches-srcCacheCount-arraylength)"}, {VALIDATION_ERROR_31600009, "The spec valid usage text states 'Both of fence, and queue that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-commonparent)"}, @@ -6940,14 +7232,14 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_316008b8, "The spec valid usage text states 'When a semaphore unsignal operation defined by any element of the pWaitSemaphores member of any element of pBindInfo executes on queue, no other queue must be waiting on the same semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-pWaitSemaphores-01116)"}, {VALIDATION_ERROR_316008ba, "The spec valid usage text states 'All elements of the pWaitSemaphores member of all elements of pBindInfo must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-pWaitSemaphores-01117)"}, {VALIDATION_ERROR_31608801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-fence-parameter)"}, - {VALIDATION_ERROR_3160f801, "The spec valid usage text states 'If bindInfoCount is not 0, pBindInfo must be a pointer to an array of bindInfoCount valid VkBindSparseInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-pBindInfo-parameter)"}, + {VALIDATION_ERROR_3160f801, "The spec valid usage text states 'If bindInfoCount is not 0, pBindInfo must be a valid pointer to an array of bindInfoCount valid VkBindSparseInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-pBindInfo-parameter)"}, {VALIDATION_ERROR_31629c01, "The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueBindSparse-queue-parameter)"}, - {VALIDATION_ERROR_31800a18, "The spec valid usage text states 'Each element of pSwapchains member of pPresentInfo must be a swapchain that is created for a surface for which presentation is supported from queue as determined using a call to vkGetPhysicalDeviceSurfaceSupportKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueuePresentKHR-pSwapchains-01292)"}, + {VALIDATION_ERROR_31800a18, "The spec valid usage text states 'Each element of pSwapchains member of pPresentInfo must be a swapchain that is created for a surface for which presentation is supported from queue as determined using a call to vkGetPhysicalDeviceSurfaceSupportKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-pSwapchains-01292)"}, {VALIDATION_ERROR_31800a1a, "The spec valid usage text states 'If more than one member of pSwapchains was created from a display surface, all display surfaces referenced that refer to the same display must use the same display mode' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-pSwapchains-01293)"}, - {VALIDATION_ERROR_31800a1c, "The spec valid usage text states 'When a semaphore unsignal operation defined by the elements of the pWaitSemaphores member of pPresentInfo executes on queue, no other queue must be waiting on the same semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-01294)"}, - {VALIDATION_ERROR_31800a1e, "The spec valid usage text states 'All elements of the pWaitSemaphores member of pPresentInfo must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-01295)"}, - {VALIDATION_ERROR_3181e601, "The spec valid usage text states 'pPresentInfo must be a pointer to a valid VkPresentInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueuePresentKHR-pPresentInfo-parameter)"}, - {VALIDATION_ERROR_31829c01, "The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueuePresentKHR-queue-parameter)"}, + {VALIDATION_ERROR_31800a1c, "The spec valid usage text states 'When a semaphore unsignal operation defined by the elements of the pWaitSemaphores member of pPresentInfo executes on queue, no other queue must be waiting on the same semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-01294)"}, + {VALIDATION_ERROR_31800a1e, "The spec valid usage text states 'All elements of the pWaitSemaphores member of pPresentInfo must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-pWaitSemaphores-01295)"}, + {VALIDATION_ERROR_3181e601, "The spec valid usage text states 'pPresentInfo must be a valid pointer to a valid VkPresentInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-pPresentInfo-parameter)"}, + {VALIDATION_ERROR_31829c01, "The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkQueuePresentKHR-queue-parameter)"}, {VALIDATION_ERROR_31a00009, "The spec valid usage text states 'Both of fence, and queue that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-commonparent)"}, {VALIDATION_ERROR_31a0007e, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be unsignaled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-fence-00063)"}, {VALIDATION_ERROR_31a00080, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must not be associated with any other queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-fence-00064)"}, @@ -6962,29 +7254,29 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_31a00092, "The spec valid usage text states 'If any secondary command buffers recorded into any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00073)"}, {VALIDATION_ERROR_31a00094, "The spec valid usage text states 'Each element of the pCommandBuffers member of each element of pSubmits must have been allocated from a VkCommandPool that was created for the same queue family queue belongs to.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00074)"}, {VALIDATION_ERROR_31a08801, "The spec valid usage text states 'If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-fence-parameter)"}, - {VALIDATION_ERROR_31a24001, "The spec valid usage text states 'If submitCount is not 0, pSubmits must be a pointer to an array of submitCount valid VkSubmitInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pSubmits-parameter)"}, + {VALIDATION_ERROR_31a24001, "The spec valid usage text states 'If submitCount is not 0, pSubmits must be a valid pointer to an array of submitCount valid VkSubmitInfo structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-pSubmits-parameter)"}, {VALIDATION_ERROR_31a29c01, "The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueSubmit-queue-parameter)"}, {VALIDATION_ERROR_31c29c01, "The spec valid usage text states 'queue must be a valid VkQueue handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkQueueWaitIdle-queue-parameter)"}, - {VALIDATION_ERROR_31e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-device-parameter)"}, - {VALIDATION_ERROR_31e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pAllocator-parameter)"}, - {VALIDATION_ERROR_31e13a01, "The spec valid usage text states 'pDeviceEventInfo must be a pointer to a valid VkDeviceEventInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pDeviceEventInfo-parameter)"}, - {VALIDATION_ERROR_31e17001, "The spec valid usage text states 'pFence must be a pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pFence-parameter)"}, - {VALIDATION_ERROR_32005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-device-parameter)"}, - {VALIDATION_ERROR_32006001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-display-parameter)"}, - {VALIDATION_ERROR_3200ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pAllocator-parameter)"}, - {VALIDATION_ERROR_32014c01, "The spec valid usage text states 'pDisplayEventInfo must be a pointer to a valid VkDisplayEventInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pDisplayEventInfo-parameter)"}, - {VALIDATION_ERROR_32017001, "The spec valid usage text states 'pFence must be a pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pFence-parameter)"}, - {VALIDATION_ERROR_32200aa8, "The spec valid usage text states 'The contents of pObjectTableEntry must yield plausible bindings supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectTableEntry-01364)"}, - {VALIDATION_ERROR_32200aaa, "The spec valid usage text states 'At any pObjectIndices there must not be a registered resource already.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-01365)"}, - {VALIDATION_ERROR_32200aac, "The spec valid usage text states 'Any value inside pObjectIndices must be below the appropriate VkObjectTableCreateInfoNVX::pObjectEntryCounts limits provided at objectTable creation time.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-01366)"}, - {VALIDATION_ERROR_32205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-device-parameter)"}, - {VALIDATION_ERROR_3220d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectCount-arraylength)"}, - {VALIDATION_ERROR_3220d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectTable-parameter)"}, - {VALIDATION_ERROR_3220d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectTable-parent)"}, - {VALIDATION_ERROR_3221cc01, "The spec valid usage text states 'pObjectIndices must be a pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-parameter)"}, - {VALIDATION_ERROR_32229201, "The spec valid usage text states 'ppObjectTableEntries must be a pointer to an array of objectCount valid VkObjectTableEntryNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkRegisterObjectsNVX-ppObjectTableEntries-parameter)"}, - {VALIDATION_ERROR_32406001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkReleaseDisplayEXT-display-parameter)"}, - {VALIDATION_ERROR_32427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkReleaseDisplayEXT-physicalDevice-parameter)"}, + {VALIDATION_ERROR_31e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-device-parameter)"}, + {VALIDATION_ERROR_31e0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_31e13a01, "The spec valid usage text states 'pDeviceEventInfo must be a valid pointer to a valid VkDeviceEventInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pDeviceEventInfo-parameter)"}, + {VALIDATION_ERROR_31e17001, "The spec valid usage text states 'pFence must be a valid pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDeviceEventEXT-pFence-parameter)"}, + {VALIDATION_ERROR_32005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-device-parameter)"}, + {VALIDATION_ERROR_32006001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-display-parameter)"}, + {VALIDATION_ERROR_3200ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_32014c01, "The spec valid usage text states 'pDisplayEventInfo must be a valid pointer to a valid VkDisplayEventInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pDisplayEventInfo-parameter)"}, + {VALIDATION_ERROR_32017001, "The spec valid usage text states 'pFence must be a valid pointer to a VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterDisplayEventEXT-pFence-parameter)"}, + {VALIDATION_ERROR_32200aa8, "The spec valid usage text states 'The contents of pObjectTableEntry must yield plausible bindings supported by the device.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectTableEntry-01364)"}, + {VALIDATION_ERROR_32200aaa, "The spec valid usage text states 'At any pObjectIndices there must not be a registered resource already.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-01365)"}, + {VALIDATION_ERROR_32200aac, "The spec valid usage text states 'Any value inside pObjectIndices must be below the appropriate VkObjectTableCreateInfoNVX::pObjectEntryCounts limits provided at objectTable creation time.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-01366)"}, + {VALIDATION_ERROR_32205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-device-parameter)"}, + {VALIDATION_ERROR_3220d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectCount-arraylength)"}, + {VALIDATION_ERROR_3220d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectTable-parameter)"}, + {VALIDATION_ERROR_3220d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-objectTable-parent)"}, + {VALIDATION_ERROR_3221cc01, "The spec valid usage text states 'pObjectIndices must be a valid pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-pObjectIndices-parameter)"}, + {VALIDATION_ERROR_32229201, "The spec valid usage text states 'ppObjectTableEntries must be a valid pointer to an array of objectCount valid VkObjectTableEntryNVX structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkRegisterObjectsNVX-ppObjectTableEntries-parameter)"}, + {VALIDATION_ERROR_32406001, "The spec valid usage text states 'display must be a valid VkDisplayKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkReleaseDisplayEXT-display-parameter)"}, + {VALIDATION_ERROR_32427a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkReleaseDisplayEXT-physicalDevice-parameter)"}, {VALIDATION_ERROR_3260005a, "The spec valid usage text states 'commandBuffer must not be in the pending state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00045)"}, {VALIDATION_ERROR_3260005c, "The spec valid usage text states 'commandBuffer must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-00046)"}, {VALIDATION_ERROR_32602401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetCommandBuffer-commandBuffer-parameter)"}, @@ -7006,361 +7298,425 @@ static std::unordered_map validation_error_map{ {VALIDATION_ERROR_32e008c6, "The spec valid usage text states 'Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-pFences-01123)"}, {VALIDATION_ERROR_32e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-device-parameter)"}, {VALIDATION_ERROR_32e08a1b, "The spec valid usage text states 'fenceCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-fenceCount-arraylength)"}, - {VALIDATION_ERROR_32e17201, "The spec valid usage text states 'pFences must be a pointer to an array of fenceCount valid VkFence handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-pFences-parameter)"}, + {VALIDATION_ERROR_32e17201, "The spec valid usage text states 'pFences must be a valid pointer to an array of fenceCount valid VkFence handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-pFences-parameter)"}, {VALIDATION_ERROR_32e17207, "The spec valid usage text states 'Each element of pFences must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkResetFences-pFences-parent)"}, {VALIDATION_ERROR_33005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetEvent-device-parameter)"}, {VALIDATION_ERROR_33007e01, "The spec valid usage text states 'event must be a valid VkEvent handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetEvent-event-parameter)"}, {VALIDATION_ERROR_33007e07, "The spec valid usage text states 'event must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetEvent-event-parent)"}, - {VALIDATION_ERROR_33200009, "The spec valid usage text states 'Both of device, and the elements of pSwapchains must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetHdrMetadataEXT-commonparent)"}, - {VALIDATION_ERROR_33205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetHdrMetadataEXT-device-parameter)"}, - {VALIDATION_ERROR_3321ba01, "The spec valid usage text states 'pMetadata must be a pointer to an array of swapchainCount valid VkHdrMetadataEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetHdrMetadataEXT-pMetadata-parameter)"}, - {VALIDATION_ERROR_33225801, "The spec valid usage text states 'pSwapchains must be a pointer to an array of swapchainCount valid VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetHdrMetadataEXT-pSwapchains-parameter)"}, - {VALIDATION_ERROR_3322f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkSetHdrMetadataEXT-swapchainCount-arraylength)"}, - {VALIDATION_ERROR_33402801, "The spec valid usage text states 'commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkTrimCommandPoolKHR-commandPool-parameter)"}, - {VALIDATION_ERROR_33402807, "The spec valid usage text states 'commandPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkTrimCommandPoolKHR-commandPool-parent)"}, - {VALIDATION_ERROR_33405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkTrimCommandPoolKHR-device-parameter)"}, - {VALIDATION_ERROR_33409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkTrimCommandPoolKHR-flags-zerobitmask)"}, + {VALIDATION_ERROR_33200009, "The spec valid usage text states 'Both of device, and the elements of pSwapchains must have been created, allocated, or retrieved from the same VkInstance' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkSetHdrMetadataEXT-commonparent)"}, + {VALIDATION_ERROR_33205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkSetHdrMetadataEXT-device-parameter)"}, + {VALIDATION_ERROR_3321ba01, "The spec valid usage text states 'pMetadata must be a valid pointer to an array of swapchainCount valid VkHdrMetadataEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkSetHdrMetadataEXT-pMetadata-parameter)"}, + {VALIDATION_ERROR_33225801, "The spec valid usage text states 'pSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkSetHdrMetadataEXT-pSwapchains-parameter)"}, + {VALIDATION_ERROR_3322f21b, "The spec valid usage text states 'swapchainCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkSetHdrMetadataEXT-swapchainCount-arraylength)"}, + {VALIDATION_ERROR_33402801, "The spec valid usage text states 'commandPool must be a valid VkCommandPool handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkTrimCommandPoolKHR-commandPool-parameter)"}, + {VALIDATION_ERROR_33402807, "The spec valid usage text states 'commandPool must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkTrimCommandPoolKHR-commandPool-parent)"}, + {VALIDATION_ERROR_33405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkTrimCommandPoolKHR-device-parameter)"}, + {VALIDATION_ERROR_33409005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkTrimCommandPoolKHR-flags-zerobitmask)"}, {VALIDATION_ERROR_33600562, "The spec valid usage text states 'memory must be currently mapped' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnmapMemory-memory-00689)"}, {VALIDATION_ERROR_33605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnmapMemory-device-parameter)"}, {VALIDATION_ERROR_3360c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnmapMemory-memory-parameter)"}, {VALIDATION_ERROR_3360c607, "The spec valid usage text states 'memory must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnmapMemory-memory-parent)"}, - {VALIDATION_ERROR_33800aba, "The spec valid usage text states 'At any pObjectIndices there must be a registered resource already.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectIndices-01373)"}, - {VALIDATION_ERROR_33800abc, "The spec valid usage text states 'The pObjectEntryTypes of the resource at pObjectIndices must match.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-01374)"}, - {VALIDATION_ERROR_33800abe, "The spec valid usage text states 'All operations on the device using the registered resource must have been completed.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-None-01375)"}, - {VALIDATION_ERROR_33805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-device-parameter)"}, - {VALIDATION_ERROR_3380d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectCount-arraylength)"}, - {VALIDATION_ERROR_3380d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectTable-parameter)"}, - {VALIDATION_ERROR_3380d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectTable-parent)"}, - {VALIDATION_ERROR_3381c801, "The spec valid usage text states 'pObjectEntryTypes must be a pointer to an array of objectCount valid VkObjectEntryTypeNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-parameter)"}, - {VALIDATION_ERROR_3381cc01, "The spec valid usage text states 'pObjectIndices must be a pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectIndices-parameter)"}, - {VALIDATION_ERROR_33a04801, "The spec valid usage text states 'descriptorSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorSet-parameter)"}, - {VALIDATION_ERROR_33a05201, "The spec valid usage text states 'descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter)"}, - {VALIDATION_ERROR_33a05207, "The spec valid usage text states 'descriptorUpdateTemplate must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parent)"}, - {VALIDATION_ERROR_33a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-device-parameter)"}, + {VALIDATION_ERROR_33800aba, "The spec valid usage text states 'At any pObjectIndices there must be a registered resource already.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectIndices-01373)"}, + {VALIDATION_ERROR_33800abc, "The spec valid usage text states 'The pObjectEntryTypes of the resource at pObjectIndices must match.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-01374)"}, + {VALIDATION_ERROR_33800abe, "The spec valid usage text states 'All operations on the device using the registered resource must have been completed.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-None-01375)"}, + {VALIDATION_ERROR_33805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-device-parameter)"}, + {VALIDATION_ERROR_3380d61b, "The spec valid usage text states 'objectCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectCount-arraylength)"}, + {VALIDATION_ERROR_3380d801, "The spec valid usage text states 'objectTable must be a valid VkObjectTableNVX handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectTable-parameter)"}, + {VALIDATION_ERROR_3380d807, "The spec valid usage text states 'objectTable must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-objectTable-parent)"}, + {VALIDATION_ERROR_3381c801, "The spec valid usage text states 'pObjectEntryTypes must be a valid pointer to an array of objectCount valid VkObjectEntryTypeNVX values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-parameter)"}, + {VALIDATION_ERROR_3381cc01, "The spec valid usage text states 'pObjectIndices must be a valid pointer to an array of objectCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUnregisterObjectsNVX-pObjectIndices-parameter)"}, + {VALIDATION_ERROR_33a00d2a, "The spec valid usage text states 'pData must be a valid pointer to a memory that contains one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by descriptorUpdateTemplate when it was created with vkCreateDescriptorUpdateTemplateKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-pData-01685)"}, + {VALIDATION_ERROR_33a04801, "The spec valid usage text states 'descriptorSet must be a valid VkDescriptorSet handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorSet-parameter)"}, + {VALIDATION_ERROR_33a05201, "The spec valid usage text states 'descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter)"}, + {VALIDATION_ERROR_33a05207, "The spec valid usage text states 'descriptorUpdateTemplate must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parent)"}, + {VALIDATION_ERROR_33a05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-device-parameter)"}, {VALIDATION_ERROR_33a12201, "The spec valid usage text states 'pData must be a pointer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSetWithTemplateKHR-pData-parameter)"}, {VALIDATION_ERROR_33c00274, "The spec valid usage text states 'The dstSet member of each element of pDescriptorWrites or pDescriptorCopies must not be used by any command that was recorded to a command buffer which is in the pending state.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-dstSet-00314)"}, {VALIDATION_ERROR_33c05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-device-parameter)"}, - {VALIDATION_ERROR_33c12c01, "The spec valid usage text states 'If descriptorCopyCount is not 0, pDescriptorCopies must be a pointer to an array of descriptorCopyCount valid VkCopyDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-pDescriptorCopies-parameter)"}, - {VALIDATION_ERROR_33c13601, "The spec valid usage text states 'If descriptorWriteCount is not 0, pDescriptorWrites must be a pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-pDescriptorWrites-parameter)"}, + {VALIDATION_ERROR_33c12c01, "The spec valid usage text states 'If descriptorCopyCount is not 0, pDescriptorCopies must be a valid pointer to an array of descriptorCopyCount valid VkCopyDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-pDescriptorCopies-parameter)"}, + {VALIDATION_ERROR_33c13601, "The spec valid usage text states 'If descriptorWriteCount is not 0, pDescriptorWrites must be a valid pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkUpdateDescriptorSets-pDescriptorWrites-parameter)"}, {VALIDATION_ERROR_33e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkWaitForFences-device-parameter)"}, {VALIDATION_ERROR_33e08a1b, "The spec valid usage text states 'fenceCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkWaitForFences-fenceCount-arraylength)"}, - {VALIDATION_ERROR_33e17201, "The spec valid usage text states 'pFences must be a pointer to an array of fenceCount valid VkFence handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkWaitForFences-pFences-parameter)"}, + {VALIDATION_ERROR_33e17201, "The spec valid usage text states 'pFences must be a valid pointer to an array of fenceCount valid VkFence handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkWaitForFences-pFences-parameter)"}, {VALIDATION_ERROR_33e17207, "The spec valid usage text states 'Each element of pFences must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkWaitForFences-pFences-parent)"}, - {VALIDATION_ERROR_3401c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT, VkPhysicalDeviceDiscardRectanglePropertiesEXT, VkPhysicalDeviceIDPropertiesKHR, VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, VkPhysicalDeviceMultiviewPropertiesKHX, VkPhysicalDevicePointClippingPropertiesKHR, VkPhysicalDevicePushDescriptorPropertiesKHR, VkPhysicalDeviceSampleLocationsPropertiesEXT, or VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3402b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3402b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-sType-unique)"}, - {VALIDATION_ERROR_3421c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFormatProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFormatProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3441c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExternalImageFormatPropertiesKHR, VkSamplerYcbcrConversionImageFormatPropertiesKHR, or VkTextureLODGatherFormatPropertiesAMD' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3442b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3442b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatProperties2KHR-sType-unique)"}, - {VALIDATION_ERROR_3461c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMemoryProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3462b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMemoryProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3481c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkSharedPresentSurfaceCapabilitiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceCapabilities2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3482b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceCapabilities2KHR-sType-sType)"}, - {VALIDATION_ERROR_34a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentCapabilitiesKHX-pNext-pNext)"}, - {VALIDATION_ERROR_34a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkDeviceGroupPresentCapabilitiesKHX-sType-sType)"}, - {VALIDATION_ERROR_34c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalBufferPropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_34c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalBufferPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3521c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalSemaphorePropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3522b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalSemaphorePropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3541c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueueFamilyProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3542b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueueFamilyProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3561c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageFormatProperties2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3562b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSparseImageFormatProperties2KHR-sType-sType)"}, - {VALIDATION_ERROR_3581c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceFormat2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSurfaceFormat2KHR-sType-sType)"}, - {VALIDATION_ERROR_35c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPropertiesKHX-pNext-pNext)"}, - {VALIDATION_ERROR_35c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPropertiesKHX-sType-sType)"}, - {VALIDATION_ERROR_3601c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalImageFormatPropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalImageFormatPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3621c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceIDPropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3622b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceIDPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3641c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-pNext-pNext)"}, - {VALIDATION_ERROR_3642b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-sType-sType)"}, - {VALIDATION_ERROR_37e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3822b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType)"}, - {VALIDATION_ERROR_3842b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT-sType-sType)"}, - {VALIDATION_ERROR_3861c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3862b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-sType-sType)"}, - {VALIDATION_ERROR_38800b20, "The spec valid usage text states 'If the non-premultiplied source color property is not supported, srcPremultiplied must be VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-srcPremultiplied-01424)"}, - {VALIDATION_ERROR_38800b22, "The spec valid usage text states 'If the non-premultiplied destination color property is not supported, dstPremultiplied must be VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-dstPremultiplied-01425)"}, - {VALIDATION_ERROR_38800b24, "The spec valid usage text states 'If the correlated overlap property is not supported, blendOverlap must be VK_BLEND_OVERLAP_UNCORRELATED_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-01426)"}, - {VALIDATION_ERROR_3881c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3882b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_38834a01, "The spec valid usage text states 'blendOverlap must be a valid VkBlendOverlapEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter)"}, - {VALIDATION_ERROR_38a00afa, "The spec valid usage text states 'If coverageModulationTableEnable is VK_TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpass.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableEnable-01405)"}, - {VALIDATION_ERROR_38a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask)"}, - {VALIDATION_ERROR_38a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_38a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_38a34c01, "The spec valid usage text states 'coverageModulationMode must be a valid VkCoverageModulationModeNV value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter)"}, - {VALIDATION_ERROR_38a34e1b, "The spec valid usage text states 'coverageModulationTableCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableCount-arraylength)"}, - {VALIDATION_ERROR_38c00af8, "The spec valid usage text states 'If coverageToColorEnable is VK_TRUE, then the render pass subpass indicated by VkGraphicsPipelineCreateInfo::renderPass and VkGraphicsPipelineCreateInfo::subpass must have a color attachment at the location selected by coverageToColorLocation, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-coverageToColorEnable-01404)"}, - {VALIDATION_ERROR_38c09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask)"}, - {VALIDATION_ERROR_38c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-pNext-pNext)"}, - {VALIDATION_ERROR_38c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType)"}, - {VALIDATION_ERROR_38e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_38e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_38e35001, "The spec valid usage text states 'reductionMode must be a valid VkSamplerReductionModeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-reductionMode-parameter)"}, - {VALIDATION_ERROR_39400b4c, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalFencePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-handleTypes-01446)"}, - {VALIDATION_ERROR_39409e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalFenceHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-handleTypes-parameter)"}, - {VALIDATION_ERROR_3941c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3942b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_39609c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3961c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3962b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3981c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalFencePropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3982b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExternalFencePropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_39a27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-physicalDevice-parameter)"}, - {VALIDATION_ERROR_39a3a201, "The spec valid usage text states 'pExternalFenceInfo must be a pointer to a valid VkPhysicalDeviceExternalFenceInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceInfo-parameter)"}, - {VALIDATION_ERROR_39a3a401, "The spec valid usage text states 'pExternalFenceProperties must be a pointer to a VkExternalFencePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceProperties-parameter)"}, - {VALIDATION_ERROR_39c00b70, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportFenceFdInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-handleType-01464)"}, + {VALIDATION_ERROR_3401c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT, VkPhysicalDeviceConservativeRasterizationPropertiesEXT, VkPhysicalDeviceDiscardRectanglePropertiesEXT, VkPhysicalDeviceExternalMemoryHostPropertiesEXT, VkPhysicalDeviceIDPropertiesKHR, VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, VkPhysicalDeviceMultiviewPropertiesKHX, VkPhysicalDevicePointClippingPropertiesKHR, VkPhysicalDevicePushDescriptorPropertiesKHR, VkPhysicalDeviceSampleLocationsPropertiesEXT, or VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3402b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3402b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceProperties2KHR-sType-unique)"}, + {VALIDATION_ERROR_3421c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFormatProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3422b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFormatProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3441c40d, "The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExternalImageFormatPropertiesKHR, VkSamplerYcbcrConversionImageFormatPropertiesKHR, or VkTextureLODGatherFormatPropertiesAMD' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3442b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3442b00f, "The spec valid usage text states 'Each sType member in the pNext chain must be unique' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatProperties2KHR-sType-unique)"}, + {VALIDATION_ERROR_3461c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMemoryProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3462b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMemoryProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3481c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkSharedPresentSurfaceCapabilitiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceCapabilities2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3482b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceCapabilities2KHR-sType-sType)"}, + {VALIDATION_ERROR_34a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentCapabilitiesKHX-pNext-pNext)"}, + {VALIDATION_ERROR_34a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceGroupPresentCapabilitiesKHX-sType-sType)"}, + {VALIDATION_ERROR_34c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalBufferPropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_34c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalBufferPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3521c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalSemaphorePropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3522b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalSemaphorePropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3541c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkQueueFamilyProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3542b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkQueueFamilyProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3561c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSparseImageFormatProperties2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3562b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSparseImageFormatProperties2KHR-sType-sType)"}, + {VALIDATION_ERROR_3581c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceFormat2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3582b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSurfaceFormat2KHR-sType-sType)"}, + {VALIDATION_ERROR_35c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPropertiesKHX-pNext-pNext)"}, + {VALIDATION_ERROR_35c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPropertiesKHX-sType-sType)"}, + {VALIDATION_ERROR_3601c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalImageFormatPropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3602b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalImageFormatPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3621c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceIDPropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3622b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceIDPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3641c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-pNext-pNext)"}, + {VALIDATION_ERROR_3642b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-sType-sType)"}, + {VALIDATION_ERROR_37e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3822b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType)"}, + {VALIDATION_ERROR_3842b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_3861c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3862b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_38800b20, "The spec valid usage text states 'If the non-premultiplied source color property is not supported, srcPremultiplied must be VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-srcPremultiplied-01424)"}, + {VALIDATION_ERROR_38800b22, "The spec valid usage text states 'If the non-premultiplied destination color property is not supported, dstPremultiplied must be VK_TRUE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-dstPremultiplied-01425)"}, + {VALIDATION_ERROR_38800b24, "The spec valid usage text states 'If the correlated overlap property is not supported, blendOverlap must be VK_BLEND_OVERLAP_UNCORRELATED_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-01426)"}, + {VALIDATION_ERROR_3881c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3882b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_38834a01, "The spec valid usage text states 'blendOverlap must be a valid VkBlendOverlapEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter)"}, + {VALIDATION_ERROR_38a00afa, "The spec valid usage text states 'If coverageModulationTableEnable is VK_TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpass.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableEnable-01405)"}, + {VALIDATION_ERROR_38a09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask)"}, + {VALIDATION_ERROR_38a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_38a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_38a34c01, "The spec valid usage text states 'coverageModulationMode must be a valid VkCoverageModulationModeNV value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter)"}, + {VALIDATION_ERROR_38a34e1b, "The spec valid usage text states 'coverageModulationTableCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableCount-arraylength)"}, + {VALIDATION_ERROR_38c00af8, "The spec valid usage text states 'If coverageToColorEnable is VK_TRUE, then the render pass subpass indicated by VkGraphicsPipelineCreateInfo::renderPass and VkGraphicsPipelineCreateInfo::subpass must have a color attachment at the location selected by coverageToColorLocation, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-coverageToColorEnable-01404)"}, + {VALIDATION_ERROR_38c09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask)"}, + {VALIDATION_ERROR_38c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-pNext-pNext)"}, + {VALIDATION_ERROR_38c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType)"}, + {VALIDATION_ERROR_38e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_38e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_38e35001, "The spec valid usage text states 'reductionMode must be a valid VkSamplerReductionModeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerReductionModeCreateInfoEXT-reductionMode-parameter)"}, + {VALIDATION_ERROR_39400b4c, "The spec valid usage text states 'The bits in handleTypes must be supported and compatible, as reported by VkExternalFencePropertiesKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-handleTypes-01446)"}, + {VALIDATION_ERROR_39409e01, "The spec valid usage text states 'handleTypes must be a valid combination of VkExternalFenceHandleTypeFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-handleTypes-parameter)"}, + {VALIDATION_ERROR_3941c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3942b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_39609c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3961c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3962b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalFenceInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3981c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalFencePropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3982b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExternalFencePropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_39a27a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-physicalDevice-parameter)"}, + {VALIDATION_ERROR_39a3a201, "The spec valid usage text states 'pExternalFenceInfo must be a valid pointer to a valid VkPhysicalDeviceExternalFenceInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceInfo-parameter)"}, + {VALIDATION_ERROR_39a3a401, "The spec valid usage text states 'pExternalFenceProperties must be a valid pointer to a VkExternalFencePropertiesKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceProperties-parameter)"}, + {VALIDATION_ERROR_39c00b70, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportFenceFdInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-handleType-01464)"}, {VALIDATION_ERROR_39c00b72, "The spec valid usage text states 'The fence from which handleType was exported must have been created on the same underlying physical device as fence.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-handleType-01465)"}, - {VALIDATION_ERROR_39c00c0a, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-fd-01541)"}, - {VALIDATION_ERROR_39c08801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-fence-parameter)"}, - {VALIDATION_ERROR_39c09001, "The spec valid usage text states 'flags must be a valid combination of VkFenceImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_39c09c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_39c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_39c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_39e00b5a, "The spec valid usage text states 'handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when fence's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01453)"}, - {VALIDATION_ERROR_39e00b5c, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated fence signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01454)"}, - {VALIDATION_ERROR_39e00b5e, "The spec valid usage text states 'fence must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload's handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-fence-01455)"}, - {VALIDATION_ERROR_39e00b60, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01456)"}, - {VALIDATION_ERROR_39e08801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-fence-parameter)"}, - {VALIDATION_ERROR_39e09c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_39e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_39e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3a000b6e, "The spec valid usage text states 'fence must not be associated with any queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportFenceFdKHR-fence-01463)"}, - {VALIDATION_ERROR_3a005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportFenceFdKHR-device-parameter)"}, - {VALIDATION_ERROR_3a03a801, "The spec valid usage text states 'pImportFenceFdInfo must be a pointer to a valid VkImportFenceFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportFenceFdKHR-pImportFenceFdInfo-parameter)"}, - {VALIDATION_ERROR_3a205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceFdKHR-device-parameter)"}, - {VALIDATION_ERROR_3a216c01, "The spec valid usage text states 'pFd must be a pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceFdKHR-pFd-parameter)"}, - {VALIDATION_ERROR_3a239e01, "The spec valid usage text states 'pGetFdInfo must be a pointer to a valid VkFenceGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceFdKHR-pGetFdInfo-parameter)"}, - {VALIDATION_ERROR_3a400b62, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportFenceWin32HandleInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01457)"}, + {VALIDATION_ERROR_39c00c0a, "The spec valid usage text states 'fd must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-fd-01541)"}, + {VALIDATION_ERROR_39c08801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-fence-parameter)"}, + {VALIDATION_ERROR_39c09001, "The spec valid usage text states 'flags must be a valid combination of VkFenceImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_39c09c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_39c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_39c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_39e00b5a, "The spec valid usage text states 'handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when fence's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01453)"}, + {VALIDATION_ERROR_39e00b5c, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated fence signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01454)"}, + {VALIDATION_ERROR_39e00b5e, "The spec valid usage text states 'fence must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload's handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-fence-01455)"}, + {VALIDATION_ERROR_39e00b60, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-01456)"}, + {VALIDATION_ERROR_39e08801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-fence-parameter)"}, + {VALIDATION_ERROR_39e09c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_39e1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_39e2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3a000b6e, "The spec valid usage text states 'fence must not be associated with any queue command that has not yet completed execution on that queue' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportFenceFdKHR-fence-01463)"}, + {VALIDATION_ERROR_3a005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportFenceFdKHR-device-parameter)"}, + {VALIDATION_ERROR_3a03a801, "The spec valid usage text states 'pImportFenceFdInfo must be a valid pointer to a valid VkImportFenceFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportFenceFdKHR-pImportFenceFdInfo-parameter)"}, + {VALIDATION_ERROR_3a205601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceFdKHR-device-parameter)"}, + {VALIDATION_ERROR_3a216c01, "The spec valid usage text states 'pFd must be a valid pointer to a int value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceFdKHR-pFd-parameter)"}, + {VALIDATION_ERROR_3a239e01, "The spec valid usage text states 'pGetFdInfo must be a valid pointer to a valid VkFenceGetFdInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceFdKHR-pGetFdInfo-parameter)"}, + {VALIDATION_ERROR_3a400b62, "The spec valid usage text states 'handleType must be a value included in the Handle Types Supported by VkImportFenceWin32HandleInfoKHR table.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01457)"}, {VALIDATION_ERROR_3a400b64, "The spec valid usage text states 'The fence from which handleType or name was exported must have been created on the same underlying physical device as fence.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01458)"}, - {VALIDATION_ERROR_3a400b66, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01459)"}, - {VALIDATION_ERROR_3a400b68, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01460)"}, - {VALIDATION_ERROR_3a400b6a, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01461)"}, - {VALIDATION_ERROR_3a400b6c, "The spec valid usage text states 'If handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handle-01462)"}, - {VALIDATION_ERROR_3a400c06, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handle-01539)"}, - {VALIDATION_ERROR_3a400c08, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-name-01540)"}, - {VALIDATION_ERROR_3a408801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-fence-parameter)"}, - {VALIDATION_ERROR_3a409001, "The spec valid usage text states 'flags must be a valid combination of VkFenceImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-flags-parameter)"}, - {VALIDATION_ERROR_3a409c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3a41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3a42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3a600b4e, "The spec valid usage text states 'If VkExportFenceCreateInfoKHR::handleTypes does not include VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VkExportFenceWin32HandleInfoKHR must not be in the pNext chain of VkFenceCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-handleTypes-01447)"}, - {VALIDATION_ERROR_3a60f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-pAttributes-parameter)"}, - {VALIDATION_ERROR_3a61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3a62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3a800b50, "The spec valid usage text states 'handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when the fence's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01448)"}, - {VALIDATION_ERROR_3a800b52, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetFenceWin32HandleKHR must be called no more than once for each valid unique combination of fence and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01449)"}, - {VALIDATION_ERROR_3a800b54, "The spec valid usage text states 'fence must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload's handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-fence-01450)"}, - {VALIDATION_ERROR_3a800b56, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated fence signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01451)"}, - {VALIDATION_ERROR_3a800b58, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01452)"}, - {VALIDATION_ERROR_3a808801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-fence-parameter)"}, - {VALIDATION_ERROR_3a809c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3a81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3a82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3aa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportFenceWin32HandleKHR-device-parameter)"}, - {VALIDATION_ERROR_3aa3aa01, "The spec valid usage text states 'pImportFenceWin32HandleInfo must be a pointer to a valid VkImportFenceWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkImportFenceWin32HandleKHR-pImportFenceWin32HandleInfo-parameter)"}, - {VALIDATION_ERROR_3ac05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-device-parameter)"}, - {VALIDATION_ERROR_3ac17c01, "The spec valid usage text states 'pHandle must be a pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-pHandle-parameter)"}, - {VALIDATION_ERROR_3ac3a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a pointer to a valid VkFenceGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, - {VALIDATION_ERROR_3ae09c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3ae1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3ae2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3ae2b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-semaphore-parameter)"}, - {VALIDATION_ERROR_3b009c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3b01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3b02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3b02b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-parameter)"}, - {VALIDATION_ERROR_3b209c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3b20c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-memory-parameter)"}, - {VALIDATION_ERROR_3b21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3b22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3b409c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-handleType-parameter)"}, - {VALIDATION_ERROR_3b40c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-memory-parameter)"}, - {VALIDATION_ERROR_3b41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3b42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3b61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedRequirementsKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3b62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedRequirementsKHR-sType-sType)"}, - {VALIDATION_ERROR_3b800009, "The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-commonparent)"}, - {VALIDATION_ERROR_3b800b30, "The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01432)"}, - {VALIDATION_ERROR_3b800b32, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01433)"}, - {VALIDATION_ERROR_3b800b34, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must have been created without VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in VkImageCreateInfo::flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01434)"}, - {VALIDATION_ERROR_3b800b36, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01435)"}, - {VALIDATION_ERROR_3b800b38, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must have been created without VK_BUFFER_CREATE_SPARSE_BINDING_BIT set in VkBufferCreateInfo::flags' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01436)"}, + {VALIDATION_ERROR_3a400b66, "The spec valid usage text states 'If handleType is not VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01459)"}, + {VALIDATION_ERROR_3a400b68, "The spec valid usage text states 'If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01460)"}, + {VALIDATION_ERROR_3a400b6a, "The spec valid usage text states 'If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-01461)"}, + {VALIDATION_ERROR_3a400b6c, "The spec valid usage text states 'If handle is not NULL, name must be NULL.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handle-01462)"}, + {VALIDATION_ERROR_3a400c06, "The spec valid usage text states 'If handle is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handle-01539)"}, + {VALIDATION_ERROR_3a400c08, "The spec valid usage text states 'If name is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-name-01540)"}, + {VALIDATION_ERROR_3a408801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-fence-parameter)"}, + {VALIDATION_ERROR_3a409001, "The spec valid usage text states 'flags must be a valid combination of VkFenceImportFlagBitsKHR values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-flags-parameter)"}, + {VALIDATION_ERROR_3a409c01, "The spec valid usage text states 'If handleType is not 0, handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3a41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3a42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportFenceWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3a600b4e, "The spec valid usage text states 'If VkExportFenceCreateInfoKHR::handleTypes does not include VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VkExportFenceWin32HandleInfoKHR must not be in the pNext chain of VkFenceCreateInfo.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-handleTypes-01447)"}, + {VALIDATION_ERROR_3a60f401, "The spec valid usage text states 'If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-pAttributes-parameter)"}, + {VALIDATION_ERROR_3a61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3a62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkExportFenceWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3a800b50, "The spec valid usage text states 'handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when the fence's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01448)"}, + {VALIDATION_ERROR_3a800b52, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetFenceWin32HandleKHR must be called no more than once for each valid unique combination of fence and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01449)"}, + {VALIDATION_ERROR_3a800b54, "The spec valid usage text states 'fence must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload's handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-fence-01450)"}, + {VALIDATION_ERROR_3a800b56, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated fence signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01451)"}, + {VALIDATION_ERROR_3a800b58, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-01452)"}, + {VALIDATION_ERROR_3a808801, "The spec valid usage text states 'fence must be a valid VkFence handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-fence-parameter)"}, + {VALIDATION_ERROR_3a809c01, "The spec valid usage text states 'handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3a81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3a82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkFenceGetWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3aa05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportFenceWin32HandleKHR-device-parameter)"}, + {VALIDATION_ERROR_3aa3aa01, "The spec valid usage text states 'pImportFenceWin32HandleInfo must be a valid pointer to a valid VkImportFenceWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkImportFenceWin32HandleKHR-pImportFenceWin32HandleInfo-parameter)"}, + {VALIDATION_ERROR_3ac05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-device-parameter)"}, + {VALIDATION_ERROR_3ac17c01, "The spec valid usage text states 'pHandle must be a valid pointer to a HANDLE value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-pHandle-parameter)"}, + {VALIDATION_ERROR_3ac3a001, "The spec valid usage text states 'pGetWin32HandleInfo must be a valid pointer to a valid VkFenceGetWin32HandleInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetFenceWin32HandleKHR-pGetWin32HandleInfo-parameter)"}, + {VALIDATION_ERROR_3ae008d8, "The spec valid usage text states 'handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when semaphore's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-01132)"}, + {VALIDATION_ERROR_3ae008da, "The spec valid usage text states 'semaphore must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload's handle type was included in VkExternalSemaphorePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-semaphore-01133)"}, + {VALIDATION_ERROR_3ae008dc, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-01134)"}, + {VALIDATION_ERROR_3ae008de, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated semaphore signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-01135)"}, + {VALIDATION_ERROR_3ae008e0, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-01136)"}, + {VALIDATION_ERROR_3ae09c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3ae1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3ae2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3ae2b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetFdInfoKHR-semaphore-parameter)"}, + {VALIDATION_ERROR_3b0008cc, "The spec valid usage text states 'handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when the semaphore's current payload was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01126)"}, + {VALIDATION_ERROR_3b0008ce, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetSemaphoreWin32HandleKHR must be called no more than once for each valid unique combination of semaphore and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01127)"}, + {VALIDATION_ERROR_3b0008d0, "The spec valid usage text states 'semaphore must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload's handle type was included in VkExternalSemaphorePropertiesKHR::exportFromImportedHandleTypes for handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-01128)"}, + {VALIDATION_ERROR_3b0008d2, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on semaphore.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01129)"}, + {VALIDATION_ERROR_3b0008d4, "The spec valid usage text states 'If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated semaphore signal operation pending execution.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01130)"}, + {VALIDATION_ERROR_3b0008d6, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01131)"}, + {VALIDATION_ERROR_3b009c01, "The spec valid usage text states 'handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3b01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3b02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3b02b801, "The spec valid usage text states 'semaphore must be a valid VkSemaphore handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-parameter)"}, + {VALIDATION_ERROR_3b20053e, "The spec valid usage text states 'handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-handleType-00671)"}, + {VALIDATION_ERROR_3b200540, "The spec valid usage text states 'handleType must be defined as a POSIX file descriptor handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-handleType-00672)"}, + {VALIDATION_ERROR_3b209c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3b20c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-memory-parameter)"}, + {VALIDATION_ERROR_3b21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3b22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetFdInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3b40052c, "The spec valid usage text states 'handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00662)"}, + {VALIDATION_ERROR_3b40052e, "The spec valid usage text states 'If handleType is defined as an NT handle, vkGetMemoryWin32HandleKHR must be called no more than once for each valid unique combination of memory and handleType.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00663)"}, + {VALIDATION_ERROR_3b400530, "The spec valid usage text states 'handleType must be defined as an NT handle or a global share handle.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00664)"}, + {VALIDATION_ERROR_3b409c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-handleType-parameter)"}, + {VALIDATION_ERROR_3b40c601, "The spec valid usage text states 'memory must be a valid VkDeviceMemory handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-memory-parameter)"}, + {VALIDATION_ERROR_3b41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3b42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryGetWin32HandleInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3b61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedRequirementsKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3b62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedRequirementsKHR-sType-sType)"}, + {VALIDATION_ERROR_3b800009, "The spec valid usage text states 'Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-commonparent)"}, + {VALIDATION_ERROR_3b800b30, "The spec valid usage text states 'At least one of image and buffer must be VK_NULL_HANDLE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01432)"}, + {VALIDATION_ERROR_3b800b32, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01433)"}, + {VALIDATION_ERROR_3b800b34, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must have been created without VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in VkImageCreateInfo::flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01434)"}, + {VALIDATION_ERROR_3b800b36, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01435)"}, + {VALIDATION_ERROR_3b800b38, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must have been created without VK_BUFFER_CREATE_SPARSE_BINDING_BIT set in VkBufferCreateInfo::flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01436)"}, {VALIDATION_ERROR_3b800b3a, "The spec valid usage text states 'If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01437)"}, {VALIDATION_ERROR_3b800b3c, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01438)"}, - {VALIDATION_ERROR_3b801a01, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-parameter)"}, - {VALIDATION_ERROR_3b80a001, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-parameter)"}, - {VALIDATION_ERROR_3b81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3b82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3ba01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-buffer-parameter)"}, - {VALIDATION_ERROR_3ba1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3ba2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-sType-sType)"}, - {VALIDATION_ERROR_3bc00c6a, "The spec valid usage text states 'If image was created with a multi-planar format and the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01589)"}, - {VALIDATION_ERROR_3bc00c6c, "The spec valid usage text states 'If image was not created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01590)"}, - {VALIDATION_ERROR_3bc00c6e, "The spec valid usage text states 'If image was created with a single-plane format, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01591)"}, - {VALIDATION_ERROR_3bc0a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-parameter)"}, - {VALIDATION_ERROR_3bc1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkImagePlaneMemoryRequirementsInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3bc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-sType-sType)"}, - {VALIDATION_ERROR_3c01c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkMemoryDedicatedRequirementsKHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryRequirements2KHR-pNext-pNext)"}, - {VALIDATION_ERROR_3c02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryRequirements2KHR-sType-sType)"}, - {VALIDATION_ERROR_3c405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-device-parameter)"}, - {VALIDATION_ERROR_3c41b401, "The spec valid usage text states 'pMemoryRequirements must be a pointer to a VkMemoryRequirements2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-pMemoryRequirements-parameter)"}, - {VALIDATION_ERROR_3c439c01, "The spec valid usage text states 'pInfo must be a pointer to a valid VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-pInfo-parameter)"}, - {VALIDATION_ERROR_3c605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-device-parameter)"}, - {VALIDATION_ERROR_3c61b401, "The spec valid usage text states 'pMemoryRequirements must be a pointer to a VkMemoryRequirements2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-pMemoryRequirements-parameter)"}, - {VALIDATION_ERROR_3c639c01, "The spec valid usage text states 'pInfo must be a pointer to a valid VkBufferMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-pInfo-parameter)"}, - {VALIDATION_ERROR_3ca2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDevice16BitStorageFeaturesKHR-sType-sType)"}, - {VALIDATION_ERROR_3cc00b2e, "The spec valid usage text states 'If variablePointers is enabled then variablePointersStorageBuffer must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-variablePointers-01431)"}, - {VALIDATION_ERROR_3cc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3cc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-sType-sType)"}, - {VALIDATION_ERROR_3ce00bec, "The spec valid usage text states 'sampleLocationsPerPixel must be a bit value that is set in VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-01526)"}, - {VALIDATION_ERROR_3ce00bee, "The spec valid usage text states 'sampleLocationsCount must equal sampleLocationsPerPixel {times} sampleLocationGridSize.width {times} sampleLocationGridSize.height' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-01527)"}, - {VALIDATION_ERROR_3ce1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3ce2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_3ce3b201, "The spec valid usage text states 'sampleLocationsPerPixel must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-parameter)"}, - {VALIDATION_ERROR_3ce3b41b, "The spec valid usage text states 'sampleLocationsCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-arraylength)"}, - {VALIDATION_ERROR_3ce3b601, "The spec valid usage text states 'pSampleLocations must be a pointer to an array of sampleLocationsCount VkSampleLocationEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter)"}, - {VALIDATION_ERROR_3d01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3d02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_3d03ba01, "The spec valid usage text states 'If attachmentInitialSampleLocationsCount is not 0, pAttachmentInitialSampleLocations must be a pointer to an array of attachmentInitialSampleLocationsCount valid VkAttachmentSampleLocationsEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter)"}, + {VALIDATION_ERROR_3b800e0a, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must not have been created with VK_IMAGE_CREATE_DISJOINT_BIT_KHR set in VkImageCreateInfo::flags' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-01797)"}, + {VALIDATION_ERROR_3b801a01, "The spec valid usage text states 'If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-parameter)"}, + {VALIDATION_ERROR_3b80a001, "The spec valid usage text states 'If image is not VK_NULL_HANDLE, image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-image-parameter)"}, + {VALIDATION_ERROR_3b81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3b82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryDedicatedAllocateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3ba01a01, "The spec valid usage text states 'buffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-buffer-parameter)"}, + {VALIDATION_ERROR_3ba1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3ba2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBufferMemoryRequirementsInfo2KHR-sType-sType)"}, + {VALIDATION_ERROR_3bc00c6a, "The spec valid usage text states 'If image was created with a multi-planar format and the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01589)"}, + {VALIDATION_ERROR_3bc00c6c, "The spec valid usage text states 'If image was not created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01590)"}, + {VALIDATION_ERROR_3bc00c6e, "The spec valid usage text states 'If image was created with a single-plane format, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-01591)"}, + {VALIDATION_ERROR_3bc0a001, "The spec valid usage text states 'image must be a valid VkImage handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-image-parameter)"}, + {VALIDATION_ERROR_3bc1c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkImagePlaneMemoryRequirementsInfoKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3bc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageMemoryRequirementsInfo2KHR-sType-sType)"}, + {VALIDATION_ERROR_3c01c40d, "The spec valid usage text states 'pNext must be NULL or a pointer to a valid instance of VkMemoryDedicatedRequirementsKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryRequirements2KHR-pNext-pNext)"}, + {VALIDATION_ERROR_3c02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryRequirements2KHR-sType-sType)"}, + {VALIDATION_ERROR_3c405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-device-parameter)"}, + {VALIDATION_ERROR_3c41b401, "The spec valid usage text states 'pMemoryRequirements must be a valid pointer to a VkMemoryRequirements2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-pMemoryRequirements-parameter)"}, + {VALIDATION_ERROR_3c439c01, "The spec valid usage text states 'pInfo must be a valid pointer to a valid VkImageMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetImageMemoryRequirements2KHR-pInfo-parameter)"}, + {VALIDATION_ERROR_3c605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-device-parameter)"}, + {VALIDATION_ERROR_3c61b401, "The spec valid usage text states 'pMemoryRequirements must be a valid pointer to a VkMemoryRequirements2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-pMemoryRequirements-parameter)"}, + {VALIDATION_ERROR_3c639c01, "The spec valid usage text states 'pInfo must be a valid pointer to a valid VkBufferMemoryRequirementsInfo2KHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetBufferMemoryRequirements2KHR-pInfo-parameter)"}, + {VALIDATION_ERROR_3ca2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDevice16BitStorageFeaturesKHR-sType-sType)"}, + {VALIDATION_ERROR_3cc00b2e, "The spec valid usage text states 'If variablePointers is enabled then variablePointersStorageBuffer must also be enabled.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-variablePointers-01431)"}, + {VALIDATION_ERROR_3cc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3cc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-sType-sType)"}, + {VALIDATION_ERROR_3ce00bec, "The spec valid usage text states 'sampleLocationsPerPixel must be a bit value that is set in VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-01526)"}, + {VALIDATION_ERROR_3ce00bee, "The spec valid usage text states 'sampleLocationsCount must equal sampleLocationsPerPixel {times} sampleLocationGridSize.width {times} sampleLocationGridSize.height' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-01527)"}, + {VALIDATION_ERROR_3ce1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3ce2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_3ce3b201, "The spec valid usage text states 'sampleLocationsPerPixel must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-parameter)"}, + {VALIDATION_ERROR_3ce3b41b, "The spec valid usage text states 'sampleLocationsCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-arraylength)"}, + {VALIDATION_ERROR_3ce3b601, "The spec valid usage text states 'pSampleLocations must be a valid pointer to an array of sampleLocationsCount VkSampleLocationEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter)"}, + {VALIDATION_ERROR_3d01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3d02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_3d03ba01, "The spec valid usage text states 'If attachmentInitialSampleLocationsCount is not 0, pAttachmentInitialSampleLocations must be a valid pointer to an array of attachmentInitialSampleLocationsCount valid VkAttachmentSampleLocationsEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter)"}, {VALIDATION_ERROR_3d03be01, "The spec valid usage text states 'If postSubpassSampleLocationsCount is not 0, pSubpassSampleLocations must be a pointer to an array of postSubpassSampleLocationsCount valid VkSubpassSampleLocationsEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pSubpassSampleLocations-parameter)"}, - {VALIDATION_ERROR_3d03e801, "The spec valid usage text states 'If postSubpassSampleLocationsCount is not 0, pPostSubpassSampleLocations must be a pointer to an array of postSubpassSampleLocationsCount valid VkSubpassSampleLocationsEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter)"}, - {VALIDATION_ERROR_3d21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3d22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_3d23c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sampleLocationsInfo-parameter)"}, - {VALIDATION_ERROR_3d41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3d42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-sType-sType)"}, - {VALIDATION_ERROR_3d61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMultisamplePropertiesEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3d62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMultisamplePropertiesEXT-sType-sType)"}, - {VALIDATION_ERROR_3d827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter)"}, - {VALIDATION_ERROR_3d82b401, "The spec valid usage text states 'samples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-samples-parameter)"}, - {VALIDATION_ERROR_3d83ca01, "The spec valid usage text states 'pMultisampleProperties must be a pointer to a VkMultisamplePropertiesEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-pMultisampleProperties-parameter)"}, - {VALIDATION_ERROR_3da00bfc, "The spec valid usage text states 'If initialDataSize is not 0, it must be equal to the size of pInitialData, as returned by vkGetValidationCacheDataEXT when pInitialData was originally retrieved' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01534)"}, - {VALIDATION_ERROR_3da00bfe, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must have been retrieved from a previous call to vkGetValidationCacheDataEXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01535)"}, - {VALIDATION_ERROR_3da09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-flags-zerobitmask)"}, - {VALIDATION_ERROR_3da19601, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must be a pointer to an array of initialDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-pInitialData-parameter)"}, - {VALIDATION_ERROR_3da1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3da2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_3dc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-pNext-pNext)"}, - {VALIDATION_ERROR_3dc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType)"}, - {VALIDATION_ERROR_3dc3c401, "The spec valid usage text states 'validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-validationCache-parameter)"}, - {VALIDATION_ERROR_3de05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateValidationCacheEXT-device-parameter)"}, - {VALIDATION_ERROR_3de0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pAllocator-parameter)"}, - {VALIDATION_ERROR_3de11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkValidationCacheCreateInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_3de3c201, "The spec valid usage text states 'pValidationCache must be a pointer to a VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pValidationCache-parameter)"}, - {VALIDATION_ERROR_3e005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-device-parameter)"}, - {VALIDATION_ERROR_3e012201, "The spec valid usage text states 'If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a pointer to an array of pDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-pData-parameter)"}, - {VALIDATION_ERROR_3e012401, "The spec valid usage text states 'pDataSize must be a pointer to a size_t value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-pDataSize-parameter)"}, - {VALIDATION_ERROR_3e03c401, "The spec valid usage text states 'validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-validationCache-parameter)"}, - {VALIDATION_ERROR_3e03c407, "The spec valid usage text states 'validationCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-validationCache-parent)"}, - {VALIDATION_ERROR_3e200bf0, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-None-01528)"}, - {VALIDATION_ERROR_3e200bf2, "The spec valid usage text states 'The sampleLocationsPerPixel member of pSampleLocationsInfo must equal the rasterizationSamples member of the VkPipelineMultisampleStateCreateInfo structure the currently bound graphics pipeline has been created with' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-sampleLocationsPerPixel-01529)"}, - {VALIDATION_ERROR_3e200bf4, "The spec valid usage text states 'If VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE then the current render pass must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose pPostSubpassSampleLocations member contains an element with a subpassIndex matching the current subpass index and the sampleLocationsInfo member of that element must match the sample locations state pointed to by pSampleLocationsInfo' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-variableSampleLocations-01530)"}, - {VALIDATION_ERROR_3e202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter)"}, - {VALIDATION_ERROR_3e202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-recording)"}, - {VALIDATION_ERROR_3e202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-cmdpool)"}, - {VALIDATION_ERROR_3e23c801, "The spec valid usage text states 'pSampleLocationsInfo must be a pointer to a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-pSampleLocationsInfo-parameter)"}, - {VALIDATION_ERROR_3e400c02, "The spec valid usage text states 'If VkAllocationCallbacks were provided when validationCache was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-01537)"}, - {VALIDATION_ERROR_3e400c04, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when validationCache was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-01538)"}, - {VALIDATION_ERROR_3e405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-device-parameter)"}, - {VALIDATION_ERROR_3e40ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-pAllocator-parameter)"}, - {VALIDATION_ERROR_3e43c401, "The spec valid usage text states 'If validationCache is not VK_NULL_HANDLE, validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-parameter)"}, - {VALIDATION_ERROR_3e43c407, "The spec valid usage text states 'If validationCache is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-parent)"}, - {VALIDATION_ERROR_3e600c00, "The spec valid usage text states 'dstCache must not appear in the list of source caches' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-01536)"}, - {VALIDATION_ERROR_3e605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-device-parameter)"}, - {VALIDATION_ERROR_3e606e01, "The spec valid usage text states 'dstCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-parameter)"}, - {VALIDATION_ERROR_3e606e07, "The spec valid usage text states 'dstCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-parent)"}, - {VALIDATION_ERROR_3e623c01, "The spec valid usage text states 'pSrcCaches must be a pointer to an array of srcCacheCount valid VkValidationCacheEXT handles' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-pSrcCaches-parameter)"}, - {VALIDATION_ERROR_3e623c07, "The spec valid usage text states 'Each element of pSrcCaches must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-pSrcCaches-parent)"}, - {VALIDATION_ERROR_3e62ca1b, "The spec valid usage text states 'srcCacheCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkMergeValidationCachesEXT-srcCacheCount-arraylength)"}, - {VALIDATION_ERROR_3e800bf6, "The spec valid usage text states 'attachmentIndex must be less than the attachmentCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::renderPass was created with' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentSampleLocationsEXT-attachmentIndex-01531)"}, - {VALIDATION_ERROR_3e83c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkAttachmentSampleLocationsEXT-sampleLocationsInfo-parameter)"}, - {VALIDATION_ERROR_3ea00bf8, "The spec valid usage text states 'subpassIndex must be less than the subpassCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::pname::renderPass was created with' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassSampleLocationsEXT-subpassIndex-01532)"}, - {VALIDATION_ERROR_3ea3c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassSampleLocationsEXT-sampleLocationsInfo-parameter)"}, - {VALIDATION_ERROR_3ec1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDevicePointClippingPropertiesKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3ec2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDevicePointClippingPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_3ee00c01, "The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-parameter)"}, - {VALIDATION_ERROR_3ee00c03, "The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-requiredbitmask)"}, - {VALIDATION_ERROR_3ee00c40, "The spec valid usage text states 'There must be an input attachment at pCreateInfo::pSubpasses[subpass].pInputAttachments[inputAttachment].' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-pCreateInfo-01568)"}, - {VALIDATION_ERROR_3ee00c42, "The spec valid usage text states 'The specified input attachment must have more than one aspect mask.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-None-01569)"}, - {VALIDATION_ERROR_3ee00c44, "The spec valid usage text states 'aspectMask must be a subset of the aspect masks in the specified input attachment.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-01570)"}, - {VALIDATION_ERROR_3f01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3f02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3f03ce1b, "The spec valid usage text states 'aspectReferenceCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-aspectReferenceCount-arraylength)"}, - {VALIDATION_ERROR_3f03d001, "The spec valid usage text states 'pAspectReferences must be a pointer to an array of aspectReferenceCount valid VkInputAttachmentAspectReferenceKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pAspectReferences-parameter)"}, - {VALIDATION_ERROR_3f200c66, "The spec valid usage text states 'usage must not include any set bits that were not set in the usage member of the VkImageCreateInfo structure used to create the image this image view is created from.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-01587)"}, - {VALIDATION_ERROR_3f21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3f22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3f230601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-parameter)"}, - {VALIDATION_ERROR_3f230603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-requiredbitmask)"}, - {VALIDATION_ERROR_3f41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3f42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3f43d201, "The spec valid usage text states 'domainOrigin must be a valid VkTessellationDomainOriginKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-domainOrigin-parameter)"}, - {VALIDATION_ERROR_3f600c54, "The spec valid usage text states 'If viewFormatCount is not 0, all of the formats in the pViewFormats array must be compatible with the format specified in the format field of VkImageCreateInfo, as described in the compatibility table.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01578)"}, - {VALIDATION_ERROR_3f600c56, "The spec valid usage text states 'If VkImageCreateInfo::flags does not contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, viewFormatCount must be 0 or 1.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-flags-01579)"}, - {VALIDATION_ERROR_3f600c58, "The spec valid usage text states 'If viewFormatCount is not 0, VkImageCreateInfo::format must be in pViewFormats.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01580)"}, - {VALIDATION_ERROR_3f61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3f62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3f63e401, "The spec valid usage text states 'If viewFormatCount is not 0, pViewFormats must be a pointer to an array of viewFormatCount valid VkFormat values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-pViewFormats-parameter)"}, - {VALIDATION_ERROR_3f800ce2, "The spec valid usage text states 'format must not be VK_FORMAT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01649)"}, - {VALIDATION_ERROR_3f800ce4, "The spec valid usage text states 'format must support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR or VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01650)"}, - {VALIDATION_ERROR_3f800ce6, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_COSITED_EVEN_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01651)"}, - {VALIDATION_ERROR_3f800ce8, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_MIDPOINT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01652)"}, - {VALIDATION_ERROR_3f800cea, "The spec valid usage text states 'format must represent unsigned normalized values (i.e. the format must be a UNORM format)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01653)"}, - {VALIDATION_ERROR_3f800cec, "The spec valid usage text states 'If the format has a _422 or _420 suffix:' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-None-01654)"}, - {VALIDATION_ERROR_3f800cee, "The spec valid usage text states 'If ycbcrModel is not VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, then components.r, components.g, and components.b must correspond to channels of the format; that is, components.r, components.g, and components.b must not be VK_COMPONENT_SWIZZLE_ZERO or VK_COMPONENT_SWIZZLE_ONE, and must not correspond to a channel which contains zero or one as a consequence of conversion to RGBA' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-01655)"}, - {VALIDATION_ERROR_3f800cf0, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, forceExplicitReconstruction must be FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-forceExplicitReconstruction-01656)"}, - {VALIDATION_ERROR_3f800cf2, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, chromaFilter must be VK_FILTER_NEAREST' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-01657)"}, - {VALIDATION_ERROR_3f802c01, "The spec valid usage text states 'components must be a valid VkComponentMapping structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-components-parameter)"}, - {VALIDATION_ERROR_3f809201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-parameter)"}, - {VALIDATION_ERROR_3f81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-pNext-pNext)"}, - {VALIDATION_ERROR_3f82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3f83d401, "The spec valid usage text states 'ycbcrModel must be a valid VkSamplerYcbcrModelConversionKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-parameter)"}, - {VALIDATION_ERROR_3f83d601, "The spec valid usage text states 'ycbcrRange must be a valid VkSamplerYcbcrRangeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrRange-parameter)"}, - {VALIDATION_ERROR_3f83d801, "The spec valid usage text states 'xChromaOffset must be a valid VkChromaLocationKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-parameter)"}, - {VALIDATION_ERROR_3f83da01, "The spec valid usage text states 'yChromaOffset must be a valid VkChromaLocationKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-yChromaOffset-parameter)"}, - {VALIDATION_ERROR_3f83dc01, "The spec valid usage text states 'chromaFilter must be a valid VkFilter value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-parameter)"}, - {VALIDATION_ERROR_3fa00cd4, "The spec valid usage text states 'planeAspect must be a single valid plane aspect for the image format (that is, planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR for \"_2PLANE\" formats and planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR for \"_3PLANE\" formats)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-01642)"}, - {VALIDATION_ERROR_3fa00cd6, "The spec valid usage text states 'A single call to vkBindImageMemory2KHR must bind all or none of the planes of an image (i.e. bindings to all planes of an image must be made in a single vkBindImageMemory2KHR call), as separate bindings' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-None-01643)"}, - {VALIDATION_ERROR_3fa2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3fa3de01, "The spec valid usage text states 'planeAspect must be a valid VkImageAspectFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-parameter)"}, - {VALIDATION_ERROR_3fc00c70, "The spec valid usage text states 'planeAspect must be an aspect that exists in the format; that is, for a two-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, and for a three-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-01592)"}, - {VALIDATION_ERROR_3fc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_3fc3de01, "The spec valid usage text states 'planeAspect must be a valid VkImageAspectFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-parameter)"}, - {VALIDATION_ERROR_3fe00ce0, "The spec valid usage text states 'The sampler Y'CBCR conversion feature must be enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-None-01648)"}, - {VALIDATION_ERROR_3fe05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-device-parameter)"}, - {VALIDATION_ERROR_3fe0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_3fe11e01, "The spec valid usage text states 'pCreateInfo must be a pointer to a valid VkSamplerYcbcrConversionCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pCreateInfo-parameter)"}, - {VALIDATION_ERROR_3fe3e001, "The spec valid usage text states 'pYcbcrConversion must be a pointer to a VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pYcbcrConversion-parameter)"}, - {VALIDATION_ERROR_40000c8c, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-deviceIndexCount-01606)"}, - {VALIDATION_ERROR_40000c8e, "The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-01607)"}, - {VALIDATION_ERROR_40013e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter)"}, - {VALIDATION_ERROR_4001c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pNext-pNext)"}, - {VALIDATION_ERROR_4002b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_40200cc2, "The spec valid usage text states 'At least one of deviceIndexCount and SFRRectCount must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01633)"}, - {VALIDATION_ERROR_40200cc4, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01634)"}, - {VALIDATION_ERROR_40200cc6, "The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-01635)"}, - {VALIDATION_ERROR_40200cc8, "The spec valid usage text states 'SFRRectCount must either be zero or equal to the number of physical devices in the logical device squared' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-SFRRectCount-01636)"}, - {VALIDATION_ERROR_40200cca, "The spec valid usage text states 'Elements of pSFRRects that correspond to the same instance of an image must not overlap.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-01637)"}, - {VALIDATION_ERROR_40200ccc, "The spec valid usage text states 'The offset.x member of any element of pSFRRects must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of all non-metadata aspects of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01638)"}, - {VALIDATION_ERROR_40200cce, "The spec valid usage text states 'The offset.y member of any element of pSFRRects must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of all non-metadata aspects of the image' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01639)"}, - {VALIDATION_ERROR_40200cd0, "The spec valid usage text states 'The extent.width member of any element of pSFRRects must either be a multiple of the sparse image block width of all non-metadata aspects of the image, or else extent.width + offset.x must equal the width of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01640)"}, - {VALIDATION_ERROR_40200cd2, "The spec valid usage text states 'The extent.height member of any element of pSFRRects must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else extent.height offset.y must equal the width of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01641)"}, - {VALIDATION_ERROR_40213e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter)"}, - {VALIDATION_ERROR_4021c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pNext-pNext)"}, - {VALIDATION_ERROR_40222001, "The spec valid usage text states 'If SFRRectCount is not 0, pSFRRects must be a pointer to an array of SFRRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-parameter)"}, - {VALIDATION_ERROR_4022b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-sType-sType)"}, - {VALIDATION_ERROR_40405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-device-parameter)"}, - {VALIDATION_ERROR_4040ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-pAllocator-parameter)"}, - {VALIDATION_ERROR_4043e201, "The spec valid usage text states 'If ycbcrConversion is not VK_NULL_HANDLE, ycbcrConversion must be a valid VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parameter)"}, - {VALIDATION_ERROR_4043e207, "The spec valid usage text states 'If ycbcrConversion is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parent)"}, - {VALIDATION_ERROR_4062b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR-sType-sType)"}, - {VALIDATION_ERROR_4082b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionImageFormatPropertiesKHR-sType-sType)"}, - {VALIDATION_ERROR_40a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionInfoKHR-sType-sType)"}, - {VALIDATION_ERROR_40a3e601, "The spec valid usage text states 'conversion must be a valid VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSamplerYcbcrConversionInfoKHR-conversion-parameter)"}, + {VALIDATION_ERROR_3d03e801, "The spec valid usage text states 'If postSubpassSampleLocationsCount is not 0, pPostSubpassSampleLocations must be a valid pointer to an array of postSubpassSampleLocationsCount valid VkSubpassSampleLocationsEXT structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter)"}, + {VALIDATION_ERROR_3d21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3d22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_3d23c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sampleLocationsInfo-parameter)"}, + {VALIDATION_ERROR_3d41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3d42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_3d61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMultisamplePropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3d62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMultisamplePropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_3d827a01, "The spec valid usage text states 'physicalDevice must be a valid VkPhysicalDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter)"}, + {VALIDATION_ERROR_3d82b401, "The spec valid usage text states 'samples must be a valid VkSampleCountFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-samples-parameter)"}, + {VALIDATION_ERROR_3d83ca01, "The spec valid usage text states 'pMultisampleProperties must be a valid pointer to a VkMultisamplePropertiesEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-pMultisampleProperties-parameter)"}, + {VALIDATION_ERROR_3da00bfc, "The spec valid usage text states 'If initialDataSize is not 0, it must be equal to the size of pInitialData, as returned by vkGetValidationCacheDataEXT when pInitialData was originally retrieved' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01534)"}, + {VALIDATION_ERROR_3da00bfe, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must have been retrieved from a previous call to vkGetValidationCacheDataEXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01535)"}, + {VALIDATION_ERROR_3da09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-flags-zerobitmask)"}, + {VALIDATION_ERROR_3da19601, "The spec valid usage text states 'If initialDataSize is not 0, pInitialData must be a valid pointer to an array of initialDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-pInitialData-parameter)"}, + {VALIDATION_ERROR_3da1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3da2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkValidationCacheCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_3dc1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_3dc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_3dc3c401, "The spec valid usage text states 'validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkShaderModuleValidationCacheCreateInfoEXT-validationCache-parameter)"}, + {VALIDATION_ERROR_3de05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateValidationCacheEXT-device-parameter)"}, + {VALIDATION_ERROR_3de0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_3de11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkValidationCacheCreateInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_3de3c201, "The spec valid usage text states 'pValidationCache must be a valid pointer to a VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateValidationCacheEXT-pValidationCache-parameter)"}, + {VALIDATION_ERROR_3e005601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-device-parameter)"}, + {VALIDATION_ERROR_3e012201, "The spec valid usage text states 'If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a valid pointer to an array of pDataSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-pData-parameter)"}, + {VALIDATION_ERROR_3e012401, "The spec valid usage text states 'pDataSize must be a valid pointer to a size_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-pDataSize-parameter)"}, + {VALIDATION_ERROR_3e03c401, "The spec valid usage text states 'validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-validationCache-parameter)"}, + {VALIDATION_ERROR_3e03c407, "The spec valid usage text states 'validationCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetValidationCacheDataEXT-validationCache-parent)"}, + {VALIDATION_ERROR_3e200bf0, "The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-None-01528)"}, + {VALIDATION_ERROR_3e200bf2, "The spec valid usage text states 'The sampleLocationsPerPixel member of pSampleLocationsInfo must equal the rasterizationSamples member of the VkPipelineMultisampleStateCreateInfo structure the currently bound graphics pipeline has been created with' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-sampleLocationsPerPixel-01529)"}, + {VALIDATION_ERROR_3e200bf4, "The spec valid usage text states 'If VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE then the current render pass must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose pPostSubpassSampleLocations member contains an element with a subpassIndex matching the current subpass index and the sampleLocationsInfo member of that element must match the sample locations state pointed to by pSampleLocationsInfo' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-variableSampleLocations-01530)"}, + {VALIDATION_ERROR_3e202401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter)"}, + {VALIDATION_ERROR_3e202413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-recording)"}, + {VALIDATION_ERROR_3e202415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_3e23c801, "The spec valid usage text states 'pSampleLocationsInfo must be a valid pointer to a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdSetSampleLocationsEXT-pSampleLocationsInfo-parameter)"}, + {VALIDATION_ERROR_3e400c02, "The spec valid usage text states 'If VkAllocationCallbacks were provided when validationCache was created, a compatible set of callbacks must be provided here' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-01537)"}, + {VALIDATION_ERROR_3e400c04, "The spec valid usage text states 'If no VkAllocationCallbacks were provided when validationCache was created, pAllocator must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-01538)"}, + {VALIDATION_ERROR_3e405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-device-parameter)"}, + {VALIDATION_ERROR_3e40ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-pAllocator-parameter)"}, + {VALIDATION_ERROR_3e43c401, "The spec valid usage text states 'If validationCache is not VK_NULL_HANDLE, validationCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-parameter)"}, + {VALIDATION_ERROR_3e43c407, "The spec valid usage text states 'If validationCache is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroyValidationCacheEXT-validationCache-parent)"}, + {VALIDATION_ERROR_3e600c00, "The spec valid usage text states 'dstCache must not appear in the list of source caches' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-01536)"}, + {VALIDATION_ERROR_3e605601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-device-parameter)"}, + {VALIDATION_ERROR_3e606e01, "The spec valid usage text states 'dstCache must be a valid VkValidationCacheEXT handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-parameter)"}, + {VALIDATION_ERROR_3e606e07, "The spec valid usage text states 'dstCache must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-dstCache-parent)"}, + {VALIDATION_ERROR_3e623c01, "The spec valid usage text states 'pSrcCaches must be a valid pointer to an array of srcCacheCount valid VkValidationCacheEXT handles' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-pSrcCaches-parameter)"}, + {VALIDATION_ERROR_3e623c07, "The spec valid usage text states 'Each element of pSrcCaches must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-pSrcCaches-parent)"}, + {VALIDATION_ERROR_3e62ca1b, "The spec valid usage text states 'srcCacheCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkMergeValidationCachesEXT-srcCacheCount-arraylength)"}, + {VALIDATION_ERROR_3e800bf6, "The spec valid usage text states 'attachmentIndex must be less than the attachmentCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::renderPass was created with' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAttachmentSampleLocationsEXT-attachmentIndex-01531)"}, + {VALIDATION_ERROR_3e83c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkAttachmentSampleLocationsEXT-sampleLocationsInfo-parameter)"}, + {VALIDATION_ERROR_3ea00bf8, "The spec valid usage text states 'subpassIndex must be less than the subpassCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::renderPass was created with' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassSampleLocationsEXT-subpassIndex-01532)"}, + {VALIDATION_ERROR_3ea3c601, "The spec valid usage text states 'sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassSampleLocationsEXT-sampleLocationsInfo-parameter)"}, + {VALIDATION_ERROR_3ec1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDevicePointClippingPropertiesKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3ec2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDevicePointClippingPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_3ee00c01, "The spec valid usage text states 'aspectMask must be a valid combination of VkImageAspectFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-parameter)"}, + {VALIDATION_ERROR_3ee00c03, "The spec valid usage text states 'aspectMask must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-requiredbitmask)"}, + {VALIDATION_ERROR_3ee00c40, "The spec valid usage text states 'There must be an input attachment at pCreateInfo::pSubpasses[subpass].pInputAttachments[inputAttachment].' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-pCreateInfo-01568)"}, + {VALIDATION_ERROR_3ee00c42, "The spec valid usage text states 'The specified input attachment must have more than one aspect mask.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-None-01569)"}, + {VALIDATION_ERROR_3ee00c44, "The spec valid usage text states 'aspectMask must be a subset of the aspect masks in the specified input attachment.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-01570)"}, + {VALIDATION_ERROR_3f01c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3f02b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3f03ce1b, "The spec valid usage text states 'aspectReferenceCount must be greater than 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-aspectReferenceCount-arraylength)"}, + {VALIDATION_ERROR_3f03d001, "The spec valid usage text states 'pAspectReferences must be a valid pointer to an array of aspectReferenceCount valid VkInputAttachmentAspectReferenceKHR structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pAspectReferences-parameter)"}, + {VALIDATION_ERROR_3f200c66, "The spec valid usage text states 'usage must not include any set bits that were not set in the usage member of the VkImageCreateInfo structure used to create the image this image view is created from.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-01587)"}, + {VALIDATION_ERROR_3f21c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3f22b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3f230601, "The spec valid usage text states 'usage must be a valid combination of VkImageUsageFlagBits values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-parameter)"}, + {VALIDATION_ERROR_3f230603, "The spec valid usage text states 'usage must not be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageViewUsageCreateInfoKHR-usage-requiredbitmask)"}, + {VALIDATION_ERROR_3f41c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3f42b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3f43d201, "The spec valid usage text states 'domainOrigin must be a valid VkTessellationDomainOriginKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-domainOrigin-parameter)"}, + {VALIDATION_ERROR_3f600c54, "The spec valid usage text states 'If viewFormatCount is not 0, all of the formats in the pViewFormats array must be compatible with the format specified in the format field of VkImageCreateInfo, as described in the compatibility table.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01578)"}, + {VALIDATION_ERROR_3f600c56, "The spec valid usage text states 'If VkImageCreateInfo::flags does not contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, viewFormatCount must be 0 or 1.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-flags-01579)"}, + {VALIDATION_ERROR_3f600c58, "The spec valid usage text states 'If viewFormatCount is not 0, VkImageCreateInfo::format must be in pViewFormats.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01580)"}, + {VALIDATION_ERROR_3f61c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3f62b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3f63e401, "The spec valid usage text states 'If viewFormatCount is not 0, pViewFormats must be a valid pointer to an array of viewFormatCount valid VkFormat values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImageFormatListCreateInfoKHR-pViewFormats-parameter)"}, + {VALIDATION_ERROR_3f800ce2, "The spec valid usage text states 'format must not be VK_FORMAT_UNDEFINED' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01649)"}, + {VALIDATION_ERROR_3f800ce4, "The spec valid usage text states 'format must support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR or VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01650)"}, + {VALIDATION_ERROR_3f800ce6, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_COSITED_EVEN_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01651)"}, + {VALIDATION_ERROR_3f800ce8, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_MIDPOINT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01652)"}, + {VALIDATION_ERROR_3f800cea, "The spec valid usage text states 'format must represent unsigned normalized values (i.e. the format must be a UNORM format)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01653)"}, + {VALIDATION_ERROR_3f800cec, "The spec valid usage text states 'If the format has a _422 or _420 suffix:' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-None-01654)"}, + {VALIDATION_ERROR_3f800cee, "The spec valid usage text states 'If ycbcrModel is not VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, then components.r, components.g, and components.b must correspond to channels of the format; that is, components.r, components.g, and components.b must not be VK_COMPONENT_SWIZZLE_ZERO or VK_COMPONENT_SWIZZLE_ONE, and must not correspond to a channel which contains zero or one as a consequence of conversion to RGBA' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-01655)"}, + {VALIDATION_ERROR_3f800cf0, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, forceExplicitReconstruction must be FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-forceExplicitReconstruction-01656)"}, + {VALIDATION_ERROR_3f800cf2, "The spec valid usage text states 'If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, chromaFilter must be VK_FILTER_NEAREST' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-01657)"}, + {VALIDATION_ERROR_3f802c01, "The spec valid usage text states 'components must be a valid VkComponentMapping structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-components-parameter)"}, + {VALIDATION_ERROR_3f809201, "The spec valid usage text states 'format must be a valid VkFormat value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-parameter)"}, + {VALIDATION_ERROR_3f81c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-pNext-pNext)"}, + {VALIDATION_ERROR_3f82b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3f83d401, "The spec valid usage text states 'ycbcrModel must be a valid VkSamplerYcbcrModelConversionKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-parameter)"}, + {VALIDATION_ERROR_3f83d601, "The spec valid usage text states 'ycbcrRange must be a valid VkSamplerYcbcrRangeKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrRange-parameter)"}, + {VALIDATION_ERROR_3f83d801, "The spec valid usage text states 'xChromaOffset must be a valid VkChromaLocationKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-parameter)"}, + {VALIDATION_ERROR_3f83da01, "The spec valid usage text states 'yChromaOffset must be a valid VkChromaLocationKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-yChromaOffset-parameter)"}, + {VALIDATION_ERROR_3f83dc01, "The spec valid usage text states 'chromaFilter must be a valid VkFilter value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-parameter)"}, + {VALIDATION_ERROR_3fa00cd4, "The spec valid usage text states 'planeAspect must be a single valid plane aspect for the image format (that is, planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR for \"_2PLANE\" formats and planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR for \"_3PLANE\" formats)' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-01642)"}, + {VALIDATION_ERROR_3fa00cd6, "The spec valid usage text states 'A single call to vkBindImageMemory2KHR must bind all or none of the planes of an image (i.e. bindings to all planes of an image must be made in a single vkBindImageMemory2KHR call), as separate bindings' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-None-01643)"}, + {VALIDATION_ERROR_3fa2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3fa3de01, "The spec valid usage text states 'planeAspect must be a valid VkImageAspectFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-parameter)"}, + {VALIDATION_ERROR_3fc00c70, "The spec valid usage text states 'planeAspect must be an aspect that exists in the format; that is, for a two-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, and for a three-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-01592)"}, + {VALIDATION_ERROR_3fc2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_3fc3de01, "The spec valid usage text states 'planeAspect must be a valid VkImageAspectFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-parameter)"}, + {VALIDATION_ERROR_3fe00ce0, "The spec valid usage text states 'The sampler Y'CBCR conversion feature must be enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-None-01648)"}, + {VALIDATION_ERROR_3fe05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-device-parameter)"}, + {VALIDATION_ERROR_3fe0ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_3fe11e01, "The spec valid usage text states 'pCreateInfo must be a valid pointer to a valid VkSamplerYcbcrConversionCreateInfoKHR structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pCreateInfo-parameter)"}, + {VALIDATION_ERROR_3fe3e001, "The spec valid usage text states 'pYcbcrConversion must be a valid pointer to a VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCreateSamplerYcbcrConversionKHR-pYcbcrConversion-parameter)"}, + {VALIDATION_ERROR_40000c8c, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-deviceIndexCount-01606)"}, + {VALIDATION_ERROR_40000c8e, "The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-01607)"}, + {VALIDATION_ERROR_40013e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a valid pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter)"}, + {VALIDATION_ERROR_4001c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pNext-pNext)"}, + {VALIDATION_ERROR_4002b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindBufferMemoryDeviceGroupInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_40200cc2, "The spec valid usage text states 'At least one of deviceIndexCount and SFRRectCount must be zero.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01633)"}, + {VALIDATION_ERROR_40200cc4, "The spec valid usage text states 'deviceIndexCount must either be zero or equal to the number of physical devices in the logical device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01634)"}, + {VALIDATION_ERROR_40200cc6, "The spec valid usage text states 'All elements of pDeviceIndices must be valid device indices.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-01635)"}, + {VALIDATION_ERROR_40200cc8, "The spec valid usage text states 'SFRRectCount must either be zero or equal to the number of physical devices in the logical device squared' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-SFRRectCount-01636)"}, + {VALIDATION_ERROR_40200cca, "The spec valid usage text states 'Elements of pSFRRects that correspond to the same instance of an image must not overlap.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-01637)"}, + {VALIDATION_ERROR_40200ccc, "The spec valid usage text states 'The offset.x member of any element of pSFRRects must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of all non-metadata aspects of the image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01638)"}, + {VALIDATION_ERROR_40200cce, "The spec valid usage text states 'The offset.y member of any element of pSFRRects must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of all non-metadata aspects of the image' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01639)"}, + {VALIDATION_ERROR_40200cd0, "The spec valid usage text states 'The extent.width member of any element of pSFRRects must either be a multiple of the sparse image block width of all non-metadata aspects of the image, or else extent.width + offset.x must equal the width of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01640)"}, + {VALIDATION_ERROR_40200cd2, "The spec valid usage text states 'The extent.height member of any element of pSFRRects must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else extent.height offset.y must equal the width of the image subresource' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01641)"}, + {VALIDATION_ERROR_40213e01, "The spec valid usage text states 'If deviceIndexCount is not 0, pDeviceIndices must be a valid pointer to an array of deviceIndexCount uint32_t values' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter)"}, + {VALIDATION_ERROR_4021c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pNext-pNext)"}, + {VALIDATION_ERROR_40222001, "The spec valid usage text states 'If SFRRectCount is not 0, pSFRRects must be a valid pointer to an array of SFRRectCount VkRect2D structures' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-parameter)"}, + {VALIDATION_ERROR_4022b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkBindImageMemoryDeviceGroupInfoKHX-sType-sType)"}, + {VALIDATION_ERROR_40405601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-device-parameter)"}, + {VALIDATION_ERROR_4040ec01, "The spec valid usage text states 'If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-pAllocator-parameter)"}, + {VALIDATION_ERROR_4043e201, "The spec valid usage text states 'If ycbcrConversion is not VK_NULL_HANDLE, ycbcrConversion must be a valid VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parameter)"}, + {VALIDATION_ERROR_4043e207, "The spec valid usage text states 'If ycbcrConversion is a valid handle, it must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parent)"}, + {VALIDATION_ERROR_4062b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR-sType-sType)"}, + {VALIDATION_ERROR_4082b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionImageFormatPropertiesKHR-sType-sType)"}, + {VALIDATION_ERROR_40a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionInfoKHR-sType-sType)"}, + {VALIDATION_ERROR_40a3e601, "The spec valid usage text states 'conversion must be a valid VkSamplerYcbcrConversionKHR handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSamplerYcbcrConversionInfoKHR-conversion-parameter)"}, + {VALIDATION_ERROR_40c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_40c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_40c3ea01, "The spec valid usage text states 'globalPriority must be a valid VkQueueGlobalPriorityEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-globalPriority-parameter)"}, + {VALIDATION_ERROR_40e05601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-device-parameter)"}, + {VALIDATION_ERROR_40e27c01, "The spec valid usage text states 'pipeline must be a valid VkPipeline handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-pipeline-parameter)"}, + {VALIDATION_ERROR_40e27c07, "The spec valid usage text states 'pipeline must have been created, allocated, or retrieved from device' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-pipeline-parent)"}, + {VALIDATION_ERROR_40e39c01, "The spec valid usage text states 'If the value referenced by pInfoSize is not 0, and pInfo is not NULL, pInfo must be a valid pointer to an array of pInfoSize bytes' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-pInfo-parameter)"}, + {VALIDATION_ERROR_40e3ec01, "The spec valid usage text states 'shaderStage must be a valid VkShaderStageFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-shaderStage-parameter)"}, + {VALIDATION_ERROR_40e3ee01, "The spec valid usage text states 'infoType must be a valid VkShaderInfoTypeAMD value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-infoType-parameter)"}, + {VALIDATION_ERROR_40e3f001, "The spec valid usage text states 'pInfoSize must be a valid pointer to a size_t value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetShaderInfoAMD-pInfoSize-parameter)"}, + {VALIDATION_ERROR_41200da6, "The spec valid usage text states 'If handleType is not 0, it must be supported for import, as reported in VkExternalMemoryPropertiesKHR' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-handleType-01747)"}, + {VALIDATION_ERROR_41200da8, "The spec valid usage text states 'If handleType is not 0, it must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-handleType-01748)"}, + {VALIDATION_ERROR_41200daa, "The spec valid usage text states 'pHostPointer must be a pointer aligned to an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-01749)"}, + {VALIDATION_ERROR_41200dac, "The spec valid usage text states 'If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained to' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-handleType-01750)"}, + {VALIDATION_ERROR_41200dae, "The spec valid usage text states 'If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host mapped foreign memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained to' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-handleType-01751)"}, + {VALIDATION_ERROR_41209c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter)"}, + {VALIDATION_ERROR_4121c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_4122b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkImportMemoryHostPointerInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_4141c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryHostPointerPropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_4142b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkMemoryHostPointerPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_4161c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_4162b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_41800db0, "The spec valid usage text states 'handleType must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01752)"}, + {VALIDATION_ERROR_41800db2, "The spec valid usage text states 'pHostPointer must be a pointer aligned to an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-pHostPointer-01753)"}, + {VALIDATION_ERROR_41800db4, "The spec valid usage text states 'If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, pHostPointer must be a pointer to host memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01754)"}, + {VALIDATION_ERROR_41800db6, "The spec valid usage text states 'If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, pHostPointer must be a pointer to host mapped foreign memory' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01755)"}, + {VALIDATION_ERROR_41805601, "The spec valid usage text states 'device must be a valid VkDevice handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-device-parameter)"}, + {VALIDATION_ERROR_41809c01, "The spec valid usage text states 'handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-parameter)"}, + {VALIDATION_ERROR_4183f401, "The spec valid usage text states 'pMemoryHostPointerProperties must be a valid pointer to a VkMemoryHostPointerPropertiesEXT structure' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkGetMemoryHostPointerPropertiesEXT-pMemoryHostPointerProperties-parameter)"}, + {VALIDATION_ERROR_41a1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-pNext-pNext)"}, + {VALIDATION_ERROR_41a2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-sType-sType)"}, + {VALIDATION_ERROR_41c00dd2, "The spec valid usage text states 'extraPrimitiveOverestimationSize must be in the range of 0.0 to VkPhysicalDeviceConservativeRasterizationPropertiesEXT::maxExtraPrimitiveOverestimationSize inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-extraPrimitiveOverestimationSize-01769)"}, + {VALIDATION_ERROR_41c09005, "The spec valid usage text states 'flags must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-flags-zerobitmask)"}, + {VALIDATION_ERROR_41c1c40d, "The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-pNext-pNext)"}, + {VALIDATION_ERROR_41c2b00b, "The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-sType-sType)"}, + {VALIDATION_ERROR_41c3f801, "The spec valid usage text states 'conservativeRasterizationMode must be a valid VkConservativeRasterizationModeEXT value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-conservativeRasterizationMode-parameter)"}, + {VALIDATION_ERROR_41e00009, "The spec valid usage text states 'Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-commonparent)"}, + {VALIDATION_ERROR_41e00e0c, "The spec valid usage text states 'dstOffset must be less than or equal to the size of dstBuffer minus 4.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01798)"}, + {VALIDATION_ERROR_41e00e0e, "The spec valid usage text states 'dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01799)"}, + {VALIDATION_ERROR_41e00e10, "The spec valid usage text states 'If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01800)"}, + {VALIDATION_ERROR_41e00e12, "The spec valid usage text states 'dstOffset must be a multiple of 4' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01801)"}, + {VALIDATION_ERROR_41e02401, "The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter)"}, + {VALIDATION_ERROR_41e02413, "The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-recording)"}, + {VALIDATION_ERROR_41e02415, "The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-cmdpool)"}, + {VALIDATION_ERROR_41e06c01, "The spec valid usage text states 'dstBuffer must be a valid VkBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-parameter)"}, + {VALIDATION_ERROR_41e28401, "The spec valid usage text states 'pipelineStage must be a valid VkPipelineStageFlagBits value' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-parameter)"}, }; diff --git a/sources/third_party/vulkan/src/layers/xxhash.c b/sources/third_party/vulkan/src/layers/xxhash.c new file mode 100644 index 0000000000000000000000000000000000000000..833b99f3b2147ed9e0bf90e25119eb3d89a80fcd --- /dev/null +++ b/sources/third_party/vulkan/src/layers/xxhash.c @@ -0,0 +1,888 @@ +/* +* xxHash - Fast Hash algorithm +* Copyright (C) 2012-2016, Yann Collet +* +* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following disclaimer +* in the documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* You can contact the author at : +* - xxHash homepage: http://www.xxhash.com +* - xxHash source repository : https://github.com/Cyan4973/xxHash +*/ + + +/* ************************************* +* Tuning parameters +***************************************/ +/*!XXH_FORCE_MEMORY_ACCESS : + * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. + * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. + * The below switch allow to select different access method for improved performance. + * Method 0 (default) : use `memcpy()`. Safe and portable. + * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). + * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. + * Method 2 : direct access. This method doesn't depend on compiler but violate C standard. + * It can generate buggy code on targets which do not support unaligned memory accesses. + * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) + * See http://stackoverflow.com/a/32095106/646947 for details. + * Prefer these methods in priority order (0 > 1 > 2) + */ +#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ +# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) +# define XXH_FORCE_MEMORY_ACCESS 2 +# elif defined(__INTEL_COMPILER) || \ + (defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) )) +# define XXH_FORCE_MEMORY_ACCESS 1 +# endif +#endif + +/*!XXH_ACCEPT_NULL_INPUT_POINTER : + * If the input pointer is a null pointer, xxHash default behavior is to trigger a memory access error, since it is a bad pointer. + * When this option is enabled, xxHash output for null input pointers will be the same as a null-length input. + * By default, this option is disabled. To enable it, uncomment below define : + */ +/* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */ + +/*!XXH_FORCE_NATIVE_FORMAT : + * By default, xxHash library provides endian-independent Hash values, based on little-endian convention. + * Results are therefore identical for little-endian and big-endian CPU. + * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. + * Should endian-independence be of no importance for your application, you may set the #define below to 1, + * to improve speed for Big-endian CPU. + * This option has no impact on Little_Endian CPU. + */ +#ifndef XXH_FORCE_NATIVE_FORMAT /* can be defined externally */ +# define XXH_FORCE_NATIVE_FORMAT 0 +#endif + +/*!XXH_FORCE_ALIGN_CHECK : + * This is a minor performance trick, only useful with lots of very small keys. + * It means : check for aligned/unaligned input. + * The check costs one initial branch per hash; + * set it to 0 when the input is guaranteed to be aligned, + * or when alignment doesn't matter for performance. + */ +#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ +# if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) +# define XXH_FORCE_ALIGN_CHECK 0 +# else +# define XXH_FORCE_ALIGN_CHECK 1 +# endif +#endif + + +/* ************************************* +* Includes & Memory related functions +***************************************/ +/*! Modify the local functions below should you wish to use some other memory routines +* for malloc(), free() */ +#include +static void* XXH_malloc(size_t s) { return malloc(s); } +static void XXH_free (void* p) { free(p); } +/*! and for memcpy() */ +#include +static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); } + +#define XXH_STATIC_LINKING_ONLY +#include "xxhash.h" + + +/* ************************************* +* Compiler Specific Options +***************************************/ +#ifdef _MSC_VER /* Visual Studio */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# define FORCE_INLINE static __forceinline +#else +# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +# else +# define FORCE_INLINE static +# endif /* __STDC_VERSION__ */ +#endif + + +/* ************************************* +* Basic Types +***************************************/ +#ifndef MEM_MODULE +# if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint8_t BYTE; + typedef uint16_t U16; + typedef uint32_t U32; +# else + typedef unsigned char BYTE; + typedef unsigned short U16; + typedef unsigned int U32; +# endif +#endif + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +static U32 XXH_read32(const void* memPtr) { return *(const U32*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ +/* currently only defined for gcc and icc */ +typedef union { U32 u32; } __attribute__((packed)) unalign; +static U32 XXH_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } + +#else + +/* portable and safe solution. Generally efficient. + * see : http://stackoverflow.com/a/32095106/646947 + */ +static U32 XXH_read32(const void* memPtr) +{ + U32 val; + memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + + +/* **************************************** +* Compiler-specific Functions and Macros +******************************************/ +#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +/* Note : although _rotl exists for minGW (GCC under windows), performance seems poor */ +#if defined(_MSC_VER) +# define XXH_rotl32(x,r) _rotl(x,r) +# define XXH_rotl64(x,r) _rotl64(x,r) +#else +# define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r))) +# define XXH_rotl64(x,r) ((x << r) | (x >> (64 - r))) +#endif + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap32 _byteswap_ulong +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap32 __builtin_bswap32 +#else +static U32 XXH_swap32 (U32 x) +{ + return ((x << 24) & 0xff000000 ) | + ((x << 8) & 0x00ff0000 ) | + ((x >> 8) & 0x0000ff00 ) | + ((x >> 24) & 0x000000ff ); +} +#endif + + +/* ************************************* +* Architecture Macros +***************************************/ +typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; + +/* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example on the compiler command line */ +#ifndef XXH_CPU_LITTLE_ENDIAN + static const int g_one = 1; +# define XXH_CPU_LITTLE_ENDIAN (*(const char*)(&g_one)) +#endif + + +/* *************************** +* Memory reads +*****************************/ +typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; + +FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +{ + if (align==XXH_unaligned) + return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); + else + return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr); +} + +FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian) +{ + return XXH_readLE32_align(ptr, endian, XXH_unaligned); +} + +static U32 XXH_readBE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); +} + + +/* ************************************* +* Macros +***************************************/ +#define XXH_STATIC_ASSERT(c) { enum { XXH_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ +XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } + + +/* ******************************************************************* +* 32-bits hash functions +*********************************************************************/ +static const U32 PRIME32_1 = 2654435761U; +static const U32 PRIME32_2 = 2246822519U; +static const U32 PRIME32_3 = 3266489917U; +static const U32 PRIME32_4 = 668265263U; +static const U32 PRIME32_5 = 374761393U; + +static U32 XXH32_round(U32 seed, U32 input) +{ + seed += input * PRIME32_2; + seed = XXH_rotl32(seed, 13); + seed *= PRIME32_1; + return seed; +} + +FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align) +{ + const BYTE* p = (const BYTE*)input; + const BYTE* bEnd = p + len; + U32 h32; +#define XXH_get32bits(p) XXH_readLE32_align(p, endian, align) + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (p==NULL) { + len=0; + bEnd=p=(const BYTE*)(size_t)16; + } +#endif + + if (len>=16) { + const BYTE* const limit = bEnd - 16; + U32 v1 = seed + PRIME32_1 + PRIME32_2; + U32 v2 = seed + PRIME32_2; + U32 v3 = seed + 0; + U32 v4 = seed - PRIME32_1; + + do { + v1 = XXH32_round(v1, XXH_get32bits(p)); p+=4; + v2 = XXH32_round(v2, XXH_get32bits(p)); p+=4; + v3 = XXH32_round(v3, XXH_get32bits(p)); p+=4; + v4 = XXH32_round(v4, XXH_get32bits(p)); p+=4; + } while (p<=limit); + + h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); + } else { + h32 = seed + PRIME32_5; + } + + h32 += (U32) len; + + while (p+4<=bEnd) { + h32 += XXH_get32bits(p) * PRIME32_3; + h32 = XXH_rotl32(h32, 17) * PRIME32_4 ; + p+=4; + } + + while (p> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + + +XXH_PUBLIC_API unsigned int XXH32 (const void* input, size_t len, unsigned int seed) +{ +#if 0 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH32_state_t state; + XXH32_reset(&state, seed); + XXH32_update(&state, input, len); + return XXH32_digest(&state); +#else + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned); + else + return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned); + } } + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned); + else + return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned); +#endif +} + + + +/*====== Hash streaming ======*/ + +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) +{ + return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); +} +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) +{ + memcpy(dstState, srcState, sizeof(*dstState)); +} + +XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, unsigned int seed) +{ + XXH32_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ + memset(&state, 0, sizeof(state)-4); /* do not write into reserved, for future removal */ + state.v1 = seed + PRIME32_1 + PRIME32_2; + state.v2 = seed + PRIME32_2; + state.v3 = seed + 0; + state.v4 = seed - PRIME32_1; + memcpy(statePtr, &state, sizeof(state)); + return XXH_OK; +} + + +FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state, const void* input, size_t len, XXH_endianess endian) +{ + const BYTE* p = (const BYTE*)input; + const BYTE* const bEnd = p + len; + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (input==NULL) return XXH_ERROR; +#endif + + state->total_len_32 += (unsigned)len; + state->large_len |= (len>=16) | (state->total_len_32>=16); + + if (state->memsize + len < 16) { /* fill in tmp buffer */ + XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); + state->memsize += (unsigned)len; + return XXH_OK; + } + + if (state->memsize) { /* some data left from previous update */ + XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); + { const U32* p32 = state->mem32; + state->v1 = XXH32_round(state->v1, XXH_readLE32(p32, endian)); p32++; + state->v2 = XXH32_round(state->v2, XXH_readLE32(p32, endian)); p32++; + state->v3 = XXH32_round(state->v3, XXH_readLE32(p32, endian)); p32++; + state->v4 = XXH32_round(state->v4, XXH_readLE32(p32, endian)); + } + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= bEnd-16) { + const BYTE* const limit = bEnd - 16; + U32 v1 = state->v1; + U32 v2 = state->v2; + U32 v3 = state->v3; + U32 v4 = state->v4; + + do { + v1 = XXH32_round(v1, XXH_readLE32(p, endian)); p+=4; + v2 = XXH32_round(v2, XXH_readLE32(p, endian)); p+=4; + v3 = XXH32_round(v3, XXH_readLE32(p, endian)); p+=4; + v4 = XXH32_round(v4, XXH_readLE32(p, endian)); p+=4; + } while (p<=limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < bEnd) { + XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_update_endian(state_in, input, len, XXH_littleEndian); + else + return XXH32_update_endian(state_in, input, len, XXH_bigEndian); +} + + + +FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianess endian) +{ + const BYTE * p = (const BYTE*)state->mem32; + const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize; + U32 h32; + + if (state->large_len) { + h32 = XXH_rotl32(state->v1, 1) + XXH_rotl32(state->v2, 7) + XXH_rotl32(state->v3, 12) + XXH_rotl32(state->v4, 18); + } else { + h32 = state->v3 /* == seed */ + PRIME32_5; + } + + h32 += state->total_len_32; + + while (p+4<=bEnd) { + h32 += XXH_readLE32(p, endian) * PRIME32_3; + h32 = XXH_rotl32(h32, 17) * PRIME32_4; + p+=4; + } + + while (p> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + + +XXH_PUBLIC_API unsigned int XXH32_digest (const XXH32_state_t* state_in) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_digest_endian(state_in, XXH_littleEndian); + else + return XXH32_digest_endian(state_in, XXH_bigEndian); +} + + +/*====== Canonical representation ======*/ + +/*! Default XXH result types are basic unsigned 32 and 64 bits. +* The canonical representation follows human-readable write convention, aka big-endian (large digits first). +* These functions allow transformation of hash result into and from its canonical format. +* This way, hash values can be written into a file or buffer, and remain comparable across different systems and programs. +*/ + +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); + memcpy(dst, &hash, sizeof(*dst)); +} + +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) +{ + return XXH_readBE32(src); +} + + +#ifndef XXH_NO_LONG_LONG + +/* ******************************************************************* +* 64-bits hash functions +*********************************************************************/ + +/*====== Memory access ======*/ + +#ifndef MEM_MODULE +# define MEM_MODULE +# if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint64_t U64; +# else + typedef unsigned long long U64; /* if your compiler doesn't support unsigned long long, replace by another 64-bit type here. Note that xxhash.h will also need to be updated. */ +# endif +#endif + + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +static U64 XXH_read64(const void* memPtr) { return *(const U64*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ +/* currently only defined for gcc and icc */ +typedef union { U32 u32; U64 u64; } __attribute__((packed)) unalign64; +static U64 XXH_read64(const void* ptr) { return ((const unalign64*)ptr)->u64; } + +#else + +/* portable and safe solution. Generally efficient. + * see : http://stackoverflow.com/a/32095106/646947 + */ + +static U64 XXH_read64(const void* memPtr) +{ + U64 val; + memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap64 _byteswap_uint64 +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap64 __builtin_bswap64 +#else +static U64 XXH_swap64 (U64 x) +{ + return ((x << 56) & 0xff00000000000000ULL) | + ((x << 40) & 0x00ff000000000000ULL) | + ((x << 24) & 0x0000ff0000000000ULL) | + ((x << 8) & 0x000000ff00000000ULL) | + ((x >> 8) & 0x00000000ff000000ULL) | + ((x >> 24) & 0x0000000000ff0000ULL) | + ((x >> 40) & 0x000000000000ff00ULL) | + ((x >> 56) & 0x00000000000000ffULL); +} +#endif + +FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +{ + if (align==XXH_unaligned) + return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); + else + return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr); +} + +FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) +{ + return XXH_readLE64_align(ptr, endian, XXH_unaligned); +} + +static U64 XXH_readBE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); +} + + +/*====== xxh64 ======*/ + +static const U64 PRIME64_1 = 11400714785074694791ULL; +static const U64 PRIME64_2 = 14029467366897019727ULL; +static const U64 PRIME64_3 = 1609587929392839161ULL; +static const U64 PRIME64_4 = 9650029242287828579ULL; +static const U64 PRIME64_5 = 2870177450012600261ULL; + +static U64 XXH64_round(U64 acc, U64 input) +{ + acc += input * PRIME64_2; + acc = XXH_rotl64(acc, 31); + acc *= PRIME64_1; + return acc; +} + +static U64 XXH64_mergeRound(U64 acc, U64 val) +{ + val = XXH64_round(0, val); + acc ^= val; + acc = acc * PRIME64_1 + PRIME64_4; + return acc; +} + +FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align) +{ + const BYTE* p = (const BYTE*)input; + const BYTE* bEnd = p + len; + U64 h64; +#define XXH_get64bits(p) XXH_readLE64_align(p, endian, align) + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (p==NULL) { + len=0; + bEnd=p=(const BYTE*)(size_t)32; + } +#endif + + if (len>=32) { + const BYTE* const limit = bEnd - 32; + U64 v1 = seed + PRIME64_1 + PRIME64_2; + U64 v2 = seed + PRIME64_2; + U64 v3 = seed + 0; + U64 v4 = seed - PRIME64_1; + + do { + v1 = XXH64_round(v1, XXH_get64bits(p)); p+=8; + v2 = XXH64_round(v2, XXH_get64bits(p)); p+=8; + v3 = XXH64_round(v3, XXH_get64bits(p)); p+=8; + v4 = XXH64_round(v4, XXH_get64bits(p)); p+=8; + } while (p<=limit); + + h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); + h64 = XXH64_mergeRound(h64, v1); + h64 = XXH64_mergeRound(h64, v2); + h64 = XXH64_mergeRound(h64, v3); + h64 = XXH64_mergeRound(h64, v4); + + } else { + h64 = seed + PRIME64_5; + } + + h64 += (U64) len; + + while (p+8<=bEnd) { + U64 const k1 = XXH64_round(0, XXH_get64bits(p)); + h64 ^= k1; + h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; + p+=8; + } + + if (p+4<=bEnd) { + h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1; + h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; + p+=4; + } + + while (p> 33; + h64 *= PRIME64_2; + h64 ^= h64 >> 29; + h64 *= PRIME64_3; + h64 ^= h64 >> 32; + + return h64; +} + + +XXH_PUBLIC_API unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed) +{ +#if 0 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH64_state_t state; + XXH64_reset(&state, seed); + XXH64_update(&state, input, len); + return XXH64_digest(&state); +#else + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */ + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned); + else + return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned); + } } + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned); + else + return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned); +#endif +} + +/*====== Hash Streaming ======*/ + +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) +{ + return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); +} +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dstState, const XXH64_state_t* srcState) +{ + memcpy(dstState, srcState, sizeof(*dstState)); +} + +XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, unsigned long long seed) +{ + XXH64_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ + memset(&state, 0, sizeof(state)-8); /* do not write into reserved, for future removal */ + state.v1 = seed + PRIME64_1 + PRIME64_2; + state.v2 = seed + PRIME64_2; + state.v3 = seed + 0; + state.v4 = seed - PRIME64_1; + memcpy(statePtr, &state, sizeof(state)); + return XXH_OK; +} + +FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, const void* input, size_t len, XXH_endianess endian) +{ + const BYTE* p = (const BYTE*)input; + const BYTE* const bEnd = p + len; + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (input==NULL) return XXH_ERROR; +#endif + + state->total_len += len; + + if (state->memsize + len < 32) { /* fill in tmp buffer */ + XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, len); + state->memsize += (U32)len; + return XXH_OK; + } + + if (state->memsize) { /* tmp buffer is full */ + XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, 32-state->memsize); + state->v1 = XXH64_round(state->v1, XXH_readLE64(state->mem64+0, endian)); + state->v2 = XXH64_round(state->v2, XXH_readLE64(state->mem64+1, endian)); + state->v3 = XXH64_round(state->v3, XXH_readLE64(state->mem64+2, endian)); + state->v4 = XXH64_round(state->v4, XXH_readLE64(state->mem64+3, endian)); + p += 32-state->memsize; + state->memsize = 0; + } + + if (p+32 <= bEnd) { + const BYTE* const limit = bEnd - 32; + U64 v1 = state->v1; + U64 v2 = state->v2; + U64 v3 = state->v3; + U64 v4 = state->v4; + + do { + v1 = XXH64_round(v1, XXH_readLE64(p, endian)); p+=8; + v2 = XXH64_round(v2, XXH_readLE64(p, endian)); p+=8; + v3 = XXH64_round(v3, XXH_readLE64(p, endian)); p+=8; + v4 = XXH64_round(v4, XXH_readLE64(p, endian)); p+=8; + } while (p<=limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < bEnd) { + XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + + return XXH_OK; +} + +XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH64_update_endian(state_in, input, len, XXH_littleEndian); + else + return XXH64_update_endian(state_in, input, len, XXH_bigEndian); +} + +FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state, XXH_endianess endian) +{ + const BYTE * p = (const BYTE*)state->mem64; + const BYTE* const bEnd = (const BYTE*)state->mem64 + state->memsize; + U64 h64; + + if (state->total_len >= 32) { + U64 const v1 = state->v1; + U64 const v2 = state->v2; + U64 const v3 = state->v3; + U64 const v4 = state->v4; + + h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); + h64 = XXH64_mergeRound(h64, v1); + h64 = XXH64_mergeRound(h64, v2); + h64 = XXH64_mergeRound(h64, v3); + h64 = XXH64_mergeRound(h64, v4); + } else { + h64 = state->v3 + PRIME64_5; + } + + h64 += (U64) state->total_len; + + while (p+8<=bEnd) { + U64 const k1 = XXH64_round(0, XXH_readLE64(p, endian)); + h64 ^= k1; + h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; + p+=8; + } + + if (p+4<=bEnd) { + h64 ^= (U64)(XXH_readLE32(p, endian)) * PRIME64_1; + h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; + p+=4; + } + + while (p> 33; + h64 *= PRIME64_2; + h64 ^= h64 >> 29; + h64 *= PRIME64_3; + h64 ^= h64 >> 32; + + return h64; +} + +XXH_PUBLIC_API unsigned long long XXH64_digest (const XXH64_state_t* state_in) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH64_digest_endian(state_in, XXH_littleEndian); + else + return XXH64_digest_endian(state_in, XXH_bigEndian); +} + + +/*====== Canonical representation ======*/ + +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); + memcpy(dst, &hash, sizeof(*dst)); +} + +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src) +{ + return XXH_readBE64(src); +} + +#endif /* XXH_NO_LONG_LONG */ diff --git a/sources/third_party/vulkan/src/layers/xxhash.h b/sources/third_party/vulkan/src/layers/xxhash.h new file mode 100644 index 0000000000000000000000000000000000000000..9d831e03b35f6b3d5410a186cedeb95dc45e52f8 --- /dev/null +++ b/sources/third_party/vulkan/src/layers/xxhash.h @@ -0,0 +1,293 @@ +/* + xxHash - Extremely Fast Hash algorithm + Header File + Copyright (C) 2012-2016, Yann Collet. + + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - xxHash source repository : https://github.com/Cyan4973/xxHash +*/ + +/* Notice extracted from xxHash homepage : + +xxHash is an extremely fast Hash algorithm, running at RAM speed limits. +It also successfully passes all tests from the SMHasher suite. + +Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) + +Name Speed Q.Score Author +xxHash 5.4 GB/s 10 +CrapWow 3.2 GB/s 2 Andrew +MumurHash 3a 2.7 GB/s 10 Austin Appleby +SpookyHash 2.0 GB/s 10 Bob Jenkins +SBox 1.4 GB/s 9 Bret Mulvey +Lookup3 1.2 GB/s 9 Bob Jenkins +SuperFastHash 1.2 GB/s 1 Paul Hsieh +CityHash64 1.05 GB/s 10 Pike & Alakuijala +FNV 0.55 GB/s 5 Fowler, Noll, Vo +CRC32 0.43 GB/s 9 +MD5-32 0.33 GB/s 10 Ronald L. Rivest +SHA1-32 0.28 GB/s 10 + +Q.Score is a measure of quality of the hash function. +It depends on successfully passing SMHasher test set. +10 is a perfect score. + +A 64-bits version, named XXH64, is available since r35. +It offers much better speed, but for 64-bits applications only. +Name Speed on 64 bits Speed on 32 bits +XXH64 13.8 GB/s 1.9 GB/s +XXH32 6.8 GB/s 6.0 GB/s +*/ + +#ifndef XXHASH_H_5627135585666179 +#define XXHASH_H_5627135585666179 1 + +#if defined (__cplusplus) +extern "C" { +#endif + + +/* **************************** +* Definitions +******************************/ +#include /* size_t */ +typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; + + +/* **************************** +* API modifier +******************************/ +/** XXH_PRIVATE_API +* This is useful to include xxhash functions in `static` mode +* in order to inline them, and remove their symbol from the public list. +* Methodology : +* #define XXH_PRIVATE_API +* #include "xxhash.h" +* `xxhash.c` is automatically included. +* It's not useful to compile and link it as a separate module. +*/ +#ifdef XXH_PRIVATE_API +# ifndef XXH_STATIC_LINKING_ONLY +# define XXH_STATIC_LINKING_ONLY +# endif +# if defined(__GNUC__) +# define XXH_PUBLIC_API static __inline __attribute__((unused)) +# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define XXH_PUBLIC_API static inline +# elif defined(_MSC_VER) +# define XXH_PUBLIC_API static __inline +# else +# define XXH_PUBLIC_API static /* this version may generate warnings for unused static functions; disable the relevant warning */ +# endif +#else +# define XXH_PUBLIC_API /* do nothing */ +#endif /* XXH_PRIVATE_API */ + +/*!XXH_NAMESPACE, aka Namespace Emulation : + +If you want to include _and expose_ xxHash functions from within your own library, +but also want to avoid symbol collisions with other libraries which may also include xxHash, + +you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library +with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values). + +Note that no change is required within the calling program as long as it includes `xxhash.h` : +regular symbol name will be automatically translated by this header. +*/ +#ifdef XXH_NAMESPACE +# define XXH_CAT(A,B) A##B +# define XXH_NAME2(A,B) XXH_CAT(A,B) +# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) +# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) +# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) +# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) +# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) +# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) +# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) +# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) +# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) +# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) +# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) +# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) +# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) +# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) +# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) +# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) +# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) +# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) +# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) +#endif + + +/* ************************************* +* Version +***************************************/ +#define XXH_VERSION_MAJOR 0 +#define XXH_VERSION_MINOR 6 +#define XXH_VERSION_RELEASE 2 +#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) +XXH_PUBLIC_API unsigned XXH_versionNumber (void); + + +/*-********************************************************************** +* 32-bits hash +************************************************************************/ +typedef unsigned int XXH32_hash_t; + +/*! XXH32() : + Calculate the 32-bits hash of sequence "length" bytes stored at memory address "input". + The memory between input & input+length must be valid (allocated and read-accessible). + "seed" can be used to alter the result predictably. + Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s */ +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, unsigned int seed); + +/*====== Streaming ======*/ +typedef struct XXH32_state_s XXH32_state_t; /* incomplete type */ +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); + +XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, unsigned int seed); +XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); + +/* +These functions generate the xxHash of an input provided in multiple segments. +Note that, for small input, they are slower than single-call functions, due to state management. +For small input, prefer `XXH32()` and `XXH64()` . + +XXH state must first be allocated, using XXH*_createState() . + +Start a new hash by initializing state with a seed, using XXH*_reset(). + +Then, feed the hash state by calling XXH*_update() as many times as necessary. +Obviously, input must be allocated and read accessible. +The function returns an error code, with 0 meaning OK, and any other value meaning there is an error. + +Finally, a hash value can be produced anytime, by using XXH*_digest(). +This function returns the nn-bits hash as an int or long long. + +It's still possible to continue inserting input into the hash state after a digest, +and generate some new hashes later on, by calling again XXH*_digest(). + +When done, free XXH state space if it was allocated dynamically. +*/ + +/*====== Canonical representation ======*/ + +typedef struct { unsigned char digest[4]; } XXH32_canonical_t; +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); + +/* Default result type for XXH functions are primitive unsigned 32 and 64 bits. +* The canonical representation uses human-readable write convention, aka big-endian (large digits first). +* These functions allow transformation of hash result into and from its canonical format. +* This way, hash values can be written into a file / memory, and remain comparable on different systems and programs. +*/ + + +#ifndef XXH_NO_LONG_LONG +/*-********************************************************************** +* 64-bits hash +************************************************************************/ +typedef unsigned long long XXH64_hash_t; + +/*! XXH64() : + Calculate the 64-bits hash of sequence of length "len" stored at memory address "input". + "seed" can be used to alter the result predictably. + This function runs faster on 64-bits systems, but slower on 32-bits systems (see benchmark). +*/ +XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t length, unsigned long long seed); + +/*====== Streaming ======*/ +typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); +XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dst_state, const XXH64_state_t* src_state); + +XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t* statePtr, unsigned long long seed); +XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* statePtr); + +/*====== Canonical representation ======*/ +typedef struct { unsigned char digest[8]; } XXH64_canonical_t; +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash); +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src); +#endif /* XXH_NO_LONG_LONG */ + + +#ifdef XXH_STATIC_LINKING_ONLY + +/* ================================================================================================ + This section contains definitions which are not guaranteed to remain stable. + They may change in future versions, becoming incompatible with a different version of the library. + They shall only be used with static linking. + Never use these definitions in association with dynamic linking ! +=================================================================================================== */ + +/* These definitions are only meant to make possible + static allocation of XXH state, on stack or in a struct for example. + Never use members directly. */ + +struct XXH32_state_s { + unsigned total_len_32; + unsigned large_len; + unsigned v1; + unsigned v2; + unsigned v3; + unsigned v4; + unsigned mem32[4]; /* buffer defined as U32 for alignment */ + unsigned memsize; + unsigned reserved; /* never read nor write, will be removed in a future version */ +}; /* typedef'd to XXH32_state_t */ + +#ifndef XXH_NO_LONG_LONG /* remove 64-bits support */ +struct XXH64_state_s { + unsigned long long total_len; + unsigned long long v1; + unsigned long long v2; + unsigned long long v3; + unsigned long long v4; + unsigned long long mem64[4]; /* buffer defined as U64 for alignment */ + unsigned memsize; + unsigned reserved[2]; /* never read nor write, will be removed in a future version */ +}; /* typedef'd to XXH64_state_t */ +#endif + +#ifdef XXH_PRIVATE_API +# include "xxhash.c" /* include xxhash function bodies as `static`, for inlining */ +#endif + +#endif /* XXH_STATIC_LINKING_ONLY */ + + +#if defined (__cplusplus) +} +#endif + +#endif /* XXHASH_H_5627135585666179 */ diff --git a/sources/third_party/vulkan/src/libs/glm/detail/dummy.cpp b/sources/third_party/vulkan/src/libs/glm/detail/dummy.cpp index 98ca022ceb0181ff5de914834118edf93b027d5e..26160a51ad9d23555a4cefe0a68ddb95b024f49f 100644 --- a/sources/third_party/vulkan/src/libs/glm/detail/dummy.cpp +++ b/sources/third_party/vulkan/src/libs/glm/detail/dummy.cpp @@ -1,190 +1,190 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/dummy.cpp -/// @date 2011-01-19 / 2011-06-15 -/// @author Christophe Riccio -/// -/// GLM is a header only library. There is nothing to compile. -/// dummy.cpp exist only a wordaround for CMake file. -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#define GLM_MESSAGES -#include "../glm.hpp" -#include - -struct material -{ - glm::vec4 emission; // Ecm - glm::vec4 ambient; // Acm - glm::vec4 diffuse; // Dcm - glm::vec4 specular; // Scm - float shininess; // Srm -}; -struct light -{ - glm::vec4 ambient; // Acli - glm::vec4 diffuse; // Dcli - glm::vec4 specular; // Scli - glm::vec4 position; // Ppli - glm::vec4 halfVector; // Derived: Hi - glm::vec3 spotDirection; // Sdli - float spotExponent; // Srli - float spotCutoff; // Crli - // (range: [0.0,90.0], 180.0) - float spotCosCutoff; // Derived: cos(Crli) - // (range: [1.0,0.0],-1.0) - float constantAttenuation; // K0 - float linearAttenuation; // K1 - float quadraticAttenuation;// K2 -}; - -// Sample 1 -#include // glm::vec3 -#include // glm::cross, glm::normalize - -glm::vec3 computeNormal -( - glm::vec3 const & a, - glm::vec3 const & b, - glm::vec3 const & c -) -{ - return glm::normalize(glm::cross(c - a, b - a)); -} - -typedef unsigned int GLuint; -#define GL_FALSE 0 -void glUniformMatrix4fv(GLuint, int, int, float*){} - -// Sample 2 -#include // glm::vec3 -#include // glm::vec4, glm::ivec4 -#include // glm::mat4 -#include // glm::translate, glm::rotate, glm::scale, glm::perspective -#include // glm::value_ptr -void func(GLuint LocationMVP, float Translate, glm::vec2 const & Rotate) -{ - glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); - glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); - glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); - glm::mat4 View = glm::rotate(ViewRotateX, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); - glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); - glm::mat4 MVP = Projection * View * Model; - glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP)); -} - -// Sample 3 -#include // glm::vec2 -#include // glm::packUnorm2x16 -#include // glm::uint -#include // glm::i8vec2, glm::i32vec2 -std::size_t const VertexCount = 4; -// Float quad geometry -std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); -glm::vec2 const PositionDataF32[VertexCount] = -{ - glm::vec2(-1.0f,-1.0f), - glm::vec2( 1.0f,-1.0f), - glm::vec2( 1.0f, 1.0f), - glm::vec2(-1.0f, 1.0f) - }; -// Half-float quad geometry -std::size_t const PositionSizeF16 = VertexCount * sizeof(glm::uint); -glm::uint const PositionDataF16[VertexCount] = -{ - glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, -1.0f))), - glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, -1.0f))), - glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, 1.0f))), - glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, 1.0f))) -}; -// 8 bits signed integer quad geometry -std::size_t const PositionSizeI8 = VertexCount * sizeof(glm::i8vec2); -glm::i8vec2 const PositionDataI8[VertexCount] = -{ - glm::i8vec2(-1,-1), - glm::i8vec2( 1,-1), - glm::i8vec2( 1, 1), - glm::i8vec2(-1, 1) -}; -// 32 bits signed integer quad geometry -std::size_t const PositionSizeI32 = VertexCount * sizeof(glm::i32vec2); -glm::i32vec2 const PositionDataI32[VertexCount] = -{ - glm::i32vec2 (-1,-1), - glm::i32vec2 ( 1,-1), - glm::i32vec2 ( 1, 1), - glm::i32vec2 (-1, 1) -}; - -struct intersection -{ - glm::vec4 position; - glm::vec3 normal; -}; - -/* -// Sample 4 -#include // glm::vec3 -#include // glm::normalize, glm::dot, glm::reflect -#include // glm::pow -#include // glm::vecRand3 -glm::vec3 lighting -( - intersection const & Intersection, - material const & Material, - light const & Light, - glm::vec3 const & View -) -{ - glm::vec3 Color(0.0f); - glm::vec3 LightVertor(glm::normalize( - Light.position - Intersection.position + - glm::vecRand3(0.0f, Light.inaccuracy)); - - if(!shadow(Intersection.position, Light.position, LightVertor)) - { - float Diffuse = glm::dot(Intersection.normal, LightVector); - if(Diffuse <= 0.0f) - return Color; - if(Material.isDiffuse()) - Color += Light.color() * Material.diffuse * Diffuse; - if(Material.isSpecular()) - { - glm::vec3 Reflect(glm::reflect( - glm::normalize(-LightVector), - glm::normalize(Intersection.normal))); - float Dot = glm::dot(Reflect, View); - float Base = Dot > 0.0f ? Dot : 0.0f; - float Specular = glm::pow(Base, Material.exponent); - Color += Material.specular * Specular; - } - } - return Color; -} -*/ -int main() -{ - return 0; -} +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/dummy.cpp +/// @date 2011-01-19 / 2011-06-15 +/// @author Christophe Riccio +/// +/// GLM is a header only library. There is nothing to compile. +/// dummy.cpp exist only a wordaround for CMake file. +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_FORCE_RADIANS +#define GLM_MESSAGES +#include "../glm.hpp" +#include + +struct material +{ + glm::vec4 emission; // Ecm + glm::vec4 ambient; // Acm + glm::vec4 diffuse; // Dcm + glm::vec4 specular; // Scm + float shininess; // Srm +}; +struct light +{ + glm::vec4 ambient; // Acli + glm::vec4 diffuse; // Dcli + glm::vec4 specular; // Scli + glm::vec4 position; // Ppli + glm::vec4 halfVector; // Derived: Hi + glm::vec3 spotDirection; // Sdli + float spotExponent; // Srli + float spotCutoff; // Crli + // (range: [0.0,90.0], 180.0) + float spotCosCutoff; // Derived: cos(Crli) + // (range: [1.0,0.0],-1.0) + float constantAttenuation; // K0 + float linearAttenuation; // K1 + float quadraticAttenuation;// K2 +}; + +// Sample 1 +#include // glm::vec3 +#include // glm::cross, glm::normalize + +glm::vec3 computeNormal +( + glm::vec3 const & a, + glm::vec3 const & b, + glm::vec3 const & c +) +{ + return glm::normalize(glm::cross(c - a, b - a)); +} + +typedef unsigned int GLuint; +#define GL_FALSE 0 +void glUniformMatrix4fv(GLuint, int, int, float*){} + +// Sample 2 +#include // glm::vec3 +#include // glm::vec4, glm::ivec4 +#include // glm::mat4 +#include // glm::translate, glm::rotate, glm::scale, glm::perspective +#include // glm::value_ptr +void func(GLuint LocationMVP, float Translate, glm::vec2 const & Rotate) +{ + glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); + glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); + glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); + glm::mat4 View = glm::rotate(ViewRotateX, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); + glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); + glm::mat4 MVP = Projection * View * Model; + glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP)); +} + +// Sample 3 +#include // glm::vec2 +#include // glm::packUnorm2x16 +#include // glm::uint +#include // glm::i8vec2, glm::i32vec2 +std::size_t const VertexCount = 4; +// Float quad geometry +std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); +glm::vec2 const PositionDataF32[VertexCount] = +{ + glm::vec2(-1.0f,-1.0f), + glm::vec2( 1.0f,-1.0f), + glm::vec2( 1.0f, 1.0f), + glm::vec2(-1.0f, 1.0f) + }; +// Half-float quad geometry +std::size_t const PositionSizeF16 = VertexCount * sizeof(glm::uint); +glm::uint const PositionDataF16[VertexCount] = +{ + glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, -1.0f))), + glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, -1.0f))), + glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, 1.0f))), + glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, 1.0f))) +}; +// 8 bits signed integer quad geometry +std::size_t const PositionSizeI8 = VertexCount * sizeof(glm::i8vec2); +glm::i8vec2 const PositionDataI8[VertexCount] = +{ + glm::i8vec2(-1,-1), + glm::i8vec2( 1,-1), + glm::i8vec2( 1, 1), + glm::i8vec2(-1, 1) +}; +// 32 bits signed integer quad geometry +std::size_t const PositionSizeI32 = VertexCount * sizeof(glm::i32vec2); +glm::i32vec2 const PositionDataI32[VertexCount] = +{ + glm::i32vec2 (-1,-1), + glm::i32vec2 ( 1,-1), + glm::i32vec2 ( 1, 1), + glm::i32vec2 (-1, 1) +}; + +struct intersection +{ + glm::vec4 position; + glm::vec3 normal; +}; + +/* +// Sample 4 +#include // glm::vec3 +#include // glm::normalize, glm::dot, glm::reflect +#include // glm::pow +#include // glm::vecRand3 +glm::vec3 lighting +( + intersection const & Intersection, + material const & Material, + light const & Light, + glm::vec3 const & View +) +{ + glm::vec3 Color(0.0f); + glm::vec3 LightVertor(glm::normalize( + Light.position - Intersection.position + + glm::vecRand3(0.0f, Light.inaccuracy)); + + if(!shadow(Intersection.position, Light.position, LightVertor)) + { + float Diffuse = glm::dot(Intersection.normal, LightVector); + if(Diffuse <= 0.0f) + return Color; + if(Material.isDiffuse()) + Color += Light.color() * Material.diffuse * Diffuse; + if(Material.isSpecular()) + { + glm::vec3 Reflect(glm::reflect( + glm::normalize(-LightVector), + glm::normalize(Intersection.normal))); + float Dot = glm::dot(Reflect, View); + float Base = Dot > 0.0f ? Dot : 0.0f; + float Specular = glm::pow(Base, Material.exponent); + Color += Material.specular * Specular; + } + } + return Color; +} +*/ +int main() +{ + return 0; +} diff --git a/sources/third_party/vulkan/src/libs/vkjson/vkjson_info.cc b/sources/third_party/vulkan/src/libs/vkjson/vkjson_info.cc index 9dbf02b4f185143462d2653638c13431119dab04..3c4b08b16feabc732c8f4bd00146ca6daf20f8c2 100644 --- a/sources/third_party/vulkan/src/libs/vkjson/vkjson_info.cc +++ b/sources/third_party/vulkan/src/libs/vkjson/vkjson_info.cc @@ -57,7 +57,7 @@ bool ParseOptions(int argc, char* argv[], Options* options) { if (arg == "--device-index" || arg == "-d") { int result = sscanf(arg2.c_str(), "%u", &options->device_index); if (result != 1) { - options->device_index = -1; + options->device_index = static_cast(-1); std::cerr << "Unable to parse index: " << arg2 << std::endl; return false; } diff --git a/sources/third_party/vulkan/src/loader/vk_loader_platform.h b/sources/third_party/vulkan/src/loader/vk_loader_platform.h index 207e5a48e37b2daab6ea97ac837640258d2bbfe4..416256026d0adf70f90362a9d03cbc04e7d8fa73 100644 --- a/sources/third_party/vulkan/src/loader/vk_loader_platform.h +++ b/sources/third_party/vulkan/src/loader/vk_loader_platform.h @@ -1,8 +1,8 @@ /* * - * Copyright (c) 2015-2016 The Khronos Group Inc. - * Copyright (c) 2015-2016 Valve Corporation - * Copyright (c) 2015-2016 LunarG, Inc. + * Copyright (c) 2015-2018 The Khronos Group Inc. + * Copyright (c) 2015-2018 Valve Corporation + * Copyright (c) 2015-2018 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * * Author: Ian Elliot * Author: Jon Ashburn + * Author: Lenny Komow * */ #pragma once @@ -30,7 +31,7 @@ #include "vulkan/vk_platform.h" #include "vulkan/vk_sdk_platform.h" -#if defined(__linux__) +#if defined(__linux__) || defined(__APPLE__) /* Linux-specific common code: */ // Headers: @@ -70,6 +71,7 @@ #define LAYERS_SOURCE_PATH NULL #endif #define LAYERS_PATH_ENV "VK_LAYER_PATH" +#define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS" #define RELATIVE_VK_DRIVERS_INFO VULKAN_DIR VULKAN_ICDCONF_DIR #define RELATIVE_VK_ELAYERS_INFO VULKAN_DIR VULKAN_ELAYERCONF_DIR @@ -116,13 +118,11 @@ static inline const char *loader_platform_get_proc_address_error(const char *nam // Threads: typedef pthread_t loader_platform_thread; #define THREAD_LOCAL_DECL __thread -#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) pthread_once_t var = PTHREAD_ONCE_INIT; -#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) pthread_once_t var; -static inline void loader_platform_thread_once(pthread_once_t *ctl, void (*func)(void)) { - assert(func != NULL); - assert(ctl != NULL); - pthread_once(ctl, func); -} + +// The once init functionality is not used on Linux +#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) +#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) +#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) // Thread IDs: typedef pthread_t loader_platform_thread_id; @@ -182,6 +182,7 @@ static inline void loader_platform_thread_cond_broadcast(loader_platform_thread_ #define LAYERS_SOURCE_PATH NULL #endif #define LAYERS_PATH_ENV "VK_LAYER_PATH" +#define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS" #define RELATIVE_VK_DRIVERS_INFO "" #define RELATIVE_VK_ELAYERS_INFO "" #define RELATIVE_VK_ILAYERS_INFO "" @@ -221,7 +222,15 @@ static bool loader_platform_file_exists(const char *path) { return true; } -static bool loader_platform_is_path_absolute(const char *path) { return !PathIsRelative(path); } +static bool loader_platform_is_path_absolute(const char *path) { + if (!path || !*path) { + return false; + } + if (*path == DIRECTORY_SYMBOL || path[1] == ':') { + return true; + } + return false; +} // WIN32 runtime doesn't have dirname(). static inline char *loader_platform_dirname(char *path) { @@ -272,7 +281,7 @@ typedef HMODULE loader_platform_dl_handle; static loader_platform_dl_handle loader_platform_open_library(const char *lib_path) { // Try loading the library the original way first. loader_platform_dl_handle lib_handle = LoadLibrary(lib_path); - if (lib_handle == NULL && GetLastError() == ERROR_MOD_NOT_FOUND && PathFileExists(lib_path)) { + if (lib_handle == NULL && GetLastError() == ERROR_MOD_NOT_FOUND) { // If that failed, then try loading it with broader search folders. lib_handle = LoadLibraryEx(lib_path, NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); } @@ -280,14 +289,14 @@ static loader_platform_dl_handle loader_platform_open_library(const char *lib_pa } static char *loader_platform_open_library_error(const char *libPath) { static char errorMsg[164]; - (void)snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\" with error %d", libPath, GetLastError()); + (void)snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\" with error %lu", libPath, GetLastError()); return errorMsg; } static void loader_platform_close_library(loader_platform_dl_handle library) { FreeLibrary(library); } static void *loader_platform_get_proc_address(loader_platform_dl_handle library, const char *name) { assert(library); assert(name); - return GetProcAddress(library, name); + return (void *)GetProcAddress(library, name); } static char *loader_platform_get_proc_address_error(const char *name) { static char errorMsg[120]; @@ -298,19 +307,29 @@ static char *loader_platform_get_proc_address_error(const char *name) { // Threads: typedef HANDLE loader_platform_thread; #define THREAD_LOCAL_DECL __declspec(thread) + +// The once init functionality is not used when building a DLL on Windows. This is because there is no way to clean up the +// resources allocated by anything allocated by once init. This isn't a problem for static libraries, but it is for dynamic +// ones. When building a DLL, we use DllMain() instead to allow properly cleaning up resources. +#if defined(LOADER_DYNAMIC_LIB) +#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) +#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) +#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) +#else #define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) INIT_ONCE var = INIT_ONCE_STATIC_INIT; #define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) INIT_ONCE var; +#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) loader_platform_thread_once_fn(ctl, func) static BOOL CALLBACK InitFuncWrapper(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context) { void (*func)(void) = (void (*)(void))Parameter; func(); return TRUE; } - -static void loader_platform_thread_once(void *ctl, void (*func)(void)) { +static void loader_platform_thread_once_fn(void *ctl, void (*func)(void)) { assert(func != NULL); assert(ctl != NULL); - InitOnceExecuteOnce((PINIT_ONCE)ctl, InitFuncWrapper, func, NULL); + InitOnceExecuteOnce((PINIT_ONCE)ctl, InitFuncWrapper, (void *)func, NULL); } +#endif // Thread IDs: typedef DWORD loader_platform_thread_id; diff --git a/sources/third_party/vulkan/src/scripts/cgenerator.py b/sources/third_party/vulkan/src/scripts/cgenerator.py index 534e024f555fec716fc96896222e675a7b19bc7f..5a82acf790eecbe87c3f1ac05e658c52d5e77a02 100644 --- a/sources/third_party/vulkan/src/scripts/cgenerator.py +++ b/sources/third_party/vulkan/src/scripts/cgenerator.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright (c) 2013-2017 The Khronos Group Inc. +# Copyright (c) 2013-2018 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sources/third_party/vulkan/src/scripts/check_code_format.sh b/sources/third_party/vulkan/src/scripts/check_code_format.sh new file mode 100755 index 0000000000000000000000000000000000000000..0a9a50ae8bd717541c79419152cf6dc0f3616812 --- /dev/null +++ b/sources/third_party/vulkan/src/scripts/check_code_format.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright (c) 2017 Google Inc. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Script to determine if source code in Pull Request is properly formatted. +# Exits with non 0 exit code if formatting is needed. +# +# This script assumes to be invoked at the project root directory. + +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' # No Color + +FILES_TO_CHECK=$(git diff --name-only master | grep -E ".*\.(cpp|cc|c\+\+|cxx|c|h|hpp)$") + +if [ -z "${FILES_TO_CHECK}" ]; then + echo -e "${GREEN}No source code to check for formatting.${NC}" + exit 0 +fi + +FORMAT_DIFF=$(git diff -U0 master -- ${FILES_TO_CHECK} | python ./scripts/clang-format-diff.py -p1 -style=file) + +if [ -z "${FORMAT_DIFF}" ]; then + echo -e "${GREEN}All source code in PR properly formatted.${NC}" + exit 0 +else + echo -e "${RED}Found formatting errors!${NC}" + echo "${FORMAT_DIFF}" + exit 1 +fi diff --git a/sources/third_party/vulkan/src/scripts/check_toolchain_revisions.sh b/sources/third_party/vulkan/src/scripts/check_toolchain_revisions.sh index 6ee3588cd7c67beabdc8b0b290693b65d9bb5a29..10835290b193312be265ed847ce07e8e7f8bd25a 100755 --- a/sources/third_party/vulkan/src/scripts/check_toolchain_revisions.sh +++ b/sources/third_party/vulkan/src/scripts/check_toolchain_revisions.sh @@ -2,7 +2,7 @@ set -e -# If any tracked revision no longer matches the local revision, blast the extenal toolchain directoies +# If any tracked revision no longer matches the local revision, blast the extenal toolchain directories function check_revision() { @@ -34,16 +34,6 @@ dir=external/glslang rev=external_revisions/glslang_revision check_revision $tool $dir $rev -tool=spirv-tools -dir=external/spirv-tools -rev=external_revisions/spirv-tools_revision -check_revision $tool $dir $rev - -tool=spirv-headers -dir=external/spirv-tools/external/spirv-headers -rev=external_revisions/spirv-headers_revision -check_revision $tool $dir $rev - tool=glslang_android dir=build-android/external/glslang rev=build-android/glslang_revision_android diff --git a/sources/third_party/vulkan/src/scripts/determine_vs_version.py b/sources/third_party/vulkan/src/scripts/determine_vs_version.py index ea2221f9a308d66f914c7b8cd311a1bb544efc3f..7982bf7173e22dd237a1752eec1a4f75445dc6af 100755 --- a/sources/third_party/vulkan/src/scripts/determine_vs_version.py +++ b/sources/third_party/vulkan/src/scripts/determine_vs_version.py @@ -20,6 +20,7 @@ import sys import os +import subprocess # Following function code snippet was found on StackOverflow (with a change to lower # camel-case on the variable names): @@ -63,7 +64,7 @@ def determine_year(version): # it into a format we can use, which is " ". if __name__ == '__main__': exeName = 'msbuild.exe' - versionCall = exeName + ' /ver' + arguments = '/ver' # Determine if the executable exists in the path, this is critical. # @@ -75,7 +76,8 @@ if __name__ == '__main__': print('00 0000') print('Executable ' + exeName + ' not found in PATH!') else: - sysCallOut = os.popen(versionCall).read() + proc = subprocess.Popen([exeName, arguments], stdout=subprocess.PIPE) + sysCallOut = proc.stdout.readline().decode('iso-8859-1').rstrip() version = None diff --git a/sources/third_party/vulkan/src/scripts/external_revision_generator.py b/sources/third_party/vulkan/src/scripts/external_revision_generator.py new file mode 100644 index 0000000000000000000000000000000000000000..9ba9156b02d9b3d4ce330a20a6ac78efd9ed8a73 --- /dev/null +++ b/sources/third_party/vulkan/src/scripts/external_revision_generator.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2015-2017 The Khronos Group Inc. +# Copyright (c) 2015-2017 Valve Corporation +# Copyright (c) 2015-2017 LunarG, Inc. +# Copyright (c) 2015-2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Author: Cort Stratton +# Author: Jean-Francois Roy + +import argparse +import hashlib +import subprocess + +def generate(symbol_name, commit_id, output_header_file): + # Write commit ID to output header file + with open(output_header_file, "w") as header_file: + # File Comment + file_comment = '// *** THIS FILE IS GENERATED - DO NOT EDIT ***\n' + file_comment += '// See external_revision_generator.py for modifications\n' + header_file.write(file_comment) + # Copyright Notice + copyright = '' + copyright += '\n' + copyright += '/***************************************************************************\n' + copyright += ' *\n' + copyright += ' * Copyright (c) 2015-2017 The Khronos Group Inc.\n' + copyright += ' * Copyright (c) 2015-2017 Valve Corporation\n' + copyright += ' * Copyright (c) 2015-2017 LunarG, Inc.\n' + copyright += ' * Copyright (c) 2015-2017 Google Inc.\n' + copyright += ' *\n' + copyright += ' * Licensed under the Apache License, Version 2.0 (the "License");\n' + copyright += ' * you may not use this file except in compliance with the License.\n' + copyright += ' * You may obtain a copy of the License at\n' + copyright += ' *\n' + copyright += ' * http://www.apache.org/licenses/LICENSE-2.0\n' + copyright += ' *\n' + copyright += ' * Unless required by applicable law or agreed to in writing, software\n' + copyright += ' * distributed under the License is distributed on an "AS IS" BASIS,\n' + copyright += ' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' + copyright += ' * See the License for the specific language governing permissions and\n' + copyright += ' * limitations under the License.\n' + copyright += ' *\n' + copyright += ' * Author: Chris Forbes \n' + copyright += ' * Author: Cort Stratton \n' + copyright += ' *\n' + copyright += ' ****************************************************************************/\n' + header_file.write(copyright) + # Contents + contents = '#pragma once\n\n' + contents += '#define %s "%s"\n' % (symbol_name, commit_id) + header_file.write(contents) + +def get_commit_id_from_git(git_binary, source_dir): + return subprocess.check_output([git_binary, "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip() + +def is_sha1(str): + try: str_as_int = int(str, 16) + except ValueError: return False + return len(str) == 40 + +def get_commit_id_from_file(rev_file): + with open(rev_file, 'r') as rev_stream: + rev_contents = rev_stream.read() + rev_contents_stripped = rev_contents.strip() + if is_sha1(rev_contents_stripped): + return rev_contents_stripped; + # otherwise, SHA1 the entire (unstripped) file contents + sha1 = hashlib.sha1(); + sha1.update(rev_contents.encode('utf-8')) + return sha1.hexdigest() + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("-s", "--symbol_name", metavar="SYMBOL_NAME", required=True, help="C symbol name") + parser.add_argument("-o", "--output_header_file", metavar="OUTPUT_HEADER_FILE", required=True, help="output header file path") + rev_method_group = parser.add_mutually_exclusive_group(required=True) + rev_method_group.add_argument("--git_dir", metavar="SOURCE_DIR", help="git working copy directory") + rev_method_group.add_argument("--rev_file", metavar="REVISION_FILE", help="source revision file path (must contain a SHA1 hash") + args = parser.parse_args() + + # We can either parse the latest Git commit ID out of the specified repository (preferred where possible), + # or computing the SHA1 hash of the contents of a file passed on the command line and (where necessary -- + # e.g. when building the layers outside of a Git environment). + if args.git_dir is not None: + # Extract commit ID from the specified source directory + try: + commit_id = get_commit_id_from_git('git', args.git_dir) + except WindowsError: + # Call git.bat on Windows for compatiblity. + commit_id = get_commit_id_from_git('git.bat', args.git_dir) + elif args.rev_file is not None: + # Read the commit ID from a file. + commit_id = get_commit_id_from_file(args.rev_file) + + if not is_sha1(commit_id): + raise ValueError("commit ID for " + args.symbol_name + " must be a SHA1 hash.") + + generate(args.symbol_name, commit_id, args.output_header_file) + +if __name__ == '__main__': + main() diff --git a/sources/third_party/vulkan/src/scripts/generator.py b/sources/third_party/vulkan/src/scripts/generator.py index a9a7bd58d89e8776b8966a0c0baf0445969d05c5..c57459861d9a8c7f42b35ee03e03e571b0a8b311 100755 --- a/sources/third_party/vulkan/src/scripts/generator.py +++ b/sources/third_party/vulkan/src/scripts/generator.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright (c) 2013-2017 The Khronos Group Inc. +# Copyright (c) 2013-2018 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/sources/third_party/vulkan/src/scripts/helper_file_generator.py b/sources/third_party/vulkan/src/scripts/helper_file_generator.py index 84b8c7b6bcd61331d1be0a36a899224f34349385..f47857a82f7af7d7d4c456290c0d043cc60948d8 100644 --- a/sources/third_party/vulkan/src/scripts/helper_file_generator.py +++ b/sources/third_party/vulkan/src/scripts/helper_file_generator.py @@ -93,6 +93,15 @@ class HelperFileOutputGenerator(OutputGenerator): self.StructType = namedtuple('StructType', ['name', 'value']) self.CommandParam = namedtuple('CommandParam', ['type', 'name', 'ispointer', 'isstaticarray', 'isconst', 'iscount', 'len', 'extstructs', 'cdecl']) self.StructMemberData = namedtuple('StructMemberData', ['name', 'members', 'ifdef_protect']) + + self.custom_construct_params = { + # safe_VkGraphicsPipelineCreateInfo needs to know if subpass has color and\or depth\stencil attachments to use its pointers + 'VkGraphicsPipelineCreateInfo' : + ', const bool uses_color_attachment, const bool uses_depthstencil_attachment', + # safe_VkPipelineViewportStateCreateInfo needs to know if viewport and scissor is dynamic to use its pointers + 'VkPipelineViewportStateCreateInfo' : + ', const bool is_dynamic_viewports, const bool is_dynamic_scissors', + } # # Called once at the beginning of each run def beginFile(self, genOpts): @@ -130,6 +139,7 @@ class HelperFileOutputGenerator(OutputGenerator): copyright += ' * Author: Courtney Goeltzenleuchter \n' copyright += ' * Author: Tobin Ehlis \n' copyright += ' * Author: Chris Forbes \n' + copyright += ' * Author: John Zulauf\n' copyright += ' *\n' copyright += ' ****************************************************************************/\n' write(copyright, file=self.outFile) @@ -447,8 +457,8 @@ class HelperFileOutputGenerator(OutputGenerator): # Build the footer of the get_struct_chain_size function def GenerateChainSizePostamble(self): postamble = ' default:\n' - postamble += ' assert(0);\n' postamble += ' struct_size += 0;\n' + postamble += ' break;' postamble += ' }\n' postamble += ' pNext = (VkApplicationInfo*)pNext->pNext;\n' postamble += ' }\n' @@ -465,7 +475,6 @@ class HelperFileOutputGenerator(OutputGenerator): # Build the footer of the get_struct_size function def GenerateStructSizePostamble(self): postamble = ' default:\n' - postamble += ' assert(0);\n' postamble += ' return(0);\n' postamble += ' }\n' postamble += '}' @@ -580,13 +589,13 @@ class HelperFileOutputGenerator(OutputGenerator): safe_struct_header += ' %s* %s;\n' % (member.type, member.name) else: safe_struct_header += '%s;\n' % member.cdecl - safe_struct_header += ' safe_%s(const %s* in_struct);\n' % (item.name, item.name) + safe_struct_header += ' safe_%s(const %s* in_struct%s);\n' % (item.name, item.name, self.custom_construct_params.get(item.name, '')) safe_struct_header += ' safe_%s(const safe_%s& src);\n' % (item.name, item.name) safe_struct_header += ' safe_%s& operator=(const safe_%s& src);\n' % (item.name, item.name) safe_struct_header += ' safe_%s();\n' % item.name safe_struct_header += ' ~safe_%s();\n' % item.name - safe_struct_header += ' void initialize(const %s* in_struct);\n' % item.name - safe_struct_header += ' void initialize(const safe_%s* src);\n' % item.name + safe_struct_header += ' void initialize(const %s* in_struct%s);\n' % (item.name, self.custom_construct_params.get(item.name, '')) + safe_struct_header += ' void initialize(const safe_%s* src);\n' % (item.name) safe_struct_header += ' %s *ptr() { return reinterpret_cast<%s *>(this); }\n' % (item.name, item.name) safe_struct_header += ' %s const *ptr() const { return reinterpret_cast<%s const *>(this); }\n' % (item.name, item.name) safe_struct_header += '};\n' @@ -651,6 +660,15 @@ class HelperFileOutputGenerator(OutputGenerator): struct += ' }\n' struct += '};\n' struct += '\n' + # Output reference lists of instance/device extension names + struct += 'static const char * const k%sExtensionNames = \n' % type + for ext_name, ifdef in extension_dict.items(): + if ifdef is not None: + struct += '#ifdef %s\n' % ifdef + struct += ' %s\n' % ext_name + if ifdef is not None: + struct += '#endif\n' + struct += ';\n\n' extension_helper_header += struct extension_helper_header += '\n' extension_helper_header += '#endif // VK_EXTENSION_HELPER_H_\n' @@ -697,8 +715,8 @@ class HelperFileOutputGenerator(OutputGenerator): object_types_header += '\n' object_types_header += '// Helper array to get Vulkan VK_EXT_debug_report object type enum from the internal layers version\n' object_types_header += 'const VkDebugReportObjectTypeEXT get_debug_report_enum[] = {\n' + object_types_header += ' VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, // No Match\n' for object_type in type_list: - done = False search_type = object_type.replace("kVulkanObjectType", "").lower() for vk_object_type in self.debug_report_object_types: target_type = vk_object_type.replace("VK_DEBUG_REPORT_OBJECT_TYPE_", "").lower() @@ -706,28 +724,22 @@ class HelperFileOutputGenerator(OutputGenerator): target_type = target_type.replace("_", "") if search_type == target_type: object_types_header += ' %s, // %s\n' % (vk_object_type, object_type) - done = True break - if done == False: - object_types_header += ' VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, // No Match\n' object_types_header += '};\n' # Output a conversion routine from the layer object definitions to the core object type definitions object_types_header += '\n' object_types_header += '// Helper array to get Official Vulkan VkObjectType enum from the internal layers version\n' object_types_header += 'const VkObjectType get_object_type_enum[] = {\n' + object_types_header += ' VK_OBJECT_TYPE_UNKNOWN, // No Match\n' for object_type in type_list: - done = False search_type = object_type.replace("kVulkanObjectType", "").lower() for vk_object_type in self.core_object_types: target_type = vk_object_type.replace("VK_OBJECT_TYPE_", "").lower() target_type = target_type.replace("_", "") if search_type == target_type: object_types_header += ' %s, // %s\n' % (vk_object_type, object_type) - done = True break - if done == False: - object_types_header += ' VK_OBJECT_TYPE_UNKNOWN, // No Match\n' object_types_header += '};\n' return object_types_header @@ -774,49 +786,205 @@ class HelperFileOutputGenerator(OutputGenerator): init_func_txt = '' # Txt for initialize() function that takes struct ptr and inits members construct_txt = '' # Body of constuctor as well as body of initialize() func following init_func_txt destruct_txt = '' - # VkWriteDescriptorSet is special case because pointers may be non-null but ignored - custom_construct_txt = {'VkWriteDescriptorSet' : - ' switch (descriptorType) {\n' - ' case VK_DESCRIPTOR_TYPE_SAMPLER:\n' - ' case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:\n' - ' case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:\n' - ' case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:\n' - ' case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:\n' - ' if (descriptorCount && in_struct->pImageInfo) {\n' - ' pImageInfo = new VkDescriptorImageInfo[descriptorCount];\n' - ' for (uint32_t i=0; ipImageInfo[i];\n' - ' }\n' - ' }\n' - ' break;\n' - ' case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:\n' - ' case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:\n' - ' case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:\n' - ' case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:\n' - ' if (descriptorCount && in_struct->pBufferInfo) {\n' - ' pBufferInfo = new VkDescriptorBufferInfo[descriptorCount];\n' - ' for (uint32_t i=0; ipBufferInfo[i];\n' - ' }\n' - ' }\n' - ' break;\n' - ' case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:\n' - ' case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:\n' - ' if (descriptorCount && in_struct->pTexelBufferView) {\n' - ' pTexelBufferView = new VkBufferView[descriptorCount];\n' - ' for (uint32_t i=0; ipTexelBufferView[i];\n' - ' }\n' - ' }\n' - ' break;\n' - ' default:\n' - ' break;\n' - ' }\n', - 'VkShaderModuleCreateInfo' : - ' if (in_struct->pCode) {\n' - ' pCode = reinterpret_cast(new uint8_t[codeSize]);\n' - ' memcpy((void *)pCode, (void *)in_struct->pCode, codeSize);\n' - ' }\n'} + + custom_construct_txt = { + # VkWriteDescriptorSet is special case because pointers may be non-null but ignored + 'VkWriteDescriptorSet' : + ' switch (descriptorType) {\n' + ' case VK_DESCRIPTOR_TYPE_SAMPLER:\n' + ' case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:\n' + ' case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:\n' + ' case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:\n' + ' case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:\n' + ' if (descriptorCount && in_struct->pImageInfo) {\n' + ' pImageInfo = new VkDescriptorImageInfo[descriptorCount];\n' + ' for (uint32_t i=0; ipImageInfo[i];\n' + ' }\n' + ' }\n' + ' break;\n' + ' case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:\n' + ' case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:\n' + ' case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:\n' + ' case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:\n' + ' if (descriptorCount && in_struct->pBufferInfo) {\n' + ' pBufferInfo = new VkDescriptorBufferInfo[descriptorCount];\n' + ' for (uint32_t i=0; ipBufferInfo[i];\n' + ' }\n' + ' }\n' + ' break;\n' + ' case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:\n' + ' case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:\n' + ' if (descriptorCount && in_struct->pTexelBufferView) {\n' + ' pTexelBufferView = new VkBufferView[descriptorCount];\n' + ' for (uint32_t i=0; ipTexelBufferView[i];\n' + ' }\n' + ' }\n' + ' break;\n' + ' default:\n' + ' break;\n' + ' }\n', + 'VkShaderModuleCreateInfo' : + ' if (in_struct->pCode) {\n' + ' pCode = reinterpret_cast(new uint8_t[codeSize]);\n' + ' memcpy((void *)pCode, (void *)in_struct->pCode, codeSize);\n' + ' }\n', + # VkGraphicsPipelineCreateInfo is special case because its pointers may be non-null but ignored + 'VkGraphicsPipelineCreateInfo' : + ' if (stageCount && in_struct->pStages) {\n' + ' pStages = new safe_VkPipelineShaderStageCreateInfo[stageCount];\n' + ' for (uint32_t i=0; ipStages[i]);\n' + ' }\n' + ' }\n' + ' if (in_struct->pVertexInputState)\n' + ' pVertexInputState = new safe_VkPipelineVertexInputStateCreateInfo(in_struct->pVertexInputState);\n' + ' else\n' + ' pVertexInputState = NULL;\n' + ' if (in_struct->pInputAssemblyState)\n' + ' pInputAssemblyState = new safe_VkPipelineInputAssemblyStateCreateInfo(in_struct->pInputAssemblyState);\n' + ' else\n' + ' pInputAssemblyState = NULL;\n' + ' bool has_tessellation_stage = false;\n' + ' if (stageCount && pStages)\n' + ' for (uint32_t i=0; ipTessellationState && has_tessellation_stage)\n' + ' pTessellationState = new safe_VkPipelineTessellationStateCreateInfo(in_struct->pTessellationState);\n' + ' else\n' + ' pTessellationState = NULL; // original pTessellationState pointer ignored\n' + ' bool has_rasterization = in_struct->pRasterizationState ? !in_struct->pRasterizationState->rasterizerDiscardEnable : false;\n' + ' if (in_struct->pViewportState && has_rasterization) {\n' + ' bool is_dynamic_viewports = false;\n' + ' bool is_dynamic_scissors = false;\n' + ' if (in_struct->pDynamicState && in_struct->pDynamicState->pDynamicStates) {\n' + ' for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_viewports; ++i)\n' + ' if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_VIEWPORT)\n' + ' is_dynamic_viewports = true;\n' + ' for (uint32_t i = 0; i < in_struct->pDynamicState->dynamicStateCount && !is_dynamic_scissors; ++i)\n' + ' if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_SCISSOR)\n' + ' is_dynamic_scissors = true;\n' + ' }\n' + ' pViewportState = new safe_VkPipelineViewportStateCreateInfo(in_struct->pViewportState, is_dynamic_viewports, is_dynamic_scissors);\n' + ' } else\n' + ' pViewportState = NULL; // original pViewportState pointer ignored\n' + ' if (in_struct->pRasterizationState)\n' + ' pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(in_struct->pRasterizationState);\n' + ' else\n' + ' pRasterizationState = NULL;\n' + ' if (in_struct->pMultisampleState && has_rasterization)\n' + ' pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(in_struct->pMultisampleState);\n' + ' else\n' + ' pMultisampleState = NULL; // original pMultisampleState pointer ignored\n' + ' // needs a tracked subpass state uses_depthstencil_attachment\n' + ' if (in_struct->pDepthStencilState && has_rasterization && uses_depthstencil_attachment)\n' + ' pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(in_struct->pDepthStencilState);\n' + ' else\n' + ' pDepthStencilState = NULL; // original pDepthStencilState pointer ignored\n' + ' // needs a tracked subpass state usesColorAttachment\n' + ' if (in_struct->pColorBlendState && has_rasterization && uses_color_attachment)\n' + ' pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(in_struct->pColorBlendState);\n' + ' else\n' + ' pColorBlendState = NULL; // original pColorBlendState pointer ignored\n' + ' if (in_struct->pDynamicState)\n' + ' pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(in_struct->pDynamicState);\n' + ' else\n' + ' pDynamicState = NULL;\n', + # VkPipelineViewportStateCreateInfo is special case because its pointers may be non-null but ignored + 'VkPipelineViewportStateCreateInfo' : + ' if (in_struct->pViewports && !is_dynamic_viewports) {\n' + ' pViewports = new VkViewport[in_struct->viewportCount];\n' + ' memcpy ((void *)pViewports, (void *)in_struct->pViewports, sizeof(VkViewport)*in_struct->viewportCount);\n' + ' }\n' + ' else\n' + ' pViewports = NULL;\n' + ' if (in_struct->pScissors && !is_dynamic_scissors) {\n' + ' pScissors = new VkRect2D[in_struct->scissorCount];\n' + ' memcpy ((void *)pScissors, (void *)in_struct->pScissors, sizeof(VkRect2D)*in_struct->scissorCount);\n' + ' }\n' + ' else\n' + ' pScissors = NULL;\n', + # VkDescriptorSetLayoutBinding is special case because its pImmutableSamplers pointer may be non-null but ignored + 'VkDescriptorSetLayoutBinding' : + ' const bool sampler_type = in_struct->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || in_struct->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;\n' + ' if (descriptorCount && in_struct->pImmutableSamplers && sampler_type) {\n' + ' pImmutableSamplers = new VkSampler[descriptorCount];\n' + ' for (uint32_t i=0; ipImmutableSamplers[i];\n' + ' }\n' + ' }\n', + } + + custom_copy_txt = { + # VkGraphicsPipelineCreateInfo is special case because it has custom construct parameters + 'VkGraphicsPipelineCreateInfo' : + ' if (stageCount && src.pStages) {\n' + ' pStages = new safe_VkPipelineShaderStageCreateInfo[stageCount];\n' + ' for (uint32_t i=0; irasterizerDiscardEnable : false;\n' + ' if (src.pViewportState && has_rasterization) {\n' + ' pViewportState = new safe_VkPipelineViewportStateCreateInfo(*src.pViewportState);\n' + ' } else\n' + ' pViewportState = NULL; // original pViewportState pointer ignored\n' + ' if (src.pRasterizationState)\n' + ' pRasterizationState = new safe_VkPipelineRasterizationStateCreateInfo(*src.pRasterizationState);\n' + ' else\n' + ' pRasterizationState = NULL;\n' + ' if (src.pMultisampleState && has_rasterization)\n' + ' pMultisampleState = new safe_VkPipelineMultisampleStateCreateInfo(*src.pMultisampleState);\n' + ' else\n' + ' pMultisampleState = NULL; // original pMultisampleState pointer ignored\n' + ' if (src.pDepthStencilState && has_rasterization)\n' + ' pDepthStencilState = new safe_VkPipelineDepthStencilStateCreateInfo(*src.pDepthStencilState);\n' + ' else\n' + ' pDepthStencilState = NULL; // original pDepthStencilState pointer ignored\n' + ' if (src.pColorBlendState && has_rasterization)\n' + ' pColorBlendState = new safe_VkPipelineColorBlendStateCreateInfo(*src.pColorBlendState);\n' + ' else\n' + ' pColorBlendState = NULL; // original pColorBlendState pointer ignored\n' + ' if (src.pDynamicState)\n' + ' pDynamicState = new safe_VkPipelineDynamicStateCreateInfo(*src.pDynamicState);\n' + ' else\n' + ' pDynamicState = NULL;\n', + # VkPipelineViewportStateCreateInfo is special case because it has custom construct parameters + 'VkPipelineViewportStateCreateInfo' : + ' if (src.pViewports) {\n' + ' pViewports = new VkViewport[src.viewportCount];\n' + ' memcpy ((void *)pViewports, (void *)src.pViewports, sizeof(VkViewport)*src.viewportCount);\n' + ' }\n' + ' else\n' + ' pViewports = NULL;\n' + ' if (src.pScissors) {\n' + ' pScissors = new VkRect2D[src.scissorCount];\n' + ' memcpy ((void *)pScissors, (void *)src.pScissors, sizeof(VkRect2D)*src.scissorCount);\n' + ' }\n' + ' else\n' + ' pScissors = NULL;\n', + } + custom_destruct_txt = {'VkShaderModuleCreateInfo' : ' if (pCode)\n' ' delete[] reinterpret_cast(pCode);\n' } @@ -898,7 +1066,7 @@ class HelperFileOutputGenerator(OutputGenerator): construct_txt = custom_construct_txt[item.name] if item.name in custom_destruct_txt: destruct_txt = custom_destruct_txt[item.name] - safe_struct_body.append("\n%s::%s(const %s* in_struct) :%s\n{\n%s}" % (ss_name, ss_name, item.name, init_list, construct_txt)) + safe_struct_body.append("\n%s::%s(const %s* in_struct%s) :%s\n{\n%s}" % (ss_name, ss_name, item.name, self.custom_construct_params.get(item.name, ''), init_list, construct_txt)) if '' != default_init_list: default_init_list = " :%s" % (default_init_list[:-1]) safe_struct_body.append("\n%s::%s()%s\n{}" % (ss_name, ss_name, default_init_list)) @@ -907,11 +1075,13 @@ class HelperFileOutputGenerator(OutputGenerator): copy_construct_txt = construct_txt.replace(' (in_struct->', ' (src.') # Exclude 'if' blocks from next line copy_construct_txt = copy_construct_txt.replace('(in_struct->', '(*src.') # Pass object to copy constructors copy_construct_txt = copy_construct_txt.replace('in_struct->', 'src.') # Modify remaining struct refs for src object + if item.name in custom_copy_txt: + copy_construct_txt = custom_copy_txt[item.name] copy_assign_txt = ' if (&src == this) return *this;\n\n' + destruct_txt + '\n' + copy_construct_init + copy_construct_txt + '\n return *this;' safe_struct_body.append("\n%s::%s(const %s& src)\n{\n%s%s}" % (ss_name, ss_name, ss_name, copy_construct_init, copy_construct_txt)) # Copy constructor safe_struct_body.append("\n%s& %s::operator=(const %s& src)\n{\n%s\n}" % (ss_name, ss_name, ss_name, copy_assign_txt)) # Copy assignment operator safe_struct_body.append("\n%s::~%s()\n{\n%s}" % (ss_name, ss_name, destruct_txt)) - safe_struct_body.append("\nvoid %s::initialize(const %s* in_struct)\n{\n%s%s}" % (ss_name, item.name, init_func_txt, construct_txt)) + safe_struct_body.append("\nvoid %s::initialize(const %s* in_struct%s)\n{\n%s%s}" % (ss_name, item.name, self.custom_construct_params.get(item.name, ''), init_func_txt, construct_txt)) # Copy initializer uses same txt as copy constructor but has a ptr and not a reference init_copy = copy_construct_init.replace('src.', 'src->') init_construct = copy_construct_txt.replace('src.', 'src->') @@ -920,6 +1090,115 @@ class HelperFileOutputGenerator(OutputGenerator): safe_struct_body.append("#endif // %s\n" % item.ifdef_protect) return "\n".join(safe_struct_body) # + # Generate the type map + def GenerateTypeMapHelperHeader(self): + prefix = 'Lvl' + fprefix = 'lvl_' + typemap = prefix + 'TypeMap' + idmap = prefix + 'STypeMap' + type_member = 'Type' + id_member = 'kSType' + id_decl = 'static const VkStructureType ' + generic_header = prefix + 'GenericHeader' + typename_func = fprefix + 'typename' + idname_func = fprefix + 'stype_name' + find_func = fprefix + 'find_in_chain' + init_func = fprefix + 'init_struct' + + explanatory_comment = '\n'.join(( + '// These empty generic templates are specialized for each type with sType', + '// members and for each sType -- providing a two way map between structure', + '// types and sTypes')) + + empty_typemap = 'template struct ' + typemap + ' {};' + typemap_format = 'template <> struct {template}<{typename}> {{\n' + typemap_format += ' {id_decl}{id_member} = {id_value};\n' + typemap_format += '}};\n' + + empty_idmap = 'template struct ' + idmap + ' {};' + idmap_format = ''.join(( + 'template <> struct {template}<{id_value}> {{\n', + ' typedef {typename} {typedef};\n', + '}};\n')) + + # Define the utilities (here so any renaming stays consistent), if this grows large, refactor to a fixed .h file + utilities_format = '\n'.join(( + '// Header "base class" for pNext chain traversal', + 'struct {header} {{', + ' VkStructureType sType;', + ' const {header} *pNext;', + '}};', + '', + '// Find an entry of the given type in the pNext chain', + 'template const T *{find_func}(const void *next) {{', + ' const {header} *current = reinterpret_cast(next);', + ' const T *found = nullptr;', + ' while (current) {{', + ' if ({type_map}::{id_member} == current->sType) {{', + ' found = reinterpret_cast(current);', + ' current = nullptr;', + ' }} else {{', + ' current = current->pNext;', + ' }}', + ' }}', + ' return found;', + '}}', + '', + '// Init the header of an sType struct with pNext', + 'template T {init_func}(void *p_next) {{', + ' T out = {{}};', + ' out.sType = {type_map}::kSType;', + ' out.pNext = p_next;', + ' return out;', + '}}', + '', + '// Init the header of an sType struct', + 'template T {init_func}() {{', + ' T out = {{}};', + ' out.sType = {type_map}::kSType;', + ' return out;', + '}}', + + '')) + + code = [] + + # Generate header + code.append('\n'.join(( + '#pragma once', + '#include \n', + explanatory_comment, '', + empty_idmap, + empty_typemap, ''))) + + # Generate the specializations for each type and stype + for item in self.structMembers: + typename = item.name + info = self.structTypes.get(typename) + if not info: + continue + + if item.ifdef_protect != None: + code.append('#ifdef %s' % item.ifdef_protect) + + code.append('// Map type {} to id {}'.format(typename, info.value)) + code.append(typemap_format.format(template=typemap, typename=typename, id_value=info.value, + id_decl=id_decl, id_member=id_member)) + code.append(idmap_format.format(template=idmap, typename=typename, id_value=info.value, typedef=type_member)) + + if item.ifdef_protect != None: + code.append('#endif // %s' % item.ifdef_protect) + + # Generate utilities for all types + code.append('\n'.join(( + utilities_format.format(id_member=id_member, id_map=idmap, type_map=typemap, + type_member=type_member, header=generic_header, typename_func=typename_func, idname_func=idname_func, + find_func=find_func, init_func=init_func), '' + ))) + + return "\n".join(code) + + # # Create a helper file and return it as a string def OutputDestFile(self): if self.helper_file_type == 'enum_string_header': @@ -936,6 +1215,8 @@ class HelperFileOutputGenerator(OutputGenerator): return self.GenerateObjectTypesHelperHeader() elif self.helper_file_type == 'extension_helper_header': return self.GenerateExtensionHelperHeader() + elif self.helper_file_type == 'typemap_helper_header': + return self.GenerateTypeMapHelperHeader() else: return 'Bad Helper File Generator Option %s' % self.helper_file_type diff --git a/sources/third_party/vulkan/src/scripts/loader_extension_generator.py b/sources/third_party/vulkan/src/scripts/loader_extension_generator.py index 84cc4ca4bfdb706cfc594f4abe0d1f55addd52b6..9c2e34d50f3d7296f5b5f4480e1fbd78e3736505 100644 --- a/sources/third_party/vulkan/src/scripts/loader_extension_generator.py +++ b/sources/third_party/vulkan/src/scripts/loader_extension_generator.py @@ -32,6 +32,8 @@ WSI_EXT_NAMES = ['VK_KHR_surface', 'VK_KHR_mir_surface', 'VK_KHR_win32_surface', 'VK_KHR_android_surface', + 'VK_MVK_macos_surface', + 'VK_MVK_ios_surface', 'VK_KHR_swapchain', 'VK_KHR_display_swapchain'] @@ -44,6 +46,9 @@ DEVICE_CMDS_NEED_TERM = ['vkGetDeviceProcAddr', 'vkDebugMarkerSetObjectTagEXT', 'vkDebugMarkerSetObjectNameEXT'] +PRE_INSTANCE_FUNCTIONS = ['vkEnumerateInstanceExtensionProperties', + 'vkEnumerateInstanceLayerProperties'] + # # LoaderExtensionGeneratorOptions - subclass of GeneratorOptions. class LoaderExtensionGeneratorOptions(GeneratorOptions): @@ -655,6 +660,9 @@ class LoaderExtensionOutputGenerator(OutputGenerator): new_terminator = cur_cmd.cdecl mod_string = new_terminator.replace("VKAPI_CALL vk", "VKAPI_CALL terminator_") + if cur_cmd.name in PRE_INSTANCE_FUNCTIONS: + mod_string = mod_string.replace(cur_cmd.name[2:] + '(\n', cur_cmd.name[2:] + '(\n const Vk' + cur_cmd.name[2:] + 'Chain* chain,\n') + if (cur_cmd.protect != None): terminators += '#ifdef %s\n' % cur_cmd.protect diff --git a/sources/third_party/vulkan/src/scripts/lvl_genvk.py b/sources/third_party/vulkan/src/scripts/lvl_genvk.py index 194106e0921d28ae9063b6bc54eed1544e341867..7c81f51d209ced22998953e3bf9af4f254da818f 100644 --- a/sources/third_party/vulkan/src/scripts/lvl_genvk.py +++ b/sources/third_party/vulkan/src/scripts/lvl_genvk.py @@ -26,6 +26,7 @@ from object_tracker_generator import ObjectTrackerGeneratorOptions, ObjectTracke from dispatch_table_helper_generator import DispatchTableHelperOutputGenerator, DispatchTableHelperOutputGeneratorOptions from helper_file_generator import HelperFileOutputGenerator, HelperFileOutputGeneratorOptions from loader_extension_generator import LoaderExtensionOutputGenerator, LoaderExtensionGeneratorOptions +from mock_icd_generator import MockICDGeneratorOptions, MockICDOutputGenerator # Simple timer functions startTime = None @@ -122,7 +123,6 @@ def makeGenOpts(extensions = [], removeExtensions = [], protect = True, director alignFuncParam = 48) ] - # Options for parameter validation layer genOpts['parameter_validation.cpp'] = [ ParameterValidationOutputGenerator, @@ -424,6 +424,71 @@ def makeGenOpts(extensions = [], removeExtensions = [], protect = True, director helper_file_type = 'extension_helper_header') ] + # Helper file generator options for typemap_helper.h + genOpts['vk_typemap_helper.h'] = [ + HelperFileOutputGenerator, + HelperFileOutputGeneratorOptions( + filename = 'vk_typemap_helper.h', + directory = directory, + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = addExtensions, + removeExtensions = removeExtensions, + prefixText = prefixStrings + vkPrefixStrings, + protectFeature = False, + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48, + helper_file_type = 'typemap_helper_header') + ] + + # Options for mock ICD header + genOpts['mock_icd.h'] = [ + MockICDOutputGenerator, + MockICDGeneratorOptions( + filename = 'mock_icd.h', + directory = directory, + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = addExtensions, + removeExtensions = removeExtensions, + prefixText = prefixStrings + vkPrefixStrings, + protectFeature = False, + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48, + helper_file_type = 'mock_icd_header') + ] + + # Options for mock ICD cpp + genOpts['mock_icd.cpp'] = [ + MockICDOutputGenerator, + MockICDGeneratorOptions( + filename = 'mock_icd.cpp', + directory = directory, + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = addExtensions, + removeExtensions = removeExtensions, + prefixText = prefixStrings + vkPrefixStrings, + protectFeature = False, + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48, + helper_file_type = 'mock_icd_source') + ] # Generate a target based on the options in the matching genOpts{} object. # This is encapsulated in a function so it can be profiled and/or timed. diff --git a/sources/third_party/vulkan/src/scripts/mock_icd_generator.py b/sources/third_party/vulkan/src/scripts/mock_icd_generator.py new file mode 100644 index 0000000000000000000000000000000000000000..b1d5e58120201f5abf4d2b4d5cbdbf5ab094b360 --- /dev/null +++ b/sources/third_party/vulkan/src/scripts/mock_icd_generator.py @@ -0,0 +1,1059 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2015-2017 The Khronos Group Inc. +# Copyright (c) 2015-2017 Valve Corporation +# Copyright (c) 2015-2017 LunarG, Inc. +# Copyright (c) 2015-2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Author: Tobin Ehlis +# +# This script generates a Mock ICD that intercepts almost all Vulkan +# functions. That layer is not intended to be useful or even compilable +# in its initial state. Rather it's intended to be a starting point that +# can be copied and customized to assist in creation of a new layer. + +import os,re,sys +from generator import * + +# Mock header code +HEADER_C_CODE = ''' +using mutex_t = std::mutex; +using lock_guard_t = std::lock_guard; +using unique_lock_t = std::unique_lock; + +static mutex_t global_lock; +static uint64_t global_unique_handle = 1; +static const uint32_t SUPPORTED_LOADER_ICD_INTERFACE_VERSION = 5; +static uint32_t loader_interface_version = 0; +static bool negotiate_loader_icd_interface_called = false; +static void* CreateDispObjHandle() { + auto handle = new VK_LOADER_DATA; + set_loader_magic_value(handle); + return handle; +} +static void DestroyDispObjHandle(void* handle) { + delete reinterpret_cast(handle); +} +''' + +# Manual code at the top of the cpp source file +SOURCE_CPP_PREFIX = ''' +using std::unordered_map; + +// Map device memory handle to any mapped allocations that we'll need to free on unmap +static unordered_map> mapped_memory_map; + +static VkPhysicalDevice physical_device = nullptr; +static unordered_map>> queue_map; + +// TODO: Would like to codegen this but limits aren't in XML +static VkPhysicalDeviceLimits SetLimits(VkPhysicalDeviceLimits *limits) { + limits->maxImageDimension1D = 4096; + limits->maxImageDimension2D = 4096; + limits->maxImageDimension3D = 256; + limits->maxImageDimensionCube = 4096; + limits->maxImageArrayLayers = 256; + limits->maxTexelBufferElements = 65536; + limits->maxUniformBufferRange = 16384; + limits->maxStorageBufferRange = 134217728; + limits->maxPushConstantsSize = 128; + limits->maxMemoryAllocationCount = 4096; + limits->maxSamplerAllocationCount = 4000; + limits->bufferImageGranularity = 1; + limits->sparseAddressSpaceSize = 2147483648; + limits->maxBoundDescriptorSets = 4; + limits->maxPerStageDescriptorSamplers = 16; + limits->maxPerStageDescriptorUniformBuffers = 12; + limits->maxPerStageDescriptorStorageBuffers = 4; + limits->maxPerStageDescriptorSampledImages = 16; + limits->maxPerStageDescriptorStorageImages = 4; + limits->maxPerStageDescriptorInputAttachments = 4; + limits->maxPerStageResources = 128^2; + limits->maxDescriptorSetSamplers = 96^8; + limits->maxDescriptorSetUniformBuffers = 72^8; + limits->maxDescriptorSetUniformBuffersDynamic = 8; + limits->maxDescriptorSetStorageBuffers = 24^8; + limits->maxDescriptorSetStorageBuffersDynamic = 4; + limits->maxDescriptorSetSampledImages = 96^8; + limits->maxDescriptorSetStorageImages = 24^8; + limits->maxDescriptorSetInputAttachments = 4; + limits->maxVertexInputAttributes = 16; + limits->maxVertexInputBindings = 16; + limits->maxVertexInputAttributeOffset = 2047; + limits->maxVertexInputBindingStride = 2048; + limits->maxVertexOutputComponents = 64; + limits->maxTessellationGenerationLevel = 64; + limits->maxTessellationPatchSize = 32; + limits->maxTessellationControlPerVertexInputComponents = 64; + limits->maxTessellationControlPerVertexOutputComponents = 64; + limits->maxTessellationControlPerPatchOutputComponents = 120; + limits->maxTessellationControlTotalOutputComponents = 2048; + limits->maxTessellationEvaluationInputComponents = 64; + limits->maxTessellationEvaluationOutputComponents = 64; + limits->maxGeometryShaderInvocations = 32; + limits->maxGeometryInputComponents = 64; + limits->maxGeometryOutputComponents = 64; + limits->maxGeometryOutputVertices = 256; + limits->maxGeometryTotalOutputComponents = 1024; + limits->maxFragmentInputComponents = 64; + limits->maxFragmentOutputAttachments = 4; + limits->maxFragmentDualSrcAttachments = 1; + limits->maxFragmentCombinedOutputResources = 4; + limits->maxComputeSharedMemorySize = 16384; + limits->maxComputeWorkGroupCount[0] = 65535; + limits->maxComputeWorkGroupCount[1] = 65535; + limits->maxComputeWorkGroupCount[2] = 65535; + limits->maxComputeWorkGroupInvocations = 128; + limits->maxComputeWorkGroupSize[0] = 128; + limits->maxComputeWorkGroupSize[1] = 128; + limits->maxComputeWorkGroupSize[2] = 64; + limits->subPixelPrecisionBits = 4; + limits->subTexelPrecisionBits = 4; + limits->mipmapPrecisionBits = 4; + limits->maxDrawIndexedIndexValue = (2^32) - 1; + limits->maxDrawIndirectCount = (2^16) - 1; + limits->maxSamplerLodBias = 2.0f; + limits->maxSamplerAnisotropy = 16; + limits->maxViewports = 16; + limits->maxViewportDimensions[0] = 4096; + limits->maxViewportDimensions[1] = 4096; + limits->viewportBoundsRange[0] = -8192; + limits->viewportBoundsRange[1] = 8191; + limits->viewportSubPixelBits = 0; + limits->minMemoryMapAlignment = 64; + limits->minTexelBufferOffsetAlignment = 16; + limits->minUniformBufferOffsetAlignment = 16; + limits->minStorageBufferOffsetAlignment = 16; + limits->minTexelOffset = -8; + limits->maxTexelOffset = 7; + limits->minTexelGatherOffset = -8; + limits->maxTexelGatherOffset = 7; + limits->minInterpolationOffset = 0.0f; + limits->maxInterpolationOffset = 0.5f; + limits->subPixelInterpolationOffsetBits = 4; + limits->maxFramebufferWidth = 4096; + limits->maxFramebufferHeight = 4096; + limits->maxFramebufferLayers = 256; + limits->framebufferColorSampleCounts = 0x7F; + limits->framebufferDepthSampleCounts = 0x7F; + limits->framebufferStencilSampleCounts = 0x7F; + limits->framebufferNoAttachmentsSampleCounts = 0x7F; + limits->maxColorAttachments = 4; + limits->sampledImageColorSampleCounts = 0x7F; + limits->sampledImageIntegerSampleCounts = 0x7F; + limits->sampledImageDepthSampleCounts = 0x7F; + limits->sampledImageStencilSampleCounts = 0x7F; + limits->storageImageSampleCounts = 0x7F; + limits->maxSampleMaskWords = 1; + limits->timestampComputeAndGraphics = VK_TRUE; + limits->timestampPeriod = 1; + limits->maxClipDistances = 8; + limits->maxCullDistances = 8; + limits->maxCombinedClipAndCullDistances = 8; + limits->discreteQueuePriorities = 2; + limits->pointSizeRange[0] = 1.0f; + limits->pointSizeRange[1] = 64.0f; + limits->lineWidthRange[0] = 1.0f; + limits->lineWidthRange[1] = 8.0f; + limits->pointSizeGranularity = 1.0f; + limits->lineWidthGranularity = 1.0f; + limits->strictLines = VK_TRUE; + limits->standardSampleLocations = VK_TRUE; + limits->optimalBufferCopyOffsetAlignment = 1; + limits->optimalBufferCopyRowPitchAlignment = 1; + limits->nonCoherentAtomSize = 256; + + return *limits; +} +''' + +# Manual code at the end of the cpp source file +SOURCE_CPP_POSTFIX = ''' + +static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { + // TODO: This function should only care about physical device functions and return nullptr for other functions + const auto &item = name_to_funcptr_map.find(funcName); + if (item != name_to_funcptr_map.end()) { + return reinterpret_cast(item->second); + } + // Mock should intercept all functions so if we get here just return null + return nullptr; +} + +} // namespace vkmock + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define EXPORT __attribute__((visibility("default"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define EXPORT __attribute__((visibility("default"))) +#else +#define EXPORT +#endif + +extern "C" { + +EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName) { + if (!vkmock::negotiate_loader_icd_interface_called) { + vkmock::loader_interface_version = 1; + } + return vkmock::GetInstanceProcAddr(instance, pName); +} + +EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName) { + return vkmock::GetPhysicalDeviceProcAddr(instance, pName); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) { + vkmock::negotiate_loader_icd_interface_called = true; + vkmock::loader_interface_version = *pSupportedVersion; + if (*pSupportedVersion > vkmock::SUPPORTED_LOADER_ICD_INTERFACE_VERSION) { + *pSupportedVersion = vkmock::SUPPORTED_LOADER_ICD_INTERFACE_VERSION; + } + return VK_SUCCESS; +} + + +EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR( + VkInstance instance, + VkSurfaceKHR surface, + const VkAllocationCallbacks* pAllocator) +{ + vkmock::DestroySurfaceKHR(instance, surface, pAllocator); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + VkSurfaceKHR surface, + VkBool32* pSupported) +{ + return vkmock::GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) +{ + return vkmock::GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, + VkSurfaceFormatKHR* pSurfaceFormats) +{ + return vkmock::GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes) +{ + return vkmock::GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( + VkInstance instance, + const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +#ifdef VK_USE_PLATFORM_XLIB_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( + VkInstance instance, + const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_XLIB_KHR */ + +#ifdef VK_USE_PLATFORM_XCB_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( + VkInstance instance, + const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_XCB_KHR */ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( + VkInstance instance, + const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_WAYLAND_KHR */ + +#ifdef VK_USE_PLATFORM_MIR_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR( + VkInstance instance, + const VkMirSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateMirSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_MIR_KHR */ + +#ifdef VK_USE_PLATFORM_ANDROID_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( + VkInstance instance, + const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_ANDROID_KHR */ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( + VkInstance instance, + const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_WIN32_KHR */ + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX( + VkDevice device, + VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHX* pModes) +{ + return vkmock::GetDeviceGroupSurfacePresentModesKHX(device, surface, pModes); +} + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHX( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pRectCount, + VkRect2D* pRects) +{ + return vkmock::GetPhysicalDevicePresentRectanglesKHX(physicalDevice, surface, pRectCount, pRects); +} + +#ifdef VK_USE_PLATFORM_VI_NN + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( + VkInstance instance, + const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_VI_NN */ + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities) +{ + return vkmock::GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); +} + +#ifdef VK_USE_PLATFORM_IOS_MVK + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( + VkInstance instance, + const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_IOS_MVK */ + +#ifdef VK_USE_PLATFORM_MACOS_MVK + +EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( + VkInstance instance, + const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface) +{ + return vkmock::CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); +} +#endif /* VK_USE_PLATFORM_MACOS_MVK */ + +} // end extern "C" + +''' + +CUSTOM_C_INTERCEPTS = { +'vkCreateInstance': ''' + // TODO: If loader ver <=4 ICD must fail with VK_ERROR_INCOMPATIBLE_DRIVER for all vkCreateInstance calls with + // apiVersion set to > Vulkan 1.0 because the loader is still at interface version <= 4. Otherwise, the + // ICD should behave as normal. + if (loader_interface_version <= 4) { + return VK_ERROR_INCOMPATIBLE_DRIVER; + } + *pInstance = (VkInstance)CreateDispObjHandle(); + // TODO: If emulating specific device caps, will need to add intelligence here + return VK_SUCCESS; +''', +'vkDestroyInstance': ''' + // Destroy physical device + DestroyDispObjHandle((void*)physical_device); + + DestroyDispObjHandle((void*)instance); +''', +'vkEnumeratePhysicalDevices': ''' + if (pPhysicalDevices) { + if (!physical_device) { + physical_device = (VkPhysicalDevice)CreateDispObjHandle(); + } + *pPhysicalDevices = physical_device; + } else { + *pPhysicalDeviceCount = 1; + } + return VK_SUCCESS; +''', +'vkCreateDevice': ''' + *pDevice = (VkDevice)CreateDispObjHandle(); + // TODO: If emulating specific device caps, will need to add intelligence here + return VK_SUCCESS; +''', +'vkDestroyDevice': ''' + unique_lock_t lock(global_lock); + // First destroy sub-device objects + // Destroy Queues + for (auto dev_queue_map_pair : queue_map) { + for (auto queue_family_map_pair : queue_map[dev_queue_map_pair.first]) { + for (auto index_queue_pair : queue_map[dev_queue_map_pair.first][queue_family_map_pair.first]) { + DestroyDispObjHandle((void*)index_queue_pair.second); + } + } + } + queue_map.clear(); + // Now destroy device + DestroyDispObjHandle((void*)device); + // TODO: If emulating specific device caps, will need to add intelligence here +''', +'vkGetDeviceQueue': ''' + unique_lock_t lock(global_lock); + auto queue = queue_map[device][queueFamilyIndex][queueIndex]; + if (queue) { + *pQueue = queue; + } else { + *pQueue = queue_map[device][queueFamilyIndex][queueIndex] = (VkQueue)CreateDispObjHandle(); + } + // TODO: If emulating specific device caps, will need to add intelligence here + return; +''', +'vkEnumerateInstanceLayerProperties': ''' + return VK_SUCCESS; +''', +'vkEnumerateDeviceLayerProperties': ''' + return VK_SUCCESS; +''', +'vkEnumerateInstanceExtensionProperties': ''' + // If requesting number of extensions, return that + if (!pLayerName) { + if (!pProperties) { + *pPropertyCount = (uint32_t)instance_extension_map.size(); + } else { + uint32_t i = 0; + for (const auto &name_ver_pair : instance_extension_map) { + if (i == *pPropertyCount) { + break; + } + std::strncpy(pProperties[i].extensionName, name_ver_pair.first.c_str(), sizeof(pProperties[i].extensionName)); + pProperties[i].extensionName[sizeof(pProperties[i].extensionName) - 1] = 0; + pProperties[i].specVersion = name_ver_pair.second; + ++i; + } + if (i != instance_extension_map.size()) { + return VK_INCOMPLETE; + } + } + } + // If requesting extension properties, fill in data struct for number of extensions + return VK_SUCCESS; +''', +'vkEnumerateDeviceExtensionProperties': ''' + // If requesting number of extensions, return that + if (!pLayerName) { + if (!pProperties) { + *pPropertyCount = (uint32_t)device_extension_map.size(); + } else { + uint32_t i = 0; + for (const auto &name_ver_pair : device_extension_map) { + if (i == *pPropertyCount) { + break; + } + std::strncpy(pProperties[i].extensionName, name_ver_pair.first.c_str(), sizeof(pProperties[i].extensionName)); + pProperties[i].extensionName[sizeof(pProperties[i].extensionName) - 1] = 0; + pProperties[i].specVersion = name_ver_pair.second; + ++i; + } + if (i != device_extension_map.size()) { + return VK_INCOMPLETE; + } + } + } + // If requesting extension properties, fill in data struct for number of extensions + return VK_SUCCESS; +''', +'vkGetInstanceProcAddr': ''' + if (!negotiate_loader_icd_interface_called) { + loader_interface_version = 0; + } + const auto &item = name_to_funcptr_map.find(pName); + if (item != name_to_funcptr_map.end()) { + return reinterpret_cast(item->second); + } + // Mock should intercept all functions so if we get here just return null + return nullptr; +''', +'vkGetDeviceProcAddr': ''' + return GetInstanceProcAddr(nullptr, pName); +''', +'vkGetPhysicalDeviceMemoryProperties': ''' + pMemoryProperties->memoryTypeCount = 2; + pMemoryProperties->memoryTypes[0].propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + pMemoryProperties->memoryTypes[0].heapIndex = 0; + pMemoryProperties->memoryTypes[1].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + pMemoryProperties->memoryTypes[1].heapIndex = 1; + pMemoryProperties->memoryHeapCount = 2; + pMemoryProperties->memoryHeaps[0].flags = 0; + pMemoryProperties->memoryHeaps[0].size = 8000000000; + pMemoryProperties->memoryHeaps[1].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT; + pMemoryProperties->memoryHeaps[1].size = 8000000000; +''', +'vkGetPhysicalDeviceMemoryProperties2KHR': ''' + GetPhysicalDeviceMemoryProperties(physicalDevice, &pMemoryProperties->memoryProperties); +''', +'vkGetPhysicalDeviceQueueFamilyProperties': ''' + if (!pQueueFamilyProperties) { + *pQueueFamilyPropertyCount = 1; + } else { + if (*pQueueFamilyPropertyCount) { + pQueueFamilyProperties[0].queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT | VK_QUEUE_SPARSE_BINDING_BIT; + pQueueFamilyProperties[0].queueCount = 1; + pQueueFamilyProperties[0].timestampValidBits = 0; + pQueueFamilyProperties[0].minImageTransferGranularity = {1,1,1}; + } + } +''', +'vkGetPhysicalDeviceQueueFamilyProperties2KHR': ''' + if (pQueueFamilyPropertyCount && pQueueFamilyProperties) { + GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, &pQueueFamilyProperties->queueFamilyProperties); + } else { + GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, nullptr); + } +''', +'vkGetPhysicalDeviceFeatures': ''' + uint32_t num_bools = sizeof(VkPhysicalDeviceFeatures) / sizeof(VkBool32); + VkBool32 *pBool = &pFeatures->robustBufferAccess; + for (uint32_t i = 0; i < num_bools; ++i) { + pBool[i] = VK_TRUE; + } +''', +'vkGetPhysicalDeviceFeatures2KHR': ''' + GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); +''', +'vkGetPhysicalDeviceFormatProperties': ''' + if (VK_FORMAT_UNDEFINED == format) { + *pFormatProperties = { 0x0, 0x0, 0x0 }; + } else { + // TODO: Just returning full support for everything initially + *pFormatProperties = { 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF }; + } +''', +'vkGetPhysicalDeviceFormatProperties2KHR': ''' + GetPhysicalDeviceFormatProperties(physicalDevice, format, &pFormatProperties->formatProperties); +''', +'vkGetPhysicalDeviceImageFormatProperties': ''' + // TODO: Just hard-coding some values for now + // TODO: If tiling is linear, limit the mips, levels, & sample count + if (VK_IMAGE_TILING_LINEAR == tiling) { + *pImageFormatProperties = { { 4096, 4096, 256 }, 1, 1, VK_SAMPLE_COUNT_1_BIT, 4294967296 }; + } else { + *pImageFormatProperties = { { 4096, 4096, 256 }, 12, 256, 0x7F, 4294967296 }; + } + return VK_SUCCESS; +''', +'vkGetPhysicalDeviceImageFormatProperties2KHR': ''' + GetPhysicalDeviceImageFormatProperties(physicalDevice, pImageFormatInfo->format, pImageFormatInfo->type, pImageFormatInfo->tiling, pImageFormatInfo->usage, pImageFormatInfo->flags, &pImageFormatProperties->imageFormatProperties); + return VK_SUCCESS; +''', +'vkGetPhysicalDeviceProperties': ''' + // TODO: Just hard-coding some values for now + pProperties->apiVersion = VK_API_VERSION_1_0; + pProperties->driverVersion = 1; + pProperties->vendorID = 0xba5eba11; + pProperties->deviceID = 0xf005ba11; + pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU; + //std::string devName = "Vulkan Mock Device"; + strcpy(pProperties->deviceName, "Vulkan Mock Device"); + pProperties->pipelineCacheUUID[0] = 18; + pProperties->limits = SetLimits(&pProperties->limits); + pProperties->sparseProperties = { VK_TRUE, VK_TRUE, VK_TRUE, VK_TRUE, VK_TRUE }; +''', +'vkGetPhysicalDeviceProperties2KHR': ''' + GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties); +''', +'vkGetBufferMemoryRequirements': ''' + // TODO: Just hard-coding reqs for now + pMemoryRequirements->size = 4096; + pMemoryRequirements->alignment = 1; + pMemoryRequirements->memoryTypeBits = 0xFFFF; +''', +'vkGetBufferMemoryRequirements2KHR': ''' + GetBufferMemoryRequirements(device, pInfo->buffer, &pMemoryRequirements->memoryRequirements); +''', +'vkGetImageMemoryRequirements': ''' + // TODO: Just hard-coding reqs for now + pMemoryRequirements->size = 4096; + pMemoryRequirements->alignment = 1; + pMemoryRequirements->memoryTypeBits = 0xFFFF; +''', +'vkGetImageMemoryRequirements2KHR': ''' + GetImageMemoryRequirements(device, pInfo->image, &pMemoryRequirements->memoryRequirements); +''', +'vkMapMemory': ''' + unique_lock_t lock(global_lock); + // TODO: Just hard-coding 64k whole size for now + if (VK_WHOLE_SIZE == size) + size = 0x10000; + void* map_addr = malloc((size_t)size); + mapped_memory_map[memory].push_back(map_addr); + *ppData = map_addr; + return VK_SUCCESS; +''', +'vkUnmapMemory': ''' + unique_lock_t lock(global_lock); + for (auto map_addr : mapped_memory_map[memory]) { + free(map_addr); + } + mapped_memory_map.erase(memory); +''', +'vkGetImageSubresourceLayout': ''' + // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. + *pLayout = VkSubresourceLayout(); // Default constructor zero values. +''', +} + +# MockICDGeneratorOptions - subclass of GeneratorOptions. +# +# Adds options used by MockICDOutputGenerator objects during Mock +# ICD generation. +# +# Additional members +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# protectFile - True if multiple inclusion protection should be +# generated (based on the filename) around the entire header. +# protectFeature - True if #ifndef..#endif protection should be +# generated around a feature interface in the header file. +# genFuncPointers - True if function pointer typedefs should be +# generated +# protectProto - If conditional protection should be generated +# around prototype declarations, set to either '#ifdef' +# to require opt-in (#ifdef protectProtoStr) or '#ifndef' +# to require opt-out (#ifndef protectProtoStr). Otherwise +# set to None. +# protectProtoStr - #ifdef/#ifndef symbol to use around prototype +# declarations, if protectProto is set +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +# indentFuncProto - True if prototype declarations should put each +# parameter on a separate line +# indentFuncPointer - True if typedefed function pointers should put each +# parameter on a separate line +# alignFuncParam - if nonzero and parameters are being put on a +# separate line, align parameter names at the specified column +class MockICDGeneratorOptions(GeneratorOptions): + def __init__(self, + filename = None, + directory = '.', + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + genFuncPointers = True, + protectFile = True, + protectFeature = True, + protectProto = None, + protectProtoStr = None, + apicall = '', + apientry = '', + apientryp = '', + indentFuncProto = True, + indentFuncPointer = False, + alignFuncParam = 0, + helper_file_type = ''): + GeneratorOptions.__init__(self, filename, directory, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.genFuncPointers = genFuncPointers + self.protectFile = protectFile + self.protectFeature = protectFeature + self.protectProto = protectProto + self.protectProtoStr = protectProtoStr + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.indentFuncProto = indentFuncProto + self.indentFuncPointer = indentFuncPointer + self.alignFuncParam = alignFuncParam + +# MockICDOutputGenerator - subclass of OutputGenerator. +# Generates a mock vulkan ICD. +# This is intended to be a minimal replacement for a vulkan device in order +# to enable Vulkan Validation testing. +# +# ---- methods ---- +# MockOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class MockICDOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + # This is an ordered list of sections in the header file. + TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum', + 'group', 'bitmask', 'funcpointer', 'struct'] + ALL_SECTIONS = TYPE_SECTIONS + ['command'] + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # Internal state - accumulators for different inner block text + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + self.intercepts = [] + + # Check if the parameter passed in is a pointer to an array + def paramIsArray(self, param): + return param.attrib.get('len') is not None + + # Check if the parameter passed in is a pointer + def paramIsPointer(self, param): + ispointer = False + for elem in param: + if ((elem.tag is not 'type') and (elem.tail is not None)) and '*' in elem.tail: + ispointer = True + return ispointer + + # Check if an object is a non-dispatchable handle + def isHandleTypeNonDispatchable(self, handletype): + handle = self.registry.tree.find("types/type/[name='" + handletype + "'][@category='handle']") + if handle is not None and handle.find('type').text == 'VK_DEFINE_NON_DISPATCHABLE_HANDLE': + return True + else: + return False + + # Check if an object is a dispatchable handle + def isHandleTypeDispatchable(self, handletype): + handle = self.registry.tree.find("types/type/[name='" + handletype + "'][@category='handle']") + if handle is not None and handle.find('type').text == 'VK_DEFINE_HANDLE': + return True + else: + return False + + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + # C-specific + # + # Multiple inclusion protection & C++ namespace. + self.header = False + if (genOpts.protectFile and self.genOpts.filename and 'h' == self.genOpts.filename[-1]): + self.header = True + headerSym = '__' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) + write('#ifndef', headerSym, file=self.outFile) + write('#define', headerSym, '1', file=self.outFile) + self.newline() + # + # User-supplied prefix text, if any (list of strings) + if (genOpts.prefixText): + for s in genOpts.prefixText: + write(s, file=self.outFile) + if self.header: + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include "vulkan/vk_icd.h"', file=self.outFile) + else: + write('#include "mock_icd.h"', file=self.outFile) + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + + write('namespace vkmock {', file=self.outFile) + if self.header: + self.newline() + write(HEADER_C_CODE, file=self.outFile) + # Include all of the extensions in ICD except specific ignored ones + device_exts = [] + instance_exts = [] + # Ignore extensions that ICDs should not implement or are not safe to report + ignore_exts = ['VK_EXT_validation_cache', 'VK_KHR_push_descriptor'] + for ext in self.registry.tree.findall("extensions/extension"): + if '0' != ext[0][0].attrib['value']: # Only include implemented extensions + if (ext.attrib['name'] in ignore_exts): + pass + elif (ext.attrib.get('type') and 'instance' == ext.attrib['type']): + instance_exts.append(' {"%s", %s},' % (ext.attrib['name'], ext[0][0].attrib['value'])) + else: + device_exts.append(' {"%s", %s},' % (ext.attrib['name'], ext[0][0].attrib['value'])) + write('// Map of instance extension name to version', file=self.outFile) + write('static const std::unordered_map instance_extension_map = {', file=self.outFile) + write('\n'.join(instance_exts), file=self.outFile) + write('};', file=self.outFile) + write('// Map of device extension name to version', file=self.outFile) + write('static const std::unordered_map device_extension_map = {', file=self.outFile) + write('\n'.join(device_exts), file=self.outFile) + write('};', file=self.outFile) + + else: + self.newline() + write(SOURCE_CPP_PREFIX, file=self.outFile) + + def endFile(self): + # C-specific + # Finish C++ namespace and multiple inclusion protection + self.newline() + if self.header: + # record intercepted procedures + write('// Map of all APIs to be intercepted by this layer', file=self.outFile) + write('static const std::unordered_map name_to_funcptr_map = {', file=self.outFile) + write('\n'.join(self.intercepts), file=self.outFile) + write('};\n', file=self.outFile) + self.newline() + write('} // namespace vkmock', file=self.outFile) + self.newline() + write('#endif', file=self.outFile) + else: # Loader-layer-interface, need to implement global interface functions + write(SOURCE_CPP_POSTFIX, file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + #write('// starting beginFeature', file=self.outFile) + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + # C-specific + # Accumulate includes, defines, types, enums, function pointer typedefs, + # end function prototypes separately for this feature. They're only + # printed in endFeature(). + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + #write('// ending beginFeature', file=self.outFile) + def endFeature(self): + # C-specific + # Actually write the interface to the output file. + #write('// starting endFeature', file=self.outFile) + if (self.emit): + self.newline() + if (self.genOpts.protectFeature): + write('#ifndef', self.featureName, file=self.outFile) + # If type declarations are needed by other features based on + # this one, it may be necessary to suppress the ExtraProtect, + # or move it below the 'for section...' loop. + #write('// endFeature looking at self.featureExtraProtect', file=self.outFile) + if (self.featureExtraProtect != None): + write('#ifdef', self.featureExtraProtect, file=self.outFile) + #write('#define', self.featureName, '1', file=self.outFile) + for section in self.TYPE_SECTIONS: + #write('// endFeature writing section'+section, file=self.outFile) + contents = self.sections[section] + if contents: + write('\n'.join(contents), file=self.outFile) + self.newline() + #write('// endFeature looking at self.sections[command]', file=self.outFile) + if (self.sections['command']): + write('\n'.join(self.sections['command']), end=u'', file=self.outFile) + self.newline() + if (self.featureExtraProtect != None): + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if (self.genOpts.protectFeature): + write('#endif /*', self.featureName, '*/', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFeature(self) + #write('// ending endFeature', file=self.outFile) + # + # Append a definition to the specified section + def appendSection(self, section, text): + # self.sections[section].append('SECTION: ' + section + '\n') + self.sections[section].append(text) + # + # Type generation + def genType(self, typeinfo, name): + pass + # + # Struct (e.g. C "struct" type) generation. + # This is a special case of the tag where the contents are + # interpreted as a set of tags instead of freeform C + # C type declarations. The tags are just like + # tags - they are a declaration of a struct or union member. + # Only simple member declarations are supported (no nested + # structs etc.) + def genStruct(self, typeinfo, typeName): + OutputGenerator.genStruct(self, typeinfo, typeName) + body = 'typedef ' + typeinfo.elem.get('category') + ' ' + typeName + ' {\n' + # paramdecl = self.makeCParamDecl(typeinfo.elem, self.genOpts.alignFuncParam) + for member in typeinfo.elem.findall('.//member'): + body += self.makeCParamDecl(member, self.genOpts.alignFuncParam) + body += ';\n' + body += '} ' + typeName + ';\n' + self.appendSection('struct', body) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + def genGroup(self, groupinfo, groupName): + pass + # Enumerant generation + # tags may specify their values in several ways, but are usually + # just integers. + def genEnum(self, enuminfo, name): + pass + # + # Command generation + def genCmd(self, cmdinfo, name): + decls = self.makeCDecls(cmdinfo.elem) + if self.header: # In the header declare all intercepts + self.appendSection('command', '') + self.appendSection('command', 'static %s' % (decls[0])) + if (self.featureExtraProtect != None): + self.intercepts += [ '#ifdef %s' % self.featureExtraProtect ] + self.intercepts += [ ' {"%s", (void*)%s},' % (name,name[2:]) ] + if (self.featureExtraProtect != None): + self.intercepts += [ '#endif' ] + return + + manual_functions = [ + # Include functions here to be interecpted w/ manually implemented function bodies + 'vkGetDeviceProcAddr', + 'vkGetInstanceProcAddr', + 'vkCreateDevice', + 'vkDestroyDevice', + 'vkCreateInstance', + 'vkDestroyInstance', + #'vkCreateDebugReportCallbackEXT', + #'vkDestroyDebugReportCallbackEXT', + 'vkEnumerateInstanceLayerProperties', + 'vkEnumerateInstanceExtensionProperties', + 'vkEnumerateDeviceLayerProperties', + 'vkEnumerateDeviceExtensionProperties', + ] + if name in manual_functions: + self.appendSection('command', '') + if name not in CUSTOM_C_INTERCEPTS: + self.appendSection('command', '// declare only') + self.appendSection('command', 'static %s' % (decls[0])) + self.appendSection('command', '// TODO: Implement custom intercept body') + else: + self.appendSection('command', 'static %s' % (decls[0][:-1])) + self.appendSection('command', '{\n%s}' % (CUSTOM_C_INTERCEPTS[name])) + self.intercepts += [ ' {"%s", (void*)%s},' % (name,name[2:]) ] + return + # record that the function will be intercepted + if (self.featureExtraProtect != None): + self.intercepts += [ '#ifdef %s' % self.featureExtraProtect ] + self.intercepts += [ ' {"%s", (void*)%s},' % (name,name[2:]) ] + if (self.featureExtraProtect != None): + self.intercepts += [ '#endif' ] + + OutputGenerator.genCmd(self, cmdinfo, name) + # + self.appendSection('command', '') + self.appendSection('command', 'static %s' % (decls[0][:-1])) + if name in CUSTOM_C_INTERCEPTS: + self.appendSection('command', '{%s}' % (CUSTOM_C_INTERCEPTS[name])) + return + self.appendSection('command', '{') + + api_function_name = cmdinfo.elem.attrib.get('name') + # GET THE TYPE OF FUNCTION + if True in [ftxt in api_function_name for ftxt in ['Create', 'Allocate']]: + # Get last param + last_param = cmdinfo.elem.findall('param')[-1] + lp_txt = last_param.find('name').text + lp_len = None + if ('len' in last_param.attrib): + lp_len = last_param.attrib['len'] + lp_len = lp_len.replace('::', '->') + lp_type = last_param.find('type').text + handle_type = 'dispatchable' + allocator_txt = 'CreateDispObjHandle()'; + if (self.isHandleTypeNonDispatchable(lp_type)): + handle_type = 'non-' + handle_type + allocator_txt = 'global_unique_handle++'; + # Need to lock in both cases + self.appendSection('command', ' unique_lock_t lock(global_lock);') + if (lp_len != None): + #print("%s last params (%s) has len %s" % (handle_type, lp_txt, lp_len)) + self.appendSection('command', ' for (uint32_t i = 0; i < %s; ++i) {' % (lp_len)) + self.appendSection('command', ' %s[i] = (%s)%s;' % (lp_txt, lp_type, allocator_txt)) + self.appendSection('command', ' }') + else: + #print("Single %s last param is '%s' w/ type '%s'" % (handle_type, lp_txt, lp_type)) + self.appendSection('command', ' *%s = (%s)%s;' % (lp_txt, lp_type, allocator_txt)) + elif True in [ftxt in api_function_name for ftxt in ['Destroy', 'Free']]: + self.appendSection('command', '//Destroy object') + else: + self.appendSection('command', '//Not a CREATE or DESTROY function') + # Declare result variable, if any. + resulttype = cmdinfo.elem.find('proto/type') + if (resulttype != None and resulttype.text == 'void'): + resulttype = None + + # Return result variable, if any. + if (resulttype != None): + self.appendSection('command', ' return VK_SUCCESS;') + self.appendSection('command', '}') + # + # override makeProtoName to drop the "vk" prefix + def makeProtoName(self, name, tail): + return self.genOpts.apientry + name[2:] + tail diff --git a/sources/third_party/vulkan/src/scripts/object_tracker_generator.py b/sources/third_party/vulkan/src/scripts/object_tracker_generator.py index 5106bb46dcb6f6f14d9a96a94914814bae482208..e9109e5b28bfc2bc9d7ce1e2f16153fa97cc3b0e 100644 --- a/sources/third_party/vulkan/src/scripts/object_tracker_generator.py +++ b/sources/third_party/vulkan/src/scripts/object_tracker_generator.py @@ -25,6 +25,9 @@ from generator import * from collections import namedtuple from vuid_mapping import * +# This is a workaround to use a Python 2.7 and 3.x compatible syntax. +from io import open + # ObjectTrackerGeneratorOptions - subclass of GeneratorOptions. # # Adds options used by ObjectTrackerOutputGenerator objects during @@ -166,6 +169,7 @@ class ObjectTrackerOutputGenerator(OutputGenerator): 'vkCreateComputePipelines', 'vkGetDeviceQueue', 'vkGetSwapchainImagesKHR', + 'vkCreateDescriptorSetLayout', ] # These VUIDS are not implicit, but are best handled in this layer. Codegen for vkDestroy calls will generate a key # which is translated here into a good VU. Saves ~40 checks. @@ -234,6 +238,9 @@ class ObjectTrackerOutputGenerator(OutputGenerator): self.valid_vuids = set() # Set of all valid VUIDs self.vuid_file = None # Cover cases where file is built from scripts directory, Lin/Win, or Android build structure + # Set cwd to the script directory to more easily locate the header. + previous_dir = os.getcwd() + os.chdir(os.path.dirname(sys.argv[0])) vuid_filename_locations = [ './vk_validation_error_messages.h', '../layers/vk_validation_error_messages.h', @@ -246,7 +253,8 @@ class ObjectTrackerOutputGenerator(OutputGenerator): break if self.vuid_file == None: print("Error: Could not find vk_validation_error_messages.h") - quit() + sys.exit(1) + os.chdir(previous_dir) # # Check if the parameter passed in is optional def paramIsOptional(self, param): @@ -934,7 +942,12 @@ class ObjectTrackerOutputGenerator(OutputGenerator): API = cmdinfo.elem.attrib.get('name').replace('vk', dispatch_table, 1) # Put all this together for the final down-chain call if assignresult != '': - self.appendSection('command', ' if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;') + if resulttype.text == 'VkResult': + self.appendSection('command', ' if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;') + elif resulttype.text == 'VkBool32': + self.appendSection('command', ' if (skip) return VK_FALSE;') + else: + raise Exception('Unknown result type ' + resulttype.text) else: self.appendSection('command', ' if (skip) return;') self.appendSection('command', ' ' + assignresult + API + '(' + paramstext + ');') diff --git a/sources/third_party/vulkan/src/scripts/parameter_validation_generator.py b/sources/third_party/vulkan/src/scripts/parameter_validation_generator.py index 032b9fd8b9b2cc1d47d04ac188cddc59ef073098..4a9ec4ea778632468e78fcb4bbeed218559f4248 100644 --- a/sources/third_party/vulkan/src/scripts/parameter_validation_generator.py +++ b/sources/third_party/vulkan/src/scripts/parameter_validation_generator.py @@ -26,6 +26,8 @@ from generator import * from collections import namedtuple from vuid_mapping import * +# This is a workaround to use a Python 2.7 and 3.x compatible syntax. +from io import open # ParameterValidationGeneratorOptions - subclass of GeneratorOptions. # @@ -152,6 +154,8 @@ class ParameterValidationOutputGenerator(OutputGenerator): 'vkCreateDebugReportCallbackEXT', 'vkDestroyDebugReportCallbackEXT', 'vkCreateCommandPool', + 'vkCreateRenderPass', + 'vkDestroyRenderPass', ] # Structure fields to ignore self.structMemberBlacklist = { 'VkWriteDescriptorSet' : ['dstSet'] } @@ -189,6 +193,9 @@ class ParameterValidationOutputGenerator(OutputGenerator): self.vuid_file = None # Cover cases where file is built from scripts directory, Lin/Win, or Android build structure + # Set cwd to the script directory to more easily locate the header. + previous_dir = os.getcwd() + os.chdir(os.path.dirname(sys.argv[0])) vuid_filename_locations = [ './vk_validation_error_messages.h', '../layers/vk_validation_error_messages.h', @@ -201,7 +208,8 @@ class ParameterValidationOutputGenerator(OutputGenerator): break if self.vuid_file == None: print("Error: Could not find vk_validation_error_messages.h") - quit() + sys.exit(1) + os.chdir(previous_dir) # # Generate Copyright comment block for file def GenerateCopyright(self): @@ -246,7 +254,7 @@ class ParameterValidationOutputGenerator(OutputGenerator): def IdToHex(self, dec_num): if dec_num > 4294967295: print ("ERROR: Decimal # %d can't be represented in 8 hex digits" % (dec_num)) - sys.exit() + sys.exit(1) hex_num = hex(dec_num) return hex_num[2:].zfill(8) # @@ -1198,7 +1206,13 @@ class ParameterValidationOutputGenerator(OutputGenerator): cmdDef += '%sbool skip = false;\n' % indent if not just_validate: if command.result != '': - cmdDef += indent + '%s result = VK_ERROR_VALIDATION_FAILED_EXT;\n' % command.result + if command.result == "VkResult": + cmdDef += indent + '%s result = VK_ERROR_VALIDATION_FAILED_EXT;\n' % command.result + elif command.result == "VkBool32": + cmdDef += indent + '%s result = VK_FALSE;\n' % command.result + else: + raise Exception("Unknown result type: " + command.result) + cmdDef += '%sstd::unique_lock lock(global_lock);\n' % indent for line in lines: cmdDef += '\n' diff --git a/sources/third_party/vulkan/src/scripts/reg.py b/sources/third_party/vulkan/src/scripts/reg.py index a591380bc210f1489f0ab3e079ffae2e15f03cdc..afcca4e366f6682c95a02be9b320fb602bc264e6 100755 --- a/sources/third_party/vulkan/src/scripts/reg.py +++ b/sources/third_party/vulkan/src/scripts/reg.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright (c) 2013-2017 The Khronos Group Inc. +# Copyright (c) 2013-2018 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -734,7 +734,7 @@ class Registry: if (include): ei.emit = True features.append(ei) - + # Hack - can be removed when validity generator goes away self.requiredextensions.append(extName) else: diff --git a/sources/third_party/vulkan/src/scripts/source_line_info.py b/sources/third_party/vulkan/src/scripts/source_line_info.py deleted file mode 100755 index 66fea08c785677a66cd623f3419d9cdc4444470d..0000000000000000000000000000000000000000 --- a/sources/third_party/vulkan/src/scripts/source_line_info.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2015-2016 The Khronos Group Inc. -# Copyright (c) 2015-2016 Valve Corporation -# Copyright (c) 2015-2016 LunarG, Inc. -# Copyright (c) 2015-2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Tobin Ehlis - -from inspect import currentframe, getframeinfo - -# This is a wrapper class for inspect module that returns a formatted line -# with details of the source file and line number of python code who called -# into this class. The result can them be added to codegen to simplify -# debug as it shows where code was generated from. -class sourcelineinfo(): - def __init__(self): - self.general_prefix = "// CODEGEN : " - self.file_prefix = "file " - self.line_prefix = "line #" - self.enabled = True - - def get(self): - if self.enabled: - frameinfo = getframeinfo(currentframe().f_back) - return "%s%s%s %s%s" % (self.general_prefix, self.file_prefix, frameinfo.filename, self.line_prefix, frameinfo.lineno) - return "" diff --git a/sources/third_party/vulkan/src/scripts/spec.py b/sources/third_party/vulkan/src/scripts/spec.py index 7823a761090d1c3f77936cc27e65b66adcfca16d..b69b9b872cec7f995b71f570263e905dc340552b 100644 --- a/sources/third_party/vulkan/src/scripts/spec.py +++ b/sources/third_party/vulkan/src/scripts/spec.py @@ -8,6 +8,7 @@ except ImportError: from bs4 import BeautifulSoup import json import vuid_mapping +import re ############################# # spec.py script @@ -27,11 +28,9 @@ import vuid_mapping out_filename = "../layers/vk_validation_error_messages.h" # can override w/ '-out ' option db_filename = "../layers/vk_validation_error_database.txt" # can override w/ '-gendb ' option -json_filename = None # con pass in w/ '-json option +json_filename = "../scripts/validusage.json" # can override w/ '-json-file option gen_db = False # set to True when '-gendb ' option provided json_compare = False # compare existing DB to json file input -json_url = "https://www.khronos.org/registry/vulkan/specs/1.0-extensions/validation/validusage.json" -read_json = False # This is the root spec link that is used in error messages to point users to spec sections #old_spec_url = "https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html" spec_url = "https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html" @@ -43,7 +42,7 @@ error_msg_prefix = "The spec valid usage text states " validation_error_enum_name = "VALIDATION_ERROR_" def printHelp(): - print ("Usage: python spec.py [-out ] [-gendb ] [-update] [-json ] [-help]") + print ("Usage: python spec.py [-out ] [-gendb ] [-update] [-json-file ] [-help]") print ("\n Default script behavior is to parse the specfile and generate a header of unique error enums and corresponding error messages based on the specfile.\n") print (" Default specfile is from online at %s" % (spec_url)) print (" Default headerfile is %s" % (out_filename)) @@ -52,8 +51,7 @@ def printHelp(): print (" the list of enums and their error messages.") print ("\nIf '-update' option is specified this triggers the master flow to automate updating header and database files using default db file as baseline") print (" and online spec file as the latest. The default header and database files will be updated in-place for review and commit to the git repo.") - print ("\nIf '-json' option is used trigger the script to load in data from a json file.") - print ("\nIf '-json-file' option is it will point to a local json file, else '%s' is used from the web." % (json_url)) + print ("\nIf '-json-file' option is specified, it will override the default json file location") def get8digithex(dec_num): """Convert a decimal # into an 8-digit hex""" @@ -127,6 +125,8 @@ class Specification: print ("Looking at dict for api:ext entry %s:%s" % (api, ext)) vuid = vu_txt_dict['vuid'] vutxt = vu_txt_dict['text'] + # strip asciidoc xref from vu text + vutxt = re.sub('&amp;lt;&amp;lt;([^&]*,\\s*|)(.*?)&amp;gt;&amp;gt;', '\\2', vutxt) #print ("%s:%s:%s:%s" % (api, ext, vuid, vutxt)) #print ("VUTXT orig:%s" % (vutxt)) just_txt = BeautifulSoup(vutxt, 'html.parser') @@ -321,8 +321,6 @@ if __name__ == "__main__": if (arg == '-json-file'): json_filename = sys.argv[i] i = i + 1 - elif (arg == '-json'): - read_json = True elif (arg == '-json-compare'): json_compare = True elif (arg == '-out'): @@ -335,17 +333,14 @@ if __name__ == "__main__": db_filename = sys.argv[i] i = i + 1 elif (arg == '-update'): - read_json = True json_compare = True gen_db = True elif (arg in ['-help', '-h']): printHelp() sys.exit() spec = Specification() - if read_json: - spec.readJSON() - spec.parseJSON() - #sys.exit() + spec.readJSON() + spec.parseJSON() if (json_compare): # Read in current spec info from db file (orig_err_msg_dict) = spec.readDB(db_filename) diff --git a/sources/third_party/vulkan/src/scripts/unique_objects_generator.py b/sources/third_party/vulkan/src/scripts/unique_objects_generator.py index 9cfa9546db220d202222fc47b94159d33b54b83c..67905daba32cc0c475fb245178fe5ebb69130a24 100644 --- a/sources/third_party/vulkan/src/scripts/unique_objects_generator.py +++ b/sources/third_party/vulkan/src/scripts/unique_objects_generator.py @@ -137,6 +137,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): 'vkCreateSwapchainKHR', 'vkCreateSharedSwapchainsKHR', 'vkGetSwapchainImagesKHR', + 'vkDestroySwapchainKHR', 'vkQueuePresentKHR', 'vkEnumerateInstanceLayerProperties', 'vkEnumerateDeviceLayerProperties', @@ -150,6 +151,8 @@ class UniqueObjectsOutputGenerator(OutputGenerator): 'vkGetPhysicalDeviceDisplayProperties2KHR', 'vkGetPhysicalDeviceDisplayPlaneProperties2KHR', 'vkGetDisplayModeProperties2KHR', + 'vkCreateRenderPass', + 'vkDestroyRenderPass', ] # Commands shadowed by interface functions and are not implemented self.interface_functions = [ @@ -243,23 +246,6 @@ class UniqueObjectsOutputGenerator(OutputGenerator): else: self.newline() - # Write out device extension white list - self.newline() - write('// Layer Device Extension Whitelist', file=self.outFile) - write('static const char *kUniqueObjectsSupportedDeviceExtensions =', file=self.outFile) - for line in self.device_extensions: - write('%s' % line, file=self.outFile) - write(';\n', file=self.outFile) - - # Write out instance extension white list - self.newline() - write('// Layer Instance Extension Whitelist', file=self.outFile) - write('static const char *kUniqueObjectsSupportedInstanceExtensions =', file=self.outFile) - for line in self.instance_extensions: - write('%s' % line, file=self.outFile) - write(';\n', file=self.outFile) - self.newline() - # Record intercepted procedures write('// Map of all APIs to be intercepted by this layer', file=self.outFile) write('static const std::unordered_map name_to_funcptr_map = {', file=self.outFile) @@ -486,7 +472,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): def build_extension_processing_func(self): # Construct helper functions to build and free pNext extension chains pnext_proc = '' - pnext_proc += 'void *CreateUnwrappedExtensionStructs(layer_data *dev_data, const void *pNext) {\n' + pnext_proc += 'void *CreateUnwrappedExtensionStructs(const void *pNext) {\n' pnext_proc += ' void *cur_pnext = const_cast(pNext);\n' pnext_proc += ' void *head_pnext = NULL;\n' pnext_proc += ' void *prev_ext_struct = NULL;\n' @@ -556,7 +542,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): create_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[-1].len) indent = self.incIndent(indent) ndo_dest = '%s[index0]' % cmd_info[-1].name - create_ndo_code += '%s%s = WrapNew(dev_data, %s);\n' % (indent, ndo_dest, ndo_dest) + create_ndo_code += '%s%s = WrapNew(%s);\n' % (indent, ndo_dest, ndo_dest) if ndo_array == True: indent = self.decIndent(indent) create_ndo_code += '%s}\n' % indent @@ -585,7 +571,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): indent = self.incIndent(indent) destroy_ndo_code += '%s%s handle = %s[index0];\n' % (indent, cmd_info[param].type, cmd_info[param].name) destroy_ndo_code += '%suint64_t unique_id = reinterpret_cast(handle);\n' % (indent) - destroy_ndo_code += '%sdev_data->unique_id_mapping.erase(unique_id);\n' % (indent) + destroy_ndo_code += '%sunique_id_mapping.erase(unique_id);\n' % (indent) indent = self.decIndent(indent); destroy_ndo_code += '%s}\n' % indent indent = self.decIndent(indent); @@ -594,8 +580,8 @@ class UniqueObjectsOutputGenerator(OutputGenerator): # Remove a single handle from the map destroy_ndo_code += '%sstd::unique_lock lock(global_lock);\n' % (indent) destroy_ndo_code += '%suint64_t %s_id = reinterpret_cast(%s);\n' % (indent, cmd_info[param].name, cmd_info[param].name) - destroy_ndo_code += '%s%s = (%s)dev_data->unique_id_mapping[%s_id];\n' % (indent, cmd_info[param].name, cmd_info[param].type, cmd_info[param].name) - destroy_ndo_code += '%sdev_data->unique_id_mapping.erase(%s_id);\n' % (indent, cmd_info[param].name) + destroy_ndo_code += '%s%s = (%s)unique_id_mapping[%s_id];\n' % (indent, cmd_info[param].name, cmd_info[param].type, cmd_info[param].name) + destroy_ndo_code += '%sunique_id_mapping.erase(%s_id);\n' % (indent, cmd_info[param].name) destroy_ndo_code += '%slock.unlock();\n' % (indent) return ndo_array, destroy_ndo_code @@ -630,11 +616,11 @@ class UniqueObjectsOutputGenerator(OutputGenerator): pre_call_code += '%s local_%s%s = new %s[%s];\n' % (indent, prefix, ndo_name, ndo_type, ndo_count) pre_call_code += '%s for (uint32_t %s = 0; %s < %s; ++%s) {\n' % (indent, index, index, ndo_count, index) indent = self.incIndent(indent) - pre_call_code += '%s local_%s%s[%s] = Unwrap(dev_data, %s[%s]);\n' % (indent, prefix, ndo_name, index, ndo_name, index) + pre_call_code += '%s local_%s%s[%s] = Unwrap(%s[%s]);\n' % (indent, prefix, ndo_name, index, ndo_name, index) else: pre_call_code += '%s for (uint32_t %s = 0; %s < %s; ++%s) {\n' % (indent, index, index, ndo_count, index) indent = self.incIndent(indent) - pre_call_code += '%s %s%s[%s] = Unwrap(dev_data, %s%s[%s]);\n' % (indent, prefix, ndo_name, index, prefix, ndo_name, index) + pre_call_code += '%s %s%s[%s] = Unwrap(%s%s[%s]);\n' % (indent, prefix, ndo_name, index, prefix, ndo_name, index) indent = self.decIndent(indent) pre_call_code += '%s }\n' % indent indent = self.decIndent(indent) @@ -646,14 +632,14 @@ class UniqueObjectsOutputGenerator(OutputGenerator): else: if top_level == True: if (destroy_func == False) or (destroy_array == True): - pre_call_code += '%s %s = Unwrap(dev_data, %s);\n' % (indent, ndo_name, ndo_name) + pre_call_code += '%s %s = Unwrap(%s);\n' % (indent, ndo_name, ndo_name) else: # Make temp copy of this var with the 'local' removed. It may be better to not pass in 'local_' # as part of the string and explicitly print it fix = str(prefix).strip('local_'); pre_call_code += '%s if (%s%s) {\n' % (indent, fix, ndo_name) indent = self.incIndent(indent) - pre_call_code += '%s %s%s = Unwrap(dev_data, %s%s);\n' % (indent, prefix, ndo_name, fix, ndo_name) + pre_call_code += '%s %s%s = Unwrap(%s%s);\n' % (indent, prefix, ndo_name, fix, ndo_name) indent = self.decIndent(indent) pre_call_code += '%s }\n' % indent return decl_code, pre_call_code, post_call_code @@ -706,7 +692,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): if first_level_param == True: pre_code += '%s %s[%s].initialize(&%s[%s]);\n' % (indent, new_prefix, index, member.name, index) if process_pnext: - pre_code += '%s %s[%s].pNext = CreateUnwrappedExtensionStructs(dev_data, %s[%s].pNext);\n' % (indent, new_prefix, index, new_prefix, index) + pre_code += '%s %s[%s].pNext = CreateUnwrappedExtensionStructs(%s[%s].pNext);\n' % (indent, new_prefix, index, new_prefix, index) local_prefix = '%s[%s].' % (new_prefix, index) # Process sub-structs in this struct (tmp_decl, tmp_pre, tmp_post) = self.uniquify_members(struct_info, indent, local_prefix, array_index, create_func, destroy_func, destroy_array, False) @@ -738,7 +724,7 @@ class UniqueObjectsOutputGenerator(OutputGenerator): pre_code += tmp_pre post_code += tmp_post if process_pnext: - pre_code += '%s local_%s%s->pNext = CreateUnwrappedExtensionStructs(dev_data, local_%s%s->pNext);\n' % (indent, prefix, member.name, prefix, member.name) + pre_code += '%s local_%s%s->pNext = CreateUnwrappedExtensionStructs(local_%s%s->pNext);\n' % (indent, prefix, member.name, prefix, member.name) indent = self.decIndent(indent) pre_code += '%s }\n' % indent if first_level_param == True: diff --git a/sources/third_party/vulkan/src/scripts/validusage.json b/sources/third_party/vulkan/src/scripts/validusage.json new file mode 100644 index 0000000000000000000000000000000000000000..1ccbc8da120740ef5bb6f5e6ba427adeb1e825a0 --- /dev/null +++ b/sources/third_party/vulkan/src/scripts/validusage.json @@ -0,0 +1,17254 @@ +{ + "version info": { + "schema version": 2, + "api version": "1.0.69", + "comment": "from git branch: github-1.0 commit: ab08f0951ef1ad9b84db93f971e113c1d9d55609", + "date": "2018-02-19 23:19:49Z" + }, + "validation": { + "vkGetInstanceProcAddr": { + "core": [ + { + "vuid": "VUID-vkGetInstanceProcAddr-instance-parameter", + "text": " If instance is not NULL, instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkGetInstanceProcAddr-pName-parameter", + "text": " pName must be a null-terminated UTF-8 string" + } + ] + }, + "vkGetDeviceProcAddr": { + "core": [ + { + "vuid": "VUID-vkGetDeviceProcAddr-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceProcAddr-pName-parameter", + "text": " pName must be a null-terminated UTF-8 string" + } + ] + }, + "vkCreateInstance": { + "core": [ + { + "vuid": "VUID-vkCreateInstance-ppEnabledExtensionNames-01388", + "text": " All &amp;lt;&amp;lt;extended-functionality-extensions-dependencies, required extensions&amp;gt;&amp;gt; for each extension in the VkInstanceCreateInfo::ppEnabledExtensionNames list must also be present in that list." + }, + { + "vuid": "VUID-vkCreateInstance-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkInstanceCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateInstance-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateInstance-pInstance-parameter", + "text": " pInstance must be a valid pointer to a VkInstance handle" + } + ] + }, + "VkInstanceCreateInfo": { + "core": [ + { + "vuid": "VUID-VkInstanceCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDebugReportCallbackCreateInfoEXT or VkValidationFlagsEXT" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-pApplicationInfo-parameter", + "text": " If pApplicationInfo is not NULL, pApplicationInfo must be a valid pointer to a valid VkApplicationInfo structure" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-ppEnabledLayerNames-parameter", + "text": " If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings" + }, + { + "vuid": "VUID-VkInstanceCreateInfo-ppEnabledExtensionNames-parameter", + "text": " If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings" + } + ] + }, + "VkValidationFlagsEXT": { + "(VK_EXT_validation_flags)": [ + { + "vuid": "VUID-VkValidationFlagsEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT" + }, + { + "vuid": "VUID-VkValidationFlagsEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter", + "text": " pDisabledValidationChecks must be a valid pointer to an array of disabledValidationCheckCount VkValidationCheckEXT values" + }, + { + "vuid": "VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength", + "text": " disabledValidationCheckCount must be greater than 0" + } + ] + }, + "VkApplicationInfo": { + "core": [ + { + "vuid": "VUID-VkApplicationInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_APPLICATION_INFO" + }, + { + "vuid": "VUID-VkApplicationInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkApplicationInfo-pApplicationName-parameter", + "text": " If pApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 string" + }, + { + "vuid": "VUID-VkApplicationInfo-pEngineName-parameter", + "text": " If pEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string" + } + ] + }, + "vkDestroyInstance": { + "core": [ + { + "vuid": "VUID-vkDestroyInstance-instance-00629", + "text": " All child objects created using instance must have been destroyed prior to destroying instance" + }, + { + "vuid": "VUID-vkDestroyInstance-instance-00630", + "text": " If VkAllocationCallbacks were provided when instance was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyInstance-instance-00631", + "text": " If no VkAllocationCallbacks were provided when instance was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyInstance-instance-parameter", + "text": " If instance is not NULL, instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkDestroyInstance-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + } + ] + }, + "vkEnumeratePhysicalDevices": { + "core": [ + { + "vuid": "VUID-vkEnumeratePhysicalDevices-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter", + "text": " pPhysicalDeviceCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumeratePhysicalDevices-pPhysicalDevices-parameter", + "text": " If the value referenced by pPhysicalDeviceCount is not 0, and pPhysicalDevices is not NULL, pPhysicalDevices must be a valid pointer to an array of pPhysicalDeviceCount VkPhysicalDevice handles" + } + ] + }, + "vkGetPhysicalDeviceProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceProperties-pProperties-parameter", + "text": " pProperties must be a valid pointer to a VkPhysicalDeviceProperties structure" + } + ] + }, + "vkGetPhysicalDeviceProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceProperties2KHR-pProperties-parameter", + "text": " pProperties must be a valid pointer to a VkPhysicalDeviceProperties2KHR structure" + } + ] + }, + "VkPhysicalDeviceProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkPhysicalDeviceProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceProperties2KHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT, VkPhysicalDeviceConservativeRasterizationPropertiesEXT, VkPhysicalDeviceDiscardRectanglePropertiesEXT, VkPhysicalDeviceExternalMemoryHostPropertiesEXT, VkPhysicalDeviceIDPropertiesKHR, VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, VkPhysicalDeviceMultiviewPropertiesKHX, VkPhysicalDevicePointClippingPropertiesKHR, VkPhysicalDevicePushDescriptorPropertiesKHR, VkPhysicalDeviceSampleLocationsPropertiesEXT, or VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceProperties2KHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + } + ] + }, + "VkPhysicalDeviceIDPropertiesKHR": { + "(VK_KHR_get_physical_device_properties2)+(VK_KHR_external_memory_capabilities,VK_KHR_external_semaphore_capabilities,VK_KHR_external_fence_capabilities)": [ + { + "vuid": "VUID-VkPhysicalDeviceIDPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceIDPropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceQueueFamilyProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyPropertyCount-parameter", + "text": " pQueueFamilyPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties-pQueueFamilyProperties-parameter", + "text": " If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a valid pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties structures" + } + ] + }, + "vkGetPhysicalDeviceQueueFamilyProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyPropertyCount-parameter", + "text": " pQueueFamilyPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceQueueFamilyProperties2KHR-pQueueFamilyProperties-parameter", + "text": " If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a valid pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties2KHR structures" + } + ] + }, + "VkQueueFamilyProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkQueueFamilyProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkQueueFamilyProperties2KHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkEnumeratePhysicalDeviceGroupsKHX": { + "(VK_KHX_device_group_creation)": [ + { + "vuid": "VUID-vkEnumeratePhysicalDeviceGroupsKHX-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupCount-parameter", + "text": " pPhysicalDeviceGroupCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumeratePhysicalDeviceGroupsKHX-pPhysicalDeviceGroupProperties-parameter", + "text": " If the value referenced by pPhysicalDeviceGroupCount is not 0, and pPhysicalDeviceGroupProperties is not NULL, pPhysicalDeviceGroupProperties must be a valid pointer to an array of pPhysicalDeviceGroupCount VkPhysicalDeviceGroupPropertiesKHX structures" + } + ] + }, + "vkCreateDevice": { + "core": [ + { + "vuid": "VUID-vkCreateDevice-ppEnabledExtensionNames-01387", + "text": " All &amp;lt;&amp;lt;extended-functionality-extensions-dependencies, required extensions&amp;gt;&amp;gt; for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list." + }, + { + "vuid": "VUID-vkCreateDevice-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkCreateDevice-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDeviceCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateDevice-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDevice-pDevice-parameter", + "text": " pDevice must be a valid pointer to a VkDevice handle" + } + ] + }, + "VkDeviceCreateInfo": { + "core": [ + { + "vuid": "VUID-VkDeviceCreateInfo-queueFamilyIndex-00372", + "text": " The queueFamilyIndex member of each element of pQueueCreateInfos must be unique within pQueueCreateInfos" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupDeviceCreateInfoKHX, VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceFeatures2KHR, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-pQueueCreateInfos-parameter", + "text": " pQueueCreateInfos must be a valid pointer to an array of queueCreateInfoCount valid VkDeviceQueueCreateInfo structures" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-ppEnabledLayerNames-parameter", + "text": " If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-parameter", + "text": " If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-pEnabledFeatures-parameter", + "text": " If pEnabledFeatures is not NULL, pEnabledFeatures must be a valid pointer to a valid VkPhysicalDeviceFeatures structure" + }, + { + "vuid": "VUID-VkDeviceCreateInfo-queueCreateInfoCount-arraylength", + "text": " queueCreateInfoCount must be greater than 0" + } + ], + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkDeviceCreateInfo-pNext-00373", + "text": " If the pNext chain includes a VkPhysicalDeviceFeatures2KHR structure, then pEnabledFeatures must be NULL" + } + ], + "(VK_KHR_maintenance1)+(VK_AMD_negative_viewport_height)": [ + { + "vuid": "VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-00374", + "text": " ppEnabledExtensionNames must not contain both VK_KHR_maintenance1 and VK_AMD_negative_viewport_height" + } + ] + }, + "VkDeviceGroupDeviceCreateInfoKHX": { + "(VK_KHX_device_group_creation)": [ + { + "vuid": "VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00375", + "text": " Each element of pPhysicalDevices must be unique" + }, + { + "vuid": "VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-00376", + "text": " All elements of pPhysicalDevices must be in the same device group as enumerated by vkEnumeratePhysicalDeviceGroupsKHX" + }, + { + "vuid": "VUID-VkDeviceGroupDeviceCreateInfoKHX-physicalDeviceCount-00377", + "text": " If physicalDeviceCount is not 0, the physicalDevice parameter of vkCreateDevice must be an element of pPhysicalDevices." + }, + { + "vuid": "VUID-VkDeviceGroupDeviceCreateInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupDeviceCreateInfoKHX-pPhysicalDevices-parameter", + "text": " If physicalDeviceCount is not 0, pPhysicalDevices must be a valid pointer to an array of physicalDeviceCount valid VkPhysicalDevice handles" + } + ] + }, + "vkDestroyDevice": { + "core": [ + { + "vuid": "VUID-vkDestroyDevice-device-00378", + "text": " All child objects created on device must have been destroyed prior to destroying device" + }, + { + "vuid": "VUID-vkDestroyDevice-device-00379", + "text": " If VkAllocationCallbacks were provided when device was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyDevice-device-00380", + "text": " If no VkAllocationCallbacks were provided when device was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyDevice-device-parameter", + "text": " If device is not NULL, device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyDevice-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + } + ] + }, + "VkDeviceQueueCreateInfo": { + "core": [ + { + "vuid": "VUID-VkDeviceQueueCreateInfo-queueFamilyIndex-00381", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-queueCount-00382", + "text": " queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex]" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-pQueuePriorities-00383", + "text": " Each element of pQueuePriorities must be between 0.0 and 1.0 inclusive" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkDeviceQueueGlobalPriorityCreateInfoEXT" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter", + "text": " pQueuePriorities must be a valid pointer to an array of queueCount float values" + }, + { + "vuid": "VUID-VkDeviceQueueCreateInfo-queueCount-arraylength", + "text": " queueCount must be greater than 0" + } + ] + }, + "VkDeviceQueueGlobalPriorityCreateInfoEXT": { + "(VK_EXT_global_priority)": [ + { + "vuid": "VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDeviceQueueGlobalPriorityCreateInfoEXT-globalPriority-parameter", + "text": " globalPriority must be a valid VkQueueGlobalPriorityEXT value" + } + ] + }, + "vkGetDeviceQueue": { + "core": [ + { + "vuid": "VUID-vkGetDeviceQueue-queueFamilyIndex-00384", + "text": " queueFamilyIndex must be one of the queue family indices specified when device was created, via the VkDeviceQueueCreateInfo structure" + }, + { + "vuid": "VUID-vkGetDeviceQueue-queueIndex-00385", + "text": " queueIndex must be less than the number of queues created for the specified queue family index when device was created, via the queueCount member of the VkDeviceQueueCreateInfo structure" + }, + { + "vuid": "VUID-vkGetDeviceQueue-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceQueue-pQueue-parameter", + "text": " pQueue must be a valid pointer to a VkQueue handle" + } + ] + }, + "vkCreateCommandPool": { + "core": [ + { + "vuid": "VUID-vkCreateCommandPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateCommandPool-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkCommandPoolCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateCommandPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateCommandPool-pCommandPool-parameter", + "text": " pCommandPool must be a valid pointer to a VkCommandPool handle" + } + ] + }, + "VkCommandPoolCreateInfo": { + "core": [ + { + "vuid": "VUID-VkCommandPoolCreateInfo-queueFamilyIndex-00039", + "text": " queueFamilyIndex must be the index of a queue family available in the calling command’s device parameter" + }, + { + "vuid": "VUID-VkCommandPoolCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO" + }, + { + "vuid": "VUID-VkCommandPoolCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCommandPoolCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkCommandPoolCreateFlagBits values" + } + ] + }, + "vkTrimCommandPoolKHR": { + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkTrimCommandPoolKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkTrimCommandPoolKHR-commandPool-parameter", + "text": " commandPool must be a valid VkCommandPool handle" + }, + { + "vuid": "VUID-vkTrimCommandPoolKHR-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-vkTrimCommandPoolKHR-commandPool-parent", + "text": " commandPool must have been created, allocated, or retrieved from device" + } + ] + }, + "vkResetCommandPool": { + "core": [ + { + "vuid": "VUID-vkResetCommandPool-commandPool-00040", + "text": " All VkCommandBuffer objects allocated from commandPool must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkResetCommandPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkResetCommandPool-commandPool-parameter", + "text": " commandPool must be a valid VkCommandPool handle" + }, + { + "vuid": "VUID-vkResetCommandPool-flags-parameter", + "text": " flags must be a valid combination of VkCommandPoolResetFlagBits values" + }, + { + "vuid": "VUID-vkResetCommandPool-commandPool-parent", + "text": " commandPool must have been created, allocated, or retrieved from device" + } + ] + }, + "vkDestroyCommandPool": { + "core": [ + { + "vuid": "VUID-vkDestroyCommandPool-commandPool-00041", + "text": " All VkCommandBuffer objects allocated from commandPool must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkDestroyCommandPool-commandPool-00042", + "text": " If VkAllocationCallbacks were provided when commandPool was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyCommandPool-commandPool-00043", + "text": " If no VkAllocationCallbacks were provided when commandPool was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyCommandPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyCommandPool-commandPool-parameter", + "text": " If commandPool is not VK_NULL_HANDLE, commandPool must be a valid VkCommandPool handle" + }, + { + "vuid": "VUID-vkDestroyCommandPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyCommandPool-commandPool-parent", + "text": " If commandPool is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkAllocateCommandBuffers": { + "core": [ + { + "vuid": "VUID-vkAllocateCommandBuffers-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAllocateCommandBuffers-pAllocateInfo-parameter", + "text": " pAllocateInfo must be a valid pointer to a valid VkCommandBufferAllocateInfo structure" + }, + { + "vuid": "VUID-vkAllocateCommandBuffers-pCommandBuffers-parameter", + "text": " pCommandBuffers must be a valid pointer to an array of pAllocateInfo::commandBufferCount VkCommandBuffer handles" + } + ] + }, + "VkCommandBufferAllocateInfo": { + "core": [ + { + "vuid": "VUID-VkCommandBufferAllocateInfo-commandBufferCount-00044", + "text": " commandBufferCount must be greater than 0" + }, + { + "vuid": "VUID-VkCommandBufferAllocateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO" + }, + { + "vuid": "VUID-VkCommandBufferAllocateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCommandBufferAllocateInfo-commandPool-parameter", + "text": " commandPool must be a valid VkCommandPool handle" + }, + { + "vuid": "VUID-VkCommandBufferAllocateInfo-level-parameter", + "text": " level must be a valid VkCommandBufferLevel value" + } + ] + }, + "vkResetCommandBuffer": { + "core": [ + { + "vuid": "VUID-vkResetCommandBuffer-commandBuffer-00045", + "text": " commandBuffer must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkResetCommandBuffer-commandBuffer-00046", + "text": " commandBuffer must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" + }, + { + "vuid": "VUID-vkResetCommandBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkResetCommandBuffer-flags-parameter", + "text": " flags must be a valid combination of VkCommandBufferResetFlagBits values" + } + ] + }, + "vkFreeCommandBuffers": { + "core": [ + { + "vuid": "VUID-vkFreeCommandBuffers-pCommandBuffers-00047", + "text": " All elements of pCommandBuffers must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-pCommandBuffers-00048", + "text": " pCommandBuffers must be a valid pointer to an array of commandBufferCount VkCommandBuffer handles, each element of which must either be a valid handle or NULL" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-commandPool-parameter", + "text": " commandPool must be a valid VkCommandPool handle" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-commandBufferCount-arraylength", + "text": " commandBufferCount must be greater than 0" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-commandPool-parent", + "text": " commandPool must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkFreeCommandBuffers-pCommandBuffers-parent", + "text": " Each element of pCommandBuffers that is a valid handle must have been created, allocated, or retrieved from commandPool" + } + ] + }, + "vkBeginCommandBuffer": { + "core": [ + { + "vuid": "VUID-vkBeginCommandBuffer-commandBuffer-00049", + "text": " commandBuffer must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording or pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkBeginCommandBuffer-commandBuffer-00050", + "text": " If commandBuffer was allocated from a VkCommandPool which did not have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, initial state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkBeginCommandBuffer-commandBuffer-00051", + "text": " If commandBuffer is a secondary command buffer, the pInheritanceInfo member of pBeginInfo must be a valid VkCommandBufferInheritanceInfo structure" + }, + { + "vuid": "VUID-vkBeginCommandBuffer-commandBuffer-00052", + "text": " If commandBuffer is a secondary command buffer and either the occlusionQueryEnable member of the pInheritanceInfo member of pBeginInfo is VK_FALSE, or the precise occlusion queries feature is not enabled, the queryFlags member of the pInheritanceInfo member pBeginInfo must not contain VK_QUERY_CONTROL_PRECISE_BIT" + }, + { + "vuid": "VUID-vkBeginCommandBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkBeginCommandBuffer-pBeginInfo-parameter", + "text": " pBeginInfo must be a valid pointer to a valid VkCommandBufferBeginInfo structure" + } + ] + }, + "VkCommandBufferBeginInfo": { + "core": [ + { + "vuid": "VUID-VkCommandBufferBeginInfo-flags-00053", + "text": " If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the renderPass member of pInheritanceInfo must be a valid VkRenderPass" + }, + { + "vuid": "VUID-VkCommandBufferBeginInfo-flags-00054", + "text": " If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the subpass member of pInheritanceInfo must be a valid subpass index within the renderPass member of pInheritanceInfo" + }, + { + "vuid": "VUID-VkCommandBufferBeginInfo-flags-00055", + "text": " If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the framebuffer member of pInheritanceInfo must be either VK_NULL_HANDLE, or a valid VkFramebuffer that is compatible with the renderPass member of pInheritanceInfo" + }, + { + "vuid": "VUID-VkCommandBufferBeginInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO" + }, + { + "vuid": "VUID-VkCommandBufferBeginInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkDeviceGroupCommandBufferBeginInfoKHX" + }, + { + "vuid": "VUID-VkCommandBufferBeginInfo-flags-parameter", + "text": " flags must be a valid combination of VkCommandBufferUsageFlagBits values" + } + ] + }, + "VkCommandBufferInheritanceInfo": { + "core": [ + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-occlusionQueryEnable-00056", + "text": " If the &amp;lt;&amp;lt;features-features-inheritedQueries,inherited queries&amp;gt;&amp;gt; feature is not enabled, occlusionQueryEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-queryFlags-00057", + "text": " If the &amp;lt;&amp;lt;features-features-inheritedQueries,inherited queries&amp;gt;&amp;gt; feature is enabled, queryFlags must be a valid combination of VkQueryControlFlagBits values" + }, + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-00058", + "text": " If the &amp;lt;&amp;lt;features-features-pipelineStatisticsQuery,pipeline statistics queries&amp;gt;&amp;gt; feature is not enabled, pipelineStatistics must be 0" + }, + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO" + }, + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCommandBufferInheritanceInfo-commonparent", + "text": " Both of framebuffer, and renderPass that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkEndCommandBuffer": { + "core": [ + { + "vuid": "VUID-vkEndCommandBuffer-commandBuffer-00059", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkEndCommandBuffer-commandBuffer-00060", + "text": " If commandBuffer is a primary command buffer, there must not be an active render pass instance" + }, + { + "vuid": "VUID-vkEndCommandBuffer-commandBuffer-00061", + "text": " All queries made &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt; during the recording of commandBuffer must have been made inactive" + }, + { + "vuid": "VUID-vkEndCommandBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + } + ], + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkEndCommandBuffer-commandBuffer-00062", + "text": " If commandBuffer is a secondary command buffer, there must not be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT." + } + ] + }, + "vkQueueSubmit": { + "core": [ + { + "vuid": "VUID-vkQueueSubmit-fence-00063", + "text": " If fence is not VK_NULL_HANDLE, fence must be unsignaled" + }, + { + "vuid": "VUID-vkQueueSubmit-fence-00064", + "text": " If fence is not VK_NULL_HANDLE, fence must not be associated with any other queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00065", + "text": " Any calls to vkCmdSetEvent, vkCmdResetEvent or vkCmdWaitEvents that have been recorded into any of the command buffer elements of the pCommandBuffers member of any element of pSubmits, must not reference any VkEvent that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state." + }, + { + "vuid": "VUID-vkQueueSubmit-pWaitDstStageMask-00066", + "text": " Any stage flag included in any element of the pWaitDstStageMask member of any element of pSubmits must be a pipeline stage supported by one of the capabilities of queue, as specified in the &amp;lt;&amp;lt;synchronization-pipeline-stages-supported, table of supported pipeline stages&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkQueueSubmit-pSignalSemaphores-00067", + "text": " Each element of the pSignalSemaphores member of any element of pSubmits must be unsignaled when the semaphore signal operation it defines is executed on the device" + }, + { + "vuid": "VUID-vkQueueSubmit-pWaitSemaphores-00068", + "text": " When a semaphore unsignal operation defined by any element of the pWaitSemaphores member of any element of pSubmits executes on queue, no other queue must be waiting on the same semaphore." + }, + { + "vuid": "VUID-vkQueueSubmit-pWaitSemaphores-00069", + "text": " All elements of the pWaitSemaphores member of all elements of pSubmits must be semaphores that are signaled, or have &amp;lt;&amp;lt;synchronization-semaphores-signaling, semaphore signal operations&amp;gt;&amp;gt; previously submitted for execution." + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00070", + "text": " Each element of the pCommandBuffers member of each element of pSubmits must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending or executable state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00071", + "text": " If any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00072", + "text": " Any &amp;lt;&amp;lt;commandbuffers-secondary, secondary command buffers recorded&amp;gt;&amp;gt; into any element of the pCommandBuffers member of any element of pSubmits must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending or executable state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00073", + "text": " If any &amp;lt;&amp;lt;commandbuffers-secondary, secondary command buffers recorded&amp;gt;&amp;gt; into any element of the pCommandBuffers member of any element of pSubmits was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkQueueSubmit-pCommandBuffers-00074", + "text": " Each element of the pCommandBuffers member of each element of pSubmits must have been allocated from a VkCommandPool that was created for the same queue family queue belongs to." + }, + { + "vuid": "VUID-vkQueueSubmit-queue-parameter", + "text": " queue must be a valid VkQueue handle" + }, + { + "vuid": "VUID-vkQueueSubmit-pSubmits-parameter", + "text": " If submitCount is not 0, pSubmits must be a valid pointer to an array of submitCount valid VkSubmitInfo structures" + }, + { + "vuid": "VUID-vkQueueSubmit-fence-parameter", + "text": " If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-vkQueueSubmit-commonparent", + "text": " Both of fence, and queue that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkSubmitInfo": { + "core": [ + { + "vuid": "VUID-VkSubmitInfo-pCommandBuffers-00075", + "text": " Each element of pCommandBuffers must not have been allocated with VK_COMMAND_BUFFER_LEVEL_SECONDARY" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitDstStageMask-00076", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, each element of pWaitDstStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitDstStageMask-00077", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, each element of pWaitDstStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitDstStageMask-00078", + "text": " Each element of pWaitDstStageMask must not include VK_PIPELINE_STAGE_HOST_BIT." + }, + { + "vuid": "VUID-VkSubmitInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SUBMIT_INFO" + }, + { + "vuid": "VUID-VkSubmitInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkD3D12FenceSubmitInfoKHR, VkDeviceGroupSubmitInfoKHX, VkWin32KeyedMutexAcquireReleaseInfoKHR, or VkWin32KeyedMutexAcquireReleaseInfoNV" + }, + { + "vuid": "VUID-VkSubmitInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitSemaphores-parameter", + "text": " If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitDstStageMask-parameter", + "text": " If waitSemaphoreCount is not 0, pWaitDstStageMask must be a valid pointer to an array of waitSemaphoreCount valid combinations of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-VkSubmitInfo-pWaitDstStageMask-requiredbitmask", + "text": " Each element of pWaitDstStageMask must not be 0" + }, + { + "vuid": "VUID-VkSubmitInfo-pCommandBuffers-parameter", + "text": " If commandBufferCount is not 0, pCommandBuffers must be a valid pointer to an array of commandBufferCount valid VkCommandBuffer handles" + }, + { + "vuid": "VUID-VkSubmitInfo-pSignalSemaphores-parameter", + "text": " If signalSemaphoreCount is not 0, pSignalSemaphores must be a valid pointer to an array of signalSemaphoreCount valid VkSemaphore handles" + }, + { + "vuid": "VUID-VkSubmitInfo-commonparent", + "text": " Each of the elements of pCommandBuffers, the elements of pSignalSemaphores, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkD3D12FenceSubmitInfoKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-VkD3D12FenceSubmitInfoKHR-waitSemaphoreValuesCount-00079", + "text": " waitSemaphoreValuesCount must be the same value as VkSubmitInfo::waitSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure." + }, + { + "vuid": "VUID-VkD3D12FenceSubmitInfoKHR-signalSemaphoreValuesCount-00080", + "text": " signalSemaphoreValuesCount must be the same value as VkSubmitInfo::signalSemaphoreCount, where VkSubmitInfo is in the pNext chain of this VkD3D12FenceSubmitInfoKHR structure." + }, + { + "vuid": "VUID-VkD3D12FenceSubmitInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR" + }, + { + "vuid": "VUID-VkD3D12FenceSubmitInfoKHR-pWaitSemaphoreValues-parameter", + "text": " If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a valid pointer to an array of waitSemaphoreValuesCount uint64_t values" + }, + { + "vuid": "VUID-VkD3D12FenceSubmitInfoKHR-pSignalSemaphoreValues-parameter", + "text": " If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a valid pointer to an array of signalSemaphoreValuesCount uint64_t values" + } + ] + }, + "VkWin32KeyedMutexAcquireReleaseInfoKHR": { + "(VK_KHR_win32_keyed_mutex)": [ + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-00081", + "text": " Each member of pAcquireSyncs and pReleaseSyncs must be a device memory object imported by setting VkImportMemoryWin32HandleInfoKHR::handleType to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR." + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter", + "text": " If acquireCount is not 0, pAcquireSyncs must be a valid pointer to an array of acquireCount valid VkDeviceMemory handles" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter", + "text": " If acquireCount is not 0, pAcquireKeys must be a valid pointer to an array of acquireCount uint64_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter", + "text": " If acquireCount is not 0, pAcquireTimeouts must be a valid pointer to an array of acquireCount uint32_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter", + "text": " If releaseCount is not 0, pReleaseSyncs must be a valid pointer to an array of releaseCount valid VkDeviceMemory handles" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter", + "text": " If releaseCount is not 0, pReleaseKeys must be a valid pointer to an array of releaseCount uint64_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-commonparent", + "text": " Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkWin32KeyedMutexAcquireReleaseInfoNV": { + "(VK_NV_win32_keyed_mutex)": [ + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter", + "text": " If acquireCount is not 0, pAcquireSyncs must be a valid pointer to an array of acquireCount valid VkDeviceMemory handles" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter", + "text": " If acquireCount is not 0, pAcquireKeys must be a valid pointer to an array of acquireCount uint64_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter", + "text": " If acquireCount is not 0, pAcquireTimeoutMilliseconds must be a valid pointer to an array of acquireCount uint32_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter", + "text": " If releaseCount is not 0, pReleaseSyncs must be a valid pointer to an array of releaseCount valid VkDeviceMemory handles" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter", + "text": " If releaseCount is not 0, pReleaseKeys must be a valid pointer to an array of releaseCount uint64_t values" + }, + { + "vuid": "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-commonparent", + "text": " Both of the elements of pAcquireSyncs, and the elements of pReleaseSyncs that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkDeviceGroupSubmitInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-waitSemaphoreCount-00082", + "text": " waitSemaphoreCount must equal VkSubmitInfo::waitSemaphoreCount" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-commandBufferCount-00083", + "text": " commandBufferCount must equal VkSubmitInfo::commandBufferCount" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-signalSemaphoreCount-00084", + "text": " signalSemaphoreCount must equal VkSubmitInfo::signalSemaphoreCount" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-00085", + "text": " All elements of pWaitSemaphoreDeviceIndices and pSignalSemaphoreDeviceIndices must be valid device indices" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-00086", + "text": " All elements of pCommandBufferDeviceMasks must be valid device masks" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-pWaitSemaphoreDeviceIndices-parameter", + "text": " If waitSemaphoreCount is not 0, pWaitSemaphoreDeviceIndices must be a valid pointer to an array of waitSemaphoreCount uint32_t values" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-pCommandBufferDeviceMasks-parameter", + "text": " If commandBufferCount is not 0, pCommandBufferDeviceMasks must be a valid pointer to an array of commandBufferCount uint32_t values" + }, + { + "vuid": "VUID-VkDeviceGroupSubmitInfoKHX-pSignalSemaphoreDeviceIndices-parameter", + "text": " If signalSemaphoreCount is not 0, pSignalSemaphoreDeviceIndices must be a valid pointer to an array of signalSemaphoreCount uint32_t values" + } + ] + }, + "vkCmdExecuteCommands": { + "core": [ + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-00087", + "text": " commandBuffer must have been allocated with a level of VK_COMMAND_BUFFER_LEVEL_PRIMARY" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00088", + "text": " Each element of pCommandBuffers must have been allocated with a level of VK_COMMAND_BUFFER_LEVEL_SECONDARY" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00089", + "text": " Each element of pCommandBuffers must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending or executable state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00090", + "text": " If any element of pCommandBuffers was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, and it was recorded into any other primary command buffer, that primary command buffer must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00091", + "text": " If any element of pCommandBuffers was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00092", + "text": " If any element of pCommandBuffers was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not have already been recorded to commandBuffer." + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00093", + "text": " If any element of pCommandBuffers was not recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, it must not appear more than once in pCommandBuffers." + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00094", + "text": " Each element of pCommandBuffers must have been allocated from a VkCommandPool that was created for the same queue family as the VkCommandPool from which commandBuffer was allocated" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-contents-00095", + "text": " If vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must have been begun with the contents parameter of vkCmdBeginRenderPass set to VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00096", + "text": " If vkCmdExecuteCommands is being called within a render pass instance, each element of pCommandBuffers must have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00097", + "text": " If vkCmdExecuteCommands is being called within a render pass instance, each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::subpass set to the index of the subpass which the given command buffer will be executed in" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pInheritanceInfo-00098", + "text": " If vkCmdExecuteCommands is being called within a render pass instance, the render passes specified in the pname::pBeginInfo::pInheritanceInfo::renderPass members of the vkBeginCommandBuffer commands used to begin recording each element of pCommandBuffers must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the current render pass." + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00099", + "text": " If vkCmdExecuteCommands is being called within a render pass instance, and any element of pCommandBuffers was recorded with VkCommandBufferInheritanceInfo::framebuffer not equal to VK_NULL_HANDLE, that VkFramebuffer must match the VkFramebuffer used in the current render pass instance" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00100", + "text": " If vkCmdExecuteCommands is not being called within a render pass instance, each element of pCommandBuffers must not have been recorded with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-00101", + "text": " If the &amp;lt;&amp;lt;features-features-inheritedQueries,inherited queries&amp;gt;&amp;gt; feature is not enabled, commandBuffer must not have any queries &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-00102", + "text": " If commandBuffer has a VK_QUERY_TYPE_OCCLUSION query &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::occlusionQueryEnable set to VK_TRUE" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-00103", + "text": " If commandBuffer has a VK_QUERY_TYPE_OCCLUSION query &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::queryFlags having all bits set that are set for the query" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-00104", + "text": " If commandBuffer has a VK_QUERY_TYPE_PIPELINE_STATISTICS query &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;, then each element of pCommandBuffers must have been recorded with VkCommandBufferInheritanceInfo::pipelineStatistics having all bits set that are set in the VkQueryPool the query uses" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-00105", + "text": " Each element of pCommandBuffers must not begin any query types that are &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt; in commandBuffer" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-pCommandBuffers-parameter", + "text": " pCommandBuffers must be a valid pointer to an array of commandBufferCount valid VkCommandBuffer handles" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-bufferlevel", + "text": " commandBuffer must be a primary VkCommandBuffer" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commandBufferCount-arraylength", + "text": " commandBufferCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdExecuteCommands-commonparent", + "text": " Both of commandBuffer, and the elements of pCommandBuffers must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkDeviceGroupCommandBufferBeginInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00106", + "text": " deviceMask must be a valid device mask value" + }, + { + "vuid": "VUID-VkDeviceGroupCommandBufferBeginInfoKHX-deviceMask-00107", + "text": " deviceMask must not be zero" + }, + { + "vuid": "VUID-VkDeviceGroupCommandBufferBeginInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX" + } + ] + }, + "vkCmdSetDeviceMaskKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-deviceMask-00108", + "text": " deviceMask must be a valid device mask value" + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-deviceMask-00109", + "text": " deviceMask must not be zero" + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-deviceMask-00110", + "text": " deviceMask must not include any set bits that were not in the VkDeviceGroupCommandBufferBeginInfoKHX::deviceMask value when the command buffer began recording." + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-deviceMask-00111", + "text": " If vkCmdSetDeviceMaskKHX is called inside a render pass instance, deviceMask must not include any set bits that were not in the VkDeviceGroupRenderPassBeginInfoKHX::deviceMask value when the render pass instance began recording." + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetDeviceMaskKHX-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, compute, or transfer operations" + } + ] + }, + "vkCreateFence": { + "core": [ + { + "vuid": "VUID-vkCreateFence-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateFence-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkFenceCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateFence-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateFence-pFence-parameter", + "text": " pFence must be a valid pointer to a VkFence handle" + } + ] + }, + "VkFenceCreateInfo": { + "core": [ + { + "vuid": "VUID-VkFenceCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO" + }, + { + "vuid": "VUID-VkFenceCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExportFenceCreateInfoKHR or VkExportFenceWin32HandleInfoKHR" + }, + { + "vuid": "VUID-VkFenceCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkFenceCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkFenceCreateFlagBits values" + } + ] + }, + "VkExportFenceCreateInfoKHR": { + "(VK_KHR_external_fence)": [ + { + "vuid": "VUID-VkExportFenceCreateInfoKHR-handleTypes-01446", + "text": " The bits in handleTypes must be supported and compatible, as reported by VkExternalFencePropertiesKHR." + }, + { + "vuid": "VUID-VkExportFenceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportFenceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportFenceCreateInfoKHR-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalFenceHandleTypeFlagBitsKHR values" + } + ] + }, + "VkExportFenceWin32HandleInfoKHR": { + "(VK_KHR_external_fence_win32)": [ + { + "vuid": "VUID-VkExportFenceWin32HandleInfoKHR-handleTypes-01447", + "text": " If VkExportFenceCreateInfoKHR::handleTypes does not include VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VkExportFenceWin32HandleInfoKHR must not be in the pNext chain of VkFenceCreateInfo." + }, + { + "vuid": "VUID-VkExportFenceWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportFenceWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportFenceWin32HandleInfoKHR-pAttributes-parameter", + "text": " If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value" + } + ] + }, + "vkGetFenceWin32HandleKHR": { + "(VK_KHR_external_fence_win32)": [ + { + "vuid": "VUID-vkGetFenceWin32HandleKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetFenceWin32HandleKHR-pGetWin32HandleInfo-parameter", + "text": " pGetWin32HandleInfo must be a valid pointer to a valid VkFenceGetWin32HandleInfoKHR structure" + }, + { + "vuid": "VUID-vkGetFenceWin32HandleKHR-pHandle-parameter", + "text": " pHandle must be a valid pointer to a HANDLE value" + } + ] + }, + "VkFenceGetWin32HandleInfoKHR": { + "(VK_KHR_external_fence_win32)": [ + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-handleType-01448", + "text": " handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when the fence’s current payload was created." + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-handleType-01449", + "text": " If handleType is defined as an NT handle, vkGetFenceWin32HandleKHR must be called no more than once for each valid unique combination of fence and handleType." + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-fence-01450", + "text": " fence must not currently have its payload replaced by an imported payload as described below in &amp;lt;&amp;lt;synchronization-fences-importing,Importing Fence Payloads&amp;gt;&amp;gt; unless that imported payload’s handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType." + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-handleType-01451", + "text": " If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated &amp;lt;&amp;lt;synchronization-fences-signaling,fence signal operation&amp;gt;&amp;gt; pending execution." + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-handleType-01452", + "text": " handleType must be defined as an NT handle or a global share handle." + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-fence-parameter", + "text": " fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-VkFenceGetWin32HandleInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetFenceFdKHR": { + "(VK_KHR_external_fence_fd)": [ + { + "vuid": "VUID-vkGetFenceFdKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetFenceFdKHR-pGetFdInfo-parameter", + "text": " pGetFdInfo must be a valid pointer to a valid VkFenceGetFdInfoKHR structure" + }, + { + "vuid": "VUID-vkGetFenceFdKHR-pFd-parameter", + "text": " pFd must be a valid pointer to a int value" + } + ] + }, + "VkFenceGetFdInfoKHR": { + "(VK_KHR_external_fence_fd)": [ + { + "vuid": "VUID-VkFenceGetFdInfoKHR-handleType-01453", + "text": " handleType must have been included in VkExportFenceCreateInfoKHR::handleTypes when fence’s current payload was created." + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-handleType-01454", + "text": " If handleType refers to a handle type with copy payload transference semantics, fence must be signaled, or have an associated &amp;lt;&amp;lt;synchronization-fences-signaling,fence signal operation&amp;gt;&amp;gt; pending execution." + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-fence-01455", + "text": " fence must not currently have its payload replaced by an imported payload as described below in &amp;lt;&amp;lt;synchronization-fences-importing,Importing Fence Payloads&amp;gt;&amp;gt; unless that imported payload’s handle type was included in VkExternalFencePropertiesKHR::exportFromImportedHandleTypes for handleType." + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-handleType-01456", + "text": " handleType must be defined as a POSIX file descriptor handle." + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-fence-parameter", + "text": " fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-VkFenceGetFdInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value" + } + ] + }, + "vkDestroyFence": { + "core": [ + { + "vuid": "VUID-vkDestroyFence-fence-01120", + "text": " All &amp;lt;&amp;lt;devsandqueues-submission, queue submission&amp;gt;&amp;gt; commands that refer to fence must have completed execution" + }, + { + "vuid": "VUID-vkDestroyFence-fence-01121", + "text": " If VkAllocationCallbacks were provided when fence was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyFence-fence-01122", + "text": " If no VkAllocationCallbacks were provided when fence was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyFence-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyFence-fence-parameter", + "text": " If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-vkDestroyFence-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyFence-fence-parent", + "text": " If fence is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetFenceStatus": { + "core": [ + { + "vuid": "VUID-vkGetFenceStatus-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetFenceStatus-fence-parameter", + "text": " fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-vkGetFenceStatus-fence-parent", + "text": " fence must have been created, allocated, or retrieved from device" + } + ] + }, + "vkResetFences": { + "core": [ + { + "vuid": "VUID-vkResetFences-pFences-01123", + "text": " Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkResetFences-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkResetFences-pFences-parameter", + "text": " pFences must be a valid pointer to an array of fenceCount valid VkFence handles" + }, + { + "vuid": "VUID-vkResetFences-fenceCount-arraylength", + "text": " fenceCount must be greater than 0" + }, + { + "vuid": "VUID-vkResetFences-pFences-parent", + "text": " Each element of pFences must have been created, allocated, or retrieved from device" + } + ] + }, + "vkWaitForFences": { + "core": [ + { + "vuid": "VUID-vkWaitForFences-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkWaitForFences-pFences-parameter", + "text": " pFences must be a valid pointer to an array of fenceCount valid VkFence handles" + }, + { + "vuid": "VUID-vkWaitForFences-fenceCount-arraylength", + "text": " fenceCount must be greater than 0" + }, + { + "vuid": "VUID-vkWaitForFences-pFences-parent", + "text": " Each element of pFences must have been created, allocated, or retrieved from device" + } + ] + }, + "vkRegisterDeviceEventEXT": { + "(VK_EXT_display_control)": [ + { + "vuid": "VUID-vkRegisterDeviceEventEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkRegisterDeviceEventEXT-pDeviceEventInfo-parameter", + "text": " pDeviceEventInfo must be a valid pointer to a valid VkDeviceEventInfoEXT structure" + }, + { + "vuid": "VUID-vkRegisterDeviceEventEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkRegisterDeviceEventEXT-pFence-parameter", + "text": " pFence must be a valid pointer to a VkFence handle" + } + ] + }, + "VkDeviceEventInfoEXT": { + "(VK_EXT_display_control)": [ + { + "vuid": "VUID-VkDeviceEventInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT" + }, + { + "vuid": "VUID-VkDeviceEventInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDeviceEventInfoEXT-deviceEvent-parameter", + "text": " deviceEvent must be a valid VkDeviceEventTypeEXT value" + } + ] + }, + "vkRegisterDisplayEventEXT": { + "(VK_EXT_display_control)": [ + { + "vuid": "VUID-vkRegisterDisplayEventEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkRegisterDisplayEventEXT-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + }, + { + "vuid": "VUID-vkRegisterDisplayEventEXT-pDisplayEventInfo-parameter", + "text": " pDisplayEventInfo must be a valid pointer to a valid VkDisplayEventInfoEXT structure" + }, + { + "vuid": "VUID-vkRegisterDisplayEventEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkRegisterDisplayEventEXT-pFence-parameter", + "text": " pFence must be a valid pointer to a VkFence handle" + } + ] + }, + "VkDisplayEventInfoEXT": { + "(VK_EXT_display_control)": [ + { + "vuid": "VUID-VkDisplayEventInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT" + }, + { + "vuid": "VUID-VkDisplayEventInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDisplayEventInfoEXT-displayEvent-parameter", + "text": " displayEvent must be a valid VkDisplayEventTypeEXT value" + } + ] + }, + "vkImportFenceWin32HandleKHR": { + "(VK_KHR_external_fence_win32)": [ + { + "vuid": "VUID-vkImportFenceWin32HandleKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkImportFenceWin32HandleKHR-pImportFenceWin32HandleInfo-parameter", + "text": " pImportFenceWin32HandleInfo must be a valid pointer to a valid VkImportFenceWin32HandleInfoKHR structure" + } + ] + }, + "VkImportFenceWin32HandleInfoKHR": { + "(VK_KHR_external_fence_win32)": [ + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handleType-01457", + "text": " handleType must be a value included in the &amp;lt;&amp;lt;synchronization-fence-handletypes-win32, Handle Types Supported by VkImportFenceWin32HandleInfoKHR&amp;gt;&amp;gt; table." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handleType-01459", + "text": " If handleType is not VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, name must be NULL." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handleType-01460", + "text": " If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handleType-01461", + "text": " If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handle-01462", + "text": " If handle is not NULL, name must be NULL." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handle-01539", + "text": " If handle is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-name-01540", + "text": " If name is not NULL, it must obey any requirements listed for handleType in external fence handle types compatibility." + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-fence-parameter", + "text": " fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkFenceImportFlagBitsKHR values" + }, + { + "vuid": "VUID-VkImportFenceWin32HandleInfoKHR-handleType-parameter", + "text": " If handleType is not 0, handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value" + } + ] + }, + "vkImportFenceFdKHR": { + "(VK_KHR_external_fence_fd)": [ + { + "vuid": "VUID-vkImportFenceFdKHR-fence-01463", + "text": " fence must not be associated with any queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkImportFenceFdKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkImportFenceFdKHR-pImportFenceFdInfo-parameter", + "text": " pImportFenceFdInfo must be a valid pointer to a valid VkImportFenceFdInfoKHR structure" + } + ] + }, + "VkImportFenceFdInfoKHR": { + "(VK_KHR_external_fence_fd)": [ + { + "vuid": "VUID-VkImportFenceFdInfoKHR-handleType-01464", + "text": " handleType must be a value included in the &amp;lt;&amp;lt;synchronization-fence-handletypes-fd, Handle Types Supported by VkImportFenceFdInfoKHR&amp;gt;&amp;gt; table." + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-fd-01541", + "text": " fd must obey any requirements listed for handleType in &amp;lt;&amp;lt;external-fence-handle-types-compatibility,external fence handle types compatibility&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-fence-parameter", + "text": " fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkFenceImportFlagBitsKHR values" + }, + { + "vuid": "VUID-VkImportFenceFdInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value" + } + ] + }, + "vkCreateSemaphore": { + "core": [ + { + "vuid": "VUID-vkCreateSemaphore-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateSemaphore-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkSemaphoreCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateSemaphore-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateSemaphore-pSemaphore-parameter", + "text": " pSemaphore must be a valid pointer to a VkSemaphore handle" + } + ] + }, + "VkSemaphoreCreateInfo": { + "core": [ + { + "vuid": "VUID-VkSemaphoreCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO" + }, + { + "vuid": "VUID-VkSemaphoreCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExportSemaphoreCreateInfoKHR or VkExportSemaphoreWin32HandleInfoKHR" + }, + { + "vuid": "VUID-VkSemaphoreCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkSemaphoreCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "VkExportSemaphoreCreateInfoKHR": { + "(VK_KHR_external_semaphore)": [ + { + "vuid": "VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-01124", + "text": " The bits in handleTypes must be supported and compatible, as reported by VkExternalSemaphorePropertiesKHR." + }, + { + "vuid": "VUID-VkExportSemaphoreCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportSemaphoreCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportSemaphoreCreateInfoKHR-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalSemaphoreHandleTypeFlagBitsKHR values" + } + ] + }, + "VkExportSemaphoreWin32HandleInfoKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-VkExportSemaphoreWin32HandleInfoKHR-handleTypes-01125", + "text": " If VkExportSemaphoreCreateInfoKHR::handleTypes does not include VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, VkExportSemaphoreWin32HandleInfoKHR must not be in the pNext chain of VkSemaphoreCreateInfo." + }, + { + "vuid": "VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportSemaphoreWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportSemaphoreWin32HandleInfoKHR-pAttributes-parameter", + "text": " If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value" + } + ] + }, + "vkGetSemaphoreWin32HandleKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-vkGetSemaphoreWin32HandleKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetSemaphoreWin32HandleKHR-pGetWin32HandleInfo-parameter", + "text": " pGetWin32HandleInfo must be a valid pointer to a valid VkSemaphoreGetWin32HandleInfoKHR structure" + }, + { + "vuid": "VUID-vkGetSemaphoreWin32HandleKHR-pHandle-parameter", + "text": " pHandle must be a valid pointer to a HANDLE value" + } + ] + }, + "VkSemaphoreGetWin32HandleInfoKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01126", + "text": " handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when the semaphore’s current payload was created." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01127", + "text": " If handleType is defined as an NT handle, vkGetSemaphoreWin32HandleKHR must be called no more than once for each valid unique combination of semaphore and handleType." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-01128", + "text": " semaphore must not currently have its payload replaced by an imported payload as described below in &amp;lt;&amp;lt;synchronization-semaphores-importing,Importing Semaphore Payloads&amp;gt;&amp;gt; unless that imported payload’s handle type was included in VkExternalSemaphorePropertiesKHR::exportFromImportedHandleTypes for handleType." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01129", + "text": " If handleType refers to a handle type with copy payload transference semantics, as defined below in &amp;lt;&amp;lt;synchronization-semaphores-importing,Importing Semaphore Payloads&amp;gt;&amp;gt;, there must be no queue waiting on semaphore." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01130", + "text": " If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated &amp;lt;&amp;lt;synchronization-semaphores-signaling,semaphore signal operation&amp;gt;&amp;gt; pending execution." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-01131", + "text": " handleType must be defined as an NT handle or a global share handle." + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-semaphore-parameter", + "text": " semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-VkSemaphoreGetWin32HandleInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetSemaphoreFdKHR": { + "(VK_KHR_external_semaphore_fd)": [ + { + "vuid": "VUID-vkGetSemaphoreFdKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetSemaphoreFdKHR-pGetFdInfo-parameter", + "text": " pGetFdInfo must be a valid pointer to a valid VkSemaphoreGetFdInfoKHR structure" + }, + { + "vuid": "VUID-vkGetSemaphoreFdKHR-pFd-parameter", + "text": " pFd must be a valid pointer to a int value" + } + ] + }, + "VkSemaphoreGetFdInfoKHR": { + "(VK_KHR_external_semaphore_fd)": [ + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-handleType-01132", + "text": " handleType must have been included in VkExportSemaphoreCreateInfoKHR::handleTypes when semaphore’s current payload was created." + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-semaphore-01133", + "text": " semaphore must not currently have its payload replaced by an imported payload as described below in &amp;lt;&amp;lt;synchronization-semaphores-importing,Importing Semaphore Payloads&amp;gt;&amp;gt; unless that imported payload’s handle type was included in VkExternalSemaphorePropertiesKHR::exportFromImportedHandleTypes for handleType." + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-handleType-01134", + "text": " If handleType refers to a handle type with copy payload transference semantics, as defined below in &amp;lt;&amp;lt;synchronization-semaphores-importing,Importing Semaphore Payloads&amp;gt;&amp;gt;, there must be no queue waiting on semaphore." + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-handleType-01135", + "text": " If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated &amp;lt;&amp;lt;synchronization-semaphores-signaling,semaphore signal operation&amp;gt;&amp;gt; pending execution." + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-handleType-01136", + "text": " handleType must be defined as a POSIX file descriptor handle." + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-semaphore-parameter", + "text": " semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-VkSemaphoreGetFdInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value" + } + ] + }, + "vkDestroySemaphore": { + "core": [ + { + "vuid": "VUID-vkDestroySemaphore-semaphore-01137", + "text": " All submitted batches that refer to semaphore must have completed execution" + }, + { + "vuid": "VUID-vkDestroySemaphore-semaphore-01138", + "text": " If VkAllocationCallbacks were provided when semaphore was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroySemaphore-semaphore-01139", + "text": " If no VkAllocationCallbacks were provided when semaphore was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroySemaphore-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroySemaphore-semaphore-parameter", + "text": " If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-vkDestroySemaphore-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroySemaphore-semaphore-parent", + "text": " If semaphore is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkImportSemaphoreWin32HandleKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-vkImportSemaphoreWin32HandleKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkImportSemaphoreWin32HandleKHR-pImportSemaphoreWin32HandleInfo-parameter", + "text": " pImportSemaphoreWin32HandleInfo must be a valid pointer to a valid VkImportSemaphoreWin32HandleInfoKHR structure" + } + ] + }, + "VkImportSemaphoreWin32HandleInfoKHR": { + "(VK_KHR_external_semaphore_win32)": [ + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01140", + "text": " handleType must be a value included in the &amp;lt;&amp;lt;synchronization-semaphore-handletypes-win32,Handle Types Supported by VkImportSemaphoreWin32HandleInfoKHR&amp;gt;&amp;gt; table." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01466", + "text": " If handleType is not VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR, name must be NULL." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01467", + "text": " If handleType is not 0 and handle is NULL, name must name a valid synchronization primitive of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-01468", + "text": " If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01469", + "text": " If handle is not NULL, name must be NULL." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handle-01542", + "text": " If handle is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-name-01543", + "text": " If name is not NULL, it must obey any requirements listed for handleType in external semaphore handle types compatibility." + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-semaphore-parameter", + "text": " semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values" + }, + { + "vuid": "VUID-VkImportSemaphoreWin32HandleInfoKHR-handleType-parameter", + "text": " If handleType is not 0, handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value" + } + ] + }, + "vkImportSemaphoreFdKHR": { + "(VK_KHR_external_semaphore_fd)": [ + { + "vuid": "VUID-vkImportSemaphoreFdKHR-semaphore-01142", + "text": " semaphore must not be associated with any queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkImportSemaphoreFdKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkImportSemaphoreFdKHR-pImportSemaphoreFdInfo-parameter", + "text": " pImportSemaphoreFdInfo must be a valid pointer to a valid VkImportSemaphoreFdInfoKHR structure" + } + ] + }, + "VkImportSemaphoreFdInfoKHR": { + "(VK_KHR_external_semaphore_fd)": [ + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-handleType-01143", + "text": " handleType must be a value included in the &amp;lt;&amp;lt;synchronization-semaphore-handletypes-fd,Handle Types Supported by VkImportSemaphoreFdInfoKHR&amp;gt;&amp;gt; table." + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-fd-01544", + "text": " fd must obey any requirements listed for handleType in &amp;lt;&amp;lt;external-semaphore-handle-types-compatibility,external semaphore handle types compatibility&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-semaphore-parameter", + "text": " semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkSemaphoreImportFlagBitsKHR values" + }, + { + "vuid": "VUID-VkImportSemaphoreFdInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value" + } + ] + }, + "vkCreateEvent": { + "core": [ + { + "vuid": "VUID-vkCreateEvent-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateEvent-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkEventCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateEvent-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateEvent-pEvent-parameter", + "text": " pEvent must be a valid pointer to a VkEvent handle" + } + ] + }, + "VkEventCreateInfo": { + "core": [ + { + "vuid": "VUID-VkEventCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO" + }, + { + "vuid": "VUID-VkEventCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkEventCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkDestroyEvent": { + "core": [ + { + "vuid": "VUID-vkDestroyEvent-event-01145", + "text": " All submitted commands that refer to event must have completed execution" + }, + { + "vuid": "VUID-vkDestroyEvent-event-01146", + "text": " If VkAllocationCallbacks were provided when event was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyEvent-event-01147", + "text": " If no VkAllocationCallbacks were provided when event was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyEvent-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyEvent-event-parameter", + "text": " If event is not VK_NULL_HANDLE, event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkDestroyEvent-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyEvent-event-parent", + "text": " If event is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetEventStatus": { + "core": [ + { + "vuid": "VUID-vkGetEventStatus-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetEventStatus-event-parameter", + "text": " event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkGetEventStatus-event-parent", + "text": " event must have been created, allocated, or retrieved from device" + } + ] + }, + "vkSetEvent": { + "core": [ + { + "vuid": "VUID-vkSetEvent-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkSetEvent-event-parameter", + "text": " event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkSetEvent-event-parent", + "text": " event must have been created, allocated, or retrieved from device" + } + ] + }, + "vkResetEvent": { + "core": [ + { + "vuid": "VUID-vkResetEvent-event-01148", + "text": " event must not be waited on by a vkCmdWaitEvents command that is currently executing" + }, + { + "vuid": "VUID-vkResetEvent-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkResetEvent-event-parameter", + "text": " event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkResetEvent-event-parent", + "text": " event must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdSetEvent": { + "core": [ + { + "vuid": "VUID-vkCmdSetEvent-stageMask-01149", + "text": " stageMask must not include VK_PIPELINE_STAGE_HOST_BIT" + }, + { + "vuid": "VUID-vkCmdSetEvent-stageMask-01150", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, stageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdSetEvent-stageMask-01151", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, stageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdSetEvent-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetEvent-event-parameter", + "text": " event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkCmdSetEvent-stageMask-parameter", + "text": " stageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdSetEvent-stageMask-requiredbitmask", + "text": " stageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdSetEvent-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetEvent-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdSetEvent-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdSetEvent-commonparent", + "text": " Both of commandBuffer, and event must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkCmdSetEvent-commandBuffer-01152", + "text": " commandBuffer’s current device mask must include exactly one physical device." + } + ] + }, + "vkCmdResetEvent": { + "core": [ + { + "vuid": "VUID-vkCmdResetEvent-stageMask-01153", + "text": " stageMask must not include VK_PIPELINE_STAGE_HOST_BIT" + }, + { + "vuid": "VUID-vkCmdResetEvent-stageMask-01154", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, stageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdResetEvent-stageMask-01155", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, stageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdResetEvent-event-01156", + "text": " When this command executes, event must not be waited on by a vkCmdWaitEvents command that is currently executing" + }, + { + "vuid": "VUID-vkCmdResetEvent-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdResetEvent-event-parameter", + "text": " event must be a valid VkEvent handle" + }, + { + "vuid": "VUID-vkCmdResetEvent-stageMask-parameter", + "text": " stageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdResetEvent-stageMask-requiredbitmask", + "text": " stageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdResetEvent-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdResetEvent-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdResetEvent-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdResetEvent-commonparent", + "text": " Both of commandBuffer, and event must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkCmdResetEvent-commandBuffer-01157", + "text": " commandBuffer’s current device mask must include exactly one physical device." + } + ] + }, + "vkCmdWaitEvents": { + "core": [ + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-01158", + "text": " srcStageMask must be the bitwise OR of the stageMask parameter used in previous calls to vkCmdSetEvent with any of the members of pEvents and VK_PIPELINE_STAGE_HOST_BIT if any of the members of pEvents was set using vkSetEvent" + }, + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-01159", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdWaitEvents-dstStageMask-01160", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-01161", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdWaitEvents-dstStageMask-01162", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdWaitEvents-pEvents-01163", + "text": " If pEvents includes one or more events that will be signaled by vkSetEvent after commandBuffer has been submitted to a queue, then vkCmdWaitEvents must not be called inside a render pass instance" + }, + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-01164", + "text": " Any pipeline stage included in srcStageMask or dstStageMask must be supported by the capabilities of the queue family specified by the queueFamilyIndex member of the VkCommandPoolCreateInfo structure that was used to create the VkCommandPool that commandBuffer was allocated from, as specified in the &amp;lt;&amp;lt;synchronization-pipeline-stages-supported, table of supported pipeline stages&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdWaitEvents-pMemoryBarriers-01165", + "text": " Each element of pMemoryBarriers, pBufferMemoryBarriers or pImageMemoryBarriers must not have any access flag included in its srcAccessMask member if that bit is not supported by any of the pipeline stages in srcStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdWaitEvents-pMemoryBarriers-01166", + "text": " Each element of pMemoryBarriers, pBufferMemoryBarriers or pImageMemoryBarriers must not have any access flag included in its dstAccessMask member if that bit is not supported by any of the pipeline stages in dstStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdWaitEvents-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdWaitEvents-pEvents-parameter", + "text": " pEvents must be a valid pointer to an array of eventCount valid VkEvent handles" + }, + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-parameter", + "text": " srcStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdWaitEvents-srcStageMask-requiredbitmask", + "text": " srcStageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdWaitEvents-dstStageMask-parameter", + "text": " dstStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdWaitEvents-dstStageMask-requiredbitmask", + "text": " dstStageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdWaitEvents-pMemoryBarriers-parameter", + "text": " If memoryBarrierCount is not 0, pMemoryBarriers must be a valid pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdWaitEvents-pBufferMemoryBarriers-parameter", + "text": " If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a valid pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdWaitEvents-pImageMemoryBarriers-parameter", + "text": " If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a valid pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdWaitEvents-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdWaitEvents-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdWaitEvents-eventCount-arraylength", + "text": " eventCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdWaitEvents-commonparent", + "text": " Both of commandBuffer, and the elements of pEvents must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkCmdWaitEvents-commandBuffer-01167", + "text": " commandBuffer’s current device mask must include exactly one physical device." + } + ] + }, + "vkCmdPipelineBarrier": { + "core": [ + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-01168", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstStageMask-01169", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-01170", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstStageMask-01171", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pDependencies-01172", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the render pass must have been created with a VkSubpassDependency instance in pDependencies that expresses a dependency from the current subpass to itself." + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-01173", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, srcStageMask must contain a subset of the bit values in the srcStageMask member of that instance of VkSubpassDependency" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstStageMask-01174", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, dstStageMask must contain a subset of the bit values in the dstStageMask member of that instance of VkSubpassDependency" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcAccessMask-01175", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the srcAccessMask of any element of pMemoryBarriers or pImageMemoryBarriers must contain a subset of the bit values the srcAccessMask member of that instance of VkSubpassDependency" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstAccessMask-01176", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the dstAccessMask of any element of pMemoryBarriers or pImageMemoryBarriers must contain a subset of the bit values the dstAccessMask member of that instance of VkSubpassDependency" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dependencyFlags-01177", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, dependencyFlags must be equal to the dependencyFlags member of that instance of VkSubpassDependency" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-bufferMemoryBarrierCount-01178", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, bufferMemoryBarrierCount must be 0" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-image-01179", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the image member of any element of pImageMemoryBarriers must be equal to one of the elements of pAttachments that the current framebuffer was created with, that is also referred to by one of the elements of the pColorAttachments, pResolveAttachments or pDepthStencilAttachment members of the VkSubpassDescription instance that the current subpass was created with" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-oldLayout-01180", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the oldLayout and newLayout members of any element of pImageMemoryBarriers must be equal to the layout member of an element of the pColorAttachments, pResolveAttachments or pDepthStencilAttachment members of the VkSubpassDescription instance that the current subpass was created with, that refers to the same image" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-oldLayout-01181", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the oldLayout and newLayout members of an element of pImageMemoryBarriers must be equal" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcQueueFamilyIndex-01182", + "text": " If vkCmdPipelineBarrier is called within a render pass instance, the srcQueueFamilyIndex and dstQueueFamilyIndex members of any element of pImageMemoryBarriers must be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-01183", + "text": " Any pipeline stage included in srcStageMask or dstStageMask must be supported by the capabilities of the queue family specified by the queueFamilyIndex member of the VkCommandPoolCreateInfo structure that was used to create the VkCommandPool that commandBuffer was allocated from, as specified in the &amp;lt;&amp;lt;synchronization-pipeline-stages-supported, table of supported pipeline stages&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pMemoryBarriers-01184", + "text": " Each element of pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers must not have any access flag included in its srcAccessMask member if that bit is not supported by any of the pipeline stages in srcStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pMemoryBarriers-01185", + "text": " Each element of pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers must not have any access flag included in its dstAccessMask member if that bit is not supported by any of the pipeline stages in dstStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-parameter", + "text": " srcStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-srcStageMask-requiredbitmask", + "text": " srcStageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstStageMask-parameter", + "text": " dstStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dstStageMask-requiredbitmask", + "text": " dstStageMask must not be 0" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-dependencyFlags-parameter", + "text": " dependencyFlags must be a valid combination of VkDependencyFlagBits values" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pMemoryBarriers-parameter", + "text": " If memoryBarrierCount is not 0, pMemoryBarriers must be a valid pointer to an array of memoryBarrierCount valid VkMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-parameter", + "text": " If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a valid pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-pImageMemoryBarriers-parameter", + "text": " If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a valid pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier structures" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdPipelineBarrier-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdPipelineBarrier-dependencyFlags-01186", + "text": " If vkCmdPipelineBarrier is called outside of a render pass instance, dependencyFlags must not include VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX" + } + ] + }, + "VkMemoryBarrier": { + "core": [ + { + "vuid": "VUID-VkMemoryBarrier-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_BARRIER" + }, + { + "vuid": "VUID-VkMemoryBarrier-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMemoryBarrier-srcAccessMask-parameter", + "text": " srcAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkMemoryBarrier-dstAccessMask-parameter", + "text": " dstAccessMask must be a valid combination of VkAccessFlagBits values" + } + ] + }, + "VkBufferMemoryBarrier": { + "core": [ + { + "vuid": "VUID-VkBufferMemoryBarrier-offset-01187", + "text": " offset must be less than the size of buffer" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-size-01188", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be greater than 0" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-size-01189", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to than the size of buffer minus offset" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01196", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-srcAccessMask-parameter", + "text": " srcAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-dstAccessMask-parameter", + "text": " dstAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + } + ], + "!(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01190", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01192", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see &amp;lt;&amp;lt;devsandqueues-queueprops&amp;gt;&amp;gt;)" + } + ], + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01191", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01763", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory ownership transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01193", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01764", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkBufferMemoryBarrier-buffer-01765", + "text": " If buffer was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + } + ] + }, + "VkImageMemoryBarrier": { + "core": [ + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01197", + "text": " oldLayout must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-newLayout-01198", + "text": " newLayout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01205", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex and dstQueueFamilyIndex are not VK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-subresourceRange-01486", + "text": " subresourceRange.baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-subresourceRange-01724", + "text": " If subresourceRange.levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange.baseMipLevel + subresourceRange.levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-subresourceRange-01488", + "text": " subresourceRange.baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-subresourceRange-01725", + "text": " If subresourceRange.layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange.baseArrayLayer + subresourceRange.layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01207", + "text": " If image has a depth/stencil format with both depth and stencil components, then the aspectMask member of subresourceRange must include both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01208", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then image must have been created with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01209", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01210", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01211", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then image must have been created with VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01212", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then image must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01213", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then image must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkSampleLocationsInfoEXT" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-srcAccessMask-parameter", + "text": " srcAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-dstAccessMask-parameter", + "text": " dstAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-parameter", + "text": " oldLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-newLayout-parameter", + "text": " newLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-subresourceRange-parameter", + "text": " subresourceRange must be a valid VkImageSubresourceRange structure" + } + ], + "!(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkImageMemoryBarrier-image-01199", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, srcQueueFamilyIndex and dstQueueFamilyIndex must both be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01200", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE, srcQueueFamilyIndex and dstQueueFamilyIndex must either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see &amp;lt;&amp;lt;devsandqueues-queueprops&amp;gt;&amp;gt;)." + } + ], + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkImageMemoryBarrier-image-01381", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, at least one of srcQueueFamilyIndex and dstQueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01766", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_CONCURRENT, and one of srcQueueFamilyIndex and dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, the other must be VK_QUEUE_FAMILY_IGNORED or a special queue family reserved for external memory transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01201", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, dstQueueFamilyIndex must also be VK_QUEUE_FAMILY_IGNORED." + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01767", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and srcQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01768", + "text": " If image was created with a sharing mode of VK_SHARING_MODE_EXCLUSIVE and dstQueueFamilyIndex is not VK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in &amp;lt;&amp;lt;synchronization-queue-transfers&amp;gt;&amp;gt;." + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageMemoryBarrier-image-01671", + "text": " If image has a single-plane color format or is not disjoint, then the aspectMask member of subresourceRange must be VK_IMAGE_ASPECT_COLOR_BIT" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01672", + "text": " If image has a multi-planar format and the image is disjoint, then the aspectMask member of subresourceRange must include either at least one of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, and VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; or must include VK_IMAGE_ASPECT_COLOR_BIT" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-image-01673", + "text": " If image has a multi-planar format with only two planes, then the aspectMask member of subresourceRange must not include VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01658", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkImageMemoryBarrier-oldLayout-01659", + "text": " If either oldLayout or newLayout is VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR then image must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + } + ] + }, + "vkQueueWaitIdle": { + "core": [ + { + "vuid": "VUID-vkQueueWaitIdle-queue-parameter", + "text": " queue must be a valid VkQueue handle" + } + ] + }, + "vkDeviceWaitIdle": { + "core": [ + { + "vuid": "VUID-vkDeviceWaitIdle-device-parameter", + "text": " device must be a valid VkDevice handle" + } + ] + }, + "vkCreateRenderPass": { + "core": [ + { + "vuid": "VUID-vkCreateRenderPass-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateRenderPass-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkRenderPassCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateRenderPass-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateRenderPass-pRenderPass-parameter", + "text": " pRenderPass must be a valid pointer to a VkRenderPass handle" + } + ] + }, + "VkRenderPassCreateInfo": { + "core": [ + { + "vuid": "VUID-VkRenderPassCreateInfo-None-00832", + "text": " If any two subpasses operate on attachments with overlapping ranges of the same VkDeviceMemory object, and at least one subpass writes to that area of VkDeviceMemory, a subpass dependency must be included (either directly or via some intermediate subpasses) between them" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-attachment-00833", + "text": " If the attachment member of any element of pInputAttachments, pColorAttachments, pResolveAttachments or pDepthStencilAttachment, or the attachment indexed by any element of pPreserveAttachments in any element of pSubpasses is bound to a range of a VkDeviceMemory object that overlaps with any other attachment in any subpass (including the same subpass), the VkAttachmentDescription structures describing them must include VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in flags" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-attachment-00834", + "text": " If the attachment member of any element of pInputAttachments, pColorAttachments, pResolveAttachments or pDepthStencilAttachment, or any element of pPreserveAttachments in any element of pSubpasses is not VK_ATTACHMENT_UNUSED, it must be less than attachmentCount" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pPreserveAttachments-00835", + "text": " The value of each element of the pPreserveAttachments member in each element of pSubpasses must not be VK_ATTACHMENT_UNUSED" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pAttachments-00836", + "text": " For any member of pAttachments with a loadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL." + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pDependencies-00837", + "text": " For any element of pDependencies, if the srcSubpass is not VK_SUBPASS_EXTERNAL, all stage flags included in the srcStageMask member of that dependency must be a pipeline stage supported by the &amp;lt;&amp;lt;synchronization-pipeline-stages-types, pipeline&amp;gt;&amp;gt; identified by the pipelineBindPoint member of the source subpass." + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pDependencies-00838", + "text": " For any element of pDependencies, if the dstSubpass is not VK_SUBPASS_EXTERNAL, all stage flags included in the dstStageMask member of that dependency must be a pipeline stage supported by the &amp;lt;&amp;lt;synchronization-pipeline-stages-types, pipeline&amp;gt;&amp;gt; identified by the pipelineBindPoint member of the source subpass." + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkRenderPassInputAttachmentAspectCreateInfoKHR or VkRenderPassMultiviewCreateInfoKHX" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pAttachments-parameter", + "text": " If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkAttachmentDescription structures" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pSubpasses-parameter", + "text": " pSubpasses must be a valid pointer to an array of subpassCount valid VkSubpassDescription structures" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pDependencies-parameter", + "text": " If dependencyCount is not 0, pDependencies must be a valid pointer to an array of dependencyCount valid VkSubpassDependency structures" + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-subpassCount-arraylength", + "text": " subpassCount must be greater than 0" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkRenderPassCreateInfo-pAttachments-01566", + "text": " For any member of pAttachments with a loadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR." + }, + { + "vuid": "VUID-VkRenderPassCreateInfo-pAttachments-01567", + "text": " For any member of pAttachments with a stencilLoadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify a layout equal to VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR." + } + ] + }, + "VkRenderPassMultiviewCreateInfoKHX": { + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-subpassCount-00839", + "text": " If subpassCount is not zero, subpassCount must be equal to the subpassCount in the VkRenderPassCreateInfo structure at the start of the chain" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-dependencyCount-00840", + "text": " If dependencyCount is not zero, dependencyCount must be equal to the dependencyCount in the VkRenderPassCreateInfo structure at the start of the chain" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-00841", + "text": " Each view index must not be set in more than one element of pCorrelationMasks" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-00842", + "text": " If an element of pViewOffsets is non-zero, the corresponding VkSubpassDependency structure must have different values of srcSubpass and dstSubpass." + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pViewMasks-parameter", + "text": " If subpassCount is not 0, pViewMasks must be a valid pointer to an array of subpassCount uint32_t values" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pViewOffsets-parameter", + "text": " If dependencyCount is not 0, pViewOffsets must be a valid pointer to an array of dependencyCount int32_t values" + }, + { + "vuid": "VUID-VkRenderPassMultiviewCreateInfoKHX-pCorrelationMasks-parameter", + "text": " If correlationMaskCount is not 0, pCorrelationMasks must be a valid pointer to an array of correlationMaskCount uint32_t values" + } + ] + }, + "VkAttachmentDescription": { + "core": [ + { + "vuid": "VUID-VkAttachmentDescription-finalLayout-00843", + "text": " finalLayout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED" + }, + { + "vuid": "VUID-VkAttachmentDescription-flags-parameter", + "text": " flags must be a valid combination of VkAttachmentDescriptionFlagBits values" + }, + { + "vuid": "VUID-VkAttachmentDescription-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkAttachmentDescription-samples-parameter", + "text": " samples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-VkAttachmentDescription-loadOp-parameter", + "text": " loadOp must be a valid VkAttachmentLoadOp value" + }, + { + "vuid": "VUID-VkAttachmentDescription-storeOp-parameter", + "text": " storeOp must be a valid VkAttachmentStoreOp value" + }, + { + "vuid": "VUID-VkAttachmentDescription-stencilLoadOp-parameter", + "text": " stencilLoadOp must be a valid VkAttachmentLoadOp value" + }, + { + "vuid": "VUID-VkAttachmentDescription-stencilStoreOp-parameter", + "text": " stencilStoreOp must be a valid VkAttachmentStoreOp value" + }, + { + "vuid": "VUID-VkAttachmentDescription-initialLayout-parameter", + "text": " initialLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-VkAttachmentDescription-finalLayout-parameter", + "text": " finalLayout must be a valid VkImageLayout value" + } + ] + }, + "VkRenderPassInputAttachmentAspectCreateInfoKHR": { + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-pAspectReferences-parameter", + "text": " pAspectReferences must be a valid pointer to an array of aspectReferenceCount valid VkInputAttachmentAspectReferenceKHR structures" + }, + { + "vuid": "VUID-VkRenderPassInputAttachmentAspectCreateInfoKHR-aspectReferenceCount-arraylength", + "text": " aspectReferenceCount must be greater than 0" + } + ] + }, + "VkInputAttachmentAspectReferenceKHR": { + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkInputAttachmentAspectReferenceKHR-pCreateInfo-01568", + "text": " There must be an input attachment at pCreateInfo::pSubpasses[subpass].pInputAttachments[inputAttachment]." + }, + { + "vuid": "VUID-VkInputAttachmentAspectReferenceKHR-None-01569", + "text": " The specified input attachment must have more than one aspect mask." + }, + { + "vuid": "VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-01570", + "text": " aspectMask must be a subset of the aspect masks in the specified input attachment." + }, + { + "vuid": "VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-parameter", + "text": " aspectMask must be a valid combination of VkImageAspectFlagBits values" + }, + { + "vuid": "VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-requiredbitmask", + "text": " aspectMask must not be 0" + } + ] + }, + "VkSubpassDescription": { + "core": [ + { + "vuid": "VUID-VkSubpassDescription-pipelineBindPoint-00844", + "text": " pipelineBindPoint must be VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-VkSubpassDescription-colorAttachmentCount-00845", + "text": " colorAttachmentCount must be less than or equal to VkPhysicalDeviceLimits::maxColorAttachments" + }, + { + "vuid": "VUID-VkSubpassDescription-loadOp-00846", + "text": " If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then loadOp must not be VK_ATTACHMENT_LOAD_OP_CLEAR" + }, + { + "vuid": "VUID-VkSubpassDescription-pResolveAttachments-00847", + "text": " If pResolveAttachments is not NULL, for each resolve attachment that does not have the value VK_ATTACHMENT_UNUSED, the corresponding color attachment must not have the value VK_ATTACHMENT_UNUSED" + }, + { + "vuid": "VUID-VkSubpassDescription-pResolveAttachments-00848", + "text": " If pResolveAttachments is not NULL, the sample count of each element of pColorAttachments must be anything other than VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-VkSubpassDescription-pResolveAttachments-00849", + "text": " Each element of pResolveAttachments must have a sample count of VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-VkSubpassDescription-pResolveAttachments-00850", + "text": " Each element of pResolveAttachments must have the same VkFormat as its corresponding color attachment" + }, + { + "vuid": "VUID-VkSubpassDescription-pColorAttachments-01417", + "text": " All attachments in pColorAttachments that are not VK_ATTACHMENT_UNUSED must have the same sample count" + }, + { + "vuid": "VUID-VkSubpassDescription-None-00852", + "text": " If any input attachments are VK_ATTACHMENT_UNUSED, then any pipelines bound during the subpass must not access those input attachments from the fragment shader" + }, + { + "vuid": "VUID-VkSubpassDescription-attachment-00853", + "text": " The attachment member of each element of pPreserveAttachments must not be VK_ATTACHMENT_UNUSED" + }, + { + "vuid": "VUID-VkSubpassDescription-pPreserveAttachments-00854", + "text": " Each element of pPreserveAttachments must not also be an element of any other member of the subpass description" + }, + { + "vuid": "VUID-VkSubpassDescription-layout-00855", + "text": " If any attachment is used as both an input attachment and a color or depth/stencil attachment, then each use must use the same layout" + }, + { + "vuid": "VUID-VkSubpassDescription-flags-parameter", + "text": " flags must be a valid combination of VkSubpassDescriptionFlagBits values" + }, + { + "vuid": "VUID-VkSubpassDescription-pipelineBindPoint-parameter", + "text": " pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-VkSubpassDescription-pInputAttachments-parameter", + "text": " If inputAttachmentCount is not 0, pInputAttachments must be a valid pointer to an array of inputAttachmentCount valid VkAttachmentReference structures" + }, + { + "vuid": "VUID-VkSubpassDescription-pColorAttachments-parameter", + "text": " If colorAttachmentCount is not 0, pColorAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structures" + }, + { + "vuid": "VUID-VkSubpassDescription-pResolveAttachments-parameter", + "text": " If colorAttachmentCount is not 0, and pResolveAttachments is not NULL, pResolveAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structures" + }, + { + "vuid": "VUID-VkSubpassDescription-pDepthStencilAttachment-parameter", + "text": " If pDepthStencilAttachment is not NULL, pDepthStencilAttachment must be a valid pointer to a valid VkAttachmentReference structure" + }, + { + "vuid": "VUID-VkSubpassDescription-pPreserveAttachments-parameter", + "text": " If preserveAttachmentCount is not 0, pPreserveAttachments must be a valid pointer to an array of preserveAttachmentCount uint32_t values" + } + ], + "(VK_AMD_mixed_attachment_samples)": [ + { + "vuid": "VUID-VkSubpassDescription-pColorAttachments-01506", + "text": " All attachments in pColorAttachments that are not VK_ATTACHMENT_UNUSED must have a sample count that is smaller than or equal to the sample count of pDepthStencilAttachment if it is not VK_ATTACHMENT_UNUSED" + } + ], + "!(VK_AMD_mixed_attachment_samples)+!(VK_NV_framebuffer_mixed_samples)": [ + { + "vuid": "VUID-VkSubpassDescription-pDepthStencilAttachment-01418", + "text": " If pDepthStencilAttachment is not VK_ATTACHMENT_UNUSED and any attachments in pColorAttachments are not VK_ATTACHMENT_UNUSED, they must have the same sample count" + } + ], + "(VK_NVX_multiview_per_view_attributes)": [ + { + "vuid": "VUID-VkSubpassDescription-flags-00856", + "text": " If flags includes VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also include VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX." + } + ] + }, + "VkAttachmentReference": { + "core": [ + { + "vuid": "VUID-VkAttachmentReference-layout-00857", + "text": " layout must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED" + }, + { + "vuid": "VUID-VkAttachmentReference-layout-parameter", + "text": " layout must be a valid VkImageLayout value" + } + ] + }, + "VkSubpassDependency": { + "core": [ + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00858", + "text": " If srcSubpass is not VK_SUBPASS_EXTERNAL, srcStageMask must not include VK_PIPELINE_STAGE_HOST_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-dstSubpass-00859", + "text": " If dstSubpass is not VK_SUBPASS_EXTERNAL, dstStageMask must not include VK_PIPELINE_STAGE_HOST_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-srcStageMask-00860", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-dstStageMask-00861", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-srcStageMask-00862", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, srcStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-dstStageMask-00863", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, dstStageMask must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00864", + "text": " srcSubpass must be less than or equal to dstSubpass, unless one of them is VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order" + }, + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00865", + "text": " srcSubpass and dstSubpass must not both be equal to VK_SUBPASS_EXTERNAL" + }, + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00866", + "text": " If srcSubpass is equal to dstSubpass, srcStageMask and dstStageMask must only contain one of VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, or VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT" + }, + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00867", + "text": " If srcSubpass is equal to dstSubpass and not all of the stages in srcStageMask and dstStageMask are &amp;lt;&amp;lt;synchronization-framebuffer-regions,framebuffer-space stages&amp;gt;&amp;gt;, the &amp;lt;&amp;lt;synchronization-pipeline-stages-order, logically latest&amp;gt;&amp;gt; pipeline stage in srcStageMask must be &amp;lt;&amp;lt;synchronization-pipeline-stages-order, logically earlier&amp;gt;&amp;gt; than or equal to the &amp;lt;&amp;lt;synchronization-pipeline-stages-order, logically earliest&amp;gt;&amp;gt; pipeline stage in dstStageMask" + }, + { + "vuid": "VUID-VkSubpassDependency-srcAccessMask-00868", + "text": " Any access flag included in srcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkSubpassDependency-dstAccessMask-00869", + "text": " Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the &amp;lt;&amp;lt;synchronization-access-types-supported, table of supported access types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkSubpassDependency-srcStageMask-parameter", + "text": " srcStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-VkSubpassDependency-srcStageMask-requiredbitmask", + "text": " srcStageMask must not be 0" + }, + { + "vuid": "VUID-VkSubpassDependency-dstStageMask-parameter", + "text": " dstStageMask must be a valid combination of VkPipelineStageFlagBits values" + }, + { + "vuid": "VUID-VkSubpassDependency-dstStageMask-requiredbitmask", + "text": " dstStageMask must not be 0" + }, + { + "vuid": "VUID-VkSubpassDependency-srcAccessMask-parameter", + "text": " srcAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkSubpassDependency-dstAccessMask-parameter", + "text": " dstAccessMask must be a valid combination of VkAccessFlagBits values" + }, + { + "vuid": "VUID-VkSubpassDependency-dependencyFlags-parameter", + "text": " dependencyFlags must be a valid combination of VkDependencyFlagBits values" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-VkSubpassDependency-dependencyFlags-00870", + "text": " If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX, then both srcSubpass and dstSubpass must not equal VK_SUBPASS_EXTERNAL" + }, + { + "vuid": "VUID-VkSubpassDependency-dependencyFlags-00871", + "text": " If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX, then the render pass must have multiview enabled" + }, + { + "vuid": "VUID-VkSubpassDependency-srcSubpass-00872", + "text": " If srcSubpass equals dstSubpass and that subpass has more than one bit set in the view mask, then dependencyFlags must include VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX" + } + ] + }, + "vkDestroyRenderPass": { + "core": [ + { + "vuid": "VUID-vkDestroyRenderPass-renderPass-00873", + "text": " All submitted commands that refer to renderPass must have completed execution" + }, + { + "vuid": "VUID-vkDestroyRenderPass-renderPass-00874", + "text": " If VkAllocationCallbacks were provided when renderPass was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyRenderPass-renderPass-00875", + "text": " If no VkAllocationCallbacks were provided when renderPass was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyRenderPass-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyRenderPass-renderPass-parameter", + "text": " If renderPass is not VK_NULL_HANDLE, renderPass must be a valid VkRenderPass handle" + }, + { + "vuid": "VUID-vkDestroyRenderPass-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyRenderPass-renderPass-parent", + "text": " If renderPass is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateFramebuffer": { + "core": [ + { + "vuid": "VUID-vkCreateFramebuffer-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateFramebuffer-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkFramebufferCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateFramebuffer-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateFramebuffer-pFramebuffer-parameter", + "text": " pFramebuffer must be a valid pointer to a VkFramebuffer handle" + } + ] + }, + "VkFramebufferCreateInfo": { + "core": [ + { + "vuid": "VUID-VkFramebufferCreateInfo-attachmentCount-00876", + "text": " attachmentCount must be equal to the attachment count specified in renderPass" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00877", + "text": " Each element of pAttachments that is used as a color attachment or resolve attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00878", + "text": " Each element of pAttachments that is used as a depth/stencil attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00879", + "text": " Each element of pAttachments that is used as an input attachment by renderPass must have been created with a usage value including VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00880", + "text": " Each element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00881", + "text": " Each element of pAttachments must have been created with a samples value that matches the samples value specified by the corresponding VkAttachmentDescription in renderPass" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00882", + "text": " Each element of pAttachments must have dimensions at least as large as the corresponding framebuffer dimension" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00883", + "text": " Each element of pAttachments must only specify a single mip level" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00884", + "text": " Each element of pAttachments must have been created with the identity swizzle" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-width-00885", + "text": " width must be greater than 0." + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-width-00886", + "text": " width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-height-00887", + "text": " height must be greater than 0." + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-height-00888", + "text": " height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-layers-00889", + "text": " layers must be greater than 0." + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-layers-00890", + "text": " layers must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferLayers" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-renderPass-parameter", + "text": " renderPass must be a valid VkRenderPass handle" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-parameter", + "text": " If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkImageView handles" + }, + { + "vuid": "VUID-VkFramebufferCreateInfo-commonparent", + "text": " Both of renderPass, and the elements of pAttachments that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkFramebufferCreateInfo-pAttachments-00891", + "text": " Each element of pAttachments that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format" + } + ] + }, + "vkDestroyFramebuffer": { + "core": [ + { + "vuid": "VUID-vkDestroyFramebuffer-framebuffer-00892", + "text": " All submitted commands that refer to framebuffer must have completed execution" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-framebuffer-00893", + "text": " If VkAllocationCallbacks were provided when framebuffer was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-framebuffer-00894", + "text": " If no VkAllocationCallbacks were provided when framebuffer was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-framebuffer-parameter", + "text": " If framebuffer is not VK_NULL_HANDLE, framebuffer must be a valid VkFramebuffer handle" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyFramebuffer-framebuffer-parent", + "text": " If framebuffer is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdBeginRenderPass": { + "core": [ + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00895", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00897", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_SAMPLED_BIT or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00898", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT set" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00899", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT set" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00900", + "text": " If any of the initialLayout members of the VkAttachmentDescription structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is not VK_IMAGE_LAYOUT_UNDEFINED, then each such initialLayout must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-srcStageMask-00901", + "text": " The srcStageMask and dstStageMask members of any element of the pDependencies member of VkRenderPassCreateInfo used to create renderPass must be supported by the capabilities of the queue family identified by the queueFamilyIndex member of the VkCommandPoolCreateInfo used to create the command pool which commandBuffer was allocated from." + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-pRenderPassBegin-parameter", + "text": " pRenderPassBegin must be a valid pointer to a valid VkRenderPassBeginInfo structure" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-contents-parameter", + "text": " contents must be a valid VkSubpassContents value" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdBeginRenderPass-bufferlevel", + "text": " commandBuffer must be a primary VkCommandBuffer" + } + ], + "!(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-00896", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-vkCmdBeginRenderPass-initialLayout-01758", + "text": " If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set" + } + ] + }, + "VkRenderPassBeginInfo": { + "core": [ + { + "vuid": "VUID-VkRenderPassBeginInfo-clearValueCount-00902", + "text": " clearValueCount must be greater than the largest attachment index in renderPass that specifies a loadOp (or stencilLoadOp, if the attachment has a depth/stencil format) of VK_ATTACHMENT_LOAD_OP_CLEAR" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-clearValueCount-00903", + "text": " If clearValueCount is not 0, pClearValues must be a valid pointer to an array of clearValueCount valid VkClearValue unions" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-renderPass-00904", + "text": " renderPass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkFramebufferCreateInfo structure specified when creating framebuffer." + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfoKHX or VkRenderPassSampleLocationsBeginInfoEXT" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-renderPass-parameter", + "text": " renderPass must be a valid VkRenderPass handle" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-framebuffer-parameter", + "text": " framebuffer must be a valid VkFramebuffer handle" + }, + { + "vuid": "VUID-VkRenderPassBeginInfo-commonparent", + "text": " Both of framebuffer, and renderPass must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkRenderPassSampleLocationsBeginInfoEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT" + }, + { + "vuid": "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter", + "text": " If attachmentInitialSampleLocationsCount is not 0, pAttachmentInitialSampleLocations must be a valid pointer to an array of attachmentInitialSampleLocationsCount valid VkAttachmentSampleLocationsEXT structures" + }, + { + "vuid": "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter", + "text": " If postSubpassSampleLocationsCount is not 0, pPostSubpassSampleLocations must be a valid pointer to an array of postSubpassSampleLocationsCount valid VkSubpassSampleLocationsEXT structures" + } + ] + }, + "VkAttachmentSampleLocationsEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkAttachmentSampleLocationsEXT-attachmentIndex-01531", + "text": " attachmentIndex must be less than the attachmentCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::renderPass was created with" + }, + { + "vuid": "VUID-VkAttachmentSampleLocationsEXT-sampleLocationsInfo-parameter", + "text": " sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure" + } + ] + }, + "VkSubpassSampleLocationsEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkSubpassSampleLocationsEXT-subpassIndex-01532", + "text": " subpassIndex must be less than the subpassCount specified in VkRenderPassCreateInfo the render pass specified by VkRenderPassBeginInfo::renderPass was created with" + }, + { + "vuid": "VUID-VkSubpassSampleLocationsEXT-sampleLocationsInfo-parameter", + "text": " sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure" + } + ] + }, + "VkDeviceGroupRenderPassBeginInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00905", + "text": " deviceMask must be a valid device mask value" + }, + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00906", + "text": " deviceMask must not be zero" + }, + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceMask-00907", + "text": " deviceMask must be a subset of the command buffer’s initial device mask" + }, + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-deviceRenderAreaCount-00908", + "text": " deviceRenderAreaCount must either be zero or equal to the number of physical devices in the logical device." + }, + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupRenderPassBeginInfoKHX-pDeviceRenderAreas-parameter", + "text": " If deviceRenderAreaCount is not 0, pDeviceRenderAreas must be a valid pointer to an array of deviceRenderAreaCount VkRect2D structures" + } + ] + }, + "vkGetRenderAreaGranularity": { + "core": [ + { + "vuid": "VUID-vkGetRenderAreaGranularity-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetRenderAreaGranularity-renderPass-parameter", + "text": " renderPass must be a valid VkRenderPass handle" + }, + { + "vuid": "VUID-vkGetRenderAreaGranularity-pGranularity-parameter", + "text": " pGranularity must be a valid pointer to a VkExtent2D structure" + }, + { + "vuid": "VUID-vkGetRenderAreaGranularity-renderPass-parent", + "text": " renderPass must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdNextSubpass": { + "core": [ + { + "vuid": "VUID-vkCmdNextSubpass-None-00909", + "text": " The current subpass index must be less than the number of subpasses in the render pass minus one" + }, + { + "vuid": "VUID-vkCmdNextSubpass-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdNextSubpass-contents-parameter", + "text": " contents must be a valid VkSubpassContents value" + }, + { + "vuid": "VUID-vkCmdNextSubpass-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdNextSubpass-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdNextSubpass-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdNextSubpass-bufferlevel", + "text": " commandBuffer must be a primary VkCommandBuffer" + } + ] + }, + "vkCmdEndRenderPass": { + "core": [ + { + "vuid": "VUID-vkCmdEndRenderPass-None-00910", + "text": " The current subpass index must be equal to the number of subpasses in the render pass minus one" + }, + { + "vuid": "VUID-vkCmdEndRenderPass-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdEndRenderPass-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdEndRenderPass-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdEndRenderPass-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdEndRenderPass-bufferlevel", + "text": " commandBuffer must be a primary VkCommandBuffer" + } + ] + }, + "vkCreateShaderModule": { + "core": [ + { + "vuid": "VUID-vkCreateShaderModule-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateShaderModule-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkShaderModuleCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateShaderModule-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateShaderModule-pShaderModule-parameter", + "text": " pShaderModule must be a valid pointer to a VkShaderModule handle" + } + ] + }, + "VkShaderModuleCreateInfo": { + "core": [ + { + "vuid": "VUID-VkShaderModuleCreateInfo-codeSize-01085", + "text": " codeSize must be greater than 0" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01089", + "text": " pCode must declare the Shader capability for SPIR-V code" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01090", + "text": " pCode must not declare any capability that is not supported by the API, as described by the &amp;lt;&amp;lt;spirvenv-module-validation, Capabilities&amp;gt;&amp;gt; section of the &amp;lt;&amp;lt;spirvenv-capabilities,SPIR-V Environment&amp;gt;&amp;gt; appendix" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01091", + "text": " If pCode declares any of the capabilities that are listed as not required by the implementation, the relevant feature must be enabled, as listed in the &amp;lt;&amp;lt;spirvenv-capabilities-table,SPIR-V Environment&amp;gt;&amp;gt; appendix" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkShaderModuleValidationCacheCreateInfoEXT" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-parameter", + "text": " pCode must be a valid pointer to an array of \\(codeSize \\over 4\\) uint32_t values" + } + ], + "!(VK_NV_glsl_shader)": [ + { + "vuid": "VUID-VkShaderModuleCreateInfo-codeSize-01086", + "text": " codeSize must be a multiple of 4" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01087", + "text": " pCode must point to valid SPIR-V code, formatted and packed as described by the &amp;lt;&amp;lt;spirv-spec,Khronos SPIR-V Specification&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01088", + "text": " pCode must adhere to the validation rules described by the &amp;lt;&amp;lt;spirvenv-module-validation, Validation Rules within a Module&amp;gt;&amp;gt; section of the &amp;lt;&amp;lt;spirvenv-capabilities,SPIR-V Environment&amp;gt;&amp;gt; appendix" + } + ], + "(VK_NV_glsl_shader)": [ + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01376", + "text": " If pCode points to SPIR-V code, codeSize must be a multiple of 4" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01377", + "text": " pCode must point to either valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification or valid GLSL code which must be written to the GL_KHR_vulkan_glsl extension specification" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01378", + "text": " If pCode points to SPIR-V code, that code must adhere to the validation rules described by the &amp;lt;&amp;lt;spirvenv-module-validation, Validation Rules within a Module&amp;gt;&amp;gt; section of the &amp;lt;&amp;lt;spirvenv-capabilities,SPIR-V Environment&amp;gt;&amp;gt; appendix" + }, + { + "vuid": "VUID-VkShaderModuleCreateInfo-pCode-01379", + "text": " If pCode points to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification" + } + ] + }, + "VkShaderModuleValidationCacheCreateInfoEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkShaderModuleValidationCacheCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkShaderModuleValidationCacheCreateInfoEXT-validationCache-parameter", + "text": " validationCache must be a valid VkValidationCacheEXT handle" + } + ] + }, + "vkDestroyShaderModule": { + "core": [ + { + "vuid": "VUID-vkDestroyShaderModule-shaderModule-01092", + "text": " If VkAllocationCallbacks were provided when shaderModule was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyShaderModule-shaderModule-01093", + "text": " If no VkAllocationCallbacks were provided when shaderModule was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyShaderModule-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyShaderModule-shaderModule-parameter", + "text": " If shaderModule is not VK_NULL_HANDLE, shaderModule must be a valid VkShaderModule handle" + }, + { + "vuid": "VUID-vkDestroyShaderModule-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyShaderModule-shaderModule-parent", + "text": " If shaderModule is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateValidationCacheEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-vkCreateValidationCacheEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateValidationCacheEXT-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkValidationCacheCreateInfoEXT structure" + }, + { + "vuid": "VUID-vkCreateValidationCacheEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateValidationCacheEXT-pValidationCache-parameter", + "text": " pValidationCache must be a valid pointer to a VkValidationCacheEXT handle" + } + ] + }, + "VkValidationCacheCreateInfoEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01534", + "text": " If initialDataSize is not 0, it must be equal to the size of pInitialData, as returned by vkGetValidationCacheDataEXT when pInitialData was originally retrieved" + }, + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-initialDataSize-01535", + "text": " If initialDataSize is not 0, pInitialData must have been retrieved from a previous call to vkGetValidationCacheDataEXT" + }, + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkValidationCacheCreateInfoEXT-pInitialData-parameter", + "text": " If initialDataSize is not 0, pInitialData must be a valid pointer to an array of initialDataSize bytes" + } + ] + }, + "vkMergeValidationCachesEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-vkMergeValidationCachesEXT-dstCache-01536", + "text": " dstCache must not appear in the list of source caches" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-dstCache-parameter", + "text": " dstCache must be a valid VkValidationCacheEXT handle" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-pSrcCaches-parameter", + "text": " pSrcCaches must be a valid pointer to an array of srcCacheCount valid VkValidationCacheEXT handles" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-srcCacheCount-arraylength", + "text": " srcCacheCount must be greater than 0" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-dstCache-parent", + "text": " dstCache must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkMergeValidationCachesEXT-pSrcCaches-parent", + "text": " Each element of pSrcCaches must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetValidationCacheDataEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-vkGetValidationCacheDataEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetValidationCacheDataEXT-validationCache-parameter", + "text": " validationCache must be a valid VkValidationCacheEXT handle" + }, + { + "vuid": "VUID-vkGetValidationCacheDataEXT-pDataSize-parameter", + "text": " pDataSize must be a valid pointer to a size_t value" + }, + { + "vuid": "VUID-vkGetValidationCacheDataEXT-pData-parameter", + "text": " If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a valid pointer to an array of pDataSize bytes" + }, + { + "vuid": "VUID-vkGetValidationCacheDataEXT-validationCache-parent", + "text": " validationCache must have been created, allocated, or retrieved from device" + } + ] + }, + "vkDestroyValidationCacheEXT": { + "(VK_EXT_validation_cache)": [ + { + "vuid": "VUID-vkDestroyValidationCacheEXT-validationCache-01537", + "text": " If VkAllocationCallbacks were provided when validationCache was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyValidationCacheEXT-validationCache-01538", + "text": " If no VkAllocationCallbacks were provided when validationCache was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyValidationCacheEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyValidationCacheEXT-validationCache-parameter", + "text": " If validationCache is not VK_NULL_HANDLE, validationCache must be a valid VkValidationCacheEXT handle" + }, + { + "vuid": "VUID-vkDestroyValidationCacheEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyValidationCacheEXT-validationCache-parent", + "text": " If validationCache is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateComputePipelines": { + "core": [ + { + "vuid": "VUID-vkCreateComputePipelines-flags-00695", + "text": " If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that element" + }, + { + "vuid": "VUID-vkCreateComputePipelines-flags-00696", + "text": " If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set" + }, + { + "vuid": "VUID-vkCreateComputePipelines-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateComputePipelines-pipelineCache-parameter", + "text": " If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle" + }, + { + "vuid": "VUID-vkCreateComputePipelines-pCreateInfos-parameter", + "text": " pCreateInfos must be a valid pointer to an array of createInfoCount valid VkComputePipelineCreateInfo structures" + }, + { + "vuid": "VUID-vkCreateComputePipelines-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateComputePipelines-pPipelines-parameter", + "text": " pPipelines must be a valid pointer to an array of createInfoCount VkPipeline handles" + }, + { + "vuid": "VUID-vkCreateComputePipelines-createInfoCount-arraylength", + "text": " createInfoCount must be greater than 0" + }, + { + "vuid": "VUID-vkCreateComputePipelines-pipelineCache-parent", + "text": " If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "VkComputePipelineCreateInfo": { + "core": [ + { + "vuid": "VUID-VkComputePipelineCreateInfo-flags-00697", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineIndex is -1, basePipelineHandle must be a valid handle to a compute VkPipeline" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-flags-00698", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineHandle is VK_NULL_HANDLE, basePipelineIndex must be a valid index into the calling command’s pCreateInfos parameter" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-flags-00699", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineIndex is not -1, basePipelineHandle must be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-flags-00700", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineHandle is not VK_NULL_HANDLE, basePipelineIndex must be -1" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-stage-00701", + "text": " The stage member of stage must be VK_SHADER_STAGE_COMPUTE_BIT" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-stage-00702", + "text": " The shader code for the entry point identified by stage and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the &amp;lt;&amp;lt;interfaces,Shader Interfaces&amp;gt;&amp;gt; chapter" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-layout-00703", + "text": " layout must be &amp;lt;&amp;lt;descriptorsets-pipelinelayout-consistency,consistent&amp;gt;&amp;gt; with the layout of the compute shader specified in stage" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-layout-01687", + "text": " The number of resources in layout accessible to the compute shader stage must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkPipelineCreateFlagBits values" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-stage-parameter", + "text": " stage must be a valid VkPipelineShaderStageCreateInfo structure" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkComputePipelineCreateInfo-commonparent", + "text": " Both of basePipelineHandle, and layout that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkPipelineShaderStageCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00704", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, stage must not be VK_SHADER_STAGE_GEOMETRY_BIT" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00705", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, stage must not be VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00706", + "text": " stage must not be VK_SHADER_STAGE_ALL_GRAPHICS, or VK_SHADER_STAGE_ALL" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-pName-00707", + "text": " pName must be the name of an OpEntryPoint in module with an execution model that matches stage" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-maxClipDistances-00708", + "text": " If the identified entry point includes any variable in its interface that is declared with the ClipDistance BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxClipDistances" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-maxCullDistances-00709", + "text": " If the identified entry point includes any variable in its interface that is declared with the CullDistance BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxCullDistances" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-maxCombinedClipAndCullDistances-00710", + "text": " If the identified entry point includes any variables in its interface that are declared with the ClipDistance or CullDistance BuiltIn decoration, those variables must not have array sizes which sum to more than VkPhysicalDeviceLimits::maxCombinedClipAndCullDistances" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-maxSampleMaskWords-00711", + "text": " If the identified entry point includes any variable in its interface that is declared with the SampleMask BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxSampleMaskWords" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00712", + "text": " If stage is VK_SHADER_STAGE_VERTEX_BIT, the identified entry point must not include any input variable in its interface that is decorated with CullDistance" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00713", + "text": " If stage is VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an OpExecutionMode instruction that specifies a patch size with OutputVertices, the patch size must be greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxTessellationPatchSize" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00714", + "text": " If stage is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an OpExecutionMode instruction that specifies a maximum output vertex count that is greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxGeometryOutputVertices" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00715", + "text": " If stage is VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an OpExecutionMode instruction that specifies an invocation count that is greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxGeometryShaderInvocations" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00716", + "text": " If stage is VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to Layer for any primitive, it must write the same value to Layer for all vertices of a given primitive" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00717", + "text": " If stage is VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to ViewportIndex for any primitive, it must write the same value to ViewportIndex for all vertices of a given primitive" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00718", + "text": " If stage is VK_SHADER_STAGE_FRAGMENT_BIT, the identified entry point must not include any output variables in its interface decorated with CullDistance" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-00719", + "text": " If stage is VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to FragDepth in any execution path, it must write to FragDepth in all execution paths" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-parameter", + "text": " stage must be a valid VkShaderStageFlagBits value" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-module-parameter", + "text": " module must be a valid VkShaderModule handle" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-pName-parameter", + "text": " pName must be a null-terminated UTF-8 string" + }, + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-parameter", + "text": " If pSpecializationInfo is not NULL, pSpecializationInfo must be a valid pointer to a valid VkSpecializationInfo structure" + } + ], + "(VK_EXT_shader_stencil_export)": [ + { + "vuid": "VUID-VkPipelineShaderStageCreateInfo-stage-01511", + "text": " If stage is VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to FragStencilRefEXT in any execution path, it must write to FragStencilRefEXT in all execution paths" + } + ] + }, + "vkCreateGraphicsPipelines": { + "core": [ + { + "vuid": "VUID-vkCreateGraphicsPipelines-flags-00720", + "text": " If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that element" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-flags-00721", + "text": " If the flags member of any element of pCreateInfos contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-pipelineCache-parameter", + "text": " If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-pCreateInfos-parameter", + "text": " pCreateInfos must be a valid pointer to an array of createInfoCount valid VkGraphicsPipelineCreateInfo structures" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-pPipelines-parameter", + "text": " pPipelines must be a valid pointer to an array of createInfoCount VkPipeline handles" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-createInfoCount-arraylength", + "text": " createInfoCount must be greater than 0" + }, + { + "vuid": "VUID-vkCreateGraphicsPipelines-pipelineCache-parent", + "text": " If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "VkGraphicsPipelineCreateInfo": { + "core": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-00722", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineIndex is -1, basePipelineHandle must be a valid handle to a graphics VkPipeline" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-00723", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineHandle is VK_NULL_HANDLE, basePipelineIndex must be a valid index into the calling command’s pCreateInfos parameter" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-00724", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineIndex is not -1, basePipelineHandle must be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-00725", + "text": " If flags contains the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and basePipelineHandle is not VK_NULL_HANDLE, basePipelineIndex must be -1" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-stage-00726", + "text": " The stage member of each element of pStages must be unique" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-stage-00727", + "text": " The stage member of one element of pStages must be VK_SHADER_STAGE_VERTEX_BIT" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-stage-00728", + "text": " The stage member of each element of pStages must not be VK_SHADER_STAGE_COMPUTE_BIT" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00729", + "text": " If pStages includes a tessellation control shader stage, it must include a tessellation evaluation shader stage" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00730", + "text": " If pStages includes a tessellation evaluation shader stage, it must include a tessellation control shader stage" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00731", + "text": " If pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pTessellationState must be a valid pointer to a valid VkPipelineTessellationStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00732", + "text": " If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00733", + "text": " If pStages includes tessellation shader stages, and the shader code of both stages contain an OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must both specify the same subdivision mode" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00734", + "text": " If pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction that specifies the output patch size in the pipeline" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00735", + "text": " If pStages includes tessellation shader stages, and the shader code of both contain an OpExecutionMode instruction that specifies the out patch size in the pipeline, they must both specify the same patch size" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00736", + "text": " If pStages includes tessellation shader stages, the topology member of pInputAssembly must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-topology-00737", + "text": " If the topology member of pInputAssembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, pStages must include tessellation shader stages" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00738", + "text": " If pStages includes a geometry shader stage, and does not include any tessellation shader stages, its shader code must contain an OpExecutionMode instruction that specifies an input primitive type that is &amp;lt;&amp;lt;shaders-geometry-execution, compatible&amp;gt;&amp;gt; with the primitive topology specified in pInputAssembly" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00739", + "text": " If pStages includes a geometry shader stage, and also includes tessellation shader stages, its shader code must contain an OpExecutionMode instruction that specifies an input primitive type that is &amp;lt;&amp;lt;shaders-geometry-execution, compatible&amp;gt;&amp;gt; with the primitive topology that is output by the tessellation stages" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00740", + "text": " If pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with PrimitiveID, then the geometry shader code must write to a matching output variable, decorated with PrimitiveID, in all execution paths" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00741", + "text": " If pStages includes a fragment shader stage, its shader code must not read from any input attachment that is defined as VK_ATTACHMENT_UNUSED in subpass" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-00742", + "text": " The shader code for the entry points identified by pStages, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the &amp;lt;&amp;lt;interfaces,Shader Interfaces&amp;gt;&amp;gt; chapter" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00745", + "text": " If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the blendEnable member of the corresponding element of the pAttachment member of pColorBlendState must be VK_FALSE if the format of the attachment does not support color blend operations, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in VkFormatProperties::linearTilingFeatures or VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-attachmentCount-00746", + "text": " If rasterization is not disabled and the subpass uses color attachments, the attachmentCount member of pColorBlendState must be equal to the colorAttachmentCount used to create subpass" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT, the pViewports member of pViewportState must be a valid pointer to an array of pViewportState::viewportCount VkViewport structures" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SCISSOR, the pScissors member of pViewportState must be a valid pointer to an array of pViewportState::scissorCount VkRect2D structures" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749", + "text": " If the wide lines feature is not enabled, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_WIDTH, the lineWidth member of pRasterizationState must be 1.0" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750", + "text": " If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751", + "text": " If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pMultisampleState must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752", + "text": " If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses a depth/stencil attachment, pDepthStencilState must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753", + "text": " If the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, and subpass uses color attachments, pColorBlendState must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754", + "text": " If the depth bias clamping feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pRasterizationState is VK_TRUE, the depthBiasClamp member of pRasterizationState must be 0.0" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-layout-00756", + "text": " layout must be &amp;lt;&amp;lt;descriptorsets-pipelinelayout-consistency,consistent&amp;gt;&amp;gt; with all shaders specified in pStages" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00758", + "text": " If subpass does not use any color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must follow the rules for a &amp;lt;&amp;lt;renderpass-noattachments, zero-attachment subpass&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00759", + "text": " subpass must be a valid subpass within renderPass" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-layout-01688", + "text": " The number of resources in layout accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkPipelineDiscardRectangleStateCreateInfoEXT" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkPipelineCreateFlagBits values" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-parameter", + "text": " pStages must be a valid pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-parameter", + "text": " pVertexInputState must be a valid pointer to a valid VkPipelineVertexInputStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-parameter", + "text": " pInputAssemblyState must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-parameter", + "text": " pRasterizationState must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter", + "text": " If pDynamicState is not NULL, pDynamicState must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter", + "text": " renderPass must be a valid VkRenderPass handle" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-stageCount-arraylength", + "text": " stageCount must be greater than 0" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-commonparent", + "text": " Each of basePipelineHandle, layout, and renderPass that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "!(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00743", + "text": " If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00744", + "text": " If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-01756", + "text": " If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the depthWriteEnable member of pDepthStencilState must be VK_FALSE" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-01757", + "text": " If rasterization is not disabled and subpass uses a depth/stencil attachment in renderPass that has a layout of VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR in the VkAttachmentReference defined by subpass, the failOp, passOp and depthFailOp members of each of the front and back members of pDepthStencilState must be VK_STENCIL_OP_KEEP" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pStages-01565", + "text": " If pStages includes a fragment shader stage and an input attachment was referenced by the VkRenderPassInputAttachmentAspectCreateInfoKHR at renderPass create time, its shader code must not read from any aspect that was not specified in the aspectMask of the corresponding VkInputAttachmentAspectReferenceKHR structure." + } + ], + "!(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencilState is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencilState must be between 0.0 and 1.0, inclusive" + } + ], + "(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755", + "text": " If the VK_EXT_depth_range_unrestricted extension is not enabled and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencilState is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencilState must be between 0.0 and 1.0, inclusive" + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01521", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationGridSize.width must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.width as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01522", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationGridSize.height must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.height as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01523", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationsPerPixel must equal rasterizationSamples" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524", + "text": " If the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure chained to the pNext chain of pMultisampleState is VK_TRUE, the fragment shader code must not statically use the extended instruction InterpolateAtSample" + } + ], + "!(VK_AMD_mixed_attachment_samples)+!(VK_NV_framebuffer_mixed_samples)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-00757", + "text": " If subpass uses color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must be the same as the sample count for those subpass attachments" + } + ], + "(VK_AMD_mixed_attachment_samples)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-01505", + "text": " If subpass uses color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must equal the maximum of the sample counts of those subpass attachments" + } + ], + "(VK_NV_framebuffer_mixed_samples)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-01411", + "text": " If subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled, then the rasterizationSamples member of pMultisampleState must be the same as the sample count of the depth/stencil attachment" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-subpass-01412", + "text": " If subpass has any color attachments, then the rasterizationSamples member of pMultisampleState must be greater than or equal to the sample count for those subpass attachments" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-renderPass-00760", + "text": " If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewTessellationShader is not enabled, then pStages must not include tessellation shaders." + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-renderPass-00761", + "text": " If the renderPass has multiview enabled and subpass has more than one bit set in the view mask and multiviewGeometryShader is not enabled, then pStages must not include a geometry shader." + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-renderPass-00762", + "text": " If the renderPass has multiview enabled and subpass has more than one bit set in the view mask, shaders in the pipeline must not write to the Layer built-in output" + }, + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-renderPass-00763", + "text": " If the renderPass has multiview enabled, then all shaders must not include variables decorated with the Layer built-in decoration in their interfaces." + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-flags-00764", + "text": " flags must not contain the VK_PIPELINE_CREATE_DISPATCH_BASE_KHX flag." + } + ], + "(VK_NV_clip_space_w_scaling)": [ + { + "vuid": "VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715", + "text": " If no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the viewportWScalingEnable member of a VkPipelineViewportWScalingStateCreateInfoNV structure, chained to the pNext chain of pViewportState, is VK_TRUE, the pViewportWScalings member of the VkPipelineViewportWScalingStateCreateInfoNV must be a pointer to an array of VkPipelineViewportWScalingStateCreateInfoNV::viewportCount valid VkViewportWScalingNV structures" + } + ] + }, + "VkPipelineDynamicStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442", + "text": " Each element of pDynamicStates must be unique" + }, + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter", + "text": " pDynamicStates must be a valid pointer to an array of dynamicStateCount valid VkDynamicState values" + }, + { + "vuid": "VUID-VkPipelineDynamicStateCreateInfo-dynamicStateCount-arraylength", + "text": " dynamicStateCount must be greater than 0" + } + ] + }, + "vkDestroyPipeline": { + "core": [ + { + "vuid": "VUID-vkDestroyPipeline-pipeline-00765", + "text": " All submitted commands that refer to pipeline must have completed execution" + }, + { + "vuid": "VUID-vkDestroyPipeline-pipeline-00766", + "text": " If VkAllocationCallbacks were provided when pipeline was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyPipeline-pipeline-00767", + "text": " If no VkAllocationCallbacks were provided when pipeline was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyPipeline-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyPipeline-pipeline-parameter", + "text": " If pipeline is not VK_NULL_HANDLE, pipeline must be a valid VkPipeline handle" + }, + { + "vuid": "VUID-vkDestroyPipeline-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyPipeline-pipeline-parent", + "text": " If pipeline is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreatePipelineCache": { + "core": [ + { + "vuid": "VUID-vkCreatePipelineCache-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreatePipelineCache-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkPipelineCacheCreateInfo structure" + }, + { + "vuid": "VUID-vkCreatePipelineCache-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreatePipelineCache-pPipelineCache-parameter", + "text": " pPipelineCache must be a valid pointer to a VkPipelineCache handle" + } + ] + }, + "VkPipelineCacheCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineCacheCreateInfo-initialDataSize-00768", + "text": " If initialDataSize is not 0, it must be equal to the size of pInitialData, as returned by vkGetPipelineCacheData when pInitialData was originally retrieved" + }, + { + "vuid": "VUID-VkPipelineCacheCreateInfo-initialDataSize-00769", + "text": " If initialDataSize is not 0, pInitialData must have been retrieved from a previous call to vkGetPipelineCacheData" + }, + { + "vuid": "VUID-VkPipelineCacheCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineCacheCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineCacheCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineCacheCreateInfo-pInitialData-parameter", + "text": " If initialDataSize is not 0, pInitialData must be a valid pointer to an array of initialDataSize bytes" + } + ] + }, + "vkMergePipelineCaches": { + "core": [ + { + "vuid": "VUID-vkMergePipelineCaches-dstCache-00770", + "text": " dstCache must not appear in the list of source caches" + }, + { + "vuid": "VUID-vkMergePipelineCaches-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkMergePipelineCaches-dstCache-parameter", + "text": " dstCache must be a valid VkPipelineCache handle" + }, + { + "vuid": "VUID-vkMergePipelineCaches-pSrcCaches-parameter", + "text": " pSrcCaches must be a valid pointer to an array of srcCacheCount valid VkPipelineCache handles" + }, + { + "vuid": "VUID-vkMergePipelineCaches-srcCacheCount-arraylength", + "text": " srcCacheCount must be greater than 0" + }, + { + "vuid": "VUID-vkMergePipelineCaches-dstCache-parent", + "text": " dstCache must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkMergePipelineCaches-pSrcCaches-parent", + "text": " Each element of pSrcCaches must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetPipelineCacheData": { + "core": [ + { + "vuid": "VUID-vkGetPipelineCacheData-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetPipelineCacheData-pipelineCache-parameter", + "text": " pipelineCache must be a valid VkPipelineCache handle" + }, + { + "vuid": "VUID-vkGetPipelineCacheData-pDataSize-parameter", + "text": " pDataSize must be a valid pointer to a size_t value" + }, + { + "vuid": "VUID-vkGetPipelineCacheData-pData-parameter", + "text": " If the value referenced by pDataSize is not 0, and pData is not NULL, pData must be a valid pointer to an array of pDataSize bytes" + }, + { + "vuid": "VUID-vkGetPipelineCacheData-pipelineCache-parent", + "text": " pipelineCache must have been created, allocated, or retrieved from device" + } + ] + }, + "vkDestroyPipelineCache": { + "core": [ + { + "vuid": "VUID-vkDestroyPipelineCache-pipelineCache-00771", + "text": " If VkAllocationCallbacks were provided when pipelineCache was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyPipelineCache-pipelineCache-00772", + "text": " If no VkAllocationCallbacks were provided when pipelineCache was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyPipelineCache-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyPipelineCache-pipelineCache-parameter", + "text": " If pipelineCache is not VK_NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handle" + }, + { + "vuid": "VUID-vkDestroyPipelineCache-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyPipelineCache-pipelineCache-parent", + "text": " If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "VkSpecializationInfo": { + "core": [ + { + "vuid": "VUID-VkSpecializationInfo-offset-00773", + "text": " The offset member of each element of pMapEntries must be less than dataSize" + }, + { + "vuid": "VUID-VkSpecializationInfo-pMapEntries-00774", + "text": " The size member of each element of pMapEntries must be less than or equal to dataSize minus offset" + }, + { + "vuid": "VUID-VkSpecializationInfo-mapEntryCount-00775", + "text": " If mapEntryCount is not 0, pMapEntries must be a valid pointer to an array of mapEntryCount valid VkSpecializationMapEntry structures" + }, + { + "vuid": "VUID-VkSpecializationInfo-pData-parameter", + "text": " If dataSize is not 0, pData must be a valid pointer to an array of dataSize bytes" + } + ] + }, + "VkSpecializationMapEntry": { + "core": [ + { + "vuid": "VUID-VkSpecializationMapEntry-constantID-00776", + "text": " For a constantID specialization constant declared in a shader, size must match the byte size of the constantID. If the specialization constant is of type boolean, size must be the byte size of VkBool32" + } + ] + }, + "vkCmdBindPipeline": { + "core": [ + { + "vuid": "VUID-vkCmdBindPipeline-pipelineBindPoint-00777", + "text": " If pipelineBindPoint is VK_PIPELINE_BIND_POINT_COMPUTE, the VkCommandPool that commandBuffer was allocated from must support compute operations" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipelineBindPoint-00778", + "text": " If pipelineBindPoint is VK_PIPELINE_BIND_POINT_GRAPHICS, the VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipelineBindPoint-00779", + "text": " If pipelineBindPoint is VK_PIPELINE_BIND_POINT_COMPUTE, pipeline must be a compute pipeline" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipelineBindPoint-00780", + "text": " If pipelineBindPoint is VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline must be a graphics pipeline" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipeline-00781", + "text": " If the &amp;lt;&amp;lt;features-features-variableMultisampleRate,variable multisample rate&amp;gt;&amp;gt; feature is not supported, pipeline is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline" + }, + { + "vuid": "VUID-vkCmdBindPipeline-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipelineBindPoint-parameter", + "text": " pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-vkCmdBindPipeline-pipeline-parameter", + "text": " pipeline must be a valid VkPipeline handle" + }, + { + "vuid": "VUID-vkCmdBindPipeline-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBindPipeline-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdBindPipeline-commonparent", + "text": " Both of commandBuffer, and pipeline must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdBindPipeline-variableSampleLocations-01525", + "text": " If VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE, and pipeline is a graphics pipeline created with a VkPipelineSampleLocationsStateCreateInfoEXT structure having its sampleLocationsEnable member set to VK_TRUE but without VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT enabled then the current render pass instance must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose pPostSubpassSampleLocations member contains an element with a subpassIndex matching the current subpass index and the sampleLocationsInfo member of that element must match the sampleLocationsInfo specified in VkPipelineSampleLocationsStateCreateInfoEXT when the pipeline was created" + } + ] + }, + "vkGetShaderInfoAMD": { + "(VK_AMD_shader_info)": [ + { + "vuid": "VUID-vkGetShaderInfoAMD-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-pipeline-parameter", + "text": " pipeline must be a valid VkPipeline handle" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-shaderStage-parameter", + "text": " shaderStage must be a valid VkShaderStageFlagBits value" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-infoType-parameter", + "text": " infoType must be a valid VkShaderInfoTypeAMD value" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-pInfoSize-parameter", + "text": " pInfoSize must be a valid pointer to a size_t value" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-pInfo-parameter", + "text": " If the value referenced by pInfoSize is not 0, and pInfo is not NULL, pInfo must be a valid pointer to an array of pInfoSize bytes" + }, + { + "vuid": "VUID-vkGetShaderInfoAMD-pipeline-parent", + "text": " pipeline must have been created, allocated, or retrieved from device" + } + ] + }, + "VkAllocationCallbacks": { + "core": [ + { + "vuid": "VUID-VkAllocationCallbacks-pfnAllocation-00632", + "text": " pfnAllocation must be a valid pointer to a valid user-defined PFN_vkAllocationFunction" + }, + { + "vuid": "VUID-VkAllocationCallbacks-pfnReallocation-00633", + "text": " pfnReallocation must be a valid pointer to a valid user-defined PFN_vkReallocationFunction" + }, + { + "vuid": "VUID-VkAllocationCallbacks-pfnFree-00634", + "text": " pfnFree must be a valid pointer to a valid user-defined PFN_vkFreeFunction" + }, + { + "vuid": "VUID-VkAllocationCallbacks-pfnInternalAllocation-00635", + "text": " If either of pfnInternalAllocation or pfnInternalFree is not NULL, both must be valid callbacks" + } + ] + }, + "vkGetPhysicalDeviceMemoryProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMemoryProperties-pMemoryProperties-parameter", + "text": " pMemoryProperties must be a valid pointer to a VkPhysicalDeviceMemoryProperties structure" + } + ] + }, + "vkGetPhysicalDeviceMemoryProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceMemoryProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMemoryProperties2KHR-pMemoryProperties-parameter", + "text": " pMemoryProperties must be a valid pointer to a VkPhysicalDeviceMemoryProperties2KHR structure" + } + ] + }, + "VkPhysicalDeviceMemoryProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkPhysicalDeviceMemoryProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceMemoryProperties2KHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkAllocateMemory": { + "core": [ + { + "vuid": "VUID-vkAllocateMemory-pAllocateInfo-01713", + "text": " pAllocateInfo\\-&amp;gt;allocationSize must be less than or equal to VkPhysicalDeviceMemoryProperties::memoryHeaps[pAllocateInfo\\-&amp;gt;memoryTypeIndex].size as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that device was created from." + }, + { + "vuid": "VUID-vkAllocateMemory-pAllocateInfo-01714", + "text": " pAllocateInfo\\-&amp;gt;memoryTypeIndex must be less than VkPhysicalDeviceMemoryProperties::memoryTypeCount as returned by vkGetPhysicalDeviceMemoryProperties for the VkPhysicalDevice that device was created from." + }, + { + "vuid": "VUID-vkAllocateMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAllocateMemory-pAllocateInfo-parameter", + "text": " pAllocateInfo must be a valid pointer to a valid VkMemoryAllocateInfo structure" + }, + { + "vuid": "VUID-vkAllocateMemory-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkAllocateMemory-pMemory-parameter", + "text": " pMemory must be a valid pointer to a VkDeviceMemory handle" + } + ] + }, + "VkMemoryAllocateInfo": { + "core": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-00638", + "text": " allocationSize must be greater than 0" + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO" + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfoKHR, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfoKHX, or VkMemoryDedicatedAllocateInfoKHR" + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + } + ], + "(VK_KHR_external_memory)+(VK_KHR_dedicated_allocation,VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-pNext-00639", + "text": " If the pNext chain contains an instance of VkExportMemoryAllocateInfoKHR, and any of the handle types specified in VkExportMemoryAllocateInfoKHR::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2KHR in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::externalMemoryFeatures or VkExternalBufferPropertiesKHR::externalMemoryProperties::externalMemoryFeatures, the pNext chain must contain an instance of ifdef::VK_KHR_dedicated_allocation[VkMemoryDedicatedAllocateInfoKHR] ifdef::VK_KHR_dedicated_allocation+VK_NV_dedicated_allocation[or] ifdef::VK_NV_dedicated_allocation[VkDedicatedAllocationMemoryAllocateInfoNV] with either its image or buffer field set to a value other than VK_NULL_HANDLE." + } + ], + "(VK_KHR_external_memory+VK_NV_external_memory)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-pNext-00640", + "text": " If the pNext chain contains an instance of VkExportMemoryAllocateInfoKHR, it must not contain an instance of VkExportMemoryAllocateInfoNV or VkExportMemoryWin32HandleInfoNV." + } + ], + "(VK_KHR_external_memory_win32+VK_NV_external_memory_win32)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-pNext-00641", + "text": " If the pNext chain contains an instance of VkImportMemoryWin32HandleInfoKHR, it must not contain an instance of VkImportMemoryWin32HandleInfoNV." + } + ], + "(VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-01742", + "text": " If the parameters define an import operation, the external handle specified was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, then the values of allocationSize and memoryTypeIndex must match those specified when the memory object being imported was created." + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-memoryTypeIndex-00648", + "text": " If the parameters define an import operation and the external handle is a POSIX file descriptor created outside of the Vulkan API, the value of memoryTypeIndex must be one of those returned by vkGetMemoryFdPropertiesKHR." + } + ], + "(VK_KHR_external_memory+VK_KHX_device_group)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-None-00643", + "text": " If the parameters define an import operation and the external handle specified was created by the Vulkan API, the device mask specified by VkMemoryAllocateFlagsInfoKHX must match that specified when the memory object being imported was allocated." + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-None-00644", + "text": " If the parameters define an import operation and the external handle specified was created by the Vulkan API, the list of physical devices that comprise the logical device passed to vkAllocateMemory must match the list of physical devices that comprise the logical device on which the memory was originally allocated." + } + ], + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-memoryTypeIndex-00645", + "text": " If the parameters define an import operation and the external handle is an NT handle or a global share handle created outside of the Vulkan API, the value of memoryTypeIndex must be one of those returned by vkGetMemoryWin32HandlePropertiesKHR." + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-01743", + "text": " If the parameters define an import operation, the external handle was created by the Vulkan API, and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR, then the values of allocationSize and memoryTypeIndex must match those specified when the memory object being imported was created." + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-00646", + "text": " If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, allocationSize must match the size reported in the memory requirements of the image or buffer member of the instance of VkDedicatedAllocationMemoryAllocateInfoNV included in the pNext chain." + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-00647", + "text": " If the parameters define an import operation and the external handle type is VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, allocationSize must match the size specified when creating the Direct3D 12 heap from which the external handle was extracted." + } + ], + "(VK_EXT_external_memory_host)": [ + { + "vuid": "VUID-VkMemoryAllocateInfo-memoryTypeIndex-01744", + "text": " If the parameters define an import operation and the external handle is a host pointer, the value of memoryTypeIndex must be one of those returned by vkGetMemoryHostPointerPropertiesEXT" + }, + { + "vuid": "VUID-VkMemoryAllocateInfo-allocationSize-01745", + "text": " If the parameters define an import operation and the external handle is a host pointer, allocationSize must be an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment" + } + ] + }, + "VkMemoryDedicatedAllocateInfoKHR": { + "(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-01432", + "text": " At least one of image and buffer must be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-01433", + "text": " If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-01434", + "text": " If image is not VK_NULL_HANDLE, image must have been created without VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in VkImageCreateInfo::flags" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01435", + "text": " If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01436", + "text": " If buffer is not VK_NULL_HANDLE, buffer must have been created without VK_BUFFER_CREATE_SPARSE_BINDING_BIT set in VkBufferCreateInfo::flags" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-parameter", + "text": " If image is not VK_NULL_HANDLE, image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-parameter", + "text": " If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-commonparent", + "text": " Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_dedicated_allocation)+(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-01437", + "text": " If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory." + }, + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01438", + "text": " If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory." + } + ], + "(VK_KHR_dedicated_allocation)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkMemoryDedicatedAllocateInfoKHR-image-01797", + "text": " If image is not VK_NULL_HANDLE, image must not have been created with VK_IMAGE_CREATE_DISJOINT_BIT_KHR set in VkImageCreateInfo::flags" + } + ] + }, + "VkDedicatedAllocationMemoryAllocateInfoNV": { + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649", + "text": " At least one of image and buffer must be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650", + "text": " If image is not VK_NULL_HANDLE, the image must have been created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651", + "text": " If buffer is not VK_NULL_HANDLE, the buffer must have been created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652", + "text": " If image is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the image" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653", + "text": " If buffer is not VK_NULL_HANDLE, VkMemoryAllocateInfo::allocationSize must equal the VkMemoryRequirements::size of the buffer" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-parameter", + "text": " If image is not VK_NULL_HANDLE, image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-parameter", + "text": " If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-commonparent", + "text": " Both of buffer, and image that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_NV_dedicated_allocation)+(VK_KHR_external_memory_win32,VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654", + "text": " If image is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated image allocation and image must be identical to the image associated with the imported memory." + }, + { + "vuid": "VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655", + "text": " If buffer is not VK_NULL_HANDLE and VkMemoryAllocateInfo defines a memory import operation, the memory being imported must also be a dedicated buffer allocation and buffer must be identical to the buffer associated with the imported memory." + } + ] + }, + "VkExportMemoryAllocateInfoKHR": { + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkExportMemoryAllocateInfoKHR-handleTypes-00656", + "text": " The bits in handleTypes must be supported and compatible, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR." + }, + { + "vuid": "VUID-VkExportMemoryAllocateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportMemoryAllocateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportMemoryAllocateInfoKHR-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values" + } + ] + }, + "VkExportMemoryWin32HandleInfoKHR": { + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoKHR-handleTypes-00657", + "text": " If VkExportMemoryAllocateInfoKHR::handleTypes does not include VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, VkExportMemoryWin32HandleInfoKHR must not be in the pNext chain of VkMemoryAllocateInfo." + }, + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoKHR-pAttributes-parameter", + "text": " If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value" + } + ] + }, + "VkImportMemoryWin32HandleInfoKHR": { + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00658", + "text": " If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handle-00659", + "text": " The memory from which handle was exported, or the memory named by name must have been created on the same underlying physical device as device." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00660", + "text": " If handleType is not 0, it must be defined as an NT handle or a global share handle." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01439", + "text": " If handleType is not VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR, or VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR, name must be NULL." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-01440", + "text": " If handleType is not 0 and handle is NULL, name must name a valid memory resource of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-00661", + "text": " If handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handle-01441", + "text": " if handle is not NULL, name must be NULL." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handle-01518", + "text": " If handle is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-name-01519", + "text": " If name is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter", + "text": " If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetMemoryWin32HandleKHR": { + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-vkGetMemoryWin32HandleKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleKHR-pGetWin32HandleInfo-parameter", + "text": " pGetWin32HandleInfo must be a valid pointer to a valid VkMemoryGetWin32HandleInfoKHR structure" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleKHR-pHandle-parameter", + "text": " pHandle must be a valid pointer to a HANDLE value" + } + ] + }, + "VkMemoryGetWin32HandleInfoKHR": { + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00662", + "text": " handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created." + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00663", + "text": " If handleType is defined as an NT handle, vkGetMemoryWin32HandleKHR must be called no more than once for each valid unique combination of memory and handleType." + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-handleType-00664", + "text": " handleType must be defined as an NT handle or a global share handle." + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR" + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-VkMemoryGetWin32HandleInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetMemoryWin32HandlePropertiesKHR": { + "(VK_KHR_external_memory_win32)": [ + { + "vuid": "VUID-vkGetMemoryWin32HandlePropertiesKHR-handle-00665", + "text": " handle must be an external memory handle created outside of the Vulkan API." + }, + { + "vuid": "VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-00666", + "text": " handleType must not be one of the handle types defined as opaque." + }, + { + "vuid": "VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandlePropertiesKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandlePropertiesKHR-pMemoryWin32HandleProperties-parameter", + "text": " pMemoryWin32HandleProperties must be a valid pointer to a VkMemoryWin32HandlePropertiesKHR structure" + } + ] + }, + "VkImportMemoryFdInfoKHR": { + "(VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-handleType-00667", + "text": " If handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatPropertiesKHR or VkExternalBufferPropertiesKHR." + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-handleType-00669", + "text": " If handleType is not 0, it must be defined as a POSIX file descriptor handle." + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-handleType-00670", + "text": " If handleType is not 0, fd must be a valid handle of the type specified by handleType." + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-fd-01746", + "text": " The memory represented by fd must have been created from a physical device and driver that is compatible with device and handleType, as described in &amp;lt;&amp;lt;external-memory-handle-types-compatibility&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-fd-01520", + "text": " fd must obey any requirements listed for handleType in &amp;lt;&amp;lt;external-memory-handle-types-compatibility,external memory handle types compatibility&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportMemoryFdInfoKHR-handleType-parameter", + "text": " If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetMemoryFdKHR": { + "(VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-vkGetMemoryFdKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryFdKHR-pGetFdInfo-parameter", + "text": " pGetFdInfo must be a valid pointer to a valid VkMemoryGetFdInfoKHR structure" + }, + { + "vuid": "VUID-vkGetMemoryFdKHR-pFd-parameter", + "text": " pFd must be a valid pointer to a int value" + } + ] + }, + "VkMemoryGetFdInfoKHR": { + "(VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-handleType-00671", + "text": " handleType must have been included in VkExportMemoryAllocateInfoKHR::handleTypes when memory was created." + }, + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-handleType-00672", + "text": " handleType must be defined as a POSIX file descriptor handle." + }, + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR" + }, + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-VkMemoryGetFdInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetMemoryFdPropertiesKHR": { + "(VK_KHR_external_memory_fd)": [ + { + "vuid": "VUID-vkGetMemoryFdPropertiesKHR-fd-00673", + "text": " fd must be an external memory handle created outside of the Vulkan API." + }, + { + "vuid": "VUID-vkGetMemoryFdPropertiesKHR-handleType-00674", + "text": " handleType must not be VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR." + }, + { + "vuid": "VUID-vkGetMemoryFdPropertiesKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryFdPropertiesKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + }, + { + "vuid": "VUID-vkGetMemoryFdPropertiesKHR-pMemoryFdProperties-parameter", + "text": " pMemoryFdProperties must be a valid pointer to a VkMemoryFdPropertiesKHR structure" + } + ] + }, + "VkImportMemoryHostPointerInfoEXT": { + "(VK_EXT_external_memory_host)": [ + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-handleType-01747", + "text": " If handleType is not 0, it must be supported for import, as reported in VkExternalMemoryPropertiesKHR" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-handleType-01748", + "text": " If handleType is not 0, it must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-01749", + "text": " pHostPointer must be a pointer aligned to an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-handleType-01750", + "text": " If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained to" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-handleType-01751", + "text": " If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host mapped foreign memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained to" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "vkGetMemoryHostPointerPropertiesEXT": { + "(VK_EXT_external_memory_host)": [ + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01752", + "text": " handleType must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-pHostPointer-01753", + "text": " pHostPointer must be a pointer aligned to an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01754", + "text": " If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, pHostPointer must be a pointer to host memory" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01755", + "text": " If handleType is VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, pHostPointer must be a pointer to host mapped foreign memory" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + }, + { + "vuid": "VUID-vkGetMemoryHostPointerPropertiesEXT-pMemoryHostPointerProperties-parameter", + "text": " pMemoryHostPointerProperties must be a valid pointer to a VkMemoryHostPointerPropertiesEXT structure" + } + ] + }, + "VkMemoryHostPointerPropertiesEXT": { + "(VK_EXT_external_memory_host)": [ + { + "vuid": "VUID-VkMemoryHostPointerPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkMemoryHostPointerPropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkExportMemoryAllocateInfoNV": { + "(VK_NV_external_memory)": [ + { + "vuid": "VUID-VkExportMemoryAllocateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV" + }, + { + "vuid": "VUID-VkExportMemoryAllocateInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values" + } + ] + }, + "VkExportMemoryWin32HandleInfoNV": { + "(VK_NV_external_memory_win32)": [ + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV" + }, + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExportMemoryWin32HandleInfoNV-pAttributes-parameter", + "text": " If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value" + } + ] + }, + "VkImportMemoryWin32HandleInfoNV": { + "(VK_NV_external_memory_win32)": [ + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoNV-handleType-01327", + "text": " handleType must not have more than one bit set." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoNV-handle-01328", + "text": " handle must be a valid handle to memory, obtained as specified by handleType." + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV" + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter", + "text": " handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values" + } + ] + }, + "vkGetMemoryWin32HandleNV": { + "(VK_NV_external_memory_win32)": [ + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-handleType-01326", + "text": " handleType must be a flag specified in VkExportMemoryAllocateInfoNV::handleTypes when allocating memory" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-handleType-parameter", + "text": " handleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-handleType-requiredbitmask", + "text": " handleType must not be 0" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-pHandle-parameter", + "text": " pHandle must be a valid pointer to a HANDLE value" + }, + { + "vuid": "VUID-vkGetMemoryWin32HandleNV-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ] + }, + "VkMemoryAllocateFlagsInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00675", + "text": " If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must be a valid device mask." + }, + { + "vuid": "VUID-VkMemoryAllocateFlagsInfoKHX-deviceMask-00676", + "text": " If VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX is set, deviceMask must not be zero" + }, + { + "vuid": "VUID-VkMemoryAllocateFlagsInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX" + }, + { + "vuid": "VUID-VkMemoryAllocateFlagsInfoKHX-flags-parameter", + "text": " flags must be a valid combination of VkMemoryAllocateFlagBitsKHX values" + } + ] + }, + "vkFreeMemory": { + "core": [ + { + "vuid": "VUID-vkFreeMemory-memory-00677", + "text": " All submitted commands that refer to memory (via images or buffers) must have completed execution" + }, + { + "vuid": "VUID-vkFreeMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkFreeMemory-memory-parameter", + "text": " If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkFreeMemory-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkFreeMemory-memory-parent", + "text": " If memory is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkMapMemory": { + "core": [ + { + "vuid": "VUID-vkMapMemory-memory-00678", + "text": " memory must not be currently mapped" + }, + { + "vuid": "VUID-vkMapMemory-offset-00679", + "text": " offset must be less than the size of memory" + }, + { + "vuid": "VUID-vkMapMemory-size-00680", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be greater than 0" + }, + { + "vuid": "VUID-vkMapMemory-size-00681", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to the size of the memory minus offset" + }, + { + "vuid": "VUID-vkMapMemory-memory-00682", + "text": " memory must have been created with a memory type that reports VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT" + }, + { + "vuid": "VUID-vkMapMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkMapMemory-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkMapMemory-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-vkMapMemory-ppData-parameter", + "text": " ppData must be a valid pointer to a pointer value" + }, + { + "vuid": "VUID-vkMapMemory-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkMapMemory-memory-00683", + "text": " memory must not have been allocated with multiple instances." + } + ] + }, + "vkFlushMappedMemoryRanges": { + "core": [ + { + "vuid": "VUID-vkFlushMappedMemoryRanges-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkFlushMappedMemoryRanges-pMemoryRanges-parameter", + "text": " pMemoryRanges must be a valid pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures" + }, + { + "vuid": "VUID-vkFlushMappedMemoryRanges-memoryRangeCount-arraylength", + "text": " memoryRangeCount must be greater than 0" + } + ] + }, + "vkInvalidateMappedMemoryRanges": { + "core": [ + { + "vuid": "VUID-vkInvalidateMappedMemoryRanges-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkInvalidateMappedMemoryRanges-pMemoryRanges-parameter", + "text": " pMemoryRanges must be a valid pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures" + }, + { + "vuid": "VUID-vkInvalidateMappedMemoryRanges-memoryRangeCount-arraylength", + "text": " memoryRangeCount must be greater than 0" + } + ] + }, + "VkMappedMemoryRange": { + "core": [ + { + "vuid": "VUID-VkMappedMemoryRange-memory-00684", + "text": " memory must be currently mapped" + }, + { + "vuid": "VUID-VkMappedMemoryRange-size-00685", + "text": " If size is not equal to VK_WHOLE_SIZE, offset and size must specify a range contained within the currently mapped range of memory" + }, + { + "vuid": "VUID-VkMappedMemoryRange-size-00686", + "text": " If size is equal to VK_WHOLE_SIZE, offset must be within the currently mapped range of memory" + }, + { + "vuid": "VUID-VkMappedMemoryRange-size-01389", + "text": " If size is equal to VK_WHOLE_SIZE, the end of the current mapping of memory must be a multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize bytes from the beginning of the memory object." + }, + { + "vuid": "VUID-VkMappedMemoryRange-offset-00687", + "text": " offset must be a multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize" + }, + { + "vuid": "VUID-VkMappedMemoryRange-size-01390", + "text": " If size is not equal to VK_WHOLE_SIZE, size must either be a multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize, or offset plus size must equal the size of memory." + }, + { + "vuid": "VUID-VkMappedMemoryRange-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE" + }, + { + "vuid": "VUID-VkMappedMemoryRange-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMappedMemoryRange-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + } + ] + }, + "vkUnmapMemory": { + "core": [ + { + "vuid": "VUID-vkUnmapMemory-memory-00689", + "text": " memory must be currently mapped" + }, + { + "vuid": "VUID-vkUnmapMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkUnmapMemory-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkUnmapMemory-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetDeviceMemoryCommitment": { + "core": [ + { + "vuid": "VUID-vkGetDeviceMemoryCommitment-memory-00690", + "text": " memory must have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT" + }, + { + "vuid": "VUID-vkGetDeviceMemoryCommitment-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceMemoryCommitment-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkGetDeviceMemoryCommitment-pCommittedMemoryInBytes-parameter", + "text": " pCommittedMemoryInBytes must be a valid pointer to a VkDeviceSize value" + }, + { + "vuid": "VUID-vkGetDeviceMemoryCommitment-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetDeviceGroupPeerMemoryFeaturesKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-heapIndex-00691", + "text": " heapIndex must be less than memoryHeapCount" + }, + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00692", + "text": " localDeviceIndex must be a valid device index" + }, + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-remoteDeviceIndex-00693", + "text": " remoteDeviceIndex must be a valid device index" + }, + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-localDeviceIndex-00694", + "text": " localDeviceIndex must not equal remoteDeviceIndex" + }, + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceGroupPeerMemoryFeaturesKHX-pPeerMemoryFeatures-parameter", + "text": " pPeerMemoryFeatures must be a valid pointer to a VkPeerMemoryFeatureFlagsKHX value" + } + ] + }, + "vkCreateBuffer": { + "core": [ + { + "vuid": "VUID-vkCreateBuffer-flags-00911", + "text": " If the flags member of pCreateInfo includes VK_BUFFER_CREATE_SPARSE_BINDING_BIT, creating this VkBuffer must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed VkPhysicalDeviceLimits::sparseAddressSpaceSize" + }, + { + "vuid": "VUID-vkCreateBuffer-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateBuffer-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkBufferCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateBuffer-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateBuffer-pBuffer-parameter", + "text": " pBuffer must be a valid pointer to a VkBuffer handle" + } + ] + }, + "VkBufferCreateInfo": { + "core": [ + { + "vuid": "VUID-VkBufferCreateInfo-size-00912", + "text": " size must be greater than 0" + }, + { + "vuid": "VUID-VkBufferCreateInfo-sharingMode-00913", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values" + }, + { + "vuid": "VUID-VkBufferCreateInfo-sharingMode-00914", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1" + }, + { + "vuid": "VUID-VkBufferCreateInfo-flags-00915", + "text": " If the &amp;lt;&amp;lt;features-features-sparseBinding,sparse bindings&amp;gt;&amp;gt; feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT" + }, + { + "vuid": "VUID-VkBufferCreateInfo-flags-00916", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidencyBuffer,sparse buffer residency&amp;gt;&amp;gt; feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkBufferCreateInfo-flags-00917", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidencyAliased,sparse aliased residency&amp;gt;&amp;gt; feature is not enabled, flags must not contain VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" + }, + { + "vuid": "VUID-VkBufferCreateInfo-flags-00918", + "text": " If flags contains VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_BUFFER_CREATE_SPARSE_BINDING_BIT" + }, + { + "vuid": "VUID-VkBufferCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO" + }, + { + "vuid": "VUID-VkBufferCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationBufferCreateInfoNV or VkExternalMemoryBufferCreateInfoKHR" + }, + { + "vuid": "VUID-VkBufferCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkBufferCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkBufferCreateFlagBits values" + }, + { + "vuid": "VUID-VkBufferCreateInfo-usage-parameter", + "text": " usage must be a valid combination of VkBufferUsageFlagBits values" + }, + { + "vuid": "VUID-VkBufferCreateInfo-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-VkBufferCreateInfo-sharingMode-parameter", + "text": " sharingMode must be a valid VkSharingMode value" + } + ], + "!(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkBufferCreateInfo-sharingMode-01391", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkBufferCreateInfo-sharingMode-01419", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkBufferCreateInfo-pNext-00920", + "text": " If the pNext chain contains an instance of VkExternalMemoryBufferCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalBufferPropertiesKHR::externalMemoryProperties.compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalBufferPropertiesKHR with pExternalBufferInfo\\-&amp;gt;handleType equal to any one of the handle types specified in VkExternalMemoryBufferCreateInfoKHR::handleTypes" + } + ], + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkBufferCreateInfo-pNext-01571", + "text": " If the pNext chain contains an instance of VkDedicatedAllocationBufferCreateInfoNV, and the dedicatedAllocation member of the chained structure is VK_TRUE, then flags must not include VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" + } + ] + }, + "VkDedicatedAllocationBufferCreateInfoNV": { + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV" + } + ] + }, + "VkExternalMemoryBufferCreateInfoKHR": { + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkExternalMemoryBufferCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkExternalMemoryBufferCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExternalMemoryBufferCreateInfoKHR-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values" + } + ] + }, + "vkDestroyBuffer": { + "core": [ + { + "vuid": "VUID-vkDestroyBuffer-buffer-00922", + "text": " All submitted commands that refer to buffer, either directly or via a VkBufferView, must have completed execution" + }, + { + "vuid": "VUID-vkDestroyBuffer-buffer-00923", + "text": " If VkAllocationCallbacks were provided when buffer was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyBuffer-buffer-00924", + "text": " If no VkAllocationCallbacks were provided when buffer was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyBuffer-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyBuffer-buffer-parameter", + "text": " If buffer is not VK_NULL_HANDLE, buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkDestroyBuffer-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyBuffer-buffer-parent", + "text": " If buffer is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateBufferView": { + "core": [ + { + "vuid": "VUID-vkCreateBufferView-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateBufferView-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkBufferViewCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateBufferView-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateBufferView-pView-parameter", + "text": " pView must be a valid pointer to a VkBufferView handle" + } + ] + }, + "VkBufferViewCreateInfo": { + "core": [ + { + "vuid": "VUID-VkBufferViewCreateInfo-offset-00925", + "text": " offset must be less than the size of buffer" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-offset-00926", + "text": " offset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-range-00928", + "text": " If range is not equal to VK_WHOLE_SIZE, range must be greater than 0" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-range-00929", + "text": " If range is not equal to VK_WHOLE_SIZE, range must be a multiple of the element size of format" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-range-00930", + "text": " If range is not equal to VK_WHOLE_SIZE, range divided by the element size of format must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElements" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-offset-00931", + "text": " If range is not equal to VK_WHOLE_SIZE, the sum of offset and range must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-buffer-00932", + "text": " buffer must have been created with a usage value containing at least one of VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-buffer-00933", + "text": " If buffer was created with usage containing VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, format must be supported for uniform texel buffers, as specified by the VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-buffer-00934", + "text": " If buffer was created with usage containing VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, format must be supported for storage texel buffers, as specified by the VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-buffer-00935", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkBufferViewCreateInfo-format-parameter", + "text": " format must be a valid VkFormat value" + } + ] + }, + "vkDestroyBufferView": { + "core": [ + { + "vuid": "VUID-vkDestroyBufferView-bufferView-00936", + "text": " All submitted commands that refer to bufferView must have completed execution" + }, + { + "vuid": "VUID-vkDestroyBufferView-bufferView-00937", + "text": " If VkAllocationCallbacks were provided when bufferView was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyBufferView-bufferView-00938", + "text": " If no VkAllocationCallbacks were provided when bufferView was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyBufferView-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyBufferView-bufferView-parameter", + "text": " If bufferView is not VK_NULL_HANDLE, bufferView must be a valid VkBufferView handle" + }, + { + "vuid": "VUID-vkDestroyBufferView-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyBufferView-bufferView-parent", + "text": " If bufferView is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateImage": { + "core": [ + { + "vuid": "VUID-vkCreateImage-flags-00939", + "text": " If the flags member of pCreateInfo includes VK_IMAGE_CREATE_SPARSE_BINDING_BIT, creating this VkImage must not cause the total required sparse memory for all currently valid sparse resources on the device to exceed VkPhysicalDeviceLimits::sparseAddressSpaceSize" + }, + { + "vuid": "VUID-vkCreateImage-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateImage-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkImageCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateImage-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateImage-pImage-parameter", + "text": " pImage must be a valid pointer to a VkImage handle" + } + ] + }, + "VkImageCreateInfo": { + "core": [ + { + "vuid": "VUID-VkImageCreateInfo-format-00940", + "text": " The combination of format, imageType, tiling, usage, and flags must be supported, as indicated by a VK_SUCCESS return value from vkGetPhysicalDeviceImageFormatProperties invoked with the same values passed to the corresponding parameters." + }, + { + "vuid": "VUID-VkImageCreateInfo-sharingMode-00941", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values" + }, + { + "vuid": "VUID-VkImageCreateInfo-sharingMode-00942", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1" + }, + { + "vuid": "VUID-VkImageCreateInfo-format-00943", + "text": " format must not be VK_FORMAT_UNDEFINED" + }, + { + "vuid": "VUID-VkImageCreateInfo-extent-00944", + "text": " extent::width must be greater than 0." + }, + { + "vuid": "VUID-VkImageCreateInfo-extent-00945", + "text": " extent::height must be greater than 0." + }, + { + "vuid": "VUID-VkImageCreateInfo-extent-00946", + "text": " extent::depth must be greater than 0." + }, + { + "vuid": "VUID-VkImageCreateInfo-mipLevels-00947", + "text": " mipLevels must be greater than 0" + }, + { + "vuid": "VUID-VkImageCreateInfo-arrayLayers-00948", + "text": " arrayLayers must be greater than 0" + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-00949", + "text": " If flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, imageType must be VK_IMAGE_TYPE_2D" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00951", + "text": " If imageType is VK_IMAGE_TYPE_1D, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension1D, or VkImageFormatProperties::maxExtent.width (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00952", + "text": " If imageType is VK_IMAGE_TYPE_2D and flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension2D, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00953", + "text": " If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be less than or equal to VkPhysicalDeviceLimits::maxImageDimensionCube, or VkImageFormatProperties::maxExtent.width/height (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00954", + "text": " If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00955", + "text": " If imageType is VK_IMAGE_TYPE_3D, extent.width, extent.height and extent.depth must be less than or equal to VkPhysicalDeviceLimits::maxImageDimension3D, or VkImageFormatProperties::maxExtent.width/height/depth (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure) - whichever is higher" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00956", + "text": " If imageType is VK_IMAGE_TYPE_1D, both extent.height and extent.depth must be 1" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00957", + "text": " If imageType is VK_IMAGE_TYPE_2D, extent.depth must be 1" + }, + { + "vuid": "VUID-VkImageCreateInfo-mipLevels-00958", + "text": " mipLevels must be less than or equal to {lfloor}log2(max(extent.width, extent.height, extent.depth)){rfloor} + 1." + }, + { + "vuid": "VUID-VkImageCreateInfo-extent-00959", + "text": " mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)" + }, + { + "vuid": "VUID-VkImageCreateInfo-arrayLayers-00960", + "text": " arrayLayers must be less than or equal to VkImageFormatProperties::maxArrayLayers (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00961", + "text": " If imageType is VK_IMAGE_TYPE_3D, arrayLayers must be 1." + }, + { + "vuid": "VUID-VkImageCreateInfo-samples-00962", + "text": " If samples is not VK_SAMPLE_COUNT_1_BIT, imageType must be VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, tiling must be VK_IMAGE_TILING_OPTIMAL, and mipLevels must be equal to 1" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-00963", + "text": " If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other than VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT must not be set" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-00964", + "text": " If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.width must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferWidth" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-00965", + "text": " If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, extent.height must be less than or equal to VkPhysicalDeviceLimits::maxFramebufferHeight" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-00966", + "text": " If usage includes VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, usage must also contain at least one of VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT." + }, + { + "vuid": "VUID-VkImageCreateInfo-samples-00967", + "text": " samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-00968", + "text": " If the &amp;lt;&amp;lt;features-features-shaderStorageImageMultisample,multisampled storage images&amp;gt;&amp;gt; feature is not enabled, and usage contains VK_IMAGE_USAGE_STORAGE_BIT, samples must be VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-00969", + "text": " If the &amp;lt;&amp;lt;features-features-sparseBinding,sparse bindings&amp;gt;&amp;gt; feature is not enabled, flags must not contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00970", + "text": " If imageType is VK_IMAGE_TYPE_1D, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00971", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidencyImage2D,sparse residency for 2D images&amp;gt;&amp;gt; feature is not enabled, and imageType is VK_IMAGE_TYPE_2D, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00972", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidencyImage3D,sparse residency for 3D images&amp;gt;&amp;gt; feature is not enabled, and imageType is VK_IMAGE_TYPE_3D, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00973", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidency2Samples,sparse residency for images with 2 samples&amp;gt;&amp;gt; feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_2_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00974", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidency4Samples,sparse residency for images with 4 samples&amp;gt;&amp;gt; feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_4_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00975", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidency8Samples,sparse residency for images with 8 samples&amp;gt;&amp;gt; feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_8_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-00976", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidency16Samples,sparse residency for images with 16 samples&amp;gt;&amp;gt; feature is not enabled, imageType is VK_IMAGE_TYPE_2D, and samples is VK_SAMPLE_COUNT_16_BIT, flags must not contain VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00977", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00978", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00979", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00980", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00981", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00982", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, format must be a format that has at least one supported feature bit present in the value of VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00983", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_SAMPLED_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00984", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00985", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-00986", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, usage must not contain VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-00987", + "text": " If flags contains VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must also contain VK_IMAGE_CREATE_SPARSE_BINDING_BIT" + }, + { + "vuid": "VUID-VkImageCreateInfo-initialLayout-00993", + "text": " initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED." + }, + { + "vuid": "VUID-VkImageCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO" + }, + { + "vuid": "VUID-VkImageCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationImageCreateInfoNV, VkExternalMemoryImageCreateInfoKHR, VkExternalMemoryImageCreateInfoNV, VkImageFormatListCreateInfoKHR, or VkImageSwapchainCreateInfoKHX" + }, + { + "vuid": "VUID-VkImageCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkImageCreateFlagBits values" + }, + { + "vuid": "VUID-VkImageCreateInfo-imageType-parameter", + "text": " imageType must be a valid VkImageType value" + }, + { + "vuid": "VUID-VkImageCreateInfo-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkImageCreateInfo-samples-parameter", + "text": " samples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-VkImageCreateInfo-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-VkImageCreateInfo-sharingMode-parameter", + "text": " sharingMode must be a valid VkSharingMode value" + }, + { + "vuid": "VUID-VkImageCreateInfo-initialLayout-parameter", + "text": " initialLayout must be a valid VkImageLayout value" + } + ], + "!(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkImageCreateInfo-sharingMode-01392", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkImageCreateInfo-sharingMode-01420", + "text": " If sharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkImageCreateInfo-flags-00950", + "text": " If flags contains VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, imageType must be VK_IMAGE_TYPE_3D" + } + ], + "(VK_NV_external_memory+VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkImageCreateInfo-pNext-00988", + "text": " If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, it must not contain an instance of VkExternalMemoryImageCreateInfoKHR." + } + ], + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkImageCreateInfo-pNext-00990", + "text": " If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoKHR, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesKHR::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceImageFormatProperties2KHR with format, imageType, tiling, usage, and flags equal to those in this structure, and with an instance of VkPhysicalDeviceExternalImageFormatInfoKHR in the pNext chain, with a handleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoKHR::handleTypes" + } + ], + "(VK_NV_external_memory+VK_NV_external_memory_capabilities)": [ + { + "vuid": "VUID-VkImageCreateInfo-pNext-00991", + "text": " If the pNext chain contains an instance of VkExternalMemoryImageCreateInfoNV, its handleTypes member must only contain bits that are also in VkExternalImageFormatPropertiesNV::externalMemoryProperties::compatibleHandleTypes, as returned by vkGetPhysicalDeviceExternalImageFormatPropertiesNV with format, imageType, tiling, usage, and flags equal to those in this structure, and with externalHandleType equal to any one of the handle types specified in VkExternalMemoryImageCreateInfoNV::handleTypes" + } + ], + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkImageCreateInfo-physicalDeviceCount-01421", + "text": " If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_IMAGE_CREATE_BIND_SFR_BIT_KHX" + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-00992", + "text": " If flags contains VK_IMAGE_CREATE_BIND_SFR_BIT_KHX, then mipLevels must be one, arrayLayers must be one, imageType must be VK_IMAGE_TYPE_2D, and tiling must be VK_IMAGE_TILING_OPTIMAL" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkImageCreateInfo-flags-01572", + "text": " If flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, then format must be a &amp;lt;&amp;lt;appendix-compressedtex-bc,block-compressed image format&amp;gt;&amp;gt;, an &amp;lt;&amp;lt;appendix-compressedtex-etc2, ETC compressed image format&amp;gt;&amp;gt;, or an &amp;lt;&amp;lt;appendix-compressedtex-astc, ASTC compressed image format&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkImageCreateInfo-flags-01573", + "text": " If flags contains VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, then flags must also contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT." + } + ], + "(VK_KHR_external_memory,VK_NV_external_memory)": [ + { + "vuid": "VUID-VkImageCreateInfo-pNext-01443", + "text": " If the pNext chain includes a ifdef::VK_KHR_external_memory[VkExternalMemoryImageCreateInfoKHR] ifdef::VK_KHR_external_memory+VK_NV_external_memory[or] ifdef::VK_NV_external_memory[VkExternalMemoryImageCreateInfoNV] structure whose handleTypes member is not 0, initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageCreateInfo-format-01574", + "text": " If the image format is one of those listed in &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion&amp;gt;&amp;gt;:" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-01575", + "text": " If tiling is VK_IMAGE_TILING_OPTIMAL, format is a multi-planar format, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCreateInfo-tiling-01576", + "text": " If tiling is VK_IMAGE_TILING_LINEAR, format is a multi-planar format, and VkFormatProperties::linearTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCreateInfo-format-01577", + "text": " If format is not a multi-planar format, and flags does not include VK_IMAGE_CREATE_ALIAS_BIT_KHR, flags must not contain VK_IMAGE_CREATE_DISJOINT_BIT_KHR" + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkImageCreateInfo-flags-01533", + "text": " If flags contains VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT format must be a depth or depth/stencil format" + } + ] + }, + "VkDedicatedAllocationImageCreateInfoNV": { + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkDedicatedAllocationImageCreateInfoNV-dedicatedAllocation-00994", + "text": " If dedicatedAllocation is VK_TRUE, VkImageCreateInfo::flags must not include VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT" + }, + { + "vuid": "VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV" + } + ] + }, + "VkExternalMemoryImageCreateInfoKHR": { + "(VK_KHR_external_memory)": [ + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsKHR values" + }, + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoKHR-handleTypes-requiredbitmask", + "text": " handleTypes must not be 0" + } + ] + }, + "VkExternalMemoryImageCreateInfoNV": { + "(VK_NV_external_memory)": [ + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV" + }, + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter", + "text": " handleTypes must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values" + } + ] + }, + "VkImageSwapchainCreateInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkImageSwapchainCreateInfoKHX-swapchain-00995", + "text": " If swapchain is not VK_NULL_HANDLE, the fields of VkImageCreateInfo must match the &amp;lt;&amp;lt;swapchain-wsi-image-create-info, implied image creation parameters&amp;gt;&amp;gt; of the swapchain" + }, + { + "vuid": "VUID-VkImageSwapchainCreateInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX" + }, + { + "vuid": "VUID-VkImageSwapchainCreateInfoKHX-swapchain-parameter", + "text": " If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle" + } + ] + }, + "VkImageFormatListCreateInfoKHR": { + "(VK_KHR_image_format_list)": [ + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01578", + "text": " If viewFormatCount is not 0, all of the formats in the pViewFormats array must be compatible with the format specified in the format field of VkImageCreateInfo, as described in the compatibility table." + }, + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-flags-01579", + "text": " If VkImageCreateInfo::flags does not contain VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, viewFormatCount must be 0 or 1." + }, + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-viewFormatCount-01580", + "text": " If viewFormatCount is not 0, VkImageCreateInfo::format must be in pViewFormats." + }, + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImageFormatListCreateInfoKHR-pViewFormats-parameter", + "text": " If viewFormatCount is not 0, pViewFormats must be a valid pointer to an array of viewFormatCount valid VkFormat values" + } + ] + }, + "vkGetImageSubresourceLayout": { + "core": [ + { + "vuid": "VUID-vkGetImageSubresourceLayout-image-00996", + "text": " image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-aspectMask-00997", + "text": " The aspectMask member of pSubresource must only have a single bit set" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-mipLevel-01716", + "text": " The mipLevel member of pSubresource must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-arrayLayer-01717", + "text": " The arrayLayer member of pSubresource must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-pSubresource-parameter", + "text": " pSubresource must be a valid pointer to a valid VkImageSubresource structure" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-pLayout-parameter", + "text": " pLayout must be a valid pointer to a VkSubresourceLayout structure" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-image-parent", + "text": " image must have been created, allocated, or retrieved from device" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkGetImageSubresourceLayout-format-01581", + "text": " If the format of image is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt; with two planes, the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR" + }, + { + "vuid": "VUID-vkGetImageSubresourceLayout-format-01582", + "text": " If the format of image is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt; with three planes, the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + } + ] + }, + "VkImageSubresource": { + "core": [ + { + "vuid": "VUID-VkImageSubresource-aspectMask-parameter", + "text": " aspectMask must be a valid combination of VkImageAspectFlagBits values" + }, + { + "vuid": "VUID-VkImageSubresource-aspectMask-requiredbitmask", + "text": " aspectMask must not be 0" + } + ] + }, + "vkDestroyImage": { + "core": [ + { + "vuid": "VUID-vkDestroyImage-image-01000", + "text": " All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution" + }, + { + "vuid": "VUID-vkDestroyImage-image-01001", + "text": " If VkAllocationCallbacks were provided when image was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyImage-image-01002", + "text": " If no VkAllocationCallbacks were provided when image was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyImage-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyImage-image-parameter", + "text": " If image is not VK_NULL_HANDLE, image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkDestroyImage-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyImage-image-parent", + "text": " If image is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateImageView": { + "core": [ + { + "vuid": "VUID-vkCreateImageView-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateImageView-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkImageViewCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateImageView-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateImageView-pView-parameter", + "text": " pView must be a valid pointer to a VkImageView handle" + } + ] + }, + "VkImageViewCreateInfo": { + "core": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01003", + "text": " If image was not created with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then viewType must not be VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-viewType-01004", + "text": " If the &amp;lt;&amp;lt;features-features-imageCubeArray,image cubemap arrays&amp;gt;&amp;gt; feature is not enabled, viewType must not be VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01006", + "text": " If image was created with VK_IMAGE_TILING_LINEAR, format must be format that has at least one supported feature bit present in the value of VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01007", + "text": " image must have been created with a usage value containing at least one of VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01008", + "text": " If image was created with VK_IMAGE_TILING_LINEAR and usage contains VK_IMAGE_USAGE_SAMPLED_BIT, format must be supported for sampled images, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01009", + "text": " If image was created with VK_IMAGE_TILING_LINEAR and usage contains VK_IMAGE_USAGE_STORAGE_BIT, format must be supported for storage images, as specified by the VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01010", + "text": " If image was created with VK_IMAGE_TILING_LINEAR and usage contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, format must be supported for color attachments, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01011", + "text": " If image was created with VK_IMAGE_TILING_LINEAR and usage contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, format must be supported for depth/stencil attachments, as specified by the VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01012", + "text": " If image was created with VK_IMAGE_TILING_OPTIMAL, format must be format that has at least one supported feature bit present in the value of VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01013", + "text": " If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_SAMPLED_BIT, format must be supported for sampled images, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01014", + "text": " If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_STORAGE_BIT, format must be supported for storage images, as specified by the VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01015", + "text": " If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, format must be supported for color attachments, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01016", + "text": " If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, format must be supported for depth/stencil attachments, as specified by the VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01478", + "text": " subresourceRange.baseMipLevel must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01718", + "text": " If subresourceRange.levelCount is not VK_REMAINING_MIP_LEVELS, subresourceRange.baseMipLevel + subresourceRange.levelCount must be less than or equal to the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01018", + "text": " If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, format must be compatible with the format used to create image, as defined in &amp;lt;&amp;lt;features-formats-compatibility-classes,Format Compatibility Classes&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01020", + "text": " If image is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subResourceRange-01021", + "text": " subresourceRange and viewType must be compatible with the image, as described in the &amp;lt;&amp;lt;resources-image-views-compatibility,compatibility table&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkImageViewUsageCreateInfoKHR or VkSamplerYcbcrConversionInfoKHR" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-viewType-parameter", + "text": " viewType must be a valid VkImageViewType value" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-components-parameter", + "text": " components must be a valid VkComponentMapping structure" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-parameter", + "text": " subresourceRange must be a valid VkImageSubresourceRange structure" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01005", + "text": " If image was created with VK_IMAGE_TYPE_3D but without VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set then viewType must not be VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01482", + "text": " If image is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, or viewType is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01483", + "text": " If subresourceRange::layerCount is not VK_REMAINING_ARRAY_LAYERS, image is not a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, or viewType is not VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::layerCount must be non-zero and subresourceRange::baseArrayLayer + subresourceRange::layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01484", + "text": " If image is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, and viewType is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::baseArrayLayer must be less than the extent.depth specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01485", + "text": " If subresourceRange::layerCount is not VK_REMAINING_ARRAY_LAYERS, image is a 3D image created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR set, and viewType is VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY, subresourceRange::layerCount must be non-zero and subresourceRange::baseArrayLayer + subresourceRange::layerCount must be less than or equal to the extent.depth specified in VkImageCreateInfo when image was created" + } + ], + "!(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01480", + "text": " subresourceRange.baseArrayLayer must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-subresourceRange-01719", + "text": " If subresourceRange.layerCount is not VK_REMAINING_ARRAY_LAYERS, subresourceRange.baseArrayLayer + subresourceRange.layerCount must be less than or equal to the arrayLayers specified in VkImageCreateInfo when image was created" + } + ], + "(VK_KHR_maintenance2)+!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01759", + "text": " If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, format must be compatible with the format used to create image, as defined in &amp;lt;&amp;lt;features-formats-compatibility-classes,Format Compatibility Classes&amp;gt;&amp;gt;" + } + ], + "!(VK_KHR_maintenance2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01760", + "text": " If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the format of the image is not a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar&amp;gt;&amp;gt; format, format must be compatible with the format used to create image, as defined in &amp;lt;&amp;lt;features-formats-compatibility-classes,Format Compatibility Classes&amp;gt;&amp;gt;" + } + ], + "(VK_KHR_maintenance2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01761", + "text": " If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, and if the format of the image is not a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar&amp;gt;&amp;gt; format, format must be compatible with the format used to create image, as defined in &amp;lt;&amp;lt;features-formats-compatibility-classes,Format Compatibility Classes&amp;gt;&amp;gt;" + } + ], + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01583", + "text": " If image was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, format must be compatible with, or must be an uncompressed format that is size-compatible with, the format used to create image." + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01584", + "text": " If image was created with the VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, the levelCount and layerCount members of subresourceRange must both be 1." + } + ], + "(VK_KHR_image_format_list)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-pNext-01585", + "text": " If a VkImageFormatListCreateInfoKHR structure was included in the pNext chain of the VkImageCreateInfo struct used when creating image and the viewFormatCount field of VkImageFormatListCreateInfoKHR is not zero then format must be one of the formats in VkImageFormatListCreateInfoKHR::pViewFormats." + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01586", + "text": " If image was created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the format of the image is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar&amp;gt;&amp;gt; format, and if subresourceRange.aspectMask is one of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR, then format must be compatible with the VkFormat for the plane of the image format indicated by subresourceRange.aspectMask, as defined in &amp;lt;&amp;lt;features-formats-compatible-planes&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkImageViewCreateInfo-image-01762", + "text": " If image was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag," + } + ], + "!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageViewCreateInfo-image-01019", + "text": " If image was not created with the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, format must be identical to the format used to create image" + } + ] + }, + "VkImageViewUsageCreateInfoKHR": { + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkImageViewUsageCreateInfoKHR-usage-01587", + "text": " usage must not include any set bits that were not set in the usage member of the VkImageCreateInfo structure used to create the image this image view is created from." + }, + { + "vuid": "VUID-VkImageViewUsageCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkImageViewUsageCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkImageViewUsageCreateInfoKHR-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-VkImageViewUsageCreateInfoKHR-usage-requiredbitmask", + "text": " usage must not be 0" + } + ] + }, + "VkImageSubresourceRange": { + "core": [ + { + "vuid": "VUID-VkImageSubresourceRange-levelCount-01720", + "text": " If levelCount is not VK_REMAINING_MIP_LEVELS, it must be greater than 0" + }, + { + "vuid": "VUID-VkImageSubresourceRange-layerCount-01721", + "text": " If layerCount is not VK_REMAINING_ARRAY_LAYERS, it must be greater than 0" + }, + { + "vuid": "VUID-VkImageSubresourceRange-aspectMask-parameter", + "text": " aspectMask must be a valid combination of VkImageAspectFlagBits values" + }, + { + "vuid": "VUID-VkImageSubresourceRange-aspectMask-requiredbitmask", + "text": " aspectMask must not be 0" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageSubresourceRange-aspectMask-01670", + "text": " If aspectMask includes VK_IMAGE_ASPECT_COLOR_BIT, then it must not include any of VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + } + ] + }, + "VkComponentMapping": { + "core": [ + { + "vuid": "VUID-VkComponentMapping-r-parameter", + "text": " r must be a valid VkComponentSwizzle value" + }, + { + "vuid": "VUID-VkComponentMapping-g-parameter", + "text": " g must be a valid VkComponentSwizzle value" + }, + { + "vuid": "VUID-VkComponentMapping-b-parameter", + "text": " b must be a valid VkComponentSwizzle value" + }, + { + "vuid": "VUID-VkComponentMapping-a-parameter", + "text": " a must be a valid VkComponentSwizzle value" + } + ] + }, + "vkDestroyImageView": { + "core": [ + { + "vuid": "VUID-vkDestroyImageView-imageView-01026", + "text": " All submitted commands that refer to imageView must have completed execution" + }, + { + "vuid": "VUID-vkDestroyImageView-imageView-01027", + "text": " If VkAllocationCallbacks were provided when imageView was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyImageView-imageView-01028", + "text": " If no VkAllocationCallbacks were provided when imageView was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyImageView-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyImageView-imageView-parameter", + "text": " If imageView is not VK_NULL_HANDLE, imageView must be a valid VkImageView handle" + }, + { + "vuid": "VUID-vkDestroyImageView-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyImageView-imageView-parent", + "text": " If imageView is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetBufferMemoryRequirements": { + "core": [ + { + "vuid": "VUID-vkGetBufferMemoryRequirements-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetBufferMemoryRequirements-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkGetBufferMemoryRequirements-pMemoryRequirements-parameter", + "text": " pMemoryRequirements must be a valid pointer to a VkMemoryRequirements structure" + }, + { + "vuid": "VUID-vkGetBufferMemoryRequirements-buffer-parent", + "text": " buffer must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetImageMemoryRequirements": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkGetImageMemoryRequirements-image-01588", + "text": " image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag set" + } + ], + "core": [ + { + "vuid": "VUID-vkGetImageMemoryRequirements-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetImageMemoryRequirements-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkGetImageMemoryRequirements-pMemoryRequirements-parameter", + "text": " pMemoryRequirements must be a valid pointer to a VkMemoryRequirements structure" + }, + { + "vuid": "VUID-vkGetImageMemoryRequirements-image-parent", + "text": " image must have been created, allocated, or retrieved from device" + } + ] + }, + "vkGetBufferMemoryRequirements2KHR": { + "(VK_KHR_get_memory_requirements2)": [ + { + "vuid": "VUID-vkGetBufferMemoryRequirements2KHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetBufferMemoryRequirements2KHR-pInfo-parameter", + "text": " pInfo must be a valid pointer to a valid VkBufferMemoryRequirementsInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetBufferMemoryRequirements2KHR-pMemoryRequirements-parameter", + "text": " pMemoryRequirements must be a valid pointer to a VkMemoryRequirements2KHR structure" + } + ] + }, + "VkBufferMemoryRequirementsInfo2KHR": { + "(VK_KHR_get_memory_requirements2)": [ + { + "vuid": "VUID-VkBufferMemoryRequirementsInfo2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR" + }, + { + "vuid": "VUID-VkBufferMemoryRequirementsInfo2KHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkBufferMemoryRequirementsInfo2KHR-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + } + ] + }, + "vkGetImageMemoryRequirements2KHR": { + "(VK_KHR_get_memory_requirements2)": [ + { + "vuid": "VUID-vkGetImageMemoryRequirements2KHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetImageMemoryRequirements2KHR-pInfo-parameter", + "text": " pInfo must be a valid pointer to a valid VkImageMemoryRequirementsInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetImageMemoryRequirements2KHR-pMemoryRequirements-parameter", + "text": " pMemoryRequirements must be a valid pointer to a VkMemoryRequirements2KHR structure" + } + ] + }, + "VkImageMemoryRequirementsInfo2KHR": { + "(VK_KHR_get_memory_requirements2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-image-01589", + "text": " If image was created with a multi-planar format and the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure" + }, + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-image-01590", + "text": " If image was not created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR flag, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure" + }, + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-image-01591", + "text": " If image was created with a single-plane format, there must not be a VkImagePlaneMemoryRequirementsInfoKHR in the pNext chain of the VkImageMemoryRequirementsInfo2KHR structure" + } + ], + "(VK_KHR_get_memory_requirements2)": [ + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR" + }, + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkImagePlaneMemoryRequirementsInfoKHR" + }, + { + "vuid": "VUID-VkImageMemoryRequirementsInfo2KHR-image-parameter", + "text": " image must be a valid VkImage handle" + } + ] + }, + "VkImagePlaneMemoryRequirementsInfoKHR": { + "(VK_KHR_get_memory_requirements2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-01592", + "text": " planeAspect must be an aspect that exists in the format; that is, for a two-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, and for a three-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + }, + { + "vuid": "VUID-VkImagePlaneMemoryRequirementsInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR" + }, + { + "vuid": "VUID-VkImagePlaneMemoryRequirementsInfoKHR-planeAspect-parameter", + "text": " planeAspect must be a valid VkImageAspectFlagBits value" + } + ] + }, + "VkMemoryRequirements2KHR": { + "(VK_KHR_get_memory_requirements2)": [ + { + "vuid": "VUID-VkMemoryRequirements2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR" + }, + { + "vuid": "VUID-VkMemoryRequirements2KHR-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkMemoryDedicatedRequirementsKHR" + } + ] + }, + "VkMemoryDedicatedRequirementsKHR": { + "(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkMemoryDedicatedRequirementsKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR" + }, + { + "vuid": "VUID-VkMemoryDedicatedRequirementsKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkBindBufferMemory": { + "core": [ + { + "vuid": "VUID-vkBindBufferMemory-buffer-01029", + "text": " buffer must not already be backed by a memory object" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-01030", + "text": " buffer must not have been created with any sparse memory binding flags" + }, + { + "vuid": "VUID-vkBindBufferMemory-memoryOffset-01031", + "text": " memoryOffset must be less than the size of memory" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-01032", + "text": " If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-01033", + "text": " If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-01034", + "text": " If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment" + }, + { + "vuid": "VUID-vkBindBufferMemory-memory-01035", + "text": " memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer" + }, + { + "vuid": "VUID-vkBindBufferMemory-memoryOffset-01036", + "text": " memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer" + }, + { + "vuid": "VUID-vkBindBufferMemory-size-01037", + "text": " The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset" + }, + { + "vuid": "VUID-vkBindBufferMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkBindBufferMemory-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkBindBufferMemory-buffer-parent", + "text": " buffer must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkBindBufferMemory-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ], + "(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindBufferMemory-buffer-01444", + "text": " If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer" + }, + { + "vuid": "VUID-vkBindBufferMemory-memory-01508", + "text": " If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfoKHR in its pNext chain, and VkMemoryDedicatedAllocateInfoKHR::buffer was not VK_NULL_HANDLE, then buffer must equal VkMemoryDedicatedAllocateInfoKHR::buffer and memoryOffset must be zero." + } + ], + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindBufferMemory-buffer-01038", + "text": " If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to a buffer handle created with identical creation parameters to buffer and memoryOffset must be zero" + } + ], + "(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindBufferMemory-buffer-01039", + "text": " If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image" + } + ] + }, + "vkBindBufferMemory2KHR": { + "(VK_KHR_bind_memory2)": [ + { + "vuid": "VUID-vkBindBufferMemory2KHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkBindBufferMemory2KHR-pBindInfos-parameter", + "text": " pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindBufferMemoryInfoKHR structures" + }, + { + "vuid": "VUID-vkBindBufferMemory2KHR-bindInfoCount-arraylength", + "text": " bindInfoCount must be greater than 0" + } + ] + }, + "VkBindBufferMemoryInfoKHR": { + "(VK_KHR_bind_memory2)": [ + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01593", + "text": " buffer must not already be backed by a memory object" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01594", + "text": " buffer must not have been created with any sparse memory binding flags" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01595", + "text": " memoryOffset must be less than the size of memory" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01596", + "text": " If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01597", + "text": " If buffer was created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01598", + "text": " If buffer was created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, memoryOffset must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-memory-01599", + "text": " memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-memoryOffset-01600", + "text": " memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-size-01601", + "text": " The size member of the VkMemoryRequirements structure returned from a call to vkGetBufferMemoryRequirements with buffer must be less than or equal to the size of memory minus memoryOffset" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkBindBufferMemoryDeviceGroupInfoKHX" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-commonparent", + "text": " Both of buffer, and memory must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_bind_memory2)+(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01602", + "text": " If buffer requires a dedicated allocation(as reported by vkGetBufferMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::buffer equal to buffer and memoryOffset must be zero" + } + ], + "(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01603", + "text": " If buffer was created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::buffer equal to buffer and memoryOffset must be zero" + } + ], + "(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-buffer-01604", + "text": " If buffer was not created with VkDedicatedAllocationBufferCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image" + } + ], + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindBufferMemoryInfoKHR-pNext-01605", + "text": " If the pNext chain includes VkBindBufferMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindBufferMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated" + } + ] + }, + "VkBindBufferMemoryDeviceGroupInfoKHX": { + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindBufferMemoryDeviceGroupInfoKHX-deviceIndexCount-01606", + "text": " deviceIndexCount must either be zero or equal to the number of physical devices in the logical device" + }, + { + "vuid": "VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-01607", + "text": " All elements of pDeviceIndices must be valid device indices" + }, + { + "vuid": "VUID-VkBindBufferMemoryDeviceGroupInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX" + }, + { + "vuid": "VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkBindBufferMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter", + "text": " If deviceIndexCount is not 0, pDeviceIndices must be a valid pointer to an array of deviceIndexCount uint32_t values" + } + ] + }, + "vkBindImageMemory": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkBindImageMemory-image-01608", + "text": " image must not have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR set." + } + ], + "core": [ + { + "vuid": "VUID-vkBindImageMemory-image-01044", + "text": " image must not already be backed by a memory object" + }, + { + "vuid": "VUID-vkBindImageMemory-image-01045", + "text": " image must not have been created with any sparse memory binding flags" + }, + { + "vuid": "VUID-vkBindImageMemory-memoryOffset-01046", + "text": " memoryOffset must be less than the size of memory" + }, + { + "vuid": "VUID-vkBindImageMemory-memory-01047", + "text": " memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image" + }, + { + "vuid": "VUID-vkBindImageMemory-memoryOffset-01048", + "text": " memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image" + }, + { + "vuid": "VUID-vkBindImageMemory-size-01049", + "text": " The size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image must be less than or equal to the size of memory minus memoryOffset" + }, + { + "vuid": "VUID-vkBindImageMemory-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkBindImageMemory-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkBindImageMemory-memory-parameter", + "text": " memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-vkBindImageMemory-image-parent", + "text": " image must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkBindImageMemory-memory-parent", + "text": " memory must have been created, allocated, or retrieved from device" + } + ], + "(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindImageMemory-image-01445", + "text": " If image requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::image equal to image" + }, + { + "vuid": "VUID-vkBindImageMemory-memory-01509", + "text": " If the VkmemoryAllocateInfo provided when memory was allocated included an instance of VkMemoryDedicatedAllocateInfoKHR in its pNext chain, and VkMemoryDedicatedAllocateInfoKHR::image was not VK_NULL_HANDLE, then image must equal VkMemoryDedicatedAllocateInfoKHR::image and memoryOffset must be zero." + } + ], + "(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindImageMemory-image-01050", + "text": " If image was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image equal to an image handle created with identical creation parameters to image and memoryOffset must be zero" + } + ], + "(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-vkBindImageMemory-image-01051", + "text": " If image was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image" + } + ] + }, + "vkBindImageMemory2KHR": { + "(VK_KHR_bind_memory2)": [ + { + "vuid": "VUID-vkBindImageMemory2KHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkBindImageMemory2KHR-pBindInfos-parameter", + "text": " pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindImageMemoryInfoKHR structures" + }, + { + "vuid": "VUID-vkBindImageMemory2KHR-bindInfoCount-arraylength", + "text": " bindInfoCount must be greater than 0" + } + ] + }, + "VkBindImageMemoryInfoKHR": { + "(VK_KHR_bind_memory2)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01609", + "text": " image must not already be backed by a memory object" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01610", + "text": " image must not have been created with any sparse memory binding flags" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-memoryOffset-01611", + "text": " memoryOffset must be less than the size of memory" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfoKHX, VkBindImageMemorySwapchainInfoKHX, or VkBindImagePlaneMemoryInfoKHR" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-commonparent", + "text": " Both of image, and memory that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_bind_memory2)+!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-memory-01612", + "text": " memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-memoryOffset-01613", + "text": " memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-memory-01614", + "text": " The difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the same image" + } + ], + "(VK_KHR_bind_memory2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01615", + "text": " If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01616", + "text": " If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01617", + "text": " If the pNext chain does not include an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01618", + "text": " If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, image must have been created with the VK_IMAGE_CREATE_DISJOINT_BIT_KHR bit set." + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01619", + "text": " If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR’s pNext chain" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01620", + "text": " If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, memoryOffset must be an integer multiple of the alignment member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR’s pNext chain" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01621", + "text": " If the pNext chain includes an instance of the VkBindImagePlaneMemoryInfoKHR structure, the difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2KHR with the same image and the correct planeAspect for this plane in the VkImagePlaneMemoryRequirementsInfoKHR structure attached to the VkImageMemoryRequirementsInfo2KHR’s pNext chain" + } + ], + "(VK_KHR_bind_memory2)+(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01622", + "text": " If image requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2KHR in VkMemoryDedicatedRequirementsKHR::requiresDedicatedAllocation for image), memory must have been created with VkMemoryDedicatedAllocateInfoKHR::image equal to image and memoryOffset must be zero" + } + ], + "(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01623", + "text": " If image was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image equal to image and memoryOffset must be zero" + } + ], + "(VK_KHR_bind_memory2)+(VK_NV_dedicated_allocation)+!(VK_KHR_dedicated_allocation)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01624", + "text": " If image was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation equal to VK_TRUE, memory must not have been allocated dedicated for a specific buffer or image" + } + ], + "(VK_KHR_bind_memory2)+!(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-memory-01625", + "text": " memory must be a valid VkDeviceMemory handle" + } + ], + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01626", + "text": " If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all instances of memory specified by VkBindImageMemoryDeviceGroupInfoKHX::pDeviceIndices must have been allocated" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01627", + "text": " If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, and VkBindImageMemoryDeviceGroupInfoKHX::SFRRectCount is not zero, then image must have been created with the VK_IMAGE_CREATE_BIND_SFR_BIT_KHX bit set" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01628", + "text": " If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects must be valid rectangles contained within the dimensions of image" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01629", + "text": " If the pNext chain includes VkBindImageMemoryDeviceGroupInfoKHX, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfoKHX::pSFRRects that correspond to the same instance of image must cover the entire image." + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-image-01630", + "text": " If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHX::swapchain, then the pNext chain must include a valid instance of VkBindImageMemorySwapchainInfoKHX" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01631", + "text": " If the pNext chain includes an instance of VkBindImageMemorySwapchainInfoKHX, memory must be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkBindImageMemoryInfoKHR-pNext-01632", + "text": " If the pNext chain does not include an instance of VkBindImageMemorySwapchainInfoKHX, memory must be a valid VkDeviceMemory handle" + } + ] + }, + "VkBindImageMemoryDeviceGroupInfoKHX": { + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01633", + "text": " At least one of deviceIndexCount and SFRRectCount must be zero." + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-deviceIndexCount-01634", + "text": " deviceIndexCount must either be zero or equal to the number of physical devices in the logical device" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-01635", + "text": " All elements of pDeviceIndices must be valid device indices." + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-SFRRectCount-01636", + "text": " SFRRectCount must either be zero or equal to the number of physical devices in the logical device squared" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-01637", + "text": " Elements of pSFRRects that correspond to the same instance of an image must not overlap." + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01638", + "text": " The offset.x member of any element of pSFRRects must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of all non-metadata aspects of the image" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-offset-01639", + "text": " The offset.y member of any element of pSFRRects must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of all non-metadata aspects of the image" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01640", + "text": " The extent.width member of any element of pSFRRects must either be a multiple of the sparse image block width of all non-metadata aspects of the image, or else extent.width + offset.x must equal the width of the image subresource" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-extent-01641", + "text": " The extent.height member of any element of pSFRRects must either be a multiple of the sparse image block height of all non-metadata aspects of the image, or else extent.height
offset.y must equal the width of the image subresource" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-pDeviceIndices-parameter", + "text": " If deviceIndexCount is not 0, pDeviceIndices must be a valid pointer to an array of deviceIndexCount uint32_t values" + }, + { + "vuid": "VUID-VkBindImageMemoryDeviceGroupInfoKHX-pSFRRects-parameter", + "text": " If SFRRectCount is not 0, pSFRRects must be a valid pointer to an array of SFRRectCount VkRect2D structures" + } + ] + }, + "VkBindImagePlaneMemoryInfoKHR": { + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-01642", + "text": " planeAspect must be a single valid plane aspect for the image format (that is, planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR for “_2PLANE” formats and planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR for “_3PLANE” formats)" + }, + { + "vuid": "VUID-VkBindImagePlaneMemoryInfoKHR-None-01643", + "text": " A single call to vkBindImageMemory2KHR must bind all or none of the planes of an image (i.e. bindings to all planes of an image must be made in a single vkBindImageMemory2KHR call), as separate bindings" + }, + { + "vuid": "VUID-VkBindImagePlaneMemoryInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR" + }, + { + "vuid": "VUID-VkBindImagePlaneMemoryInfoKHR-planeAspect-parameter", + "text": " planeAspect must be a valid VkImageAspectFlagBits value" + } + ] + }, + "VkBindImageMemorySwapchainInfoKHX": { + "(VK_KHR_bind_memory2)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkBindImageMemorySwapchainInfoKHX-imageIndex-01644", + "text": " imageIndex must be less than the number of images in swapchain" + }, + { + "vuid": "VUID-VkBindImageMemorySwapchainInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX" + }, + { + "vuid": "VUID-VkBindImageMemorySwapchainInfoKHX-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + } + ] + }, + "vkCreateSampler": { + "core": [ + { + "vuid": "VUID-vkCreateSampler-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateSampler-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkSamplerCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateSampler-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateSampler-pSampler-parameter", + "text": " pSampler must be a valid pointer to a VkSampler handle" + } + ] + }, + "VkSamplerCreateInfo": { + "core": [ + { + "vuid": "VUID-VkSamplerCreateInfo-mipLodBias-01069", + "text": " The absolute value of mipLodBias must be less than or equal to VkPhysicalDeviceLimits::maxSamplerLodBias" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-anisotropyEnable-01070", + "text": " If the &amp;lt;&amp;lt;features-features-samplerAnisotropy,anisotropic sampling&amp;gt;&amp;gt; feature is not enabled, anisotropyEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-anisotropyEnable-01071", + "text": " If anisotropyEnable is VK_TRUE, maxAnisotropy must be between 1.0 and VkPhysicalDeviceLimits::maxSamplerAnisotropy, inclusive" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01072", + "text": " If unnormalizedCoordinates is VK_TRUE, minFilter and magFilter must be equal" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01073", + "text": " If unnormalizedCoordinates is VK_TRUE, mipmapMode must be VK_SAMPLER_MIPMAP_MODE_NEAREST" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01074", + "text": " If unnormalizedCoordinates is VK_TRUE, minLod and maxLod must be zero" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01075", + "text": " If unnormalizedCoordinates is VK_TRUE, addressModeU and addressModeV must each be either VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01076", + "text": " If unnormalizedCoordinates is VK_TRUE, anisotropyEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-unnormalizedCoordinates-01077", + "text": " If unnormalizedCoordinates is VK_TRUE, compareEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeU-01078", + "text": " If any of addressModeU, addressModeV or addressModeW are VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, borderColor must be a valid VkBorderColor value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeU-01079", + "text": " If the VK_KHR_sampler_mirror_clamp_to_edge extension is not enabled, addressModeU, addressModeV and addressModeW must not be VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-compareEnable-01080", + "text": " If compareEnable is VK_TRUE, compareOp must be a valid VkCompareOp value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkSamplerReductionModeCreateInfoEXT or VkSamplerYcbcrConversionInfoKHR" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-magFilter-parameter", + "text": " magFilter must be a valid VkFilter value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-minFilter-parameter", + "text": " minFilter must be a valid VkFilter value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-mipmapMode-parameter", + "text": " mipmapMode must be a valid VkSamplerMipmapMode value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeU-parameter", + "text": " addressModeU must be a valid VkSamplerAddressMode value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeV-parameter", + "text": " addressModeV must be a valid VkSamplerAddressMode value" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeW-parameter", + "text": " addressModeW must be a valid VkSamplerAddressMode value" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkSamplerCreateInfo-minFilter-01645", + "text": " If &amp;lt;&amp;lt;samplers-YCbCr-conversion,sampler Y’CBCR conversion&amp;gt;&amp;gt; is enabled and VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR is not set for the format, minFilter and magFilter must be equal to the sampler Y’CBCR conversion’s chromaFilter" + }, + { + "vuid": "VUID-VkSamplerCreateInfo-addressModeU-01646", + "text": " If &amp;lt;&amp;lt;samplers-YCbCr-conversion,sampler Y’CBCR conversion&amp;gt;&amp;gt; is enabled, addressModeU, addressModeV, and addressModeW must be VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, anisotropyEnable must be VK_FALSE, and unnormalizedCoordinates must be VK_FALSE" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)+(VK_EXT_sampler_filter_minmax)": [ + { + "vuid": "VUID-VkSamplerCreateInfo-None-01647", + "text": " The sampler reduction mode must be set to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT if &amp;lt;&amp;lt;samplers-YCbCr-conversion,sampler Y’CBCR conversion&amp;gt;&amp;gt; is enabled" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-VkSamplerCreateInfo-magFilter-01081", + "text": " If either magFilter or minFilter is VK_FILTER_CUBIC_IMG, anisotropyEnable must be VK_FALSE" + } + ], + "(VK_IMG_filter_cubic+VK_EXT_sampler_filter_minmax)": [ + { + "vuid": "VUID-VkSamplerCreateInfo-magFilter-01422", + "text": " If either magFilter or minFilter is VK_FILTER_CUBIC_IMG, the reductionMode member of VkSamplerReductionModeCreateInfoEXT must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT" + } + ], + "(VK_EXT_sampler_filter_minmax)": [ + { + "vuid": "VUID-VkSamplerCreateInfo-compareEnable-01423", + "text": " If compareEnable is VK_TRUE, the reductionMode member of VkSamplerReductionModeCreateInfoEXT must be VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT" + } + ] + }, + "VkSamplerReductionModeCreateInfoEXT": { + "(VK_EXT_sampler_filter_minmax)": [ + { + "vuid": "VUID-VkSamplerReductionModeCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkSamplerReductionModeCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSamplerReductionModeCreateInfoEXT-reductionMode-parameter", + "text": " reductionMode must be a valid VkSamplerReductionModeEXT value" + } + ] + }, + "vkDestroySampler": { + "core": [ + { + "vuid": "VUID-vkDestroySampler-sampler-01082", + "text": " All submitted commands that refer to sampler must have completed execution" + }, + { + "vuid": "VUID-vkDestroySampler-sampler-01083", + "text": " If VkAllocationCallbacks were provided when sampler was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroySampler-sampler-01084", + "text": " If no VkAllocationCallbacks were provided when sampler was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroySampler-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroySampler-sampler-parameter", + "text": " If sampler is not VK_NULL_HANDLE, sampler must be a valid VkSampler handle" + }, + { + "vuid": "VUID-vkDestroySampler-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroySampler-sampler-parent", + "text": " If sampler is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "VkSamplerYcbcrConversionInfoKHR": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkSamplerYcbcrConversionInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionInfoKHR-conversion-parameter", + "text": " conversion must be a valid VkSamplerYcbcrConversionKHR handle" + } + ] + }, + "vkCreateSamplerYcbcrConversionKHR": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkCreateSamplerYcbcrConversionKHR-None-01648", + "text": " The &amp;lt;&amp;lt;features-features-sampler-YCbCr-conversion, sampler Y’CBCR conversion feature&amp;gt;&amp;gt; must be enabled" + }, + { + "vuid": "VUID-vkCreateSamplerYcbcrConversionKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateSamplerYcbcrConversionKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkSamplerYcbcrConversionCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateSamplerYcbcrConversionKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateSamplerYcbcrConversionKHR-pYcbcrConversion-parameter", + "text": " pYcbcrConversion must be a valid pointer to a VkSamplerYcbcrConversionKHR handle" + } + ] + }, + "VkSamplerYcbcrConversionCreateInfoKHR": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01649", + "text": " format must not be VK_FORMAT_UNDEFINED" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01650", + "text": " format must support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR or VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01651", + "text": " If the format does not support VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_COSITED_EVEN_KHR" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-01652", + "text": " If the format does not support VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, xChromaOffset and yChromaOffset must not be VK_CHROMA_LOCATION_MIDPOINT_KHR" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-01653", + "text": " format must represent unsigned normalized values (i.e. the format must be a UNORM format)" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-None-01654", + "text": " If the format has a _422 or _420 suffix:" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-01655", + "text": " If ycbcrModel is not VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, then components.r, components.g, and components.b must correspond to channels of the format; that is, components.r, components.g, and components.b must not be VK_COMPONENT_SWIZZLE_ZERO or VK_COMPONENT_SWIZZLE_ONE, and must not correspond to a channel which contains zero or one as a consequence of &amp;lt;&amp;lt;textures-conversion-to-rgba,conversion to RGBA&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-forceExplicitReconstruction-01656", + "text": " If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, forceExplicitReconstruction must be FALSE" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-01657", + "text": " If the format does not support VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, chromaFilter must be VK_FILTER_NEAREST" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrModel-parameter", + "text": " ycbcrModel must be a valid VkSamplerYcbcrModelConversionKHR value" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-ycbcrRange-parameter", + "text": " ycbcrRange must be a valid VkSamplerYcbcrRangeKHR value" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-components-parameter", + "text": " components must be a valid VkComponentMapping structure" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-xChromaOffset-parameter", + "text": " xChromaOffset must be a valid VkChromaLocationKHR value" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-yChromaOffset-parameter", + "text": " yChromaOffset must be a valid VkChromaLocationKHR value" + }, + { + "vuid": "VUID-VkSamplerYcbcrConversionCreateInfoKHR-chromaFilter-parameter", + "text": " chromaFilter must be a valid VkFilter value" + } + ] + }, + "vkDestroySamplerYcbcrConversionKHR": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkDestroySamplerYcbcrConversionKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parameter", + "text": " If ycbcrConversion is not VK_NULL_HANDLE, ycbcrConversion must be a valid VkSamplerYcbcrConversionKHR handle" + }, + { + "vuid": "VUID-vkDestroySamplerYcbcrConversionKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroySamplerYcbcrConversionKHR-ycbcrConversion-parent", + "text": " If ycbcrConversion is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateDescriptorSetLayout": { + "core": [ + { + "vuid": "VUID-vkCreateDescriptorSetLayout-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateDescriptorSetLayout-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDescriptorSetLayoutCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateDescriptorSetLayout-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDescriptorSetLayout-pSetLayout-parameter", + "text": " pSetLayout must be a valid pointer to a VkDescriptorSetLayout handle" + } + ] + }, + "VkDescriptorSetLayoutCreateInfo": { + "core": [ + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-binding-00279", + "text": " The VkDescriptorSetLayoutBinding::binding members of the elements of the pBindings array must each have different values." + }, + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkDescriptorSetLayoutCreateFlagBits values" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-pBindings-parameter", + "text": " If bindingCount is not 0, pBindings must be a valid pointer to an array of bindingCount valid VkDescriptorSetLayoutBinding structures" + } + ], + "(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-flags-00280", + "text": " If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then all elements of pBindings must not have a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutCreateInfo-flags-00281", + "text": " If flags contains VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, then the total number of elements of all bindings must be less than or equal to VkPhysicalDevicePushDescriptorPropertiesKHR::maxPushDescriptors" + } + ] + }, + "VkDescriptorSetLayoutBinding": { + "core": [ + { + "vuid": "VUID-VkDescriptorSetLayoutBinding-descriptorType-00282", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and descriptorCount is not 0 and pImmutableSamplers is not NULL, pImmutableSamplers must be a valid pointer to an array of descriptorCount valid VkSampler handles" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutBinding-descriptorCount-00283", + "text": " If descriptorCount is not 0, stageFlags must be a valid combination of VkShaderStageFlagBits values" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutBinding-descriptorType-01510", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and descriptorCount is not 0, then stageFlags must be 0 or VK_SHADER_STAGE_FRAGMENT_BIT" + }, + { + "vuid": "VUID-VkDescriptorSetLayoutBinding-descriptorType-parameter", + "text": " descriptorType must be a valid VkDescriptorType value" + } + ] + }, + "vkDestroyDescriptorSetLayout": { + "core": [ + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00284", + "text": " If VkAllocationCallbacks were provided when descriptorSetLayout was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-00285", + "text": " If no VkAllocationCallbacks were provided when descriptorSetLayout was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parameter", + "text": " If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyDescriptorSetLayout-descriptorSetLayout-parent", + "text": " If descriptorSetLayout is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreatePipelineLayout": { + "core": [ + { + "vuid": "VUID-vkCreatePipelineLayout-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreatePipelineLayout-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkPipelineLayoutCreateInfo structure" + }, + { + "vuid": "VUID-vkCreatePipelineLayout-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreatePipelineLayout-pPipelineLayout-parameter", + "text": " pPipelineLayout must be a valid pointer to a VkPipelineLayout handle" + } + ] + }, + "VkPipelineLayoutCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286", + "text": " setLayoutCount must be less than or equal to VkPhysicalDeviceLimits::maxBoundDescriptorSets" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00287", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorSamplers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00288", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorUniformBuffers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00289", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorStorageBuffers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00290", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorSampledImages" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00291", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorStorageImages" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01676", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorInputAttachments" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01677", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_SAMPLER and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSamplers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01678", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER accessible across all shader stagess and and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetUniformBuffers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01679", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetUniformBuffersDynamic" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01680", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageBuffers" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01681", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageBuffersDynamic" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01682", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetSampledImages" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01683", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetStorageImages" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-01684", + "text": " The total number of descriptors of the type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT accessible across all shader stages and across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxDescriptorSetInputAttachments" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-00292", + "text": " Any two elements of pPushConstantRanges must not include the same stage in stageFlags" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter", + "text": " If setLayoutCount is not 0, pSetLayouts must be a valid pointer to an array of setLayoutCount valid VkDescriptorSetLayout handles" + }, + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter", + "text": " If pushConstantRangeCount is not 0, pPushConstantRanges must be a valid pointer to an array of pushConstantRangeCount valid VkPushConstantRange structures" + } + ], + "(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-VkPipelineLayoutCreateInfo-pSetLayouts-00293", + "text": " pSetLayouts must not contain more than one descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set" + } + ] + }, + "VkPushConstantRange": { + "core": [ + { + "vuid": "VUID-VkPushConstantRange-offset-00294", + "text": " offset must be less than VkPhysicalDeviceLimits::maxPushConstantsSize" + }, + { + "vuid": "VUID-VkPushConstantRange-offset-00295", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-VkPushConstantRange-size-00296", + "text": " size must be greater than 0" + }, + { + "vuid": "VUID-VkPushConstantRange-size-00297", + "text": " size must be a multiple of 4" + }, + { + "vuid": "VUID-VkPushConstantRange-size-00298", + "text": " size must be less than or equal to VkPhysicalDeviceLimits::maxPushConstantsSize minus offset" + }, + { + "vuid": "VUID-VkPushConstantRange-stageFlags-parameter", + "text": " stageFlags must be a valid combination of VkShaderStageFlagBits values" + }, + { + "vuid": "VUID-VkPushConstantRange-stageFlags-requiredbitmask", + "text": " stageFlags must not be 0" + } + ] + }, + "vkDestroyPipelineLayout": { + "core": [ + { + "vuid": "VUID-vkDestroyPipelineLayout-pipelineLayout-00299", + "text": " If VkAllocationCallbacks were provided when pipelineLayout was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyPipelineLayout-pipelineLayout-00300", + "text": " If no VkAllocationCallbacks were provided when pipelineLayout was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyPipelineLayout-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyPipelineLayout-pipelineLayout-parameter", + "text": " If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-vkDestroyPipelineLayout-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyPipelineLayout-pipelineLayout-parent", + "text": " If pipelineLayout is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCreateDescriptorPool": { + "core": [ + { + "vuid": "VUID-vkCreateDescriptorPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateDescriptorPool-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDescriptorPoolCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateDescriptorPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDescriptorPool-pDescriptorPool-parameter", + "text": " pDescriptorPool must be a valid pointer to a VkDescriptorPool handle" + } + ] + }, + "VkDescriptorPoolCreateInfo": { + "core": [ + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-maxSets-00301", + "text": " maxSets must be greater than 0" + }, + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO" + }, + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-flags-parameter", + "text": " flags must be a valid combination of VkDescriptorPoolCreateFlagBits values" + }, + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-pPoolSizes-parameter", + "text": " pPoolSizes must be a valid pointer to an array of poolSizeCount valid VkDescriptorPoolSize structures" + }, + { + "vuid": "VUID-VkDescriptorPoolCreateInfo-poolSizeCount-arraylength", + "text": " poolSizeCount must be greater than 0" + } + ] + }, + "VkDescriptorPoolSize": { + "core": [ + { + "vuid": "VUID-VkDescriptorPoolSize-descriptorCount-00302", + "text": " descriptorCount must be greater than 0" + }, + { + "vuid": "VUID-VkDescriptorPoolSize-type-parameter", + "text": " type must be a valid VkDescriptorType value" + } + ] + }, + "vkDestroyDescriptorPool": { + "core": [ + { + "vuid": "VUID-vkDestroyDescriptorPool-descriptorPool-00303", + "text": " All submitted commands that refer to descriptorPool (via any allocated descriptor sets) must have completed execution" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-descriptorPool-00304", + "text": " If VkAllocationCallbacks were provided when descriptorPool was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-descriptorPool-00305", + "text": " If no VkAllocationCallbacks were provided when descriptorPool was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-descriptorPool-parameter", + "text": " If descriptorPool is not VK_NULL_HANDLE, descriptorPool must be a valid VkDescriptorPool handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyDescriptorPool-descriptorPool-parent", + "text": " If descriptorPool is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkAllocateDescriptorSets": { + "core": [ + { + "vuid": "VUID-vkAllocateDescriptorSets-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAllocateDescriptorSets-pAllocateInfo-parameter", + "text": " pAllocateInfo must be a valid pointer to a valid VkDescriptorSetAllocateInfo structure" + }, + { + "vuid": "VUID-vkAllocateDescriptorSets-pDescriptorSets-parameter", + "text": " pDescriptorSets must be a valid pointer to an array of pAllocateInfo::descriptorSetCount VkDescriptorSet handles" + } + ] + }, + "VkDescriptorSetAllocateInfo": { + "!(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-00306", + "text": " descriptorSetCount must not be greater than the number of sets that are currently available for allocation in descriptorPool" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-descriptorPool-00307", + "text": " descriptorPool must have enough free descriptor capacity remaining to allocate the descriptor sets of the specified layouts" + } + ], + "(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-pSetLayouts-00308", + "text": " Each element of pSetLayouts must not have been created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR set" + } + ], + "core": [ + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-descriptorPool-parameter", + "text": " descriptorPool must be a valid VkDescriptorPool handle" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-pSetLayouts-parameter", + "text": " pSetLayouts must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSetLayout handles" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-descriptorSetCount-arraylength", + "text": " descriptorSetCount must be greater than 0" + }, + { + "vuid": "VUID-VkDescriptorSetAllocateInfo-commonparent", + "text": " Both of descriptorPool, and the elements of pSetLayouts must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkFreeDescriptorSets": { + "core": [ + { + "vuid": "VUID-vkFreeDescriptorSets-pDescriptorSets-00309", + "text": " All submitted commands that refer to any element of pDescriptorSets must have completed execution" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-pDescriptorSets-00310", + "text": " pDescriptorSets must be a valid pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which must either be a valid handle or VK_NULL_HANDLE" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-pDescriptorSets-00311", + "text": " Each valid handle in pDescriptorSets must have been allocated from descriptorPool" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-descriptorPool-00312", + "text": " descriptorPool must have been created with the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-descriptorPool-parameter", + "text": " descriptorPool must be a valid VkDescriptorPool handle" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-descriptorSetCount-arraylength", + "text": " descriptorSetCount must be greater than 0" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-descriptorPool-parent", + "text": " descriptorPool must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkFreeDescriptorSets-pDescriptorSets-parent", + "text": " Each element of pDescriptorSets that is a valid handle must have been created, allocated, or retrieved from descriptorPool" + } + ] + }, + "vkResetDescriptorPool": { + "core": [ + { + "vuid": "VUID-vkResetDescriptorPool-descriptorPool-00313", + "text": " All uses of descriptorPool (via any allocated descriptor sets) must have completed execution" + }, + { + "vuid": "VUID-vkResetDescriptorPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkResetDescriptorPool-descriptorPool-parameter", + "text": " descriptorPool must be a valid VkDescriptorPool handle" + }, + { + "vuid": "VUID-vkResetDescriptorPool-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-vkResetDescriptorPool-descriptorPool-parent", + "text": " descriptorPool must have been created, allocated, or retrieved from device" + } + ] + }, + "vkUpdateDescriptorSets": { + "core": [ + { + "vuid": "VUID-vkUpdateDescriptorSets-dstSet-00314", + "text": " The dstSet member of each element of pDescriptorWrites or pDescriptorCopies must not be used by any command that was recorded to a command buffer which is in the &amp;lt;&amp;lt;commandbuffers-lifecycle, pending state&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkUpdateDescriptorSets-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkUpdateDescriptorSets-pDescriptorWrites-parameter", + "text": " If descriptorWriteCount is not 0, pDescriptorWrites must be a valid pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures" + }, + { + "vuid": "VUID-vkUpdateDescriptorSets-pDescriptorCopies-parameter", + "text": " If descriptorCopyCount is not 0, pDescriptorCopies must be a valid pointer to an array of descriptorCopyCount valid VkCopyDescriptorSet structures" + } + ] + }, + "VkWriteDescriptorSet": { + "core": [ + { + "vuid": "VUID-VkWriteDescriptorSet-dstBinding-00315", + "text": " dstBinding must be less than or equal to the maximum value of binding of all VkDescriptorSetLayoutBinding structures specified when dstSet’s descriptor set layout was created" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-dstBinding-00316", + "text": " dstBinding must be a binding with a non-zero descriptorCount" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorCount-00317", + "text": " All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those with a descriptorCount of zero, must have identical descriptorType and stageFlags." + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorCount-00318", + "text": " All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those with a descriptorCount of zero, must all either use immutable samplers or must all not use immutable samplers." + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00319", + "text": " descriptorType must match the type of dstBinding within dstSet" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-dstSet-00320", + "text": " dstSet must be a valid VkDescriptorSet handle" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-dstArrayElement-00321", + "text": " The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by &amp;lt;&amp;lt;descriptorsets-updates-consecutive&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00322", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pImageInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorImageInfo structures" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00323", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pTexelBufferView must be a valid pointer to an array of descriptorCount valid VkBufferView handles" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00324", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pBufferInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorBufferInfo structures" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00325", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and dstSet was not allocated with a layout that included immutable samplers for dstBinding with descriptorType, the sampler member of each element of pImageInfo must be a valid VkSampler object" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00326", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView and imageLayout members of each element of pImageInfo must be a valid VkImageView and VkImageLayout, respectively" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-01402", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, for each descriptor that will be accessed via load or store operations the imageLayout member for corresponding elements of pImageInfo must be VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00327", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the offset member of each element of pBufferInfo must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00328", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the offset member of each element of pBufferInfo must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignment" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00329", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and the buffer member of any element of pBufferInfo is the handle of a non-sparse buffer, then that buffer must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00330", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the buffer member of each element of pBufferInfo must have been created with VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00331", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the buffer member of each element of pBufferInfo must have been created with VK_BUFFER_USAGE_STORAGE_BUFFER_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00332", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the range member of each element of pBufferInfo, or the effective range if range is VK_WHOLE_SIZE, must be less than or equal to VkPhysicalDeviceLimits::maxUniformBufferRange" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00333", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the range member of each element of pBufferInfo, or the effective range if range is VK_WHOLE_SIZE, must be less than or equal to VkPhysicalDeviceLimits::maxStorageBufferRange" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00334", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the VkBuffer that each element of pTexelBufferView was created from must have been created with VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00335", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the VkBuffer that each element of pTexelBufferView was created from must have been created with VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00336", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must have been created with the identity swizzle" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00337", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the imageView member of each element of pImageInfo must have been created with VK_IMAGE_USAGE_SAMPLED_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-01403", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the imageLayout member of each element of pImageInfo must be VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00338", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must have been created with VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-00339", + "text": " If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, the imageView member of each element of pImageInfo must have been created with VK_IMAGE_USAGE_STORAGE_BIT set" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorType-parameter", + "text": " descriptorType must be a valid VkDescriptorType value" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-descriptorCount-arraylength", + "text": " descriptorCount must be greater than 0" + }, + { + "vuid": "VUID-VkWriteDescriptorSet-commonparent", + "text": " Both of dstSet, and the elements of pTexelBufferView that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkDescriptorBufferInfo": { + "core": [ + { + "vuid": "VUID-VkDescriptorBufferInfo-offset-00340", + "text": " offset must be less than the size of buffer" + }, + { + "vuid": "VUID-VkDescriptorBufferInfo-range-00341", + "text": " If range is not equal to VK_WHOLE_SIZE, range must be greater than 0" + }, + { + "vuid": "VUID-VkDescriptorBufferInfo-range-00342", + "text": " If range is not equal to VK_WHOLE_SIZE, range must be less than or equal to the size of buffer minus offset" + }, + { + "vuid": "VUID-VkDescriptorBufferInfo-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + } + ] + }, + "VkDescriptorImageInfo": { + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkDescriptorImageInfo-imageView-00343", + "text": " imageView must not be 2D or 2D array image view created from a 3D image" + } + ], + "core": [ + { + "vuid": "VUID-VkDescriptorImageInfo-imageLayout-00344", + "text": " imageLayout must match the actual VkImageLayout of each subresource accessible from imageView at the time this descriptor is accessed" + }, + { + "vuid": "VUID-VkDescriptorImageInfo-commonparent", + "text": " Both of imageView, and sampler that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkDescriptorImageInfo-sampler-01563", + "text": " If sampler is used and enables &amp;lt;&amp;lt;samplers-YCbCr-conversion,sampler Y’CBCR conversion&amp;gt;&amp;gt;:" + }, + { + "vuid": "VUID-VkDescriptorImageInfo-sampler-01564", + "text": " If sampler is used and does not enable &amp;lt;&amp;lt;samplers-YCbCr-conversion, sampler Y’CBCR conversion&amp;gt;&amp;gt; and the VkFormat of the image is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, the image must have been created with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the aspectMask of the imageView must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR or (for three-plane formats only) VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + } + ] + }, + "VkCopyDescriptorSet": { + "core": [ + { + "vuid": "VUID-VkCopyDescriptorSet-srcBinding-00345", + "text": " srcBinding must be a valid binding within srcSet" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-srcArrayElement-00346", + "text": " The sum of srcArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by srcBinding, and all applicable consecutive bindings, as described by &amp;lt;&amp;lt;descriptorsets-updates-consecutive&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-dstBinding-00347", + "text": " dstBinding must be a valid binding within dstSet" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-dstArrayElement-00348", + "text": " The sum of dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by &amp;lt;&amp;lt;descriptorsets-updates-consecutive&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-srcSet-00349", + "text": " If srcSet is equal to dstSet, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by &amp;lt;&amp;lt;descriptorsets-updates-consecutive&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-srcSet-parameter", + "text": " srcSet must be a valid VkDescriptorSet handle" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-dstSet-parameter", + "text": " dstSet must be a valid VkDescriptorSet handle" + }, + { + "vuid": "VUID-VkCopyDescriptorSet-commonparent", + "text": " Both of dstSet, and srcSet must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCreateDescriptorUpdateTemplateKHR": { + "(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-vkCreateDescriptorUpdateTemplateKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateDescriptorUpdateTemplateKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDescriptorUpdateTemplateCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateDescriptorUpdateTemplateKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDescriptorUpdateTemplateKHR-pDescriptorUpdateTemplate-parameter", + "text": " pDescriptorUpdateTemplate must be a valid pointer to a VkDescriptorUpdateTemplateKHR handle" + } + ] + }, + "VkDescriptorUpdateTemplateCreateInfoKHR": { + "(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00350", + "text": " If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, descriptorSetLayout must be a valid VkDescriptorSetLayout handle" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pDescriptorUpdateEntries-parameter", + "text": " pDescriptorUpdateEntries must be a valid pointer to an array of descriptorUpdateEntryCount valid VkDescriptorUpdateTemplateEntryKHR structures" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-parameter", + "text": " templateType must be a valid VkDescriptorUpdateTemplateTypeKHR value" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorSetLayout-parameter", + "text": " If descriptorSetLayout is not VK_NULL_HANDLE, descriptorSetLayout must be a valid VkDescriptorSetLayout handle" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineBindPoint-parameter", + "text": " If pipelineBindPoint is not 0, pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-pipelineLayout-parameter", + "text": " If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-descriptorUpdateEntryCount-arraylength", + "text": " descriptorUpdateEntryCount must be greater than 0" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-commonparent", + "text": " Both of descriptorSetLayout, and pipelineLayout that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_descriptor_update_template)+(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00351", + "text": " If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00352", + "text": " If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, pipelineLayout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateCreateInfoKHR-templateType-00353", + "text": " If templateType is VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR" + } + ] + }, + "VkDescriptorUpdateTemplateEntryKHR": { + "(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-VkDescriptorUpdateTemplateEntryKHR-dstBinding-00354", + "text": " dstBinding must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors." + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateEntryKHR-dstArrayElement-00355", + "text": " dstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by &amp;lt;&amp;lt;descriptorsets-updates-consecutive&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkDescriptorUpdateTemplateEntryKHR-descriptorType-parameter", + "text": " descriptorType must be a valid VkDescriptorType value" + } + ] + }, + "vkDestroyDescriptorUpdateTemplateKHR": { + "(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00356", + "text": " If VkAllocationCallbacks were provided when descriptorSetLayout was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorSetLayout-00357", + "text": " If no VkAllocationCallbacks were provided when descriptorSetLayout was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parameter", + "text": " If descriptorUpdateTemplate is not VK_NULL_HANDLE, descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle" + }, + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyDescriptorUpdateTemplateKHR-descriptorUpdateTemplate-parent", + "text": " If descriptorUpdateTemplate is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkUpdateDescriptorSetWithTemplateKHR": { + "(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-vkUpdateDescriptorSetWithTemplateKHR-pData-01685", + "text": " pData must be a valid pointer to a memory that contains one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by descriptorUpdateTemplate when it was created with vkCreateDescriptorUpdateTemplateKHR" + }, + { + "vuid": "VUID-vkUpdateDescriptorSetWithTemplateKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorSet-parameter", + "text": " descriptorSet must be a valid VkDescriptorSet handle" + }, + { + "vuid": "VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter", + "text": " descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle" + }, + { + "vuid": "VUID-vkUpdateDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parent", + "text": " descriptorUpdateTemplate must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdBindDescriptorSets": { + "core": [ + { + "vuid": "VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358", + "text": " Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout that matches (is the same as, or identically defined as) the VkDescriptorSetLayout at set n in layout, where n is the sum of firstSet and the index into pDescriptorSets" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-dynamicOffsetCount-00359", + "text": " dynamicOffsetCount must be equal to the total number of dynamic descriptors in pDescriptorSets" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-firstSet-00360", + "text": " The sum of firstSet and descriptorSetCount must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-pipelineBindPoint-00361", + "text": " pipelineBindPoint must be supported by the commandBuffer’s parent VkCommandPool’s queue family" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-pDynamicOffsets-00362", + "text": " Each element of pDynamicOffsets must satisfy the required alignment for the corresponding descriptor binding’s descriptor type" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-pipelineBindPoint-parameter", + "text": " pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter", + "text": " pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-pDynamicOffsets-parameter", + "text": " If dynamicOffsetCount is not 0, pDynamicOffsets must be a valid pointer to an array of dynamicOffsetCount uint32_t values" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-descriptorSetCount-arraylength", + "text": " descriptorSetCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdBindDescriptorSets-commonparent", + "text": " Each of commandBuffer, layout, and the elements of pDescriptorSets must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdPushDescriptorSetKHR": { + "(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-00363", + "text": " pipelineBindPoint must be supported by the commandBuffer’s parent VkCommandPool’s queue family" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-set-00364", + "text": " set must be less than VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-set-00365", + "text": " set must be the unique set number in the pipeline layout that uses a descriptor set layout that was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-pipelineBindPoint-parameter", + "text": " pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-pDescriptorWrites-parameter", + "text": " pDescriptorWrites must be a valid pointer to an array of descriptorWriteCount valid VkWriteDescriptorSet structures" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-descriptorWriteCount-arraylength", + "text": " descriptorWriteCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetKHR-commonparent", + "text": " Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdPushDescriptorSetWithTemplateKHR": { + "(VK_KHR_push_descriptor)+(VK_KHR_descriptor_update_template)": [ + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-00366", + "text": " The pipelineBindPoint specified during the creation of the descriptor update template must be supported by the commandBuffer’s parent VkCommandPool’s queue family" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-pData-01686", + "text": " pData must be a valid pointer to a memory that contains one or more valid instances of VkDescriptorImageInfo, VkDescriptorBufferInfo, or VkBufferView in a layout defined by descriptorUpdateTemplate when it was created with vkCreateDescriptorUpdateTemplateKHR" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter", + "text": " descriptorUpdateTemplate must be a valid VkDescriptorUpdateTemplateKHR handle" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent", + "text": " Each of commandBuffer, descriptorUpdateTemplate, and layout must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdPushConstants": { + "core": [ + { + "vuid": "VUID-vkCmdPushConstants-offset-01795", + "text": " For each byte in the range specified by offset and size and for each shader stage in stageFlags, there must be a push constant range in layout that includes that byte and that stage" + }, + { + "vuid": "VUID-vkCmdPushConstants-offset-01796", + "text": " For each byte in the range specified by offset and size and for each push constant range that overlaps that byte, stageFlags must include all stages in that push constant range’s VkPushConstantRange::stageFlags" + }, + { + "vuid": "VUID-vkCmdPushConstants-offset-00368", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdPushConstants-size-00369", + "text": " size must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdPushConstants-offset-00370", + "text": " offset must be less than VkPhysicalDeviceLimits::maxPushConstantsSize" + }, + { + "vuid": "VUID-vkCmdPushConstants-size-00371", + "text": " size must be less than or equal to VkPhysicalDeviceLimits::maxPushConstantsSize minus offset" + }, + { + "vuid": "VUID-vkCmdPushConstants-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdPushConstants-layout-parameter", + "text": " layout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-vkCmdPushConstants-stageFlags-parameter", + "text": " stageFlags must be a valid combination of VkShaderStageFlagBits values" + }, + { + "vuid": "VUID-vkCmdPushConstants-stageFlags-requiredbitmask", + "text": " stageFlags must not be 0" + }, + { + "vuid": "VUID-vkCmdPushConstants-pValues-parameter", + "text": " pValues must be a valid pointer to an array of size bytes" + }, + { + "vuid": "VUID-vkCmdPushConstants-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdPushConstants-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdPushConstants-size-arraylength", + "text": " size must be greater than 0" + }, + { + "vuid": "VUID-vkCmdPushConstants-commonparent", + "text": " Both of commandBuffer, and layout must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCreateQueryPool": { + "core": [ + { + "vuid": "VUID-vkCreateQueryPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateQueryPool-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkQueryPoolCreateInfo structure" + }, + { + "vuid": "VUID-vkCreateQueryPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateQueryPool-pQueryPool-parameter", + "text": " pQueryPool must be a valid pointer to a VkQueryPool handle" + } + ] + }, + "VkQueryPoolCreateInfo": { + "core": [ + { + "vuid": "VUID-VkQueryPoolCreateInfo-queryType-00791", + "text": " If the &amp;lt;&amp;lt;features-features-pipelineStatisticsQuery,pipeline statistics queries&amp;gt;&amp;gt; feature is not enabled, queryType must not be VK_QUERY_TYPE_PIPELINE_STATISTICS" + }, + { + "vuid": "VUID-VkQueryPoolCreateInfo-queryType-00792", + "text": " If queryType is VK_QUERY_TYPE_PIPELINE_STATISTICS, pipelineStatistics must be a valid combination of VkQueryPipelineStatisticFlagBits values" + }, + { + "vuid": "VUID-VkQueryPoolCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO" + }, + { + "vuid": "VUID-VkQueryPoolCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkQueryPoolCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkQueryPoolCreateInfo-queryType-parameter", + "text": " queryType must be a valid VkQueryType value" + } + ] + }, + "vkDestroyQueryPool": { + "core": [ + { + "vuid": "VUID-vkDestroyQueryPool-queryPool-00793", + "text": " All submitted commands that refer to queryPool must have completed execution" + }, + { + "vuid": "VUID-vkDestroyQueryPool-queryPool-00794", + "text": " If VkAllocationCallbacks were provided when queryPool was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyQueryPool-queryPool-00795", + "text": " If no VkAllocationCallbacks were provided when queryPool was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyQueryPool-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyQueryPool-queryPool-parameter", + "text": " If queryPool is not VK_NULL_HANDLE, queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkDestroyQueryPool-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyQueryPool-queryPool-parent", + "text": " If queryPool is a valid handle, it must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdResetQueryPool": { + "core": [ + { + "vuid": "VUID-vkCmdResetQueryPool-firstQuery-00796", + "text": " firstQuery must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-firstQuery-00797", + "text": " The sum of firstQuery and queryCount must be less than or equal to the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdResetQueryPool-commonparent", + "text": " Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdBeginQuery": { + "core": [ + { + "vuid": "VUID-vkCmdBeginQuery-queryPool-00798", + "text": " The query identified by queryPool and query must currently not be &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryPool-00799", + "text": " The query identified by queryPool and query must be unavailable" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryType-00800", + "text": " If the &amp;lt;&amp;lt;features-features-occlusionQueryPrecise,precise occlusion queries&amp;gt;&amp;gt; feature is not enabled, or the queryType used to create queryPool was not VK_QUERY_TYPE_OCCLUSION, flags must not contain VK_QUERY_CONTROL_PRECISE_BIT" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryPool-00801", + "text": " queryPool must have been created with a queryType that differs from that of any other queries that have been made &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;, and are currently still active within commandBuffer" + }, + { + "vuid": "VUID-vkCmdBeginQuery-query-00802", + "text": " query must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryType-00803", + "text": " If the queryType used to create queryPool was VK_QUERY_TYPE_OCCLUSION, the VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryType-00804", + "text": " If the queryType used to create queryPool was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate graphics operations, the VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryType-00805", + "text": " If the queryType used to create queryPool was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate compute operations, the VkCommandPool that commandBuffer was allocated from must support compute operations" + }, + { + "vuid": "VUID-vkCmdBeginQuery-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBeginQuery-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkCmdBeginQuery-flags-parameter", + "text": " flags must be a valid combination of VkQueryControlFlagBits values" + }, + { + "vuid": "VUID-vkCmdBeginQuery-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBeginQuery-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdBeginQuery-commonparent", + "text": " Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdBeginQuery-None-00806", + "text": " All queries used by the command must not be active" + }, + { + "vuid": "VUID-vkCmdBeginQuery-None-00807", + "text": " All queries used by the command must be unavailable" + }, + { + "vuid": "VUID-vkCmdBeginQuery-query-00808", + "text": " If vkCmdBeginQuery is called within a render pass instance, the sum of query and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in queryPool" + } + ] + }, + "vkCmdEndQuery": { + "core": [ + { + "vuid": "VUID-vkCmdEndQuery-queryPool-00809", + "text": " The query identified by queryPool and query must currently be &amp;lt;&amp;lt;queries-operation-active,active&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdEndQuery-query-00810", + "text": " query must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdEndQuery-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdEndQuery-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkCmdEndQuery-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdEndQuery-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdEndQuery-commonparent", + "text": " Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdEndQuery-None-00811", + "text": " All queries used by the command must be active" + }, + { + "vuid": "VUID-vkCmdEndQuery-query-00812", + "text": " If vkCmdEndQuery is called within a render pass instance, the sum of query and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in queryPool" + } + ] + }, + "vkGetQueryPoolResults": { + "core": [ + { + "vuid": "VUID-vkGetQueryPoolResults-firstQuery-00813", + "text": " firstQuery must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-flags-00814", + "text": " If VK_QUERY_RESULT_64_BIT is not set in flags then pData and stride must be multiples of 4" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-flags-00815", + "text": " If VK_QUERY_RESULT_64_BIT is set in flags then pData and stride must be multiples of 8" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-firstQuery-00816", + "text": " The sum of firstQuery and queryCount must be less than or equal to the number of queries in queryPool" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-dataSize-00817", + "text": " dataSize must be large enough to contain the result of each query, as described &amp;lt;&amp;lt;queries-operation-memorylayout,here&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-queryType-00818", + "text": " If the queryType used to create queryPool was VK_QUERY_TYPE_TIMESTAMP, flags must not contain VK_QUERY_RESULT_PARTIAL_BIT" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-pData-parameter", + "text": " pData must be a valid pointer to an array of dataSize bytes" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-flags-parameter", + "text": " flags must be a valid combination of VkQueryResultFlagBits values" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-dataSize-arraylength", + "text": " dataSize must be greater than 0" + }, + { + "vuid": "VUID-vkGetQueryPoolResults-queryPool-parent", + "text": " queryPool must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdCopyQueryPoolResults": { + "core": [ + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-dstOffset-00819", + "text": " dstOffset must be less than the size of dstBuffer" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-firstQuery-00820", + "text": " firstQuery must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-firstQuery-00821", + "text": " The sum of firstQuery and queryCount must be less than or equal to the number of queries in queryPool" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-flags-00822", + "text": " If VK_QUERY_RESULT_64_BIT is not set in flags then dstOffset and stride must be multiples of 4" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-flags-00823", + "text": " If VK_QUERY_RESULT_64_BIT is set in flags then dstOffset and stride must be multiples of 8" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-dstBuffer-00824", + "text": " dstBuffer must have enough storage, from dstOffset, to contain the result of each query, as described &amp;lt;&amp;lt;queries-operation-memorylayout,here&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-dstBuffer-00825", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-dstBuffer-00826", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-queryType-00827", + "text": " If the queryType used to create queryPool was VK_QUERY_TYPE_TIMESTAMP, flags must not contain VK_QUERY_RESULT_PARTIAL_BIT" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-flags-parameter", + "text": " flags must be a valid combination of VkQueryResultFlagBits values" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdCopyQueryPoolResults-commonparent", + "text": " Each of commandBuffer, dstBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdWriteTimestamp": { + "core": [ + { + "vuid": "VUID-vkCmdWriteTimestamp-queryPool-01416", + "text": " queryPool must have been created with a queryType of VK_QUERY_TYPE_TIMESTAMP" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-queryPool-00828", + "text": " The query identified by queryPool and query must be unavailable" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-timestampValidBits-00829", + "text": " The command pool’s queue family must support a non-zero timestampValidBits" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-pipelineStage-parameter", + "text": " pipelineStage must be a valid VkPipelineStageFlagBits value" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-commonparent", + "text": " Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdWriteTimestamp-None-00830", + "text": " All queries used by the command must be unavailable" + }, + { + "vuid": "VUID-vkCmdWriteTimestamp-query-00831", + "text": " If vkCmdWriteTimestamp is called within a render pass instance, the sum of query and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in queryPool" + } + ] + }, + "vkCmdClearColorImage": { + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdClearColorImage-image-00001", + "text": " image must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + } + ], + "core": [ + { + "vuid": "VUID-vkCmdClearColorImage-image-00002", + "text": " image must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdClearColorImage-image-00003", + "text": " If image is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdClearColorImage-imageLayout-00004", + "text": " imageLayout must specify the layout of the image subresource ranges of image specified in pRanges at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdClearColorImage-baseMipLevel-01470", + "text": " The VkImageSubresourceRange::baseMipLevel members of the elements of the pRanges array must each be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearColorImage-pRanges-01692", + "text": " For each VkImageSubresourceRange element of pRanges, if the levelCount member is not VK_REMAINING_MIP_LEVELS, then baseMipLevel + levelCount must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearColorImage-baseArrayLayer-01472", + "text": " The VkImageSubresourceRange::baseArrayLayer members of the elements of the pRanges array must each be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearColorImage-pRanges-01693", + "text": " For each VkImageSubresourceRange element of pRanges, if the layerCount member is not VK_REMAINING_ARRAY_LAYERS, then baseArrayLayer + layerCount must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearColorImage-image-00007", + "text": " image must not have a compressed or depth/stencil format" + }, + { + "vuid": "VUID-vkCmdClearColorImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdClearColorImage-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdClearColorImage-imageLayout-parameter", + "text": " imageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdClearColorImage-pColor-parameter", + "text": " pColor must be a valid pointer to a valid VkClearColorValue union" + }, + { + "vuid": "VUID-vkCmdClearColorImage-pRanges-parameter", + "text": " pRanges must be a valid pointer to an array of rangeCount valid VkImageSubresourceRange structures" + }, + { + "vuid": "VUID-vkCmdClearColorImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdClearColorImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdClearColorImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdClearColorImage-rangeCount-arraylength", + "text": " rangeCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdClearColorImage-commonparent", + "text": " Both of commandBuffer, and image must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkCmdClearColorImage-image-01545", + "text": " image must not use a format listed in &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion&amp;gt;&amp;gt;" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdClearColorImage-imageLayout-00005", + "text": " imageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdClearColorImage-imageLayout-01394", + "text": " imageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR" + } + ] + }, + "vkCmdClearDepthStencilImage": { + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdClearDepthStencilImage-image-00008", + "text": " image must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + } + ], + "core": [ + { + "vuid": "VUID-vkCmdClearDepthStencilImage-image-00009", + "text": " image must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-image-00010", + "text": " If image is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-imageLayout-00011", + "text": " imageLayout must specify the layout of the image subresource ranges of image specified in pRanges at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-imageLayout-00012", + "text": " imageLayout must be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-baseMipLevel-01474", + "text": " The VkImageSubresourceRange::baseMipLevel members of the elements of the pRanges array must each be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-pRanges-01694", + "text": " For each VkImageSubresourceRange element of pRanges, if the levelCount member is not VK_REMAINING_MIP_LEVELS, then baseMipLevel + levelCount must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-baseArrayLayer-01476", + "text": " The VkImageSubresourceRange::baseArrayLayer members of the elements of the pRanges array must each be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-pRanges-01695", + "text": " For each VkImageSubresourceRange element of pRanges, if the layerCount member is not VK_REMAINING_ARRAY_LAYERS, then baseArrayLayer + layerCount must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-image-00014", + "text": " image must have a depth/stencil format" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-imageLayout-parameter", + "text": " imageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-pDepthStencil-parameter", + "text": " pDepthStencil must be a valid pointer to a valid VkClearDepthStencilValue structure" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-pRanges-parameter", + "text": " pRanges must be a valid pointer to an array of rangeCount valid VkImageSubresourceRange structures" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-rangeCount-arraylength", + "text": " rangeCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdClearDepthStencilImage-commonparent", + "text": " Both of commandBuffer, and image must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdClearAttachments": { + "core": [ + { + "vuid": "VUID-vkCmdClearAttachments-aspectMask-00015", + "text": " If the aspectMask member of any element of pAttachments contains VK_IMAGE_ASPECT_COLOR_BIT, the colorAttachment member of that element must refer to a valid color attachment in the current subpass" + }, + { + "vuid": "VUID-vkCmdClearAttachments-pRects-00016", + "text": " The rectangular region specified by each element of pRects must be contained within the render area of the current render pass instance" + }, + { + "vuid": "VUID-vkCmdClearAttachments-pRects-00017", + "text": " The layers specified by each element of pRects must be contained within every attachment that pAttachments refers to" + }, + { + "vuid": "VUID-vkCmdClearAttachments-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdClearAttachments-pAttachments-parameter", + "text": " pAttachments must be a valid pointer to an array of attachmentCount valid VkClearAttachment structures" + }, + { + "vuid": "VUID-vkCmdClearAttachments-pRects-parameter", + "text": " pRects must be a valid pointer to an array of rectCount VkClearRect structures" + }, + { + "vuid": "VUID-vkCmdClearAttachments-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdClearAttachments-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdClearAttachments-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdClearAttachments-attachmentCount-arraylength", + "text": " attachmentCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdClearAttachments-rectCount-arraylength", + "text": " rectCount must be greater than 0" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdClearAttachments-baseArrayLayer-00018", + "text": " If the render pass instance this is recorded in uses multiview, then baseArrayLayer must be zero and layerCount must be one." + } + ] + }, + "VkClearAttachment": { + "core": [ + { + "vuid": "VUID-VkClearAttachment-aspectMask-00019", + "text": " If aspectMask includes VK_IMAGE_ASPECT_COLOR_BIT, it must not include VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT" + }, + { + "vuid": "VUID-VkClearAttachment-aspectMask-00020", + "text": " aspectMask must not include VK_IMAGE_ASPECT_METADATA_BIT" + }, + { + "vuid": "VUID-VkClearAttachment-clearValue-00021", + "text": " clearValue must be a valid VkClearValue union" + }, + { + "vuid": "VUID-VkClearAttachment-aspectMask-parameter", + "text": " aspectMask must be a valid combination of VkImageAspectFlagBits values" + }, + { + "vuid": "VUID-VkClearAttachment-aspectMask-requiredbitmask", + "text": " aspectMask must not be 0" + } + ] + }, + "VkClearDepthStencilValue": { + "(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkClearDepthStencilValue-depth-00022", + "text": " Unless the VK_EXT_depth_range_unrestricted extension is enabled depth must be between 0.0 and 1.0, inclusive" + } + ], + "!(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkClearDepthStencilValue-depth-00022", + "text": " depth must be between 0.0 and 1.0, inclusive" + } + ] + }, + "VkClearValue": { + "core": [ + { + "vuid": "VUID-VkClearValue-depthStencil-00023", + "text": " depthStencil must be a valid VkClearDepthStencilValue structure" + } + ] + }, + "vkCmdFillBuffer": { + "core": [ + { + "vuid": "VUID-vkCmdFillBuffer-dstOffset-00024", + "text": " dstOffset must be less than the size of dstBuffer" + }, + { + "vuid": "VUID-vkCmdFillBuffer-dstOffset-00025", + "text": " dstOffset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdFillBuffer-size-00026", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be greater than 0" + }, + { + "vuid": "VUID-vkCmdFillBuffer-size-00027", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to the size of dstBuffer minus dstOffset" + }, + { + "vuid": "VUID-vkCmdFillBuffer-size-00028", + "text": " If size is not equal to VK_WHOLE_SIZE, size must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdFillBuffer-dstBuffer-00029", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdFillBuffer-dstBuffer-00031", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdFillBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdFillBuffer-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdFillBuffer-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdFillBuffer-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics or compute operations" + }, + { + "vuid": "VUID-vkCmdFillBuffer-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdFillBuffer-commonparent", + "text": " Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "!(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdFillBuffer-commandBuffer-00030", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics or compute operations" + } + ] + }, + "vkCmdUpdateBuffer": { + "core": [ + { + "vuid": "VUID-vkCmdUpdateBuffer-dstOffset-00032", + "text": " dstOffset must be less than the size of dstBuffer" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dataSize-00033", + "text": " dataSize must be less than or equal to the size of dstBuffer minus dstOffset" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dstBuffer-00034", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dstBuffer-00035", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dstOffset-00036", + "text": " dstOffset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dataSize-00037", + "text": " dataSize must be less than or equal to 65536" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dataSize-00038", + "text": " dataSize must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-pData-parameter", + "text": " pData must be a valid pointer to an array of dataSize bytes" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-dataSize-arraylength", + "text": " dataSize must be greater than 0" + }, + { + "vuid": "VUID-vkCmdUpdateBuffer-commonparent", + "text": " Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdCopyBuffer": { + "core": [ + { + "vuid": "VUID-vkCmdCopyBuffer-size-00112", + "text": " The size member of each element of pRegions must be greater than 0" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-srcOffset-00113", + "text": " The srcOffset member of each element of pRegions must be less than the size of srcBuffer" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-dstOffset-00114", + "text": " The dstOffset member of each element of pRegions must be less than the size of dstBuffer" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-size-00115", + "text": " The size member of each element of pRegions must be less than or equal to the size of srcBuffer minus srcOffset" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-size-00116", + "text": " The size member of each element of pRegions must be less than or equal to the size of dstBuffer minus dstOffset" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-pRegions-00117", + "text": " The union of the source regions, and the union of the destination regions, specified by the elements of pRegions, must not overlap in memory" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-srcBuffer-00118", + "text": " srcBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-srcBuffer-00119", + "text": " If srcBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-dstBuffer-00120", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-dstBuffer-00121", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-srcBuffer-parameter", + "text": " srcBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount VkBufferCopy structures" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdCopyBuffer-commonparent", + "text": " Each of commandBuffer, dstBuffer, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdCopyImage": { + "core": [ + { + "vuid": "VUID-vkCmdCopyImage-pRegions-00122", + "text": " The source region specified by each element of pRegions must be a region that is contained within srcImage" + }, + { + "vuid": "VUID-vkCmdCopyImage-pRegions-00123", + "text": " The destination region specified by each element of pRegions must be a region that is contained within dstImage" + }, + { + "vuid": "VUID-vkCmdCopyImage-pRegions-00124", + "text": " The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImage-00126", + "text": " srcImage must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImageLayout-00128", + "text": " srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImage-00131", + "text": " dstImage must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImageLayout-00133", + "text": " dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImage-00136", + "text": " The sample count of srcImage and dstImage must match" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcSubresource-01696", + "text": " The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstSubresource-01697", + "text": " The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcSubresource-01698", + "text": " The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstSubresource-01699", + "text": " The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcOffset-01783", + "text": " The srcOffset and and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstOffset-01784", + "text": " The dstOffset and and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties" + }, + { + "vuid": "VUID-vkCmdCopyImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImage-parameter", + "text": " srcImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImageLayout-parameter", + "text": " srcImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImage-parameter", + "text": " dstImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImageLayout-parameter", + "text": " dstImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdCopyImage-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount valid VkImageCopy structures" + }, + { + "vuid": "VUID-vkCmdCopyImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdCopyImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdCopyImage-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdCopyImage-commonparent", + "text": " Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdCopyImage-srcImage-00125", + "text": " srcImage must use a format that supports VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImage-00130", + "text": " dstImage must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + } + ], + "!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkCmdCopyImage-srcImage-00127", + "text": " If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImage-00132", + "text": " If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImage-00135", + "text": " The VkFormat of each of srcImage and dstImage must be compatible, as defined &amp;lt;&amp;lt;copies-images-format-compatibility, below&amp;gt;&amp;gt;" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkCmdCopyImage-srcImage-01546", + "text": " If srcImage is non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImage-01547", + "text": " If dstImage is non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImage-srcImage-01548", + "text": " If the VkFormat of each of srcImage and dstImage is not a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, the VkFormat of each of srcImage and dstImage must be compatible, as defined &amp;lt;&amp;lt;copies-images-format-compatibility, below&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyImage-None-01549", + "text": " In a copy to or from a plane of a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar image&amp;gt;&amp;gt;, the VkFormat of the image and plane must be compatible according to &amp;lt;&amp;lt;features-formats-compatible-planes,the description of compatible planes&amp;gt;&amp;gt; for the plane being copied" + }, + { + "vuid": "VUID-vkCmdCopyImage-aspectMask-01550", + "text": " When a copy is performed to or from an image with a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, the aspectMask of the srcSubresource and/or dstSubresource that refers to the multi-planar image must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR (with VK_IMAGE_ASPECT_PLANE_2_BIT_KHR valid only for a VkFormat with three planes)" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyImage-srcImageLayout-00129", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdCopyImage-dstImageLayout-00134", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyImage-dstImageLayout-01395", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR" + } + ] + }, + "VkImageCopy": { + "!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageCopy-aspectMask-00137", + "text": " The aspectMask member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageCopy-srcOffset-00157", + "text": " If the calling command’s srcImage is a compressed image, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkImageCopy-extent-00158", + "text": " If the calling command’s srcImage is a compressed image, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-extent-00159", + "text": " If the calling command’s srcImage is a compressed image, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-extent-00160", + "text": " If the calling command’s srcImage is a compressed image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth" + }, + { + "vuid": "VUID-VkImageCopy-dstOffset-00162", + "text": " If the calling command’s dstImage is a compressed format image, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkImageCopy-extent-00163", + "text": " If the calling command’s dstImage is a compressed format image, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-extent-00164", + "text": " If the calling command’s dstImage is a compressed format image, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-extent-00165", + "text": " If the calling command’s dstImage is a compressed format image, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkImageCopy-srcImage-01551", + "text": " If neither the calling command’s srcImage nor the calling command’s dstImage has a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion, multi-planar image format&amp;gt;&amp;gt; then the aspectMask member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01552", + "text": " If the calling command’s srcImage has a VkFormat with &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,two planes&amp;gt;&amp;gt; then the srcSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01553", + "text": " If the calling command’s srcImage has a VkFormat with &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,three planes&amp;gt;&amp;gt; then the srcSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01554", + "text": " If the calling command’s dstImage has a VkFormat with &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,two planes&amp;gt;&amp;gt; then the dstSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR or VK_IMAGE_ASPECT_PLANE_1_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01555", + "text": " If the calling command’s dstImage has a VkFormat with &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,three planes&amp;gt;&amp;gt; then the dstSubresource aspectMask must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01556", + "text": " If the calling command’s srcImage has a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar image format&amp;gt;&amp;gt; and the dstImage does not have a multi-planar image format, the dstSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01557", + "text": " If the calling command’s dstImage has a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar image format&amp;gt;&amp;gt; and the srcImage does not have a multi-planar image format, the srcSubresource aspectMask must be VK_IMAGE_ASPECT_COLOR_BIT" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01727", + "text": " If the calling command’s srcImage is a compressed image, or a single-plane, “_422” image format, all members of srcOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01728", + "text": " If the calling command’s srcImage is a compressed image, or a single-plane, “_422” image format, extent.width must be a multiple of the compressed texel block width or (extent.width + srcOffset.x) must equal the source image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01729", + "text": " If the calling command’s srcImage is a compressed image, or a single-plane, “_422” image format, extent.height must be a multiple of the compressed texel block height or (extent.height + srcOffset.y) must equal the source image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01730", + "text": " If the calling command’s srcImage is a compressed image, or a single-plane, “_422” image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + srcOffset.z) must equal the source image subresource depth" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01731", + "text": " If the calling command’s dstImage is a compressed format image, or a single-plane, “_422” image format, all members of dstOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01732", + "text": " If the calling command’s dstImage is a compressed format image, or a single-plane, “_422” image format, extent.width must be a multiple of the compressed texel block width or (extent.width + dstOffset.x) must equal the destination image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01733", + "text": " If the calling command’s dstImage is a compressed format image, or a single-plane, “_422” image format, extent.height must be a multiple of the compressed texel block height or (extent.height + dstOffset.y) must equal the destination image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01734", + "text": " If the calling command’s dstImage is a compressed format image, or a single-plane, “_422” image format, extent.depth must be a multiple of the compressed texel block depth or (extent.depth + dstOffset.z) must equal the destination image subresource depth" + } + ], + "!(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkImageCopy-layerCount-00138", + "text": " The layerCount member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-00139", + "text": " If either of the calling command’s srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01789", + "text": " If the calling command’s srcImage or dstImage is of type VK_IMAGE_TYPE_2D, then extent.depth must be 1." + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-VkImageCopy-extent-00140", + "text": " The number of slices of the extent (for 3D) or layers of the srcSubresource (for non-3D) must match the number of slices of the extent (for 3D) or layers of the dstSubresource (for non-3D)" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-00141", + "text": " If either of the calling command’s srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of the corresponding subresource must be 0 and 1, respectively" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01790", + "text": " If both srcImage and dstImage are of type VK_IMAGE_TYPE_2D then then extent.depth must be 1." + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01791", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_2D, and the dstImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of srcSubresource." + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01792", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_2D, and the srcImage is of type VK_IMAGE_TYPE_3D, then extent.depth must equal to the layerCount member of dstSubresource." + } + ], + "core": [ + { + "vuid": "VUID-VkImageCopy-aspectMask-00142", + "text": " The aspectMask member of srcSubresource must specify aspects present in the calling command’s srcImage" + }, + { + "vuid": "VUID-VkImageCopy-aspectMask-00143", + "text": " The aspectMask member of dstSubresource must specify aspects present in the calling command’s dstImage" + }, + { + "vuid": "VUID-VkImageCopy-srcOffset-00144", + "text": " srcOffset.x and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the source image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-srcOffset-00145", + "text": " srcOffset.y and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the source image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-00146", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.y must be 0 and extent.height must be 1." + }, + { + "vuid": "VUID-VkImageCopy-srcOffset-00147", + "text": " srcOffset.z and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the source image subresource depth" + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01785", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.z must be 0 and extent.depth must be 1." + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01786", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.z must be 0 and extent.depth must be 1." + }, + { + "vuid": "VUID-VkImageCopy-srcImage-01787", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_2D, then srcOffset.z must be 0." + }, + { + "vuid": "VUID-VkImageCopy-dstImage-01788", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_2D, then dstOffset.z must be 0." + }, + { + "vuid": "VUID-VkImageCopy-dstOffset-00150", + "text": " dstOffset.x and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the destination image subresource width" + }, + { + "vuid": "VUID-VkImageCopy-dstOffset-00151", + "text": " dstOffset.y and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the destination image subresource height" + }, + { + "vuid": "VUID-VkImageCopy-dstImage-00152", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.y must be 0 and extent.height must be 1." + }, + { + "vuid": "VUID-VkImageCopy-dstOffset-00153", + "text": " dstOffset.z and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the destination image subresource depth" + }, + { + "vuid": "VUID-VkImageCopy-srcSubresource-parameter", + "text": " srcSubresource must be a valid VkImageSubresourceLayers structure" + }, + { + "vuid": "VUID-VkImageCopy-dstSubresource-parameter", + "text": " dstSubresource must be a valid VkImageSubresourceLayers structure" + } + ] + }, + "VkImageSubresourceLayers": { + "core": [ + { + "vuid": "VUID-VkImageSubresourceLayers-aspectMask-00167", + "text": " If aspectMask contains VK_IMAGE_ASPECT_COLOR_BIT, it must not contain either of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT" + }, + { + "vuid": "VUID-VkImageSubresourceLayers-aspectMask-00168", + "text": " aspectMask must not contain VK_IMAGE_ASPECT_METADATA_BIT" + }, + { + "vuid": "VUID-VkImageSubresourceLayers-layerCount-01700", + "text": " layerCount must be greater than 0" + }, + { + "vuid": "VUID-VkImageSubresourceLayers-aspectMask-parameter", + "text": " aspectMask must be a valid combination of VkImageAspectFlagBits values" + }, + { + "vuid": "VUID-VkImageSubresourceLayers-aspectMask-requiredbitmask", + "text": " aspectMask must not be 0" + } + ] + }, + "vkCmdCopyBufferToImage": { + "core": [ + { + "vuid": "VUID-vkCmdCopyBufferToImage-pRegions-00171", + "text": " The buffer region specified by each element of pRegions must be a region that is contained within srcBuffer" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-pRegions-00172", + "text": " The image region specified by each element of pRegions must be a region that is contained within dstImage" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-pRegions-00173", + "text": " The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-srcBuffer-00174", + "text": " srcBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-srcBuffer-00176", + "text": " If srcBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImage-00177", + "text": " dstImage must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImage-00178", + "text": " If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImage-00179", + "text": " dstImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImageLayout-00180", + "text": " dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-imageSubresource-01701", + "text": " The imageSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-imageSubresource-01702", + "text": " The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-imageOffset-01793", + "text": " The imageOffset and and imageExtent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-srcBuffer-parameter", + "text": " srcBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImage-parameter", + "text": " dstImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImageLayout-parameter", + "text": " dstImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount valid VkBufferImageCopy structures" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdCopyBufferToImage-commonparent", + "text": " Each of commandBuffer, dstImage, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImage-00175", + "text": " dstImage must use a format that supports VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImageLayout-00181", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyBufferToImage-dstImageLayout-01396", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_GENERAL, or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR" + } + ] + }, + "vkCmdCopyImageToBuffer": { + "core": [ + { + "vuid": "VUID-vkCmdCopyImageToBuffer-pRegions-00182", + "text": " The image region specified by each element of pRegions must be a region that is contained within srcImage" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-pRegions-00183", + "text": " The buffer region specified by each element of pRegions must be a region that is contained within dstBuffer" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-pRegions-00184", + "text": " The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImage-00186", + "text": " srcImage must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImage-00187", + "text": " If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImage-00188", + "text": " srcImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImageLayout-00189", + "text": " srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-dstBuffer-00191", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-dstBuffer-00192", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-imageSubresource-01703", + "text": " The imageSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-imageSubresource-01704", + "text": " The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-imageOffset-01794", + "text": " The imageOffset and and imageExtent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImage-parameter", + "text": " srcImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImageLayout-parameter", + "text": " srcImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount valid VkBufferImageCopy structures" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdCopyImageToBuffer-commonparent", + "text": " Each of commandBuffer, dstBuffer, and srcImage must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_maintenance1)": [ + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImage-00185", + "text": " srcImage must use a format that supports VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImageLayout-00190", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdCopyImageToBuffer-srcImageLayout-01397", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ] + }, + "VkBufferImageCopy": { + "!(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkBufferImageCopy-bufferOffset-00193", + "text": " If the calling command’s VkImage parameter’s format is not a depth/stencil format, then bufferOffset must be a multiple of the format’s element size" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferRowLength-00203", + "text": " If the calling command’s VkImage parameter is a compressed image, bufferRowLength must be a multiple of the compressed texel block width" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferImageHeight-00204", + "text": " If the calling command’s VkImage parameter is a compressed image, bufferImageHeight must be a multiple of the compressed texel block height" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageOffset-00205", + "text": " If the calling command’s VkImage parameter is a compressed image, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferOffset-00206", + "text": " If the calling command’s VkImage parameter is a compressed image, bufferOffset must be a multiple of the compressed texel block size in bytes" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageExtent-00207", + "text": " If the calling command’s VkImage parameter is a compressed image, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageExtent-00208", + "text": " If the calling command’s VkImage parameter is a compressed image, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageExtent-00209", + "text": " If the calling command’s VkImage parameter is a compressed image, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkBufferImageCopy-bufferOffset-01558", + "text": " If the calling command’s VkImage parameter’s format is not a depth/stencil format or a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, then bufferOffset must be a multiple of the format’s element size" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferOffset-01559", + "text": " If the calling command’s VkImage parameter’s format is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, then bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in &amp;lt;&amp;lt;features-formats-compatible-planes&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01735", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferRowLength must be a multiple of the compressed texel block width" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01736", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferImageHeight must be a multiple of the compressed texel block height" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01737", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, all members of imageOffset must be a multiple of the corresponding dimensions of the compressed texel block" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01738", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, bufferOffset must be a multiple of the compressed texel block size in bytes" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01739", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.width must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the image subresource width" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01740", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.height must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the image subresource height" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-01741", + "text": " If the calling command’s VkImage parameter is a compressed image, or a single-plane, “_422” image format, imageExtent.depth must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the image subresource depth" + }, + { + "vuid": "VUID-VkBufferImageCopy-aspectMask-01560", + "text": " If the calling command’s VkImage parameter’s format is a &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion,multi-planar format&amp;gt;&amp;gt;, then the aspectMask member of imageSubresource must be VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, or VK_IMAGE_ASPECT_PLANE_2_BIT_KHR (with VK_IMAGE_ASPECT_PLANE_2_BIT_KHR valid only for image formats with three planes)" + } + ], + "core": [ + { + "vuid": "VUID-VkBufferImageCopy-bufferOffset-00194", + "text": " bufferOffset must be a multiple of 4" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferRowLength-00195", + "text": " bufferRowLength must be 0, or greater than or equal to the width member of imageExtent" + }, + { + "vuid": "VUID-VkBufferImageCopy-bufferImageHeight-00196", + "text": " bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageOffset-00197", + "text": " imageOffset.x and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the image subresource width" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageOffset-00198", + "text": " imageOffset.y and (imageExtent.height + imageOffset.y) must both be greater than or equal to 0 and less than or equal to the image subresource height" + }, + { + "vuid": "VUID-VkBufferImageCopy-srcImage-00199", + "text": " If the calling command’s srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D, then imageOffset.y must be 0 and imageExtent.height must be 1." + }, + { + "vuid": "VUID-VkBufferImageCopy-imageOffset-00200", + "text": " imageOffset.z and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the image subresource depth" + }, + { + "vuid": "VUID-VkBufferImageCopy-srcImage-00201", + "text": " If the calling command’s srcImage (vkCmdCopyImageToBuffer) or dstImage (vkCmdCopyBufferToImage) is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then imageOffset.z must be 0 and imageExtent.depth must be 1" + }, + { + "vuid": "VUID-VkBufferImageCopy-aspectMask-00211", + "text": " The aspectMask member of imageSubresource must specify aspects present in the calling command’s VkImage parameter" + }, + { + "vuid": "VUID-VkBufferImageCopy-aspectMask-00212", + "text": " The aspectMask member of imageSubresource must only have a single bit set" + }, + { + "vuid": "VUID-VkBufferImageCopy-baseArrayLayer-00213", + "text": " If the calling command’s VkImage parameter is of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of imageSubresource must be 0 and 1, respectively" + }, + { + "vuid": "VUID-VkBufferImageCopy-None-00214", + "text": " When copying to the depth aspect of an image subresource, the data in the source buffer must be in the range [0,1]" + }, + { + "vuid": "VUID-VkBufferImageCopy-imageSubresource-parameter", + "text": " imageSubresource must be a valid VkImageSubresourceLayers structure" + } + ] + }, + "vkCmdBlitImage": { + "core": [ + { + "vuid": "VUID-vkCmdBlitImage-pRegions-00215", + "text": " The source region specified by each element of pRegions must be a region that is contained within srcImage" + }, + { + "vuid": "VUID-vkCmdBlitImage-pRegions-00216", + "text": " The destination region specified by each element of pRegions must be a region that is contained within dstImage" + }, + { + "vuid": "VUID-vkCmdBlitImage-pRegions-00217", + "text": " The union of all destination regions, specified by the elements of pRegions, must not overlap in memory with any texel that may be sampled during the blit operation" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00218", + "text": " srcImage must use a format that supports VK_FORMAT_FEATURE_BLIT_SRC_BIT, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00219", + "text": " srcImage must have been created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00220", + "text": " If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImageLayout-00221", + "text": " srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-00223", + "text": " dstImage must use a format that supports VK_FORMAT_FEATURE_BLIT_DST_BIT, which is indicated by VkFormatProperties::linearTilingFeatures (for linearly tiled images) or VkFormatProperties::optimalTilingFeatures (for optimally tiled images) - as returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-00224", + "text": " dstImage must have been created with VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-00225", + "text": " If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImageLayout-00226", + "text": " dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00228", + "text": " The sample count of srcImage and dstImage must both be equal to VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00229", + "text": " If either of srcImage or dstImage was created with a signed integer VkFormat, the other must also have been created with a signed integer VkFormat" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00230", + "text": " If either of srcImage or dstImage was created with an unsigned integer VkFormat, the other must also have been created with an unsigned integer VkFormat" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00231", + "text": " If either of srcImage or dstImage was created with a depth/stencil format, the other must have exactly the same format" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00232", + "text": " If srcImage was created with a depth/stencil format, filter must be VK_FILTER_NEAREST" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-00233", + "text": " srcImage must have been created with a samples value of VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-00234", + "text": " dstImage must have been created with a samples value of VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdBlitImage-filter-00235", + "text": " If filter is VK_FILTER_LINEAR, srcImage must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcSubresource-01705", + "text": " The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstSubresource-01706", + "text": " The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcSubresource-01707", + "text": " The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstSubresource-01708", + "text": " The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdBlitImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImage-parameter", + "text": " srcImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdBlitImage-srcImageLayout-parameter", + "text": " srcImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-parameter", + "text": " dstImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImageLayout-parameter", + "text": " dstImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdBlitImage-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount valid VkImageBlit structures" + }, + { + "vuid": "VUID-vkCmdBlitImage-filter-parameter", + "text": " filter must be a valid VkFilter value" + }, + { + "vuid": "VUID-vkCmdBlitImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBlitImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBlitImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdBlitImage-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdBlitImage-commonparent", + "text": " Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-vkCmdBlitImage-srcImage-01561", + "text": " srcImage must not use a format listed in &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImage-01562", + "text": " dstImage must not use a format listed in &amp;lt;&amp;lt;features-formats-requiring-sampler-ycbcr-conversion&amp;gt;&amp;gt;" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdBlitImage-srcImageLayout-00222", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImageLayout-00227", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdBlitImage-srcImageLayout-01398", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdBlitImage-dstImageLayout-01399", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdBlitImage-filter-00236", + "text": " If filter is VK_FILTER_CUBIC_IMG, srcImage must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdBlitImage-filter-00237", + "text": " If filter is VK_FILTER_CUBIC_IMG, srcImage must have a VkImageType of VK_IMAGE_TYPE_3D" + } + ] + }, + "VkImageBlit": { + "core": [ + { + "vuid": "VUID-VkImageBlit-aspectMask-00238", + "text": " The aspectMask member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageBlit-layerCount-00239", + "text": " The layerCount member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageBlit-srcImage-00240", + "text": " If either of the calling command’s srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively" + }, + { + "vuid": "VUID-VkImageBlit-aspectMask-00241", + "text": " The aspectMask member of srcSubresource must specify aspects present in the calling command’s srcImage" + }, + { + "vuid": "VUID-VkImageBlit-aspectMask-00242", + "text": " The aspectMask member of dstSubresource must specify aspects present in the calling command’s dstImage" + }, + { + "vuid": "VUID-VkImageBlit-srcOffset-00243", + "text": " srcOffset[0].x and srcOffset[1].x must both be greater than or equal to 0 and less than or equal to the source image subresource width" + }, + { + "vuid": "VUID-VkImageBlit-srcOffset-00244", + "text": " srcOffset[0].y and srcOffset[1].y must both be greater than or equal to 0 and less than or equal to the source image subresource height" + }, + { + "vuid": "VUID-VkImageBlit-srcImage-00245", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset[0].y must be 0 and srcOffset[1].y must be 1." + }, + { + "vuid": "VUID-VkImageBlit-srcOffset-00246", + "text": " srcOffset[0].z and srcOffset[1].z must both be greater than or equal to 0 and less than or equal to the source image subresource depth" + }, + { + "vuid": "VUID-VkImageBlit-srcImage-00247", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then srcOffset[0].z must be 0 and srcOffset[1].z must be 1." + }, + { + "vuid": "VUID-VkImageBlit-dstOffset-00248", + "text": " dstOffset[0].x and dstOffset[1].x must both be greater than or equal to 0 and less than or equal to the destination image subresource width" + }, + { + "vuid": "VUID-VkImageBlit-dstOffset-00249", + "text": " dstOffset[0].y and dstOffset[1].y must both be greater than or equal to 0 and less than or equal to the destination image subresource height" + }, + { + "vuid": "VUID-VkImageBlit-dstImage-00250", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset[0].y must be 0 and dstOffset[1].y must be 1." + }, + { + "vuid": "VUID-VkImageBlit-dstOffset-00251", + "text": " dstOffset[0].z and dstOffset[1].z must both be greater than or equal to 0 and less than or equal to the destination image subresource depth" + }, + { + "vuid": "VUID-VkImageBlit-dstImage-00252", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then dstOffset[0].z must be 0 and dstOffset[1].z must be 1." + }, + { + "vuid": "VUID-VkImageBlit-srcSubresource-parameter", + "text": " srcSubresource must be a valid VkImageSubresourceLayers structure" + }, + { + "vuid": "VUID-VkImageBlit-dstSubresource-parameter", + "text": " dstSubresource must be a valid VkImageSubresourceLayers structure" + } + ] + }, + "vkCmdResolveImage": { + "core": [ + { + "vuid": "VUID-vkCmdResolveImage-pRegions-00253", + "text": " The source region specified by each element of pRegions must be a region that is contained within srcImage" + }, + { + "vuid": "VUID-vkCmdResolveImage-pRegions-00254", + "text": " The destination region specified by each element of pRegions must be a region that is contained within dstImage" + }, + { + "vuid": "VUID-vkCmdResolveImage-pRegions-00255", + "text": " The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImage-00256", + "text": " If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImage-00257", + "text": " srcImage must have a sample count equal to any valid sample count value other than VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImage-00258", + "text": " If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImage-00259", + "text": " dstImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImageLayout-00260", + "text": " srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImageLayout-00262", + "text": " dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImage-00264", + "text": " If dstImage was created with tiling equal to VK_IMAGE_TILING_LINEAR, dstImage must have been created with a format that supports being a color attachment, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in VkFormatProperties::linearTilingFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImage-00265", + "text": " If dstImage was created with tiling equal to VK_IMAGE_TILING_OPTIMAL, dstImage must have been created with a format that supports being a color attachment, as specified by the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImage-01386", + "text": " srcImage and dstImage must have been created with the same image format" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcSubresource-01709", + "text": " The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstSubresource-01710", + "text": " The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcSubresource-01711", + "text": " The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstSubresource-01712", + "text": " The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created" + }, + { + "vuid": "VUID-vkCmdResolveImage-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImage-parameter", + "text": " srcImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdResolveImage-srcImageLayout-parameter", + "text": " srcImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImage-parameter", + "text": " dstImage must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImageLayout-parameter", + "text": " dstImageLayout must be a valid VkImageLayout value" + }, + { + "vuid": "VUID-vkCmdResolveImage-pRegions-parameter", + "text": " pRegions must be a valid pointer to an array of regionCount valid VkImageResolve structures" + }, + { + "vuid": "VUID-vkCmdResolveImage-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdResolveImage-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdResolveImage-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdResolveImage-regionCount-arraylength", + "text": " regionCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdResolveImage-commonparent", + "text": " Each of commandBuffer, dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdResolveImage-srcImageLayout-00261", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImageLayout-00263", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ], + "(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkCmdResolveImage-srcImageLayout-01400", + "text": " srcImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + }, + { + "vuid": "VUID-vkCmdResolveImage-dstImageLayout-01401", + "text": " dstImageLayout must be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL" + } + ] + }, + "VkImageResolve": { + "core": [ + { + "vuid": "VUID-VkImageResolve-aspectMask-00266", + "text": " The aspectMask member of srcSubresource and dstSubresource must only contain VK_IMAGE_ASPECT_COLOR_BIT" + }, + { + "vuid": "VUID-VkImageResolve-layerCount-00267", + "text": " The layerCount member of srcSubresource and dstSubresource must match" + }, + { + "vuid": "VUID-VkImageResolve-srcImage-00268", + "text": " If either of the calling command’s srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively" + }, + { + "vuid": "VUID-VkImageResolve-srcOffset-00269", + "text": " srcOffset.x and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the source image subresource width" + }, + { + "vuid": "VUID-VkImageResolve-srcOffset-00270", + "text": " srcOffset.y and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the source image subresource height" + }, + { + "vuid": "VUID-VkImageResolve-srcImage-00271", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D, then srcOffset.y must be 0 and extent.height must be 1." + }, + { + "vuid": "VUID-VkImageResolve-srcOffset-00272", + "text": " srcOffset.z and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the source image subresource depth" + }, + { + "vuid": "VUID-VkImageResolve-srcImage-00273", + "text": " If the calling command’s srcImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then srcOffset.z must be 0 and extent.depth must be 1." + }, + { + "vuid": "VUID-VkImageResolve-dstOffset-00274", + "text": " dstOffset.x and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the destination image subresource width" + }, + { + "vuid": "VUID-VkImageResolve-dstOffset-00275", + "text": " dstOffset.y and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the destination image subresource height" + }, + { + "vuid": "VUID-VkImageResolve-dstImage-00276", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D, then dstOffset.y must be 0 and extent.height must be 1." + }, + { + "vuid": "VUID-VkImageResolve-dstOffset-00277", + "text": " dstOffset.z and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the destination image subresource depth" + }, + { + "vuid": "VUID-VkImageResolve-dstImage-00278", + "text": " If the calling command’s dstImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then dstOffset.z must be 0 and extent.depth must be 1." + }, + { + "vuid": "VUID-VkImageResolve-srcSubresource-parameter", + "text": " srcSubresource must be a valid VkImageSubresourceLayers structure" + }, + { + "vuid": "VUID-VkImageResolve-dstSubresource-parameter", + "text": " dstSubresource must be a valid VkImageSubresourceLayers structure" + } + ] + }, + "vkCmdWriteBufferMarkerAMD": { + "(VK_AMD_buffer_marker)": [ + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01798", + "text": " dstOffset must be less than or equal to the size of dstBuffer minus 4." + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01799", + "text": " dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-01800", + "text": " If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-dstOffset-01801", + "text": " dstOffset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-pipelineStage-parameter", + "text": " pipelineStage must be a valid VkPipelineStageFlagBits value" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-dstBuffer-parameter", + "text": " dstBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdWriteBufferMarkerAMD-commonparent", + "text": " Both of commandBuffer, and dstBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkPipelineInputAssemblyStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428", + "text": " If topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, primitiveRestartEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429", + "text": " If the &amp;lt;&amp;lt;features-features-geometryShader,geometry shaders&amp;gt;&amp;gt; feature is not enabled, topology must not be any of VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430", + "text": " If the &amp;lt;&amp;lt;features-features-tessellationShader,tessellation shaders&amp;gt;&amp;gt; feature is not enabled, topology must not be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineInputAssemblyStateCreateInfo-topology-parameter", + "text": " topology must be a valid VkPrimitiveTopology value" + } + ] + }, + "vkCmdBindIndexBuffer": { + "core": [ + { + "vuid": "VUID-vkCmdBindIndexBuffer-offset-00431", + "text": " offset must be less than the size of buffer" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-offset-00432", + "text": " The sum of offset and the address of the range of VkDeviceMemory object that is backing buffer, must be a multiple of the type indicated by indexType" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-buffer-00433", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDEX_BUFFER_BIT flag" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-buffer-00434", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-indexType-parameter", + "text": " indexType must be a valid VkIndexType value" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBindIndexBuffer-commonparent", + "text": " Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdDraw": { + "core": [ + { + "vuid": "VUID-vkCmdDraw-renderPass-00435", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDraw-subpass-00436", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDraw-None-00437", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDraw-None-00438", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDraw-None-00439", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDraw-None-00440", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDraw-None-00441", + "text": " For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in &amp;lt;&amp;lt;fxvertex-input&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDraw-None-00442", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDraw-None-00443", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDraw-None-00444", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDraw-None-00445", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDraw-None-00446", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDraw-None-00447", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDraw-None-00448", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDraw-None-00449", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDraw-linearTilingFeatures-00450", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDraw-None-01499", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDraw-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDraw-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDraw-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDraw-renderpass", + "text": " This command must only be called inside of a render pass instance" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDraw-linearTilingFeatures-00451", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDraw-None-00452", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDraw-maxMultiviewInstanceIndex-00453", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDraw-sampleLocationsEnable-01512", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "vkCmdDrawIndexed": { + "core": [ + { + "vuid": "VUID-vkCmdDrawIndexed-renderPass-00454", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexed-subpass-00455", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00456", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00457", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00458", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00459", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00460", + "text": " For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in &amp;lt;&amp;lt;fxvertex-input&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00461", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00462", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-indexSize-00463", + "text": " (indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00464", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00465", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00466", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00467", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00468", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00469", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-linearTilingFeatures-00470", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-01500", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDrawIndexed-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-renderpass", + "text": " This command must only be called inside of a render pass instance" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDrawIndexed-linearTilingFeatures-00471", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndexed-None-00472", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDrawIndexed-maxMultiviewInstanceIndex-00473", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDrawIndexed-sampleLocationsEnable-01513", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "vkCmdDrawIndirect": { + "core": [ + { + "vuid": "VUID-vkCmdDrawIndirect-buffer-00474", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-buffer-01660", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-offset-00475", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-drawCount-00476", + "text": " If drawCount is greater than 1, stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-drawCount-00477", + "text": " If the multi-draw indirect feature is not enabled, drawCount must be 0 or 1" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-firstInstance-00478", + "text": " If the &amp;lt;&amp;lt;features-features-drawIndirectFirstInstance,drawIndirectFirstInstance&amp;gt;&amp;gt; feature is not enabled, all the firstInstance members of the VkDrawIndirectCommand structures accessed by this command must be 0" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-renderPass-00479", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndirect-subpass-00480", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00481", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00482", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00483", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00484", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00485", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00486", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-drawCount-00487", + "text": " If drawCount is equal to 1, (offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-drawCount-00488", + "text": " If drawCount is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-drawCount-00489", + "text": " drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00490", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00491", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00492", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00493", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00494", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00495", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-linearTilingFeatures-00496", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-01501", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDrawIndirect-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-commonparent", + "text": " Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDrawIndirect-linearTilingFeatures-00497", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndirect-None-00498", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDrawIndirect-maxMultiviewInstanceIndex-00499", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDrawIndirect-sampleLocationsEnable-01514", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "VkDrawIndirectCommand": { + "core": [ + { + "vuid": "VUID-VkDrawIndirectCommand-None-00500", + "text": " For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in &amp;lt;&amp;lt;fxvertex-input&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkDrawIndirectCommand-firstInstance-00501", + "text": " If the &amp;lt;&amp;lt;features-features-drawIndirectFirstInstance,drawIndirectFirstInstance&amp;gt;&amp;gt; feature is not enabled, firstInstance must be 0" + } + ] + }, + "vkCmdDrawIndirectCountAMD": { + "(VK_AMD_draw_indirect_count)": [ + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-buffer-01661", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-buffer-01662", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-01663", + "text": " If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-01664", + "text": " countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-offset-00502", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBufferOffset-00503", + "text": " countBufferOffset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-stride-00504", + "text": " stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-maxDrawCount-00505", + "text": " If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-firstInstance-00506", + "text": " If the &amp;lt;&amp;lt;features-features-drawIndirectFirstInstance,drawIndirectFirstInstance&amp;gt;&amp;gt; feature is not enabled, all the firstInstance members of the VkDrawIndirectCommand structures accessed by this command must be 0" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-renderPass-00507", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-subpass-00508", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00509", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00510", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00511", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00512", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00513", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00514", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-00515", + "text": " If the count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-00516", + "text": " If the count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-00517", + "text": " The count stored in countBuffer must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00518", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00519", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00520", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00521", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00522", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-00523", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-linearTilingFeatures-00524", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-None-01502", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-countBuffer-parameter", + "text": " countBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-commonparent", + "text": " Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_AMD_draw_indirect_count)+(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-maxMultiviewInstanceIndex-00525", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_AMD_draw_indirect_count)+(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDrawIndirectCountAMD-sampleLocationsEnable-01515", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "vkCmdDrawIndexedIndirect": { + "core": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-buffer-00526", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-buffer-01665", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-offset-00527", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-drawCount-00528", + "text": " If drawCount is greater than 1, stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndexedIndirectCommand)" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-drawCount-00529", + "text": " If the multi-draw indirect feature is not enabled, drawCount must be 0 or 1" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-firstInstance-00530", + "text": " If the &amp;lt;&amp;lt;features-features-drawIndirectFirstInstance,drawIndirectFirstInstance&amp;gt;&amp;gt; feature is not enabled, all the firstInstance members of the VkDrawIndexedIndirectCommand structures accessed by this command must be 0" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-renderPass-00531", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-subpass-00532", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00533", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00534", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00535", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00536", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00537", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00538", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-drawCount-00539", + "text": " If drawCount is equal to 1, (offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-drawCount-00540", + "text": " If drawCount is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-drawCount-00541", + "text": " drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00542", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00543", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00544", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00545", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00546", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00547", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-linearTilingFeatures-00548", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-01503", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-commonparent", + "text": " Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-linearTilingFeatures-00549", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-None-00550", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ], + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-maxMultiviewInstanceIndex-00551", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-01516", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "VkDrawIndexedIndirectCommand": { + "core": [ + { + "vuid": "VUID-VkDrawIndexedIndirectCommand-None-00552", + "text": " For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in &amp;lt;&amp;lt;fxvertex-input&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkDrawIndexedIndirectCommand-indexSize-00553", + "text": " (indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer" + }, + { + "vuid": "VUID-VkDrawIndexedIndirectCommand-firstInstance-00554", + "text": " If the &amp;lt;&amp;lt;features-features-drawIndirectFirstInstance,drawIndirectFirstInstance&amp;gt;&amp;gt; feature is not enabled, firstInstance must be 0" + } + ] + }, + "vkCmdDrawIndexedIndirectCountAMD": { + "(VK_AMD_draw_indirect_count)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01666", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-01667", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01668", + "text": " If countBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-01669", + "text": " countBuffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-offset-00555", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBufferOffset-00556", + "text": " countBufferOffset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-stride-00557", + "text": " stride must be a multiple of 4 and must be greater than or equal to sizeof(VkDrawIndirectCommand)" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-maxDrawCount-00558", + "text": " If maxDrawCount is greater than or equal to 1, (stride {times} (maxDrawCount - 1) + offset + sizeof(VkDrawIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-firstInstance-00559", + "text": " If the drawIndirectFirstInstance feature is not enabled, all the firstInstance members of the VkDrawIndexedIndirectCommand structures accessed by this command must be 0" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-renderPass-00560", + "text": " The current render pass must be &amp;lt;&amp;lt;renderpass-compatibility,compatible&amp;gt;&amp;gt; with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-subpass-00561", + "text": " The subpass index of the current render pass must be equal to the subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00562", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00563", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set for VK_PIPELINE_BIND_POINT_GRAPHICS, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00564", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00565", + "text": " All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00566", + "text": " A valid graphics pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_GRAPHICS" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00567", + "text": " If the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must have been set on the current command buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00568", + "text": " If count stored in countBuffer is equal to 1, (offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-00569", + "text": " If count stored in countBuffer is greater than 1, (stride {times} (drawCount - 1) + offset + sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-drawCount-00570", + "text": " drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00571", + "text": " Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00572", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00573", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00574", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00575", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-00576", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-linearTilingFeatures-00577", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-None-01504", + "text": " Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command." + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-countBuffer-parameter", + "text": " countBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-commonparent", + "text": " Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_AMD_draw_indirect_count)+(VK_KHX_multiview)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-maxMultiviewInstanceIndex-00578", + "text": " If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewPropertiesKHX::maxMultiviewInstanceIndex." + } + ], + "(VK_AMD_draw_indirect_count)+(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdDrawIndexedIndirectCountAMD-sampleLocationsEnable-01517", + "text": " If the currently bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to VK_TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set" + } + ] + }, + "VkPipelineVertexInputStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-vertexBindingDescriptionCount-00613", + "text": " vertexBindingDescriptionCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-vertexAttributeDescriptionCount-00614", + "text": " vertexAttributeDescriptionCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributes" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-binding-00615", + "text": " For every binding specified by each element of pVertexAttributeDescriptions, a VkVertexInputBindingDescription must exist in pVertexBindingDescriptions with the same value of binding" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-00616", + "text": " All elements of pVertexBindingDescriptions must describe distinct binding numbers" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-00617", + "text": " All elements of pVertexAttributeDescriptions must describe distinct attribute locations" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-parameter", + "text": " If vertexBindingDescriptionCount is not 0, pVertexBindingDescriptions must be a valid pointer to an array of vertexBindingDescriptionCount valid VkVertexInputBindingDescription structures" + }, + { + "vuid": "VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-parameter", + "text": " If vertexAttributeDescriptionCount is not 0, pVertexAttributeDescriptions must be a valid pointer to an array of vertexAttributeDescriptionCount valid VkVertexInputAttributeDescription structures" + } + ] + }, + "VkVertexInputBindingDescription": { + "core": [ + { + "vuid": "VUID-VkVertexInputBindingDescription-binding-00618", + "text": " binding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings" + }, + { + "vuid": "VUID-VkVertexInputBindingDescription-stride-00619", + "text": " stride must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindingStride" + }, + { + "vuid": "VUID-VkVertexInputBindingDescription-inputRate-parameter", + "text": " inputRate must be a valid VkVertexInputRate value" + } + ] + }, + "VkVertexInputAttributeDescription": { + "core": [ + { + "vuid": "VUID-VkVertexInputAttributeDescription-location-00620", + "text": " location must be less than VkPhysicalDeviceLimits::maxVertexInputAttributes" + }, + { + "vuid": "VUID-VkVertexInputAttributeDescription-binding-00621", + "text": " binding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings" + }, + { + "vuid": "VUID-VkVertexInputAttributeDescription-offset-00622", + "text": " offset must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributeOffset" + }, + { + "vuid": "VUID-VkVertexInputAttributeDescription-format-00623", + "text": " format must be allowed as a vertex buffer format, as specified by the VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-VkVertexInputAttributeDescription-format-parameter", + "text": " format must be a valid VkFormat value" + } + ] + }, + "vkCmdBindVertexBuffers": { + "core": [ + { + "vuid": "VUID-vkCmdBindVertexBuffers-firstBinding-00624", + "text": " firstBinding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-firstBinding-00625", + "text": " The sum of firstBinding and bindingCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-pOffsets-00626", + "text": " All elements of pOffsets must be less than the size of the corresponding element in pBuffers" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-pBuffers-00627", + "text": " All elements of pBuffers must have been created with the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-pBuffers-00628", + "text": " Each element of pBuffers that is non-sparse must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-pBuffers-parameter", + "text": " pBuffers must be a valid pointer to an array of bindingCount valid VkBuffer handles" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-pOffsets-parameter", + "text": " pOffsets must be a valid pointer to an array of bindingCount VkDeviceSize values" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-bindingCount-arraylength", + "text": " bindingCount must be greater than 0" + }, + { + "vuid": "VUID-vkCmdBindVertexBuffers-commonparent", + "text": " Both of commandBuffer, and the elements of pBuffers must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkPipelineTessellationStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineTessellationStateCreateInfo-patchControlPoints-01214", + "text": " patchControlPoints must be greater than zero and less than or equal to VkPhysicalDeviceLimits::maxTessellationPatchSize" + }, + { + "vuid": "VUID-VkPipelineTessellationStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineTessellationStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkPipelineTessellationDomainOriginStateCreateInfoKHR" + }, + { + "vuid": "VUID-VkPipelineTessellationStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "VkPipelineTessellationDomainOriginStateCreateInfoKHR": { + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineTessellationDomainOriginStateCreateInfoKHR-domainOrigin-parameter", + "text": " domainOrigin must be a valid VkTessellationDomainOriginKHR value" + } + ] + }, + "VkPipelineViewportSwizzleStateCreateInfoNV": { + "(VK_NV_viewport_swizzle)": [ + { + "vuid": "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-01215", + "text": " viewportCount must match the viewportCount set in VkPipelineViewportStateCreateInfo" + }, + { + "vuid": "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV" + }, + { + "vuid": "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength", + "text": " viewportCount must be greater than 0" + } + ] + }, + "VkViewportSwizzleNV": { + "(VK_NV_viewport_swizzle)": [ + { + "vuid": "VUID-VkViewportSwizzleNV-x-parameter", + "text": " x must be a valid VkViewportCoordinateSwizzleNV value" + }, + { + "vuid": "VUID-VkViewportSwizzleNV-y-parameter", + "text": " y must be a valid VkViewportCoordinateSwizzleNV value" + }, + { + "vuid": "VUID-VkViewportSwizzleNV-z-parameter", + "text": " z must be a valid VkViewportCoordinateSwizzleNV value" + }, + { + "vuid": "VUID-VkViewportSwizzleNV-w-parameter", + "text": " w must be a valid VkViewportCoordinateSwizzleNV value" + } + ] + }, + "VkPipelineViewportWScalingStateCreateInfoNV": { + "(VK_NV_clip_space_w_scaling)": [ + { + "vuid": "VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV" + }, + { + "vuid": "VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength", + "text": " viewportCount must be greater than 0" + } + ] + }, + "vkCmdSetViewportWScalingNV": { + "(VK_NV_clip_space_w_scaling)": [ + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-None-01322", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-firstViewport-01323", + "text": " firstViewport must be less than VkPhysicalDeviceLimits::maxViewports" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-firstViewport-01324", + "text": " The sum of firstViewport and viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-pViewportWScalings-parameter", + "text": " pViewportWScalings must be a valid pointer to an array of viewportCount VkViewportWScalingNV structures" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdSetViewportWScalingNV-viewportCount-arraylength", + "text": " viewportCount must be greater than 0" + } + ] + }, + "VkPipelineViewportStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216", + "text": " If the multiple viewports feature is not enabled, viewportCount must be 1" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217", + "text": " If the multiple viewports feature is not enabled, scissorCount must be 1" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-viewportCount-01218", + "text": " viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-scissorCount-01219", + "text": " scissorCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-scissorCount-01220", + "text": " scissorCount and viewportCount must be identical" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineViewportSwizzleStateCreateInfoNV or VkPipelineViewportWScalingStateCreateInfoNV" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-viewportCount-arraylength", + "text": " viewportCount must be greater than 0" + }, + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-scissorCount-arraylength", + "text": " scissorCount must be greater than 0" + } + ], + "(VK_NV_clip_space_w_scaling)": [ + { + "vuid": "VUID-VkPipelineViewportStateCreateInfo-viewportWScalingEnable-01726", + "text": " If the viewportWScalingEnable member of a VkPipelineViewportWScalingStateCreateInfoNV structure chained to the pNext chain is VK_TRUE, the viewportCount member of the VkPipelineViewportWScalingStateCreateInfoNV structure must be equal to viewportCount" + } + ] + }, + "vkCmdSetViewport": { + "core": [ + { + "vuid": "VUID-vkCmdSetViewport-None-01221", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetViewport-firstViewport-01222", + "text": " firstViewport must be less than VkPhysicalDeviceLimits::maxViewports" + }, + { + "vuid": "VUID-vkCmdSetViewport-firstViewport-01223", + "text": " The sum of firstViewport and viewportCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive" + }, + { + "vuid": "VUID-vkCmdSetViewport-firstViewport-01224", + "text": " If the multiple viewports feature is not enabled, firstViewport must be 0" + }, + { + "vuid": "VUID-vkCmdSetViewport-viewportCount-01225", + "text": " If the multiple viewports feature is not enabled, viewportCount must be 1" + }, + { + "vuid": "VUID-vkCmdSetViewport-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetViewport-pViewports-parameter", + "text": " pViewports must be a valid pointer to an array of viewportCount VkViewport structures" + }, + { + "vuid": "VUID-vkCmdSetViewport-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetViewport-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdSetViewport-viewportCount-arraylength", + "text": " viewportCount must be greater than 0" + } + ] + }, + "VkViewport": { + "core": [ + { + "vuid": "VUID-VkViewport-width-01770", + "text": " width must be greater than 0.0" + }, + { + "vuid": "VUID-VkViewport-width-01771", + "text": " width must be less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[0]" + }, + { + "vuid": "VUID-VkViewport-height-01773", + "text": " The absolute value of height must be less than or equal to VkPhysicalDeviceLimits::maxViewportDimensions[1]" + }, + { + "vuid": "VUID-VkViewport-x-01774", + "text": " x must be greater than or equal to viewportBoundsRange[0]" + }, + { + "vuid": "VUID-VkViewport-x-01232", + "text": " (x + width) must be less than or equal to viewportBoundsRange[1]" + }, + { + "vuid": "VUID-VkViewport-y-01775", + "text": " y must be greater than or equal to viewportBoundsRange[0]" + }, + { + "vuid": "VUID-VkViewport-y-01233", + "text": " (y + height) must be less than or equal to viewportBoundsRange[1]" + } + ], + "!(VK_KHR_maintenance1,VK_AMD_negative_viewport_height)": [ + { + "vuid": "VUID-VkViewport-height-01772", + "text": " height must be greater than 0.0" + } + ], + "(VK_KHR_maintenance1,VK_AMD_negative_viewport_height)": [ + { + "vuid": "VUID-VkViewport-y-01776", + "text": " y must be less than or equal to viewportBoundsRange[1]" + }, + { + "vuid": "VUID-VkViewport-y-01777", + "text": " (y + height) must be greater than or equal to viewportBoundsRange[0]" + } + ], + "(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkViewport-minDepth-01234", + "text": " Unless VK_EXT_depth_range_unrestricted extension is enabled minDepth must be between 0.0 and 1.0, inclusive" + }, + { + "vuid": "VUID-VkViewport-maxDepth-01235", + "text": " Unless VK_EXT_depth_range_unrestricted extension is enabled maxDepth must be between 0.0 and 1.0, inclusive" + } + ], + "!(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-VkViewport-minDepth-01234", + "text": " minDepth must be between 0.0 and 1.0, inclusive" + }, + { + "vuid": "VUID-VkViewport-maxDepth-01235", + "text": " maxDepth must be between 0.0 and 1.0, inclusive" + } + ] + }, + "VkPipelineRasterizationStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782", + "text": " If the &amp;lt;&amp;lt;features-features-depthClamp,depth clamping&amp;gt;&amp;gt; feature is not enabled, depthClampEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineRasterizationConservativeStateCreateInfoEXT or VkPipelineRasterizationStateRasterizationOrderAMD" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-parameter", + "text": " polygonMode must be a valid VkPolygonMode value" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-cullMode-parameter", + "text": " cullMode must be a valid combination of VkCullModeFlagBits values" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-frontFace-parameter", + "text": " frontFace must be a valid VkFrontFace value" + } + ], + "!(VK_NV_fill_rectangle)": [ + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01413", + "text": " If the &amp;lt;&amp;lt;features-features-fillModeNonSolid,non-solid fill modes&amp;gt;&amp;gt; feature is not enabled, polygonMode must be VK_POLYGON_MODE_FILL" + } + ], + "(VK_NV_fill_rectangle)": [ + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507", + "text": " If the &amp;lt;&amp;lt;features-features-fillModeNonSolid,non-solid fill modes&amp;gt;&amp;gt; feature is not enabled, polygonMode must be VK_POLYGON_MODE_FILL or VK_POLYGON_MODE_FILL_RECTANGLE_NV" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01414", + "text": " If the VK_NV_fill_rectangle extension is not enabled, polygonMode must not be VK_POLYGON_MODE_FILL_RECTANGLE_NV" + } + ] + }, + "VkPipelineMultisampleStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784", + "text": " If the &amp;lt;&amp;lt;features-features-sampleRateShading,sample rate shading&amp;gt;&amp;gt; feature is not enabled, sampleShadingEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785", + "text": " If the &amp;lt;&amp;lt;features-features-alphaToOne,alpha to one&amp;gt;&amp;gt; feature is not enabled, alphaToOneEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786", + "text": " minSampleShading must be in the range [0,1]" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, or VkPipelineSampleLocationsStateCreateInfoEXT" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter", + "text": " rasterizationSamples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-pSampleMask-parameter", + "text": " If pSampleMask is not NULL, pSampleMask must be a valid pointer to an array of \\(\\lceil{\\mathit{rasterizationSamples} \\over 32}\\rceil\\) VkSampleMask values" + } + ], + "(VK_NV_framebuffer_mixed_samples)": [ + { + "vuid": "VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415", + "text": " If the subpass has any color attachments and rasterizationSamples is greater than the number of color samples, then sampleShadingEnable must be VK_FALSE" + } + ] + }, + "VkPipelineRasterizationStateRasterizationOrderAMD": { + "(VK_AMD_rasterization_order)": [ + { + "vuid": "VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD" + }, + { + "vuid": "VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter", + "text": " rasterizationOrder must be a valid VkRasterizationOrderAMD value" + } + ] + }, + "VkPipelineSampleLocationsStateCreateInfoEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkPipelineSampleLocationsStateCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sampleLocationsInfo-parameter", + "text": " sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure" + } + ] + }, + "VkSampleLocationsInfoEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-01526", + "text": " sampleLocationsPerPixel must be a bit value that is set in VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-01527", + "text": " sampleLocationsCount must equal sampleLocationsPerPixel {times} sampleLocationGridSize.width {times} sampleLocationGridSize.height" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-sampleLocationsPerPixel-parameter", + "text": " sampleLocationsPerPixel must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter", + "text": " pSampleLocations must be a valid pointer to an array of sampleLocationsCount VkSampleLocationEXT structures" + }, + { + "vuid": "VUID-VkSampleLocationsInfoEXT-sampleLocationsCount-arraylength", + "text": " sampleLocationsCount must be greater than 0" + } + ] + }, + "vkCmdSetSampleLocationsEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-None-01528", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-sampleLocationsPerPixel-01529", + "text": " The sampleLocationsPerPixel member of pSampleLocationsInfo must equal the rasterizationSamples member of the VkPipelineMultisampleStateCreateInfo structure the currently bound graphics pipeline has been created with" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-variableSampleLocations-01530", + "text": " If VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE then the current render pass must have been begun by specifying a VkRenderPassSampleLocationsBeginInfoEXT structure whose pPostSubpassSampleLocations member contains an element with a subpassIndex matching the current subpass index and the sampleLocationsInfo member of that element must match the sample locations state pointed to by pSampleLocationsInfo" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-pSampleLocationsInfo-parameter", + "text": " pSampleLocationsInfo must be a valid pointer to a valid VkSampleLocationsInfoEXT structure" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetSampleLocationsEXT-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "vkCmdSetLineWidth": { + "core": [ + { + "vuid": "VUID-vkCmdSetLineWidth-None-00787", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetLineWidth-lineWidth-00788", + "text": " If the wide lines feature is not enabled, lineWidth must be 1.0" + }, + { + "vuid": "VUID-vkCmdSetLineWidth-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetLineWidth-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetLineWidth-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "vkCmdSetDepthBias": { + "core": [ + { + "vuid": "VUID-vkCmdSetDepthBias-None-00789", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetDepthBias-depthBiasClamp-00790", + "text": " If the depth bias clamping feature is not enabled, depthBiasClamp must be 0.0" + }, + { + "vuid": "VUID-vkCmdSetDepthBias-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetDepthBias-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetDepthBias-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "VkPipelineRasterizationConservativeStateCreateInfoEXT": { + "(VK_EXT_conservative_rasterization)": [ + { + "vuid": "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-extraPrimitiveOverestimationSize-01769", + "text": " extraPrimitiveOverestimationSize must be in the range of 0.0 to VkPhysicalDeviceConservativeRasterizationPropertiesEXT::maxExtraPrimitiveOverestimationSize inclusive" + }, + { + "vuid": "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-conservativeRasterizationMode-parameter", + "text": " conservativeRasterizationMode must be a valid VkConservativeRasterizationModeEXT value" + } + ] + }, + "VkPipelineDiscardRectangleStateCreateInfoEXT": { + "(VK_EXT_discard_rectangles)": [ + { + "vuid": "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleCount-00582", + "text": " discardRectangleCount must be between 0 and VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles, inclusive" + }, + { + "vuid": "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter", + "text": " discardRectangleMode must be a valid VkDiscardRectangleModeEXT value" + } + ] + }, + "vkCmdSetDiscardRectangleEXT": { + "(VK_EXT_discard_rectangles)": [ + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-None-00583", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00585", + "text": " The sum of firstDiscardRectangle and discardRectangleCount must be less than or equal to VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-x-00587", + "text": " The x and y member of offset in each VkRect2D element of pDiscardRectangles must be greater than or equal to 0" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-offset-00588", + "text": " Evaluation of (offset.x + extent.width) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflow" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-offset-00589", + "text": " Evaluation of (offset.y + extent.height) in each VkRect2D element of pDiscardRectangles must not cause a signed integer addition overflow" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-parameter", + "text": " pDiscardRectangles must be a valid pointer to an array of discardRectangleCount VkRect2D structures" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdSetDiscardRectangleEXT-discardRectangleCount-arraylength", + "text": " discardRectangleCount must be greater than 0" + } + ] + }, + "vkCmdSetScissor": { + "core": [ + { + "vuid": "VUID-vkCmdSetScissor-None-00590", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetScissor-firstScissor-00591", + "text": " firstScissor must be less than VkPhysicalDeviceLimits::maxViewports" + }, + { + "vuid": "VUID-vkCmdSetScissor-firstScissor-00592", + "text": " The sum of firstScissor and scissorCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive" + }, + { + "vuid": "VUID-vkCmdSetScissor-firstScissor-00593", + "text": " If the multiple viewports feature is not enabled, firstScissor must be 0" + }, + { + "vuid": "VUID-vkCmdSetScissor-scissorCount-00594", + "text": " If the multiple viewports feature is not enabled, scissorCount must be 1" + }, + { + "vuid": "VUID-vkCmdSetScissor-x-00595", + "text": " The x and y members of offset must be greater than or equal to 0" + }, + { + "vuid": "VUID-vkCmdSetScissor-offset-00596", + "text": " Evaluation of (offset.x + extent.width) must not cause a signed integer addition overflow" + }, + { + "vuid": "VUID-vkCmdSetScissor-offset-00597", + "text": " Evaluation of (offset.y + extent.height) must not cause a signed integer addition overflow" + }, + { + "vuid": "VUID-vkCmdSetScissor-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetScissor-pScissors-parameter", + "text": " pScissors must be a valid pointer to an array of scissorCount VkRect2D structures" + }, + { + "vuid": "VUID-vkCmdSetScissor-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetScissor-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + }, + { + "vuid": "VUID-vkCmdSetScissor-scissorCount-arraylength", + "text": " scissorCount must be greater than 0" + } + ] + }, + "VkPipelineDepthStencilStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598", + "text": " If the &amp;lt;&amp;lt;features-features-depthBounds,depth bounds testing&amp;gt;&amp;gt; feature is not enabled, depthBoundsTestEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-depthCompareOp-parameter", + "text": " depthCompareOp must be a valid VkCompareOp value" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-front-parameter", + "text": " front must be a valid VkStencilOpState structure" + }, + { + "vuid": "VUID-VkPipelineDepthStencilStateCreateInfo-back-parameter", + "text": " back must be a valid VkStencilOpState structure" + } + ] + }, + "vkCmdSetDepthBounds": { + "core": [ + { + "vuid": "VUID-vkCmdSetDepthBounds-None-00599", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetDepthBounds-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetDepthBounds-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetDepthBounds-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ], + "(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-vkCmdSetDepthBounds-minDepthBounds-00600", + "text": " Unless the VK_EXT_depth_range_unrestricted extension is enabled minDepthBounds must be between 0.0 and 1.0, inclusive" + }, + { + "vuid": "VUID-vkCmdSetDepthBounds-maxDepthBounds-00601", + "text": " Unless the VK_EXT_depth_range_unrestricted extension is enabled maxDepthBounds must be between 0.0 and 1.0, inclusive" + } + ], + "!(VK_EXT_depth_range_unrestricted)": [ + { + "vuid": "VUID-vkCmdSetDepthBounds-minDepthBounds-00600", + "text": " minDepthBounds must be between 0.0 and 1.0, inclusive" + }, + { + "vuid": "VUID-vkCmdSetDepthBounds-maxDepthBounds-00601", + "text": " maxDepthBounds must be between 0.0 and 1.0, inclusive" + } + ] + }, + "VkStencilOpState": { + "core": [ + { + "vuid": "VUID-VkStencilOpState-failOp-parameter", + "text": " failOp must be a valid VkStencilOp value" + }, + { + "vuid": "VUID-VkStencilOpState-passOp-parameter", + "text": " passOp must be a valid VkStencilOp value" + }, + { + "vuid": "VUID-VkStencilOpState-depthFailOp-parameter", + "text": " depthFailOp must be a valid VkStencilOp value" + }, + { + "vuid": "VUID-VkStencilOpState-compareOp-parameter", + "text": " compareOp must be a valid VkCompareOp value" + } + ] + }, + "vkCmdSetStencilCompareMask": { + "core": [ + { + "vuid": "VUID-vkCmdSetStencilCompareMask-None-00602", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetStencilCompareMask-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetStencilCompareMask-faceMask-parameter", + "text": " faceMask must be a valid combination of VkStencilFaceFlagBits values" + }, + { + "vuid": "VUID-vkCmdSetStencilCompareMask-faceMask-requiredbitmask", + "text": " faceMask must not be 0" + }, + { + "vuid": "VUID-vkCmdSetStencilCompareMask-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetStencilCompareMask-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "vkCmdSetStencilWriteMask": { + "core": [ + { + "vuid": "VUID-vkCmdSetStencilWriteMask-None-00603", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetStencilWriteMask-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetStencilWriteMask-faceMask-parameter", + "text": " faceMask must be a valid combination of VkStencilFaceFlagBits values" + }, + { + "vuid": "VUID-vkCmdSetStencilWriteMask-faceMask-requiredbitmask", + "text": " faceMask must not be 0" + }, + { + "vuid": "VUID-vkCmdSetStencilWriteMask-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetStencilWriteMask-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "vkCmdSetStencilReference": { + "core": [ + { + "vuid": "VUID-vkCmdSetStencilReference-None-00604", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetStencilReference-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetStencilReference-faceMask-parameter", + "text": " faceMask must be a valid combination of VkStencilFaceFlagBits values" + }, + { + "vuid": "VUID-vkCmdSetStencilReference-faceMask-requiredbitmask", + "text": " faceMask must not be 0" + }, + { + "vuid": "VUID-vkCmdSetStencilReference-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetStencilReference-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "VkPipelineCoverageToColorStateCreateInfoNV": { + "(VK_NV_fragment_coverage_to_color)": [ + { + "vuid": "VUID-VkPipelineCoverageToColorStateCreateInfoNV-coverageToColorEnable-01404", + "text": " If coverageToColorEnable is VK_TRUE, then the render pass subpass indicated by VkGraphicsPipelineCreateInfo::renderPass and VkGraphicsPipelineCreateInfo::subpass must have a color attachment at the location selected by coverageToColorLocation, with a VkFormat of VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R32_UINT, or VK_FORMAT_R32_SINT" + }, + { + "vuid": "VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV" + }, + { + "vuid": "VUID-VkPipelineCoverageToColorStateCreateInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "VkPipelineCoverageModulationStateCreateInfoNV": { + "(VK_NV_framebuffer_mixed_samples)": [ + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableEnable-01405", + "text": " If coverageModulationTableEnable is VK_TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpass." + }, + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV" + }, + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter", + "text": " coverageModulationMode must be a valid VkCoverageModulationModeNV value" + }, + { + "vuid": "VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationTableCount-arraylength", + "text": " coverageModulationTableCount must be greater than 0" + } + ] + }, + "VkPipelineColorBlendStateCreateInfo": { + "core": [ + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605", + "text": " If the &amp;lt;&amp;lt;features-features-independentBlend,independent blending&amp;gt;&amp;gt; feature is not enabled, all elements of pAttachments must be identical" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606", + "text": " If the &amp;lt;&amp;lt;features-features-logicOp,logic operations&amp;gt;&amp;gt; feature is not enabled, logicOpEnable must be VK_FALSE" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00607", + "text": " If logicOpEnable is VK_TRUE, logicOp must be a valid VkLogicOp value" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkPipelineColorBlendAdvancedStateCreateInfoEXT" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-parameter", + "text": " If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkPipelineColorBlendAttachmentState structures" + } + ] + }, + "VkPipelineColorBlendAttachmentState": { + "core": [ + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608", + "text": " If the &amp;lt;&amp;lt;features-features-dualSrcBlend,dual source blending&amp;gt;&amp;gt; feature is not enabled, srcColorBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609", + "text": " If the &amp;lt;&amp;lt;features-features-dualSrcBlend,dual source blending&amp;gt;&amp;gt; feature is not enabled, dstColorBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610", + "text": " If the &amp;lt;&amp;lt;features-features-dualSrcBlend,dual source blending&amp;gt;&amp;gt; feature is not enabled, srcAlphaBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611", + "text": " If the &amp;lt;&amp;lt;features-features-dualSrcBlend,dual source blending&amp;gt;&amp;gt; feature is not enabled, dstAlphaBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-parameter", + "text": " srcColorBlendFactor must be a valid VkBlendFactor value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-parameter", + "text": " dstColorBlendFactor must be a valid VkBlendFactor value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-parameter", + "text": " colorBlendOp must be a valid VkBlendOp value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-parameter", + "text": " srcAlphaBlendFactor must be a valid VkBlendFactor value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-parameter", + "text": " dstAlphaBlendFactor must be a valid VkBlendFactor value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-alphaBlendOp-parameter", + "text": " alphaBlendOp must be a valid VkBlendOp value" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-colorWriteMask-parameter", + "text": " colorWriteMask must be a valid combination of VkColorComponentFlagBits values" + } + ], + "(VK_EXT_blend_operation_advanced)": [ + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01406", + "text": " If either of colorBlendOp or alphaBlendOp is an &amp;lt;&amp;lt;framebuffer-blend-advanced,advanced blend operation&amp;gt;&amp;gt;, then colorBlendOp must equal alphaBlendOp" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01407", + "text": " If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendIndependentBlend is VK_FALSE and colorBlendOp is an &amp;lt;&amp;lt;framebuffer-blend-advanced,advanced blend operation&amp;gt;&amp;gt;, then colorBlendOp must be the same for all attachments." + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01408", + "text": " If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendIndependentBlend is VK_FALSE and alphaBlendOp is an &amp;lt;&amp;lt;framebuffer-blend-advanced,advanced blend operation&amp;gt;&amp;gt;, then alphaBlendOp must be the same for all attachments." + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-advancedBlendAllOperations-01409", + "text": " If VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendAllOperations is VK_FALSE, then colorBlendOp must not be VK_BLEND_OP_ZERO_EXT, VK_BLEND_OP_SRC_EXT, VK_BLEND_OP_DST_EXT, VK_BLEND_OP_SRC_OVER_EXT, VK_BLEND_OP_DST_OVER_EXT, VK_BLEND_OP_SRC_IN_EXT, VK_BLEND_OP_DST_IN_EXT, VK_BLEND_OP_SRC_OUT_EXT, VK_BLEND_OP_DST_OUT_EXT, VK_BLEND_OP_SRC_ATOP_EXT, VK_BLEND_OP_DST_ATOP_EXT, VK_BLEND_OP_XOR_EXT, VK_BLEND_OP_INVERT_EXT, VK_BLEND_OP_INVERT_RGB_EXT, VK_BLEND_OP_LINEARDODGE_EXT, VK_BLEND_OP_LINEARBURN_EXT, VK_BLEND_OP_VIVIDLIGHT_EXT, VK_BLEND_OP_LINEARLIGHT_EXT, VK_BLEND_OP_PINLIGHT_EXT, VK_BLEND_OP_HARDMIX_EXT, VK_BLEND_OP_PLUS_EXT, VK_BLEND_OP_PLUS_CLAMPED_EXT, VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT, VK_BLEND_OP_PLUS_DARKER_EXT, VK_BLEND_OP_MINUS_EXT, VK_BLEND_OP_MINUS_CLAMPED_EXT, VK_BLEND_OP_CONTRAST_EXT, VK_BLEND_OP_INVERT_OVG_EXT, VK_BLEND_OP_RED_EXT, VK_BLEND_OP_GREEN_EXT, or VK_BLEND_OP_BLUE_EXT" + }, + { + "vuid": "VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01410", + "text": " If colorBlendOp or alphaBlendOp is an &amp;lt;&amp;lt;framebuffer-blend-advanced,advanced blend operation&amp;gt;&amp;gt;, then VkSubpassDescription::colorAttachmentCount of the subpass this pipeline is compiled against must be less than or equal to VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT::advancedBlendMaxColorAttachments" + } + ] + }, + "vkCmdSetBlendConstants": { + "core": [ + { + "vuid": "VUID-vkCmdSetBlendConstants-None-00612", + "text": " The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled" + }, + { + "vuid": "VUID-vkCmdSetBlendConstants-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdSetBlendConstants-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdSetBlendConstants-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics operations" + } + ] + }, + "VkPipelineColorBlendAdvancedStateCreateInfoEXT": { + "(VK_EXT_blend_operation_advanced)": [ + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-srcPremultiplied-01424", + "text": " If the &amp;lt;&amp;lt;features-limits-advancedBlendNonPremultipliedSrcColor,non-premultiplied source color&amp;gt;&amp;gt; property is not supported, srcPremultiplied must be VK_TRUE" + }, + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-dstPremultiplied-01425", + "text": " If the &amp;lt;&amp;lt;features-limits-advancedBlendNonPremultipliedDstColor,non-premultiplied destination color&amp;gt;&amp;gt; property is not supported, dstPremultiplied must be VK_TRUE" + }, + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-01426", + "text": " If the &amp;lt;&amp;lt;features-limits-advancedBlendCorrelatedOverlap,correlated overlap&amp;gt;&amp;gt; property is not supported, blendOverlap must be VK_BLEND_OVERLAP_UNCORRELATED_EXT" + }, + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter", + "text": " blendOverlap must be a valid VkBlendOverlapEXT value" + } + ] + }, + "vkCmdDispatch": { + "core": [ + { + "vuid": "VUID-vkCmdDispatch-groupCountX-00386", + "text": " groupCountX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]" + }, + { + "vuid": "VUID-vkCmdDispatch-groupCountY-00387", + "text": " groupCountY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]" + }, + { + "vuid": "VUID-vkCmdDispatch-groupCountZ-00388", + "text": " groupCountZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00389", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00390", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00391", + "text": " A valid compute pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_COMPUTE" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00392", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00393", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00394", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00395", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00396", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00397", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDispatch-linearTilingFeatures-00398", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDispatch-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDispatch-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatch-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support compute operations" + }, + { + "vuid": "VUID-vkCmdDispatch-renderpass", + "text": " This command must only be called outside of a render pass instance" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDispatch-linearTilingFeatures-00399", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDispatch-None-00400", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ] + }, + "vkCmdDispatchIndirect": { + "core": [ + { + "vuid": "VUID-vkCmdDispatchIndirect-buffer-00401", + "text": " If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00402", + "text": " For each set n that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n at VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00403", + "text": " Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the currently bound VkPipeline object, specified via vkCmdBindPipeline" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00404", + "text": " A valid compute pipeline must be bound to the current command buffer with VK_PIPELINE_BIND_POINT_COMPUTE" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-buffer-00405", + "text": " buffer must have been created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-offset-00406", + "text": " offset must be a multiple of 4" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-offset-00407", + "text": " The sum of offset and the size of VkDispatchIndirectCommand must be less than or equal to the size of buffer" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00408", + "text": " For each push constant that is statically used by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set for VK_PIPELINE_BIND_POINT_COMPUTE, with a VkPipelineLayout that is compatible for push constants with the one used to create the current VkPipeline, as described in &amp;lt;&amp;lt;descriptorsets-compatibility&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00409", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used to sample from any VkImage with a VkImageView of the type VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00410", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00411", + "text": " If any VkSampler object that is accessed from a shader by the VkPipeline currently bound to VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00412", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00413", + "text": " If the &amp;lt;&amp;lt;features-features-robustBufferAccess,robust buffer access&amp;gt;&amp;gt; feature is not enabled, and any shader stage in the VkPipeline object currently bound to VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it must not access values outside of the range of that buffer specified in the currently bound descriptor set" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-linearTilingFeatures-00414", + "text": " Any VkImageView being sampled with VK_FILTER_LINEAR as a result of this command must be of a format which supports linear filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support compute operations" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-renderpass", + "text": " This command must only be called outside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-commonparent", + "text": " Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same VkDevice" + } + ], + "(VK_IMG_filter_cubic)": [ + { + "vuid": "VUID-vkCmdDispatchIndirect-linearTilingFeatures-00415", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must be of a format which supports cubic filtering, as specified by the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in VkFormatProperties::linearTilingFeatures (for a linear image) or VkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned by vkGetPhysicalDeviceFormatProperties" + }, + { + "vuid": "VUID-vkCmdDispatchIndirect-None-00416", + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_IMG as a result of this command must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY" + } + ] + }, + "VkDispatchIndirectCommand": { + "core": [ + { + "vuid": "VUID-VkDispatchIndirectCommand-x-00417", + "text": " x must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]" + }, + { + "vuid": "VUID-VkDispatchIndirectCommand-y-00418", + "text": " y must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]" + }, + { + "vuid": "VUID-VkDispatchIndirectCommand-z-00419", + "text": " z must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]" + } + ] + }, + "vkCmdDispatchBaseKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkCmdDispatchBaseKHX-None-00420", + "text": " All valid usage rules from vkCmdDispatch apply" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-baseGroupX-00421", + "text": " baseGroupX must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-baseGroupX-00422", + "text": " baseGroupX must be less than VkPhysicaYDeviceLimits::maxComputeWorkGroupCount[1]" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-baseGroupZ-00423", + "text": " baseGroupZ must be less than VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-groupCountX-00424", + "text": " groupCountX must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] minus baseGroupX" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-groupCountY-00425", + "text": " groupCountY must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] minus baseGroupY" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-groupCountZ-00426", + "text": " groupCountZ must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] minus baseGroupZ" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-baseGroupX-00427", + "text": " If any of baseGroupX, baseGroupY, or baseGroupZ are not zero, then the currently bound compute pipeline must have been created with the VK_PIPELINE_CREATE_DISPATCH_BASE_KHX flag." + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support compute operations" + }, + { + "vuid": "VUID-vkCmdDispatchBaseKHX-renderpass", + "text": " This command must only be called outside of a render pass instance" + } + ] + }, + "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pFeatures-parameter", + "text": " pFeatures must be a valid pointer to a VkDeviceGeneratedCommandsFeaturesNVX structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX-pLimits-parameter", + "text": " pLimits must be a valid pointer to a VkDeviceGeneratedCommandsLimitsNVX structure" + } + ] + }, + "VkDeviceGeneratedCommandsFeaturesNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkDeviceGeneratedCommandsFeaturesNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX" + }, + { + "vuid": "VUID-VkDeviceGeneratedCommandsFeaturesNVX-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkDeviceGeneratedCommandsLimitsNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkDeviceGeneratedCommandsLimitsNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX" + }, + { + "vuid": "VUID-VkDeviceGeneratedCommandsLimitsNVX-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkCreateObjectTableNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkCreateObjectTableNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateObjectTableNVX-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkObjectTableCreateInfoNVX structure" + }, + { + "vuid": "VUID-vkCreateObjectTableNVX-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateObjectTableNVX-pObjectTable-parameter", + "text": " pObjectTable must be a valid pointer to a VkObjectTableNVX handle" + } + ] + }, + "VkObjectTableCreateInfoNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-computeBindingPointSupport-01355", + "text": " If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, pObjectEntryUsageFlags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-01356", + "text": " Any value within pObjectEntryCounts must not exceed VkDeviceGeneratedCommandsLimitsNVX::maxObjectEntryCounts" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-maxUniformBuffersPerDescriptor-01357", + "text": " maxUniformBuffersPerDescriptor must be within the limits supported by the device." + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-maxStorageBuffersPerDescriptor-01358", + "text": " maxStorageBuffersPerDescriptor must be within the limits supported by the device." + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-maxStorageImagesPerDescriptor-01359", + "text": " maxStorageImagesPerDescriptor must be within the limits supported by the device." + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-maxSampledImagesPerDescriptor-01360", + "text": " maxSampledImagesPerDescriptor must be within the limits supported by the device." + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pObjectEntryTypes-parameter", + "text": " pObjectEntryTypes must be a valid pointer to an array of objectCount valid VkObjectEntryTypeNVX values" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pObjectEntryCounts-parameter", + "text": " pObjectEntryCounts must be a valid pointer to an array of objectCount uint32_t values" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-parameter", + "text": " pObjectEntryUsageFlags must be a valid pointer to an array of objectCount valid combinations of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-pObjectEntryUsageFlags-requiredbitmask", + "text": " Each element of pObjectEntryUsageFlags must not be 0" + }, + { + "vuid": "VUID-VkObjectTableCreateInfoNVX-objectCount-arraylength", + "text": " objectCount must be greater than 0" + } + ] + }, + "vkDestroyObjectTableNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkDestroyObjectTableNVX-objectTable-01361", + "text": " All submitted commands that refer to objectTable must have completed execution." + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-objectTable-01362", + "text": " If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here." + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-objectTable-01363", + "text": " If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL." + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-objectTable-parameter", + "text": " objectTable must be a valid VkObjectTableNVX handle" + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyObjectTableNVX-objectTable-parent", + "text": " objectTable must have been created, allocated, or retrieved from device" + } + ] + }, + "vkRegisterObjectsNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkRegisterObjectsNVX-pObjectTableEntry-01364", + "text": " The contents of pObjectTableEntry must yield plausible bindings supported by the device." + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-pObjectIndices-01365", + "text": " At any pObjectIndices there must not be a registered resource already." + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-pObjectIndices-01366", + "text": " Any value inside pObjectIndices must be below the appropriate VkObjectTableCreateInfoNVX::pObjectEntryCounts limits provided at objectTable creation time." + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-objectTable-parameter", + "text": " objectTable must be a valid VkObjectTableNVX handle" + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-ppObjectTableEntries-parameter", + "text": " ppObjectTableEntries must be a valid pointer to an array of objectCount valid VkObjectTableEntryNVX structures" + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-pObjectIndices-parameter", + "text": " pObjectIndices must be a valid pointer to an array of objectCount uint32_t values" + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-objectCount-arraylength", + "text": " objectCount must be greater than 0" + }, + { + "vuid": "VUID-vkRegisterObjectsNVX-objectTable-parent", + "text": " objectTable must have been created, allocated, or retrieved from device" + } + ] + }, + "VkObjectTableEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTableEntryNVX-computeBindingPointSupport-01367", + "text": " If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, flags must not contain VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX" + }, + { + "vuid": "VUID-VkObjectTableEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTableEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTableEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + } + ] + }, + "VkObjectTablePipelineEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTablePipelineEntryNVX-type-01368", + "text": " type must be VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX" + }, + { + "vuid": "VUID-VkObjectTablePipelineEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTablePipelineEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTablePipelineEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkObjectTablePipelineEntryNVX-pipeline-parameter", + "text": " pipeline must be a valid VkPipeline handle" + } + ] + }, + "VkObjectTableDescriptorSetEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-type-01369", + "text": " type must be VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-pipelineLayout-parameter", + "text": " pipelineLayout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-descriptorSet-parameter", + "text": " descriptorSet must be a valid VkDescriptorSet handle" + }, + { + "vuid": "VUID-VkObjectTableDescriptorSetEntryNVX-commonparent", + "text": " Both of descriptorSet, and pipelineLayout must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkObjectTableVertexBufferEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTableVertexBufferEntryNVX-type-01370", + "text": " type must be VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX" + }, + { + "vuid": "VUID-VkObjectTableVertexBufferEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTableVertexBufferEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTableVertexBufferEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkObjectTableVertexBufferEntryNVX-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + } + ] + }, + "VkObjectTableIndexBufferEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-type-01371", + "text": " type must be VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX" + }, + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkObjectTableIndexBufferEntryNVX-indexType-parameter", + "text": " indexType must be a valid VkIndexType value" + } + ] + }, + "VkObjectTablePushConstantEntryNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-type-01372", + "text": " type must be VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-type-parameter", + "text": " type must be a valid VkObjectEntryTypeNVX value" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-flags-parameter", + "text": " flags must be a valid combination of VkObjectEntryUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-pipelineLayout-parameter", + "text": " pipelineLayout must be a valid VkPipelineLayout handle" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-stageFlags-parameter", + "text": " stageFlags must be a valid combination of VkShaderStageFlagBits values" + }, + { + "vuid": "VUID-VkObjectTablePushConstantEntryNVX-stageFlags-requiredbitmask", + "text": " stageFlags must not be 0" + } + ] + }, + "vkUnregisterObjectsNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkUnregisterObjectsNVX-pObjectIndices-01373", + "text": " At any pObjectIndices there must be a registered resource already." + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-01374", + "text": " The pObjectEntryTypes of the resource at pObjectIndices must match." + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-None-01375", + "text": " All operations on the device using the registered resource must have been completed." + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-objectTable-parameter", + "text": " objectTable must be a valid VkObjectTableNVX handle" + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-pObjectEntryTypes-parameter", + "text": " pObjectEntryTypes must be a valid pointer to an array of objectCount valid VkObjectEntryTypeNVX values" + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-pObjectIndices-parameter", + "text": " pObjectIndices must be a valid pointer to an array of objectCount uint32_t values" + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-objectCount-arraylength", + "text": " objectCount must be greater than 0" + }, + { + "vuid": "VUID-vkUnregisterObjectsNVX-objectTable-parent", + "text": " objectTable must have been created, allocated, or retrieved from device" + } + ] + }, + "VkIndirectCommandsLayoutTokenNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkIndirectCommandsLayoutTokenNVX-bindingUnit-01342", + "text": " bindingUnit must stay within device supported limits for the appropriate commands." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutTokenNVX-dynamicCount-01343", + "text": " dynamicCount must stay within device supported limits for the appropriate commands." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutTokenNVX-divisor-01344", + "text": " divisor must be greater than 0 and a power of two." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutTokenNVX-tokenType-parameter", + "text": " tokenType must be a valid VkIndirectCommandsTokenTypeNVX value" + } + ] + }, + "VkIndirectCommandsTokenNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkIndirectCommandsTokenNVX-buffer-01345", + "text": " The buffer’s usage flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set." + }, + { + "vuid": "VUID-VkIndirectCommandsTokenNVX-offset-01346", + "text": " The offset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minCommandsTokenBufferOffsetAlignment." + }, + { + "vuid": "VUID-VkIndirectCommandsTokenNVX-tokenType-parameter", + "text": " tokenType must be a valid VkIndirectCommandsTokenTypeNVX value" + }, + { + "vuid": "VUID-VkIndirectCommandsTokenNVX-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + } + ] + }, + "vkCreateIndirectCommandsLayoutNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkCreateIndirectCommandsLayoutNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateIndirectCommandsLayoutNVX-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkIndirectCommandsLayoutCreateInfoNVX structure" + }, + { + "vuid": "VUID-vkCreateIndirectCommandsLayoutNVX-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateIndirectCommandsLayoutNVX-pIndirectCommandsLayout-parameter", + "text": " pIndirectCommandsLayout must be a valid pointer to a VkIndirectCommandsLayoutNVX handle" + } + ] + }, + "VkIndirectCommandsLayoutCreateInfoNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-01347", + "text": " tokenCount must be greater than 0 and below VkDeviceGeneratedCommandsLimitsNVX::maxIndirectCommandsLayoutTokenCount" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-computeBindingPointSupport-01348", + "text": " If the VkDeviceGeneratedCommandsFeaturesNVX::computeBindingPointSupport feature is not enabled, then pipelineBindPoint must not be VK_PIPELINE_BIND_POINT_COMPUTE" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01349", + "text": " If pTokens contains an entry of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX it must be the first element of the array and there must be only a single element of such token type." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01350", + "text": " All state binding tokens in pTokens must occur prior work provoking tokens (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX)." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-01351", + "text": " The content of pTokens must include one single work provoking token that is compatible with the pipelineBindPoint." + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pipelineBindPoint-parameter", + "text": " pipelineBindPoint must be a valid VkPipelineBindPoint value" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-parameter", + "text": " flags must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNVX values" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-pTokens-parameter", + "text": " pTokens must be a valid pointer to an array of tokenCount valid VkIndirectCommandsLayoutTokenNVX structures" + }, + { + "vuid": "VUID-VkIndirectCommandsLayoutCreateInfoNVX-tokenCount-arraylength", + "text": " tokenCount must be greater than 0" + } + ] + }, + "vkDestroyIndirectCommandsLayoutNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-01352", + "text": " All submitted commands that refer to indirectCommandsLayout must have completed execution" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01353", + "text": " If VkAllocationCallbacks were provided when objectTable was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-objectTable-01354", + "text": " If no VkAllocationCallbacks were provided when objectTable was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parameter", + "text": " indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyIndirectCommandsLayoutNVX-indirectCommandsLayout-parent", + "text": " indirectCommandsLayout must have been created, allocated, or retrieved from device" + } + ] + }, + "vkCmdReserveSpaceForCommandsNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01329", + "text": " The provided commandBuffer must not have had a prior space reservation since its creation or the last reset." + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01330", + "text": " The state of the commandBuffer must be legal to execute all commands within the sequence provided by the indirectCommandsLayout member of pProcessCommandsInfo." + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-pReserveSpaceInfo-parameter", + "text": " pReserveSpaceInfo must be a valid pointer to a valid VkCmdReserveSpaceForCommandsInfoNVX structure" + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-renderpass", + "text": " This command must only be called inside of a render pass instance" + }, + { + "vuid": "VUID-vkCmdReserveSpaceForCommandsNVX-bufferlevel", + "text": " commandBuffer must be a secondary VkCommandBuffer" + } + ] + }, + "VkCmdReserveSpaceForCommandsInfoNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkCmdReserveSpaceForCommandsInfoNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX" + }, + { + "vuid": "VUID-VkCmdReserveSpaceForCommandsInfoNVX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCmdReserveSpaceForCommandsInfoNVX-objectTable-parameter", + "text": " objectTable must be a valid VkObjectTableNVX handle" + }, + { + "vuid": "VUID-VkCmdReserveSpaceForCommandsInfoNVX-indirectCommandsLayout-parameter", + "text": " indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle" + }, + { + "vuid": "VUID-VkCmdReserveSpaceForCommandsInfoNVX-commonparent", + "text": " Both of indirectCommandsLayout, and objectTable must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkCmdProcessCommandsNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-vkCmdProcessCommandsNVX-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdProcessCommandsNVX-pProcessCommandsInfo-parameter", + "text": " pProcessCommandsInfo must be a valid pointer to a valid VkCmdProcessCommandsInfoNVX structure" + }, + { + "vuid": "VUID-vkCmdProcessCommandsNVX-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdProcessCommandsNVX-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + }, + { + "vuid": "VUID-vkCmdProcessCommandsNVX-renderpass", + "text": " This command must only be called inside of a render pass instance" + } + ] + }, + "VkCmdProcessCommandsInfoNVX": { + "(VK_NVX_device_generated_commands)": [ + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331", + "text": " The provided objectTable must include all objects referenced by the generation process." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332", + "text": " indirectCommandsTokenCount must match the indirectCommandsLayout’s tokenCount." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333", + "text": " The tokenType member of each entry in the pIndirectCommandsTokens array must match the values used at creation time of indirectCommandsLayout" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334", + "text": " If targetCommandBuffer is provided, it must have reserved command space." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335", + "text": " If targetCommandBuffer is provided, the objectTable must match the reservation’s objectTable and must have had all referenced objects registered at reservation time." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336", + "text": " If targetCommandBuffer is provided, the indirectCommandsLayout must match the reservation’s indirectCommandsLayout." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337", + "text": " If targetCommandBuffer is provided, the maxSequencesCount must not exceed the reservation’s maxSequencesCount." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338", + "text": " If sequencesCountBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339", + "text": " If sequencesCountBuffer is used, sequencesCountOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceCountBufferOffsetAlignment." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340", + "text": " If sequencesIndexBuffer is used, its usage flag must have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341", + "text": " If sequencesIndexBuffer is used, sequencesIndexOffset must be aligned to VkDeviceGeneratedCommandsLimitsNVX::minSequenceIndexBufferOffsetAlignment." + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-objectTable-parameter", + "text": " objectTable must be a valid VkObjectTableNVX handle" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsLayout-parameter", + "text": " indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNVX handle" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-pIndirectCommandsTokens-parameter", + "text": " pIndirectCommandsTokens must be a valid pointer to an array of indirectCommandsTokenCount valid VkIndirectCommandsTokenNVX structures" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-parameter", + "text": " If targetCommandBuffer is not NULL, targetCommandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-parameter", + "text": " If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-parameter", + "text": " If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-arraylength", + "text": " indirectCommandsTokenCount must be greater than 0" + }, + { + "vuid": "VUID-VkCmdProcessCommandsInfoNVX-commonparent", + "text": " Each of indirectCommandsLayout, objectTable, sequencesCountBuffer, sequencesIndexBuffer, and targetCommandBuffer that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "vkGetPhysicalDeviceSparseImageFormatProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-01094", + "text": " samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, type, tiling, and usage equal to those in this command and flags equal to the value that is set in VkImageCreateInfo::flags when the image is created" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-type-parameter", + "text": " type must be a valid VkImageType value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-samples-parameter", + "text": " samples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkSparseImageFormatProperties structures" + } + ] + }, + "vkGetPhysicalDeviceSparseImageFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pFormatInfo-parameter", + "text": " pFormatInfo must be a valid pointer to a valid VkPhysicalDeviceSparseImageFormatInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSparseImageFormatProperties2KHR-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkSparseImageFormatProperties2KHR structures" + } + ] + }, + "VkPhysicalDeviceSparseImageFormatInfo2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-01095", + "text": " samples must be a bit value that is set in VkImageFormatProperties::sampleCounts returned by vkGetPhysicalDeviceImageFormatProperties with format, type, tiling, and usage equal to those in this command and flags equal to the value that is set in VkImageCreateInfo::flags when the image is created" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-type-parameter", + "text": " type must be a valid VkImageType value" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-samples-parameter", + "text": " samples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-VkPhysicalDeviceSparseImageFormatInfo2KHR-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + } + ] + }, + "VkSparseImageFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkSparseImageFormatProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkSparseImageFormatProperties2KHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetImageSparseMemoryRequirements": { + "core": [ + { + "vuid": "VUID-vkGetImageSparseMemoryRequirements-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetImageSparseMemoryRequirements-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter", + "text": " pSparseMemoryRequirementCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter", + "text": " If the value referenced by pSparseMemoryRequirementCount is not 0, and pSparseMemoryRequirements is not NULL, pSparseMemoryRequirements must be a valid pointer to an array of pSparseMemoryRequirementCount VkSparseImageMemoryRequirements structures" + }, + { + "vuid": "VUID-vkGetImageSparseMemoryRequirements-image-parent", + "text": " image must have been created, allocated, or retrieved from device" + } + ] + }, + "VkSparseMemoryBind": { + "core": [ + { + "vuid": "VUID-VkSparseMemoryBind-memory-01096", + "text": " If memory is not VK_NULL_HANDLE, memory and memoryOffset must match the memory requirements of the resource, as described in section &amp;lt;&amp;lt;resources-association&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkSparseMemoryBind-memory-01097", + "text": " If memory is not VK_NULL_HANDLE, memory must not have been created with a memory type that reports VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set" + }, + { + "vuid": "VUID-VkSparseMemoryBind-size-01098", + "text": " size must be greater than 0" + }, + { + "vuid": "VUID-VkSparseMemoryBind-resourceOffset-01099", + "text": " resourceOffset must be less than the size of the resource" + }, + { + "vuid": "VUID-VkSparseMemoryBind-size-01100", + "text": " size must be less than or equal to the size of the resource minus resourceOffset" + }, + { + "vuid": "VUID-VkSparseMemoryBind-memoryOffset-01101", + "text": " memoryOffset must be less than the size of memory" + }, + { + "vuid": "VUID-VkSparseMemoryBind-size-01102", + "text": " size must be less than or equal to the size of memory minus memoryOffset" + }, + { + "vuid": "VUID-VkSparseMemoryBind-memory-parameter", + "text": " If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-VkSparseMemoryBind-flags-parameter", + "text": " flags must be a valid combination of VkSparseMemoryBindFlagBits values" + } + ] + }, + "VkSparseBufferMemoryBindInfo": { + "core": [ + { + "vuid": "VUID-VkSparseBufferMemoryBindInfo-buffer-parameter", + "text": " buffer must be a valid VkBuffer handle" + }, + { + "vuid": "VUID-VkSparseBufferMemoryBindInfo-pBinds-parameter", + "text": " pBinds must be a valid pointer to an array of bindCount valid VkSparseMemoryBind structures" + }, + { + "vuid": "VUID-VkSparseBufferMemoryBindInfo-bindCount-arraylength", + "text": " bindCount must be greater than 0" + } + ] + }, + "VkSparseImageOpaqueMemoryBindInfo": { + "core": [ + { + "vuid": "VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-01103", + "text": " If the flags member of any element of pBinds contains VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range defined must be within the mip tail region of the metadata aspect of image" + }, + { + "vuid": "VUID-VkSparseImageOpaqueMemoryBindInfo-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkSparseImageOpaqueMemoryBindInfo-pBinds-parameter", + "text": " pBinds must be a valid pointer to an array of bindCount valid VkSparseMemoryBind structures" + }, + { + "vuid": "VUID-VkSparseImageOpaqueMemoryBindInfo-bindCount-arraylength", + "text": " bindCount must be greater than 0" + } + ] + }, + "VkSparseImageMemoryBindInfo": { + "core": [ + { + "vuid": "VUID-VkSparseImageMemoryBindInfo-subresource-01722", + "text": " The subresource.mipLevel member of each element of pBinds must be less than the mipLevels specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkSparseImageMemoryBindInfo-subresource-01723", + "text": " The subresource.arrayLayer member of each element of pBinds must be less than the arrayLayers specified in VkImageCreateInfo when image was created" + }, + { + "vuid": "VUID-VkSparseImageMemoryBindInfo-image-parameter", + "text": " image must be a valid VkImage handle" + }, + { + "vuid": "VUID-VkSparseImageMemoryBindInfo-pBinds-parameter", + "text": " pBinds must be a valid pointer to an array of bindCount valid VkSparseImageMemoryBind structures" + }, + { + "vuid": "VUID-VkSparseImageMemoryBindInfo-bindCount-arraylength", + "text": " bindCount must be greater than 0" + } + ] + }, + "VkSparseImageMemoryBind": { + "core": [ + { + "vuid": "VUID-VkSparseImageMemoryBind-memory-01104", + "text": " If the &amp;lt;&amp;lt;features-features-sparseResidencyAliased,sparse aliased residency&amp;gt;&amp;gt; feature is not enabled, and if any other resources are bound to ranges of memory, the range of memory being bound must not overlap with those bound ranges" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-memory-01105", + "text": " memory and memoryOffset must match the memory requirements of the calling command’s image, as described in section &amp;lt;&amp;lt;resources-association&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-subresource-01106", + "text": " subresource must be a valid image subresource for image (see &amp;lt;&amp;lt;resources-image-views&amp;gt;&amp;gt;)" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-offset-01107", + "text": " offset.x must be a multiple of the sparse image block width (VkSparseImageFormatProperties::imageGranularity.width) of the image" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-extent-01108", + "text": " extent.width must either be a multiple of the sparse image block width of the image, or else (extent.width + offset.x) must equal the width of the image subresource" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-offset-01109", + "text": " offset.y must be a multiple of the sparse image block height (VkSparseImageFormatProperties::imageGranularity.height) of the image" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-extent-01110", + "text": " extent.height must either be a multiple of the sparse image block height of the image, or else (extent.height + offset.y) must equal the height of the image subresource" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-offset-01111", + "text": " offset.z must be a multiple of the sparse image block depth (VkSparseImageFormatProperties::imageGranularity.depth) of the image" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-extent-01112", + "text": " extent.depth must either be a multiple of the sparse image block depth of the image, or else (extent.depth + offset.z) must equal the depth of the image subresource" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-subresource-parameter", + "text": " subresource must be a valid VkImageSubresource structure" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-memory-parameter", + "text": " If memory is not VK_NULL_HANDLE, memory must be a valid VkDeviceMemory handle" + }, + { + "vuid": "VUID-VkSparseImageMemoryBind-flags-parameter", + "text": " flags must be a valid combination of VkSparseMemoryBindFlagBits values" + } + ] + }, + "vkQueueBindSparse": { + "core": [ + { + "vuid": "VUID-vkQueueBindSparse-fence-01113", + "text": " If fence is not VK_NULL_HANDLE, fence must be unsignaled" + }, + { + "vuid": "VUID-vkQueueBindSparse-fence-01114", + "text": " If fence is not VK_NULL_HANDLE, fence must not be associated with any other queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkQueueBindSparse-pSignalSemaphores-01115", + "text": " Each element of the pSignalSemaphores member of each element of pBindInfo must be unsignaled when the semaphore signal operation it defines is executed on the device" + }, + { + "vuid": "VUID-vkQueueBindSparse-pWaitSemaphores-01116", + "text": " When a semaphore unsignal operation defined by any element of the pWaitSemaphores member of any element of pBindInfo executes on queue, no other queue must be waiting on the same semaphore." + }, + { + "vuid": "VUID-vkQueueBindSparse-pWaitSemaphores-01117", + "text": " All elements of the pWaitSemaphores member of all elements of pBindInfo must be semaphores that are signaled, or have &amp;lt;&amp;lt;synchronization-semaphores-signaling, semaphore signal operations&amp;gt;&amp;gt; previously submitted for execution." + }, + { + "vuid": "VUID-vkQueueBindSparse-queue-parameter", + "text": " queue must be a valid VkQueue handle" + }, + { + "vuid": "VUID-vkQueueBindSparse-pBindInfo-parameter", + "text": " If bindInfoCount is not 0, pBindInfo must be a valid pointer to an array of bindInfoCount valid VkBindSparseInfo structures" + }, + { + "vuid": "VUID-vkQueueBindSparse-fence-parameter", + "text": " If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-vkQueueBindSparse-queuetype", + "text": " The queue must support sparse binding operations" + }, + { + "vuid": "VUID-vkQueueBindSparse-commonparent", + "text": " Both of fence, and queue that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkBindSparseInfo": { + "core": [ + { + "vuid": "VUID-VkBindSparseInfo-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO" + }, + { + "vuid": "VUID-VkBindSparseInfo-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkDeviceGroupBindSparseInfoKHX" + }, + { + "vuid": "VUID-VkBindSparseInfo-pWaitSemaphores-parameter", + "text": " If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles" + }, + { + "vuid": "VUID-VkBindSparseInfo-pBufferBinds-parameter", + "text": " If bufferBindCount is not 0, pBufferBinds must be a valid pointer to an array of bufferBindCount valid VkSparseBufferMemoryBindInfo structures" + }, + { + "vuid": "VUID-VkBindSparseInfo-pImageOpaqueBinds-parameter", + "text": " If imageOpaqueBindCount is not 0, pImageOpaqueBinds must be a valid pointer to an array of imageOpaqueBindCount valid VkSparseImageOpaqueMemoryBindInfo structures" + }, + { + "vuid": "VUID-VkBindSparseInfo-pImageBinds-parameter", + "text": " If imageBindCount is not 0, pImageBinds must be a valid pointer to an array of imageBindCount valid VkSparseImageMemoryBindInfo structures" + }, + { + "vuid": "VUID-VkBindSparseInfo-pSignalSemaphores-parameter", + "text": " If signalSemaphoreCount is not 0, pSignalSemaphores must be a valid pointer to an array of signalSemaphoreCount valid VkSemaphore handles" + }, + { + "vuid": "VUID-VkBindSparseInfo-commonparent", + "text": " Both of the elements of pSignalSemaphores, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkDevice" + } + ] + }, + "VkDeviceGroupBindSparseInfoKHX": { + "(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupBindSparseInfoKHX-resourceDeviceIndex-01118", + "text": " resourceDeviceIndex and memoryDeviceIndex must both be valid device indices." + }, + { + "vuid": "VUID-VkDeviceGroupBindSparseInfoKHX-memoryDeviceIndex-01119", + "text": " Each memory allocation bound in this batch must have allocated an instance for memoryDeviceIndex." + }, + { + "vuid": "VUID-VkDeviceGroupBindSparseInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX" + } + ] + }, + "vkCreateAndroidSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_android_surface)": [ + { + "vuid": "VUID-vkCreateAndroidSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateAndroidSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkAndroidSurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateAndroidSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateAndroidSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkAndroidSurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_android_surface)": [ + { + "vuid": "VUID-VkAndroidSurfaceCreateInfoKHR-window-01248", + "text": " window must point to a valid Android ANativeWindow." + }, + { + "vuid": "VUID-VkAndroidSurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkAndroidSurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkAndroidSurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateMirSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_mir_surface)": [ + { + "vuid": "VUID-vkCreateMirSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateMirSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkMirSurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateMirSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateMirSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkMirSurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_mir_surface)": [ + { + "vuid": "VUID-VkMirSurfaceCreateInfoKHR-connection-01263", + "text": " connection must point to a valid MirConnection." + }, + { + "vuid": "VUID-VkMirSurfaceCreateInfoKHR-surface-01264", + "text": " surface must point to a valid MirSurface." + }, + { + "vuid": "VUID-VkMirSurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkMirSurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMirSurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateWaylandSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_wayland_surface)": [ + { + "vuid": "VUID-vkCreateWaylandSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateWaylandSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkWaylandSurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateWaylandSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateWaylandSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkWaylandSurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_wayland_surface)": [ + { + "vuid": "VUID-VkWaylandSurfaceCreateInfoKHR-display-01304", + "text": " display must point to a valid Wayland wl_display." + }, + { + "vuid": "VUID-VkWaylandSurfaceCreateInfoKHR-surface-01305", + "text": " surface must point to a valid Wayland wl_surface." + }, + { + "vuid": "VUID-VkWaylandSurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkWaylandSurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkWaylandSurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateWin32SurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_win32_surface)": [ + { + "vuid": "VUID-vkCreateWin32SurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateWin32SurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkWin32SurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateWin32SurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateWin32SurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkWin32SurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_win32_surface)": [ + { + "vuid": "VUID-VkWin32SurfaceCreateInfoKHR-hinstance-01307", + "text": " hinstance must be a valid Win32 HINSTANCE." + }, + { + "vuid": "VUID-VkWin32SurfaceCreateInfoKHR-hwnd-01308", + "text": " hwnd must be a valid Win32 HWND." + }, + { + "vuid": "VUID-VkWin32SurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkWin32SurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkWin32SurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateXcbSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_xcb_surface)": [ + { + "vuid": "VUID-vkCreateXcbSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateXcbSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkXcbSurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateXcbSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateXcbSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkXcbSurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_xcb_surface)": [ + { + "vuid": "VUID-VkXcbSurfaceCreateInfoKHR-connection-01310", + "text": " connection must point to a valid X11 xcb_connection_t." + }, + { + "vuid": "VUID-VkXcbSurfaceCreateInfoKHR-window-01311", + "text": " window must be a valid X11 xcb_window_t." + }, + { + "vuid": "VUID-VkXcbSurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkXcbSurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkXcbSurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateXlibSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_xlib_surface)": [ + { + "vuid": "VUID-vkCreateXlibSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateXlibSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkXlibSurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateXlibSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateXlibSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkXlibSurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_xlib_surface)": [ + { + "vuid": "VUID-VkXlibSurfaceCreateInfoKHR-dpy-01313", + "text": " dpy must point to a valid Xlib Display." + }, + { + "vuid": "VUID-VkXlibSurfaceCreateInfoKHR-window-01314", + "text": " window must be a valid Xlib Window." + }, + { + "vuid": "VUID-VkXlibSurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkXlibSurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkXlibSurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateIOSSurfaceMVK": { + "(VK_KHR_surface)+(VK_MVK_ios_surface)": [ + { + "vuid": "VUID-vkCreateIOSSurfaceMVK-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateIOSSurfaceMVK-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkIOSSurfaceCreateInfoMVK structure" + }, + { + "vuid": "VUID-vkCreateIOSSurfaceMVK-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateIOSSurfaceMVK-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkIOSSurfaceCreateInfoMVK": { + "(VK_KHR_surface)+(VK_MVK_ios_surface)": [ + { + "vuid": "VUID-VkIOSSurfaceCreateInfoMVK-pView-01316", + "text": " pView must be a valid UIView and must be backed by a CALayer instance of type CAMetalLayer." + }, + { + "vuid": "VUID-VkIOSSurfaceCreateInfoMVK-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK" + }, + { + "vuid": "VUID-VkIOSSurfaceCreateInfoMVK-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkIOSSurfaceCreateInfoMVK-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateMacOSSurfaceMVK": { + "(VK_KHR_surface)+(VK_MVK_macos_surface)": [ + { + "vuid": "VUID-vkCreateMacOSSurfaceMVK-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateMacOSSurfaceMVK-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkMacOSSurfaceCreateInfoMVK structure" + }, + { + "vuid": "VUID-vkCreateMacOSSurfaceMVK-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateMacOSSurfaceMVK-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkMacOSSurfaceCreateInfoMVK": { + "(VK_KHR_surface)+(VK_MVK_macos_surface)": [ + { + "vuid": "VUID-VkMacOSSurfaceCreateInfoMVK-pView-01317", + "text": " pView must be a valid NSView and must be backed by a CALayer instance of type CAMetalLayer." + }, + { + "vuid": "VUID-VkMacOSSurfaceCreateInfoMVK-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK" + }, + { + "vuid": "VUID-VkMacOSSurfaceCreateInfoMVK-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkMacOSSurfaceCreateInfoMVK-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkCreateViSurfaceNN": { + "(VK_KHR_surface)+(VK_NN_vi_surface)": [ + { + "vuid": "VUID-vkCreateViSurfaceNN-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateViSurfaceNN-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkViSurfaceCreateInfoNN structure" + }, + { + "vuid": "VUID-vkCreateViSurfaceNN-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateViSurfaceNN-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkViSurfaceCreateInfoNN": { + "(VK_KHR_surface)+(VK_NN_vi_surface)": [ + { + "vuid": "VUID-VkViSurfaceCreateInfoNN-window-01318", + "text": " window must be a valid nn::vi::NativeWindowHandle" + }, + { + "vuid": "VUID-VkViSurfaceCreateInfoNN-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN" + }, + { + "vuid": "VUID-VkViSurfaceCreateInfoNN-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkViSurfaceCreateInfoNN-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkDestroySurfaceKHR": { + "(VK_KHR_surface)": [ + { + "vuid": "VUID-vkDestroySurfaceKHR-surface-01266", + "text": " All VkSwapchainKHR objects created for surface must have been destroyed prior to destroying surface" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-surface-01267", + "text": " If VkAllocationCallbacks were provided when surface was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-surface-01268", + "text": " If no VkAllocationCallbacks were provided when surface was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-surface-parameter", + "text": " If surface is not VK_NULL_HANDLE, surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroySurfaceKHR-surface-parent", + "text": " If surface is a valid handle, it must have been created, allocated, or retrieved from instance" + } + ] + }, + "vkGetPhysicalDeviceDisplayPropertiesKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayPropertiesKHR structures" + } + ] + }, + "vkAcquireXlibDisplayEXT": { + "(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_direct_mode_display)+(VK_EXT_acquire_xlib_display)": [ + { + "vuid": "VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkAcquireXlibDisplayEXT-dpy-parameter", + "text": " dpy must be a valid pointer to a Display value" + }, + { + "vuid": "VUID-vkAcquireXlibDisplayEXT-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + } + ] + }, + "vkGetRandROutputDisplayEXT": { + "(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_direct_mode_display)+(VK_EXT_acquire_xlib_display)": [ + { + "vuid": "VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetRandROutputDisplayEXT-dpy-parameter", + "text": " dpy must be a valid pointer to a Display value" + }, + { + "vuid": "VUID-vkGetRandROutputDisplayEXT-pDisplay-parameter", + "text": " pDisplay must be a valid pointer to a VkDisplayKHR handle" + } + ] + }, + "vkReleaseDisplayEXT": { + "(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_direct_mode_display)": [ + { + "vuid": "VUID-vkReleaseDisplayEXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkReleaseDisplayEXT-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + } + ] + }, + "vkGetPhysicalDeviceDisplayPlanePropertiesKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayPlanePropertiesKHR structures" + } + ] + }, + "vkGetDisplayPlaneSupportedDisplaysKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkGetDisplayPlaneSupportedDisplaysKHR-planeIndex-01249", + "text": " planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR" + }, + { + "vuid": "VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplayCount-parameter", + "text": " pDisplayCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetDisplayPlaneSupportedDisplaysKHR-pDisplays-parameter", + "text": " If the value referenced by pDisplayCount is not 0, and pDisplays is not NULL, pDisplays must be a valid pointer to an array of pDisplayCount VkDisplayKHR handles" + } + ] + }, + "vkGetDisplayModePropertiesKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetDisplayModePropertiesKHR-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + }, + { + "vuid": "VUID-vkGetDisplayModePropertiesKHR-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetDisplayModePropertiesKHR-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures" + } + ] + }, + "vkCreateDisplayModeKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkCreateDisplayModeKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkCreateDisplayModeKHR-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + }, + { + "vuid": "VUID-vkCreateDisplayModeKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDisplayModeCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateDisplayModeKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDisplayModeKHR-pMode-parameter", + "text": " pMode must be a valid pointer to a VkDisplayModeKHR handle" + } + ] + }, + "VkDisplayModeCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-VkDisplayModeCreateInfoKHR-width-01250", + "text": " The width and height members of the visibleRegion member of parameters must be greater than 0" + }, + { + "vuid": "VUID-VkDisplayModeCreateInfoKHR-refreshRate-01251", + "text": " The refreshRate member of parameters must be greater than 0" + }, + { + "vuid": "VUID-VkDisplayModeCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkDisplayModeCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDisplayModeCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, + "vkGetDisplayPlaneCapabilitiesKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetDisplayPlaneCapabilitiesKHR-mode-parameter", + "text": " mode must be a valid VkDisplayModeKHR handle" + }, + { + "vuid": "VUID-vkGetDisplayPlaneCapabilitiesKHR-pCapabilities-parameter", + "text": " pCapabilities must be a valid pointer to a VkDisplayPlaneCapabilitiesKHR structure" + } + ] + }, + "vkDisplayPowerControlEXT": { + "(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_display_control)": [ + { + "vuid": "VUID-vkDisplayPowerControlEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDisplayPowerControlEXT-display-parameter", + "text": " display must be a valid VkDisplayKHR handle" + }, + { + "vuid": "VUID-vkDisplayPowerControlEXT-pDisplayPowerInfo-parameter", + "text": " pDisplayPowerInfo must be a valid pointer to a valid VkDisplayPowerInfoEXT structure" + } + ] + }, + "VkDisplayPowerInfoEXT": { + "(VK_KHR_surface)+(VK_KHR_display)+(VK_EXT_display_control)": [ + { + "vuid": "VUID-VkDisplayPowerInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT" + }, + { + "vuid": "VUID-VkDisplayPowerInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDisplayPowerInfoEXT-powerState-parameter", + "text": " powerState must be a valid VkDisplayPowerStateEXT value" + } + ] + }, + "vkCreateDisplayPlaneSurfaceKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateDisplayPlaneSurfaceKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDisplaySurfaceCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateDisplayPlaneSurfaceKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDisplayPlaneSurfaceKHR-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkDisplaySurfaceCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_display)": [ + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-planeIndex-01252", + "text": " planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-planeReorderPossible-01253", + "text": " If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is VK_TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01254", + "text": " If alphaMode is VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-01255", + "text": " alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-width-01256", + "text": " The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-flags-zerobitmask", + "text": " flags must be 0" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-displayMode-parameter", + "text": " displayMode must be a valid VkDisplayModeKHR handle" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-transform-parameter", + "text": " transform must be a valid VkSurfaceTransformFlagBitsKHR value" + }, + { + "vuid": "VUID-VkDisplaySurfaceCreateInfoKHR-alphaMode-parameter", + "text": " alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value" + } + ] + }, + "vkGetPhysicalDeviceSurfaceSupportKHR": { + "(VK_KHR_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-queueFamilyIndex-01269", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-pSupported-parameter", + "text": " pSupported must be a valid pointer to a VkBool32 value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceSupportKHR-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetPhysicalDeviceMirPresentationSupportKHR": { + "(VK_KHR_surface)+(VK_KHR_mir_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-queueFamilyIndex-01265", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMirPresentationSupportKHR-connection-parameter", + "text": " connection must be a valid pointer to a MirConnection value" + } + ] + }, + "vkGetPhysicalDeviceWaylandPresentationSupportKHR": { + "(VK_KHR_surface)+(VK_KHR_wayland_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-queueFamilyIndex-01306", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-display-parameter", + "text": " display must be a valid pointer to a wl_display value" + } + ] + }, + "vkGetPhysicalDeviceWin32PresentationSupportKHR": { + "(VK_KHR_surface)+(VK_KHR_win32_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-queueFamilyIndex-01309", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + } + ] + }, + "vkGetPhysicalDeviceXcbPresentationSupportKHR": { + "(VK_KHR_surface)+(VK_KHR_xcb_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-queueFamilyIndex-01312", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-connection-parameter", + "text": " connection must be a valid pointer to a xcb_connection_t value" + } + ] + }, + "vkGetPhysicalDeviceXlibPresentationSupportKHR": { + "(VK_KHR_surface)+(VK_KHR_xlib_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-queueFamilyIndex-01315", + "text": " queueFamilyIndex must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the given physicalDevice" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-dpy-parameter", + "text": " dpy must be a valid pointer to a Display value" + } + ] + }, + "vkGetPhysicalDeviceSurfaceCapabilitiesKHR": { + "(VK_KHR_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-pSurfaceCapabilities-parameter", + "text": " pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilitiesKHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetPhysicalDeviceSurfaceCapabilities2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceInfo-parameter", + "text": " pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pSurfaceCapabilities-parameter", + "text": " pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilities2KHR structure" + } + ] + }, + "VkPhysicalDeviceSurfaceInfo2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ + { + "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + } + ] + }, + "VkSurfaceCapabilities2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ + { + "vuid": "VUID-VkSurfaceCapabilities2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR" + }, + { + "vuid": "VUID-VkSurfaceCapabilities2KHR-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkSharedPresentSurfaceCapabilitiesKHR" + } + ] + }, + "VkSharedPresentSurfaceCapabilitiesKHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR" + } + ] + }, + "vkGetPhysicalDeviceSurfaceCapabilities2EXT": { + "(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-pSurfaceCapabilities-parameter", + "text": " pSurfaceCapabilities must be a valid pointer to a VkSurfaceCapabilities2EXT structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "VkSurfaceCapabilities2EXT": { + "(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [ + { + "vuid": "VUID-VkSurfaceCapabilities2EXT-supportedSurfaceCounters-01246", + "text": " supportedSurfaceCounters must not include VK_SURFACE_COUNTER_VBLANK_EXT unless the surface queried is a &amp;lt;&amp;lt;wsi-display-surfaces,display surface&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkSurfaceCapabilities2EXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT" + }, + { + "vuid": "VUID-VkSurfaceCapabilities2EXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceSurfaceFormatsKHR": { + "(VK_KHR_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormatCount-parameter", + "text": " pSurfaceFormatCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-pSurfaceFormats-parameter", + "text": " If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a valid pointer to an array of pSurfaceFormatCount VkSurfaceFormatKHR structures" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetPhysicalDeviceSurfaceFormats2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-parameter", + "text": " pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormatCount-parameter", + "text": " pSurfaceFormatCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormats-parameter", + "text": " If the value referenced by pSurfaceFormatCount is not 0, and pSurfaceFormats is not NULL, pSurfaceFormats must be a valid pointer to an array of pSurfaceFormatCount VkSurfaceFormat2KHR structures" + } + ] + }, + "VkSurfaceFormat2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ + { + "vuid": "VUID-VkSurfaceFormat2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR" + }, + { + "vuid": "VUID-VkSurfaceFormat2KHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceSurfacePresentModesKHR": { + "(VK_KHR_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModeCount-parameter", + "text": " pPresentModeCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-pPresentModes-parameter", + "text": " If the value referenced by pPresentModeCount is not 0, and pPresentModes is not NULL, pPresentModes must be a valid pointer to an array of pPresentModeCount VkPresentModeKHR values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetDeviceGroupPresentCapabilitiesKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkGetDeviceGroupPresentCapabilitiesKHX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceGroupPresentCapabilitiesKHX-pDeviceGroupPresentCapabilities-parameter", + "text": " pDeviceGroupPresentCapabilities must be a valid pointer to a VkDeviceGroupPresentCapabilitiesKHX structure" + } + ] + }, + "VkDeviceGroupPresentCapabilitiesKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupPresentCapabilitiesKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupPresentCapabilitiesKHX-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetDeviceGroupSurfacePresentModesKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModesKHX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModesKHX-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModesKHX-pModes-parameter", + "text": " pModes must be a valid pointer to a VkDeviceGroupPresentModeFlagsKHX value" + }, + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModesKHX-commonparent", + "text": " Both of device, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetPhysicalDevicePresentRectanglesKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkGetPhysicalDevicePresentRectanglesKHX-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDevicePresentRectanglesKHX-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRectCount-parameter", + "text": " pRectCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDevicePresentRectanglesKHX-pRects-parameter", + "text": " If the value referenced by pRectCount is not 0, and pRects is not NULL, pRects must be a valid pointer to an array of pRectCount VkRect2D structures" + }, + { + "vuid": "VUID-vkGetPhysicalDevicePresentRectanglesKHX-commonparent", + "text": " Both of physicalDevice, and surface must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetRefreshCycleDurationGOOGLE": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GOOGLE_display_timing)": [ + { + "vuid": "VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetRefreshCycleDurationGOOGLE-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkGetRefreshCycleDurationGOOGLE-pDisplayTimingProperties-parameter", + "text": " pDisplayTimingProperties must be a valid pointer to a VkRefreshCycleDurationGOOGLE structure" + }, + { + "vuid": "VUID-vkGetRefreshCycleDurationGOOGLE-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetPastPresentationTimingGOOGLE": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GOOGLE_display_timing)": [ + { + "vuid": "VUID-vkGetPastPresentationTimingGOOGLE-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetPastPresentationTimingGOOGLE-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimingCount-parameter", + "text": " pPresentationTimingCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPastPresentationTimingGOOGLE-pPresentationTimings-parameter", + "text": " If the value referenced by pPresentationTimingCount is not 0, and pPresentationTimings is not NULL, pPresentationTimings must be a valid pointer to an array of pPresentationTimingCount VkPastPresentationTimingGOOGLE structures" + }, + { + "vuid": "VUID-vkGetPastPresentationTimingGOOGLE-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkGetSwapchainStatusKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-vkGetSwapchainStatusKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetSwapchainStatusKHR-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkGetSwapchainStatusKHR-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkCreateSwapchainKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-vkCreateSwapchainKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateSwapchainKHR-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkSwapchainCreateInfoKHR structure" + }, + { + "vuid": "VUID-vkCreateSwapchainKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateSwapchainKHR-pSwapchain-parameter", + "text": " pSwapchain must be a valid pointer to a VkSwapchainKHR handle" + } + ] + }, + "VkSwapchainCreateInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-surface-01270", + "text": " surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01271", + "text": " minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01272", + "text": " minImageCount must be less than or equal to the value returned in the maxImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface if the returned maxImageCount is not zero" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageFormat-01273", + "text": " imageFormat and imageColorSpace must match the format and colorSpace members, respectively, of one of the VkSurfaceFormatKHR structures returned by vkGetPhysicalDeviceSurfaceFormatsKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageExtent-01274", + "text": " imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageExtent-01689", + "text": " imageExtent members width and height must both be non-zero" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageArrayLayers-01275", + "text": " imageArrayLayers must be greater than 0 and less than or equal to the maxImageArrayLayers member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01277", + "text": " If imageSharingMode is VK_SHARING_MODE_CONCURRENT, pQueueFamilyIndices must be a valid pointer to an array of queueFamilyIndexCount uint32_t values" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01278", + "text": " If imageSharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-preTransform-01279", + "text": " preTransform must be one of the bits present in the supportedTransforms member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-compositeAlpha-01280", + "text": " compositeAlpha must be one of the bits present in the supportedCompositeAlpha member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-presentMode-01281", + "text": " presentMode must be one of the VkPresentModeKHR values returned by vkGetPhysicalDeviceSurfacePresentModesKHR for the surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01674", + "text": " oldSwapchain must not be in the retired state" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageFormat-01778", + "text": " imageFormat, imageUsage, imageExtent, and imageArrayLayers must be supported for VK_IMAGE_TYPE_2D VK_IMAGE_TILING_OPTIMAL images as reported by vkGetPhysicalDeviceImageFormatProperties." + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHX or VkSwapchainCounterCreateInfoEXT" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkSwapchainCreateFlagBitsKHR values" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-surface-parameter", + "text": " surface must be a valid VkSurfaceKHR handle" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageFormat-parameter", + "text": " imageFormat must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageColorSpace-parameter", + "text": " imageColorSpace must be a valid VkColorSpaceKHR value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageUsage-parameter", + "text": " imageUsage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageUsage-requiredbitmask", + "text": " imageUsage must not be 0" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageSharingMode-parameter", + "text": " imageSharingMode must be a valid VkSharingMode value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-preTransform-parameter", + "text": " preTransform must be a valid VkSurfaceTransformFlagBitsKHR value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-compositeAlpha-parameter", + "text": " compositeAlpha must be a valid VkCompositeAlphaFlagBitsKHR value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-presentMode-parameter", + "text": " presentMode must be a valid VkPresentModeKHR value" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parameter", + "text": " If oldSwapchain is not VK_NULL_HANDLE, oldSwapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-oldSwapchain-parent", + "text": " If oldSwapchain is a valid handle, it must have been created, allocated, or retrieved from surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-commonparent", + "text": " Both of oldSwapchain, and surface that are valid handles must have been created, allocated, or retrieved from the same VkInstance" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01383", + "text": " minImageCount must be 1 if presentMode is either VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-presentMode-01427", + "text": " If presentMode is VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_FIFO_KHR or VK_PRESENT_MODE_FIFO_RELAXED_KHR, imageUsage must be a subset of the supported usage flags present in the supportedUsageFlags member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for surface" + }, + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageUsage-01384", + "text": " If presentMode is VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, imageUsage must be a subset of the supported usage flags present in the sharedPresentSupportedUsageFlags member of the VkSharedPresentSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for surface" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageUsage-01276", + "text": " imageUsage must be a subset of the supported usage flags present in the supportedUsageFlags member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+!(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01393", + "text": " If imageSharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyProperties for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01428", + "text": " If imageSharingMode is VK_SHARING_MODE_CONCURRENT, each element of pQueueFamilyIndices must be unique and must be less than pQueueFamilyPropertyCount returned by either vkGetPhysicalDeviceQueueFamilyProperties or vkGetPhysicalDeviceQueueFamilyProperties2KHR for the physicalDevice that was used to create device" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-physicalDeviceCount-01429", + "text": " If the logical device was created with VkDeviceGroupDeviceCreateInfoKHX::physicalDeviceCount equal to 1, flags must not contain VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX" + } + ] + }, + "VkDeviceGroupSwapchainCreateInfoKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupSwapchainCreateInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-parameter", + "text": " modes must be a valid combination of VkDeviceGroupPresentModeFlagBitsKHX values" + }, + { + "vuid": "VUID-VkDeviceGroupSwapchainCreateInfoKHX-modes-requiredbitmask", + "text": " modes must not be 0" + } + ] + }, + "VkSwapchainCounterCreateInfoEXT": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [ + { + "vuid": "VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-01244", + "text": " The bits in surfaceCounters must be supported by VkSwapchainCreateInfoKHR::surface, as reported by vkGetPhysicalDeviceSurfaceCapabilities2EXT." + }, + { + "vuid": "VUID-VkSwapchainCounterCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkSwapchainCounterCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter", + "text": " surfaceCounters must be a valid combination of VkSurfaceCounterFlagBitsEXT values" + } + ] + }, + "vkGetSwapchainCounterEXT": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [ + { + "vuid": "VUID-vkGetSwapchainCounterEXT-swapchain-01245", + "text": " One or more present commands on swapchain must have been processed by the presentation engine." + }, + { + "vuid": "VUID-vkGetSwapchainCounterEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetSwapchainCounterEXT-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkGetSwapchainCounterEXT-counter-parameter", + "text": " counter must be a valid VkSurfaceCounterFlagBitsEXT value" + }, + { + "vuid": "VUID-vkGetSwapchainCounterEXT-pCounterValue-parameter", + "text": " pCounterValue must be a valid pointer to a uint64_t value" + }, + { + "vuid": "VUID-vkGetSwapchainCounterEXT-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkDestroySwapchainKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-vkDestroySwapchainKHR-swapchain-01282", + "text": " All uses of presentable images acquired from swapchain must have completed execution" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-swapchain-01283", + "text": " If VkAllocationCallbacks were provided when swapchain was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-swapchain-01284", + "text": " If no VkAllocationCallbacks were provided when swapchain was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-swapchain-parameter", + "text": " If swapchain is not VK_NULL_HANDLE, swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroySwapchainKHR-commonparent", + "text": " Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkCreateSharedSwapchainsKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)": [ + { + "vuid": "VUID-vkCreateSharedSwapchainsKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkCreateSharedSwapchainsKHR-pCreateInfos-parameter", + "text": " pCreateInfos must be a valid pointer to an array of swapchainCount valid VkSwapchainCreateInfoKHR structures" + }, + { + "vuid": "VUID-vkCreateSharedSwapchainsKHR-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateSharedSwapchainsKHR-pSwapchains-parameter", + "text": " pSwapchains must be a valid pointer to an array of swapchainCount VkSwapchainKHR handles" + }, + { + "vuid": "VUID-vkCreateSharedSwapchainsKHR-swapchainCount-arraylength", + "text": " swapchainCount must be greater than 0" + } + ] + }, + "vkGetSwapchainImagesKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-vkGetSwapchainImagesKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetSwapchainImagesKHR-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkGetSwapchainImagesKHR-pSwapchainImageCount-parameter", + "text": " pSwapchainImageCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetSwapchainImagesKHR-pSwapchainImages-parameter", + "text": " If the value referenced by pSwapchainImageCount is not 0, and pSwapchainImages is not NULL, pSwapchainImages must be a valid pointer to an array of pSwapchainImageCount VkImage handles" + }, + { + "vuid": "VUID-vkGetSwapchainImagesKHR-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkAcquireNextImageKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-vkAcquireNextImageKHR-swapchain-01285", + "text": " swapchain must not be in the retired state" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-semaphore-01286", + "text": " If semaphore is not VK_NULL_HANDLE it must be unsignaled" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-semaphore-01779", + "text": " If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-fence-01287", + "text": " If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-semaphore-01780", + "text": " semaphore and fence must not both be equal to VK_NULL_HANDLE" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-swapchain-01802", + "text": " If the number of currently acquired images is greater than the difference between the number of images in swapchain and the value of VkSurfaceCapabilitiesKHR::minImageCount as returned by a call to vkGetPhysicalDeviceSurfaceCapabilities2KHR with the surface used to create swapchain, timeout must not be UINT64_MAX" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-semaphore-parameter", + "text": " If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-fence-parameter", + "text": " If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-pImageIndex-parameter", + "text": " pImageIndex must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-semaphore-parent", + "text": " If semaphore is a valid handle, it must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-fence-parent", + "text": " If fence is a valid handle, it must have been created, allocated, or retrieved from device" + }, + { + "vuid": "VUID-vkAcquireNextImageKHR-commonparent", + "text": " Both of device, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkAcquireNextImage2KHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-vkAcquireNextImage2KHX-swapchain-01803", + "text": " If the number of currently acquired images is greater than the difference between the number of images in the swapchain member of pAcquireInfo and the value of VkSurfaceCapabilitiesKHR::minImageCount as returned by a call to vkGetPhysicalDeviceSurfaceCapabilities2KHR with the surface used to create swapchain, the timeout member of pAcquireInfo must not be UINT64_MAX" + }, + { + "vuid": "VUID-vkAcquireNextImage2KHX-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAcquireNextImage2KHX-pAcquireInfo-parameter", + "text": " pAcquireInfo must be a valid pointer to a valid VkAcquireNextImageInfoKHX structure" + }, + { + "vuid": "VUID-vkAcquireNextImage2KHX-pImageIndex-parameter", + "text": " pImageIndex must be a valid pointer to a uint32_t value" + } + ] + }, + "VkAcquireNextImageInfoKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-swapchain-01675", + "text": " swapchain must not be in the retired state" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-semaphore-01288", + "text": " If semaphore is not VK_NULL_HANDLE it must be unsignaled" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-semaphore-01781", + "text": " If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-fence-01289", + "text": " If fence is not VK_NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-semaphore-01782", + "text": " semaphore and fence must not both be equal to VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-deviceMask-01290", + "text": " deviceMask must be a valid device mask" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-deviceMask-01291", + "text": " deviceMask must not be zero" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-semaphore-01804", + "text": " semaphore and fence must not both be equal to VK_NULL_HANDLE." + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-semaphore-parameter", + "text": " If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-fence-parameter", + "text": " If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle" + }, + { + "vuid": "VUID-VkAcquireNextImageInfoKHX-commonparent", + "text": " Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkQueuePresentKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-vkQueuePresentKHR-pSwapchains-01292", + "text": " Each element of pSwapchains member of pPresentInfo must be a swapchain that is created for a surface for which presentation is supported from queue as determined using a call to vkGetPhysicalDeviceSurfaceSupportKHR" + }, + { + "vuid": "VUID-vkQueuePresentKHR-pWaitSemaphores-01294", + "text": " When a semaphore unsignal operation defined by the elements of the pWaitSemaphores member of pPresentInfo executes on queue, no other queue must be waiting on the same semaphore." + }, + { + "vuid": "VUID-vkQueuePresentKHR-pWaitSemaphores-01295", + "text": " All elements of the pWaitSemaphores member of pPresentInfo must be semaphores that are signaled, or have &amp;lt;&amp;lt;synchronization-semaphores-signaling, semaphore signal operations&amp;gt;&amp;gt; previously submitted for execution." + }, + { + "vuid": "VUID-vkQueuePresentKHR-queue-parameter", + "text": " queue must be a valid VkQueue handle" + }, + { + "vuid": "VUID-vkQueuePresentKHR-pPresentInfo-parameter", + "text": " pPresentInfo must be a valid pointer to a valid VkPresentInfoKHR structure" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)": [ + { + "vuid": "VUID-vkQueuePresentKHR-pSwapchains-01293", + "text": " If more than one member of pSwapchains was created from a display surface, all display surfaces referenced that refer to the same display must use the same display mode" + } + ] + }, + "VkPresentInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+!(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-VkPresentInfoKHR-pImageIndices-01296", + "text": " Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_shared_presentable_image)": [ + { + "vuid": "VUID-VkPresentInfoKHR-pImageIndices-01430", + "text": " Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR layout at the time the operation is executed on a VkDevice" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)": [ + { + "vuid": "VUID-VkPresentInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR" + }, + { + "vuid": "VUID-VkPresentInfoKHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHX, VkDisplayPresentInfoKHR, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLE" + }, + { + "vuid": "VUID-VkPresentInfoKHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + }, + { + "vuid": "VUID-VkPresentInfoKHR-pWaitSemaphores-parameter", + "text": " If waitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handles" + }, + { + "vuid": "VUID-VkPresentInfoKHR-pSwapchains-parameter", + "text": " pSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handles" + }, + { + "vuid": "VUID-VkPresentInfoKHR-pImageIndices-parameter", + "text": " pImageIndices must be a valid pointer to an array of swapchainCount uint32_t values" + }, + { + "vuid": "VUID-VkPresentInfoKHR-pResults-parameter", + "text": " If pResults is not NULL, pResults must be a valid pointer to an array of swapchainCount VkResult values" + }, + { + "vuid": "VUID-VkPresentInfoKHR-swapchainCount-arraylength", + "text": " swapchainCount must be greater than 0" + }, + { + "vuid": "VUID-VkPresentInfoKHR-commonparent", + "text": " Both of the elements of pSwapchains, and the elements of pWaitSemaphores that are valid handles must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "VkPresentRegionsKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)": [ + { + "vuid": "VUID-VkPresentRegionsKHR-swapchainCount-01260", + "text": " swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext-chain of this VkPresentRegionsKHR structure." + }, + { + "vuid": "VUID-VkPresentRegionsKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR" + }, + { + "vuid": "VUID-VkPresentRegionsKHR-pRegions-parameter", + "text": " If pRegions is not NULL, pRegions must be a valid pointer to an array of swapchainCount valid VkPresentRegionKHR structures" + }, + { + "vuid": "VUID-VkPresentRegionsKHR-swapchainCount-arraylength", + "text": " swapchainCount must be greater than 0" + } + ] + }, + "VkPresentRegionKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)": [ + { + "vuid": "VUID-VkPresentRegionKHR-pRectangles-parameter", + "text": " If rectangleCount is not 0, and pRectangles is not NULL, pRectangles must be a valid pointer to an array of rectangleCount VkRectLayerKHR structures" + } + ] + }, + "VkRectLayerKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)": [ + { + "vuid": "VUID-VkRectLayerKHR-offset-01261", + "text": " The sum of offset and extent must be no greater than the imageExtent member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR." + }, + { + "vuid": "VUID-VkRectLayerKHR-layer-01262", + "text": " layer must be less than imageArrayLayers member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR." + } + ] + }, + "VkDisplayPresentInfoKHR": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_display_swapchain)": [ + { + "vuid": "VUID-VkDisplayPresentInfoKHR-srcRect-01257", + "text": " srcRect must specify a rectangular region that is a subset of the image being presented" + }, + { + "vuid": "VUID-VkDisplayPresentInfoKHR-dstRect-01258", + "text": " dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses" + }, + { + "vuid": "VUID-VkDisplayPresentInfoKHR-persistentContent-01259", + "text": " If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be VK_FALSE" + }, + { + "vuid": "VUID-VkDisplayPresentInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR" + } + ] + }, + "VkDeviceGroupPresentInfoKHX": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHX_device_group)": [ + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-swapchainCount-01297", + "text": " swapchainCount must equal 0 or VkPresentInfoKHR::swapchainCount" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-01298", + "text": " If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-01299", + "text": " If mode is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX, then each element of pDeviceMasks must have exactly one bit set, and some physical device in the logical device must include that bit in its VkDeviceGroupPresentCapabilitiesKHX::presentMask." + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-01300", + "text": " If mode is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX, then each element of pDeviceMasks must have a value for which all set bits are set in one of the elements of VkDeviceGroupPresentCapabilitiesKHX::presentMask" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-01301", + "text": " If mode is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX, then for each bit set in each element of pDeviceMasks, the corresponding element of VkDeviceGroupPresentCapabilitiesKHX::presentMask must be non-zero" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-01302", + "text": " The value of each element of pDeviceMasks must be equal to the device mask passed in VkAcquireNextImageInfoKHX::deviceMask when the image index was last acquired" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-01303", + "text": " mode must have exactly one bit set, and that bit must have been included in VkDeviceGroupSwapchainCreateInfoKHX::modes" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-pDeviceMasks-parameter", + "text": " If swapchainCount is not 0, pDeviceMasks must be a valid pointer to an array of swapchainCount uint32_t values" + }, + { + "vuid": "VUID-VkDeviceGroupPresentInfoKHX-mode-parameter", + "text": " mode must be a valid VkDeviceGroupPresentModeFlagBitsKHX value" + } + ] + }, + "VkPresentTimesInfoGOOGLE": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GOOGLE_display_timing)": [ + { + "vuid": "VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247", + "text": " swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where VkPresentInfoKHR is in the pNext chain of this VkPresentTimesInfoGOOGLE structure." + }, + { + "vuid": "VUID-VkPresentTimesInfoGOOGLE-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE" + }, + { + "vuid": "VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter", + "text": " If pTimes is not NULL, pTimes must be a valid pointer to an array of swapchainCount VkPresentTimeGOOGLE structures" + }, + { + "vuid": "VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength", + "text": " swapchainCount must be greater than 0" + } + ] + }, + "vkSetHdrMetadataEXT": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_hdr_metadata)": [ + { + "vuid": "VUID-vkSetHdrMetadataEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkSetHdrMetadataEXT-pSwapchains-parameter", + "text": " pSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handles" + }, + { + "vuid": "VUID-vkSetHdrMetadataEXT-pMetadata-parameter", + "text": " pMetadata must be a valid pointer to an array of swapchainCount valid VkHdrMetadataEXT structures" + }, + { + "vuid": "VUID-vkSetHdrMetadataEXT-swapchainCount-arraylength", + "text": " swapchainCount must be greater than 0" + }, + { + "vuid": "VUID-vkSetHdrMetadataEXT-commonparent", + "text": " Both of device, and the elements of pSwapchains must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkEnumerateInstanceLayerProperties": { + "core": [ + { + "vuid": "VUID-vkEnumerateInstanceLayerProperties-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumerateInstanceLayerProperties-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkLayerProperties structures" + } + ] + }, + "vkEnumerateDeviceLayerProperties": { + "core": [ + { + "vuid": "VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkEnumerateDeviceLayerProperties-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumerateDeviceLayerProperties-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkLayerProperties structures" + } + ] + }, + "vkEnumerateInstanceExtensionProperties": { + "core": [ + { + "vuid": "VUID-vkEnumerateInstanceExtensionProperties-pLayerName-parameter", + "text": " If pLayerName is not NULL, pLayerName must be a null-terminated UTF-8 string" + }, + { + "vuid": "VUID-vkEnumerateInstanceExtensionProperties-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumerateInstanceExtensionProperties-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkExtensionProperties structures" + } + ] + }, + "vkEnumerateDeviceExtensionProperties": { + "core": [ + { + "vuid": "VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkEnumerateDeviceExtensionProperties-pLayerName-parameter", + "text": " If pLayerName is not NULL, pLayerName must be a null-terminated UTF-8 string" + }, + { + "vuid": "VUID-vkEnumerateDeviceExtensionProperties-pPropertyCount-parameter", + "text": " pPropertyCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkEnumerateDeviceExtensionProperties-pProperties-parameter", + "text": " If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a valid pointer to an array of pPropertyCount VkExtensionProperties structures" + } + ] + }, + "vkGetPhysicalDeviceFeatures": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFeatures-pFeatures-parameter", + "text": " pFeatures must be a valid pointer to a VkPhysicalDeviceFeatures structure" + } + ] + }, + "vkGetPhysicalDeviceFeatures2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceFeatures2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFeatures2KHR-pFeatures-parameter", + "text": " pFeatures must be a valid pointer to a VkPhysicalDeviceFeatures2KHR structure" + } + ] + }, + "VkPhysicalDeviceFeatures2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkPhysicalDeviceFeatures2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceFeatures2KHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPhysicalDevice16BitStorageFeaturesKHR, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceMultiviewFeaturesKHX, VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR, or VkPhysicalDeviceVariablePointerFeaturesKHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceFeatures2KHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + } + ] + }, + "VkPhysicalDeviceVariablePointerFeaturesKHR": { + "(VK_KHR_variable_pointers)": [ + { + "vuid": "VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-variablePointers-01431", + "text": " If variablePointers is enabled then variablePointersStorageBuffer must also be enabled." + }, + { + "vuid": "VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceVariablePointerFeaturesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceMultiviewFeaturesKHX": { + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewGeometryShader-00580", + "text": " If multiviewGeometryShader is enabled then multiview must also be enabled." + }, + { + "vuid": "VUID-VkPhysicalDeviceMultiviewFeaturesKHX-multiviewTessellationShader-00581", + "text": " If multiviewTessellationShader is enabled then multiview must also be enabled." + }, + { + "vuid": "VUID-VkPhysicalDeviceMultiviewFeaturesKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX" + } + ] + }, + "VkPhysicalDevice16BitStorageFeaturesKHR": { + "(VK_KHR_16bit_storage)": [ + { + "vuid": "VUID-VkPhysicalDevice16BitStorageFeaturesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR" + } + ] + }, + "VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR": { + "(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR" + } + ] + }, + "VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT": { + "(VK_EXT_blend_operation_advanced)": [ + { + "vuid": "VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT" + } + ] + }, + "VkPhysicalDevicePushDescriptorPropertiesKHR": { + "(VK_KHR_push_descriptor)": [ + { + "vuid": "VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceMultiviewPropertiesKHX": { + "(VK_KHX_multiview)": [ + { + "vuid": "VUID-VkPhysicalDeviceMultiviewPropertiesKHX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX" + }, + { + "vuid": "VUID-VkPhysicalDeviceMultiviewPropertiesKHX-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceDiscardRectanglePropertiesEXT": { + "(VK_EXT_discard_rectangles)": [ + { + "vuid": "VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceSampleLocationsPropertiesEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceExternalMemoryHostPropertiesEXT": { + "(VK_EXT_external_memory_host)": [ + { + "vuid": "VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX": { + "(VK_NVX_multiview_per_view_attributes)": [ + { + "vuid": "VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX" + }, + { + "vuid": "VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDevicePointClippingPropertiesKHR": { + "(VK_KHR_maintenance2)": [ + { + "vuid": "VUID-VkPhysicalDevicePointClippingPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkPhysicalDevicePointClippingPropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT": { + "(VK_EXT_blend_operation_advanced)": [ + { + "vuid": "VUID-VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT" + } + ] + }, + "VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT": { + "(VK_EXT_sampler_filter_minmax)": [ + { + "vuid": "VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkPhysicalDeviceConservativeRasterizationPropertiesEXT": { + "(VK_EXT_conservative_rasterization)": [ + { + "vuid": "VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceMultisamplePropertiesEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-samples-parameter", + "text": " samples must be a valid VkSampleCountFlagBits value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-pMultisampleProperties-parameter", + "text": " pMultisampleProperties must be a valid pointer to a VkMultisamplePropertiesEXT structure" + } + ] + }, + "VkMultisamplePropertiesEXT": { + "(VK_EXT_sample_locations)": [ + { + "vuid": "VUID-VkMultisamplePropertiesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT" + }, + { + "vuid": "VUID-VkMultisamplePropertiesEXT-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceFormatProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties-pFormatProperties-parameter", + "text": " pFormatProperties must be a valid pointer to a VkFormatProperties structure" + } + ] + }, + "vkGetPhysicalDeviceFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties2KHR-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceFormatProperties2KHR-pFormatProperties-parameter", + "text": " pFormatProperties must be a valid pointer to a VkFormatProperties2KHR structure" + } + ] + }, + "VkFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkFormatProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkFormatProperties2KHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceImageFormatProperties": { + "core": [ + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-type-parameter", + "text": " type must be a valid VkImageType value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-flags-parameter", + "text": " flags must be a valid combination of VkImageCreateFlagBits values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties-pImageFormatProperties-parameter", + "text": " pImageFormatProperties must be a valid pointer to a VkImageFormatProperties structure" + } + ] + }, + "vkGetPhysicalDeviceExternalImageFormatPropertiesNV": { + "(VK_NV_external_memory_capabilities)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-type-parameter", + "text": " type must be a valid VkImageType value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-flags-parameter", + "text": " flags must be a valid combination of VkImageCreateFlagBits values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-externalHandleType-parameter", + "text": " externalHandleType must be a valid combination of VkExternalMemoryHandleTypeFlagBitsNV values" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-pExternalImageFormatProperties-parameter", + "text": " pExternalImageFormatProperties must be a valid pointer to a VkExternalImageFormatPropertiesNV structure" + } + ] + }, + "vkGetPhysicalDeviceImageFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatInfo-parameter", + "text": " pImageFormatInfo must be a valid pointer to a valid VkPhysicalDeviceImageFormatInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceImageFormatProperties2KHR-pImageFormatProperties-parameter", + "text": " pImageFormatProperties must be a valid pointer to a VkImageFormatProperties2KHR structure" + } + ] + }, + "VkPhysicalDeviceImageFormatInfo2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-pNext-pNext", + "text": " pNext must be NULL or a pointer to a valid instance of VkPhysicalDeviceExternalImageFormatInfoKHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-format-parameter", + "text": " format must be a valid VkFormat value" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-type-parameter", + "text": " type must be a valid VkImageType value" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-tiling-parameter", + "text": " tiling must be a valid VkImageTiling value" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-parameter", + "text": " usage must be a valid combination of VkImageUsageFlagBits values" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-VkPhysicalDeviceImageFormatInfo2KHR-flags-parameter", + "text": " flags must be a valid combination of VkImageCreateFlagBits values" + } + ] + }, + "VkImageFormatProperties2KHR": { + "(VK_KHR_get_physical_device_properties2)": [ + { + "vuid": "VUID-VkImageFormatProperties2KHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR" + }, + { + "vuid": "VUID-VkImageFormatProperties2KHR-pNext-pNext", + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkExternalImageFormatPropertiesKHR, VkSamplerYcbcrConversionImageFormatPropertiesKHR, or VkTextureLODGatherFormatPropertiesAMD" + }, + { + "vuid": "VUID-VkImageFormatProperties2KHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + } + ] + }, + "VkPhysicalDeviceExternalImageFormatInfoKHR": { + "(VK_KHR_get_physical_device_properties2)+(VK_KHR_external_memory_capabilities)": [ + { + "vuid": "VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalImageFormatInfoKHR-handleType-parameter", + "text": " If handleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "VkExternalImageFormatPropertiesKHR": { + "(VK_KHR_get_physical_device_properties2)+(VK_KHR_external_memory_capabilities)": [ + { + "vuid": "VUID-VkExternalImageFormatPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkExternalImageFormatPropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "VkSamplerYcbcrConversionImageFormatPropertiesKHR": { + "(VK_KHR_get_physical_device_properties2)+(VK_KHR_sampler_ycbcr_conversion)": [ + { + "vuid": "VUID-VkSamplerYcbcrConversionImageFormatPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR" + } + ] + }, + "vkGetPhysicalDeviceExternalBufferPropertiesKHR": { + "(VK_KHR_external_memory_capabilities)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferInfo-parameter", + "text": " pExternalBufferInfo must be a valid pointer to a valid VkPhysicalDeviceExternalBufferInfoKHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalBufferPropertiesKHR-pExternalBufferProperties-parameter", + "text": " pExternalBufferProperties must be a valid pointer to a VkExternalBufferPropertiesKHR structure" + } + ] + }, + "VkPhysicalDeviceExternalBufferInfoKHR": { + "(VK_KHR_external_memory_capabilities)": [ + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-flags-parameter", + "text": " flags must be a valid combination of VkBufferCreateFlagBits values" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-parameter", + "text": " usage must be a valid combination of VkBufferUsageFlagBits values" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-usage-requiredbitmask", + "text": " usage must not be 0" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalBufferInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalMemoryHandleTypeFlagBitsKHR value" + } + ] + }, + "VkExternalBufferPropertiesKHR": { + "(VK_KHR_external_memory_capabilities)": [ + { + "vuid": "VUID-VkExternalBufferPropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkExternalBufferPropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR": { + "(VK_KHR_external_semaphore_capabilities)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreInfo-parameter", + "text": " pExternalSemaphoreInfo must be a valid pointer to a valid VkPhysicalDeviceExternalSemaphoreInfoKHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalSemaphorePropertiesKHR-pExternalSemaphoreProperties-parameter", + "text": " pExternalSemaphoreProperties must be a valid pointer to a VkExternalSemaphorePropertiesKHR structure" + } + ] + }, + "VkPhysicalDeviceExternalSemaphoreInfoKHR": { + "(VK_KHR_external_semaphore_capabilities)": [ + { + "vuid": "VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalSemaphoreInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalSemaphoreHandleTypeFlagBitsKHR value" + } + ] + }, + "VkExternalSemaphorePropertiesKHR": { + "(VK_KHR_external_semaphore_capabilities)": [ + { + "vuid": "VUID-VkExternalSemaphorePropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkExternalSemaphorePropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkGetPhysicalDeviceExternalFencePropertiesKHR": { + "(VK_KHR_external_fence_capabilities)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceInfo-parameter", + "text": " pExternalFenceInfo must be a valid pointer to a valid VkPhysicalDeviceExternalFenceInfoKHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceExternalFencePropertiesKHR-pExternalFenceProperties-parameter", + "text": " pExternalFenceProperties must be a valid pointer to a VkExternalFencePropertiesKHR structure" + } + ] + }, + "VkPhysicalDeviceExternalFenceInfoKHR": { + "(VK_KHR_external_fence_capabilities)": [ + { + "vuid": "VUID-VkPhysicalDeviceExternalFenceInfoKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalFenceInfoKHR-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkPhysicalDeviceExternalFenceInfoKHR-handleType-parameter", + "text": " handleType must be a valid VkExternalFenceHandleTypeFlagBitsKHR value" + } + ] + }, + "VkExternalFencePropertiesKHR": { + "(VK_KHR_external_fence_capabilities)": [ + { + "vuid": "VUID-VkExternalFencePropertiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR" + }, + { + "vuid": "VUID-VkExternalFencePropertiesKHR-pNext-pNext", + "text": " pNext must be NULL" + } + ] + }, + "vkDebugMarkerSetObjectNameEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkDebugMarkerSetObjectNameEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDebugMarkerSetObjectNameEXT-pNameInfo-parameter", + "text": " pNameInfo must be a valid pointer to a valid VkDebugMarkerObjectNameInfoEXT structure" + } + ] + }, + "VkDebugMarkerObjectNameInfoEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-objectType-01490", + "text": " objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT" + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-object-01491", + "text": " object must not be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-object-01492", + "text": " object must be a Vulkan object of the type associated with objectType as defined in &amp;lt;&amp;lt;debug-report-object-types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT" + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-objectType-parameter", + "text": " objectType must be a valid VkDebugReportObjectTypeEXT value" + }, + { + "vuid": "VUID-VkDebugMarkerObjectNameInfoEXT-pObjectName-parameter", + "text": " pObjectName must be a null-terminated UTF-8 string" + } + ] + }, + "vkDebugMarkerSetObjectTagEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkDebugMarkerSetObjectTagEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkDebugMarkerSetObjectTagEXT-pTagInfo-parameter", + "text": " pTagInfo must be a valid pointer to a valid VkDebugMarkerObjectTagInfoEXT structure" + } + ] + }, + "VkDebugMarkerObjectTagInfoEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-objectType-01493", + "text": " objectType must not be VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-object-01494", + "text": " object must not be VK_NULL_HANDLE" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-object-01495", + "text": " object must be a Vulkan object of the type associated with objectType as defined in &amp;lt;&amp;lt;debug-report-object-types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-objectType-parameter", + "text": " objectType must be a valid VkDebugReportObjectTypeEXT value" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-pTag-parameter", + "text": " pTag must be a valid pointer to an array of tagSize bytes" + }, + { + "vuid": "VUID-VkDebugMarkerObjectTagInfoEXT-tagSize-arraylength", + "text": " tagSize must be greater than 0" + } + ] + }, + "vkCmdDebugMarkerBeginEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDebugMarkerBeginEXT-pMarkerInfo-parameter", + "text": " pMarkerInfo must be a valid pointer to a valid VkDebugMarkerMarkerInfoEXT structure" + }, + { + "vuid": "VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + } + ] + }, + "VkDebugMarkerMarkerInfoEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-VkDebugMarkerMarkerInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT" + }, + { + "vuid": "VUID-VkDebugMarkerMarkerInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDebugMarkerMarkerInfoEXT-pMarkerName-parameter", + "text": " pMarkerName must be a null-terminated UTF-8 string" + } + ] + }, + "vkCmdDebugMarkerEndEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01239", + "text": " There must be an outstanding vkCmdDebugMarkerBeginEXT command prior to the vkCmdDebugMarkerEndEXT on the queue that commandBuffer is submitted to" + }, + { + "vuid": "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-01240", + "text": " If commandBuffer is a secondary command buffer, there must be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT." + }, + { + "vuid": "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDebugMarkerEndEXT-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + } + ] + }, + "vkCmdDebugMarkerInsertEXT": { + "(VK_EXT_debug_marker)": [ + { + "vuid": "VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-parameter", + "text": " commandBuffer must be a valid VkCommandBuffer handle" + }, + { + "vuid": "VUID-vkCmdDebugMarkerInsertEXT-pMarkerInfo-parameter", + "text": " pMarkerInfo must be a valid pointer to a valid VkDebugMarkerMarkerInfoEXT structure" + }, + { + "vuid": "VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-recording", + "text": " commandBuffer must be in the &amp;lt;&amp;lt;commandbuffers-lifecycle, recording state&amp;gt;&amp;gt;" + }, + { + "vuid": "VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-cmdpool", + "text": " The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations" + } + ] + }, + "vkCreateDebugReportCallbackEXT": { + "(VK_EXT_debug_report)": [ + { + "vuid": "VUID-vkCreateDebugReportCallbackEXT-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateDebugReportCallbackEXT-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkDebugReportCallbackCreateInfoEXT structure" + }, + { + "vuid": "VUID-vkCreateDebugReportCallbackEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateDebugReportCallbackEXT-pCallback-parameter", + "text": " pCallback must be a valid pointer to a VkDebugReportCallbackEXT handle" + } + ] + }, + "VkDebugReportCallbackCreateInfoEXT": { + "(VK_EXT_debug_report)": [ + { + "vuid": "VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-01385", + "text": " pfnCallback must be a valid PFN_vkDebugReportCallbackEXT" + }, + { + "vuid": "VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkDebugReportCallbackCreateInfoEXT-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter", + "text": " flags must be a valid combination of VkDebugReportFlagBitsEXT values" + } + ] + }, + "vkDebugReportMessageEXT": { + "(VK_EXT_debug_report)": [ + { + "vuid": "VUID-vkDebugReportMessageEXT-object-01241", + "text": " object must be a Vulkan object or VK_NULL_HANDLE" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-objectType-01498", + "text": " If objectType is not VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and object is not VK_NULL_HANDLE, object must be a Vulkan object of the corresponding type associated with objectType as defined in &amp;lt;&amp;lt;debug-report-object-types&amp;gt;&amp;gt;." + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-flags-parameter", + "text": " flags must be a valid combination of VkDebugReportFlagBitsEXT values" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-flags-requiredbitmask", + "text": " flags must not be 0" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-objectType-parameter", + "text": " objectType must be a valid VkDebugReportObjectTypeEXT value" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-pLayerPrefix-parameter", + "text": " pLayerPrefix must be a null-terminated UTF-8 string" + }, + { + "vuid": "VUID-vkDebugReportMessageEXT-pMessage-parameter", + "text": " pMessage must be a null-terminated UTF-8 string" + } + ] + }, + "vkDestroyDebugReportCallbackEXT": { + "(VK_EXT_debug_report)": [ + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-instance-01242", + "text": " If VkAllocationCallbacks were provided when callback was created, a compatible set of callbacks must be provided here" + }, + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-instance-01243", + "text": " If no VkAllocationCallbacks were provided when callback was created, pAllocator must be NULL" + }, + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-callback-parameter", + "text": " callback must be a valid VkDebugReportCallbackEXT handle" + }, + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkDestroyDebugReportCallbackEXT-callback-parent", + "text": " callback must have been created, allocated, or retrieved from instance" + } + ] + } + } +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/scripts/vk.xml b/sources/third_party/vulkan/src/scripts/vk.xml index 7ed72c5f890fefeb32e7820ff60b389861f7b5ed..7a6f3aea06b8ade6d5c2540021e8d9d9906919b0 100644 --- a/sources/third_party/vulkan/src/scripts/vk.xml +++ b/sources/third_party/vulkan/src/scripts/vk.xml @@ -1,7 +1,7 @@ -Copyright (c) 2015-2017 The Khronos Group Inc. +Copyright (c) 2015-2018 The Khronos Group Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -107,7 +107,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 62 +#define VK_HEADER_VERSION 69
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -245,6 +245,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; typedef VkFlags VkValidationCacheCreateFlagsEXT; + typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) @@ -386,6 +387,9 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + WSI extensions @@ -977,7 +981,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkSampleCountFlagBits rasterizationSamplesNumber of samples used for rasterization VkBool32 sampleShadingEnableoptional (GL45) float minSampleShadingoptional (GL45) - const VkSampleMask* pSampleMaskArray of sampleMask words + const VkSampleMask* pSampleMaskArray of sampleMask words VkBool32 alphaToCoverageEnable VkBool32 alphaToOneEnable @@ -1250,7 +1254,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkBool32 shaderInt6464-bit integers in shaders VkBool32 shaderInt1616-bit integers in shaders VkBool32 shaderResourceResidencyshader can use texture operations that return resource residency information (requires sparseNonResident support) - VkBool32 shaderResourceMinLodshader can use texture operations that specify minimum resource level of detail + VkBool32 shaderResourceMinLodshader can use texture operations that specify minimum resource LOD VkBool32 sparseBindingSparse resources support: Resource memory can be managed at opaque page level rather than object level VkBool32 sparseResidencyBufferSparse resources support: GPU can access partially resident buffers VkBool32 sparseResidencyImage2DSparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images @@ -1340,7 +1344,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t mipmapPrecisionBitsnumber bits of precision for selecting mipmap weights uint32_t maxDrawIndexedIndexValuemax index value for indexed draw calls (for 32-bit indices) uint32_t maxDrawIndirectCountmax draw count for indirect draw calls - float maxSamplerLodBiasmax absolute sampler level of detail bias + float maxSamplerLodBiasmax absolute sampler LOD bias float maxSamplerAnisotropymax degree of sampler anisotropy uint32_t maxViewportsmax number of active viewports uint32_t maxViewportDimensions[2]max viewport dimensions (x,y) @@ -1527,7 +1531,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkViSurfaceCreateFlagsNN flags - void* window + void* window VkStructureType sType @@ -2317,13 +2321,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkIOSSurfaceCreateFlagsMVK flags - const void* pView + const void* pView VkStructureType sType const void* pNext VkMacOSSurfaceCreateFlagsMVK flags - const void* pView + const void* pView float xcoeff @@ -2623,6 +2627,64 @@ private version is maintained in the 1.0 branch of the member gitlab server. int format int usage + + uint32_t numUsedVgprs + uint32_t numUsedSgprs + uint32_t ldsSizePerLocalWorkGroup + size_t ldsUsageSizeInBytes + size_t scratchMemUsageInBytes + + + VkShaderStageFlags shaderStageMask + VkShaderResourceUsageAMD resourceUsage + uint32_t numPhysicalVgprs + uint32_t numPhysicalSgprs + uint32_t numAvailableVgprs + uint32_t numAvailableSgprs + uint32_t computeWorkGroupSize[3] + + + VkStructureType sType + const void* pNext + VkQueueGlobalPriorityEXT globalPriority + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBitsKHR handleType + void* pHostPointer + + + VkStructureType sType + void* pNext + uint32_t memoryTypeBits + + + VkStructureType sType + void* pNext + VkDeviceSize minImportedHostPointerAlignment + + + VkStructureType sType + void* pNextPointer to next structure + float primitiveOverestimationSizeThe size in pixels the primitive is enlarged at each edge during conservative rasterization + float maxExtraPrimitiveOverestimationSizeThe maximum additional overestimation the client can specify in the pipeline state + float extraPrimitiveOverestimationSizeGranularityThe granularity of extra overestimation sizes the implementations supports between 0 and maxExtraOverestimationSize + VkBool32 primitiveUnderestimationtrue if the implementation supports conservative rasterization underestimation mode + VkBool32 conservativePointAndLineRasterizationtrue if conservative rasterization also applies to points and lines + VkBool32 degenerateTrianglesRasterizedtrue if degenerate triangles (those with zero area after snap) are rasterized + VkBool32 degenerateLinesRasterizedtrue if degenerate lines (those with zero length after snap) are rasterized + VkBool32 fullyCoveredFragmentShaderInputVariabletrue if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input + variable + VkBool32 conservativeRasterizationPostDepthCoveragetrue if the implementation supports both conservative rasterization and post depth coverage sample coverage mask + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationConservativeStateCreateFlagsEXT flags + VkConservativeRasterizationModeEXT conservativeRasterizationMode + float extraPrimitiveOverestimationSize + Vulkan enumerant (token) definitions @@ -2644,6 +2706,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. + @@ -3468,7 +3531,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + @@ -3649,6 +3712,22 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + + + + + + + + + + + + + + @@ -3796,7 +3875,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkDeviceSize offset VkDeviceSize size VkMemoryMapFlags flags - void** ppData + void** ppData void vkUnmapMemory @@ -4269,7 +4348,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount - const VkViewport* pViewports + const VkViewport* pViewports void vkCmdSetScissor @@ -4549,7 +4628,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t firstQuery uint32_t queryCount - + void vkCmdWriteTimestamp VkCommandBuffer commandBuffer VkPipelineStageFlagBits pipelineStage @@ -5151,7 +5230,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t heapIndex uint32_t localDeviceIndex uint32_t remoteDeviceIndex - VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures + VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures VkResult vkBindBufferMemory2KHR @@ -5179,7 +5258,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkResult vkGetDeviceGroupSurfacePresentModesKHX VkDevice device VkSurfaceKHR surface - VkDeviceGroupPresentModeFlagsKHX* pModes + VkDeviceGroupPresentModeFlagsKHX* pModes VkResult vkAcquireNextImage2KHX @@ -5222,7 +5301,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkDevice device VkDescriptorSet descriptorSet VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate - const void* pData + const void* pData void vkCmdPushDescriptorSetWithTemplateKHR @@ -5230,7 +5309,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate VkPipelineLayout layout uint32_t set - const void* pData + const void* pData void vkSetHdrMetadataEXT @@ -5250,7 +5329,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkSwapchainKHR swapchain VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties - + VkResult vkGetPastPresentationTimingGOOGLE VkDevice device VkSwapchainKHR swapchain @@ -5276,7 +5355,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkCommandBuffer commandBuffer uint32_t firstViewport uint32_t viewportCount - const VkViewportWScalingNV* pViewportWScalings + const VkViewportWScalingNV* pViewportWScalings void vkCmdSetDiscardRectangleEXT @@ -5391,6 +5470,30 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkImage image int* pNativeFenceFd + + VkResult vkGetShaderInfoAMD + VkDevice device + VkPipeline pipeline + VkShaderStageFlagBits shaderStage + VkShaderInfoTypeAMD infoType + size_t* pInfoSize + void* pInfo + + + VkResult vkGetMemoryHostPointerPropertiesEXT + VkDevice device + VkExternalMemoryHandleTypeFlagBitsKHR handleType + const void* pHostPointer + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties + + + void vkCmdWriteBufferMarkerAMD + VkCommandBuffer commandBuffer + VkPipelineStageFlagBits pipelineStage + VkBuffer dstBuffer + VkDeviceSize dstOffset + uint32_t marker + @@ -5766,7 +5869,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + @@ -5989,10 +6092,14 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + + + + + @@ -6663,10 +6770,16 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + + + + + + + @@ -6893,16 +7006,18 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + + - + - - + + + @@ -7282,6 +7397,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. + @@ -7347,34 +7463,38 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + - - + + - - + + - - + + - - + + + + + + @@ -7389,11 +7509,135 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sources/third_party/vulkan/src/scripts/vk_validation_stats.py b/sources/third_party/vulkan/src/scripts/vk_validation_stats.py index 58c5c0b4b1c9507c14596be937ca9c2cee4c4507..05b91256518277e928833a8265dd332fe91bf8b8 100755 --- a/sources/third_party/vulkan/src/scripts/vk_validation_stats.py +++ b/sources/third_party/vulkan/src/scripts/vk_validation_stats.py @@ -24,6 +24,13 @@ import sys import platform # vk_validation_stats.py overview +# +# usage: +# python vk_validation_stats.py [verbose] +# +# Arguments: +# verbose - enables verbose output, including VUID duplicates +# # This script is intended to generate statistics on the state of validation code # based on information parsed from the source files and the database file # Here's what it currently does: @@ -185,12 +192,12 @@ class ValidationSource: filepath = '../%s/layers/%s' % (build_dir, source) if os.path.isfile(filepath): qualified_paths.append(filepath) - continue + break if len(self.generated_source_files) != len(qualified_paths): print("Error: Unable to locate one or more of the following source files in the %s directories" % (", ".join(generated_source_directories))) print(self.generated_source_files) print("Skipping documentation validation test") - quit() + exit(1) else: self.source_files.extend(qualified_paths) @@ -206,14 +213,14 @@ class ValidationSource: continue # Find enums #if 'VALIDATION_ERROR_' in line and True not in [ignore in line for ignore in ['[VALIDATION_ERROR_', 'UNIQUE_VALIDATION_ERROR_CODE']]: - if ' VALIDATION_ERROR_' in line: + if 'VALIDATION_ERROR_' in line: # Need to isolate the validation error enum #print("Line has check:%s" % (line)) line_list = line.split() enum_list = [] for str in line_list: if 'VALIDATION_ERROR_' in str and True not in [ignore_str in str for ignore_str in ['[VALIDATION_ERROR_', 'VALIDATION_ERROR_UNDEFINED', 'UNIQUE_VALIDATION_ERROR_CODE']]: - enum_list.append(str.strip(',);')) + enum_list.append(str.strip(',);{}')) #break for enum in enum_list: if enum != '': @@ -303,7 +310,7 @@ class bcolors: def main(argv): result = 0 # Non-zero result indicates an error case - terse_mode = 'terse_mode' in sys.argv + verbose_mode = 'verbose' in sys.argv # parse db val_db = ValidationDatabase() val_db.read() @@ -320,14 +327,14 @@ def main(argv): # Process stats - Just doing this inline in main, could make a fancy class to handle # all the processing of data and then get results from that txt_color = bcolors() - if terse_mode == False: + if verbose_mode: print("Validation Statistics") else: - print("Validation/Documentation Consistency Test)") + print("Validation/Documentation Consistency Test") # First give number of checks in db & header and report any discrepancies db_enums = len(val_db.db_dict.keys()) hdr_enums = len(val_header.enums) - if not terse_mode: + if verbose_mode: print(" Database file includes %d unique checks" % (db_enums)) print(" Header file declares %d unique checks" % (hdr_enums)) @@ -346,7 +353,7 @@ def main(argv): if not tmp_db_dict.pop(enum, False): db_missing.append(enum) if db_enums == hdr_enums and len(db_missing) == 0 and len(tmp_db_dict.keys()) == 0: - if not terse_mode: + if verbose_mode: print(txt_color.green() + " Database and Header match, GREAT!" + txt_color.endc()) else: print(txt_color.red() + " Uh oh, Database doesn't match Header :(" + txt_color.endc()) @@ -372,15 +379,15 @@ def main(argv): multiple_uses = True if src_enum not in val_db.db_implemented_enums: imp_not_claimed.append(src_enum) - if not terse_mode: + if verbose_mode: print(" Database file claims that %d checks (%s) are implemented in source." % (len(val_db.db_implemented_enums), "{0:.0f}%".format(float(len(val_db.db_implemented_enums))/db_enums * 100))) - if len(val_db.db_unimplemented_implicit) > 0 and not terse_mode: + if len(val_db.db_unimplemented_implicit) > 0 and verbose_mode: print(" Database file claims %d implicit checks (%s) that are not implemented." % (len(val_db.db_unimplemented_implicit), "{0:.0f}%".format(float(len(val_db.db_unimplemented_implicit))/db_enums * 100))) total_checks = len(val_db.db_implemented_enums) + len(val_db.db_unimplemented_implicit) print(" If all implicit checks are handled by parameter validation this is a total of %d (%s) checks covered." % (total_checks, "{0:.0f}%".format(float(total_checks)/db_enums * 100))) if len(imp_not_found) == 0 and len(imp_not_claimed) == 0: - if not terse_mode: + if verbose_mode: print(txt_color.green() + " All claimed Database implemented checks have been found in source, and no source checks aren't claimed in Database, GREAT!" + txt_color.endc()) else: result = 1 @@ -394,7 +401,7 @@ def main(argv): for imp_enum in imp_not_claimed: print(txt_color.red() + " %s" % (imp_enum) + txt_color.endc()) - if multiple_uses and not terse_mode: + if multiple_uses and verbose_mode: print(txt_color.yellow() + " Note that some checks are used multiple times. These may be good candidates for new valid usage spec language." + txt_color.endc()) print(txt_color.yellow() + " Here is a list of each check used multiple times with its number of uses:" + txt_color.endc()) for enum in val_source.enum_count_dict: @@ -421,7 +428,7 @@ def main(argv): if testname not in tests_missing_enum: tests_missing_enum[testname] = [] tests_missing_enum[testname].append(enum) - if tests_missing_enum and not terse_mode: + if tests_missing_enum and verbose_mode: print(txt_color.yellow() + " \nThe following tests do not use their reported enums to check for the validation error. You may want to update these to pass the expected enum to SetDesiredFailureMsg:" + txt_color.endc()) for testname in tests_missing_enum: print(txt_color.yellow() + " Testname %s does not explicitly check for these ids:" % (testname) + txt_color.endc()) @@ -429,10 +436,10 @@ def main(argv): print(txt_color.yellow() + " %s" % (enum) + txt_color.endc()) # TODO : Go through all enums found in the test file and make sure they're correctly documented in the database file - if not terse_mode: + if verbose_mode: print(" Database file claims that %d checks have tests written." % len(val_db.db_enum_to_tests)) if len(bad_testnames) == 0: - if not terse_mode: + if verbose_mode: print(txt_color.green() + " All claimed tests have valid names. That's good!" + txt_color.endc()) else: print(txt_color.red() + " The following testnames in Database appear to be invalid:") diff --git a/sources/third_party/vulkan/src/scripts/vuid_mapping.py b/sources/third_party/vulkan/src/scripts/vuid_mapping.py index b530f97d65ecfc45350bb4150cd896aa5ae6e9c7..031cbe23bb35a51f867a38921aecb6eef279f111 100644 --- a/sources/third_party/vulkan/src/scripts/vuid_mapping.py +++ b/sources/third_party/vulkan/src/scripts/vuid_mapping.py @@ -571,6 +571,16 @@ func_struct_id_map = { 'VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR' : 515, 'VkSamplerYcbcrConversionImageFormatPropertiesKHR' : 516, 'VkSamplerYcbcrConversionInfoKHR' : 517, +'VkDeviceQueueGlobalPriorityCreateInfoEXT' : 518, +'vkGetShaderInfoAMD' : 519, +'VkShaderStatisticsInfoAMD' : 520, +'VkImportMemoryHostPointerInfoEXT' : 521, +'VkMemoryHostPointerPropertiesEXT' : 522, +'VkPhysicalDeviceExternalMemoryHostPropertiesEXT' : 523, +'vkGetMemoryHostPointerPropertiesEXT' : 524, +'VkPhysicalDeviceConservativeRasterizationPropertiesEXT' : 525, +'VkPipelineRasterizationConservativeStateCreateInfoEXT' : 526, +'vkCmdWriteBufferMarkerAMD' : 527, ### ADD New func/struct mappings above this line } # Mapping of params to unique IDs @@ -1076,6 +1086,16 @@ implicit_param_map = { 'pViewFormats' : 498, 'conversion' : 499, 'pPostSubpassSampleLocations' : 500, +'globalPriority' : 501, +'shaderStage' : 502, +'infoType' : 503, +'pInfoSize' : 504, +'shaderStageMask' : 505, +'pMemoryHostPointerProperties' : 506, +'pHostPointer' : 507, +'conservativeRasterizationMode' : 508, +'pViewports' : 509, +'pViewportWScalings' : 510, ### ADD New implicit param mappings above this line } @@ -1096,7 +1116,7 @@ def convertVUID(vuid_string): print (" replace '### ADD New func/struct mappings above this line' line with \"'%s' : %d,\"" % (vuid_parts[1], len(func_struct_id_map))) func_struct_id_map[vuid_parts[1]] = len(func_struct_id_map) #func_struct_update = True - sys.exit() + sys.exit(1) uniqueid = func_struct_id_map[vuid_parts[1]] << FUNC_STRUCT_SHIFT if vuid_parts[-1].isdigit(): # explit VUID has int on the end explicit_id = int(vuid_parts[-1]) @@ -1105,7 +1125,7 @@ def convertVUID(vuid_string): else: # implicit case if vuid_parts[-1] not in implicit_type_map: print("ERROR: Missing mapping for implicit type '%s'!\nTODO: Please add new mapping." % (vuid_parts[-1])) - sys.exit() + sys.exit(1) else: param_id = 0 # Default when no param is available if vuid_parts[-2] != vuid_parts[1]: # we have a parameter @@ -1116,7 +1136,7 @@ def convertVUID(vuid_string): print (" replace '### ADD New implicit param mappings above this line' line with \"'%s' : %d,\"" % (vuid_parts[-2], len(implicit_param_map))) implicit_param_map[vuid_parts[-2]] = len(implicit_param_map) #imp_param_update = True - sys.exit() + sys.exit(1) uniqueid = uniqueid + (param_id << IMPLICIT_PARAM_SHIFT) + (implicit_type_map[vuid_parts[-1]] << IMPLICIT_TYPE_SHIFT) + implicit_bit0 else: # No parameter so that field is 0 uniqueid = uniqueid + (implicit_type_map[vuid_parts[-1]] << IMPLICIT_TYPE_SHIFT) + implicit_bit0 diff --git a/sources/third_party/vulkan/src/tests/_run_all_tests.ps1 b/sources/third_party/vulkan/src/tests/_run_all_tests.ps1 index 05c2141efd4a0b39834dd123d19c6ccad2fcb308..9c63adf34de4bf53a5c8a9a17dba88a7d4e9b366 100644 --- a/sources/third_party/vulkan/src/tests/_run_all_tests.ps1 +++ b/sources/third_party/vulkan/src/tests/_run_all_tests.ps1 @@ -34,6 +34,6 @@ if ($lastexitcode -ne 0) { exit 1 } -& .\vkvalidatelayerdoc.ps1 terse_mode +& .\vkvalidatelayerdoc.ps1 exit $lastexitcode diff --git a/sources/third_party/vulkan/src/tests/_vkvalidatelayerdoc.ps1 b/sources/third_party/vulkan/src/tests/_vkvalidatelayerdoc.ps1 index a3b5dc32d976bd1e464154fcaa5f9e0e97a35ad1..1ef84d6b73da4d656328890e6e5198ce8ed30b74 100644 --- a/sources/third_party/vulkan/src/tests/_vkvalidatelayerdoc.ps1 +++ b/sources/third_party/vulkan/src/tests/_vkvalidatelayerdoc.ps1 @@ -18,10 +18,6 @@ if ($args[0] -eq "-Debug") { $dPath = "Release" } -if (($args[0] -eq "terse_mode") -Or ($args[1] -eq "terse_mode")) { - $output_mode = "terse_mode" -} - write-host -background black -foreground green "[ RUN ] " -nonewline write-host "vkvalidatelayerdoc.ps1: Validate layer documentation" @@ -29,7 +25,7 @@ write-host "vkvalidatelayerdoc.ps1: Validate layer documentation" push-location ..\..\scripts # Validate that layer documentation matches source contents -python vk_validation_stats.py $output_mode +python vk_validation_stats.py # Report result based on exit code if (!$LASTEXITCODE) { diff --git a/sources/third_party/vulkan/src/tests/device_profiles/adreno_540.json b/sources/third_party/vulkan/src/tests/device_profiles/adreno_540.json new file mode 100644 index 0000000000000000000000000000000000000000..36f495c04c17c5ec51872c226e203a14935adb62 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/adreno_540.json @@ -0,0 +1,1518 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2114" + }, + "environment": { + "architecture": "arm", + "comment": "", + "name": "android", + "reportversion": "1.4", + "submitter": "", + "version": "8.0.0" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [ + { + "extension": "VK_KHR_push_descriptor", + "name": "maxPushDescriptors", + "value": "32" + } + ] + }, + "platformdetails": { + "android.BuildID": "47.1.A.5.51", + "android.BuildVersionIncremental": "3742384072", + "android.ProductManufacturer": "Sony", + "android.ProductModel": "G8142" + }, + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 3, + "maxImageExtent": { + "height": 4096, + "width": 4096 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 1, + "width": 1 + }, + "presentmodes": [ + 1, + 2, + 1000111000, + 1000111001 + ], + "supportedCompositeAlpha": 8, + "supportedTransforms": 271, + "supportedUsageFlags": 159, + "surfaceExtension": "VK_KHR_android_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 37 + }, + { + "colorSpace": 0, + "format": 43 + }, + { + "colorSpace": 0, + "format": 4 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 0, + "depthClamp": 1, + "drawIndirectFirstInstance": 0, + "dualSrcBlend": 0, + "fillModeNonSolid": 1, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 0, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 1, + "largePoints": 1, + "logicOp": 0, + "multiDrawIndirect": 1, + "multiViewport": 0, + "occlusionQueryPrecise": 0, + "pipelineStatisticsQuery": 0, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 1, + "shaderCullDistance": 1, + "shaderFloat64": 0, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 0, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 0, + "shaderStorageImageArrayDynamicIndexing": 0, + "shaderStorageImageExtendedFormats": 1, + "shaderStorageImageMultisample": 0, + "shaderStorageImageReadWithoutFormat": 0, + "shaderStorageImageWriteWithoutFormat": 1, + "shaderTessellationAndGeometryPointSize": 0, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 0, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 0, + "textureCompressionASTC_LDR": 1, + "textureCompressionBC": 0, + "textureCompressionETC2": 1, + "variableMultisampleRate": 0, + "vertexPipelineStoresAndAtomics": 0, + "wideLines": 0 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194353, + "deviceID": 84148225, + "deviceName": "Adreno (TM) 540", + "deviceType": 1, + "driverVersion": 60111537, + "limits": { + "bufferImageGranularity": 1, + "discreteQueuePriorities": 3, + "framebufferColorSampleCounts": 7, + "framebufferDepthSampleCounts": 7, + "framebufferNoAttachmentsSampleCounts": 7, + "framebufferStencilSampleCounts": 7, + "lineWidthGranularity": 0, + "lineWidthRange": [ + 1, + 1 + ], + "maxBoundDescriptorSets": 4, + "maxClipDistances": 8, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 8, + "maxComputeSharedMemorySize": 32768, + "maxComputeWorkGroupCount": [ + 65535, + 65535, + 65535 + ], + "maxComputeWorkGroupInvocations": 1024, + "maxComputeWorkGroupSize": [ + 1024, + 1024, + 64 + ], + "maxCullDistances": 8, + "maxDescriptorSetInputAttachments": 8, + "maxDescriptorSetSampledImages": 768, + "maxDescriptorSetSamplers": 96, + "maxDescriptorSetStorageBuffers": 24, + "maxDescriptorSetStorageBuffersDynamic": 4, + "maxDescriptorSetStorageImages": 24, + "maxDescriptorSetUniformBuffers": 84, + "maxDescriptorSetUniformBuffersDynamic": 8, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 4294967295, + "maxFragmentCombinedOutputResources": 72, + "maxFragmentDualSrcAttachments": 0, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 16384, + "maxFramebufferLayers": 2048, + "maxFramebufferWidth": 16384, + "maxGeometryInputComponents": 0, + "maxGeometryOutputComponents": 0, + "maxGeometryOutputVertices": 0, + "maxGeometryShaderInvocations": 0, + "maxGeometryTotalOutputComponents": 0, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 16384, + "maxImageDimension2D": 16384, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 16384, + "maxInterpolationOffset": 0.4375, + "maxMemoryAllocationCount": 4096, + "maxPerStageDescriptorInputAttachments": 8, + "maxPerStageDescriptorSampledImages": 128, + "maxPerStageDescriptorSamplers": 16, + "maxPerStageDescriptorStorageBuffers": 24, + "maxPerStageDescriptorStorageImages": 4, + "maxPerStageDescriptorUniformBuffers": 14, + "maxPerStageResources": 158, + "maxPushConstantsSize": 128, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 4000, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 15.99609375, + "maxStorageBufferRange": 2147483647, + "maxTessellationControlPerPatchOutputComponents": 0, + "maxTessellationControlPerVertexInputComponents": 0, + "maxTessellationControlPerVertexOutputComponents": 0, + "maxTessellationControlTotalOutputComponents": 0, + "maxTessellationEvaluationInputComponents": 0, + "maxTessellationEvaluationOutputComponents": 0, + "maxTessellationGenerationLevel": 0, + "maxTessellationPatchSize": 0, + "maxTexelBufferElements": 65536, + "maxTexelGatherOffset": 31, + "maxTexelOffset": 7, + "maxUniformBufferRange": 65536, + "maxVertexInputAttributeOffset": 4096, + "maxVertexInputAttributes": 32, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 32, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 16384, + 16384 + ], + "maxViewports": 1, + "minInterpolationOffset": -0.5, + "minMemoryMapAlignment": 64, + "minStorageBufferOffsetAlignment": 64, + "minTexelBufferOffsetAlignment": 64, + "minTexelGatherOffset": -32, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 64, + "mipmapPrecisionBits": 8, + "nonCoherentAtomSize": 1, + "optimalBufferCopyOffsetAlignment": 64, + "optimalBufferCopyRowPitchAlignment": 64, + "pointSizeGranularity": 0.0625, + "pointSizeRange": [ + 1, + 1023 + ], + "sampledImageColorSampleCounts": 7, + "sampledImageDepthSampleCounts": 7, + "sampledImageIntegerSampleCounts": 7, + "sampledImageStencilSampleCounts": 7, + "sparseAddressSpaceSize": 0, + "standardSampleLocations": 1, + "storageImageSampleCounts": 1, + "strictLines": 1, + "subPixelInterpolationOffsetBits": 4, + "subPixelPrecisionBits": 4, + "subTexelPrecisionBits": 8, + "timestampComputeAndGraphics": 1, + "timestampPeriod": 52.0833320618, + "viewportBoundsRange": [ + -32768, + 32767 + ], + "viewportSubPixelBits": 0 + }, + "pipelineCacheUUID": [ + 177, + 58, + 149, + 3, + 67, + 81, + 0, + 0, + 0, + 0, + 1, + 0, + 4, + 5, + 0, + 0 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 0, + "residencyStandard2DMultisampleBlockShape": 0, + "residencyStandard3DBlockShape": 0 + }, + "vendorID": 20803 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 3912097792 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 0, + "propertyFlags": 11 + }, + { + "heapIndex": 0, + "propertyFlags": 15 + }, + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 0, + "propertyFlags": 7 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_incremental_present", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shared_presentable_image", + "specVersion": 1 + }, + { + "extensionName": "VK_GOOGLE_display_timing", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + }, + { + "extensionName": "VK_KHR_maintenance1", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_variable_pointers", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_storage_buffer_storage_class", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_relaxed_block_layout", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_get_memory_requirements2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory_fd", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore_fd", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_fence", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_fence_fd", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_bind_memory2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shader_draw_parameters", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_push_descriptor", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_descriptor_update_template", + "specVersion": 1 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 3, + "queueFlags": 3, + "timestampValidBits": 48 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 2, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 3, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 4, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 5, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 6, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 7, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 8, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 9, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 10, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 13, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 14, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 15, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 17, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 20, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 21, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 22, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 24, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 27, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 28, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 449923, + "optimalTilingFeatures": 449923, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 54275, + "optimalTilingFeatures": 54275, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 41, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 44, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 45, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 48, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 49, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 50, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 51, + "linearTilingFeatures": 449923, + "optimalTilingFeatures": 449923, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 54275, + "optimalTilingFeatures": 54275, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 55, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 58, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 62, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 63, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 64, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 68, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 8 + }, + { + "formatID": 69, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 70, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 71, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 74, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 75, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 76, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 77, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 78, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 81, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 82, + "linearTilingFeatures": 52353, + "optimalTilingFeatures": 52353, + "bufferFeatures": 72 + }, + { + "formatID": 83, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 84, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 85, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 88, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 89, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 90, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 91, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 92, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 95, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 101, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 105, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 106, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 107, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 122, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 123, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 124, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 50689, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/amd_radv_polaris10.json b/sources/third_party/vulkan/src/tests/device_profiles/amd_radv_polaris10.json new file mode 100644 index 0000000000000000000000000000000000000000..38e3ce05ded12162d844d192923347ba159f25c4 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/amd_radv_polaris10.json @@ -0,0 +1,1506 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2117" + }, + "environment": { + "architecture": "x86_64", + "comment": "", + "name": "arch", + "reportversion": "1.4", + "submitter": "", + "version": "unknown" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [ + { + "extension": "VK_KHR_push_descriptor", + "name": "maxPushDescriptors", + "value": "32" + } + ] + }, + "platformdetails": [], + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 0, + "maxImageExtent": { + "height": 755, + "width": 927 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 755, + "width": 927 + }, + "presentmodes": [ + 0, + 1, + 2 + ], + "supportedCompositeAlpha": 9, + "supportedTransforms": 1, + "supportedUsageFlags": 23, + "surfaceExtension": "VK_KHR_xcb_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 50 + }, + { + "colorSpace": 0, + "format": 44 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 1, + "depthClamp": 1, + "drawIndirectFirstInstance": 1, + "dualSrcBlend": 1, + "fillModeNonSolid": 1, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 1, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 1, + "largePoints": 1, + "logicOp": 1, + "multiDrawIndirect": 1, + "multiViewport": 1, + "occlusionQueryPrecise": 1, + "pipelineStatisticsQuery": 1, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 1, + "shaderCullDistance": 1, + "shaderFloat64": 1, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 1, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 1, + "shaderStorageImageArrayDynamicIndexing": 1, + "shaderStorageImageExtendedFormats": 1, + "shaderStorageImageMultisample": 0, + "shaderStorageImageReadWithoutFormat": 1, + "shaderStorageImageWriteWithoutFormat": 1, + "shaderTessellationAndGeometryPointSize": 1, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 1, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 1, + "textureCompressionASTC_LDR": 0, + "textureCompressionBC": 1, + "textureCompressionETC2": 0, + "variableMultisampleRate": 1, + "vertexPipelineStoresAndAtomics": 1, + "wideLines": 1 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194346, + "deviceID": 26591, + "deviceName": "AMD RADV POLARIS10", + "deviceType": 2, + "driverVersion": 71311365, + "limits": { + "bufferImageGranularity": 64, + "discreteQueuePriorities": 1, + "framebufferColorSampleCounts": 15, + "framebufferDepthSampleCounts": 15, + "framebufferNoAttachmentsSampleCounts": 15, + "framebufferStencilSampleCounts": 15, + "lineWidthGranularity": 0.0078125, + "lineWidthRange": [ + 0, + 7.9921875 + ], + "maxBoundDescriptorSets": 32, + "maxClipDistances": 8, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 8, + "maxComputeSharedMemorySize": 32768, + "maxComputeWorkGroupCount": [ + 65535, + 65535, + 65535 + ], + "maxComputeWorkGroupInvocations": 2048, + "maxComputeWorkGroupSize": [ + 2048, + 2048, + 2048 + ], + "maxCullDistances": 8, + "maxDescriptorSetInputAttachments": 9586979, + "maxDescriptorSetSampledImages": 9586979, + "maxDescriptorSetSamplers": 9586979, + "maxDescriptorSetStorageBuffers": 9586979, + "maxDescriptorSetStorageBuffersDynamic": 8, + "maxDescriptorSetStorageImages": 9586979, + "maxDescriptorSetUniformBuffers": 9586979, + "maxDescriptorSetUniformBuffersDynamic": 8, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 4294967295, + "maxFragmentCombinedOutputResources": 8, + "maxFragmentDualSrcAttachments": 1, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 16384, + "maxFramebufferLayers": 1024, + "maxFramebufferWidth": 16384, + "maxGeometryInputComponents": 64, + "maxGeometryOutputComponents": 128, + "maxGeometryOutputVertices": 256, + "maxGeometryShaderInvocations": 127, + "maxGeometryTotalOutputComponents": 1024, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 16384, + "maxImageDimension2D": 16384, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 16384, + "maxInterpolationOffset": 2, + "maxMemoryAllocationCount": 4294967295, + "maxPerStageDescriptorInputAttachments": 9586979, + "maxPerStageDescriptorSampledImages": 9586979, + "maxPerStageDescriptorSamplers": 9586979, + "maxPerStageDescriptorStorageBuffers": 9586979, + "maxPerStageDescriptorStorageImages": 9586979, + "maxPerStageDescriptorUniformBuffers": 9586979, + "maxPerStageResources": 9586979, + "maxPushConstantsSize": 128, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 65536, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 16, + "maxStorageBufferRange": 4294967295, + "maxTessellationControlPerPatchOutputComponents": 120, + "maxTessellationControlPerVertexInputComponents": 128, + "maxTessellationControlPerVertexOutputComponents": 128, + "maxTessellationControlTotalOutputComponents": 4096, + "maxTessellationEvaluationInputComponents": 128, + "maxTessellationEvaluationOutputComponents": 128, + "maxTessellationGenerationLevel": 64, + "maxTessellationPatchSize": 32, + "maxTexelBufferElements": 134217728, + "maxTexelGatherOffset": 31, + "maxTexelOffset": 31, + "maxUniformBufferRange": 4294967295, + "maxVertexInputAttributeOffset": 2047, + "maxVertexInputAttributes": 32, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 32, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 16384, + 16384 + ], + "maxViewports": 16, + "minInterpolationOffset": -2, + "minMemoryMapAlignment": 4096, + "minStorageBufferOffsetAlignment": 4, + "minTexelBufferOffsetAlignment": 1, + "minTexelGatherOffset": -32, + "minTexelOffset": -32, + "minUniformBufferOffsetAlignment": 4, + "mipmapPrecisionBits": 4, + "nonCoherentAtomSize": 64, + "optimalBufferCopyOffsetAlignment": 128, + "optimalBufferCopyRowPitchAlignment": 128, + "pointSizeGranularity": 0.125, + "pointSizeRange": [ + 0.125, + 255.875 + ], + "sampledImageColorSampleCounts": 15, + "sampledImageDepthSampleCounts": 15, + "sampledImageIntegerSampleCounts": 1, + "sampledImageStencilSampleCounts": 15, + "sparseAddressSpaceSize": 4294967295, + "standardSampleLocations": 1, + "storageImageSampleCounts": 1, + "strictLines": 0, + "subPixelInterpolationOffsetBits": 8, + "subPixelPrecisionBits": 4, + "subTexelPrecisionBits": 4, + "timestampComputeAndGraphics": 1, + "timestampPeriod": 40, + "viewportBoundsRange": [ + -32768, + 32767 + ], + "viewportSubPixelBits": 13 + }, + "pipelineCacheUUID": [ + 49, + 76, + 7, + 90, + 252, + 1, + 178, + 89, + 64, + 0, + 114, + 97, + 100, + 118, + 0, + 0 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 0, + "residencyStandard2DMultisampleBlockShape": 0, + "residencyStandard3DBlockShape": 0 + }, + "vendorID": 4098 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 8305770496 + }, + { + "flags": 1, + "size": 233246720 + }, + { + "flags": 0, + "size": 8588075008 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 2, + "propertyFlags": 6 + }, + { + "heapIndex": 1, + "propertyFlags": 7 + }, + { + "heapIndex": 2, + "propertyFlags": 14 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_descriptor_update_template", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_incremental_present", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_maintenance1", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_push_descriptor", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_mirror_clamp_to_edge", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + }, + { + "extensionName": "VK_AMD_draw_indirect_count", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shader_draw_parameters", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_get_memory_requirements2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory_fd", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_storage_buffer_storage_class", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_variable_pointers", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore_fd", + "specVersion": 1 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 1, + "queueFlags": 15, + "timestampValidBits": 64 + }, + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 8, + "queueFlags": 14, + "timestampValidBits": 64 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 2, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 0 + }, + { + "formatID": 3, + "linearTilingFeatures": 54275, + "optimalTilingFeatures": 54275, + "bufferFeatures": 0 + }, + { + "formatID": 4, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 0 + }, + { + "formatID": 5, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 0 + }, + { + "formatID": 6, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 0 + }, + { + "formatID": 7, + "linearTilingFeatures": 54275, + "optimalTilingFeatures": 54275, + "bufferFeatures": 0 + }, + { + "formatID": 8, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 0 + }, + { + "formatID": 9, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 10, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 13, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 14, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 15, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 88 + }, + { + "formatID": 16, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 17, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 20, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 21, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 22, + "linearTilingFeatures": 51584, + "optimalTilingFeatures": 51584, + "bufferFeatures": 88 + }, + { + "formatID": 23, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 24, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 27, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 28, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 41, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 88 + }, + { + "formatID": 44, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 45, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 48, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 49, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 50, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 88 + }, + { + "formatID": 51, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 55, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 88 + }, + { + "formatID": 58, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 59, + "linearTilingFeatures": 51584, + "optimalTilingFeatures": 51584, + "bufferFeatures": 88 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 62, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 63, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 64, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 65, + "linearTilingFeatures": 51584, + "optimalTilingFeatures": 51584, + "bufferFeatures": 88 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 68, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 69, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 70, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 71, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 74, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 75, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 76, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 77, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 78, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 81, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 82, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 83, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 84, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 85, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 88, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 89, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 90, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 91, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 92, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 95, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 101, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 88 + }, + { + "formatID": 105, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 88 + }, + { + "formatID": 106, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 88 + }, + { + "formatID": 107, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 122, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 123, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 124, + "linearTilingFeatures": 49154, + "optimalTilingFeatures": 52739, + "bufferFeatures": 88 + }, + { + "formatID": 125, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 49154, + "optimalTilingFeatures": 52739, + "bufferFeatures": 88 + }, + { + "formatID": 127, + "linearTilingFeatures": 49154, + "optimalTilingFeatures": 52739, + "bufferFeatures": 88 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/geforce_940m.json b/sources/third_party/vulkan/src/tests/device_profiles/geforce_940m.json new file mode 100644 index 0000000000000000000000000000000000000000..779f4bdd9146a3dd5a3cb7418ae2cde4af1674eb --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/geforce_940m.json @@ -0,0 +1,1677 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2110" + }, + "environment": { + "architecture": "x86_64", + "comment": "", + "name": "windows", + "reportversion": "1.4", + "submitter": "", + "version": "10" + }, + "extended": { + "devicefeatures2": [ + { + "extension": "VK_KHX_multiview", + "name": "multiview", + "supported": true + }, + { + "extension": "VK_KHX_multiview", + "name": "multiviewGeometryShader", + "supported": true + }, + { + "extension": "VK_KHX_multiview", + "name": "multiviewTessellationShader", + "supported": true + } + ], + "deviceproperties2": [ + { + "extension": "VK_KHX_multiview", + "name": "maxMultiviewViewCount", + "value": "32" + }, + { + "extension": "VK_KHX_multiview", + "name": "maxMultiviewInstanceIndex", + "value": "134217727" + }, + { + "extension": "VK_KHR_push_descriptor", + "name": "maxPushDescriptors", + "value": "32" + }, + { + "extension": "VK_EXT_discard_rectangles", + "name": "maxDiscardRectangles", + "value": "8" + }, + { + "extension": "VK_NVX_multiview_per_view_attributes", + "name": "perViewPositionAllComponents", + "value": "8" + } + ] + }, + "platformdetails": [], + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 8, + "maxImageExtent": { + "height": 749, + "width": 927 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 749, + "width": 927 + }, + "presentmodes": [ + 2, + 3, + 1 + ], + "supportedCompositeAlpha": 1, + "supportedTransforms": 1, + "supportedUsageFlags": 159, + "surfaceExtension": "VK_KHR_win32_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 44 + }, + { + "colorSpace": 0, + "format": 50 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 1, + "depthClamp": 1, + "drawIndirectFirstInstance": 1, + "dualSrcBlend": 1, + "fillModeNonSolid": 1, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 1, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 1, + "largePoints": 1, + "logicOp": 1, + "multiDrawIndirect": 1, + "multiViewport": 1, + "occlusionQueryPrecise": 1, + "pipelineStatisticsQuery": 1, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 1, + "shaderCullDistance": 1, + "shaderFloat64": 1, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 1, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 1, + "shaderStorageImageArrayDynamicIndexing": 1, + "shaderStorageImageExtendedFormats": 1, + "shaderStorageImageMultisample": 1, + "shaderStorageImageReadWithoutFormat": 1, + "shaderStorageImageWriteWithoutFormat": 1, + "shaderTessellationAndGeometryPointSize": 1, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 1, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 1, + "textureCompressionASTC_LDR": 0, + "textureCompressionBC": 1, + "textureCompressionETC2": 0, + "variableMultisampleRate": 1, + "vertexPipelineStoresAndAtomics": 1, + "wideLines": 1 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194360, + "deviceID": 4935, + "deviceName": "GeForce 940M", + "deviceType": 2, + "driverVersion": 1627602944, + "limits": { + "bufferImageGranularity": 65536, + "discreteQueuePriorities": 2, + "framebufferColorSampleCounts": 15, + "framebufferDepthSampleCounts": 15, + "framebufferNoAttachmentsSampleCounts": 15, + "framebufferStencilSampleCounts": 15, + "lineWidthGranularity": 0.125, + "lineWidthRange": [ + 0.5, + 10 + ], + "maxBoundDescriptorSets": 8, + "maxClipDistances": 8, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 8, + "maxComputeSharedMemorySize": 49152, + "maxComputeWorkGroupCount": [ + 2147483647, + 65535, + 65535 + ], + "maxComputeWorkGroupInvocations": 1536, + "maxComputeWorkGroupSize": [ + 1536, + 1024, + 64 + ], + "maxCullDistances": 8, + "maxDescriptorSetInputAttachments": 8, + "maxDescriptorSetSampledImages": 98304, + "maxDescriptorSetSamplers": 4000, + "maxDescriptorSetStorageBuffers": 4096, + "maxDescriptorSetStorageBuffersDynamic": 16, + "maxDescriptorSetStorageImages": 98304, + "maxDescriptorSetUniformBuffers": 72, + "maxDescriptorSetUniformBuffersDynamic": 72, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 4294967295, + "maxFragmentCombinedOutputResources": 16, + "maxFragmentDualSrcAttachments": 1, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 16384, + "maxFramebufferLayers": 2048, + "maxFramebufferWidth": 16384, + "maxGeometryInputComponents": 128, + "maxGeometryOutputComponents": 128, + "maxGeometryOutputVertices": 1024, + "maxGeometryShaderInvocations": 32, + "maxGeometryTotalOutputComponents": 1024, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 16384, + "maxImageDimension2D": 16384, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 16384, + "maxInterpolationOffset": 0.4375, + "maxMemoryAllocationCount": 4096, + "maxPerStageDescriptorInputAttachments": 8, + "maxPerStageDescriptorSampledImages": 16384, + "maxPerStageDescriptorSamplers": 4000, + "maxPerStageDescriptorStorageBuffers": 4096, + "maxPerStageDescriptorStorageImages": 16384, + "maxPerStageDescriptorUniformBuffers": 12, + "maxPerStageResources": 53268, + "maxPushConstantsSize": 256, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 4000, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 15, + "maxStorageBufferRange": 2147483647, + "maxTessellationControlPerPatchOutputComponents": 120, + "maxTessellationControlPerVertexInputComponents": 128, + "maxTessellationControlPerVertexOutputComponents": 128, + "maxTessellationControlTotalOutputComponents": 4216, + "maxTessellationEvaluationInputComponents": 128, + "maxTessellationEvaluationOutputComponents": 128, + "maxTessellationGenerationLevel": 64, + "maxTessellationPatchSize": 32, + "maxTexelBufferElements": 134217728, + "maxTexelGatherOffset": 31, + "maxTexelOffset": 7, + "maxUniformBufferRange": 65536, + "maxVertexInputAttributeOffset": 2047, + "maxVertexInputAttributes": 32, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 32, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 16384, + 16384 + ], + "maxViewports": 16, + "minInterpolationOffset": -0.5, + "minMemoryMapAlignment": 64, + "minStorageBufferOffsetAlignment": 32, + "minTexelBufferOffsetAlignment": 16, + "minTexelGatherOffset": -32, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 256, + "mipmapPrecisionBits": 8, + "nonCoherentAtomSize": 64, + "optimalBufferCopyOffsetAlignment": 1, + "optimalBufferCopyRowPitchAlignment": 1, + "pointSizeGranularity": 0.125, + "pointSizeRange": [ + 1, + 189.875 + ], + "sampledImageColorSampleCounts": 15, + "sampledImageDepthSampleCounts": 15, + "sampledImageIntegerSampleCounts": 15, + "sampledImageStencilSampleCounts": 15, + "sparseAddressSpaceSize": -1, + "standardSampleLocations": 1, + "storageImageSampleCounts": 15, + "strictLines": 1, + "subPixelInterpolationOffsetBits": 4, + "subPixelPrecisionBits": 8, + "subTexelPrecisionBits": 8, + "timestampComputeAndGraphics": 1, + "timestampPeriod": 1, + "viewportBoundsRange": [ + -32768, + 32768 + ], + "viewportSubPixelBits": 8 + }, + "pipelineCacheUUID": [ + 5, + 245, + 46, + 196, + 153, + 80, + 67, + 114, + 195, + 180, + 214, + 97, + 191, + 27, + 94, + 115 + ], + "sparseProperties": { + "residencyAlignedMipSize": 1, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 1, + "residencyStandard2DMultisampleBlockShape": 1, + "residencyStandard3DBlockShape": 1 + }, + "vendorID": 4318 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 2119041024 + }, + { + "flags": 0, + "size": 8500805632 + } + ], + "memoryTypes": [ + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 1, + "propertyFlags": 0 + }, + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 1, + "propertyFlags": 6 + }, + { + "heapIndex": 1, + "propertyFlags": 14 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + }, + { + "extensionName": "VK_KHR_16bit_storage", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_bind_memory2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_descriptor_update_template", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_get_memory_requirements2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_image_format_list", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_maintenance1", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_maintenance2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_push_descriptor", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_relaxed_block_layout", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_mirror_clamp_to_edge", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_ycbcr_conversion", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shader_draw_parameters", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_storage_buffer_storage_class", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_semaphore_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_win32_keyed_mutex", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_fence", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_fence_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_variable_pointers", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_device_group", + "specVersion": 2 + }, + { + "extensionName": "VK_KHX_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_external_memory_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_external_semaphore", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_external_semaphore_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_multiview", + "specVersion": 1 + }, + { + "extensionName": "VK_KHX_win32_keyed_mutex", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_blend_operation_advanced", + "specVersion": 2 + }, + { + "extensionName": "VK_EXT_depth_range_unrestricted", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_discard_rectangles", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_shader_subgroup_ballot", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_shader_subgroup_vote", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_external_memory_win32", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_glsl_shader", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_win32_keyed_mutex", + "specVersion": 1 + }, + { + "extensionName": "VK_NVX_device_generated_commands", + "specVersion": 1 + }, + { + "extensionName": "VK_NVX_multiview_per_view_attributes", + "specVersion": 1 + } + ], + "ArrayOfVkLayerProperties": [ + { + "description": "NVIDIA Optimus layer", + "implementationVersion": 1, + "layerName": "VK_LAYER_NV_optimus", + "specVersion": 4194360 + } + ], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 16, + "queueFlags": 15, + "timestampValidBits": 64 + }, + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 1, + "queueFlags": 4, + "timestampValidBits": 64 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 2, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 3, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 4, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 5, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 6, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 7, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 8, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 9, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 10, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 13, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 14, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 15, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 17, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 20, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 21, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 22, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 24, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 27, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 28, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 41, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 44, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 45, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 48, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 49, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 50, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 51, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 55, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 58, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 62, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 63, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 64, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 68, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 69, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 70, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 71, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 74, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 75, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 76, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 77, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 78, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 81, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 82, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 83, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 84, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 85, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 88, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 89, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 90, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 91, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 92, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 95, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56711, + "bufferFeatures": 120 + }, + { + "formatID": 101, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 105, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 106, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 107, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 122, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 123, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 124, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/intel_hd_graphics_520_skylake_gt2.json b/sources/third_party/vulkan/src/tests/device_profiles/intel_hd_graphics_520_skylake_gt2.json new file mode 100644 index 0000000000000000000000000000000000000000..15dbd172706b5703e0b7f6bf0c558250025329cd --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/intel_hd_graphics_520_skylake_gt2.json @@ -0,0 +1,1472 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2098" + }, + "environment": { + "architecture": "x86_64", + "comment": "", + "name": "arch", + "reportversion": "1.4", + "submitter": "Caio Silva", + "version": "unknown" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [ + { + "extension": "VK_KHR_push_descriptor", + "name": "maxPushDescriptors", + "value": "32" + } + ] + }, + "platformdetails": [], + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 0, + "maxImageExtent": { + "height": 755, + "width": 927 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 755, + "width": 927 + }, + "presentmodes": [ + 0, + 1, + 2 + ], + "supportedCompositeAlpha": 9, + "supportedTransforms": 1, + "supportedUsageFlags": 23, + "surfaceExtension": "VK_KHR_xcb_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 50 + }, + { + "colorSpace": 0, + "format": 44 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 0, + "depthClamp": 1, + "drawIndirectFirstInstance": 1, + "dualSrcBlend": 1, + "fillModeNonSolid": 1, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 1, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 1, + "largePoints": 1, + "logicOp": 1, + "multiDrawIndirect": 1, + "multiViewport": 1, + "occlusionQueryPrecise": 1, + "pipelineStatisticsQuery": 1, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 1, + "shaderCullDistance": 1, + "shaderFloat64": 1, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 1, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 1, + "shaderStorageImageArrayDynamicIndexing": 1, + "shaderStorageImageExtendedFormats": 1, + "shaderStorageImageMultisample": 0, + "shaderStorageImageReadWithoutFormat": 0, + "shaderStorageImageWriteWithoutFormat": 1, + "shaderTessellationAndGeometryPointSize": 1, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 0, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 1, + "textureCompressionASTC_LDR": 1, + "textureCompressionBC": 1, + "textureCompressionETC2": 1, + "variableMultisampleRate": 0, + "vertexPipelineStoresAndAtomics": 1, + "wideLines": 1 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194358, + "deviceID": 6422, + "deviceName": "Intel(R) HD Graphics 520 (Skylake GT2)", + "deviceType": 1, + "driverVersion": 71311364, + "limits": { + "bufferImageGranularity": 64, + "discreteQueuePriorities": 1, + "framebufferColorSampleCounts": 31, + "framebufferDepthSampleCounts": 31, + "framebufferNoAttachmentsSampleCounts": 31, + "framebufferStencilSampleCounts": 31, + "lineWidthGranularity": 0.0078125, + "lineWidthRange": [ + 0, + 7.9921875 + ], + "maxBoundDescriptorSets": 8, + "maxClipDistances": 8, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 8, + "maxComputeSharedMemorySize": 32768, + "maxComputeWorkGroupCount": [ + 65535, + 65535, + 65535 + ], + "maxComputeWorkGroupInvocations": 896, + "maxComputeWorkGroupSize": [ + 896, + 896, + 896 + ], + "maxCullDistances": 8, + "maxDescriptorSetInputAttachments": 256, + "maxDescriptorSetSampledImages": 256, + "maxDescriptorSetSamplers": 256, + "maxDescriptorSetStorageBuffers": 256, + "maxDescriptorSetStorageBuffersDynamic": 8, + "maxDescriptorSetStorageImages": 256, + "maxDescriptorSetUniformBuffers": 256, + "maxDescriptorSetUniformBuffersDynamic": 8, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 4294967295, + "maxFragmentCombinedOutputResources": 8, + "maxFragmentDualSrcAttachments": 1, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 16384, + "maxFramebufferLayers": 2048, + "maxFramebufferWidth": 16384, + "maxGeometryInputComponents": 64, + "maxGeometryOutputComponents": 128, + "maxGeometryOutputVertices": 256, + "maxGeometryShaderInvocations": 32, + "maxGeometryTotalOutputComponents": 1024, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 16384, + "maxImageDimension2D": 16384, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 16384, + "maxInterpolationOffset": 0.4375, + "maxMemoryAllocationCount": 4294967295, + "maxPerStageDescriptorInputAttachments": 64, + "maxPerStageDescriptorSampledImages": 128, + "maxPerStageDescriptorSamplers": 128, + "maxPerStageDescriptorStorageBuffers": 64, + "maxPerStageDescriptorStorageImages": 64, + "maxPerStageDescriptorUniformBuffers": 64, + "maxPerStageResources": 250, + "maxPushConstantsSize": 128, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 65536, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 16, + "maxStorageBufferRange": 1073741824, + "maxTessellationControlPerPatchOutputComponents": 128, + "maxTessellationControlPerVertexInputComponents": 128, + "maxTessellationControlPerVertexOutputComponents": 128, + "maxTessellationControlTotalOutputComponents": 2048, + "maxTessellationEvaluationInputComponents": 128, + "maxTessellationEvaluationOutputComponents": 128, + "maxTessellationGenerationLevel": 64, + "maxTessellationPatchSize": 32, + "maxTexelBufferElements": 134217728, + "maxTexelGatherOffset": 31, + "maxTexelOffset": 7, + "maxUniformBufferRange": 134217728, + "maxVertexInputAttributeOffset": 2047, + "maxVertexInputAttributes": 28, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 28, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 16384, + 16384 + ], + "maxViewports": 16, + "minInterpolationOffset": -0.5, + "minMemoryMapAlignment": 4096, + "minStorageBufferOffsetAlignment": 4, + "minTexelBufferOffsetAlignment": 1, + "minTexelGatherOffset": -32, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 16, + "mipmapPrecisionBits": 4, + "nonCoherentAtomSize": 64, + "optimalBufferCopyOffsetAlignment": 128, + "optimalBufferCopyRowPitchAlignment": 128, + "pointSizeGranularity": 0.125, + "pointSizeRange": [ + 0.125, + 255.875 + ], + "sampledImageColorSampleCounts": 31, + "sampledImageDepthSampleCounts": 31, + "sampledImageIntegerSampleCounts": 1, + "sampledImageStencilSampleCounts": 31, + "sparseAddressSpaceSize": 0, + "standardSampleLocations": 1, + "storageImageSampleCounts": 1, + "strictLines": 0, + "subPixelInterpolationOffsetBits": 4, + "subPixelPrecisionBits": 4, + "subTexelPrecisionBits": 4, + "timestampComputeAndGraphics": 0, + "timestampPeriod": 83.3333358765, + "viewportBoundsRange": [ + -32768, + 32767 + ], + "viewportSubPixelBits": 13 + }, + "pipelineCacheUUID": [ + 55, + 106, + 221, + 116, + 216, + 244, + 14, + 126, + 210, + 30, + 145, + 74, + 98, + 39, + 52, + 89 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 0, + "residencyStandard2DMultisampleBlockShape": 0, + "residencyStandard3DBlockShape": 0 + }, + "vendorID": 32902 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 11289211904 + }, + { + "flags": 1, + "size": 1073741824 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 15 + }, + { + "heapIndex": 1, + "propertyFlags": 15 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_descriptor_update_template", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_external_memory_fd", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_get_memory_requirements2", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_incremental_present", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_maintenance1", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_push_descriptor", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_mirror_clamp_to_edge", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shader_draw_parameters", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_storage_buffer_storage_class", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + }, + { + "extensionName": "VK_KHR_variable_pointers", + "specVersion": 1 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 1, + "queueFlags": 7, + "timestampValidBits": 36 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 2, + "linearTilingFeatures": 56449, + "optimalTilingFeatures": 56449, + "bufferFeatures": 8 + }, + { + "formatID": 3, + "linearTilingFeatures": 56449, + "optimalTilingFeatures": 56449, + "bufferFeatures": 8 + }, + { + "formatID": 4, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 5, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 6, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 7, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 8, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 9, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 10, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 13, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 14, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 15, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 17, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 20, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 21, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 22, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 24, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 27, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 28, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 29, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 41, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 44, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 45, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 48, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 49, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 50, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 51, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 55, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 58, + "linearTilingFeatures": 56705, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 62, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 63, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 64, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 68, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 69, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 70, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 71, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 74, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 75, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 76, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 77, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 78, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 81, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 82, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 83, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 84, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 85, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 88, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 89, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 90, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 91, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 92, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 95, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 52359, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 101, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 105, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 106, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 107, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 52355, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 122, + "linearTilingFeatures": 56707, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 123, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 124, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 52737, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/mali-t760.json b/sources/third_party/vulkan/src/tests/device_profiles/mali-t760.json new file mode 100644 index 0000000000000000000000000000000000000000..9c5cdac68794225d591925345eece0f8c0f70d7c --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/mali-t760.json @@ -0,0 +1,1426 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2001" + }, + "environment": { + "architecture": "arm", + "comment": "", + "name": "android", + "reportversion": "1.4", + "submitter": "Iwandi", + "version": "7.1.2" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [] + }, + "platformdetails": { + "android.BuildID": "NHG47K", + "android.BuildVersionIncremental": "eng.root.20170901.232851", + "android.ProductManufacturer": "rockchip", + "android.ProductModel": "rk3288" + }, + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 3, + "maxImageExtent": { + "height": 4096, + "width": 4096 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 1, + "width": 1 + }, + "presentmodes": [ + 1, + 2 + ], + "supportedCompositeAlpha": 8, + "supportedTransforms": 271, + "supportedUsageFlags": 159, + "surfaceExtension": "VK_KHR_android_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 37 + }, + { + "colorSpace": 0, + "format": 43 + }, + { + "colorSpace": 0, + "format": 4 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 0, + "depthBiasClamp": 1, + "depthBounds": 0, + "depthClamp": 0, + "drawIndirectFirstInstance": 1, + "dualSrcBlend": 0, + "fillModeNonSolid": 0, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 0, + "imageCubeArray": 0, + "independentBlend": 1, + "inheritedQueries": 0, + "largePoints": 1, + "logicOp": 0, + "multiDrawIndirect": 0, + "multiViewport": 0, + "occlusionQueryPrecise": 0, + "pipelineStatisticsQuery": 0, + "robustBufferAccess": 1, + "sampleRateShading": 0, + "samplerAnisotropy": 0, + "shaderClipDistance": 0, + "shaderCullDistance": 0, + "shaderFloat64": 0, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 0, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 1, + "shaderStorageImageArrayDynamicIndexing": 1, + "shaderStorageImageExtendedFormats": 0, + "shaderStorageImageMultisample": 0, + "shaderStorageImageReadWithoutFormat": 0, + "shaderStorageImageWriteWithoutFormat": 0, + "shaderTessellationAndGeometryPointSize": 0, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 0, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 0, + "textureCompressionASTC_LDR": 1, + "textureCompressionBC": 0, + "textureCompressionETC2": 1, + "variableMultisampleRate": 0, + "vertexPipelineStoresAndAtomics": 0, + "wideLines": 0 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194322, + "deviceID": 122683393, + "deviceName": "Mali-T760", + "deviceType": 1, + "driverVersion": 2734070174, + "limits": { + "bufferImageGranularity": 4096, + "discreteQueuePriorities": 2, + "framebufferColorSampleCounts": 5, + "framebufferDepthSampleCounts": 5, + "framebufferNoAttachmentsSampleCounts": 5, + "framebufferStencilSampleCounts": 5, + "lineWidthGranularity": 0, + "lineWidthRange": [ + 1, + 1 + ], + "maxBoundDescriptorSets": 4, + "maxClipDistances": 0, + "maxColorAttachments": 4, + "maxCombinedClipAndCullDistances": 0, + "maxComputeSharedMemorySize": 32768, + "maxComputeWorkGroupCount": [ + 65536, + 65536, + 65536 + ], + "maxComputeWorkGroupInvocations": 256, + "maxComputeWorkGroupSize": [ + 256, + 256, + 256 + ], + "maxCullDistances": 0, + "maxDescriptorSetInputAttachments": 4, + "maxDescriptorSetSampledImages": 96, + "maxDescriptorSetSamplers": 768, + "maxDescriptorSetStorageBuffers": 24, + "maxDescriptorSetStorageBuffersDynamic": 4, + "maxDescriptorSetStorageImages": 24, + "maxDescriptorSetUniformBuffers": 72, + "maxDescriptorSetUniformBuffersDynamic": 8, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 1, + "maxFragmentCombinedOutputResources": 12, + "maxFragmentDualSrcAttachments": 0, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 4, + "maxFramebufferHeight": 8192, + "maxFramebufferLayers": 256, + "maxFramebufferWidth": 8192, + "maxGeometryInputComponents": 0, + "maxGeometryOutputComponents": 0, + "maxGeometryOutputVertices": 0, + "maxGeometryShaderInvocations": 0, + "maxGeometryTotalOutputComponents": 0, + "maxImageArrayLayers": 256, + "maxImageDimension1D": 8192, + "maxImageDimension2D": 8192, + "maxImageDimension3D": 4096, + "maxImageDimensionCube": 8192, + "maxInterpolationOffset": 0, + "maxMemoryAllocationCount": 4294967295, + "maxPerStageDescriptorInputAttachments": 4, + "maxPerStageDescriptorSampledImages": 16, + "maxPerStageDescriptorSamplers": 128, + "maxPerStageDescriptorStorageBuffers": 4, + "maxPerStageDescriptorStorageImages": 4, + "maxPerStageDescriptorUniformBuffers": 12, + "maxPerStageResources": 44, + "maxPushConstantsSize": 128, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 16384, + "maxSamplerAnisotropy": 1, + "maxSamplerLodBias": 2, + "maxStorageBufferRange": 134217728, + "maxTessellationControlPerPatchOutputComponents": 0, + "maxTessellationControlPerVertexInputComponents": 0, + "maxTessellationControlPerVertexOutputComponents": 0, + "maxTessellationControlTotalOutputComponents": 0, + "maxTessellationEvaluationInputComponents": 0, + "maxTessellationEvaluationOutputComponents": 0, + "maxTessellationGenerationLevel": 0, + "maxTessellationPatchSize": 0, + "maxTexelBufferElements": 65536, + "maxTexelGatherOffset": 7, + "maxTexelOffset": 7, + "maxUniformBufferRange": 16384, + "maxVertexInputAttributeOffset": 2047, + "maxVertexInputAttributes": 16, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 16, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 8192, + 8192 + ], + "maxViewports": 1, + "minInterpolationOffset": 0, + "minMemoryMapAlignment": 64, + "minStorageBufferOffsetAlignment": 256, + "minTexelBufferOffsetAlignment": 256, + "minTexelGatherOffset": -8, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 16, + "mipmapPrecisionBits": 4, + "nonCoherentAtomSize": 64, + "optimalBufferCopyOffsetAlignment": 64, + "optimalBufferCopyRowPitchAlignment": 64, + "pointSizeGranularity": 0.0625, + "pointSizeRange": [ + 1, + 64 + ], + "sampledImageColorSampleCounts": 5, + "sampledImageDepthSampleCounts": 5, + "sampledImageIntegerSampleCounts": 1, + "sampledImageStencilSampleCounts": 5, + "sparseAddressSpaceSize": 0, + "standardSampleLocations": 1, + "storageImageSampleCounts": 1, + "strictLines": 1, + "subPixelInterpolationOffsetBits": 0, + "subPixelPrecisionBits": 4, + "subTexelPrecisionBits": 4, + "timestampComputeAndGraphics": 0, + "timestampPeriod": 0, + "viewportBoundsRange": [ + -16384, + 16383 + ], + "viewportSubPixelBits": 0 + }, + "pipelineCacheUUID": [ + 88, + 5, + 49, + 68, + 63, + 234, + 15, + 79, + 105, + 109, + 177, + 149, + 123, + 226, + 236, + 179 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 0, + "residencyStandard2DMultisampleBlockShape": 0, + "residencyStandard3DBlockShape": 0 + }, + "vendorID": 5045 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 2108874752 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 7 + }, + { + "heapIndex": 0, + "propertyFlags": 11 + }, + { + "heapIndex": 0, + "propertyFlags": 17 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 2, + "queueFlags": 7, + "timestampValidBits": 0 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 2, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 3, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 4, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 5, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 6, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 7, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 8, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 9, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 10, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 13, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 14, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 15, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 17, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 20, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 21, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 22, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 24, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 27, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 28, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 31, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 34, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 35, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 7555, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 7555, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 41, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 44, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 45, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 48, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 49, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 50, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 51, + "linearTilingFeatures": 7555, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 7555, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 55, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 0 + }, + { + "formatID": 58, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 64 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 62, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 64 + }, + { + "formatID": 63, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 64 + }, + { + "formatID": 64, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 68, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 69, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 70, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 71, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 74, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 75, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 76, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 77, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 78, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 81, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 82, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 83, + "linearTilingFeatures": 7553, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 84, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 85, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 88, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 89, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 90, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 91, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 92, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 95, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 7555, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 3207, + "optimalTilingFeatures": 3207, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 3207, + "optimalTilingFeatures": 3207, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 7299, + "optimalTilingFeatures": 7299, + "bufferFeatures": 88 + }, + { + "formatID": 101, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 7299, + "optimalTilingFeatures": 7299, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 64 + }, + { + "formatID": 105, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 64 + }, + { + "formatID": 106, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 64 + }, + { + "formatID": 107, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 3203, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 7299, + "optimalTilingFeatures": 7299, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 122, + "linearTilingFeatures": 7297, + "optimalTilingFeatures": 7297, + "bufferFeatures": 8 + }, + { + "formatID": 123, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 124, + "linearTilingFeatures": 5633, + "optimalTilingFeatures": 5633, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 5633, + "optimalTilingFeatures": 5633, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 5633, + "optimalTilingFeatures": 5633, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 5121, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/nvidia_tegra_x1.json b/sources/third_party/vulkan/src/tests/device_profiles/nvidia_tegra_x1.json new file mode 100644 index 0000000000000000000000000000000000000000..b0329702c604db4b8d06960f2ccbe4ad1b756d39 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/nvidia_tegra_x1.json @@ -0,0 +1,1462 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=2115" + }, + "environment": { + "architecture": "arm", + "comment": "", + "name": "android", + "reportversion": "1.4", + "submitter": "docofkult", + "version": "8.1.0" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [] + }, + "platformdetails": { + "android.BuildID": "OPP5.170921.005", + "android.BuildVersionIncremental": "4373449", + "android.ProductManufacturer": "Google", + "android.ProductModel": "Pixel C" + }, + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 3, + "maxImageExtent": { + "height": 4096, + "width": 4096 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 1, + "width": 1 + }, + "presentmodes": [ + 1, + 2 + ], + "supportedCompositeAlpha": 8, + "supportedTransforms": 271, + "supportedUsageFlags": 159, + "surfaceExtension": "VK_KHR_android_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 37 + }, + { + "colorSpace": 0, + "format": 43 + }, + { + "colorSpace": 0, + "format": 4 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 1, + "depthClamp": 1, + "drawIndirectFirstInstance": 1, + "dualSrcBlend": 1, + "fillModeNonSolid": 1, + "fragmentStoresAndAtomics": 1, + "fullDrawIndexUint32": 1, + "geometryShader": 1, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 1, + "largePoints": 1, + "logicOp": 1, + "multiDrawIndirect": 1, + "multiViewport": 1, + "occlusionQueryPrecise": 1, + "pipelineStatisticsQuery": 1, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 1, + "shaderCullDistance": 1, + "shaderFloat64": 1, + "shaderImageGatherExtended": 1, + "shaderInt16": 0, + "shaderInt64": 1, + "shaderResourceMinLod": 1, + "shaderResourceResidency": 1, + "shaderSampledImageArrayDynamicIndexing": 1, + "shaderStorageBufferArrayDynamicIndexing": 1, + "shaderStorageImageArrayDynamicIndexing": 1, + "shaderStorageImageExtendedFormats": 1, + "shaderStorageImageMultisample": 1, + "shaderStorageImageReadWithoutFormat": 1, + "shaderStorageImageWriteWithoutFormat": 1, + "shaderTessellationAndGeometryPointSize": 1, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 1, + "sparseResidency16Samples": 1, + "sparseResidency2Samples": 1, + "sparseResidency4Samples": 1, + "sparseResidency8Samples": 1, + "sparseResidencyAliased": 1, + "sparseResidencyBuffer": 1, + "sparseResidencyImage2D": 1, + "sparseResidencyImage3D": 1, + "tessellationShader": 1, + "textureCompressionASTC_LDR": 1, + "textureCompressionBC": 1, + "textureCompressionETC2": 1, + "variableMultisampleRate": 1, + "vertexPipelineStoresAndAtomics": 1, + "wideLines": 1 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194341, + "deviceID": 2461664215, + "deviceName": "NVIDIA Tegra X1", + "deviceType": 1, + "driverVersion": 1514143744, + "limits": { + "bufferImageGranularity": 1024, + "discreteQueuePriorities": 2, + "framebufferColorSampleCounts": 15, + "framebufferDepthSampleCounts": 15, + "framebufferNoAttachmentsSampleCounts": 15, + "framebufferStencilSampleCounts": 31, + "lineWidthGranularity": 0.125, + "lineWidthRange": [ + 0.5, + 10 + ], + "maxBoundDescriptorSets": 8, + "maxClipDistances": 8, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 8, + "maxComputeSharedMemorySize": 49152, + "maxComputeWorkGroupCount": [ + 2147483647, + 65535, + 65535 + ], + "maxComputeWorkGroupInvocations": 1536, + "maxComputeWorkGroupSize": [ + 1536, + 1024, + 64 + ], + "maxCullDistances": 8, + "maxDescriptorSetInputAttachments": 8, + "maxDescriptorSetSampledImages": 49152, + "maxDescriptorSetSamplers": 4000, + "maxDescriptorSetStorageBuffers": 96, + "maxDescriptorSetStorageBuffersDynamic": 96, + "maxDescriptorSetStorageImages": 49152, + "maxDescriptorSetUniformBuffers": 72, + "maxDescriptorSetUniformBuffersDynamic": 72, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 4294967295, + "maxFragmentCombinedOutputResources": 16, + "maxFragmentDualSrcAttachments": 1, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 16384, + "maxFramebufferLayers": 2048, + "maxFramebufferWidth": 16384, + "maxGeometryInputComponents": 128, + "maxGeometryOutputComponents": 128, + "maxGeometryOutputVertices": 1024, + "maxGeometryShaderInvocations": 32, + "maxGeometryTotalOutputComponents": 1024, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 16384, + "maxImageDimension2D": 16384, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 16384, + "maxInterpolationOffset": 0.4375, + "maxMemoryAllocationCount": 4294967295, + "maxPerStageDescriptorInputAttachments": 8, + "maxPerStageDescriptorSampledImages": 8192, + "maxPerStageDescriptorSamplers": 4000, + "maxPerStageDescriptorStorageBuffers": 16, + "maxPerStageDescriptorStorageImages": 8192, + "maxPerStageDescriptorUniformBuffers": 12, + "maxPerStageResources": 24612, + "maxPushConstantsSize": 256, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 4000, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 15, + "maxStorageBufferRange": 2147483647, + "maxTessellationControlPerPatchOutputComponents": 120, + "maxTessellationControlPerVertexInputComponents": 128, + "maxTessellationControlPerVertexOutputComponents": 128, + "maxTessellationControlTotalOutputComponents": 4216, + "maxTessellationEvaluationInputComponents": 128, + "maxTessellationEvaluationOutputComponents": 128, + "maxTessellationGenerationLevel": 64, + "maxTessellationPatchSize": 32, + "maxTexelBufferElements": 134217728, + "maxTexelGatherOffset": 31, + "maxTexelOffset": 7, + "maxUniformBufferRange": 65536, + "maxVertexInputAttributeOffset": 2047, + "maxVertexInputAttributes": 32, + "maxVertexInputBindingStride": 2048, + "maxVertexInputBindings": 32, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 16384, + 16384 + ], + "maxViewports": 16, + "minInterpolationOffset": -0.5, + "minMemoryMapAlignment": 64, + "minStorageBufferOffsetAlignment": 32, + "minTexelBufferOffsetAlignment": 16, + "minTexelGatherOffset": -32, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 256, + "mipmapPrecisionBits": 8, + "nonCoherentAtomSize": 64, + "optimalBufferCopyOffsetAlignment": 1, + "optimalBufferCopyRowPitchAlignment": 1, + "pointSizeGranularity": 0.125, + "pointSizeRange": [ + 1, + 189.875 + ], + "sampledImageColorSampleCounts": 15, + "sampledImageDepthSampleCounts": 15, + "sampledImageIntegerSampleCounts": 15, + "sampledImageStencilSampleCounts": 31, + "sparseAddressSpaceSize": -1, + "standardSampleLocations": 1, + "storageImageSampleCounts": 15, + "strictLines": 1, + "subPixelInterpolationOffsetBits": 4, + "subPixelPrecisionBits": 8, + "subTexelPrecisionBits": 8, + "timestampComputeAndGraphics": 1, + "timestampPeriod": 1, + "viewportBoundsRange": [ + -32768, + 32768 + ], + "viewportSubPixelBits": 8 + }, + "pipelineCacheUUID": [ + 3, + 97, + 64, + 32, + 90, + 58, + 133, + 178, + 194, + 22, + 194, + 34, + 248, + 46, + 137, + 8 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 1, + "residencyStandard2DBlockShape": 1, + "residencyStandard2DMultisampleBlockShape": 1, + "residencyStandard3DBlockShape": 1 + }, + "vendorID": 4318 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 1610612736 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 0, + "propertyFlags": 1 + }, + { + "heapIndex": 0, + "propertyFlags": 7 + }, + { + "heapIndex": 0, + "propertyFlags": 11 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_KHR_incremental_present", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + }, + { + "extensionName": "VK_KHR_maintenance1", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_shader_draw_parameters", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_mirror_clamp_to_edge", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_shader_subgroup_ballot", + "specVersion": 1 + }, + { + "extensionName": "VK_EXT_shader_subgroup_vote", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_dedicated_allocation", + "specVersion": 1 + }, + { + "extensionName": "VK_NV_glsl_shader", + "specVersion": 1 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 16, + "queueFlags": 15, + "timestampValidBits": 64 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 2, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 3, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 4, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 5, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 6, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 7, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 8, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 8 + }, + { + "formatID": 9, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 10, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 13, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 14, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 15, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 17, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 20, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 21, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 22, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 24, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 27, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 28, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 41, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 44, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 45, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 72 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 48, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 49, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 50, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 51, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 55, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 0 + }, + { + "formatID": 58, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56705, + "bufferFeatures": 72 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 62, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50177, + "bufferFeatures": 72 + }, + { + "formatID": 63, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 64, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 68, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 69, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 70, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 71, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 74, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 75, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 76, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 77, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 78, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 81, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 82, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 83, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 84, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 85, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 88, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 89, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 90, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 91, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 92, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 95, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52359, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56711, + "bufferFeatures": 120 + }, + { + "formatID": 101, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 105, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 106, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 0, + "bufferFeatures": 72 + }, + { + "formatID": 107, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 52355, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 122, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 56707, + "bufferFeatures": 88 + }, + { + "formatID": 123, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 8 + }, + { + "formatID": 124, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 50177, + "optimalTilingFeatures": 50689, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54785, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 54273, + "optimalTilingFeatures": 54273, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/device_profiles/powervr_rogue_ge8300.json b/sources/third_party/vulkan/src/tests/device_profiles/powervr_rogue_ge8300.json new file mode 100644 index 0000000000000000000000000000000000000000..cb88c9226901d327c2898e031b80df381939d6d4 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/device_profiles/powervr_rogue_ge8300.json @@ -0,0 +1,1440 @@ +{ + "$schema": "https://schema.khronos.org/vulkan/devsim_1_0_0.json#", + "comments": { + "info": "Vulkan Hardware Report generated via https://vulkan.gpuinfo.org", + "desc": "https://vulkan.gpuinfo.org/displayreport.php?id=1999" + }, + "environment": { + "architecture": "arm", + "comment": "", + "name": "android", + "reportversion": "1.4", + "submitter": "", + "version": "7.0" + }, + "extended": { + "devicefeatures2": [], + "deviceproperties2": [] + }, + "platformdetails": { + "android.BuildID": "NRD90M", + "android.BuildVersionIncremental": "1496325358", + "android.ProductManufacturer": "Acer", + "android.ProductModel": "B3-A40" + }, + "surfacecapabilites": { + "maxImageArrayLayers": 1, + "maxImageCount": 3, + "maxImageExtent": { + "height": 4096, + "width": 4096 + }, + "minImageCount": 2, + "minImageExtent": { + "height": 1, + "width": 1 + }, + "presentmodes": [ + 1, + 2 + ], + "supportedCompositeAlpha": 8, + "supportedTransforms": 271, + "supportedUsageFlags": 159, + "surfaceExtension": "VK_KHR_android_surface", + "surfaceformats": [ + { + "colorSpace": 0, + "format": 37 + }, + { + "colorSpace": 0, + "format": 43 + }, + { + "colorSpace": 0, + "format": 4 + } + ], + "validSurface": true + }, + "VkPhysicalDeviceFeatures": { + "alphaToOne": 1, + "depthBiasClamp": 1, + "depthBounds": 0, + "depthClamp": 0, + "drawIndirectFirstInstance": 0, + "dualSrcBlend": 0, + "fillModeNonSolid": 0, + "fragmentStoresAndAtomics": 0, + "fullDrawIndexUint32": 1, + "geometryShader": 0, + "imageCubeArray": 1, + "independentBlend": 1, + "inheritedQueries": 0, + "largePoints": 1, + "logicOp": 1, + "multiDrawIndirect": 1, + "multiViewport": 0, + "occlusionQueryPrecise": 1, + "pipelineStatisticsQuery": 0, + "robustBufferAccess": 1, + "sampleRateShading": 1, + "samplerAnisotropy": 1, + "shaderClipDistance": 0, + "shaderCullDistance": 0, + "shaderFloat64": 0, + "shaderImageGatherExtended": 0, + "shaderInt16": 0, + "shaderInt64": 0, + "shaderResourceMinLod": 0, + "shaderResourceResidency": 0, + "shaderSampledImageArrayDynamicIndexing": 0, + "shaderStorageBufferArrayDynamicIndexing": 0, + "shaderStorageImageArrayDynamicIndexing": 0, + "shaderStorageImageExtendedFormats": 0, + "shaderStorageImageMultisample": 0, + "shaderStorageImageReadWithoutFormat": 0, + "shaderStorageImageWriteWithoutFormat": 0, + "shaderTessellationAndGeometryPointSize": 0, + "shaderUniformBufferArrayDynamicIndexing": 1, + "sparseBinding": 0, + "sparseResidency16Samples": 0, + "sparseResidency2Samples": 0, + "sparseResidency4Samples": 0, + "sparseResidency8Samples": 0, + "sparseResidencyAliased": 0, + "sparseResidencyBuffer": 0, + "sparseResidencyImage2D": 0, + "sparseResidencyImage3D": 0, + "tessellationShader": 0, + "textureCompressionASTC_LDR": 0, + "textureCompressionBC": 0, + "textureCompressionETC2": 1, + "variableMultisampleRate": 0, + "vertexPipelineStoresAndAtomics": 0, + "wideLines": 0 + }, + "VkPhysicalDeviceProperties": { + "apiVersion": 4194307, + "deviceID": 1455646, + "deviceName": "PowerVR Rogue GE8300", + "deviceType": 2, + "driverVersion": 4490469, + "limits": { + "bufferImageGranularity": 1, + "discreteQueuePriorities": 3, + "framebufferColorSampleCounts": 7, + "framebufferDepthSampleCounts": 7, + "framebufferNoAttachmentsSampleCounts": 7, + "framebufferStencilSampleCounts": 7, + "lineWidthGranularity": 0, + "lineWidthRange": [ + 1, + 1 + ], + "maxBoundDescriptorSets": 4, + "maxClipDistances": 0, + "maxColorAttachments": 8, + "maxCombinedClipAndCullDistances": 0, + "maxComputeSharedMemorySize": 16384, + "maxComputeWorkGroupCount": [ + 65536, + 65536, + 65536 + ], + "maxComputeWorkGroupInvocations": 512, + "maxComputeWorkGroupSize": [ + 512, + 512, + 64 + ], + "maxCullDistances": 0, + "maxDescriptorSetInputAttachments": 256, + "maxDescriptorSetSampledImages": 256, + "maxDescriptorSetSamplers": 256, + "maxDescriptorSetStorageBuffers": 256, + "maxDescriptorSetStorageBuffersDynamic": 8, + "maxDescriptorSetStorageImages": 256, + "maxDescriptorSetUniformBuffers": 256, + "maxDescriptorSetUniformBuffersDynamic": 8, + "maxDrawIndexedIndexValue": 4294967295, + "maxDrawIndirectCount": 2147483648, + "maxFragmentCombinedOutputResources": 8, + "maxFragmentDualSrcAttachments": 0, + "maxFragmentInputComponents": 128, + "maxFragmentOutputAttachments": 8, + "maxFramebufferHeight": 8192, + "maxFramebufferLayers": 2048, + "maxFramebufferWidth": 8192, + "maxGeometryInputComponents": 128, + "maxGeometryOutputComponents": 128, + "maxGeometryOutputVertices": 256, + "maxGeometryShaderInvocations": 32, + "maxGeometryTotalOutputComponents": 1024, + "maxImageArrayLayers": 2048, + "maxImageDimension1D": 8192, + "maxImageDimension2D": 8192, + "maxImageDimension3D": 2048, + "maxImageDimensionCube": 8192, + "maxInterpolationOffset": 0.499999970198, + "maxMemoryAllocationCount": 9999, + "maxPerStageDescriptorInputAttachments": 128, + "maxPerStageDescriptorSampledImages": 128, + "maxPerStageDescriptorSamplers": 128, + "maxPerStageDescriptorStorageBuffers": 128, + "maxPerStageDescriptorStorageImages": 128, + "maxPerStageDescriptorUniformBuffers": 128, + "maxPerStageResources": 128, + "maxPushConstantsSize": 128, + "maxSampleMaskWords": 1, + "maxSamplerAllocationCount": 9999, + "maxSamplerAnisotropy": 16, + "maxSamplerLodBias": 15, + "maxStorageBufferRange": 134217728, + "maxTessellationControlPerPatchOutputComponents": 0, + "maxTessellationControlPerVertexInputComponents": 0, + "maxTessellationControlPerVertexOutputComponents": 0, + "maxTessellationControlTotalOutputComponents": 0, + "maxTessellationEvaluationInputComponents": 0, + "maxTessellationEvaluationOutputComponents": 0, + "maxTessellationGenerationLevel": 0, + "maxTessellationPatchSize": 0, + "maxTexelBufferElements": 65536, + "maxTexelGatherOffset": 0, + "maxTexelOffset": 7, + "maxUniformBufferRange": 134217728, + "maxVertexInputAttributeOffset": 65535, + "maxVertexInputAttributes": 16, + "maxVertexInputBindingStride": 2147483648, + "maxVertexInputBindings": 16, + "maxVertexOutputComponents": 128, + "maxViewportDimensions": [ + 8192, + 8192 + ], + "maxViewports": 16, + "minInterpolationOffset": -0.5, + "minMemoryMapAlignment": 64, + "minStorageBufferOffsetAlignment": 4, + "minTexelBufferOffsetAlignment": 4, + "minTexelGatherOffset": 0, + "minTexelOffset": -8, + "minUniformBufferOffsetAlignment": 4, + "mipmapPrecisionBits": 4, + "nonCoherentAtomSize": 128, + "optimalBufferCopyOffsetAlignment": 4, + "optimalBufferCopyRowPitchAlignment": 4, + "pointSizeGranularity": 0, + "pointSizeRange": [ + 1, + 511 + ], + "sampledImageColorSampleCounts": 7, + "sampledImageDepthSampleCounts": 7, + "sampledImageIntegerSampleCounts": 7, + "sampledImageStencilSampleCounts": 7, + "sparseAddressSpaceSize": 274877906944, + "standardSampleLocations": 1, + "storageImageSampleCounts": 7, + "strictLines": 0, + "subPixelInterpolationOffsetBits": 4, + "subPixelPrecisionBits": 8, + "subTexelPrecisionBits": 8, + "timestampComputeAndGraphics": 0, + "timestampPeriod": 0, + "viewportBoundsRange": [ + -16384, + 16383 + ], + "viewportSubPixelBits": 0 + }, + "pipelineCacheUUID": [ + 50, + 50, + 32, + 52, + 48, + 32, + 53, + 52, + 32, + 51, + 48, + 0, + 0, + 0, + 0, + 0 + ], + "sparseProperties": { + "residencyAlignedMipSize": 0, + "residencyNonResidentStrict": 0, + "residencyStandard2DBlockShape": 0, + "residencyStandard2DMultisampleBlockShape": 0, + "residencyStandard3DBlockShape": 0 + }, + "vendorID": 4112 + }, + "VkPhysicalDeviceMemoryProperties": { + "memoryHeaps": [ + { + "flags": 1, + "size": 1073741824 + } + ], + "memoryTypes": [ + { + "heapIndex": 0, + "propertyFlags": 7 + } + ] + }, + "ArrayOfVkExtensionProperties": [ + { + "extensionName": "VK_IMG_filter_cubic", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_sampler_mirror_clamp_to_edge", + "specVersion": 1 + }, + { + "extensionName": "VK_IMG_format_pvrtc", + "specVersion": 1 + }, + { + "extensionName": "VK_KHR_swapchain", + "specVersion": 68 + } + ], + "ArrayOfVkLayerProperties": [], + "ArrayOfVkQueueFamilyProperties": [ + { + "minImageTransferGranularity": { + "depth": 1, + "height": 1, + "width": 1 + }, + "queueCount": 2, + "queueFlags": 7, + "timestampValidBits": 0 + }, + { + "minImageTransferGranularity": { + "depth": 0, + "height": 0, + "width": 0 + }, + "queueCount": 0, + "queueFlags": 0, + "timestampValidBits": 0 + } + ], + "ArrayOfVkFormatProperties": [ + { + "formatID": 1, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 2, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 3, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 4, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 5, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 6, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 7, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 8, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 9, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 72 + }, + { + "formatID": 10, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 72 + }, + { + "formatID": 11, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 12, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 13, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 14, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 15, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 16, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 72 + }, + { + "formatID": 17, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 72 + }, + { + "formatID": 18, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 19, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 20, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 21, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 22, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 11649, + "bufferFeatures": 0 + }, + { + "formatID": 23, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 24, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 25, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 26, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 27, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 28, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 29, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 30, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 31, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 32, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 33, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 34, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 35, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 36, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 37, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15747, + "bufferFeatures": 88 + }, + { + "formatID": 38, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15747, + "bufferFeatures": 88 + }, + { + "formatID": 39, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 40, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 41, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 42, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 43, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 44, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 72 + }, + { + "formatID": 45, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 46, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 47, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 48, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 49, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 50, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 51, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 88 + }, + { + "formatID": 52, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 88 + }, + { + "formatID": 53, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 54, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 55, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 11393, + "bufferFeatures": 88 + }, + { + "formatID": 56, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 11393, + "bufferFeatures": 88 + }, + { + "formatID": 57, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 15745, + "bufferFeatures": 0 + }, + { + "formatID": 58, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 64 + }, + { + "formatID": 59, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 60, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 61, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 62, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 64 + }, + { + "formatID": 63, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 64, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 65, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 66, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 67, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 68, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 69, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 70, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 71, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 72, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 73, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 74, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 75, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 76, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 77, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 78, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 79, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 80, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 81, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 82, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 72 + }, + { + "formatID": 83, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 7553, + "bufferFeatures": 72 + }, + { + "formatID": 84, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 64 + }, + { + "formatID": 85, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 64 + }, + { + "formatID": 86, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 87, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 88, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 64 + }, + { + "formatID": 89, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 64 + }, + { + "formatID": 90, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 64 + }, + { + "formatID": 91, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 92, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 72 + }, + { + "formatID": 93, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 94, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 64 + }, + { + "formatID": 95, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 96, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 97, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 7555, + "bufferFeatures": 88 + }, + { + "formatID": 98, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3207, + "bufferFeatures": 120 + }, + { + "formatID": 99, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3207, + "bufferFeatures": 120 + }, + { + "formatID": 100, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3459, + "bufferFeatures": 88 + }, + { + "formatID": 101, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 102, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 103, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3459, + "bufferFeatures": 88 + }, + { + "formatID": 104, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 64 + }, + { + "formatID": 105, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3201, + "bufferFeatures": 64 + }, + { + "formatID": 106, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3457, + "bufferFeatures": 64 + }, + { + "formatID": 107, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 108, + "linearTilingFeatures": 3201, + "optimalTilingFeatures": 3203, + "bufferFeatures": 88 + }, + { + "formatID": 109, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 3459, + "bufferFeatures": 88 + }, + { + "formatID": 110, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 111, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 112, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 113, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 114, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 115, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 116, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 117, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 118, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 119, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 120, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 121, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 122, + "linearTilingFeatures": 3457, + "optimalTilingFeatures": 7553, + "bufferFeatures": 8 + }, + { + "formatID": 123, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 5121, + "bufferFeatures": 0 + }, + { + "formatID": 124, + "linearTilingFeatures": 3585, + "optimalTilingFeatures": 3585, + "bufferFeatures": 0 + }, + { + "formatID": 125, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 126, + "linearTilingFeatures": 3585, + "optimalTilingFeatures": 3585, + "bufferFeatures": 0 + }, + { + "formatID": 127, + "linearTilingFeatures": 3585, + "optimalTilingFeatures": 3585, + "bufferFeatures": 0 + }, + { + "formatID": 128, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 129, + "linearTilingFeatures": 3585, + "optimalTilingFeatures": 3585, + "bufferFeatures": 0 + }, + { + "formatID": 130, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 131, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 132, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 133, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 134, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 135, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 136, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 137, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 138, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 139, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 140, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 141, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 142, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 143, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 144, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 145, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 146, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 147, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 148, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 149, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 150, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 151, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 152, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 9217, + "bufferFeatures": 0 + }, + { + "formatID": 153, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 154, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 155, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 156, + "linearTilingFeatures": 1025, + "optimalTilingFeatures": 1025, + "bufferFeatures": 0 + }, + { + "formatID": 157, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 158, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 159, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 160, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 161, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 162, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 163, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 164, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 165, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 166, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 167, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 168, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 169, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 170, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 171, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 172, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 173, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 174, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 175, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 176, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 177, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 178, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 179, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 180, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 181, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 182, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 183, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + }, + { + "formatID": 184, + "linearTilingFeatures": 0, + "optimalTilingFeatures": 0, + "bufferFeatures": 0 + } + ] +} \ No newline at end of file diff --git a/sources/third_party/vulkan/src/tests/layer_validation_tests.cpp b/sources/third_party/vulkan/src/tests/layer_validation_tests.cpp index b6fddddc139ab18bc6067b8a79dbae3d794e5fe4..98d070fbda11856f9cfa8e28ec946f13006d3710 100644 --- a/sources/third_party/vulkan/src/tests/layer_validation_tests.cpp +++ b/sources/third_party/vulkan/src/tests/layer_validation_tests.cpp @@ -25,6 +25,7 @@ #ifdef ANDROID #include "vulkan_wrapper.h" #else +#define NOMINMAX #include #endif @@ -41,45 +42,32 @@ #include "vk_format_utils.h" #include "vk_validation_error_messages.h" #include "vkrenderframework.h" +#include "vk_typemap_helper.h" #include -#include +#include +#include +#include +#include #include -#define GLM_FORCE_RADIANS -#include "glm/glm.hpp" -#include - //-------------------------------------------------------------------------------------- // Mesh and VertexFormat Data //-------------------------------------------------------------------------------------- -struct Vertex { - float posX, posY, posZ, posW; // Position data - float r, g, b, a; // Color -}; -#define XYZ1(_x_, _y_, _z_) (_x_), (_y_), (_z_), 1.f - -typedef enum _BsoFailSelect { - BsoFailNone = 0x00000000, - BsoFailLineWidth = 0x00000001, - BsoFailDepthBias = 0x00000002, - BsoFailViewport = 0x00000004, - BsoFailScissor = 0x00000008, - BsoFailBlend = 0x00000010, - BsoFailDepthBounds = 0x00000020, - BsoFailStencilReadMask = 0x00000040, - BsoFailStencilWriteMask = 0x00000080, - BsoFailStencilReference = 0x00000100, - BsoFailCmdClearAttachments = 0x00000200, - BsoFailIndexBuffer = 0x00000400, -} BsoFailSelect; - -struct vktriangle_vs_uniform { - // Must start with MVP - float mvp[4][4]; - float position[3][4]; - float color[3][4]; +enum BsoFailSelect { + BsoFailNone, + BsoFailLineWidth, + BsoFailDepthBias, + BsoFailViewport, + BsoFailScissor, + BsoFailBlend, + BsoFailDepthBounds, + BsoFailStencilReadMask, + BsoFailStencilWriteMask, + BsoFailStencilReference, + BsoFailCmdClearAttachments, + BsoFailIndexBuffer }; static const char bindStateVertShaderText[] = @@ -100,6 +88,12 @@ static const char bindStateFragShaderText[] = " uFragColor = vec4(0,1,0,1);\n" "}\n"; +// Static arrays helper +template +size_t size(ElementT (&)[array_size]) { + return array_size; +} + // Format search helper VkFormat FindSupportedDepthStencilFormat(VkPhysicalDevice phy) { VkFormat ds_formats[] = {VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT}; @@ -111,13 +105,13 @@ VkFormat FindSupportedDepthStencilFormat(VkPhysicalDevice phy) { return ds_formats[i]; } } - return (VkFormat)0; + return VK_FORMAT_UNDEFINED; } // Returns true if *any* requested features are available. // Assumption is that the framework can successfully create an image as // long as at least one of the feature bits is present (excepting VTX_BUF). -bool ImageFormatIsSupported(VkPhysicalDevice phy, VkFormat format, VkImageTiling tiling, +bool ImageFormatIsSupported(VkPhysicalDevice phy, VkFormat format, VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL, VkFormatFeatureFlags features = ~VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) { VkFormatProperties format_props; vkGetPhysicalDeviceFormatProperties(phy, format, &format_props); @@ -126,8 +120,8 @@ bool ImageFormatIsSupported(VkPhysicalDevice phy, VkFormat format, VkImageTiling return (0 != (phy_features & features)); } -// Returns true if *all* requested features are available. -bool ImageFeatureIsSupported(VkPhysicalDevice phy, VkFormat format, VkImageTiling tiling, VkFormatFeatureFlags features) { +// Returns true if format and *all* requested features are available. +bool ImageFormatAndFeaturesSupported(VkPhysicalDevice phy, VkFormat format, VkImageTiling tiling, VkFormatFeatureFlags features) { VkFormatProperties format_props; vkGetPhysicalDeviceFormatProperties(phy, format, &format_props); VkFormatFeatureFlags phy_features = @@ -140,6 +134,52 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL myDbgFunc(VkFlags msgFlags, VkDebugReportO size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg, void *pUserData); +// Simple sane SamplerCreateInfo boilerplate +static VkSamplerCreateInfo SafeSaneSamplerCreateInfo() { + VkSamplerCreateInfo sampler_create_info = {}; + sampler_create_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; + sampler_create_info.pNext = nullptr; + sampler_create_info.magFilter = VK_FILTER_NEAREST; + sampler_create_info.minFilter = VK_FILTER_NEAREST; + sampler_create_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; + sampler_create_info.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; + sampler_create_info.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; + sampler_create_info.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; + sampler_create_info.mipLodBias = 1.0; + sampler_create_info.anisotropyEnable = VK_FALSE; + sampler_create_info.maxAnisotropy = 1.0; + sampler_create_info.compareEnable = VK_FALSE; + sampler_create_info.compareOp = VK_COMPARE_OP_NEVER; + sampler_create_info.minLod = 1.0; + sampler_create_info.maxLod = 1.0; + sampler_create_info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; + sampler_create_info.unnormalizedCoordinates = VK_FALSE; + + return sampler_create_info; +} + +// Dependent "false" type for the static assert, as GCC will evaluate +// non-dependent static_asserts even for non-instantiated templates +template +struct AlwaysFalse : std::false_type {}; + +// Helpers to get nearest greater or smaller value (of float) -- useful for testing the boundary cases of Vulkan limits +template +T NearestGreater(const T from) { + using Lim = std::numeric_limits; + const auto positive_direction = Lim::has_infinity ? Lim::infinity() : Lim::max(); + + return std::nextafter(from, positive_direction); +} + +template +T NearestSmaller(const T from) { + using Lim = std::numeric_limits; + const auto negative_direction = Lim::has_infinity ? -Lim::infinity() : Lim::lowest(); + + return std::nextafter(from, negative_direction); +} + // ErrorMonitor Usage: // // Call SetDesiredFailureMsg with a string to be compared against all @@ -312,7 +352,7 @@ class ErrorMonitor { ADD_FAILURE() << "Did not receive expected error '" << desired_msg << "'"; } for (auto desired_id : desired_message_ids_) { - ADD_FAILURE() << "Did not receive expected error ENUM '" << desired_id << "'"; + ADD_FAILURE() << "Did not receive expected error ENUM '0x" << std::hex << desired_id << "'"; } } Reset(); @@ -372,9 +412,9 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL myDbgFunc(VkFlags msgFlags, VkDebugReportO class VkLayerTest : public VkRenderFramework { public: - void VKTriangleTest(const char *vertShaderText, const char *fragShaderText, BsoFailSelect failMask); + void VKTriangleTest(BsoFailSelect failCase); void GenericDrawPreparation(VkCommandBufferObj *commandBuffer, VkPipelineObj &pipelineobj, VkDescriptorSetObj &descriptorSet, - BsoFailSelect failMask); + BsoFailSelect failCase); void Init(VkPhysicalDeviceFeatures *features = nullptr, const VkCommandPoolCreateFlags flags = 0) { InitFramework(myDbgFunc, m_errorMonitor); @@ -383,6 +423,12 @@ class VkLayerTest : public VkRenderFramework { protected: ErrorMonitor *m_errorMonitor; + + public: + ErrorMonitor *Monitor() { return m_errorMonitor; } + VkCommandBufferObj *CommandBuffer() { return m_commandBuffer; } + + protected: bool m_enableWSI; virtual void SetUp() { @@ -406,7 +452,14 @@ class VkLayerTest : public VkRenderFramework { m_instance_layer_names.push_back("VK_LAYER_LUNARG_object_tracker"); m_instance_layer_names.push_back("VK_LAYER_LUNARG_core_validation"); m_instance_layer_names.push_back("VK_LAYER_GOOGLE_unique_objects"); - + if (VkTestFramework::m_devsim_layer) { + if (InstanceLayerSupported("VK_LAYER_LUNARG_device_simulation")) { + m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_simulation"); + } else { + VkTestFramework::m_devsim_layer = false; + printf(" Did not find VK_LAYER_LUNARG_device_simulation layer so it will not be enabled.\n"); + } + } if (m_enableWSI) { m_instance_extension_names.push_back(VK_KHR_SURFACE_EXTENSION_NAME); m_device_extension_names.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME); @@ -469,107 +522,114 @@ class VkLayerTest : public VkRenderFramework { VkLayerTest() { m_enableWSI = false; } }; -void VkLayerTest::VKTriangleTest(const char *vertShaderText, const char *fragShaderText, BsoFailSelect failMask) { - // Create identity matrix - int i; - struct vktriangle_vs_uniform data; - - glm::mat4 Projection = glm::mat4(1.0f); - glm::mat4 View = glm::mat4(1.0f); - glm::mat4 Model = glm::mat4(1.0f); - glm::mat4 MVP = Projection * View * Model; - const int matrixSize = sizeof(MVP); - - memcpy(&data.mvp, &MVP[0][0], matrixSize); - - static const Vertex tri_data[] = { - {XYZ1(-1, -1, 0), XYZ1(1.f, 0.f, 0.f)}, {XYZ1(1, -1, 0), XYZ1(0.f, 1.f, 0.f)}, {XYZ1(0, 1, 0), XYZ1(0.f, 0.f, 1.f)}, - }; - - for (i = 0; i < 3; i++) { - data.position[i][0] = tri_data[i].posX; - data.position[i][1] = tri_data[i].posY; - data.position[i][2] = tri_data[i].posZ; - data.position[i][3] = tri_data[i].posW; - data.color[i][0] = tri_data[i].r; - data.color[i][1] = tri_data[i].g; - data.color[i][2] = tri_data[i].b; - data.color[i][3] = tri_data[i].a; - } +void VkLayerTest::VKTriangleTest(BsoFailSelect failCase) { + ASSERT_TRUE(m_device && m_device->initialized()); // VKTriangleTest assumes Init() has finished ASSERT_NO_FATAL_FAILURE(InitViewport()); - VkConstantBufferObj constantBuffer(m_device, sizeof(vktriangle_vs_uniform), (const void *)&data, - VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT); - - VkShaderObj vs(m_device, vertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj ps(m_device, fragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); + VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); + VkShaderObj ps(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipelineobj(m_device); - pipelineobj.AddColorAttachment(); + pipelineobj.AddDefaultColorAttachment(); pipelineobj.AddShader(&vs); pipelineobj.AddShader(&ps); - if (failMask & BsoFailLineWidth) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_LINE_WIDTH); - VkPipelineInputAssemblyStateCreateInfo ia_state = {}; - ia_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_state.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST; - pipelineobj.SetInputAssembly(&ia_state); - } - if (failMask & BsoFailDepthBias) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_DEPTH_BIAS); - VkPipelineRasterizationStateCreateInfo rs_state = {}; - rs_state.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_state.depthBiasEnable = VK_TRUE; - rs_state.lineWidth = 1.0f; - pipelineobj.SetRasterization(&rs_state); - } - // Viewport and scissors must stay in sync or other errors will occur than - // the ones we want - if (failMask & BsoFailViewport) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_VIEWPORT); - } - if (failMask & BsoFailScissor) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_SCISSOR); - } - if (failMask & BsoFailBlend) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_BLEND_CONSTANTS); - VkPipelineColorBlendAttachmentState att_state = {}; - att_state.dstAlphaBlendFactor = VK_BLEND_FACTOR_CONSTANT_COLOR; - att_state.blendEnable = VK_TRUE; - pipelineobj.AddColorAttachment(0, &att_state); - } - if (failMask & BsoFailDepthBounds) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_DEPTH_BOUNDS); - } - if (failMask & BsoFailStencilReadMask) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK); - } - if (failMask & BsoFailStencilWriteMask) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_WRITE_MASK); - } - if (failMask & BsoFailStencilReference) { - pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_REFERENCE); + + bool failcase_needs_depth = false; // to mark cases that need depth attachment + + switch (failCase) { + case BsoFailLineWidth: { + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_LINE_WIDTH); + VkPipelineInputAssemblyStateCreateInfo ia_state = {}; + ia_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; + ia_state.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST; + pipelineobj.SetInputAssembly(&ia_state); + break; + } + case BsoFailDepthBias: { + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_DEPTH_BIAS); + VkPipelineRasterizationStateCreateInfo rs_state = {}; + rs_state.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; + rs_state.depthBiasEnable = VK_TRUE; + rs_state.lineWidth = 1.0f; + pipelineobj.SetRasterization(&rs_state); + break; + } + case BsoFailViewport: { + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_VIEWPORT); + break; + } + case BsoFailScissor: { + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_SCISSOR); + break; + } + case BsoFailBlend: { + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_BLEND_CONSTANTS); + VkPipelineColorBlendAttachmentState att_state = {}; + att_state.dstAlphaBlendFactor = VK_BLEND_FACTOR_CONSTANT_COLOR; + att_state.blendEnable = VK_TRUE; + pipelineobj.AddColorAttachment(0, att_state); + break; + } + case BsoFailDepthBounds: { + failcase_needs_depth = true; + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_DEPTH_BOUNDS); + break; + } + case BsoFailStencilReadMask: { + failcase_needs_depth = true; + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK); + break; + } + case BsoFailStencilWriteMask: { + failcase_needs_depth = true; + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_WRITE_MASK); + break; + } + case BsoFailStencilReference: { + failcase_needs_depth = true; + pipelineobj.MakeDynamic(VK_DYNAMIC_STATE_STENCIL_REFERENCE); + break; + } + + case BsoFailIndexBuffer: + break; + case BsoFailCmdClearAttachments: + break; + case BsoFailNone: + break; + default: + break; } VkDescriptorSetObj descriptorSet(m_device); - descriptorSet.AppendBuffer(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, constantBuffer); - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + VkImageView *depth_attachment = nullptr; + if (failcase_needs_depth) { + m_depth_stencil_fmt = FindSupportedDepthStencilFormat(gpu()); + ASSERT_TRUE(m_depth_stencil_fmt != VK_FORMAT_UNDEFINED); + + m_depthStencil->Init(m_device, static_cast(m_width), static_cast(m_height), m_depth_stencil_fmt, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT); + depth_attachment = m_depthStencil->BindInfo(); + } + + ASSERT_NO_FATAL_FAILURE(InitRenderTarget(1, depth_attachment)); m_commandBuffer->begin(); - m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - GenericDrawPreparation(m_commandBuffer, pipelineobj, descriptorSet, failMask); + GenericDrawPreparation(m_commandBuffer, pipelineobj, descriptorSet, failCase); + + m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); // render triangle - if (failMask & BsoFailIndexBuffer) { + if (failCase == BsoFailIndexBuffer) { // Use DrawIndexed w/o an index buffer bound m_commandBuffer->DrawIndexed(3, 1, 0, 0, 0); } else { m_commandBuffer->Draw(3, 1, 0, 0); } - if (failMask & BsoFailCmdClearAttachments) { + if (failCase == BsoFailCmdClearAttachments) { VkClearAttachment color_attachment = {}; color_attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; color_attachment.colorAttachment = 1; // Someone who knew what they were doing would use 0 for the index; @@ -585,14 +645,10 @@ void VkLayerTest::VKTriangleTest(const char *vertShaderText, const char *fragSha } void VkLayerTest::GenericDrawPreparation(VkCommandBufferObj *commandBuffer, VkPipelineObj &pipelineobj, - VkDescriptorSetObj &descriptorSet, BsoFailSelect failMask) { - if (m_depthStencil->Initialized()) { - commandBuffer->ClearAllBuffers(m_clear_color, m_depth_clear_color, m_stencil_clear_color, m_depthStencil); - } else { - commandBuffer->ClearAllBuffers(m_clear_color, m_depth_clear_color, m_stencil_clear_color, NULL); - } + VkDescriptorSetObj &descriptorSet, BsoFailSelect failCase) { + commandBuffer->ClearAllBuffers(m_renderTargets, m_clear_color, m_depthStencil, m_depth_clear_color, m_stencil_clear_color); - commandBuffer->PrepareAttachments(); + commandBuffer->PrepareAttachments(m_renderTargets, m_depthStencil); // Make sure depthWriteEnable is set so that Depth fail test will work // correctly // Make sure stencilTestEnable is set so that Stencil fail test will work @@ -610,7 +666,7 @@ void VkLayerTest::GenericDrawPreparation(VkCommandBufferObj *commandBuffer, VkPi ds_ci.depthWriteEnable = VK_TRUE; ds_ci.depthCompareOp = VK_COMPARE_OP_NEVER; ds_ci.depthBoundsTestEnable = VK_FALSE; - if (failMask & BsoFailDepthBounds) { + if (failCase == BsoFailDepthBounds) { ds_ci.depthBoundsTestEnable = VK_TRUE; ds_ci.maxDepthBounds = 0.0f; ds_ci.minDepthBounds = 0.0f; @@ -647,6 +703,7 @@ class VkBufferTest { eInvalidDeviceOffset, eInvalidMemoryOffset, eBindNullBuffer, + eBindFakeBuffer, eFreeInvalidHandle, eNone, }; @@ -683,9 +740,20 @@ class VkBufferTest { // A constructor which performs validation tests within construction. VkBufferTest(VkDeviceObj *aVulkanDevice, VkBufferUsageFlags aBufferUsage, eTestEnFlags aTestFlag = eNone) - : AllocateCurrent(false), BoundCurrent(false), CreateCurrent(false), VulkanDevice(aVulkanDevice->device()) { - if (eBindNullBuffer == aTestFlag) { - VulkanMemory = 0; + : AllocateCurrent(true), + BoundCurrent(false), + CreateCurrent(false), + InvalidDeleteEn(false), + VulkanDevice(aVulkanDevice->device()) { + if (eBindNullBuffer == aTestFlag || eBindFakeBuffer == aTestFlag) { + VkMemoryAllocateInfo memory_allocate_info = {}; + memory_allocate_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + memory_allocate_info.allocationSize = 1; // fake size -- shouldn't matter for the test + memory_allocate_info.memoryTypeIndex = 0; // fake type -- shouldn't matter for the test + vkAllocateMemory(VulkanDevice, &memory_allocate_info, nullptr, &VulkanMemory); + + VulkanBuffer = (aTestFlag == eBindNullBuffer) ? VK_NULL_HANDLE : (VkBuffer)0xCDCDCDCDCDCDCDCD; + vkBindBufferMemory(VulkanDevice, VulkanBuffer, VulkanMemory, 0); } else { VkBufferCreateInfo buffer_create_info = {}; @@ -706,12 +774,12 @@ class VkBufferTest { bool pass = aVulkanDevice->phy().set_memory_type(memory_requirements.memoryTypeBits, &memory_allocate_info, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); if (!pass) { + CreateCurrent = false; vkDestroyBuffer(VulkanDevice, VulkanBuffer, nullptr); return; } vkAllocateMemory(VulkanDevice, &memory_allocate_info, NULL, &VulkanMemory); - AllocateCurrent = true; // NB: 1 is intentionally an invalid offset value const bool offset_en = eInvalidDeviceOffset == aTestFlag || eInvalidMemoryOffset == aTestFlag; vkBindBufferMemory(VulkanDevice, VulkanBuffer, VulkanMemory, offset_en ? eOffsetAlignment : 0); @@ -854,56 +922,311 @@ class VkVerticesObj { uint32_t VkVerticesObj::BindIdGenerator; struct OneOffDescriptorSet { - VkDevice device_; + VkDeviceObj *device_; VkDescriptorPool pool_; - VkDescriptorSetLayout layout_; + VkDescriptorSetLayoutObj layout_; VkDescriptorSet set_; + typedef std::vector Bindings; - OneOffDescriptorSet(VkDevice device, std::initializer_list bindings) - : device_{device}, pool_{}, layout_{}, set_{} { + OneOffDescriptorSet(VkDeviceObj *device, const Bindings &bindings) + : device_{device}, pool_{}, layout_(device, bindings), set_{} { VkResult err; + std::vector sizes; - for (auto const & b : bindings) - sizes.push_back({b.descriptorType, std::max(1u, b.descriptorCount)}); + for (const auto &b : bindings) sizes.push_back({b.descriptorType, std::max(1u, b.descriptorCount)}); VkDescriptorPoolCreateInfo dspci = { - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, nullptr, - 0, 1, uint32_t(sizes.size()), sizes.data() }; - err = vkCreateDescriptorPool(device_, &dspci, nullptr, &pool_); - if (err != VK_SUCCESS) - return; - - VkDescriptorSetLayoutCreateInfo dslci = { - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, - 0, uint32_t(bindings.size()), bindings.begin() }; - err = vkCreateDescriptorSetLayout(device_, &dslci, nullptr, &layout_); - if (err != VK_SUCCESS) - return; + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, nullptr, 0, 1, uint32_t(sizes.size()), sizes.data()}; + err = vkCreateDescriptorPool(device_->handle(), &dspci, nullptr, &pool_); + if (err != VK_SUCCESS) return; - VkDescriptorSetAllocateInfo alloc_info = { - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, nullptr, - pool_, 1, &layout_}; - err = vkAllocateDescriptorSets(device_, &alloc_info, &set_); + VkDescriptorSetAllocateInfo alloc_info = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, nullptr, pool_, 1, + &layout_.handle()}; + err = vkAllocateDescriptorSets(device_->handle(), &alloc_info, &set_); } ~OneOffDescriptorSet() { // No need to destroy set-- it's going away with the pool. - vkDestroyDescriptorSetLayout(device_, layout_, nullptr); - vkDestroyDescriptorPool(device_, pool_, nullptr); + vkDestroyDescriptorPool(device_->handle(), pool_, nullptr); + } + + bool Initialized() { return pool_ != VK_NULL_HANDLE && layout_.initialized() && set_ != VK_NULL_HANDLE; } +}; + +template +bool IsValidVkStruct(const T &s) { + return LvlTypeMap::kSType == s.sType; +} + +// Helper class for tersely creating create pipeline tests +// +// Designed with minimal error checking to ensure easy error state creation +// See OneshotTest for typical usage +struct CreatePipelineHelper { + public: + std::vector dsl_bindings_; + std::unique_ptr descriptor_set_; + std::vector shader_stages_; + VkPipelineVertexInputStateCreateInfo vi_ci_ = {}; + VkPipelineInputAssemblyStateCreateInfo ia_ci_ = {}; + VkPipelineTessellationStateCreateInfo tess_ci_ = {}; + VkViewport viewport_ = {}; + VkRect2D scissor_ = {}; + VkPipelineViewportStateCreateInfo vp_state_ci_ = {}; + VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci_ = {}; + VkPipelineLayoutCreateInfo pipeline_layout_ci_ = {}; + VkPipelineLayoutObj pipeline_layout_; + VkPipelineDynamicStateCreateInfo dyn_state_ci_ = {}; + VkPipelineRasterizationStateCreateInfo rs_state_ci_ = {}; + VkPipelineColorBlendAttachmentState cb_attachments_ = {}; + VkPipelineColorBlendStateCreateInfo cb_ci_ = {}; + VkGraphicsPipelineCreateInfo gp_ci_ = {}; + VkPipelineCacheCreateInfo pc_ci_ = {}; + VkPipeline pipeline_ = VK_NULL_HANDLE; + VkPipelineCache pipeline_cache_ = VK_NULL_HANDLE; + std::unique_ptr vs_; + std::unique_ptr fs_; + VkLayerTest &layer_test_; + CreatePipelineHelper(VkLayerTest &test) : layer_test_(test) {} + ~CreatePipelineHelper() { + VkDevice device = layer_test_.device(); + vkDestroyPipelineCache(device, pipeline_cache_, nullptr); + vkDestroyPipeline(device, pipeline_, nullptr); + } + + void InitDescriptorSetInfo() { dsl_bindings_ = {{0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}}; } + + void InitInputAndVertexInfo() { + vi_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + + ia_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; + ia_ci_.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; + } + + void InitMultisampleInfo() { + pipe_ms_state_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; + pipe_ms_state_ci_.pNext = nullptr; + pipe_ms_state_ci_.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; + pipe_ms_state_ci_.sampleShadingEnable = VK_FALSE; + pipe_ms_state_ci_.minSampleShading = 1.0; + pipe_ms_state_ci_.pSampleMask = NULL; + } + + void InitPipelineLayoutInfo() { + pipeline_layout_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipeline_layout_ci_.setLayoutCount = 1; // Not really changeable because InitState() sets exactly one pSetLayout + pipeline_layout_ci_.pSetLayouts = nullptr; // must bound after it is created + } + + void InitViewportInfo() { + viewport_ = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + scissor_ = {{0, 0}, {64, 64}}; + + vp_state_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; + vp_state_ci_.pNext = nullptr; + vp_state_ci_.viewportCount = 1; + vp_state_ci_.pViewports = &viewport_; // ignored if dynamic + vp_state_ci_.scissorCount = 1; + vp_state_ci_.pScissors = &scissor_; // ignored if dynamic + } + + void InitDynamicStateInfo() { + // Use a "validity" check on the {} initialized structure to detect initialization + // during late bind + } + + void InitShaderInfo() { + vs_.reset(new VkShaderObj(layer_test_.DeviceObj(), bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, &layer_test_)); + fs_.reset(new VkShaderObj(layer_test_.DeviceObj(), bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, &layer_test_)); + // We shouldn't need a fragment shader but add it to be able to run on more devices + shader_stages_ = {vs_->GetStageCreateInfo(), fs_->GetStageCreateInfo()}; + } + + void InitRasterizationInfo() { + rs_state_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; + rs_state_ci_.pNext = nullptr; + rs_state_ci_.flags = 0; + rs_state_ci_.depthClampEnable = VK_FALSE; + rs_state_ci_.rasterizerDiscardEnable = VK_FALSE; + rs_state_ci_.polygonMode = VK_POLYGON_MODE_FILL; + rs_state_ci_.cullMode = VK_CULL_MODE_BACK_BIT; + rs_state_ci_.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; + rs_state_ci_.depthBiasEnable = VK_FALSE; + rs_state_ci_.lineWidth = 1.0F; + } + + void InitBlendStateInfo() { + cb_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; + cb_ci_.logicOpEnable = VK_FALSE; + cb_ci_.logicOp = VK_LOGIC_OP_COPY; // ignored if enable is VK_FALSE above + cb_ci_.attachmentCount = layer_test_.RenderPassInfo().subpassCount; + ASSERT_TRUE(IsValidVkStruct(layer_test_.RenderPassInfo())); + cb_ci_.pAttachments = &cb_attachments_; + for (int i = 0; i < 4; i++) { + cb_ci_.blendConstants[0] = 1.0F; + } + } + + void InitGraphicsPipelineInfo() { + // Color-only rendering in a subpass with no depth/stencil attachment + // Active Pipeline Shader Stages + // Vertex Shader + // Fragment Shader + // Required: Fixed-Function Pipeline Stages + // VkPipelineVertexInputStateCreateInfo + // VkPipelineInputAssemblyStateCreateInfo + // VkPipelineViewportStateCreateInfo + // VkPipelineRasterizationStateCreateInfo + // VkPipelineMultisampleStateCreateInfo + // VkPipelineColorBlendStateCreateInfo + gp_ci_.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; + gp_ci_.pNext = nullptr; + gp_ci_.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; + gp_ci_.pVertexInputState = &vi_ci_; + gp_ci_.pInputAssemblyState = &ia_ci_; + gp_ci_.pTessellationState = nullptr; + gp_ci_.pViewportState = &vp_state_ci_; + gp_ci_.pRasterizationState = &rs_state_ci_; + gp_ci_.pMultisampleState = &pipe_ms_state_ci_; + gp_ci_.pDepthStencilState = nullptr; + gp_ci_.pColorBlendState = &cb_ci_; + gp_ci_.pDynamicState = nullptr; + gp_ci_.renderPass = layer_test_.renderPass(); + } + + void InitPipelineCacheInfo() { + pc_ci_.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; + pc_ci_.pNext = nullptr; + pc_ci_.flags = 0; + pc_ci_.initialDataSize = 0; + pc_ci_.pInitialData = nullptr; + } + + // Not called by default during init_info + void InitTesselationState() { + // TBD -- add shaders and create_info + } + + // TDB -- add control for optional and/or additional initialization + void InitInfo() { + InitDescriptorSetInfo(); + InitInputAndVertexInfo(); + InitMultisampleInfo(); + InitPipelineLayoutInfo(); + InitViewportInfo(); + InitDynamicStateInfo(); + InitShaderInfo(); + InitRasterizationInfo(); + InitBlendStateInfo(); + InitGraphicsPipelineInfo(); + InitPipelineCacheInfo(); + } + + void InitState() { + VkResult err; + descriptor_set_.reset(new OneOffDescriptorSet(layer_test_.DeviceObj(), dsl_bindings_)); + ASSERT_TRUE(descriptor_set_->Initialized()); + + const std::vector push_ranges( + pipeline_layout_ci_.pPushConstantRanges, + pipeline_layout_ci_.pPushConstantRanges + pipeline_layout_ci_.pushConstantRangeCount); + pipeline_layout_ = VkPipelineLayoutObj(layer_test_.DeviceObj(), {&descriptor_set_->layout_}, push_ranges); + + err = vkCreatePipelineCache(layer_test_.device(), &pc_ci_, NULL, &pipeline_cache_); + ASSERT_VK_SUCCESS(err); } - bool Initialized() { - return pool_ != VK_NULL_HANDLE && layout_ != VK_NULL_HANDLE && set_ != VK_NULL_HANDLE; + void LateBindPipelineInfo() { + // By value or dynamically located items must be late bound + gp_ci_.layout = pipeline_layout_.handle(); + gp_ci_.stageCount = shader_stages_.size(); + gp_ci_.pStages = shader_stages_.data(); + if ((gp_ci_.pTessellationState == nullptr) && IsValidVkStruct(tess_ci_)) { + gp_ci_.pTessellationState = &tess_ci_; + } + if ((gp_ci_.pDynamicState == nullptr) && IsValidVkStruct(dyn_state_ci_)) { + gp_ci_.pDynamicState = &dyn_state_ci_; + } + } + + VkResult CreateGraphicsPipeline(bool implicit_destroy = true, bool do_late_bind = true) { + VkResult err; + if (do_late_bind) { + LateBindPipelineInfo(); + } + if (implicit_destroy && (pipeline_ != VK_NULL_HANDLE)) { + vkDestroyPipeline(layer_test_.device(), pipeline_, nullptr); + pipeline_ = VK_NULL_HANDLE; + } + err = vkCreateGraphicsPipelines(layer_test_.device(), pipeline_cache_, 1, &gp_ci_, NULL, &pipeline_); + return err; + } + + // Helper function to create a simple test case (postive or negative) + // + // info_override can be any callable that takes a CreatePipelineHeper & + // flags, error can be any args accepted by "SetDesiredFailure". + template + static void OneshotTest(Test &test, OverrideFunc &info_override, const VkFlags flags, const std::vector &errors, + bool positive_test = false) { + CreatePipelineHelper helper(test); + helper.InitInfo(); + info_override(helper); + helper.InitState(); + + for (const auto &error : errors) test.Monitor()->SetDesiredFailureMsg(flags, error); + helper.CreateGraphicsPipeline(); + + if (positive_test) { + test.Monitor()->VerifyNotFound(); + } else { + test.Monitor()->VerifyFound(); + } + } + + template + static void OneshotTest(Test &test, OverrideFunc &info_override, const VkFlags flags, Error error, bool positive_test = false) { + OneshotTest(test, info_override, flags, std::vector(1, error), positive_test); + } +}; +namespace chain_util { +template +T Init(const void *pnext_in = nullptr) { + T pnext_obj = {}; + pnext_obj.sType = LvlTypeMap::kSType; + pnext_obj.pNext = pnext_in; + return pnext_obj; +} +class ExtensionChain { + const void *head_ = nullptr; + typedef std::function AddIfFunction; + AddIfFunction add_if_; + typedef std::vector List; + List *list_; + + public: + template + ExtensionChain(F &add_if, List *list) : add_if_(add_if), list_(list) {} + template + void Add(const char *name, T &obj) { + if (add_if_(name)) { + if (list_) { + list_->push_back(name); + } + obj.pNext = head_; + head_ = &obj; + } } + const void *Head() const { return head_; } }; +} // namespace chain_util + // ******************************************************************************************************************** // ******************************************************************************************************************** // ******************************************************************************************************************** // ******************************************************************************************************************** TEST_F(VkLayerTest, RequiredParameter) { - TEST_DESCRIPTION( - "Specify VK_NULL_HANDLE, NULL, and 0 for required handle, " - "pointer, array, and array count parameters"); + TEST_DESCRIPTION("Specify VK_NULL_HANDLE, NULL, and 0 for required handle, pointer, array, and array count parameters"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -921,14 +1244,14 @@ TEST_F(VkLayerTest, RequiredParameter) { vkGetPhysicalDeviceQueueFamilyProperties(gpu(), NULL, NULL); m_errorMonitor->VerifyFound(); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "parameter viewportCount must be greater than 0"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e030a1b); // Specify 0 for a required array count // Expected to trigger an error with parameter_validation::validate_array - VkViewport view_port = {}; - m_commandBuffer->SetViewport(0, 0, &view_port); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + m_commandBuffer->SetViewport(0, 0, &viewport); m_errorMonitor->VerifyFound(); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "required parameter pViewports specified as NULL"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e03fa01); // Specify NULL for a required array // Expected to trigger an error with parameter_validation::validate_array m_commandBuffer->SetViewport(0, 1, NULL); @@ -1040,9 +1363,7 @@ TEST_F(VkLayerTest, DebugMarkerNameTest) { } TEST_F(VkLayerTest, InvalidStructSType) { - TEST_DESCRIPTION( - "Specify an invalid VkStructureType for a Vulkan " - "structure's sType field"); + TEST_DESCRIPTION("Specify an invalid VkStructureType for a Vulkan structure's sType field"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -1102,9 +1423,7 @@ TEST_F(VkLayerTest, UnrecognizedValueOutOfRange) { ASSERT_NO_FATAL_FAILURE(Init()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "does not fall within the begin..end " - "range of the core VkFormat " - "enumeration tokens"); + "does not fall within the begin..end range of the core VkFormat enumeration tokens"); // Specify an invalid VkFormat value // Expected to trigger an error with // parameter_validation::validate_ranged_enum @@ -1157,23 +1476,11 @@ TEST_F(VkLayerTest, UnrecognizedValueBadBool) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT, "is neither VK_TRUE nor VK_FALSE"); // Specify an invalid VkBool32 value, expecting a warning with parameter_validation::validate_bool32 VkSampler sampler = VK_NULL_HANDLE; - VkSamplerCreateInfo sampler_info = {}; - sampler_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_info.pNext = NULL; - sampler_info.magFilter = VK_FILTER_NEAREST; - sampler_info.minFilter = VK_FILTER_NEAREST; - sampler_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; + VkSamplerCreateInfo sampler_info = SafeSaneSamplerCreateInfo(); sampler_info.addressModeU = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; sampler_info.addressModeV = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; sampler_info.addressModeW = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; - sampler_info.mipLodBias = 1.0; - sampler_info.maxAnisotropy = 1; - sampler_info.compareEnable = VK_FALSE; - sampler_info.compareOp = VK_COMPARE_OP_NEVER; - sampler_info.minLod = 1.0; - sampler_info.maxLod = 1.0; - sampler_info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_info.unnormalizedCoordinates = VK_FALSE; + // Not VK_TRUE or VK_FALSE sampler_info.anisotropyEnable = 3; vkCreateSampler(m_device->device(), &sampler_info, NULL, &sampler); @@ -1187,28 +1494,106 @@ TEST_F(VkLayerTest, MirrorClampToEdgeNotEnabled) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1260086e); VkSampler sampler = VK_NULL_HANDLE; - VkSamplerCreateInfo sampler_info = {}; - sampler_info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_info.pNext = NULL; - sampler_info.magFilter = VK_FILTER_NEAREST; - sampler_info.minFilter = VK_FILTER_NEAREST; - sampler_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; + VkSamplerCreateInfo sampler_info = SafeSaneSamplerCreateInfo(); + // Set the modes to cause the error sampler_info.addressModeU = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; sampler_info.addressModeV = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; sampler_info.addressModeW = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; - sampler_info.mipLodBias = 1.0; - sampler_info.maxAnisotropy = 1; - sampler_info.compareEnable = VK_FALSE; - sampler_info.compareOp = VK_COMPARE_OP_NEVER; - sampler_info.minLod = 1.0; - sampler_info.maxLod = 1.0; - sampler_info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_info.unnormalizedCoordinates = VK_FALSE; - sampler_info.anisotropyEnable = VK_FALSE; + vkCreateSampler(m_device->device(), &sampler_info, NULL, &sampler); m_errorMonitor->VerifyFound(); } +TEST_F(VkLayerTest, AnisotropyFeatureDisabled) { + TEST_DESCRIPTION("Validation should check anisotropy parameters are correct with samplerAnisotropy disabled."); + + // Determine if required device features are available + VkPhysicalDeviceFeatures device_features = {}; + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + ASSERT_NO_FATAL_FAILURE(GetPhysicalDeviceFeatures(&device_features)); + device_features.samplerAnisotropy = VK_FALSE; // force anisotropy off + ASSERT_NO_FATAL_FAILURE(InitState(&device_features)); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1260085c); + VkSamplerCreateInfo sampler_info = SafeSaneSamplerCreateInfo(); + // With the samplerAnisotropy disable, the sampler must not enable it. + sampler_info.anisotropyEnable = VK_TRUE; + VkSampler sampler = VK_NULL_HANDLE; + + VkResult err; + err = vkCreateSampler(m_device->device(), &sampler_info, NULL, &sampler); + m_errorMonitor->VerifyFound(); + if (VK_SUCCESS == err) { + vkDestroySampler(m_device->device(), sampler, NULL); + } + sampler = VK_NULL_HANDLE; +} + +TEST_F(VkLayerTest, AnisotropyFeatureEnabled) { + TEST_DESCRIPTION("Validation must check several conditons that apply only when Anisotropy is enabled."); + + // Determine if required device features are available + VkPhysicalDeviceFeatures device_features = {}; + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + ASSERT_NO_FATAL_FAILURE(GetPhysicalDeviceFeatures(&device_features)); + + // These tests require that the device support sparse residency for 2D images + if (VK_TRUE != device_features.samplerAnisotropy) { + printf(" Test requires unsupported samplerAnisotropy feature. Skipped.\n"); + return; + } + + bool cubic_support = false; + if (DeviceExtensionSupported(gpu(), nullptr, "VK_IMG_filter_cubic")) { + m_device_extension_names.push_back("VK_IMG_filter_cubic"); + cubic_support = true; + } + + VkSamplerCreateInfo sampler_info_ref = SafeSaneSamplerCreateInfo(); + sampler_info_ref.anisotropyEnable = VK_TRUE; + VkSamplerCreateInfo sampler_info = sampler_info_ref; + ASSERT_NO_FATAL_FAILURE(InitState()); + + auto do_test = [this](UNIQUE_VALIDATION_ERROR_CODE code, const VkSamplerCreateInfo *pCreateInfo) -> void { + VkResult err; + VkSampler sampler = VK_NULL_HANDLE; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, code); + err = vkCreateSampler(m_device->device(), pCreateInfo, NULL, &sampler); + m_errorMonitor->VerifyFound(); + if (VK_SUCCESS == err) { + vkDestroySampler(m_device->device(), sampler, NULL); + } + }; + + // maxAnisotropy out-of-bounds low. + sampler_info.maxAnisotropy = NearestSmaller(1.0F); + do_test(VALIDATION_ERROR_1260085e, &sampler_info); + sampler_info.maxAnisotropy = sampler_info_ref.maxAnisotropy; + + // maxAnisotropy out-of-bounds high. + sampler_info.maxAnisotropy = NearestGreater(m_device->phy().properties().limits.maxSamplerAnisotropy); + do_test(VALIDATION_ERROR_1260085e, &sampler_info); + sampler_info.maxAnisotropy = sampler_info_ref.maxAnisotropy; + + // Both anisotropy and unnormalized coords enabled + sampler_info.unnormalizedCoordinates = VK_TRUE; + do_test(VALIDATION_ERROR_12600868, &sampler_info); + sampler_info.unnormalizedCoordinates = sampler_info_ref.unnormalizedCoordinates; + + // Both anisotropy and cubic filtering enabled + if (cubic_support) { + sampler_info.minFilter = VK_FILTER_CUBIC_IMG; + do_test(VALIDATION_ERROR_12600872, &sampler_info); + sampler_info.minFilter = sampler_info_ref.minFilter; + + sampler_info.magFilter = VK_FILTER_CUBIC_IMG; + do_test(VALIDATION_ERROR_12600872, &sampler_info); + sampler_info.magFilter = sampler_info_ref.magFilter; + } else { + printf(" Test requires unsupported extension \"VK_IMG_filter_cubic\". Skipped.\n"); + } +} + TEST_F(VkLayerTest, UnrecognizedValueMaxEnum) { ASSERT_NO_FATAL_FAILURE(Init()); @@ -1243,13 +1628,13 @@ TEST_F(VkLayerTest, UpdateBufferAlignment) { // Introduce failure by using dataSize that is < 0 m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "must be greater than zero and less than or equal to 65536"); - m_commandBuffer->UpdateBuffer(buffer.handle(), 0, -44, updateData); + m_commandBuffer->UpdateBuffer(buffer.handle(), 0, (VkDeviceSize)-44, updateData); m_errorMonitor->VerifyFound(); // Introduce failure by using dataSize that is > 65536 m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "must be greater than zero and less than or equal to 65536"); - m_commandBuffer->UpdateBuffer(buffer.handle(), 0, 80000, updateData); + m_commandBuffer->UpdateBuffer(buffer.handle(), 0, (VkDeviceSize)80000, updateData); m_errorMonitor->VerifyFound(); m_commandBuffer->end(); @@ -1285,11 +1670,7 @@ TEST_F(VkLayerTest, FillBufferAlignment) { } TEST_F(VkLayerTest, PSOPolygonModeInvalid) { - VkResult err; - - TEST_DESCRIPTION( - "Attempt to use a non-solid polygon fill mode in a " - "pipeline when this feature is not enabled."); + TEST_DESCRIPTION("Attempt to use a non-solid polygon fill mode in a pipeline when this feature is not enabled."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -1303,14 +1684,7 @@ TEST_F(VkLayerTest, PSOPolygonModeInvalid) { VkRenderpassObj render_pass(&test_device); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 0; - pipeline_layout_ci.pSetLayouts = NULL; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(test_device.device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(&test_device); VkPipelineRasterizationStateCreateInfo rs_ci = {}; rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; @@ -1328,11 +1702,11 @@ TEST_F(VkLayerTest, PSOPolygonModeInvalid) { VkPipelineObj pipe(&test_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); // Introduce failure by setting unsupported polygon mode rs_ci.polygonMode = VK_POLYGON_MODE_POINT; pipe.SetRasterization(&rs_ci); - pipe.CreateVKPipeline(pipeline_layout, render_pass.handle()); + pipe.CreateVKPipeline(pipeline_layout.handle(), render_pass.handle()); } m_errorMonitor->VerifyFound(); @@ -1343,15 +1717,13 @@ TEST_F(VkLayerTest, PSOPolygonModeInvalid) { VkPipelineObj pipe(&test_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); // Introduce failure by setting unsupported polygon mode rs_ci.polygonMode = VK_POLYGON_MODE_LINE; pipe.SetRasterization(&rs_ci); - pipe.CreateVKPipeline(pipeline_layout, render_pass.handle()); + pipe.CreateVKPipeline(pipeline_layout.handle(), render_pass.handle()); } m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(test_device.device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, SparseBindingImageBufferCreate) { @@ -1557,8 +1929,7 @@ TEST_F(VkLayerTest, SparseResidencyImageCreateUnsupportedSamples) { TEST_F(VkLayerTest, InvalidMemoryAliasing) { TEST_DESCRIPTION( - "Create a buffer and image, allocate memory, and bind the " - "buffer and image to memory such that they will alias."); + "Create a buffer and image, allocate memory, and bind the buffer and image to memory such that they will alias."); VkResult err; bool pass; ASSERT_NO_FATAL_FAILURE(Init()); @@ -1921,8 +2292,7 @@ TEST_F(VkLayerTest, SubmitSignaledFence) { vk_testing::Fence testFence; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "submitted in SIGNALED state. Fences " - "must be reset before being submitted"); + "submitted in SIGNALED state. Fences must be reset before being submitted"); VkFenceCreateInfo fenceInfo = {}; fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; @@ -1934,7 +2304,7 @@ TEST_F(VkLayerTest, SubmitSignaledFence) { ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); m_commandBuffer->begin(); - m_commandBuffer->ClearAllBuffers(m_clear_color, m_depth_clear_color, m_stencil_clear_color, NULL); + m_commandBuffer->ClearAllBuffers(m_renderTargets, m_clear_color, nullptr, m_depth_clear_color, m_stencil_clear_color); m_commandBuffer->end(); testFence.init(*m_device, fenceInfo); @@ -1958,10 +2328,8 @@ TEST_F(VkLayerTest, SubmitSignaledFence) { TEST_F(VkLayerTest, InvalidUsageBits) { TEST_DESCRIPTION( - "Specify wrong usage for image then create conflicting view of image " - "Initialize buffer with wrong usage then perform copy expecting errors " - "from both the image and the buffer (2 calls)"); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Invalid usage flag for Image "); + "Specify wrong usage for image then create conflicting view of image Initialize buffer with wrong usage then perform copy " + "expecting errors from both the image and the buffer (2 calls)"); ASSERT_NO_FATAL_FAILURE(Init()); auto format = FindSupportedDepthStencilFormat(gpu()); @@ -1971,8 +2339,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) { } VkImageObj image(m_device); - // Initialize image with USAGE_TRANSIENT_ATTACHMENT - image.Init(128, 128, 1, format, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); + // Initialize image with transfer source usage + image.Init(128, 128, 1, format, VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(image.initialized()); VkImageView dsv; @@ -1987,8 +2355,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) { dsvci.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; // Create a view with depth / stencil aspect for image with different usage + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Invalid usage flag for Image "); vkCreateImageView(m_device->device(), &dsvci, NULL, &dsv); - m_errorMonitor->VerifyFound(); // Initialize buffer with TRANSFER_DST usage @@ -2008,8 +2376,8 @@ TEST_F(VkLayerTest, InvalidUsageBits) { m_commandBuffer->begin(); // two separate errors from this call: - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Image should have VK_IMAGE_USAGE_TRANSFER_DST_BIT"); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Buffer should have VK_BUFFER_USAGE_TRANSFER_SRC_BIT"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18e00162); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18e0015c); vkCmdCopyBufferToImage(m_commandBuffer->handle(), buffer.handle(), image.handle(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); @@ -2029,20 +2397,7 @@ TEST_F(VkLayerTest, LeakAnObject) { ASSERT_NO_FATAL_FAILURE(Init()); - const std::vector queue_props = m_device->queue_props; - std::vector queue_info; - queue_info.reserve(queue_props.size()); - std::vector> queue_priorities; - for (uint32_t i = 0; i < (uint32_t)queue_props.size(); i++) { - VkDeviceQueueCreateInfo qi = {}; - qi.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - qi.pNext = NULL; - qi.queueFamilyIndex = i; - qi.queueCount = queue_props[i].queueCount; - queue_priorities.emplace_back(qi.queueCount, 0.0f); - qi.pQueuePriorities = queue_priorities[i].data(); - queue_info.push_back(qi); - } + vk_testing::QueueCreateInfoArray queue_info(m_device->queue_props); // The sacrificial device object VkDevice testDevice; @@ -2072,9 +2427,7 @@ TEST_F(VkLayerTest, LeakAnObject) { } TEST_F(VkLayerTest, InvalidCommandPoolConsistency) { - TEST_DESCRIPTION( - "Allocate command buffers from one command pool and " - "attempt to delete them from another."); + TEST_DESCRIPTION("Allocate command buffers from one command pool and attempt to delete them from another."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "FreeCommandBuffers is attempting to free Command Buffer"); @@ -2110,9 +2463,7 @@ TEST_F(VkLayerTest, InvalidCommandPoolConsistency) { TEST_F(VkLayerTest, InvalidDescriptorPoolConsistency) { VkResult err; - TEST_DESCRIPTION( - "Allocate descriptor sets from one DS pool and " - "attempt to delete them from another."); + TEST_DESCRIPTION("Allocate descriptor sets from one DS pool and attempt to delete them from another."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "FreeDescriptorSets is attempting to free descriptorSet"); @@ -2135,9 +2486,9 @@ TEST_F(VkLayerTest, InvalidDescriptorPoolConsistency) { err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &bad_pool); ASSERT_VK_SUCCESS(err); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); err = vkFreeDescriptorSets(m_device->device(), bad_pool, 1, &ds.set_); @@ -2165,8 +2516,8 @@ TEST_F(VkLayerTest, CreateUnknownObject) { TEST_F(VkLayerTest, UseObjectWithWrongDevice) { TEST_DESCRIPTION( - "Try to destroy a render pass object using a device other than the one it was created on. " - "This should generate a distinct error from the invalid handle error."); + "Try to destroy a render pass object using a device other than the one it was created on. This should generate a distinct " + "error from the invalid handle error."); // Create first device and renderpass ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -2221,9 +2572,7 @@ TEST_F(VkLayerTest, PipelineNotBound) { TEST_F(VkLayerTest, BindImageInvalidMemoryType) { VkResult err; - TEST_DESCRIPTION( - "Test validation check for an invalid memory type index " - "during bind[Buffer|Image]Memory time"); + TEST_DESCRIPTION("Test validation check for an invalid memory type index during bind[Buffer|Image]Memory time"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -2711,12 +3060,7 @@ TEST_F(VkLayerTest, ExceedMemoryAllocationCount) { const int max_mems = 32; VkDeviceMemory mems[max_mems + 1]; - if (InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { - m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); - } else { - printf(" Did not find VK_LAYER_LUNARG_device_profile_api layer; skipped.\n"); - return; - } + if (!EnableDeviceProfileLayer()) return; ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); @@ -2798,7 +3142,7 @@ TEST_F(VkLayerTest, CreatePipelineBadVertexAttributeFormat) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -2846,23 +3190,25 @@ TEST_F(VkLayerTest, ImageSampleCounts) { blit_region.dstOffsets[0] = {0, 0, 0}; blit_region.dstOffsets[1] = {128, 128, 1}; - // Create two images, the source with sampleCount = 2, and attempt to blit + // Create two images, the source with sampleCount = 4, and attempt to blit // between them { - image_create_info.samples = VK_SAMPLE_COUNT_2_BIT; + image_create_info.samples = VK_SAMPLE_COUNT_4_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; - vk_testing::Image src_image; - src_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + VkImageObj src_image(m_device); + src_image.init(&image_create_info); + src_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; - vk_testing::Image dst_image; - dst_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + VkImageObj dst_image(m_device); + dst_image.init(&image_create_info); + dst_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); m_commandBuffer->begin(); // TODO: These 2 VUs are redundant - expect one of them to go away m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001d2); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001c8); - vkCmdBlitImage(m_commandBuffer->handle(), src_image.handle(), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, dst_image.handle(), - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, 1, &blit_region, VK_FILTER_NEAREST); + vkCmdBlitImage(m_commandBuffer->handle(), src_image.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dst_image.handle(), + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit_region, VK_FILTER_NEAREST); m_errorMonitor->VerifyFound(); m_commandBuffer->end(); } @@ -2872,18 +3218,20 @@ TEST_F(VkLayerTest, ImageSampleCounts) { { image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; - vk_testing::Image src_image; - src_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + VkImageObj src_image(m_device); + src_image.init(&image_create_info); + src_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); image_create_info.samples = VK_SAMPLE_COUNT_4_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; - vk_testing::Image dst_image; - dst_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + VkImageObj dst_image(m_device); + dst_image.init(&image_create_info); + dst_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); m_commandBuffer->begin(); // TODO: These 2 VUs are redundant - expect one of them to go away m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001d4); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001c8); - vkCmdBlitImage(m_commandBuffer->handle(), src_image.handle(), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, dst_image.handle(), - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, 1, &blit_region, VK_FILTER_NEAREST); + vkCmdBlitImage(m_commandBuffer->handle(), src_image.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dst_image.handle(), + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit_region, VK_FILTER_NEAREST); m_errorMonitor->VerifyFound(); m_commandBuffer->end(); } @@ -2902,33 +3250,34 @@ TEST_F(VkLayerTest, ImageSampleCounts) { { vk_testing::Buffer src_buffer; src_buffer.init_as_src(*m_device, 128 * 128 * 4, reqs); - image_create_info.samples = VK_SAMPLE_COUNT_8_BIT; + image_create_info.samples = VK_SAMPLE_COUNT_4_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; - vk_testing::Image dst_image; - dst_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + VkImageObj dst_image(m_device); + dst_image.init(&image_create_info); + dst_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); m_commandBuffer->begin(); m_errorMonitor->SetDesiredFailureMsg( VK_DEBUG_REPORT_ERROR_BIT_EXT, - "was created with a sample count of VK_SAMPLE_COUNT_8_BIT but must be VK_SAMPLE_COUNT_1_BIT"); + "was created with a sample count of VK_SAMPLE_COUNT_4_BIT but must be VK_SAMPLE_COUNT_1_BIT"); vkCmdCopyBufferToImage(m_commandBuffer->handle(), src_buffer.handle(), dst_image.handle(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ©_region); m_errorMonitor->VerifyFound(); m_commandBuffer->end(); } - // Create dst buffer and src image with sampleCount = 2 and attempt to copy + // Create dst buffer and src image with sampleCount = 4 and attempt to copy // image to buffer { vk_testing::Buffer dst_buffer; dst_buffer.init_as_dst(*m_device, 128 * 128 * 4, reqs); - image_create_info.samples = VK_SAMPLE_COUNT_2_BIT; + image_create_info.samples = VK_SAMPLE_COUNT_4_BIT; image_create_info.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; vk_testing::Image src_image; src_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); m_commandBuffer->begin(); m_errorMonitor->SetDesiredFailureMsg( VK_DEBUG_REPORT_ERROR_BIT_EXT, - "was created with a sample count of VK_SAMPLE_COUNT_2_BIT but must be VK_SAMPLE_COUNT_1_BIT"); + "was created with a sample count of VK_SAMPLE_COUNT_4_BIT but must be VK_SAMPLE_COUNT_1_BIT"); vkCmdCopyImageToBuffer(m_commandBuffer->handle(), src_image.handle(), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dst_buffer.handle(), 1, ©_region); m_errorMonitor->VerifyFound(); @@ -2955,36 +3304,44 @@ TEST_F(VkLayerTest, BlitImageFormatTypes) { } // Note any missing feature bits - bool usrc = !ImageFeatureIsSupported(gpu(), f_unsigned, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); - bool udst = !ImageFeatureIsSupported(gpu(), f_unsigned, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); - bool ssrc = !ImageFeatureIsSupported(gpu(), f_signed, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); - bool sdst = !ImageFeatureIsSupported(gpu(), f_signed, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); - bool fsrc = !ImageFeatureIsSupported(gpu(), f_float, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); - bool fdst = !ImageFeatureIsSupported(gpu(), f_float, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); - bool d1dst = !ImageFeatureIsSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); - bool d2src = !ImageFeatureIsSupported(gpu(), f_depth2, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); + bool usrc = !ImageFormatAndFeaturesSupported(gpu(), f_unsigned, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); + bool udst = !ImageFormatAndFeaturesSupported(gpu(), f_unsigned, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); + bool ssrc = !ImageFormatAndFeaturesSupported(gpu(), f_signed, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); + bool sdst = !ImageFormatAndFeaturesSupported(gpu(), f_signed, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); + bool fsrc = !ImageFormatAndFeaturesSupported(gpu(), f_float, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); + bool fdst = !ImageFormatAndFeaturesSupported(gpu(), f_float, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); + bool d1dst = !ImageFormatAndFeaturesSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT); + bool d2src = !ImageFormatAndFeaturesSupported(gpu(), f_depth2, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT); VkImageObj unsigned_image(m_device); unsigned_image.Init(64, 64, 1, f_unsigned, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(unsigned_image.initialized()); + unsigned_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); + VkImageObj signed_image(m_device); signed_image.Init(64, 64, 1, f_signed, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(signed_image.initialized()); + signed_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); + VkImageObj float_image(m_device); float_image.Init(64, 64, 1, f_float, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(float_image.initialized()); + float_image.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); VkImageObj depth_image(m_device); depth_image.Init(64, 64, 1, f_depth, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(depth_image.initialized()); + depth_image.SetLayout(VK_IMAGE_ASPECT_STENCIL_BIT | VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_LAYOUT_GENERAL); + VkImageObj depth_image2(m_device); depth_image2.Init(64, 64, 1, f_depth2, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(depth_image2.initialized()); + depth_image2.SetLayout(VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_LAYOUT_GENERAL); VkImageBlit blitRegion = {}; blitRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; @@ -3081,6 +3438,8 @@ TEST_F(VkLayerTest, BlitImageFilters) { dst2D.Init(64, 64, 1, fmt, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(src2D.initialized()); ASSERT_TRUE(dst2D.initialized()); + src2D.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); + dst2D.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); // Create 3D image VkImageCreateInfo ci; @@ -3121,15 +3480,15 @@ TEST_F(VkLayerTest, BlitImageFilters) { m_commandBuffer->begin(); // UINT format should not support linear filtering, but check to be sure - if (!ImageFeatureIsSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT)) { + if (!ImageFormatAndFeaturesSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT)) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001d6); vkCmdBlitImage(m_commandBuffer->handle(), src2D.image(), src2D.Layout(), dst2D.image(), dst2D.Layout(), 1, &blitRegion, VK_FILTER_LINEAR); m_errorMonitor->VerifyFound(); } - if (cubic_support && - !ImageFeatureIsSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG)) { + if (cubic_support && !ImageFormatAndFeaturesSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG)) { // Invalid filter CUBIC_IMG m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001d8); vkCmdBlitImage(m_commandBuffer->handle(), src3D.image(), src3D.Layout(), dst2D.image(), dst2D.Layout(), 1, &blitRegion, @@ -3147,48 +3506,44 @@ TEST_F(VkLayerTest, BlitImageFilters) { m_commandBuffer->end(); } -TEST_F(VkLayerTest, BlitImageOffsets) { - ASSERT_NO_FATAL_FAILURE(Init()); - - VkFormat fmt = VK_FORMAT_R8G8B8A8_UNORM; - if (!ImageFeatureIsSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, - VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT)) { - printf(" No blit feature bits - BlitImageOffsets skipped.\n"); - return; - } +TEST_F(VkLayerTest, BlitImageLayout) { + TEST_DESCRIPTION("Incorrect vkCmdBlitImage layouts"); - VkImageCreateInfo ci; - ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - ci.pNext = NULL; - ci.flags = 0; - ci.imageType = VK_IMAGE_TYPE_1D; - ci.format = fmt; - ci.extent = {64, 1, 1}; - ci.mipLevels = 1; - ci.arrayLayers = 1; - ci.samples = VK_SAMPLE_COUNT_1_BIT; - ci.tiling = VK_IMAGE_TILING_OPTIMAL; - ci.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; - ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - ci.queueFamilyIndexCount = 0; - ci.pQueueFamilyIndices = NULL; - ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + ASSERT_NO_FATAL_FAILURE(Init(nullptr, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)); - VkImageObj image_1D(m_device); - image_1D.init(&ci); - ASSERT_TRUE(image_1D.initialized()); + VkResult err; + VkFormat fmt = VK_FORMAT_R8G8B8A8_UNORM; - ci.imageType = VK_IMAGE_TYPE_2D; - ci.extent = {64, 64, 1}; - VkImageObj image_2D(m_device); - image_2D.init(&ci); - ASSERT_TRUE(image_2D.initialized()); + VkSubmitInfo submit_info = {}; + submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submit_info.commandBufferCount = 1; + submit_info.pCommandBuffers = &m_commandBuffer->handle(); - ci.imageType = VK_IMAGE_TYPE_3D; - ci.extent = {64, 64, 64}; - VkImageObj image_3D(m_device); - image_3D.init(&ci); - ASSERT_TRUE(image_3D.initialized()); + // Create images + VkImageObj img_src_transfer(m_device); + VkImageObj img_dst_transfer(m_device); + VkImageObj img_general(m_device); + VkImageObj img_color(m_device); + + img_src_transfer.InitNoLayout(64, 64, 1, fmt, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + VK_IMAGE_TILING_OPTIMAL, 0); + img_dst_transfer.InitNoLayout(64, 64, 1, fmt, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + VK_IMAGE_TILING_OPTIMAL, 0); + img_general.InitNoLayout(64, 64, 1, fmt, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + VK_IMAGE_TILING_OPTIMAL, 0); + img_color.InitNoLayout(64, 64, 1, fmt, + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, + VK_IMAGE_TILING_OPTIMAL, 0); + + ASSERT_TRUE(img_src_transfer.initialized()); + ASSERT_TRUE(img_dst_transfer.initialized()); + ASSERT_TRUE(img_general.initialized()); + ASSERT_TRUE(img_color.initialized()); + + img_src_transfer.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); + img_dst_transfer.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); + img_general.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); + img_color.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL); VkImageBlit blit_region = {}; blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; @@ -3199,27 +3554,193 @@ TEST_F(VkLayerTest, BlitImageOffsets) { blit_region.dstSubresource.baseArrayLayer = 0; blit_region.dstSubresource.layerCount = 1; blit_region.dstSubresource.mipLevel = 0; + blit_region.srcOffsets[0] = {0, 0, 0}; + blit_region.srcOffsets[1] = {48, 48, 1}; + blit_region.dstOffsets[0] = {0, 0, 0}; + blit_region.dstOffsets[1] = {64, 64, 1}; m_commandBuffer->begin(); - // 1D, with src/dest y offsets other than (0,1) - blit_region.srcOffsets[0] = {0, 1, 0}; - blit_region.srcOffsets[1] = {30, 1, 1}; - blit_region.dstOffsets[0] = {32, 0, 0}; - blit_region.dstOffsets[1] = {64, 1, 1}; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09a001ea); - vkCmdBlitImage(m_commandBuffer->handle(), image_1D.image(), image_1D.Layout(), image_1D.image(), image_1D.Layout(), 1, - &blit_region, VK_FILTER_NEAREST); + // Illegal srcImageLayout + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001bc); + vkCmdBlitImage(m_commandBuffer->handle(), img_src_transfer.image(), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + img_dst_transfer.image(), img_dst_transfer.Layout(), 1, &blit_region, VK_FILTER_LINEAR); m_errorMonitor->VerifyFound(); - blit_region.srcOffsets[0] = {0, 0, 0}; - blit_region.dstOffsets[0] = {32, 1, 0}; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09a001f4); - vkCmdBlitImage(m_commandBuffer->handle(), image_1D.image(), image_1D.Layout(), image_1D.image(), image_1D.Layout(), 1, - &blit_region, VK_FILTER_NEAREST); + // Illegal destImageLayout + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_184001c6); + vkCmdBlitImage(m_commandBuffer->handle(), img_src_transfer.image(), img_src_transfer.Layout(), img_dst_transfer.image(), + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, 1, &blit_region, VK_FILTER_LINEAR); + + m_commandBuffer->end(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); m_errorMonitor->VerifyFound(); - // 2D, with src/dest z offsets other than (0,1) + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + + m_commandBuffer->reset(0); + m_commandBuffer->begin(); + + // Source image in invalid layout at start of the CB + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, "layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL when first use is VK_IMAGE_LAYOUT_GENERAL"); + vkCmdBlitImage(m_commandBuffer->handle(), img_src_transfer.image(), img_src_transfer.Layout(), img_color.image(), + VK_IMAGE_LAYOUT_GENERAL, 1, &blit_region, VK_FILTER_LINEAR); + + m_commandBuffer->end(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + + m_commandBuffer->reset(0); + m_commandBuffer->begin(); + + // Destination image in invalid layout at start of the CB + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, "layout VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL when first use is VK_IMAGE_LAYOUT_GENERAL"); + vkCmdBlitImage(m_commandBuffer->handle(), img_color.image(), VK_IMAGE_LAYOUT_GENERAL, img_dst_transfer.image(), + img_dst_transfer.Layout(), 1, &blit_region, VK_FILTER_LINEAR); + + m_commandBuffer->end(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + + // Source image in invalid layout in the middle of CB + m_commandBuffer->reset(0); + m_commandBuffer->begin(); + + VkImageMemoryBarrier img_barrier = {}; + img_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; + img_barrier.pNext = nullptr; + img_barrier.srcAccessMask = 0; + img_barrier.dstAccessMask = 0; + img_barrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL; + img_barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + img_barrier.image = img_general.handle(); + img_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + img_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + img_barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + img_barrier.subresourceRange.baseArrayLayer = 0; + img_barrier.subresourceRange.baseMipLevel = 0; + img_barrier.subresourceRange.layerCount = 1; + img_barrier.subresourceRange.levelCount = 1; + + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "layout VK_IMAGE_LAYOUT_GENERAL that doesn't match the actual current layout VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL"); + vkCmdBlitImage(m_commandBuffer->handle(), img_general.image(), VK_IMAGE_LAYOUT_GENERAL, img_dst_transfer.image(), + img_dst_transfer.Layout(), 1, &blit_region, VK_FILTER_LINEAR); + + m_commandBuffer->end(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + + // Destination image in invalid layout in the middle of CB + m_commandBuffer->reset(0); + m_commandBuffer->begin(); + + img_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + img_barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; + img_barrier.image = img_dst_transfer.handle(); + + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + "layout VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL that doesn't match the actual current layout " + "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL"); + vkCmdBlitImage(m_commandBuffer->handle(), img_src_transfer.image(), img_src_transfer.Layout(), img_dst_transfer.image(), + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blit_region, VK_FILTER_LINEAR); + + m_commandBuffer->end(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); +} + +TEST_F(VkLayerTest, BlitImageOffsets) { + ASSERT_NO_FATAL_FAILURE(Init()); + + VkFormat fmt = VK_FORMAT_R8G8B8A8_UNORM; + if (!ImageFormatAndFeaturesSupported(gpu(), fmt, VK_IMAGE_TILING_OPTIMAL, + VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT)) { + printf(" No blit feature bits - BlitImageOffsets skipped.\n"); + return; + } + + VkImageCreateInfo ci; + ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + ci.pNext = NULL; + ci.flags = 0; + ci.imageType = VK_IMAGE_TYPE_1D; + ci.format = fmt; + ci.extent = {64, 1, 1}; + ci.mipLevels = 1; + ci.arrayLayers = 1; + ci.samples = VK_SAMPLE_COUNT_1_BIT; + ci.tiling = VK_IMAGE_TILING_OPTIMAL; + ci.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; + ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + ci.queueFamilyIndexCount = 0; + ci.pQueueFamilyIndices = NULL; + ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + + VkImageObj image_1D(m_device); + image_1D.init(&ci); + ASSERT_TRUE(image_1D.initialized()); + + ci.imageType = VK_IMAGE_TYPE_2D; + ci.extent = {64, 64, 1}; + VkImageObj image_2D(m_device); + image_2D.init(&ci); + ASSERT_TRUE(image_2D.initialized()); + + ci.imageType = VK_IMAGE_TYPE_3D; + ci.extent = {64, 64, 64}; + VkImageObj image_3D(m_device); + image_3D.init(&ci); + ASSERT_TRUE(image_3D.initialized()); + + VkImageBlit blit_region = {}; + blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + blit_region.srcSubresource.baseArrayLayer = 0; + blit_region.srcSubresource.layerCount = 1; + blit_region.srcSubresource.mipLevel = 0; + blit_region.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + blit_region.dstSubresource.baseArrayLayer = 0; + blit_region.dstSubresource.layerCount = 1; + blit_region.dstSubresource.mipLevel = 0; + + m_commandBuffer->begin(); + + // 1D, with src/dest y offsets other than (0,1) + blit_region.srcOffsets[0] = {0, 1, 0}; + blit_region.srcOffsets[1] = {30, 1, 1}; + blit_region.dstOffsets[0] = {32, 0, 0}; + blit_region.dstOffsets[1] = {64, 1, 1}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09a001ea); + vkCmdBlitImage(m_commandBuffer->handle(), image_1D.image(), image_1D.Layout(), image_1D.image(), image_1D.Layout(), 1, + &blit_region, VK_FILTER_NEAREST); + m_errorMonitor->VerifyFound(); + + blit_region.srcOffsets[0] = {0, 0, 0}; + blit_region.dstOffsets[0] = {32, 1, 0}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09a001f4); + vkCmdBlitImage(m_commandBuffer->handle(), image_1D.image(), image_1D.Layout(), image_1D.image(), image_1D.Layout(), 1, + &blit_region, VK_FILTER_NEAREST); + m_errorMonitor->VerifyFound(); + + // 2D, with src/dest z offsets other than (0,1) blit_region.srcOffsets[0] = {0, 0, 1}; blit_region.srcOffsets[1] = {24, 31, 1}; blit_region.dstOffsets[0] = {32, 32, 0}; @@ -3297,10 +3818,10 @@ TEST_F(VkLayerTest, MiscBlitImageTests) { VkFormat f_color = VK_FORMAT_R32_SFLOAT; // Need features ..BLIT_SRC_BIT & ..BLIT_DST_BIT VkFormat f_depth = VK_FORMAT_D32_SFLOAT; // Need feature ..BLIT_SRC_BIT but not ..BLIT_DST_BIT - if (!ImageFeatureIsSupported(gpu(), f_color, VK_IMAGE_TILING_OPTIMAL, - VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT) || - !ImageFeatureIsSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT) || - ImageFeatureIsSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT)) { + if (!ImageFormatAndFeaturesSupported(gpu(), f_color, VK_IMAGE_TILING_OPTIMAL, + VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT) || + !ImageFormatAndFeaturesSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_SRC_BIT) || + ImageFormatAndFeaturesSupported(gpu(), f_depth, VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_BLIT_DST_BIT)) { printf(" Requested format features unavailable - MiscBlitImageTests skipped.\n"); return; } @@ -3534,27 +4055,6 @@ TEST_F(VkLayerTest, DSImageTransferGranularityTests) { region.imageOffset.y = 0; region.imageOffset.z = 0; - // Introduce failure by setting bufferRowLength to a bad granularity value - region.bufferRowLength = 3; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "queue family image transfer granularity"); - vkCmdCopyBufferToImage(m_commandBuffer->handle(), buffer.handle(), srcImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); - m_errorMonitor->VerifyFound(); - region.bufferRowLength = 128; - - // Introduce failure by setting bufferOffset to a bad granularity value - region.bufferOffset = 3; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "queue family image transfer granularity"); - vkCmdCopyImageToBuffer(m_commandBuffer->handle(), srcImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, buffer.handle(), 1, ®ion); - m_errorMonitor->VerifyFound(); - region.bufferOffset = 0; - - // Introduce failure by setting bufferImageHeight to a bad granularity value - region.bufferImageHeight = 3; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "queue family image transfer granularity"); - vkCmdCopyImageToBuffer(m_commandBuffer->handle(), srcImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, buffer.handle(), 1, ®ion); - m_errorMonitor->VerifyFound(); - region.bufferImageHeight = 128; - // Introduce failure by setting imageExtent to a bad granularity value region.imageExtent.width = 3; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "queue family image transfer granularity"); @@ -3578,36 +4078,42 @@ TEST_F(VkLayerTest, DSImageTransferGranularityTests) { TEST_F(VkLayerTest, MismatchedQueueFamiliesOnSubmit) { TEST_DESCRIPTION( - "Submit command buffer created using one queue family and " - "attempt to submit them on a queue created in a different " - "queue family."); + "Submit command buffer created using one queue family and attempt to submit them on a queue created in a different queue " + "family."); - ASSERT_NO_FATAL_FAILURE(Init()); + ASSERT_NO_FATAL_FAILURE(Init()); // assumes it initializes all queue families on vkCreateDevice // This test is meaningless unless we have multiple queue families auto queue_family_properties = m_device->phy().queue_properties(); - if (queue_family_properties.size() < 2) { + std::vector queue_families; + for (uint32_t i = 0; i < queue_family_properties.size(); ++i) + if (queue_family_properties[i].queueCount > 0) queue_families.push_back(i); + + if (queue_families.size() < 2) { + printf(" Device only has one queue family; skipped.\n"); return; } - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " is being submitted on queue "); - // Get safe index of another queue family - uint32_t other_queue_family = (m_device->graphics_queue_node_index_ == 0) ? 1 : 0; + + const uint32_t queue_family = queue_families[0]; + + const uint32_t other_queue_family = queue_families[1]; VkQueue other_queue; vkGetDeviceQueue(m_device->device(), other_queue_family, 0, &other_queue); - // Record an empty cmd buffer - VkCommandBufferBeginInfo cmdBufBeginDesc = {}; - cmdBufBeginDesc.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - vkBeginCommandBuffer(m_commandBuffer->handle(), &cmdBufBeginDesc); - vkEndCommandBuffer(m_commandBuffer->handle()); + VkCommandPoolObj cmd_pool(m_device, queue_family); + VkCommandBufferObj cmd_buff(m_device, &cmd_pool); - // And submit on the wrong queue + cmd_buff.begin(); + cmd_buff.end(); + + // Submit on the wrong queue VkSubmitInfo submit_info = {}; submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &m_commandBuffer->handle(); - vkQueueSubmit(other_queue, 1, &submit_info, VK_NULL_HANDLE); + submit_info.pCommandBuffers = &cmd_buff.handle(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_31a00094); + vkQueueSubmit(other_queue, 1, &submit_info, VK_NULL_HANDLE); m_errorMonitor->VerifyFound(); } @@ -3676,21 +4182,18 @@ TEST_F(VkLayerTest, RenderPassPipelineSubpassMismatch) { VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); - VkViewport view_port = {}; - m_viewports.push_back(view_port); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + m_viewports.push_back(viewport); pipe.SetViewport(m_viewports); VkRect2D rect = {}; m_scissors.push_back(rect); pipe.SetScissor(m_scissors); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 0, nullptr, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); - pipe.CreateVKPipeline(pl, rp); + const VkPipelineLayoutObj pl(m_device); + pipe.CreateVKPipeline(pl.handle(), rp); m_commandBuffer->begin(); @@ -3699,7 +4202,8 @@ TEST_F(VkLayerTest, RenderPassPipelineSubpassMismatch) { rp, fb, {{ - 0, 0, + 0, + 0, }, {32, 32}}, 0, @@ -3727,7 +4231,6 @@ TEST_F(VkLayerTest, RenderPassPipelineSubpassMismatch) { m_commandBuffer->end(); - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); vkDestroyFramebuffer(m_device->device(), fb, nullptr); vkDestroyRenderPass(m_device->device(), rp, nullptr); } @@ -4103,80 +4606,328 @@ TEST_F(VkLayerTest, ImageBarrierSubpassConflict) { vkDestroyRenderPass(m_device->device(), rp, nullptr); } -TEST_F(VkPositiveLayerTest, SecondaryCommandBufferBarrier) { - TEST_DESCRIPTION("Add a pipeline barrier in a secondary command buffer"); - ASSERT_NO_FATAL_FAILURE(Init()); +TEST_F(VkLayerTest, TemporaryExternalSemaphore) { +#ifdef _WIN32 + const auto extension_name = VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR; +#else + const auto extension_name = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; +#endif + // Check for external semaphore instance extensions + if (InstanceExtensionSupported(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME); + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" External semaphore extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); - // A renderpass with a single subpass that declared a self-dependency - VkAttachmentDescription attach[] = { - {0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, - VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_IMAGE_LAYOUT_UNDEFINED, - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, - }; - VkAttachmentReference ref = {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}; - VkSubpassDescription subpasses[] = { - {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0, nullptr, 1, &ref, nullptr, nullptr, 0, nullptr}, - }; - VkSubpassDependency dep = {0, - 0, - VK_PIPELINE_STAGE_HOST_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, - VK_ACCESS_HOST_WRITE_BIT, - VK_ACCESS_SHADER_WRITE_BIT, - VK_DEPENDENCY_BY_REGION_BIT}; - VkRenderPassCreateInfo rpci = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, 1, attach, 1, subpasses, 1, &dep}; - VkRenderPass rp; + // Check for external semaphore device extensions + if (DeviceExtensionSupported(gpu(), nullptr, extension_name)) { + m_device_extension_names.push_back(extension_name); + m_device_extension_names.push_back(VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME); + } else { + printf(" External semaphore extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); - VkResult err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); + // Check for external semaphore import and export capability + VkPhysicalDeviceExternalSemaphoreInfoKHR esi = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR, nullptr, + handle_type}; + VkExternalSemaphorePropertiesKHR esp = {VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR, nullptr}; + auto vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = + (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)vkGetInstanceProcAddr( + instance(), "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); + vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(gpu(), &esi, &esp); + + if (!(esp.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR) || + !(esp.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR)) { + printf(" External semaphore does not support importing and exporting, skipping test\n"); + return; + } + + VkResult err; + + // Create a semaphore to export payload from + VkExportSemaphoreCreateInfoKHR esci = {VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR, nullptr, handle_type}; + VkSemaphoreCreateInfo sci = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, &esci, 0}; + + VkSemaphore export_semaphore; + err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &export_semaphore); ASSERT_VK_SUCCESS(err); - VkImageObj image(m_device); - image.Init(32, 32, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); - VkImageView imageView = image.targetView(VK_FORMAT_R8G8B8A8_UNORM); + // Create a semaphore to import payload into + sci.pNext = nullptr; + VkSemaphore import_semaphore; + err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &import_semaphore); + ASSERT_VK_SUCCESS(err); - VkFramebufferCreateInfo fbci = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, nullptr, 0, rp, 1, &imageView, 32, 32, 1}; - VkFramebuffer fb; - err = vkCreateFramebuffer(m_device->device(), &fbci, nullptr, &fb); +#ifdef _WIN32 + // Export semaphore payload to an opaque handle + HANDLE handle = nullptr; + VkSemaphoreGetWin32HandleInfoKHR ghi = {VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, nullptr, export_semaphore, + handle_type}; + auto vkGetSemaphoreWin32HandleKHR = + (PFN_vkGetSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetSemaphoreWin32HandleKHR"); + err = vkGetSemaphoreWin32HandleKHR(m_device->device(), &ghi, &handle); + ASSERT_VK_SUCCESS(err); + + // Import opaque handle exported above *temporarily* + VkImportSemaphoreWin32HandleInfoKHR ihi = {VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, + nullptr, + import_semaphore, + VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR, + handle_type, + handle, + nullptr}; + auto vkImportSemaphoreWin32HandleKHR = + (PFN_vkImportSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportSemaphoreWin32HandleKHR"); + err = vkImportSemaphoreWin32HandleKHR(m_device->device(), &ihi); + ASSERT_VK_SUCCESS(err); +#else + // Export semaphore payload to an opaque handle + int fd = 0; + VkSemaphoreGetFdInfoKHR ghi = {VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, nullptr, export_semaphore, handle_type}; + auto vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetSemaphoreFdKHR"); + err = vkGetSemaphoreFdKHR(m_device->device(), &ghi, &fd); ASSERT_VK_SUCCESS(err); - m_commandBuffer->begin(); + // Import opaque handle exported above *temporarily* + VkImportSemaphoreFdInfoKHR ihi = {VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, nullptr, import_semaphore, + VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR, handle_type, fd}; + auto vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportSemaphoreFdKHR"); + err = vkImportSemaphoreFdKHR(m_device->device(), &ihi); + ASSERT_VK_SUCCESS(err); +#endif - VkRenderPassBeginInfo rpbi = {VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - nullptr, - rp, - fb, - {{ - 0, - 0, - }, - {32, 32}}, - 0, - nullptr}; + // Wait on the imported semaphore twice in vkQueueSubmit, the second wait should be an error + VkPipelineStageFlags flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; + VkSubmitInfo si[] = { + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, nullptr, &flags, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &import_semaphore, &flags, 0, nullptr, 0, nullptr}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, nullptr, &flags, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &import_semaphore, &flags, 0, nullptr, 0, nullptr}, + }; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "has no way to be signaled"); + vkQueueSubmit(m_device->m_queue, 4, si, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); - vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS); + // Wait on the imported semaphore twice in vkQueueBindSparse, the second wait should be an error + VkBindSparseInfo bi[] = { + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 1, &import_semaphore, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 1, &import_semaphore, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr}, + }; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "has no way to be signaled"); + vkQueueBindSparse(m_device->m_queue, 4, bi, VK_NULL_HANDLE); + m_errorMonitor->VerifyFound(); - VkCommandPoolObj pool(m_device, m_device->graphics_queue_node_index_, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); - VkCommandBufferObj secondary(m_device, &pool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); + // Cleanup + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + vkDestroySemaphore(m_device->device(), export_semaphore, nullptr); + vkDestroySemaphore(m_device->device(), import_semaphore, nullptr); +} - VkCommandBufferInheritanceInfo cbii = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, - nullptr, - rp, - 0, - VK_NULL_HANDLE, // Set to NULL FB handle intentionally to flesh out any errors - VK_FALSE, - 0, - 0}; - VkCommandBufferBeginInfo cbbi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, - VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, - &cbii}; - vkBeginCommandBuffer(secondary.handle(), &cbbi); - VkMemoryBarrier mem_barrier = {}; - mem_barrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; - mem_barrier.pNext = NULL; - mem_barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; - mem_barrier.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT; - vkCmdPipelineBarrier(secondary.handle(), VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, - VK_DEPENDENCY_BY_REGION_BIT, 1, &mem_barrier, 0, nullptr, 0, nullptr); +TEST_F(VkLayerTest, TemporaryExternalFence) { +#ifdef _WIN32 + const auto extension_name = VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR; +#else + const auto extension_name = VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; +#endif + // Check for external fence instance extensions + if (InstanceExtensionSupported(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME); + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" External fence extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for external fence device extensions + if (DeviceExtensionSupported(gpu(), nullptr, extension_name)) { + m_device_extension_names.push_back(extension_name); + m_device_extension_names.push_back(VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME); + } else { + printf(" External fence extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + // Check for external fence import and export capability + VkPhysicalDeviceExternalFenceInfoKHR efi = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR, nullptr, handle_type}; + VkExternalFencePropertiesKHR efp = {VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR, nullptr}; + auto vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)vkGetInstanceProcAddr( + instance(), "vkGetPhysicalDeviceExternalFencePropertiesKHR"); + vkGetPhysicalDeviceExternalFencePropertiesKHR(gpu(), &efi, &efp); + + if (!(efp.externalFenceFeatures & VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR) || + !(efp.externalFenceFeatures & VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR)) { + printf(" External fence does not support importing and exporting, skipping test\n"); + return; + } + + VkResult err; + + // Create a fence to export payload from + VkFence export_fence; + { + VkExportFenceCreateInfoKHR efci = {VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR, nullptr, handle_type}; + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, &efci, 0}; + err = vkCreateFence(m_device->device(), &fci, nullptr, &export_fence); + ASSERT_VK_SUCCESS(err); + } + + // Create a fence to import payload into + VkFence import_fence; + { + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, 0}; + err = vkCreateFence(m_device->device(), &fci, nullptr, &import_fence); + ASSERT_VK_SUCCESS(err); + } + +#ifdef _WIN32 + // Export fence payload to an opaque handle + HANDLE handle = nullptr; + { + VkFenceGetWin32HandleInfoKHR ghi = {VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, nullptr, export_fence, handle_type}; + auto vkGetFenceWin32HandleKHR = + (PFN_vkGetFenceWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetFenceWin32HandleKHR"); + err = vkGetFenceWin32HandleKHR(m_device->device(), &ghi, &handle); + ASSERT_VK_SUCCESS(err); + } + + // Import opaque handle exported above + { + VkImportFenceWin32HandleInfoKHR ifi = {VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, + nullptr, + import_fence, + VK_FENCE_IMPORT_TEMPORARY_BIT_KHR, + handle_type, + handle, + nullptr}; + auto vkImportFenceWin32HandleKHR = + (PFN_vkImportFenceWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportFenceWin32HandleKHR"); + err = vkImportFenceWin32HandleKHR(m_device->device(), &ifi); + ASSERT_VK_SUCCESS(err); + } +#else + // Export fence payload to an opaque handle + int fd = 0; + { + VkFenceGetFdInfoKHR gfi = {VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, nullptr, export_fence, handle_type}; + auto vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetFenceFdKHR"); + err = vkGetFenceFdKHR(m_device->device(), &gfi, &fd); + ASSERT_VK_SUCCESS(err); + } + + // Import opaque handle exported above + { + VkImportFenceFdInfoKHR ifi = {VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, nullptr, import_fence, + VK_FENCE_IMPORT_TEMPORARY_BIT_KHR, handle_type, fd}; + auto vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportFenceFdKHR"); + err = vkImportFenceFdKHR(m_device->device(), &ifi); + ASSERT_VK_SUCCESS(err); + } +#endif + + // Undo the temporary import + vkResetFences(m_device->device(), 1, &import_fence); + + // Signal the previously imported fence twice, the second signal should produce a validation error + vkQueueSubmit(m_device->m_queue, 0, nullptr, import_fence); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "is already in use by another submission."); + vkQueueSubmit(m_device->m_queue, 0, nullptr, import_fence); + m_errorMonitor->VerifyFound(); + + // Cleanup + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + vkDestroyFence(m_device->device(), export_fence, nullptr); + vkDestroyFence(m_device->device(), import_fence, nullptr); +} + +TEST_F(VkPositiveLayerTest, SecondaryCommandBufferBarrier) { + TEST_DESCRIPTION("Add a pipeline barrier in a secondary command buffer"); + ASSERT_NO_FATAL_FAILURE(Init()); + + // A renderpass with a single subpass that declared a self-dependency + VkAttachmentDescription attach[] = { + {0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + }; + VkAttachmentReference ref = {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}; + VkSubpassDescription subpasses[] = { + {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0, nullptr, 1, &ref, nullptr, nullptr, 0, nullptr}, + }; + VkSubpassDependency dep = {0, + 0, + VK_PIPELINE_STAGE_HOST_BIT, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_ACCESS_HOST_WRITE_BIT, + VK_ACCESS_SHADER_WRITE_BIT, + VK_DEPENDENCY_BY_REGION_BIT}; + VkRenderPassCreateInfo rpci = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, 1, attach, 1, subpasses, 1, &dep}; + VkRenderPass rp; + + VkResult err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); + ASSERT_VK_SUCCESS(err); + + VkImageObj image(m_device); + image.Init(32, 32, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); + VkImageView imageView = image.targetView(VK_FORMAT_R8G8B8A8_UNORM); + + VkFramebufferCreateInfo fbci = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, nullptr, 0, rp, 1, &imageView, 32, 32, 1}; + VkFramebuffer fb; + err = vkCreateFramebuffer(m_device->device(), &fbci, nullptr, &fb); + ASSERT_VK_SUCCESS(err); + + m_commandBuffer->begin(); + + VkRenderPassBeginInfo rpbi = {VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + nullptr, + rp, + fb, + {{ + 0, + 0, + }, + {32, 32}}, + 0, + nullptr}; + + vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS); + + VkCommandPoolObj pool(m_device, m_device->graphics_queue_node_index_, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); + VkCommandBufferObj secondary(m_device, &pool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); + + VkCommandBufferInheritanceInfo cbii = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, + nullptr, + rp, + 0, + VK_NULL_HANDLE, // Set to NULL FB handle intentionally to flesh out any errors + VK_FALSE, + 0, + 0}; + VkCommandBufferBeginInfo cbbi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, + VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, + &cbii}; + vkBeginCommandBuffer(secondary.handle(), &cbbi); + VkMemoryBarrier mem_barrier = {}; + mem_barrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; + mem_barrier.pNext = NULL; + mem_barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; + mem_barrier.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT; + vkCmdPipelineBarrier(secondary.handle(), VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_DEPENDENCY_BY_REGION_BIT, 1, &mem_barrier, 0, nullptr, 0, nullptr); VkImageMemoryBarrier img_barrier = {}; img_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; img_barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; @@ -4211,15 +4962,12 @@ TEST_F(VkPositiveLayerTest, SecondaryCommandBufferBarrier) { } TEST_F(VkLayerTest, RenderPassInvalidRenderArea) { - TEST_DESCRIPTION( - "Generate INVALID_RENDER_AREA error by beginning renderpass" - "with extent outside of framebuffer"); + TEST_DESCRIPTION("Generate INVALID_RENDER_AREA error by beginning renderpass with extent outside of framebuffer"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "Cannot execute a render pass with renderArea " - "not within the bound of the framebuffer."); + "Cannot execute a render pass with renderArea not within the bound of the framebuffer."); // Framebuffer for render target is 256x256, exceed that for INVALID_RENDER_AREA m_renderPassBeginInfo.renderArea.extent.width = 257; @@ -4231,16 +4979,15 @@ TEST_F(VkLayerTest, RenderPassInvalidRenderArea) { TEST_F(VkLayerTest, DisabledIndependentBlend) { TEST_DESCRIPTION( - "Generate INDEPENDENT_BLEND by disabling independent " - "blend and then specifying different blend states for two " + "Generate INDEPENDENT_BLEND by disabling independent blend and then specifying different blend states for two " "attachements"); VkPhysicalDeviceFeatures features = {}; features.independentBlend = VK_FALSE; ASSERT_NO_FATAL_FAILURE(Init(&features)); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "Invalid Pipeline CreateInfo: If independent blend feature not " - "enabled, all elements of pAttachments must be identical"); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "Invalid Pipeline CreateInfo: If independent blend feature not enabled, all elements of pAttachments must be identical"); VkDescriptorSetObj descriptorSet(m_device); descriptorSet.AppendDummy(); @@ -4285,8 +5032,8 @@ TEST_F(VkLayerTest, DisabledIndependentBlend) { att_state1.blendEnable = VK_TRUE; att_state2.dstAlphaBlendFactor = VK_BLEND_FACTOR_CONSTANT_COLOR; att_state2.blendEnable = VK_FALSE; - pipeline.AddColorAttachment(0, &att_state1); - pipeline.AddColorAttachment(1, &att_state2); + pipeline.AddColorAttachment(0, att_state1); + pipeline.AddColorAttachment(1, att_state2); pipeline.CreateVKPipeline(descriptorSet.GetPipelineLayout(), renderpass); m_errorMonitor->VerifyFound(); vkDestroyRenderPass(m_device->device(), renderpass, NULL); @@ -4295,8 +5042,7 @@ TEST_F(VkLayerTest, DisabledIndependentBlend) { // Is the Pipeline compatible with the expectations of the Renderpass/subpasses? TEST_F(VkLayerTest, PipelineRenderpassCompatibility) { TEST_DESCRIPTION( - "Create a graphics pipeline that is incompatible with the requirements " - "of its contained Renderpass/subpasses."); + "Create a graphics pipeline that is incompatible with the requirements of its contained Renderpass/subpasses."); ASSERT_NO_FATAL_FAILURE(Init()); VkDescriptorSetObj ds_obj(m_device); @@ -4315,7 +5061,7 @@ TEST_F(VkLayerTest, PipelineRenderpassCompatibility) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005e2); VkPipelineObj pipeline(m_device); pipeline.AddShader(&vs_obj); - pipeline.AddColorAttachment(0, &att_state1); + pipeline.AddColorAttachment(0, att_state1); VkGraphicsPipelineCreateInfo info = {}; pipeline.InitGraphicsPipelineCreateInfo(&info); @@ -4328,8 +5074,8 @@ TEST_F(VkLayerTest, PipelineRenderpassCompatibility) { TEST_F(VkLayerTest, CreateRenderPassAttachments) { TEST_DESCRIPTION( - "Ensure that CreateRenderPass produces the expected validation errors " - "when a subpass's attachments violate the valid usage conditions."); + "Ensure that CreateRenderPass produces the expected validation errors when a subpass's attachments violate the valid usage " + "conditions."); ASSERT_NO_FATAL_FAILURE(Init()); @@ -4362,11 +5108,13 @@ TEST_F(VkLayerTest, CreateRenderPassAttachments) { {0, VK_IMAGE_LAYOUT_GENERAL}, }; std::vector color = { - {1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, {2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + {1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + {2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, }; VkAttachmentReference depth = {3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL}; std::vector resolve = { - {4, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, {VK_ATTACHMENT_UNUSED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + {4, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + {VK_ATTACHMENT_UNUSED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, }; std::vector preserve = {5}; @@ -4782,71 +5530,64 @@ TEST_F(VkLayerTest, FramebufferCreateErrors) { TEST_F(VkLayerTest, DynamicDepthBiasNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Depth Bias dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Depth Bias dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic depth bias m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic depth bias state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailDepthBias); + VKTriangleTest(BsoFailDepthBias); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicLineWidthNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Line Width dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Line Width dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic line width m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic line width state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailLineWidth); + VKTriangleTest(BsoFailLineWidth); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicViewportNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Viewport dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Viewport dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic viewport state m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic viewport(s) 0 are used by pipeline state object, but were not provided"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailViewport); + VKTriangleTest(BsoFailViewport); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicScissorNotBound) { - TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Scissor dynamic " - "state is required but not correctly bound."); + TEST_DESCRIPTION("Run a simple draw calls to validate failure when Scissor dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic scissor state m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic scissor(s) 0 are used by pipeline state object, but were not provided"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailScissor); + VKTriangleTest(BsoFailScissor); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicBlendConstantsNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Blend Constants " - "dynamic state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Blend Constants dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic blend constant state m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic blend constants state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailBlend); + VKTriangleTest(BsoFailBlend); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicDepthBoundsNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Depth Bounds dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Depth Bounds dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); if (!m_device->phy().features().depthBounds) { @@ -4856,46 +5597,43 @@ TEST_F(VkLayerTest, DynamicDepthBoundsNotBound) { // Dynamic depth bounds m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic depth bounds state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailDepthBounds); + VKTriangleTest(BsoFailDepthBounds); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicStencilReadNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Stencil Read dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Stencil Read dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic stencil read mask m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic stencil read mask state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailStencilReadMask); + VKTriangleTest(BsoFailStencilReadMask); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicStencilWriteNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Stencil Write dynamic" - " state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Stencil Write dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic stencil write mask m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic stencil write mask state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailStencilWriteMask); + VKTriangleTest(BsoFailStencilWriteMask); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, DynamicStencilRefNotBound) { TEST_DESCRIPTION( - "Run a simple draw calls to validate failure when Stencil Ref dynamic " - "state is required but not correctly bound."); + "Run a simple draw calls to validate failure when Stencil Ref dynamic state is required but not correctly bound."); ASSERT_NO_FATAL_FAILURE(Init()); // Dynamic stencil reference m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic stencil reference state not set for this command buffer"); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailStencilReference); + VKTriangleTest(BsoFailStencilReference); m_errorMonitor->VerifyFound(); } @@ -4905,14 +5643,13 @@ TEST_F(VkLayerTest, IndexBufferNotBound) { ASSERT_NO_FATAL_FAILURE(Init()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Index buffer object not bound to this command buffer when Indexed "); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailIndexBuffer); + VKTriangleTest(BsoFailIndexBuffer); m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, CommandBufferTwoSubmits) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "was begun w/ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has " - "been submitted"); + "was begun w/ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has been submitted"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); @@ -4921,7 +5658,7 @@ TEST_F(VkLayerTest, CommandBufferTwoSubmits) { // We luck out b/c by default the framework creates CB w/ the // VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set m_commandBuffer->begin(); - m_commandBuffer->ClearAllBuffers(m_clear_color, m_depth_clear_color, m_stencil_clear_color, NULL); + m_commandBuffer->ClearAllBuffers(m_renderTargets, m_clear_color, nullptr, m_depth_clear_color, m_stencil_clear_color); m_commandBuffer->end(); // Bypass framework since it does the waits automatically @@ -4981,19 +5718,11 @@ TEST_F(VkLayerTest, AllocDescriptorFromEmptyPool) { dsl_binding_samp.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding_samp.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding_samp; - - VkDescriptorSetLayout ds_layout_samp; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout_samp); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout_samp(m_device, {dsl_binding_samp}); // Try to allocate 2 sets when pool only has 1 set VkDescriptorSet descriptor_sets[2]; - VkDescriptorSetLayout set_layouts[2] = {ds_layout_samp, ds_layout_samp}; + VkDescriptorSetLayout set_layouts[2] = {ds_layout_samp.handle(), ds_layout_samp.handle()}; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 2; @@ -5012,23 +5741,16 @@ TEST_F(VkLayerTest, AllocDescriptorFromEmptyPool) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout_ub; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout_ub); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout_ub(m_device, {dsl_binding}); VkDescriptorSet descriptor_set; alloc_info.descriptorSetCount = 1; - alloc_info.pSetLayouts = &ds_layout_ub; + alloc_info.pSetLayouts = &ds_layout_ub.handle(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_04c00266); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_set); m_errorMonitor->VerifyFound(); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout_samp, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout_ub, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -5065,29 +5787,20 @@ TEST_F(VkLayerTest, FreeDescriptorFromOneShotPool) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); err = vkFreeDescriptorSets(m_device->device(), ds_pool, 1, &descriptorSet); m_errorMonitor->VerifyFound(); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -5111,42 +5824,27 @@ TEST_F(VkLayerTest, InvalidDescriptorSet) { uint64_t fake_set_handle = 0xbaad6001; VkDescriptorSet bad_set = reinterpret_cast(fake_set_handle); - VkResult err; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_17c13001); ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorSetLayoutBinding layout_bindings[1] = {}; - layout_bindings[0].binding = 0; - layout_bindings[0].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - layout_bindings[0].descriptorCount = 1; - layout_bindings[0].stageFlags = VK_SHADER_STAGE_VERTEX_BIT; - layout_bindings[0].pImmutableSamplers = NULL; + VkDescriptorSetLayoutBinding layout_binding = {}; + layout_binding.binding = 0; + layout_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + layout_binding.descriptorCount = 1; + layout_binding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + layout_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayout descriptor_set_layout; - VkDescriptorSetLayoutCreateInfo dslci = {}; - dslci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - dslci.pNext = NULL; - dslci.bindingCount = 1; - dslci.pBindings = layout_bindings; - err = vkCreateDescriptorSetLayout(device(), &dslci, NULL, &descriptor_set_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj descriptor_set_layout(m_device, {layout_binding}); - VkPipelineLayout pipeline_layout; - VkPipelineLayoutCreateInfo plci = {}; - plci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - plci.pNext = NULL; - plci.setLayoutCount = 1; - plci.pSetLayouts = &descriptor_set_layout; - err = vkCreatePipelineLayout(device(), &plci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(DeviceObj(), {&descriptor_set_layout}); m_commandBuffer->begin(); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &bad_set, 0, NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &bad_set, 0, + NULL); m_errorMonitor->VerifyFound(); m_commandBuffer->end(); - vkDestroyPipelineLayout(device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(device(), descriptor_set_layout, NULL); } TEST_F(VkLayerTest, InvalidDescriptorSetLayout) { @@ -5170,9 +5868,9 @@ TEST_F(VkLayerTest, InvalidDescriptorSetLayout) { TEST_F(VkLayerTest, WriteDescriptorSetIntegrityCheck) { TEST_DESCRIPTION( "This test verifies some requirements of chapter 13.2.3 of the Vulkan Spec " - "1) A uniform buffer update must have a valid buffer index." - "2) When using an array of descriptors in a single WriteDescriptor," - " the descriptor types and stageflags must all be the same." + "1) A uniform buffer update must have a valid buffer index. " + "2) When using an array of descriptors in a single WriteDescriptor, the descriptor types and stageflags " + "must all be the same. " "3) Immutable Sampler state must match across descriptors"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00288); @@ -5198,75 +5896,45 @@ TEST_F(VkLayerTest, WriteDescriptorSetIntegrityCheck) { VkResult err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); ASSERT_VK_SUCCESS(err); - VkDescriptorSetLayoutBinding layout_binding[3] = {}; - layout_binding[0].binding = 0; - layout_binding[0].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - layout_binding[0].descriptorCount = 1; - layout_binding[0].stageFlags = VK_SHADER_STAGE_ALL; - layout_binding[0].pImmutableSamplers = NULL; - - layout_binding[1].binding = 1; - layout_binding[1].descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; - layout_binding[1].descriptorCount = 1; - layout_binding[1].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; - layout_binding[1].pImmutableSamplers = NULL; - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + VkDescriptorSetLayoutBinding dslb1 = {}; + dslb1.binding = 0; + dslb1.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + dslb1.descriptorCount = 1; + dslb1.stageFlags = VK_SHADER_STAGE_ALL; + dslb1.pImmutableSamplers = NULL; + + VkDescriptorSetLayoutBinding dslb2 = {}; + dslb2.binding = 1; + dslb2.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; + dslb2.descriptorCount = 1; + dslb2.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb2.pImmutableSamplers = NULL; + + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); - layout_binding[2].binding = 2; - layout_binding[2].descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; - layout_binding[2].descriptorCount = 1; - layout_binding[2].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; - layout_binding[2].pImmutableSamplers = static_cast(&sampler); + VkDescriptorSetLayoutBinding dslb3 = {}; + dslb3.binding = 2; + dslb3.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; + dslb3.descriptorCount = 1; + dslb3.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb3.pImmutableSamplers = static_cast(&sampler); - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = sizeof(layout_binding) / sizeof(VkDescriptorSetLayoutBinding); - ds_layout_ci.pBindings = layout_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const std::vector layout_bindings = {dslb1, dslb2, dslb3}; + const VkDescriptorSetLayoutObj ds_layout(m_device, layout_bindings); VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); VkDescriptorSet descriptorSet; err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - VkWriteDescriptorSet descriptor_write = {}; descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; descriptor_write.dstSet = descriptorSet; @@ -5336,34 +6004,24 @@ TEST_F(VkLayerTest, WriteDescriptorSetIntegrityCheck) { vkDestroyBuffer(m_device->device(), dyub, NULL); vkFreeMemory(m_device->device(), mem, NULL); vkDestroySampler(m_device->device(), sampler, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, WriteDescriptorSetConsecutiveUpdates) { TEST_DESCRIPTION( - "Verifies that updates rolling over to next descriptor work correctly by destroying buffer" - "from consecutive update known to be used in descriptor set and verifying that error is flagged."); + "Verifies that updates rolling over to next descriptor work correctly by destroying buffer from consecutive update known " + "to be used in descriptor set and verifying that error is flagged."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 2, VK_SHADER_STAGE_ALL, nullptr}, - {1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, - }); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 2, VK_SHADER_STAGE_ALL, nullptr}, + {1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); - VkPipelineLayout pipeline_layout; - VkResult err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); uint32_t qfi = 0; VkBufferCreateInfo bci = {}; @@ -5423,17 +6081,17 @@ TEST_F(VkLayerTest, WriteDescriptorSetConsecutiveUpdates) { pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); - err = pipe.CreateVKPipeline(pipeline_layout, renderPass()); + VkResult err = pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); ASSERT_VK_SUCCESS(err); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, - nullptr); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &ds.set_, 0, nullptr); VkViewport viewport = {0, 0, 16, 16, 0, 1}; vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); @@ -5450,77 +6108,608 @@ TEST_F(VkLayerTest, WriteDescriptorSetConsecutiveUpdates) { submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submit_info.commandBufferCount = 1; submit_info.pCommandBuffers = &m_commandBuffer->handle(); - err = vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } -TEST_F(VkLayerTest, InvalidCmdBufferBufferDestroyed) { - TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a buffer dependency being destroyed."); - ASSERT_NO_FATAL_FAILURE(Init()); - - VkBuffer buffer; - VkDeviceMemory mem; - VkMemoryRequirements mem_reqs; - - VkBufferCreateInfo buf_info = {}; - buf_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - buf_info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; - buf_info.size = 256; - buf_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - VkResult err = vkCreateBuffer(m_device->device(), &buf_info, NULL, &buffer); - ASSERT_VK_SUCCESS(err); +TEST_F(VkLayerTest, CreatePipelineLayoutExceedsSetLimit) { + TEST_DESCRIPTION("Attempt to create a pipeline layout using more than the physical limit of SetLayouts."); - vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); + ASSERT_NO_FATAL_FAILURE(Init()); - VkMemoryAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - alloc_info.allocationSize = 256; - bool pass = false; - pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &alloc_info, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); - if (!pass) { - vkDestroyBuffer(m_device->device(), buffer, NULL); - return; - } - err = vkAllocateMemory(m_device->device(), &alloc_info, NULL, &mem); - ASSERT_VK_SUCCESS(err); + VkDescriptorSetLayoutBinding layout_binding = {}; + layout_binding.binding = 0; + layout_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + layout_binding.descriptorCount = 1; + layout_binding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + layout_binding.pImmutableSamplers = NULL; - err = vkBindBufferMemory(m_device->device(), buffer, mem, 0); + VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; + ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + ds_layout_ci.bindingCount = 1; + ds_layout_ci.pBindings = &layout_binding; + VkDescriptorSetLayout ds_layout = {}; + VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); ASSERT_VK_SUCCESS(err); - m_commandBuffer->begin(); - vkCmdFillBuffer(m_commandBuffer->handle(), buffer, 0, VK_WHOLE_SIZE, 0); - m_commandBuffer->end(); - - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " that is invalid because bound Buffer "); - // Destroy buffer dependency prior to submit to cause ERROR - vkDestroyBuffer(m_device->device(), buffer, NULL); + // Create an array of DSLs, one larger than the physical limit + const auto excess_layouts = 1 + m_device->phy().properties().limits.maxBoundDescriptorSets; + std::vector dsl_array(excess_layouts, ds_layout); - VkSubmitInfo submit_info = {}; - submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; - submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &m_commandBuffer->handle(); - vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; + pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipeline_layout_ci.pNext = NULL; + pipeline_layout_ci.setLayoutCount = excess_layouts; + pipeline_layout_ci.pSetLayouts = dsl_array.data(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe0023c); + VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); m_errorMonitor->VerifyFound(); - vkQueueWaitIdle(m_device->m_queue); - vkFreeMemory(m_device->handle(), mem, NULL); + + // Clean up + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); } -TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { - TEST_DESCRIPTION("Delete bufferView bound to cmd buffer, then attempt to submit cmd buffer."); +TEST_F(VkLayerTest, CreatePipelineLayoutExcessPerStageDescriptors) { + TEST_DESCRIPTION("Attempt to create a pipeline layout where total descriptors exceed per-stage limits"); ASSERT_NO_FATAL_FAILURE(Init()); - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkDescriptorPoolSize ds_type_count; - ds_type_count.type = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; - ds_type_count.descriptorCount = 1; + uint32_t max_uniform_buffers = m_device->phy().properties().limits.maxPerStageDescriptorUniformBuffers; + uint32_t max_storage_buffers = m_device->phy().properties().limits.maxPerStageDescriptorStorageBuffers; + uint32_t max_sampled_images = m_device->phy().properties().limits.maxPerStageDescriptorSampledImages; + uint32_t max_storage_images = m_device->phy().properties().limits.maxPerStageDescriptorStorageImages; + uint32_t max_samplers = m_device->phy().properties().limits.maxPerStageDescriptorSamplers; + uint32_t max_combined = std::min(max_samplers, max_sampled_images); + uint32_t max_input_attachments = m_device->phy().properties().limits.maxPerStageDescriptorInputAttachments; - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + uint32_t sum_dyn_uniform_buffers = m_device->phy().properties().limits.maxDescriptorSetUniformBuffersDynamic; + uint32_t sum_uniform_buffers = m_device->phy().properties().limits.maxDescriptorSetUniformBuffers; + uint32_t sum_dyn_storage_buffers = m_device->phy().properties().limits.maxDescriptorSetStorageBuffersDynamic; + uint32_t sum_storage_buffers = m_device->phy().properties().limits.maxDescriptorSetStorageBuffers; + uint32_t sum_sampled_images = m_device->phy().properties().limits.maxDescriptorSetSampledImages; + uint32_t sum_storage_images = m_device->phy().properties().limits.maxDescriptorSetStorageImages; + uint32_t sum_samplers = m_device->phy().properties().limits.maxDescriptorSetSamplers; + uint32_t sum_input_attachments = m_device->phy().properties().limits.maxDescriptorSetInputAttachments; + + // Devices that report UINT32_MAX for any of these limits can't run this test + if (UINT32_MAX == std::max({max_uniform_buffers, max_storage_buffers, max_sampled_images, max_storage_images, max_samplers})) { + printf(" Physical device limits report as 2^32-1. Skipping test.\n"); + return; + } + + VkDescriptorSetLayoutBinding dslb = {}; + std::vector dslb_vec = {}; + VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; + VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; + ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + ds_layout_ci.pNext = NULL; + VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; + pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipeline_layout_ci.pNext = NULL; + pipeline_layout_ci.setLayoutCount = 1; + pipeline_layout_ci.pSetLayouts = &ds_layout; + VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; + + // VU 0fe0023e - too many sampler type descriptors in fragment stage + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; + dslb.descriptorCount = max_samplers; + dslb.stageFlags = VK_SHADER_STAGE_ALL_GRAPHICS; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + dslb.descriptorCount = max_combined; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe0023e); + if ((max_samplers + max_combined) > sum_samplers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d1a); // expect all-stages sum too + } + if (max_combined > sum_sampled_images) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d24); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00240 - too many uniform buffer type descriptors in vertex stage + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + dslb.descriptorCount = max_uniform_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00240); + if (dslb.descriptorCount > sum_uniform_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d1c); // expect all-stages sum too + } + if (dslb.descriptorCount > sum_dyn_uniform_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d1e); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00242 - too many storage buffer type descriptors in compute stage + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + dslb.descriptorCount = max_storage_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_ALL; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; + dslb_vec.push_back(dslb); + dslb.binding = 2; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + dslb.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00242); + if (dslb.descriptorCount > sum_dyn_storage_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d22); // expect all-stages sum too + } + if (dslb.descriptorCount > sum_storage_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d20); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00244 - too many sampled image type descriptors in multiple stages + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; + dslb.descriptorCount = max_sampled_images; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + dslb.stageFlags = VK_SHADER_STAGE_ALL_GRAPHICS; + dslb_vec.push_back(dslb); + dslb.binding = 2; + dslb.descriptorCount = max_combined; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00244); + if (max_combined + max_sampled_images > sum_sampled_images) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d24); // expect all-stages sum too + } + if (max_combined > sum_samplers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d1a); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00246 - too many storage image type descriptors in fragment stage + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; + dslb.descriptorCount = 1 + (max_storage_images / 2); + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00246); + if (2 * dslb.descriptorCount > sum_storage_images) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d26); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d18 - too many input attachments in fragment stage + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; + dslb.descriptorCount = 1 + max_input_attachments; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d18); + if (dslb.descriptorCount > sum_input_attachments) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d28); // expect all-stages sum too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); +} + +TEST_F(VkLayerTest, CreatePipelineLayoutExcessDescriptorsOverall) { + TEST_DESCRIPTION("Attempt to create a pipeline layout where total descriptors exceed limits"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + uint32_t max_uniform_buffers = m_device->phy().properties().limits.maxPerStageDescriptorUniformBuffers; + uint32_t max_storage_buffers = m_device->phy().properties().limits.maxPerStageDescriptorStorageBuffers; + uint32_t max_sampled_images = m_device->phy().properties().limits.maxPerStageDescriptorSampledImages; + uint32_t max_storage_images = m_device->phy().properties().limits.maxPerStageDescriptorStorageImages; + uint32_t max_samplers = m_device->phy().properties().limits.maxPerStageDescriptorSamplers; + uint32_t max_input_attachments = m_device->phy().properties().limits.maxPerStageDescriptorInputAttachments; + + uint32_t sum_dyn_uniform_buffers = m_device->phy().properties().limits.maxDescriptorSetUniformBuffersDynamic; + uint32_t sum_uniform_buffers = m_device->phy().properties().limits.maxDescriptorSetUniformBuffers; + uint32_t sum_dyn_storage_buffers = m_device->phy().properties().limits.maxDescriptorSetStorageBuffersDynamic; + uint32_t sum_storage_buffers = m_device->phy().properties().limits.maxDescriptorSetStorageBuffers; + uint32_t sum_sampled_images = m_device->phy().properties().limits.maxDescriptorSetSampledImages; + uint32_t sum_storage_images = m_device->phy().properties().limits.maxDescriptorSetStorageImages; + uint32_t sum_samplers = m_device->phy().properties().limits.maxDescriptorSetSamplers; + uint32_t sum_input_attachments = m_device->phy().properties().limits.maxDescriptorSetInputAttachments; + + // Devices that report UINT32_MAX for any of these limits can't run this test + if (UINT32_MAX == std::max({sum_dyn_uniform_buffers, sum_uniform_buffers, sum_dyn_storage_buffers, sum_storage_buffers, + sum_sampled_images, sum_storage_images, sum_samplers, sum_input_attachments})) { + printf(" Physical device limits report as 2^32-1. Skipping test.\n"); + return; + } + + VkDescriptorSetLayoutBinding dslb = {}; + std::vector dslb_vec = {}; + VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; + VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; + ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + ds_layout_ci.pNext = NULL; + VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; + pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipeline_layout_ci.pNext = NULL; + pipeline_layout_ci.setLayoutCount = 1; + pipeline_layout_ci.pSetLayouts = &ds_layout; + VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; + + // VU 0fe00d1a - too many sampler type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; + dslb.descriptorCount = sum_samplers / 2; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + dslb.descriptorCount = sum_samplers - dslb.descriptorCount + 1; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d1a); + if (dslb.descriptorCount > max_samplers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe0023e); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d1c - too many uniform buffer type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + dslb.descriptorCount = sum_uniform_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d1c); + if (dslb.descriptorCount > max_uniform_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00240); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d1e - too many dynamic uniform buffer type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; + dslb.descriptorCount = sum_dyn_uniform_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d1e); + if (dslb.descriptorCount > max_uniform_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00240); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d20 - too many storage buffer type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + dslb.descriptorCount = sum_storage_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d20); + if (dslb.descriptorCount > max_storage_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00242); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d22 - too many dynamic storage buffer type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; + dslb.descriptorCount = sum_dyn_storage_buffers + 1; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d22); + if (dslb.descriptorCount > max_storage_buffers) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00242); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d24 - too many sampled image type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + dslb.descriptorCount = max_samplers; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; + // revisit: not robust to odd limits. + uint32_t remaining = (max_samplers > sum_sampled_images ? 0 : (sum_sampled_images - max_samplers) / 2); + dslb.descriptorCount = 1 + remaining; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + dslb.binding = 2; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + dslb.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d24); + if (dslb.descriptorCount > max_sampled_images) { + // revisit: not robust to `remaining` being small. + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00244); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d26 - too many storage image type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; + dslb.descriptorCount = sum_storage_images / 2; + dslb.stageFlags = VK_SHADER_STAGE_VERTEX_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + dslb.binding = 1; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + dslb.descriptorCount = sum_storage_images - dslb.descriptorCount + 1; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d26); + if (dslb.descriptorCount > max_storage_images) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00246); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + + // VU 0fe00d28 - too many input attachment type descriptors overall + dslb_vec.clear(); + dslb.binding = 0; + dslb.descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; + dslb.descriptorCount = sum_input_attachments + 1; + dslb.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dslb.pImmutableSamplers = NULL; + dslb_vec.push_back(dslb); + + ds_layout_ci.bindingCount = dslb_vec.size(); + ds_layout_ci.pBindings = dslb_vec.data(); + err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + ASSERT_VK_SUCCESS(err); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe00d28); + if (dslb.descriptorCount > max_input_attachments) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + VALIDATION_ERROR_0fe00d18); // expect max-per-stage too + } + err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); + vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); // Unnecessary but harmless if test passed + pipeline_layout = VK_NULL_HANDLE; + vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); +} + +TEST_F(VkLayerTest, InvalidCmdBufferBufferDestroyed) { + TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to a buffer dependency being destroyed."); + ASSERT_NO_FATAL_FAILURE(Init()); + + VkBuffer buffer; + VkDeviceMemory mem; + VkMemoryRequirements mem_reqs; + + VkBufferCreateInfo buf_info = {}; + buf_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; + buf_info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; + buf_info.size = 256; + buf_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + VkResult err = vkCreateBuffer(m_device->device(), &buf_info, NULL, &buffer); + ASSERT_VK_SUCCESS(err); + + vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); + + VkMemoryAllocateInfo alloc_info = {}; + alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + alloc_info.allocationSize = mem_reqs.size; + bool pass = false; + pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &alloc_info, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT); + if (!pass) { + vkDestroyBuffer(m_device->device(), buffer, NULL); + return; + } + err = vkAllocateMemory(m_device->device(), &alloc_info, NULL, &mem); + ASSERT_VK_SUCCESS(err); + + err = vkBindBufferMemory(m_device->device(), buffer, mem, 0); + ASSERT_VK_SUCCESS(err); + + m_commandBuffer->begin(); + vkCmdFillBuffer(m_commandBuffer->handle(), buffer, 0, VK_WHOLE_SIZE, 0); + m_commandBuffer->end(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " that is invalid because bound Buffer "); + // Destroy buffer dependency prior to submit to cause ERROR + vkDestroyBuffer(m_device->device(), buffer, NULL); + + VkSubmitInfo submit_info = {}; + submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submit_info.commandBufferCount = 1; + submit_info.pCommandBuffers = &m_commandBuffer->handle(); + vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); + + m_errorMonitor->VerifyFound(); + vkQueueWaitIdle(m_device->m_queue); + vkFreeMemory(m_device->handle(), mem, NULL); +} + +TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { + TEST_DESCRIPTION("Delete bufferView bound to cmd buffer, then attempt to submit cmd buffer."); + + ASSERT_NO_FATAL_FAILURE(Init()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + VkDescriptorPoolSize ds_type_count; + ds_type_count.type = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + ds_type_count.descriptorCount = 1; + + VkDescriptorPoolCreateInfo ds_pool_ci = {}; + ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; ds_pool_ci.maxSets = 1; ds_pool_ci.poolSizeCount = 1; ds_pool_ci.pPoolSizes = &ds_type_count; @@ -5536,32 +6725,18 @@ TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { layout_binding.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; layout_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &layout_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {layout_binding}); VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); VkDescriptorSet descriptor_set; err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_set); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); VkBuffer buffer; uint32_t queue_family_index = 0; @@ -5632,8 +6807,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " that is invalid because bound BufferView "); @@ -5644,10 +6819,10 @@ TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); VkRect2D scissor = {{0, 0}, {16, 16}}; vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); - // Bind pipeline to cmd buffer + // Bind pipeline to cmd buffer - This causes crash on Mali vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptor_set, 0, - nullptr); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_set, 0, nullptr); m_commandBuffer->Draw(1, 0, 0, 0); m_commandBuffer->EndRenderPass(); m_commandBuffer->end(); @@ -5665,15 +6840,11 @@ TEST_F(VkLayerTest, InvalidCmdBufferBufferViewDestroyed) { // Clean-up vkDestroyBuffer(m_device->device(), buffer, NULL); vkFreeMemory(m_device->device(), buffer_memory, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, InvalidCmdBufferImageDestroyed) { - TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to an image dependency being destroyed."); + TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to an image dependency being destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); VkImage image; @@ -5742,8 +6913,7 @@ TEST_F(VkLayerTest, InvalidCmdBufferImageDestroyed) { TEST_F(VkLayerTest, InvalidCmdBufferFramebufferImageDestroyed) { TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a framebuffer image dependency being destroyed."); + "Attempt to draw with a command buffer that is invalid due to a framebuffer image dependency being destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); VkFormatProperties format_properties; VkResult err = VK_SUCCESS; @@ -6013,6 +7183,8 @@ TEST_F(VkLayerTest, RenderPassInUseDestroyedSignaled) { // Wait for queue to complete so we can safely destroy rp vkQueueWaitIdle(m_device->m_queue); + m_errorMonitor->SetUnexpectedError("If renderPass is not VK_NULL_HANDLE, renderPass must be a valid VkRenderPass handle"); + m_errorMonitor->SetUnexpectedError("Was it created? Has it already been destroyed?"); vkDestroyRenderPass(m_device->device(), rp, nullptr); } @@ -6135,9 +7307,7 @@ TEST_F(VkLayerTest, BufferMemoryNotBound) { } TEST_F(VkLayerTest, InvalidCmdBufferEventDestroyed) { - TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to an event dependency being destroyed."); + TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to an event dependency being destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); VkEvent event; @@ -6164,9 +7334,7 @@ TEST_F(VkLayerTest, InvalidCmdBufferEventDestroyed) { } TEST_F(VkLayerTest, InvalidCmdBufferQueryPoolDestroyed) { - TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a query pool dependency being destroyed."); + TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to a query pool dependency being destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); VkQueryPool query_pool; @@ -6195,101 +7363,29 @@ TEST_F(VkLayerTest, InvalidCmdBufferQueryPoolDestroyed) { } TEST_F(VkLayerTest, InvalidCmdBufferPipelineDestroyed) { - TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a pipeline dependency being destroyed."); + TEST_DESCRIPTION("Attempt to draw with a command buffer that is invalid due to a pipeline dependency being destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkResult err; + { + // Use helper to create graphics pipeline + CreatePipelineHelper helper(*this); + helper.InitInfo(); + helper.InitState(); + helper.CreateGraphicsPipeline(); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + // Bind helper pipeline to command buffer + m_commandBuffer->begin(); + vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, helper.pipeline_); + m_commandBuffer->end(); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.viewportCount = 1; - VkViewport vp = {}; // Just need dummy vp to point to - vp_state_ci.pViewports = &vp; - vp_state_ci.scissorCount = 1; - VkRect2D scissors = {}; // Dummy scissors to point to - vp_state_ci.pScissors = &scissors; - - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); - - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader - // but add it to be able to run on more devices - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - - VkPipelineRasterizationStateCreateInfo rs_ci = {}; - rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_ci.rasterizerDiscardEnable = true; - rs_ci.lineWidth = 1.0f; - - VkPipelineColorBlendAttachmentState att = {}; - att.blendEnable = VK_FALSE; - att.colorWriteMask = 0xf; - - VkPipelineColorBlendStateCreateInfo cb_ci = {}; - cb_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - cb_ci.attachmentCount = 1; - cb_ci.pAttachments = &att; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pRasterizationState = &rs_ci; - gp_ci.pColorBlendState = &cb_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); - - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; - - VkPipeline pipeline; - VkPipelineCache pipelineCache; - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - ASSERT_VK_SUCCESS(err); - - m_commandBuffer->begin(); - vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); - m_commandBuffer->end(); - // Now destroy pipeline in order to cause error when submitting - vkDestroyPipeline(m_device->device(), pipeline, nullptr); + // pipeline will be destroyed when helper goes out of scope + } + // Cause error by submitting command buffer that references destroyed pipeline m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " that is invalid because bound Pipeline "); - - VkSubmitInfo submit_info = {}; - submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; - submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &m_commandBuffer->handle(); - vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); - + m_commandBuffer->QueueCommandBuffer(false); m_errorMonitor->VerifyFound(); - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkPositiveLayerTest, DestroyPipelineRenderPass) { @@ -6347,21 +7443,18 @@ TEST_F(VkPositiveLayerTest, DestroyPipelineRenderPass) { VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); - VkViewport view_port = {}; - m_viewports.push_back(view_port); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + m_viewports.push_back(viewport); pipe.SetViewport(m_viewports); - VkRect2D rect = {}; + VkRect2D rect = {{0, 0}, {64, 64}}; m_scissors.push_back(rect); pipe.SetScissor(m_scissors); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 0, nullptr, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); - pipe.CreateVKPipeline(pl, rp); + const VkPipelineLayoutObj pl(m_device); + pipe.CreateVKPipeline(pl.handle(), rp); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -6381,15 +7474,12 @@ TEST_F(VkPositiveLayerTest, DestroyPipelineRenderPass) { vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); m_errorMonitor->VerifyNotFound(); vkQueueWaitIdle(m_device->m_queue); - - vkDestroyPipelineLayout(m_device->device(), pl, NULL); } TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetBufferDestroyed) { TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a bound descriptor set with a buffer dependency " - "being destroyed."); + "Attempt to draw with a command buffer that is invalid due to a bound descriptor set with a buffer dependency being " + "destroyed."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -6416,33 +7506,18 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetBufferDestroyed) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create a buffer to update the descriptor with uint32_t qfi = 0; @@ -6458,14 +7533,13 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetBufferDestroyed) { ASSERT_VK_SUCCESS(err); // Allocate memory and bind to buffer so we can make it to the appropriate // error + VkMemoryRequirements memReqs; + vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); VkMemoryAllocateInfo mem_alloc = {}; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = NULL; - mem_alloc.allocationSize = 1024; + mem_alloc.allocationSize = memReqs.size; mem_alloc.memoryTypeIndex = 0; - - VkMemoryRequirements memReqs; - vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); bool pass = m_device->phy().set_memory_type(memReqs.memoryTypeBits, &mem_alloc, 0); if (!pass) { vkDestroyBuffer(m_device->device(), buffer, NULL); @@ -6514,14 +7588,14 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetBufferDestroyed) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &m_viewports[0]); vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &m_scissors[0]); @@ -6542,19 +7616,14 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetBufferDestroyed) { // Cleanup vkFreeMemory(m_device->device(), mem, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { TEST_DESCRIPTION( - "Attempt to draw with a command buffer that is invalid " - "due to a bound descriptor sets with a combined image " - "sampler having their image, sampler, and descriptor set " - "each respectively destroyed and then attempting to " - "submit associated cmd buffers. Attempt to destroy a " - "DescriptorSet that is in use."); + "Attempt to draw with a command buffer that is invalid due to a bound descriptor sets with a combined image sampler having " + "their image, sampler, and descriptor set each respectively destroyed and then attempting to submit associated cmd " + "buffers. Attempt to destroy a DescriptorSet that is in use."); ASSERT_NO_FATAL_FAILURE(Init(nullptr, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)); ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -6582,33 +7651,18 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create images to update the descriptor with VkImage image; @@ -6677,24 +7731,7 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { err = vkCreateImageView(m_device->device(), &image_view_create_info, NULL, &view2); ASSERT_VK_SUCCESS(err); // Create Samplers - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; VkSampler sampler2; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); @@ -6738,15 +7775,15 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); // First error case is destroying sampler prior to cmd buffer submission m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); VkViewport viewport = {0, 0, 16, 16, 0, 1}; VkRect2D scissor = {{0, 0}, {16, 16}}; vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); @@ -6768,8 +7805,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " that has been destroyed."); @@ -6784,8 +7821,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); m_commandBuffer->Draw(1, 0, 0, 0); @@ -6814,8 +7851,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { m_commandBuffer->begin(&info); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); m_commandBuffer->Draw(1, 0, 0, 0); @@ -6836,8 +7873,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { m_commandBuffer->begin(&info); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); m_commandBuffer->Draw(1, 0, 0, 0); @@ -6854,8 +7891,8 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { // TODO - though the particular error above doesn't re-occur, there are other 'unexpecteds' still to clean up vkQueueWaitIdle(m_device->m_queue); m_errorMonitor->SetUnexpectedError( - "pDescriptorSets must be a pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which must " - "either be a valid handle or VK_NULL_HANDLE"); + "pDescriptorSets must be a valid pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which " + "must either be a valid handle or VK_NULL_HANDLE"); m_errorMonitor->SetUnexpectedError("Unable to remove DescriptorSet obj"); vkFreeDescriptorSets(m_device->device(), ds_pool, 1, &descriptorSet); @@ -6874,8 +7911,6 @@ TEST_F(VkLayerTest, InvalidCmdBufferDescriptorSetImageSamplerDestroyed) { vkDestroyImage(m_device->device(), image2, NULL); vkDestroyImageView(m_device->device(), view, NULL); vkDestroyImageView(m_device->device(), view2, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -6908,33 +7943,18 @@ TEST_F(VkLayerTest, ImageDescriptorLayoutMismatch) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create images to update the descriptor with const VkFormat format = VK_FORMAT_B8G8R8A8_UNORM; @@ -6957,24 +7977,7 @@ TEST_F(VkLayerTest, ImageDescriptorLayoutMismatch) { err = vkCreateImageView(m_device->device(), &image_view_create_info, NULL, &view); ASSERT_VK_SUCCESS(err); // Create Sampler - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -7016,8 +8019,8 @@ TEST_F(VkLayerTest, ImageDescriptorLayoutMismatch) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); VkCommandBufferObj cmd_buf(m_device, m_commandPool); cmd_buf.begin(); @@ -7025,7 +8028,8 @@ TEST_F(VkLayerTest, ImageDescriptorLayoutMismatch) { image.SetLayout(&cmd_buf, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); cmd_buf.BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(cmd_buf.handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(cmd_buf.handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, NULL); + vkCmdBindDescriptorSets(cmd_buf.handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &descriptorSet, 0, + NULL); VkViewport viewport = {0, 0, 16, 16, 0, 1}; VkRect2D scissor = {{0, 0}, {16, 16}}; vkCmdSetViewport(cmd_buf.handle(), 0, 1, &viewport); @@ -7051,8 +8055,6 @@ TEST_F(VkLayerTest, ImageDescriptorLayoutMismatch) { // Cleanup vkDestroySampler(m_device->device(), sampler, NULL); vkDestroyImageView(m_device->device(), view, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -7084,33 +8086,18 @@ TEST_F(VkLayerTest, DescriptorPoolInUseDestroyedSignaled) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptor_set; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_set); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create image to update the descriptor with VkImageObj image(m_device); @@ -7119,24 +8106,7 @@ TEST_F(VkLayerTest, DescriptorPoolInUseDestroyedSignaled) { VkImageView view = image.targetView(VK_FORMAT_B8G8R8A8_UNORM); // Create Sampler - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -7177,14 +8147,14 @@ TEST_F(VkLayerTest, DescriptorPoolInUseDestroyedSignaled) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptor_set, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_set, 0, NULL); VkViewport viewport = {0, 0, 16, 16, 0, 1}; VkRect2D scissor = {{0, 0}, {16, 16}}; @@ -7207,8 +8177,6 @@ TEST_F(VkLayerTest, DescriptorPoolInUseDestroyedSignaled) { vkQueueWaitIdle(m_device->m_queue); // Cleanup vkDestroySampler(m_device->device(), sampler, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); m_errorMonitor->SetUnexpectedError( "If descriptorPool is not VK_NULL_HANDLE, descriptorPool must be a valid VkDescriptorPool handle"); m_errorMonitor->SetUnexpectedError("Unable to remove DescriptorPool obj"); @@ -7244,33 +8212,18 @@ TEST_F(VkLayerTest, DescriptorImageUpdateNoMemoryBound) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create images to update the descriptor with VkImage image; @@ -7326,24 +8279,7 @@ TEST_F(VkLayerTest, DescriptorImageUpdateNoMemoryBound) { err = vkCreateImageView(m_device->device(), &image_view_create_info, NULL, &view); ASSERT_VK_SUCCESS(err); // Create Samplers - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -7366,15 +8302,13 @@ TEST_F(VkLayerTest, DescriptorImageUpdateNoMemoryBound) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " previously bound memory was freed. Memory must not be freed prior to this operation."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x"); + "vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x"); vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); m_errorMonitor->VerifyFound(); // Cleanup vkDestroyImage(m_device->device(), image, NULL); vkDestroySampler(m_device->device(), sampler, NULL); vkDestroyImageView(m_device->device(), view, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -7406,99 +8340,304 @@ TEST_F(VkLayerTest, InvalidPipeline) { m_errorMonitor->VerifyFound(); } -TEST_F(VkLayerTest, DescriptorSetNotUpdated) { - TEST_DESCRIPTION("Bind a descriptor set that hasn't been updated."); - VkResult err; +TEST_F(VkLayerTest, CmdDispatchExceedLimits) { + TEST_DESCRIPTION("Compute dispatch with dimensions that exceed device limits"); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT, " bound but it was never updated. "); + // Enable KHX device group extensions, if available + if (InstanceExtensionSupported(VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME); + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + bool khx_dg_ext_available = false; + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHX_DEVICE_GROUP_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHX_DEVICE_GROUP_EXTENSION_NAME); + khx_dg_ext_available = true; + } + ASSERT_NO_FATAL_FAILURE(InitState()); - ASSERT_NO_FATAL_FAILURE(Init()); - ASSERT_NO_FATAL_FAILURE(InitViewport()); - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; + uint32_t x_limit = m_device->props.limits.maxComputeWorkGroupCount[0]; + uint32_t y_limit = m_device->props.limits.maxComputeWorkGroupCount[1]; + uint32_t z_limit = m_device->props.limits.maxComputeWorkGroupCount[2]; + if (std::max({x_limit, y_limit, z_limit}) == UINT32_MAX) { + printf(" device maxComputeWorkGroupCount limit reports UINT32_MAX, test not possible, skipping.\n"); + return; + } - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.pNext = NULL; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; + // Create a minimal compute pipeline + std::string cs_text = "#version 450\nvoid main() {}\n"; // minimal no-op shader + VkShaderObj cs_obj(m_device, cs_text.c_str(), VK_SHADER_STAGE_COMPUTE_BIT, this); + + VkPipelineLayoutCreateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + info.pNext = nullptr; + VkPipelineLayout pipe_layout; + vkCreatePipelineLayout(device(), &info, nullptr, &pipe_layout); + + VkComputePipelineCreateInfo pipeline_info = {}; + pipeline_info.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; + pipeline_info.pNext = nullptr; + pipeline_info.flags = khx_dg_ext_available ? VK_PIPELINE_CREATE_DISPATCH_BASE_KHX : 0; + pipeline_info.layout = pipe_layout; + pipeline_info.basePipelineHandle = VK_NULL_HANDLE; + pipeline_info.basePipelineIndex = -1; + pipeline_info.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; + pipeline_info.stage.pNext = nullptr; + pipeline_info.stage.flags = 0; + pipeline_info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT; + pipeline_info.stage.module = cs_obj.handle(); + pipeline_info.stage.pName = "main"; + pipeline_info.stage.pSpecializationInfo = nullptr; + VkPipeline cs_pipeline; + vkCreateComputePipelines(device(), VK_NULL_HANDLE, 1, &pipeline_info, nullptr, &cs_pipeline); + + // Bind pipeline to command buffer + m_commandBuffer->begin(); + vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_COMPUTE, cs_pipeline); - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); + // Dispatch counts that exceed device limits + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19c00304); + vkCmdDispatch(m_commandBuffer->handle(), x_limit + 1, y_limit, z_limit); + m_errorMonitor->VerifyFound(); - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; - dsl_binding.pImmutableSamplers = NULL; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19c00306); + vkCmdDispatch(m_commandBuffer->handle(), x_limit, y_limit + 1, z_limit); + m_errorMonitor->VerifyFound(); - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19c00308); + vkCmdDispatch(m_commandBuffer->handle(), x_limit, y_limit, z_limit + 1); + m_errorMonitor->VerifyFound(); - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); + if (khx_dg_ext_available) { + PFN_vkCmdDispatchBaseKHX fp_vkCmdDispatchBaseKHX = + (PFN_vkCmdDispatchBaseKHX)vkGetInstanceProcAddr(instance(), "vkCmdDispatchBaseKHX"); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; + // Base equals or exceeds limit + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e0034a); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_limit, y_limit - 1, z_limit - 1, 0, 0, 0); + m_errorMonitor->VerifyFound(); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e0034c); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_limit - 1, y_limit, z_limit - 1, 0, 0, 0); + m_errorMonitor->VerifyFound(); - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - // We shouldn't need a fragment shader but add it to be able to run - // on more devices - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e0034e); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_limit - 1, y_limit - 1, z_limit, 0, 0, 0); + m_errorMonitor->VerifyFound(); - VkPipelineObj pipe(m_device); - pipe.AddShader(&vs); - pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + // (Base + count) exceeds limit + uint32_t x_base = x_limit / 2; + uint32_t y_base = y_limit / 2; + uint32_t z_base = z_limit / 2; + x_limit -= x_base; + y_limit -= y_base; + z_limit -= z_base; - m_commandBuffer->begin(); - vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e00350); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_base, y_base, z_base, x_limit + 1, y_limit, z_limit); + m_errorMonitor->VerifyFound(); - m_errorMonitor->VerifyFound(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e00352); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_base, y_base, z_base, x_limit, y_limit + 1, z_limit); + m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); -} + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_19e00354); + fp_vkCmdDispatchBaseKHX(m_commandBuffer->handle(), x_base, y_base, z_base, x_limit, y_limit, z_limit + 1); + m_errorMonitor->VerifyFound(); + } else { + printf(" KHX_DEVICE_GROUP_* extensions not supported, skipping CmdDispatchBaseKHX() tests.\n"); + } -TEST_F(VkLayerTest, InvalidBufferViewObject) { - // Create a single TEXEL_BUFFER descriptor and send it an invalid bufferView - // First, cause the bufferView to be invalid due to underlying buffer being destroyed - // Then destroy view itself and verify that same error is hit - VkResult err; + // Clean up + vkDestroyPipeline(device(), cs_pipeline, nullptr); + vkDestroyPipelineLayout(device(), pipe_layout, nullptr); +} - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00286); +TEST_F(VkLayerTest, MultiplaneImageLayoutBadAspectFlags) { + TEST_DESCRIPTION("Query layout of a multiplane image using illegal aspect flag masks"); - ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + // Enable KHR multiplane req'd extensions + bool mp_extensions = InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, + VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION); + if (mp_extensions) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME); + if (mp_extensions) { + m_device_extension_names.push_back(VK_KHR_MAINTENANCE1_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME); + } else { + printf(" test requires KHR multiplane extensions, not available. Skipping.\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + // Query format support + PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPDIFP2KHR = + (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)vkGetInstanceProcAddr(instance(), + "vkGetPhysicalDeviceImageFormatProperties2KHR"); + VkPhysicalDeviceImageFormatInfo2KHR fmt_info = {}; + fmt_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR; + fmt_info.pNext = nullptr; + fmt_info.format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR; + fmt_info.type = VK_IMAGE_TYPE_2D; + fmt_info.tiling = VK_IMAGE_TILING_LINEAR; + fmt_info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + fmt_info.flags = 0; + + VkImageFormatProperties2KHR fmt_props = {}; + fmt_props.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR; + VkResult err_2 = GetPDIFP2KHR(gpu(), &fmt_info, &fmt_props); + + fmt_info.format = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR; + VkResult err_3 = GetPDIFP2KHR(gpu(), &fmt_info, &fmt_props); + + if ((VK_SUCCESS != err_2) || (VK_SUCCESS != err_3)) { + printf(" Multiplane image format not supported. Skipping test.\n"); + return; // Assume there's low ROI on searching for different mp formats + } + + VkImageCreateInfo ci = {}; + ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + ci.pNext = NULL; + ci.flags = fmt_info.flags; + ci.imageType = fmt_info.type; + ci.format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR; + ci.extent = {128, 128, 1}; + ci.mipLevels = 1; + ci.arrayLayers = 1; + ci.samples = VK_SAMPLE_COUNT_1_BIT; + ci.tiling = fmt_info.tiling; + ci.usage = fmt_info.usage; + ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + VkImage image_2plane; + VkResult err = vkCreateImage(device(), &ci, NULL, &image_2plane); + ASSERT_VK_SUCCESS(err); + + ci.format = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR; + VkImage image_3plane; + err = vkCreateImage(device(), &ci, NULL, &image_3plane); + ASSERT_VK_SUCCESS(err); + + // Query layout of 3rd plane, for a 2-plane image + VkImageSubresource subres = {}; + subres.aspectMask = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; + subres.mipLevel = 0; + subres.arrayLayer = 0; + VkSubresourceLayout layout = {}; + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_2a600c5a); + vkGetImageSubresourceLayout(device(), image_2plane, &subres, &layout); + m_errorMonitor->VerifyFound(); + + // Query layout using color aspect, for a 3-plane image + subres.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_2a600c5c); + vkGetImageSubresourceLayout(device(), image_3plane, &subres, &layout); + m_errorMonitor->VerifyFound(); + + // Clean up + vkDestroyImage(device(), image_2plane, NULL); + vkDestroyImage(device(), image_3plane, NULL); +} + +TEST_F(VkPositiveLayerTest, MultiplaneGetImageSubresourceLayout) { + TEST_DESCRIPTION("Positive test, query layout of a single plane of a multiplane image. (repro Github #2530)"); + + // Enable KHR multiplane req'd extensions + bool mp_extensions = InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, + VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION); + if (mp_extensions) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + mp_extensions = mp_extensions && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME); + if (mp_extensions) { + m_device_extension_names.push_back(VK_KHR_MAINTENANCE1_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME); + } else { + printf(" test requires KHR multiplane extensions, not available. Skipping.\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + // Query format support + PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPDIFP2KHR = + (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)vkGetInstanceProcAddr(instance(), + "vkGetPhysicalDeviceImageFormatProperties2KHR"); + VkPhysicalDeviceImageFormatInfo2KHR fmt_info = {}; + fmt_info.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR; + fmt_info.pNext = nullptr; + fmt_info.format = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR; + fmt_info.type = VK_IMAGE_TYPE_2D; + fmt_info.tiling = VK_IMAGE_TILING_LINEAR; + fmt_info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + fmt_info.flags = 0; + + m_errorMonitor->ExpectSuccess(); + VkImageFormatProperties2KHR fmt_props = {}; + fmt_props.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR; + VkResult err = GetPDIFP2KHR(gpu(), &fmt_info, &fmt_props); + m_errorMonitor->VerifyNotFound(); + if (VK_SUCCESS != err) { + printf(" Multiplane image format not supported. Skipping test.\n"); + return; // Assume there's low ROI on searching for a different mp format + } + + VkImageCreateInfo ci = {}; + ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + ci.pNext = NULL; + ci.flags = fmt_info.flags; + ci.imageType = fmt_info.type; + ci.format = fmt_info.format; + ci.extent = {128, 128, 1}; + ci.mipLevels = 1; + ci.arrayLayers = 1; + ci.samples = VK_SAMPLE_COUNT_1_BIT; + ci.tiling = fmt_info.tiling; + ci.usage = fmt_info.usage; + ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + VkImage image; + err = vkCreateImage(device(), &ci, NULL, &image); + ASSERT_VK_SUCCESS(err); + + // Query layout of 3rd plane + VkImageSubresource subres = {}; + subres.aspectMask = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR; + subres.mipLevel = 0; + subres.arrayLayer = 0; + VkSubresourceLayout layout = {}; + + m_errorMonitor->ExpectSuccess(); + vkGetImageSubresourceLayout(device(), image, &subres, &layout); + m_errorMonitor->VerifyNotFound(); + + vkDestroyImage(device(), image, NULL); +} + +TEST_F(VkLayerTest, DescriptorSetNotUpdated) { + TEST_DESCRIPTION("Bind a descriptor set that hasn't been updated."); + VkResult err; + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT, " bound but it was never updated. "); + + ASSERT_NO_FATAL_FAILURE(Init()); + ASSERT_NO_FATAL_FAILURE(InitViewport()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + VkDescriptorPoolSize ds_type_count = {}; + ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; ds_type_count.descriptorCount = 1; VkDescriptorPoolCreateInfo ds_pool_ci = {}; @@ -7514,26 +8653,84 @@ TEST_F(VkLayerTest, InvalidBufferViewObject) { VkDescriptorSetLayoutBinding dsl_binding = {}; dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; dsl_binding.descriptorCount = 1; dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); + + VkDescriptorSet descriptorSet; + VkDescriptorSetAllocateInfo alloc_info = {}; + alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; + alloc_info.descriptorSetCount = 1; + alloc_info.descriptorPool = ds_pool; + alloc_info.pSetLayouts = &ds_layout.handle(); + err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); + ASSERT_VK_SUCCESS(err); + + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); + + VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); + // We shouldn't need a fragment shader but add it to be able to run + // on more devices + VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); + + VkPipelineObj pipe(m_device); + pipe.AddShader(&vs); + pipe.AddShader(&fs); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); + + m_commandBuffer->begin(); + vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); + + m_errorMonitor->VerifyFound(); + + vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); +} + +TEST_F(VkLayerTest, InvalidBufferViewObject) { + // Create a single TEXEL_BUFFER descriptor and send it an invalid bufferView + // First, cause the bufferView to be invalid due to underlying buffer being destroyed + // Then destroy view itself and verify that same error is hit + VkResult err; + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00286); + + ASSERT_NO_FATAL_FAILURE(Init()); + VkDescriptorPoolSize ds_type_count = {}; + ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + ds_type_count.descriptorCount = 1; + + VkDescriptorPoolCreateInfo ds_pool_ci = {}; + ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + ds_pool_ci.pNext = NULL; + ds_pool_ci.maxSets = 1; + ds_pool_ci.poolSizeCount = 1; + ds_pool_ci.pPoolSizes = &ds_type_count; + + VkDescriptorPool ds_pool; + err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); ASSERT_VK_SUCCESS(err); + VkDescriptorSetLayoutBinding dsl_binding = {}; + dsl_binding.binding = 0; + dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + dsl_binding.descriptorCount = 1; + dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; + dsl_binding.pImmutableSamplers = NULL; + + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); + VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); @@ -7600,7 +8797,6 @@ TEST_F(VkLayerTest, InvalidBufferViewObject) { m_errorMonitor->VerifyFound(); vkFreeMemory(m_device->device(), buffer_memory, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -7648,9 +8844,7 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { // 3. Dynamic offset oversteps buffer being updated VkResult err; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - " requires 1 dynamicOffsets, but only " - "0 dynamicOffsets are left in " - "pDynamicOffsets "); + " requires 1 dynamicOffsets, but only 0 dynamicOffsets are left in pDynamicOffsets "); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); @@ -7678,33 +8872,18 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); // Create a buffer to update the descriptor with uint32_t qfi = 0; @@ -7718,16 +8897,14 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { VkBuffer dyub; err = vkCreateBuffer(m_device->device(), &buffCI, NULL, &dyub); ASSERT_VK_SUCCESS(err); - // Allocate memory and bind to buffer so we can make it to the appropriate - // error + // Allocate memory and bind to buffer so we can make it to the appropriate error + VkMemoryRequirements memReqs; + vkGetBufferMemoryRequirements(m_device->device(), dyub, &memReqs); VkMemoryAllocateInfo mem_alloc = {}; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = NULL; - mem_alloc.allocationSize = 1024; + mem_alloc.allocationSize = memReqs.size; mem_alloc.memoryTypeIndex = 0; - - VkMemoryRequirements memReqs; - vkGetBufferMemoryRequirements(m_device->device(), dyub, &memReqs); bool pass = m_device->phy().set_memory_type(memReqs.memoryTypeBits, &mem_alloc, 0); if (!pass) { vkDestroyBuffer(m_device->device(), dyub, NULL); @@ -7758,21 +8935,20 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 0, NULL); m_errorMonitor->VerifyFound(); uint32_t pDynOff[2] = {512, 756}; // Now cause error b/c too many dynOffsets in array for # of dyn descriptors m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attempting to bind 1 descriptorSets with 1 dynamic descriptors, but "); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 2, - pDynOff); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 2, pDynOff); m_errorMonitor->VerifyFound(); // Finally cause error due to dynamicOffset being too big - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - " dynamic offset 512 combined with " - "offset 0 and range 1024 that " - "oversteps the buffer size of 1024"); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + " dynamic offset 512 combined with offset 0 and range 1024 that oversteps the buffer size of 1024"); // Create PSO to be used for draw-time errors below char const *vsSource = "#version 450\n" @@ -7793,8 +8969,8 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); VkViewport viewport = {0, 0, 16, 16, 0, 1}; vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); @@ -7804,28 +8980,24 @@ TEST_F(VkLayerTest, InvalidDynamicOffsetCases) { vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); // This update should succeed, but offset size of 512 will overstep buffer // /w range 1024 & size 1024 - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptorSet, 1, - pDynOff); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptorSet, 1, pDynOff); m_commandBuffer->Draw(1, 0, 0, 0); m_errorMonitor->VerifyFound(); vkDestroyBuffer(m_device->device(), dyub, NULL); vkFreeMemory(m_device->device(), mem, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, DescriptorBufferUpdateNoMemoryBound) { - TEST_DESCRIPTION( - "Attempt to update a descriptor with a non-sparse buffer " - "that doesn't have memory bound"); + TEST_DESCRIPTION("Attempt to update a descriptor with a non-sparse buffer that doesn't have memory bound"); VkResult err; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " used with no memory bound. Memory should be bound by calling vkBindBufferMemory()."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x"); + "vkUpdateDescriptorSets() failed write update validation for Descriptor Set 0x"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); @@ -7853,21 +9025,14 @@ TEST_F(VkLayerTest, DescriptorBufferUpdateNoMemoryBound) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); @@ -7903,12 +9068,10 @@ TEST_F(VkLayerTest, DescriptorBufferUpdateNoMemoryBound) { m_errorMonitor->VerifyFound(); vkDestroyBuffer(m_device->device(), dyub, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, InvalidPushConstants) { - VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -7930,47 +9093,26 @@ TEST_F(VkLayerTest, InvalidPushConstants) { const uint32_t too_big = m_device->props.limits.maxPushConstantsSize + 0x4; const std::array range_tests = {{ - {{VK_SHADER_STAGE_VERTEX_BIT, 0, 0}, - "vkCreatePipelineLayout() call has push constants index 0 with " - "size 0."}, - {{VK_SHADER_STAGE_VERTEX_BIT, 0, 1}, - "vkCreatePipelineLayout() call has push constants index 0 with " - "size 1."}, - {{VK_SHADER_STAGE_VERTEX_BIT, 4, 1}, - "vkCreatePipelineLayout() call has push constants index 0 with " - "size 1."}, - {{VK_SHADER_STAGE_VERTEX_BIT, 4, 0}, - "vkCreatePipelineLayout() call has push constants index 0 with " - "size 0."}, - {{VK_SHADER_STAGE_VERTEX_BIT, 1, 4}, - "vkCreatePipelineLayout() call has push constants index 0 with " - "offset 1. Offset must"}, - {{VK_SHADER_STAGE_VERTEX_BIT, 0, too_big}, - "vkCreatePipelineLayout() call has push constants index 0 " - "with offset "}, - {{VK_SHADER_STAGE_VERTEX_BIT, too_big, too_big}, - "vkCreatePipelineLayout() call has push constants " - "index 0 with offset "}, - {{VK_SHADER_STAGE_VERTEX_BIT, too_big, 4}, - "vkCreatePipelineLayout() call has push constants index 0 " - "with offset "}, + {{VK_SHADER_STAGE_VERTEX_BIT, 0, 0}, "vkCreatePipelineLayout() call has push constants index 0 with size 0."}, + {{VK_SHADER_STAGE_VERTEX_BIT, 0, 1}, "vkCreatePipelineLayout() call has push constants index 0 with size 1."}, + {{VK_SHADER_STAGE_VERTEX_BIT, 4, 1}, "vkCreatePipelineLayout() call has push constants index 0 with size 1."}, + {{VK_SHADER_STAGE_VERTEX_BIT, 4, 0}, "vkCreatePipelineLayout() call has push constants index 0 with size 0."}, + {{VK_SHADER_STAGE_VERTEX_BIT, 1, 4}, "vkCreatePipelineLayout() call has push constants index 0 with offset 1. Offset must"}, + {{VK_SHADER_STAGE_VERTEX_BIT, 0, too_big}, "vkCreatePipelineLayout() call has push constants index 0 with offset "}, + {{VK_SHADER_STAGE_VERTEX_BIT, too_big, too_big}, "vkCreatePipelineLayout() call has push constants index 0 with offset "}, + {{VK_SHADER_STAGE_VERTEX_BIT, too_big, 4}, "vkCreatePipelineLayout() call has push constants index 0 with offset "}, {{VK_SHADER_STAGE_VERTEX_BIT, 0xFFFFFFF0, 0x00000020}, - "vkCreatePipelineLayout() call has push " - "constants index 0 with offset "}, + "vkCreatePipelineLayout() call has push constants index 0 with offset "}, {{VK_SHADER_STAGE_VERTEX_BIT, 0x00000020, 0xFFFFFFF0}, - "vkCreatePipelineLayout() call has push " - "constants index 0 with offset "}, + "vkCreatePipelineLayout() call has push constants index 0 with offset "}, }}; // Check for invalid offset and size for (const auto &iter : range_tests) { pc_range = iter.range; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, iter.msg); - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); m_errorMonitor->VerifyFound(); - if (VK_SUCCESS == err) { - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - } } // Check for invalid stage flag @@ -7980,11 +9122,8 @@ TEST_F(VkLayerTest, InvalidPushConstants) { m_errorMonitor->SetDesiredFailureMsg( VK_DEBUG_REPORT_ERROR_BIT_EXT, "vkCreatePipelineLayout: value of pCreateInfo->pPushConstantRanges[0].stageFlags must not be 0"); - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); m_errorMonitor->VerifyFound(); - if (VK_SUCCESS == err) { - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - } // Check for duplicate stage flags in a list of push constant ranges. // A shader can only have one push constant block and that block is mapped @@ -8040,11 +9179,8 @@ TEST_F(VkLayerTest, InvalidPushConstants) { pipeline_layout_ci.pPushConstantRanges = iter.ranges; pipeline_layout_ci.pushConstantRangeCount = ranges_per_test; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, iter.msg.begin(), iter.msg.end()); - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); m_errorMonitor->VerifyFound(); - if (VK_SUCCESS == err) { - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - } } // @@ -8052,13 +9188,9 @@ TEST_F(VkLayerTest, InvalidPushConstants) { // // Setup a pipeline layout with ranges: [0,16) [64,80) - const VkPushConstantRange pc_range2[] = { - {VK_SHADER_STAGE_VERTEX_BIT, 64, 16}, {VK_SHADER_STAGE_FRAGMENT_BIT, 0, 16}, - }; - pipeline_layout_ci.pushConstantRangeCount = sizeof(pc_range2) / sizeof(VkPushConstantRange); - pipeline_layout_ci.pPushConstantRanges = pc_range2; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const std::vector pc_range2 = {{VK_SHADER_STAGE_VERTEX_BIT, 64, 16}, + {VK_SHADER_STAGE_FRAGMENT_BIT, 0, 16}}; + const VkPipelineLayoutObj pipeline_layout_obj(m_device, {}, pc_range2); const uint8_t dummy_values[100] = {}; @@ -8068,14 +9200,14 @@ TEST_F(VkLayerTest, InvalidPushConstants) { // Check for invalid stage flag // Note that VU 00996 isn't reached due to parameter validation m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "vkCmdPushConstants: value of stageFlags must not be 0"); - vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout, 0, 0, 16, dummy_values); + vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout_obj.handle(), 0, 0, 16, dummy_values); m_errorMonitor->VerifyFound(); m_errorMonitor->ExpectSuccess(); - vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout, VK_SHADER_STAGE_FRAGMENT_BIT, 0, 16, dummy_values); + vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout_obj.handle(), VK_SHADER_STAGE_FRAGMENT_BIT, 0, 16, dummy_values); m_errorMonitor->VerifyNotFound(); m_errorMonitor->ExpectSuccess(); - vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout, VK_SHADER_STAGE_VERTEX_BIT, 64, 16, dummy_values); + vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout_obj.handle(), VK_SHADER_STAGE_VERTEX_BIT, 64, 16, dummy_values); m_errorMonitor->VerifyNotFound(); const std::array cmd_range_tests = {{ {VK_SHADER_STAGE_FRAGMENT_BIT, 64, 16}, @@ -8087,17 +9219,18 @@ TEST_F(VkLayerTest, InvalidPushConstants) { }}; for (const auto &iter : cmd_range_tests) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1bc002de); - vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout, iter.stageFlags, iter.offset, iter.size, dummy_values); + vkCmdPushConstants(m_commandBuffer->handle(), pipeline_layout_obj.handle(), iter.stageFlags, iter.offset, iter.size, + dummy_values); m_errorMonitor->VerifyFound(); } m_commandBuffer->EndRenderPass(); m_commandBuffer->end(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, DescriptorSetCompatibility) { // Test various desriptorSet errors with bad binding combinations + using std::vector; VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); @@ -8147,21 +9280,14 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) { dsl_fs_stage_only.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; // Different stageFlags to cause error at // bind time dsl_fs_stage_only.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = dsl_binding; - static const uint32_t NUM_LAYOUTS = 4; - VkDescriptorSetLayout ds_layout[NUM_LAYOUTS] = {}; - VkDescriptorSetLayout ds_layout_fs_only = {}; + + vector ds_layouts; // Create 4 unique layouts for full pipelineLayout, and 1 special fs-only // layout for error case - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout[0]); - ASSERT_VK_SUCCESS(err); - ds_layout_ci.pBindings = &dsl_fs_stage_only; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout_fs_only); - ASSERT_VK_SUCCESS(err); + ds_layouts.emplace_back(m_device, std::vector(1, dsl_binding[0])); + + const VkDescriptorSetLayoutObj ds_layout_fs_only(m_device, {dsl_fs_stage_only}); + dsl_binding[0].binding = 0; dsl_binding[0].descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; dsl_binding[0].descriptorCount = 2; @@ -8170,74 +9296,45 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) { dsl_binding[1].descriptorCount = 2; dsl_binding[1].stageFlags = VK_SHADER_STAGE_ALL; dsl_binding[1].pImmutableSamplers = NULL; - ds_layout_ci.pBindings = dsl_binding; - ds_layout_ci.bindingCount = 2; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout[1]); - ASSERT_VK_SUCCESS(err); + ds_layouts.emplace_back(m_device, std::vector({dsl_binding[0], dsl_binding[1]})); + dsl_binding[0].binding = 0; dsl_binding[0].descriptorType = VK_DESCRIPTOR_TYPE_SAMPLER; dsl_binding[0].descriptorCount = 5; - ds_layout_ci.bindingCount = 1; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout[2]); - ASSERT_VK_SUCCESS(err); + ds_layouts.emplace_back(m_device, std::vector(1, dsl_binding[0])); + dsl_binding[0].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; dsl_binding[0].descriptorCount = 2; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout[3]); - ASSERT_VK_SUCCESS(err); + ds_layouts.emplace_back(m_device, std::vector(1, dsl_binding[0])); + + const auto &ds_vk_layouts = MakeVkHandles(ds_layouts); static const uint32_t NUM_SETS = 4; VkDescriptorSet descriptorSet[NUM_SETS] = {}; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = NUM_LAYOUTS; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = ds_layout; + alloc_info.descriptorSetCount = ds_vk_layouts.size(); + alloc_info.pSetLayouts = ds_vk_layouts.data(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, descriptorSet); ASSERT_VK_SUCCESS(err); VkDescriptorSet ds0_fs_only = {}; alloc_info.descriptorSetCount = 1; - alloc_info.pSetLayouts = &ds_layout_fs_only; + alloc_info.pSetLayouts = &ds_layout_fs_only.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &ds0_fs_only); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = NUM_LAYOUTS; - pipeline_layout_ci.pSetLayouts = ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layouts[0], &ds_layouts[1]}); // Create pipelineLayout with only one setLayout - pipeline_layout_ci.setLayoutCount = 1; - VkPipelineLayout single_pipe_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &single_pipe_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj single_pipe_layout(m_device, {&ds_layouts[0]}); // Create pipelineLayout with 2 descriptor setLayout at index 0 - pipeline_layout_ci.pSetLayouts = &ds_layout[3]; - VkPipelineLayout pipe_layout_one_desc; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipe_layout_one_desc); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipe_layout_one_desc(m_device, {&ds_layouts[3]}); // Create pipelineLayout with 5 SAMPLER descriptor setLayout at index 0 - pipeline_layout_ci.pSetLayouts = &ds_layout[2]; - VkPipelineLayout pipe_layout_five_samp; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipe_layout_five_samp); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipe_layout_five_samp(m_device, {&ds_layouts[2]}); // Create pipelineLayout with UB type, but stageFlags for FS only - pipeline_layout_ci.pSetLayouts = &ds_layout_fs_only; - VkPipelineLayout pipe_layout_fs_only; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipe_layout_fs_only); - ASSERT_VK_SUCCESS(err); + VkPipelineLayoutObj pipe_layout_fs_only(m_device, {&ds_layout_fs_only}); // Create pipelineLayout w/ incompatible set0 layout, but set1 is fine - VkDescriptorSetLayout pl_bad_s0[2] = {}; - pl_bad_s0[0] = ds_layout_fs_only; - pl_bad_s0[1] = ds_layout[1]; - pipeline_layout_ci.setLayoutCount = 2; - pipeline_layout_ci.pSetLayouts = pl_bad_s0; - VkPipelineLayout pipe_layout_bad_set0; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipe_layout_bad_set0); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipe_layout_bad_set0(m_device, {&ds_layout_fs_only, &ds_layouts[1]}); // Create PSO to be used for draw-time errors below char const *vsSource = @@ -8259,8 +9356,8 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipe_layout_fs_only, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipe_layout_fs_only.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -8285,44 +9382,41 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) { // 2. layoutIndex exceeds # of layouts in layout m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " attempting to bind set to index 1"); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, single_pipe_layout, 0, 2, &descriptorSet[0], - 0, NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, single_pipe_layout.handle(), 0, 2, + &descriptorSet[0], 0, NULL); m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), single_pipe_layout, NULL); // 3. Pipeline setLayout[0] has 2 descriptors, but set being bound has 5 // descriptors m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " has 2 descriptors, but DescriptorSetLayout "); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_one_desc, 0, 1, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_one_desc.handle(), 0, 1, &descriptorSet[0], 0, NULL); m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipe_layout_one_desc, NULL); // 4. same # of descriptors but mismatch in type m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " is type 'VK_DESCRIPTOR_TYPE_SAMPLER' but binding "); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_five_samp, 0, 1, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_five_samp.handle(), 0, 1, &descriptorSet[0], 0, NULL); m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipe_layout_five_samp, NULL); // 5. same # of descriptors but mismatch in stageFlags m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " has stageFlags 16 but binding 0 for DescriptorSetLayout "); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_fs_only, 0, 1, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_fs_only.handle(), 0, 1, &descriptorSet[0], 0, NULL); m_errorMonitor->VerifyFound(); // Now that we're done actively using the pipelineLayout that gfx pipeline // was created with, we should be able to delete it. Do that now to verify // that validation obeys pipelineLayout lifetime - vkDestroyPipelineLayout(m_device->device(), pipe_layout_fs_only, NULL); + pipe_layout_fs_only.Reset(); // Cause draw-time errors due to PSO incompatibilities // 1. Error due to not binding required set (we actually use same code as // above to disturb set0) - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 2, &descriptorSet[0], 0, - NULL); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_bad_set0, 1, 1, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 2, + &descriptorSet[0], 0, NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_bad_set0.handle(), 1, 1, &descriptorSet[1], 0, NULL); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " uses set #0 but that set is not bound."); @@ -8334,21 +9428,15 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) { m_commandBuffer->Draw(1, 0, 0, 0); m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipe_layout_bad_set0, NULL); // 2. Error due to bound set not being compatible with PSO's // VkPipelineLayout (diff stageFlags in this case) - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 2, &descriptorSet[0], 0, - NULL); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 2, + &descriptorSet[0], 0, NULL); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, " bound as set #0 is not compatible with "); m_commandBuffer->Draw(1, 0, 0, 0); m_errorMonitor->VerifyFound(); // Remaining clean-up - for (uint32_t i = 0; i < NUM_LAYOUTS; ++i) { - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout[i], NULL); - } - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout_fs_only, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -8528,43 +9616,18 @@ TEST_F(VkLayerTest, InvalidPipelineCreateState) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - - VkViewport vp = {}; // Just need dummy vp to point to - VkRect2D sc = {}; // dummy scissor to point to - - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.scissorCount = 1; - vp_state_ci.pScissors = ≻ - vp_state_ci.viewportCount = 1; - vp_state_ci.pViewports = &vp; + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); VkPipelineRasterizationStateCreateInfo rs_state_ci = {}; rs_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; @@ -8598,10 +9661,10 @@ TEST_F(VkLayerTest, InvalidPipelineCreateState) { VkGraphicsPipelineCreateInfo gp_ci = {}; gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.pViewportState = &vp_state_ci; + gp_ci.pViewportState = nullptr; // no viewport b/c rasterizer is disabled gp_ci.pRasterizationState = &rs_state_ci; gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; + gp_ci.layout = pipeline_layout.handle(); gp_ci.renderPass = renderPass(); gp_ci.pVertexInputState = &vi_ci; gp_ci.pInputAssemblyState = &ia_ci; @@ -8623,11 +9686,87 @@ TEST_F(VkLayerTest, InvalidPipelineCreateState) { m_errorMonitor->VerifyFound(); vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } +TEST_F(VkLayerTest, InvalidPipelineSampleRateFeatureDisable) { + // Enable sample shading in pipeline when the feature is disabled. + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Disable sampleRateShading here + VkPhysicalDeviceFeatures device_features = {}; + ASSERT_NO_FATAL_FAILURE(GetPhysicalDeviceFeatures(&device_features)); + device_features.sampleRateShading = VK_FALSE; + + ASSERT_NO_FATAL_FAILURE(InitState(&device_features)); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + // Cause the error by enabling sample shading... + auto set_shading_enable = [](CreatePipelineHelper &helper) { helper.pipe_ms_state_ci_.sampleShadingEnable = VK_TRUE; }; + CreatePipelineHelper::OneshotTest(*this, set_shading_enable, VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10000620); +} + +TEST_F(VkLayerTest, InvalidPipelineSampleRateFeatureEnable) { + // Enable sample shading in pipeline when the feature is disabled. + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Require sampleRateShading here + VkPhysicalDeviceFeatures device_features = {}; + ASSERT_NO_FATAL_FAILURE(GetPhysicalDeviceFeatures(&device_features)); + if (device_features.sampleRateShading == VK_FALSE) { + printf(" SampleRateShading feature is disabled -- skipping related checks.\n"); + return; + } + + ASSERT_NO_FATAL_FAILURE(InitState(&device_features)); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + auto range_test = [this](float value, bool positive_test) { + auto info_override = [value](CreatePipelineHelper &helper) { + helper.pipe_ms_state_ci_.sampleShadingEnable = VK_TRUE; + helper.pipe_ms_state_ci_.minSampleShading = value; + }; + CreatePipelineHelper::OneshotTest(*this, info_override, VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10000624, + positive_test); + }; + + range_test(NearestSmaller(0.0F), false); + range_test(NearestGreater(1.0F), false); + range_test(0.0F, /* positive_test= */ true); + range_test(1.0F, /* positive_test= */ true); +} + +TEST_F(VkLayerTest, InvalidPipelineSamplePNext) { + // Enable sample shading in pipeline when the feature is disabled. + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Set up the extension structs + auto sampleLocations = chain_util::Init(); + auto coverageToColor = chain_util::Init(); + auto coverageModulation = chain_util::Init(); + auto discriminatrix = [this](const char *name) { return DeviceExtensionSupported(gpu(), nullptr, name); }; + chain_util::ExtensionChain chain(discriminatrix, &m_device_extension_names); + chain.Add(VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, sampleLocations); + chain.Add(VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME, coverageToColor); + chain.Add(VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME, coverageModulation); + const void *extension_head = chain.Head(); + + ASSERT_NO_FATAL_FAILURE(InitState()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + if (extension_head) { + auto good_chain = [extension_head](CreatePipelineHelper &helper) { helper.pipe_ms_state_ci_.pNext = extension_head; }; + CreatePipelineHelper::OneshotTest(*this, good_chain, (VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT), + "No error", true); + } else { + printf(" Required extension not present -- skipping positive checks.\n"); + } + + auto instance_ci = chain_util::Init(); + auto bad_chain = [&instance_ci](CreatePipelineHelper &helper) { helper.pipe_ms_state_ci_.pNext = &instance_ci; }; + CreatePipelineHelper::OneshotTest(*this, bad_chain, VK_DEBUG_REPORT_WARNING_BIT_EXT, VALIDATION_ERROR_1001c40d); +} + /*// TODO : This test should be good, but needs Tess support in compiler to run TEST_F(VkLayerTest, InvalidPatchControlPoints) { @@ -8769,831 +9908,379 @@ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; } */ -TEST_F(VkLayerTest, PSOViewportScissorCountTests) { - VkResult err; - - TEST_DESCRIPTION("Test various cases of viewport and scissor count validation"); +TEST_F(VkLayerTest, PSOViewportStateTests) { + TEST_DESCRIPTION("Test VkPipelineViewportStateCreateInfo viewport and scissor count validation for non-multiViewport"); - ASSERT_NO_FATAL_FAILURE(Init()); + VkPhysicalDeviceFeatures features{}; + ASSERT_NO_FATAL_FAILURE(Init(&features)); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; + const auto break_vp_state = [](CreatePipelineHelper &helper) { + helper.rs_state_ci_.rasterizerDiscardEnable = VK_FALSE; + helper.gp_ci_.pViewportState = nullptr; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp_state, VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005dc); + + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkViewport viewports[] = {viewport, viewport}; + VkRect2D scissor = {{0, 0}, {64, 64}}; + VkRect2D scissors[] = {scissor, scissor}; + + // test viewport and scissor arrays + using std::vector; + struct TestCase { + uint32_t viewport_count; + VkViewport *viewports; + uint32_t scissor_count; + VkRect2D *scissors; + + vector vuids; + }; - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; + vector test_cases = { + {0, viewports, 1, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00988}}, + {2, viewports, 1, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00988}}, + {1, viewports, 0, scissors, {VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {1, viewports, 2, scissors, {VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {0, viewports, 0, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + {2, viewports, 2, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + {0, viewports, 2, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {2, viewports, 0, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {1, nullptr, 1, scissors, {VALIDATION_ERROR_096005d6}}, + {1, viewports, 1, nullptr, {VALIDATION_ERROR_096005d8}}, + {1, nullptr, 1, nullptr, {VALIDATION_ERROR_096005d6, VALIDATION_ERROR_096005d8}}, + {2, + nullptr, + 3, + nullptr, + {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988, VALIDATION_ERROR_096005d6, + VALIDATION_ERROR_096005d8}}, + {0, nullptr, 0, nullptr, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + }; - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); + for (const auto &test_case : test_cases) { + const auto break_vp = [&test_case](CreatePipelineHelper &helper) { + helper.vp_state_ci_.viewportCount = test_case.viewport_count; + helper.vp_state_ci_.pViewports = test_case.viewports; + helper.vp_state_ci_.scissorCount = test_case.scissor_count; + helper.vp_state_ci_.pScissors = test_case.scissors; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp, VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.vuids); + } + + vector dyn_test_cases = { + {0, viewports, 1, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00988}}, + {2, viewports, 1, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00988}}, + {1, viewports, 0, scissors, {VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {1, viewports, 2, scissors, {VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {0, viewports, 0, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + {2, viewports, 2, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + {0, viewports, 2, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {2, viewports, 0, scissors, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {2, nullptr, 3, nullptr, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982, VALIDATION_ERROR_10c00988}}, + {0, nullptr, 0, nullptr, {VALIDATION_ERROR_10c00980, VALIDATION_ERROR_10c00982}}, + }; - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; + const VkDynamicState dyn_states[] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR}; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; + for (const auto &test_case : dyn_test_cases) { + const auto break_vp = [&](CreatePipelineHelper &helper) { + VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; + dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; + dyn_state_ci.dynamicStateCount = size(dyn_states); + dyn_state_ci.pDynamicStates = dyn_states; + helper.dyn_state_ci_ = dyn_state_ci; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + helper.vp_state_ci_.viewportCount = test_case.viewport_count; + helper.vp_state_ci_.pViewports = test_case.viewports; + helper.vp_state_ci_.scissorCount = test_case.scissor_count; + helper.vp_state_ci_.pScissors = test_case.scissors; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp, VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.vuids); + } +} - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); +// Set Extension dynamic states without enabling the required Extensions. +TEST_F(VkLayerTest, ExtensionDynamicStatesSetWOExtensionEnabled) { + TEST_DESCRIPTION("Create a graphics pipeline with Extension dynamic states without enabling the required Extensions."); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; + ASSERT_NO_FATAL_FAILURE(Init()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + using std::vector; + struct TestCase { + uint32_t dynamic_state_count; + VkDynamicState dynamic_state; - VkViewport vp = {}; - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.scissorCount = 1; - vp_state_ci.viewportCount = 1; - vp_state_ci.pViewports = &vp; + char const *errmsg; + }; - VkPipelineRasterizationStateCreateInfo rs_state_ci = {}; - rs_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_state_ci.polygonMode = VK_POLYGON_MODE_FILL; - rs_state_ci.cullMode = VK_CULL_MODE_BACK_BIT; - rs_state_ci.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; - rs_state_ci.depthClampEnable = VK_FALSE; - rs_state_ci.rasterizerDiscardEnable = VK_FALSE; - rs_state_ci.depthBiasEnable = VK_FALSE; + vector dyn_test_cases = { + {1, VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, + "contains VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, but VK_NV_clip_space_w_scaling"}, + {1, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, + "contains VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, but VK_EXT_discard_rectangles"}, + {1, VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, "contains VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, but VK_EXT_sample_locations"}, + }; - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vi_ci.pNext = nullptr; - vi_ci.vertexBindingDescriptionCount = 0; - vi_ci.pVertexBindingDescriptions = nullptr; - vi_ci.vertexAttributeDescriptionCount = 0; - vi_ci.pVertexAttributeDescriptions = nullptr; + for (const auto &test_case : dyn_test_cases) { + VkDynamicState state[1]; + state[0] = test_case.dynamic_state; + const auto break_vp = [&](CreatePipelineHelper &helper) { + VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; + dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; + dyn_state_ci.dynamicStateCount = test_case.dynamic_state_count; + dyn_state_ci.pDynamicStates = state; + helper.dyn_state_ci_ = dyn_state_ci; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp, VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.errmsg); + } +} - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; +TEST_F(VkLayerTest, PSOViewportStateMultiViewportTests) { + TEST_DESCRIPTION("Test VkPipelineViewportStateCreateInfo viewport and scissor count validation for multiViewport feature"); - VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; - pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - pipe_ms_state_ci.pNext = NULL; - pipe_ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - pipe_ms_state_ci.sampleShadingEnable = 0; - pipe_ms_state_ci.minSampleShading = 1.0; - pipe_ms_state_ci.pSampleMask = NULL; + ASSERT_NO_FATAL_FAILURE(Init()); // enables all supported features - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); + if (!m_device->phy().features().multiViewport) { + printf(" VkPhysicalDeviceFeatures::multiViewport is not supported -- skipping test.\n"); + return; + } + // at least 16 viewports supported from here on - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pMultisampleState = &pipe_ms_state_ci; - gp_ci.pRasterizationState = &rs_state_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkViewport viewports[] = {viewport, viewport}; + VkRect2D scissor = {{0, 0}, {64, 64}}; + VkRect2D scissors[] = {scissor, scissor}; - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; + using std::vector; + struct TestCase { + uint32_t viewport_count; + VkViewport *viewports; + uint32_t scissor_count; + VkRect2D *scissors; - VkPipeline pipeline; - VkPipelineCache pipelineCache; - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); + vector vuids; + }; - if (!m_device->phy().features().multiViewport) { - printf(" MultiViewport feature is disabled -- skipping enabled-state checks.\n"); - - // Check case where multiViewport is disabled and viewport count is not 1 - // We check scissor/viewport simultaneously since separating them would trigger the mismatch error, 1434. - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10c00980); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10c00982); - vp_state_ci.scissorCount = 0; - vp_state_ci.viewportCount = 0; - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - m_errorMonitor->VerifyFound(); + vector test_cases = { + {0, viewports, 2, scissors, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c00988}}, + {2, viewports, 0, scissors, {VALIDATION_ERROR_10c2b61b, VALIDATION_ERROR_10c00988}}, + {0, viewports, 0, scissors, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c2b61b}}, + {2, nullptr, 2, scissors, {VALIDATION_ERROR_096005d6}}, + {2, viewports, 2, nullptr, {VALIDATION_ERROR_096005d8}}, + {2, nullptr, 2, nullptr, {VALIDATION_ERROR_096005d6, VALIDATION_ERROR_096005d8}}, + {0, nullptr, 0, nullptr, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c2b61b}}, + }; + + const auto max_viewports = m_device->phy().properties().limits.maxViewports; + const bool max_viewports_maxxed = max_viewports == std::numeric_limits::max(); + if (max_viewports_maxxed) { + printf( + " VkPhysicalDeviceLimits::maxViewports is UINT32_MAX -- skipping part of test requiring to exceed " + "maxViewports.\n"); } else { - if (m_device->props.limits.maxViewports == 1) { - printf(" Device limit maxViewports is 1, skipping tests that require higher limits.\n"); - } else { - printf(" MultiViewport feature is enabled -- skipping disabled-state checks.\n"); + const auto too_much_viewports = max_viewports + 1; + // avoid potentially big allocations by using only nullptr + test_cases.push_back({too_much_viewports, + nullptr, + 2, + scissors, + {VALIDATION_ERROR_10c00984, VALIDATION_ERROR_10c00988, VALIDATION_ERROR_096005d6}}); + test_cases.push_back({2, + viewports, + too_much_viewports, + nullptr, + {VALIDATION_ERROR_10c00986, VALIDATION_ERROR_10c00988, VALIDATION_ERROR_096005d8}}); + test_cases.push_back( + {too_much_viewports, + nullptr, + too_much_viewports, + nullptr, + {VALIDATION_ERROR_10c00984, VALIDATION_ERROR_10c00986, VALIDATION_ERROR_096005d6, VALIDATION_ERROR_096005d8}}); + } + + for (const auto &test_case : test_cases) { + const auto break_vp = [&test_case](CreatePipelineHelper &helper) { + helper.vp_state_ci_.viewportCount = test_case.viewport_count; + helper.vp_state_ci_.pViewports = test_case.viewports; + helper.vp_state_ci_.scissorCount = test_case.scissor_count; + helper.vp_state_ci_.pScissors = test_case.scissors; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp, VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.vuids); + } - // Check is that viewportcount and scissorcount match - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10c00988); - vp_state_ci.scissorCount = 1; - vp_state_ci.viewportCount = m_device->props.limits.maxViewports; - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - m_errorMonitor->VerifyFound(); + vector dyn_test_cases = { + {0, viewports, 2, scissors, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c00988}}, + {2, viewports, 0, scissors, {VALIDATION_ERROR_10c2b61b, VALIDATION_ERROR_10c00988}}, + {0, viewports, 0, scissors, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c2b61b}}, + {0, nullptr, 0, nullptr, {VALIDATION_ERROR_10c30a1b, VALIDATION_ERROR_10c2b61b}}, + }; - // Check case where multiViewport is enabled and viewport count is greater than max - // We check scissor/viewport simultaneously since separating them would trigger the mismatch error, 1434. - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10c00984); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_10c00986); - vp_state_ci.scissorCount = m_device->props.limits.maxViewports + 1; - vp_state_ci.viewportCount = m_device->props.limits.maxViewports + 1; - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - m_errorMonitor->VerifyFound(); - } + if (!max_viewports_maxxed) { + const auto too_much_viewports = max_viewports + 1; + // avoid potentially big allocations by using only nullptr + dyn_test_cases.push_back( + {too_much_viewports, nullptr, 2, scissors, {VALIDATION_ERROR_10c00984, VALIDATION_ERROR_10c00988}}); + dyn_test_cases.push_back( + {2, viewports, too_much_viewports, nullptr, {VALIDATION_ERROR_10c00986, VALIDATION_ERROR_10c00988}}); + dyn_test_cases.push_back( + {too_much_viewports, nullptr, too_much_viewports, nullptr, {VALIDATION_ERROR_10c00984, VALIDATION_ERROR_10c00986}}); + } + + const VkDynamicState dyn_states[] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR}; + + for (const auto &test_case : dyn_test_cases) { + const auto break_vp = [&](CreatePipelineHelper &helper) { + VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; + dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; + dyn_state_ci.dynamicStateCount = size(dyn_states); + dyn_state_ci.pDynamicStates = dyn_states; + helper.dyn_state_ci_ = dyn_state_ci; + + helper.vp_state_ci_.viewportCount = test_case.viewport_count; + helper.vp_state_ci_.pViewports = test_case.viewports; + helper.vp_state_ci_.scissorCount = test_case.scissor_count; + helper.vp_state_ci_.pScissors = test_case.scissors; + }; + CreatePipelineHelper::OneshotTest(*this, break_vp, VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.vuids); } - - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } -// Don't set viewport state in PSO. This is an error b/c we always need this state for the counts even if the data is going to be -// set dynamically. -TEST_F(VkLayerTest, PSOViewportStateNotSet) { - VkResult err; - - TEST_DESCRIPTION("Create a graphics pipeline with rasterization enabled but no viewport state."); - - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005dc); +TEST_F(VkLayerTest, DynViewportAndScissorUndefinedDrawState) { + TEST_DESCRIPTION("Test viewport and scissor dynamic state that is not set before draw"); ASSERT_NO_FATAL_FAILURE(Init()); - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; - - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; - - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; - - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); + // TODO: should also test on !multiViewport + if (!m_device->phy().features().multiViewport) { + printf(" Device does not support multiple viewports/scissors; skipped.\n"); + return; + } - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; + ASSERT_NO_FATAL_FAILURE(InitViewport()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vi_ci.pNext = nullptr; - vi_ci.vertexBindingDescriptionCount = 0; - vi_ci.pVertexBindingDescriptions = nullptr; - vi_ci.vertexAttributeDescriptionCount = 0; - vi_ci.pVertexAttributeDescriptions = nullptr; + VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); + VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; - pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - pipe_ms_state_ci.pNext = NULL; - pipe_ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_4_BIT; - pipe_ms_state_ci.sampleShadingEnable = 0; - pipe_ms_state_ci.minSampleShading = 1.0; - pipe_ms_state_ci.pSampleMask = NULL; + const VkPipelineLayoutObj pipeline_layout(m_device); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; + VkPipelineObj pipeline_dyn_vp(m_device); + pipeline_dyn_vp.AddShader(&vs); + pipeline_dyn_vp.AddShader(&fs); + pipeline_dyn_vp.AddDefaultColorAttachment(); + pipeline_dyn_vp.MakeDynamic(VK_DYNAMIC_STATE_VIEWPORT); + pipeline_dyn_vp.SetScissor(m_scissors); + ASSERT_VK_SUCCESS(pipeline_dyn_vp.CreateVKPipeline(pipeline_layout.handle(), m_renderPass)); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + VkPipelineObj pipeline_dyn_sc(m_device); + pipeline_dyn_sc.AddShader(&vs); + pipeline_dyn_sc.AddShader(&fs); + pipeline_dyn_sc.AddDefaultColorAttachment(); + pipeline_dyn_sc.SetViewport(m_viewports); + pipeline_dyn_sc.MakeDynamic(VK_DYNAMIC_STATE_SCISSOR); + ASSERT_VK_SUCCESS(pipeline_dyn_sc.CreateVKPipeline(pipeline_layout.handle(), m_renderPass)); - VkDynamicState sc_state = VK_DYNAMIC_STATE_SCISSOR; - // Set scissor as dynamic to avoid second error - VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; - dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; - dyn_state_ci.dynamicStateCount = 1; - dyn_state_ci.pDynamicStates = &sc_state; + m_commandBuffer->begin(); + m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + "Dynamic viewport(s) 0 are used by pipeline state object, "); + vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_dyn_vp.handle()); + vkCmdSetViewport(m_commandBuffer->handle(), 1, 1, + &m_viewports[0]); // Forgetting to set needed 0th viweport (PSO viewportCount == 1) + m_commandBuffer->Draw(1, 0, 0, 0); + m_errorMonitor->VerifyFound(); - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - // We shouldn't need a fragment shader but add it to be able to run on more devices - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineRasterizationStateCreateInfo rs_state_ci = {}; - rs_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_state_ci.polygonMode = VK_POLYGON_MODE_FILL; - rs_state_ci.cullMode = VK_CULL_MODE_BACK_BIT; - rs_state_ci.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; - rs_state_ci.depthClampEnable = VK_FALSE; - rs_state_ci.rasterizerDiscardEnable = VK_FALSE; - rs_state_ci.depthBiasEnable = VK_FALSE; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pRasterizationState = &rs_state_ci; - // Not setting VP state w/o dynamic vp state should cause validation error - gp_ci.pViewportState = NULL; - gp_ci.pDynamicState = &dyn_state_ci; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pMultisampleState = &pipe_ms_state_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); - - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; - - VkPipeline pipeline; - VkPipelineCache pipelineCache; - - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - - m_errorMonitor->VerifyFound(); - - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); -} - -// Create PSO w/o non-zero viewportCount but no viewport data, then run second test where dynamic scissor count doesn't match PSO -// scissor count -TEST_F(VkLayerTest, PSOViewportCountWithoutDataAndDynScissorMismatch) { - VkResult err; - - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005d6); - - ASSERT_NO_FATAL_FAILURE(Init()); - - if (!m_device->phy().features().multiViewport) { - printf(" Device does not support multiple viewports/scissors; skipped.\n"); - return; - } - - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; - - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; - - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; - - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.viewportCount = 1; - vp_state_ci.pViewports = NULL; // Null vp w/ count of 1 should cause error - vp_state_ci.scissorCount = 1; - vp_state_ci.pScissors = NULL; // Scissor is dynamic (below) so this won't cause error - - VkDynamicState sc_state = VK_DYNAMIC_STATE_SCISSOR; - // Set scissor as dynamic to avoid that error - VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; - dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; - dyn_state_ci.dynamicStateCount = 1; - dyn_state_ci.pDynamicStates = &sc_state; - - VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; - pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - pipe_ms_state_ci.pNext = NULL; - pipe_ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - pipe_ms_state_ci.sampleShadingEnable = 0; - pipe_ms_state_ci.minSampleShading = 1.0; - pipe_ms_state_ci.pSampleMask = NULL; - - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); - - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - // We shouldn't need a fragment shader but add it to be able to run on more devices - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vi_ci.pNext = nullptr; - vi_ci.vertexBindingDescriptionCount = 0; - vi_ci.pVertexBindingDescriptions = nullptr; - vi_ci.vertexAttributeDescriptionCount = 0; - vi_ci.pVertexAttributeDescriptions = nullptr; - - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - - VkPipelineRasterizationStateCreateInfo rs_ci = {}; - rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_ci.lineWidth = m_device->props.limits.lineWidthRange[0]; - rs_ci.pNext = nullptr; - - VkPipelineColorBlendAttachmentState att = {}; - att.blendEnable = VK_FALSE; - att.colorWriteMask = 0xf; - - VkPipelineColorBlendStateCreateInfo cb_ci = {}; - cb_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - cb_ci.pNext = nullptr; - cb_ci.attachmentCount = 1; - cb_ci.pAttachments = &att; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pRasterizationState = &rs_ci; - gp_ci.pColorBlendState = &cb_ci; - gp_ci.pDynamicState = &dyn_state_ci; - gp_ci.pMultisampleState = &pipe_ms_state_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); - - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; - - VkPipeline pipeline; - VkPipelineCache pipelineCache; - - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - - m_errorMonitor->VerifyFound(); - - // Now hit second fail case where we set scissor w/ different count than PSO - // First need to successfully create the PSO from above by setting - // pViewports - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic scissor(s) 0 are used by pipeline state object, "); - - VkViewport vp = {}; // Just need dummy vp to point to - vp_state_ci.pViewports = &vp; - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - ASSERT_VK_SUCCESS(err); - m_commandBuffer->begin(); - m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); - VkRect2D scissors[1] = {}; // don't care about data - // Count of 2 doesn't match PSO count of 1 - vkCmdSetScissor(m_commandBuffer->handle(), 1, 1, scissors); - m_commandBuffer->Draw(1, 0, 0, 0); - - m_errorMonitor->VerifyFound(); - - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); - vkDestroyPipeline(m_device->device(), pipeline, NULL); -} - -// Create PSO w/o non-zero scissorCount but no scissor data, then run second test where dynamic viewportCount doesn't match PSO -// viewportCount -TEST_F(VkLayerTest, PSOScissorCountWithoutDataAndDynViewportMismatch) { - VkResult err; - - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005d8); - - ASSERT_NO_FATAL_FAILURE(Init()); - - if (!m_device->phy().features().multiViewport) { - printf(" Device does not support multiple viewports/scissors; skipped.\n"); - return; - } - - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; - - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; - - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; - - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.scissorCount = 1; - vp_state_ci.pScissors = NULL; // Null scissor w/ count of 1 should cause error - vp_state_ci.viewportCount = 1; - vp_state_ci.pViewports = NULL; // vp is dynamic (below) so this won't cause error - - VkDynamicState vp_state = VK_DYNAMIC_STATE_VIEWPORT; - // Set scissor as dynamic to avoid that error - VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; - dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; - dyn_state_ci.dynamicStateCount = 1; - dyn_state_ci.pDynamicStates = &vp_state; - - VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; - pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - pipe_ms_state_ci.pNext = NULL; - pipe_ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - pipe_ms_state_ci.sampleShadingEnable = 0; - pipe_ms_state_ci.minSampleShading = 1.0; - pipe_ms_state_ci.pSampleMask = NULL; - - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); - - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - // We shouldn't need a fragment shader but add it to be able to run on more devices - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vi_ci.pNext = nullptr; - vi_ci.vertexBindingDescriptionCount = 0; - vi_ci.pVertexBindingDescriptions = nullptr; - vi_ci.vertexAttributeDescriptionCount = 0; - vi_ci.pVertexAttributeDescriptions = nullptr; - - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - - VkPipelineRasterizationStateCreateInfo rs_ci = {}; - rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_ci.lineWidth = m_device->props.limits.lineWidthRange[0]; - rs_ci.pNext = nullptr; - - VkPipelineColorBlendAttachmentState att = {}; - att.blendEnable = VK_FALSE; - att.colorWriteMask = 0xf; - - VkPipelineColorBlendStateCreateInfo cb_ci = {}; - cb_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - cb_ci.pNext = nullptr; - cb_ci.attachmentCount = 1; - cb_ci.pAttachments = &att; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pRasterizationState = &rs_ci; - gp_ci.pColorBlendState = &cb_ci; - gp_ci.pDynamicState = &dyn_state_ci; - gp_ci.pMultisampleState = &pipe_ms_state_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); - - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; - - VkPipeline pipeline; - VkPipelineCache pipelineCache; - - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - - m_errorMonitor->VerifyFound(); - - // Now hit second fail case where we set scissor w/ different count than PSO - // First need to successfully create the PSO from above by setting - // pViewports - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "Dynamic viewport(s) 0 are used by pipeline state object, "); - - VkRect2D sc = {}; // Just need dummy vp to point to - vp_state_ci.pScissors = ≻ - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - ASSERT_VK_SUCCESS(err); - m_commandBuffer->begin(); - m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); - VkViewport viewports[1] = {}; - viewports[0].width = 8; - viewports[0].height = 8; - // Count of 2 doesn't match PSO count of 1 - vkCmdSetViewport(m_commandBuffer->handle(), 1, 1, viewports); - m_commandBuffer->Draw(1, 0, 0, 0); - - m_errorMonitor->VerifyFound(); - - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); - vkDestroyPipeline(m_device->device(), pipeline, NULL); -} + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Dynamic scissor(s) 0 are used by pipeline state object, "); + vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_dyn_sc.handle()); + vkCmdSetScissor(m_commandBuffer->handle(), 1, 1, + &m_scissors[0]); // Forgetting to set needed 0th scissor (PSO scissorCount == 1) + m_commandBuffer->Draw(1, 0, 0, 0); + m_errorMonitor->VerifyFound(); +} TEST_F(VkLayerTest, PSOLineWidthInvalid) { - VkResult err; - - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attempt to set lineWidth to -1"); - - ASSERT_NO_FATAL_FAILURE(Init()); - ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - - VkDescriptorPoolSize ds_type_count = {}; - ds_type_count.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - ds_type_count.descriptorCount = 1; - - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.maxSets = 1; - ds_pool_ci.poolSizeCount = 1; - ds_pool_ci.pPoolSizes = &ds_type_count; - - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSetLayoutBinding dsl_binding = {}; - dsl_binding.binding = 0; - dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - dsl_binding.descriptorCount = 1; - dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; - - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds_layout; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.scissorCount = 1; - vp_state_ci.pScissors = NULL; - vp_state_ci.viewportCount = 1; - vp_state_ci.pViewports = NULL; - - VkDynamicState dynamic_states[3] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR, VK_DYNAMIC_STATE_LINE_WIDTH}; - // Set scissor as dynamic to avoid that error - VkPipelineDynamicStateCreateInfo dyn_state_ci = {}; - dyn_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; - dyn_state_ci.dynamicStateCount = 2; - dyn_state_ci.pDynamicStates = dynamic_states; - - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); - - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, - this); // TODO - We shouldn't need a fragment shader - // but add it to be able to run on more devices - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - vi_ci.pNext = nullptr; - vi_ci.vertexBindingDescriptionCount = 0; - vi_ci.pVertexBindingDescriptions = nullptr; - vi_ci.vertexAttributeDescriptionCount = 0; - vi_ci.pVertexAttributeDescriptions = nullptr; - - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - - VkPipelineRasterizationStateCreateInfo rs_ci = {}; - rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_ci.pNext = nullptr; - rs_ci.rasterizerDiscardEnable = VK_TRUE; - - // Check too low (line width of -1.0f). - rs_ci.lineWidth = -1.0f; - - VkPipelineColorBlendAttachmentState att = {}; - att.blendEnable = VK_FALSE; - att.colorWriteMask = 0xf; - - VkPipelineColorBlendStateCreateInfo cb_ci = {}; - cb_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - cb_ci.pNext = nullptr; - cb_ci.attachmentCount = 1; - cb_ci.pAttachments = &att; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pRasterizationState = &rs_ci; - gp_ci.pColorBlendState = &cb_ci; - gp_ci.pDynamicState = &dyn_state_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); - - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; + TEST_DESCRIPTION("Test non-1.0 lineWidth errors when pipeline is created and in vkCmdSetLineWidth"); + VkPhysicalDeviceFeatures features{}; + ASSERT_NO_FATAL_FAILURE(Init(&features)); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - VkPipeline pipeline; - VkPipelineCache pipelineCache; + VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); + VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); + VkPipelineShaderStageCreateInfo shader_state_cis[] = {vs.GetStageCreateInfo(), fs.GetStageCreateInfo()}; - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); + VkPipelineVertexInputStateCreateInfo vi_state_ci = {}; + vi_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - m_errorMonitor->VerifyFound(); - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); + VkPipelineInputAssemblyStateCreateInfo ia_state_ci = {}; + ia_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; + ia_state_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attempt to set lineWidth to 65536"); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {64, 64}}; + VkPipelineViewportStateCreateInfo vp_state_ci = {}; + vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; + vp_state_ci.viewportCount = 1; + vp_state_ci.pViewports = &viewport; + vp_state_ci.scissorCount = 1; + vp_state_ci.pScissors = &scissor; - // Check too high (line width of 65536.0f). - rs_ci.lineWidth = 65536.0f; + VkPipelineRasterizationStateCreateInfo rs_state_ci = {}; + rs_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; + rs_state_ci.rasterizerDiscardEnable = VK_FALSE; + // lineWidth to be set by checks - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); + VkPipelineMultisampleStateCreateInfo ms_state_ci = {}; + ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; + ms_state_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; // must match subpass att. - m_errorMonitor->VerifyFound(); - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); + VkPipelineColorBlendAttachmentState cba_state = {}; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attempt to set lineWidth to -1"); + VkPipelineColorBlendStateCreateInfo cb_state_ci = {}; + cb_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; + cb_state_ci.attachmentCount = 1; // must match count in subpass + cb_state_ci.pAttachments = &cba_state; - dyn_state_ci.dynamicStateCount = 3; + const VkPipelineLayoutObj pipeline_layout(m_device); - rs_ci.lineWidth = 1.0f; + VkGraphicsPipelineCreateInfo gp_ci = {}; + gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; + gp_ci.stageCount = sizeof(shader_state_cis) / sizeof(VkPipelineShaderStageCreateInfo); + gp_ci.pStages = shader_state_cis; + gp_ci.pVertexInputState = &vi_state_ci; + gp_ci.pInputAssemblyState = &ia_state_ci; + gp_ci.pViewportState = &vp_state_ci; + gp_ci.pRasterizationState = &rs_state_ci; + gp_ci.pMultisampleState = &ms_state_ci; + gp_ci.pColorBlendState = &cb_state_ci; + gp_ci.layout = pipeline_layout.handle(); + gp_ci.renderPass = renderPass(); + gp_ci.subpass = 0; - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - m_commandBuffer->begin(); - vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); + const std::vector test_cases = {-1.0f, 0.0f, NearestSmaller(1.0f), NearestGreater(1.0f), NAN}; - // Check too low with dynamic setting. - vkCmdSetLineWidth(m_commandBuffer->handle(), -1.0f); - m_errorMonitor->VerifyFound(); + // test VkPipelineRasterizationStateCreateInfo::lineWidth + for (const auto test_case : test_cases) { + rs_state_ci.lineWidth = test_case; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attempt to set lineWidth to 65536"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005da); + VkPipeline pipeline; + vkCreateGraphicsPipelines(m_device->device(), VK_NULL_HANDLE, 1, &gp_ci, nullptr, &pipeline); + m_errorMonitor->VerifyFound(); + } - // Check too high with dynamic setting. - vkCmdSetLineWidth(m_commandBuffer->handle(), 65536.0f); - m_errorMonitor->VerifyFound(); - m_commandBuffer->end(); + // test vkCmdSetLineWidth + m_commandBuffer->begin(); - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); - vkDestroyPipeline(m_device->device(), pipeline, NULL); + for (const auto test_case : test_cases) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d600628); + vkCmdSetLineWidth(m_commandBuffer->handle(), test_case); + m_errorMonitor->VerifyFound(); + } } TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d4) { @@ -9634,12 +10321,14 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d4) { input_assembly_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - VkViewport viewport{}; + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {64, 64}}; VkPipelineViewportStateCreateInfo viewport_state{}; viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - viewport_state.scissorCount = 1; viewport_state.viewportCount = 1; viewport_state.pViewports = &viewport; + viewport_state.scissorCount = 1; + viewport_state.pScissors = &scissor; VkPipelineMultisampleStateCreateInfo multisample_state{}; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -9657,17 +10346,9 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d4) { rasterization_state.depthClampEnable = VK_FALSE; rasterization_state.rasterizerDiscardEnable = VK_FALSE; rasterization_state.depthBiasEnable = VK_FALSE; + rasterization_state.lineWidth = 1.0f; - VkPipelineLayout pipeline_layout; - { - VkPipelineLayoutCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - create_info.setLayoutCount = 0; - create_info.pSetLayouts = nullptr; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &create_info, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - } + const VkPipelineLayoutObj pipeline_layout(m_device); { VkGraphicsPipelineCreateInfo create_info{}; @@ -9680,7 +10361,7 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d4) { create_info.pMultisampleState = &multisample_state; create_info.pRasterizationState = &rasterization_state; create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - create_info.layout = pipeline_layout; + create_info.layout = pipeline_layout.handle(); create_info.renderPass = renderPass(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_14c004d4); @@ -9690,7 +10371,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d4) { } vkDestroyPipelineCache(m_device->device(), pipeline_cache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d6) { @@ -9732,12 +10412,14 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d6) { input_assembly_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - VkViewport viewport{}; + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {64, 64}}; VkPipelineViewportStateCreateInfo viewport_state{}; viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - viewport_state.scissorCount = 1; viewport_state.viewportCount = 1; viewport_state.pViewports = &viewport; + viewport_state.scissorCount = 1; + viewport_state.pScissors = &scissor; VkPipelineMultisampleStateCreateInfo multisample_state{}; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -9755,17 +10437,9 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d6) { rasterization_state.depthClampEnable = VK_FALSE; rasterization_state.rasterizerDiscardEnable = VK_FALSE; rasterization_state.depthBiasEnable = VK_FALSE; + rasterization_state.lineWidth = 1.0f; - VkPipelineLayout pipeline_layout; - { - VkPipelineLayoutCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - create_info.setLayoutCount = 0; - create_info.pSetLayouts = nullptr; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &create_info, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - } + const VkPipelineLayoutObj pipeline_layout(m_device); { VkGraphicsPipelineCreateInfo create_info{}; @@ -9778,7 +10452,7 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d6) { create_info.pMultisampleState = &multisample_state; create_info.pRasterizationState = &rasterization_state; create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - create_info.layout = pipeline_layout; + create_info.layout = pipeline_layout.handle(); create_info.renderPass = renderPass(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_14c004d6); @@ -9788,7 +10462,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14c004d6) { } vkDestroyPipelineCache(m_device->device(), pipeline_cache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, VALIDATION_ERROR_14a004d8) { @@ -9829,12 +10502,14 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004d8) { input_assembly_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - VkViewport viewport{}; + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {64, 64}}; VkPipelineViewportStateCreateInfo viewport_state{}; viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - viewport_state.scissorCount = 1; viewport_state.viewportCount = 1; viewport_state.pViewports = &viewport; + viewport_state.scissorCount = 1; + viewport_state.pScissors = &scissor; VkPipelineMultisampleStateCreateInfo multisample_state{}; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -9852,17 +10527,9 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004d8) { rasterization_state.depthClampEnable = VK_FALSE; rasterization_state.rasterizerDiscardEnable = VK_FALSE; rasterization_state.depthBiasEnable = VK_FALSE; + rasterization_state.lineWidth = 1.0f; - VkPipelineLayout pipeline_layout; - { - VkPipelineLayoutCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - create_info.setLayoutCount = 0; - create_info.pSetLayouts = nullptr; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &create_info, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - } + const VkPipelineLayoutObj pipeline_layout(m_device); { VkGraphicsPipelineCreateInfo create_info{}; @@ -9875,7 +10542,7 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004d8) { create_info.pMultisampleState = &multisample_state; create_info.pRasterizationState = &rasterization_state; create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - create_info.layout = pipeline_layout; + create_info.layout = pipeline_layout.handle(); create_info.renderPass = renderPass(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_14a004d8); @@ -9885,7 +10552,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004d8) { } vkDestroyPipelineCache(m_device->device(), pipeline_cache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, VALIDATION_ERROR_14a004da) { @@ -9926,12 +10592,14 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004da) { input_assembly_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - VkViewport viewport{}; + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {64, 64}}; VkPipelineViewportStateCreateInfo viewport_state{}; viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - viewport_state.scissorCount = 1; viewport_state.viewportCount = 1; viewport_state.pViewports = &viewport; + viewport_state.scissorCount = 1; + viewport_state.pScissors = &scissor; VkPipelineMultisampleStateCreateInfo multisample_state{}; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -9949,17 +10617,9 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004da) { rasterization_state.depthClampEnable = VK_FALSE; rasterization_state.rasterizerDiscardEnable = VK_FALSE; rasterization_state.depthBiasEnable = VK_FALSE; + rasterization_state.lineWidth = 1.0f; - VkPipelineLayout pipeline_layout; - { - VkPipelineLayoutCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - create_info.setLayoutCount = 0; - create_info.pSetLayouts = nullptr; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &create_info, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - } + const VkPipelineLayoutObj pipeline_layout(m_device); { VkGraphicsPipelineCreateInfo create_info{}; @@ -9972,7 +10632,7 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004da) { create_info.pMultisampleState = &multisample_state; create_info.pRasterizationState = &rasterization_state; create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - create_info.layout = pipeline_layout; + create_info.layout = pipeline_layout.handle(); create_info.renderPass = renderPass(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_14a004da); @@ -9982,7 +10642,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004da) { } vkDestroyPipelineCache(m_device->device(), pipeline_cache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { @@ -9990,9 +10649,7 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { "Test VALIDATION_ERROR_14a004dc: offset must be less than or equal to " "VkPhysicalDeviceLimits::maxVertexInputAttributeOffset"); - if (InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { - m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); - } + EnableDeviceProfileLayer(); ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); @@ -10054,15 +10711,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { input_assembly_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - VkViewport viewport{}; - VkRect2D scissors{}; - VkPipelineViewportStateCreateInfo viewport_state{}; - viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - viewport_state.viewportCount = 1; - viewport_state.pViewports = &viewport; - viewport_state.scissorCount = 1; - viewport_state.pScissors = &scissors; - VkPipelineMultisampleStateCreateInfo multisample_state{}; multisample_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; multisample_state.pNext = nullptr; @@ -10079,17 +10727,9 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { rasterization_state.depthClampEnable = VK_FALSE; rasterization_state.rasterizerDiscardEnable = VK_TRUE; rasterization_state.depthBiasEnable = VK_FALSE; + rasterization_state.lineWidth = 1.0f; - VkPipelineLayout pipeline_layout; - { - VkPipelineLayoutCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - create_info.setLayoutCount = 0; - create_info.pSetLayouts = nullptr; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &create_info, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - } + const VkPipelineLayoutObj pipeline_layout(m_device); { VkGraphicsPipelineCreateInfo create_info{}; @@ -10098,11 +10738,11 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { create_info.pStages = stages; create_info.pVertexInputState = &vertex_input_state; create_info.pInputAssemblyState = &input_assembly_state; - create_info.pViewportState = &viewport_state; + create_info.pViewportState = nullptr; // no viewport b/c rasterizer is disabled create_info.pMultisampleState = &multisample_state; create_info.pRasterizationState = &rasterization_state; create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - create_info.layout = pipeline_layout; + create_info.layout = pipeline_layout.handle(); create_info.renderPass = renderPass(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_14a004dc); @@ -10112,7 +10752,6 @@ TEST_F(VkLayerTest, VALIDATION_ERROR_14a004dc) { } vkDestroyPipelineCache(m_device->device(), pipeline_cache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, NullRenderPass) { @@ -10150,9 +10789,8 @@ TEST_F(VkLayerTest, RenderPassWithinRenderPass) { TEST_F(VkLayerTest, RenderPassClearOpMismatch) { TEST_DESCRIPTION( - "Begin a renderPass where clearValueCount is less than" - "the number of renderPass attachments that use loadOp" - "VK_ATTACHMENT_LOAD_OP_CLEAR."); + "Begin a renderPass where clearValueCount is less than the number of renderPass attachments that use " + "loadOpVK_ATTACHMENT_LOAD_OP_CLEAR."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -10486,10 +11124,10 @@ TEST_F(VkLayerTest, ClearColorImageWithinRenderPass) { m_errorMonitor->VerifyFound(); } -TEST_F(VkLayerTest, ClearDepthStencilImageWithinRenderPass) { - // Call CmdClearDepthStencilImage within an active RenderPass - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "It is invalid to issue this call inside an active render pass"); +TEST_F(VkLayerTest, ClearDepthStencilImageErrors) { + // Hit errors related to vkCmdClearDepthStencilImage() + // 1. Use an image that doesn't have VK_IMAGE_USAGE_TRANSFER_DST_BIT set + // 2. Call CmdClearDepthStencilImage within an active RenderPass ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -10500,9 +11138,6 @@ TEST_F(VkLayerTest, ClearDepthStencilImageWithinRenderPass) { return; } - m_commandBuffer->begin(); - m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - VkClearDepthStencilValue clear_value = {0}; VkMemoryPropertyFlags reqs = 0; VkImageCreateInfo image_create_info = vk_testing::Image::create_info(); @@ -10511,15 +11146,28 @@ TEST_F(VkLayerTest, ClearDepthStencilImageWithinRenderPass) { image_create_info.extent.width = 64; image_create_info.extent.height = 64; image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL; + // Error here is that VK_IMAGE_USAGE_TRANSFER_DST_BIT is excluded for DS image that we'll call Clear on below image_create_info.usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; - vk_testing::Image dstImage; - dstImage.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); - + vk_testing::Image dst_image_bad_usage; + dst_image_bad_usage.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); const VkImageSubresourceRange range = vk_testing::Image::subresource_range(image_create_info, VK_IMAGE_ASPECT_DEPTH_BIT); - vkCmdClearDepthStencilImage(m_commandBuffer->handle(), dstImage.handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_value, 1, &range); + m_commandBuffer->begin(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18a00012); + vkCmdClearDepthStencilImage(m_commandBuffer->handle(), dst_image_bad_usage.handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_value, 1, + &range); + m_errorMonitor->VerifyFound(); + + // Fix usage for next test case + image_create_info.usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; + vk_testing::Image dst_image; + dst_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + + m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18a00017); + vkCmdClearDepthStencilImage(m_commandBuffer->handle(), dst_image.handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_value, 1, &range); m_errorMonitor->VerifyFound(); } @@ -10527,9 +11175,7 @@ TEST_F(VkLayerTest, ClearColorAttachmentsOutsideRenderPass) { // Call CmdClearAttachmentss outside of an active RenderPass m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkCmdClearAttachments(): This call " - "must be issued inside an active " - "render pass"); + "vkCmdClearAttachments(): This call must be issued inside an active render pass"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -10551,13 +11197,10 @@ TEST_F(VkLayerTest, ClearColorAttachmentsOutsideRenderPass) { } TEST_F(VkLayerTest, RenderPassExcessiveNextSubpass) { - TEST_DESCRIPTION( - "Test that an error is produced when CmdNextSubpass is " - "called too many times in a renderpass instance"); + TEST_DESCRIPTION("Test that an error is produced when CmdNextSubpass is called too many times in a renderpass instance"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkCmdNextSubpass(): Attempted to advance " - "beyond final subpass"); + "vkCmdNextSubpass(): Attempted to advance beyond final subpass"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -10574,13 +11217,10 @@ TEST_F(VkLayerTest, RenderPassExcessiveNextSubpass) { } TEST_F(VkLayerTest, RenderPassEndedBeforeFinalSubpass) { - TEST_DESCRIPTION( - "Test that an error is produced when CmdEndRenderPass is " - "called before the final subpass has been reached"); + TEST_DESCRIPTION("Test that an error is produced when CmdEndRenderPass is called before the final subpass has been reached"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkCmdEndRenderPass(): Called before reaching " - "final subpass"); + "vkCmdEndRenderPass(): Called before reaching final subpass"); ASSERT_NO_FATAL_FAILURE(Init()); VkSubpassDescription sd[2] = {{0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0, nullptr, 0, nullptr, nullptr, nullptr, 0, nullptr}, @@ -10649,7 +11289,35 @@ TEST_F(VkLayerTest, InvalidBarriers) { m_addRenderPassSelfDependency = true; ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Image Layout cannot be transitioned to UNDEFINED"); + m_commandBuffer->begin(); + + // Use image unbound to memory in barrier + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + " used with no memory bound. Memory should be bound by calling vkBindImageMemory()"); + vk_testing::Image unbound_image; + auto unbound_image_info = vk_testing::Image::create_info(); + unbound_image_info.format = VK_FORMAT_B8G8R8A8_UNORM; + unbound_image_info.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; + unbound_image.init_no_mem(*m_device, unbound_image_info); + auto unbound_subresource = vk_testing::Image::subresource_range(unbound_image_info, VK_IMAGE_ASPECT_COLOR_BIT); + auto unbound_image_barrier = unbound_image.image_memory_barrier(0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, unbound_subresource); + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, + nullptr, 0, nullptr, 1, &unbound_image_barrier); + m_errorMonitor->VerifyFound(); + + // Use buffer unbound to memory in barrier + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + " used with no memory bound. Memory should be bound by calling vkBindBufferMemory()"); + vk_testing::Buffer unbound_buffer; + auto unbound_buffer_info = vk_testing::Buffer::create_info(16, VK_IMAGE_USAGE_TRANSFER_DST_BIT); + unbound_buffer.init_no_mem(*m_device, unbound_buffer_info); + auto unbound_buffer_barrier = unbound_buffer.buffer_memory_barrier(0, VK_ACCESS_TRANSFER_WRITE_BIT, 0, 16); + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, + nullptr, 1, &unbound_buffer_barrier, 0, nullptr); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a00095c); VkImageObj image(m_device); image.Init(128, 128, 1, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); ASSERT_TRUE(image.initialized()); @@ -10669,7 +11337,6 @@ TEST_F(VkLayerTest, InvalidBarriers) { img_barrier.subresourceRange.baseMipLevel = 0; img_barrier.subresourceRange.layerCount = 1; img_barrier.subresourceRange.levelCount = 1; - m_commandBuffer->begin(); vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_DEPENDENCY_BY_REGION_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); @@ -10701,8 +11368,9 @@ TEST_F(VkLayerTest, InvalidBarriers) { buf_barrier.offset = 0; buf_barrier.size = VK_WHOLE_SIZE; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "which is not less than total size"); - buf_barrier.offset = 257; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_01800946); + // Exceed the buffer size + buf_barrier.offset = buffer.create_info().size + 1; // Offset greater than total size vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_DEPENDENCY_BY_REGION_BIT, 0, nullptr, 1, &buf_barrier, 0, @@ -10710,8 +11378,8 @@ TEST_F(VkLayerTest, InvalidBarriers) { m_errorMonitor->VerifyFound(); buf_barrier.offset = 0; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "whose sum is greater than total size"); - buf_barrier.size = 257; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0180094a); + buf_barrier.size = buffer.create_info().size + 1; // Size greater than total size vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_DEPENDENCY_BY_REGION_BIT, 0, nullptr, 1, &buf_barrier, 0, @@ -10976,6 +11644,185 @@ TEST_F(VkLayerTest, InvalidBarriers) { bad_command_buffer.end(); } +class BarrierQueueFamilyTestHelper { + public: + BarrierQueueFamilyTestHelper(VkLayerTest &test) : layer_test_(test), image_(test.DeviceObj()) {} + // Init with queue familes non-null for CONCURRENT sharing mode (which requires them) + void Init(std::vector *families) { + VkDeviceObj *device_obj = layer_test_.DeviceObj(); + image_.Init(32, 32, 1, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0, families); + ASSERT_TRUE(image_.initialized()); + + image_barrier_ = + image_.image_memory_barrier(VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, image_.Layout(), + image_.Layout(), image_.subresource_range(VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1)); + + VkMemoryPropertyFlags mem_prop = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + buffer_.init_as_src_and_dst(*device_obj, 256, mem_prop, families); + ASSERT_TRUE(buffer_.initialized()); + buffer_barrier_ = + buffer_.buffer_memory_barrier(VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, 0, VK_WHOLE_SIZE); + } + + void operator()(UNIQUE_VALIDATION_ERROR_CODE img_err, UNIQUE_VALIDATION_ERROR_CODE buf_err, uint32_t src, uint32_t dst, + bool positive = false, VkQueue submit = VK_NULL_HANDLE) { + auto monitor = layer_test_.Monitor(); + monitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, img_err); + monitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, buf_err); + + layer_test_.CommandBuffer()->begin(); + image_barrier_.srcQueueFamilyIndex = src; + image_barrier_.dstQueueFamilyIndex = dst; + buffer_barrier_.srcQueueFamilyIndex = src; + buffer_barrier_.dstQueueFamilyIndex = dst; + vkCmdPipelineBarrier(layer_test_.CommandBuffer()->handle(), VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_DEPENDENCY_BY_REGION_BIT, 0, nullptr, 1, &buffer_barrier_, 1, + &image_barrier_); + layer_test_.CommandBuffer()->end(); + + VkCommandBuffer cb_handle = layer_test_.CommandBuffer()->handle(); + if (submit != VK_NULL_HANDLE) { + VkSubmitInfo submit_info = {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, nullptr, nullptr, 1, &cb_handle, 0, nullptr}; + VkResult err = vkQueueSubmit(submit, 1, &submit_info, VK_NULL_HANDLE); + if (positive) { + ASSERT_TRUE(err == VK_SUCCESS); + err = vkQueueWaitIdle(submit); + } + } + vkResetCommandBuffer(cb_handle, 0); + + if (positive) { + monitor->VerifyNotFound(); + } else { + monitor->VerifyFound(); + } + }; + + protected: + VkLayerTest &layer_test_; + VkImageObj image_; + VkImageMemoryBarrier image_barrier_; + vk_testing::Buffer buffer_; + VkBufferMemoryBarrier buffer_barrier_; +}; + +TEST_F(VkLayerTest, InvalidBarrierQueueFamily) { + TEST_DESCRIPTION("Create and submit barriers with invalid queue families"); + ASSERT_NO_FATAL_FAILURE(Init(nullptr, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)); + + // Find queues of two families + const uint32_t submit_family = m_device->graphics_queue_node_index_; + const uint32_t invalid = static_cast(m_device->queue_props.size()); + const uint32_t other_family = submit_family != 0 ? 0 : 1; + const bool only_one_family = invalid == 1; + + if (only_one_family) { + printf(" Single queue family found -- VK_SHARING_MODE_CONCURRENT testcases skipped.\n"); + } else { + std::vector families = {submit_family, other_family}; + BarrierQueueFamilyTestHelper conc_test(*this); + conc_test.Init(&families); + // core_validation::barrier_queue_families::kSrcAndDestMustBeIgnore + conc_test(VALIDATION_ERROR_0a00095e, VALIDATION_ERROR_0180094c, VK_QUEUE_FAMILY_IGNORED, submit_family); + conc_test(VALIDATION_ERROR_0a00095e, VALIDATION_ERROR_0180094c, submit_family, VK_QUEUE_FAMILY_IGNORED); + conc_test(VALIDATION_ERROR_0a00095e, VALIDATION_ERROR_0180094c, submit_family, submit_family); + // true -> positive test + conc_test(VALIDATION_ERROR_0a00095e, VALIDATION_ERROR_0180094c, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, true); + } + + BarrierQueueFamilyTestHelper excl_test(*this); + excl_test.Init(nullptr); // no queue families means *exclusive* sharing mode. + + // core_validation::barrier_queue_families::kBothIgnoreOrBothValid + excl_test(VALIDATION_ERROR_0a000960, VALIDATION_ERROR_01800950, VK_QUEUE_FAMILY_IGNORED, submit_family); + excl_test(VALIDATION_ERROR_0a000960, VALIDATION_ERROR_01800950, submit_family, VK_QUEUE_FAMILY_IGNORED); + // true -> positive test + excl_test(VALIDATION_ERROR_0a000960, VALIDATION_ERROR_01800950, submit_family, submit_family, true); + excl_test(VALIDATION_ERROR_0a000960, VALIDATION_ERROR_01800950, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, true); + + if (only_one_family) { + printf(" Single queue family found -- VK_SHARING_MODE_EXCLUSIVE submit testcases skipped.\n"); + } else { + // core_validation::barrier_queue_families::kSubmitQueueMustMatchSrcOrDst + excl_test(VALIDATION_ERROR_0a00096a, VALIDATION_ERROR_01800958, other_family, other_family, false, m_device->m_queue); + // true -> positive test + // Note: when we start tracking resource onwership, we'll need a way to reset the buffers s.t. this doesn't + // trigger unexpected errors + excl_test(VALIDATION_ERROR_0a00096a, VALIDATION_ERROR_01800958, submit_family, other_family, true, m_device->m_queue); + excl_test(VALIDATION_ERROR_0a00096a, VALIDATION_ERROR_01800958, other_family, submit_family, true, m_device->m_queue); + } +} + +TEST_F(VkLayerTest, InvalidBarrierQueueFamilyWithMemExt) { + TEST_DESCRIPTION("Create and submit barriers with invalid queue families when memory extension is enabled "); + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + // Check for external memory device extensions + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME); + } else { + printf(" External memory extension not supported, skipping test\n"); + return; + } + + ASSERT_NO_FATAL_FAILURE(InitState(nullptr, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)); + + // Find queues of two families + const uint32_t submit_family = m_device->graphics_queue_node_index_; + const uint32_t invalid = static_cast(m_device->queue_props.size()); + const uint32_t other_family = submit_family != 0 ? 0 : 1; + const bool only_one_family = invalid == 1; + + if (only_one_family) { + printf(" Single queue family found -- VK_SHARING_MODE_CONCURRENT testcases skipped.\n"); + } else { + std::vector families = {submit_family, other_family}; + BarrierQueueFamilyTestHelper conc_test(*this); + + // core_validation::barrier_queue_families::kSrcOrDstMustBeIgnore + conc_test.Init(&families); + conc_test(VALIDATION_ERROR_0a000aca, VALIDATION_ERROR_0180094e, submit_family, submit_family); + // true -> positive test + conc_test(VALIDATION_ERROR_0a000aca, VALIDATION_ERROR_0180094e, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, true); + conc_test(VALIDATION_ERROR_0a000aca, VALIDATION_ERROR_0180094e, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_EXTERNAL_KHR, + true); + conc_test(VALIDATION_ERROR_0a000aca, VALIDATION_ERROR_0180094e, VK_QUEUE_FAMILY_EXTERNAL_KHR, VK_QUEUE_FAMILY_IGNORED, + true); + + // core_validation::barrier_queue_families::kSpecialOrIgnoreOnly + conc_test(VALIDATION_ERROR_0a000dcc, VALIDATION_ERROR_01800dc6, submit_family, VK_QUEUE_FAMILY_IGNORED); + conc_test(VALIDATION_ERROR_0a000dcc, VALIDATION_ERROR_01800dc6, VK_QUEUE_FAMILY_IGNORED, submit_family); + // This is to flag the errors that would be considered only "unexpected" in the parallel case above + // true -> positive test + conc_test(VALIDATION_ERROR_0a000dcc, VALIDATION_ERROR_01800dc6, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_EXTERNAL_KHR, + true); + conc_test(VALIDATION_ERROR_0a000dcc, VALIDATION_ERROR_01800dc6, VK_QUEUE_FAMILY_EXTERNAL_KHR, VK_QUEUE_FAMILY_IGNORED, + true); + } + + BarrierQueueFamilyTestHelper excl_test(*this); + excl_test.Init(nullptr); // no queue families means *exclusive* sharing mode. + + // core_validation::barrier_queue_families::kSrcIgnoreRequiresDstIgnore + excl_test(VALIDATION_ERROR_0a000962, VALIDATION_ERROR_01800952, VK_QUEUE_FAMILY_IGNORED, submit_family); + excl_test(VALIDATION_ERROR_0a000962, VALIDATION_ERROR_01800952, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_EXTERNAL_KHR); + // true -> positive test + excl_test(VALIDATION_ERROR_0a000962, VALIDATION_ERROR_01800952, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, true); + + // core_validation::barrier_queue_families::kDstValidOrSpecialIfNotIgnore + excl_test(VALIDATION_ERROR_0a000dd0, VALIDATION_ERROR_01800dca, submit_family, invalid); + // true -> positive test + excl_test(VALIDATION_ERROR_0a000dd0, VALIDATION_ERROR_01800dca, submit_family, submit_family, true); + excl_test(VALIDATION_ERROR_0a000dd0, VALIDATION_ERROR_01800dca, submit_family, VK_QUEUE_FAMILY_IGNORED, true); + excl_test(VALIDATION_ERROR_0a000dd0, VALIDATION_ERROR_01800dca, submit_family, VK_QUEUE_FAMILY_EXTERNAL_KHR, true); + + // core_validation::barrier_queue_families::kSrcValidOrSpecialIfNotIgnore + excl_test(VALIDATION_ERROR_0a000dce, VALIDATION_ERROR_01800dc8, invalid, submit_family); + // true -> positive test + excl_test(VALIDATION_ERROR_0a000dce, VALIDATION_ERROR_01800dc8, submit_family, submit_family, true); + excl_test(VALIDATION_ERROR_0a000dce, VALIDATION_ERROR_01800dc8, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, true); + excl_test(VALIDATION_ERROR_0a000dce, VALIDATION_ERROR_01800dc8, VK_QUEUE_FAMILY_EXTERNAL_KHR, submit_family, true); +} + TEST_F(VkLayerTest, ImageBarrierWithBadRange) { TEST_DESCRIPTION("VkImageMemoryBarrier with an invalid subresourceRange"); @@ -11006,196 +11853,241 @@ TEST_F(VkLayerTest, ImageBarrierWithBadRange) { m_commandBuffer->begin(); - // try for vkCmdPipelineBarrier - {// Try baseMipLevel >= image.mipLevels with VK_REMAINING_MIP_LEVELS - {m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, VK_REMAINING_MIP_LEVELS, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} - -// Try baseMipLevel >= image.mipLevels without VK_REMAINING_MIP_LEVELS -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // Nested scope here confuses clang-format, somehow + // clang-format off -// Try levelCount = 0 -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // try for vkCmdPipelineBarrier + { + // Try baseMipLevel >= image.mipLevels with VK_REMAINING_MIP_LEVELS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, VK_REMAINING_MIP_LEVELS, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// Try baseMipLevel + levelCount > image.mipLevels -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 2, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // Try baseMipLevel >= image.mipLevels without VK_REMAINING_MIP_LEVELS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// Try baseArrayLayer >= image.arrayLayers with VK_REMAINING_ARRAY_LAYERS -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, VK_REMAINING_ARRAY_LAYERS}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // Try levelCount = 0 + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// Try baseArrayLayer >= image.arrayLayers without VK_REMAINING_ARRAY_LAYERS -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // Try baseMipLevel + levelCount > image.mipLevels + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 2, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// Try layerCount = 0 -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 0}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} + // Try baseArrayLayer >= image.arrayLayers with VK_REMAINING_ARRAY_LAYERS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, VK_REMAINING_ARRAY_LAYERS}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// Try baseArrayLayer + layerCount > image.arrayLayers -{ - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 2}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); -} -} + // Try baseArrayLayer >= image.arrayLayers without VK_REMAINING_ARRAY_LAYERS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } -// try for vkCmdWaitEvents -{ - VkEvent event; - VkEventCreateInfo eci{VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, NULL, 0}; - VkResult err = vkCreateEvent(m_device->handle(), &eci, nullptr, &event); - ASSERT_VK_SUCCESS(err); + // Try layerCount = 0 + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 0}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } - // Try baseMipLevel >= image.mipLevels with VK_REMAINING_MIP_LEVELS - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, VK_REMAINING_MIP_LEVELS, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); + // Try baseArrayLayer + layerCount > image.arrayLayers + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 2}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } } - // Try baseMipLevel >= image.mipLevels without VK_REMAINING_MIP_LEVELS + // try for vkCmdWaitEvents { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); - } + VkEvent event; + VkEventCreateInfo eci{VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, NULL, 0}; + VkResult err = vkCreateEvent(m_device->handle(), &eci, nullptr, &event); + ASSERT_VK_SUCCESS(err); - // Try levelCount = 0 - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); - } + // Try baseMipLevel >= image.mipLevels with VK_REMAINING_MIP_LEVELS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, VK_REMAINING_MIP_LEVELS, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try baseMipLevel >= image.mipLevels without VK_REMAINING_MIP_LEVELS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9c); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try levelCount = 0 + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try baseMipLevel + levelCount > image.mipLevels + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 2, 0, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try baseArrayLayer >= image.arrayLayers with VK_REMAINING_ARRAY_LAYERS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, VK_REMAINING_ARRAY_LAYERS}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try baseArrayLayer >= image.arrayLayers without VK_REMAINING_ARRAY_LAYERS + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, 1}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } + + // Try layerCount = 0 + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 0}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } - // Try baseMipLevel + levelCount > image.mipLevels - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000b9e); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 2, 0, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); - } + // Try baseArrayLayer + layerCount > image.arrayLayers + { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); + const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 2}; + VkImageMemoryBarrier img_barrier = img_barrier_template; + img_barrier.subresourceRange = range; + vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); + m_errorMonitor->VerifyFound(); + } - // Try baseArrayLayer >= image.arrayLayers with VK_REMAINING_ARRAY_LAYERS - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, VK_REMAINING_ARRAY_LAYERS}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); + vkDestroyEvent(m_device->handle(), event, nullptr); } +// clang-format on +} - // Try baseArrayLayer >= image.arrayLayers without VK_REMAINING_ARRAY_LAYERS - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba0); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 1, 1}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); +TEST_F(VkLayerTest, ValidationCacheTestBadMerge) { + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (DeviceExtensionSupported(gpu(), "VK_LAYER_LUNARG_core_validation", VK_EXT_VALIDATION_CACHE_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_EXT_VALIDATION_CACHE_EXTENSION_NAME); + } else { + printf(" %s not supported, skipping test\n", VK_EXT_VALIDATION_CACHE_EXTENSION_NAME); + return; } + ASSERT_NO_FATAL_FAILURE(InitState()); - // Try layerCount = 0 - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 0}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); + // Load extension functions + auto fpCreateValidationCache = + (PFN_vkCreateValidationCacheEXT)vkGetDeviceProcAddr(m_device->device(), "vkCreateValidationCacheEXT"); + auto fpDestroyValidationCache = + (PFN_vkDestroyValidationCacheEXT)vkGetDeviceProcAddr(m_device->device(), "vkDestroyValidationCacheEXT"); + auto fpMergeValidationCaches = + (PFN_vkMergeValidationCachesEXT)vkGetDeviceProcAddr(m_device->device(), "vkMergeValidationCachesEXT"); + if (!fpCreateValidationCache || !fpDestroyValidationCache || !fpMergeValidationCaches) { + printf(" Failed to load function pointers for %s\n", VK_EXT_VALIDATION_CACHE_EXTENSION_NAME); + return; } - // Try baseArrayLayer + layerCount > image.arrayLayers - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a000ba2); - const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 2}; - VkImageMemoryBarrier img_barrier = img_barrier_template; - img_barrier.subresourceRange = range; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); - } + VkValidationCacheCreateInfoEXT validationCacheCreateInfo; + validationCacheCreateInfo.sType = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT; + validationCacheCreateInfo.pNext = NULL; + validationCacheCreateInfo.initialDataSize = 0; + validationCacheCreateInfo.pInitialData = NULL; + validationCacheCreateInfo.flags = 0; + VkValidationCacheEXT validationCache = VK_NULL_HANDLE; + VkResult res = fpCreateValidationCache(m_device->device(), &validationCacheCreateInfo, nullptr, &validationCache); + ASSERT_VK_SUCCESS(res); - vkDestroyEvent(m_device->handle(), event, nullptr); -} + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_3e600c00); + res = fpMergeValidationCaches(m_device->device(), validationCache, 1, &validationCache); + m_errorMonitor->VerifyFound(); + + fpDestroyValidationCache(m_device->device(), validationCache, nullptr); } TEST_F(VkPositiveLayerTest, LayoutFromPresentWithoutAccessMemoryRead) { @@ -11350,9 +12242,7 @@ TEST_F(VkLayerTest, InvalidQueueFamilyIndex) { } TEST_F(VkLayerTest, ExecuteCommandsPrimaryCB) { - TEST_DESCRIPTION( - "Attempt vkCmdExecuteCommands with a primary command buffer" - " (should only be secondary)"); + TEST_DESCRIPTION("Attempt vkCmdExecuteCommands with a primary command buffer (should only be secondary)"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -11374,195 +12264,71 @@ TEST_F(VkLayerTest, ExecuteCommandsPrimaryCB) { } TEST_F(VkLayerTest, DSUsageBitsErrors) { - TEST_DESCRIPTION( - "Attempt to update descriptor sets for images and buffers " - "that do not have correct usage bits sets."); - VkResult err; + TEST_DESCRIPTION("Attempt to update descriptor sets for images and buffers that do not have correct usage bits sets."); ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorPoolSize ds_type_count[VK_DESCRIPTOR_TYPE_RANGE_SIZE] = {}; - for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; ++i) { + std::array ds_type_count; + for (uint32_t i = 0; i < ds_type_count.size(); ++i) { ds_type_count[i].type = VkDescriptorType(i); ds_type_count[i].descriptorCount = 1; } - VkDescriptorPoolCreateInfo ds_pool_ci = {}; - ds_pool_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - ds_pool_ci.pNext = NULL; - ds_pool_ci.maxSets = VK_DESCRIPTOR_TYPE_RANGE_SIZE; - ds_pool_ci.poolSizeCount = VK_DESCRIPTOR_TYPE_RANGE_SIZE; - ds_pool_ci.pPoolSizes = ds_type_count; - - VkDescriptorPool ds_pool; - err = vkCreateDescriptorPool(m_device->device(), &ds_pool_ci, NULL, &ds_pool); - ASSERT_VK_SUCCESS(err); - - // Create 10 layouts where each has a single descriptor of different type - VkDescriptorSetLayoutBinding dsl_binding[VK_DESCRIPTOR_TYPE_RANGE_SIZE] = {}; - for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; ++i) { - dsl_binding[i].binding = 0; - dsl_binding[i].descriptorType = VkDescriptorType(i); - dsl_binding[i].descriptorCount = 1; - dsl_binding[i].stageFlags = VK_SHADER_STAGE_ALL; - dsl_binding[i].pImmutableSamplers = NULL; - } - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - VkDescriptorSetLayout ds_layouts[VK_DESCRIPTOR_TYPE_RANGE_SIZE]; + vk_testing::DescriptorPool ds_pool; + ds_pool.init(*m_device, vk_testing::DescriptorPool::create_info(0, VK_DESCRIPTOR_TYPE_RANGE_SIZE, ds_type_count)); + ASSERT_TRUE(ds_pool.initialized()); + + std::vector dsl_bindings(1); + dsl_bindings[0].binding = 0; + dsl_bindings[0].descriptorType = VkDescriptorType(0); + dsl_bindings[0].descriptorCount = 1; + dsl_bindings[0].stageFlags = VK_SHADER_STAGE_ALL; + dsl_bindings[0].pImmutableSamplers = NULL; + + // Create arrays of layout and descriptor objects + using UpDescriptorSet = std::unique_ptr; + std::vector descriptor_sets; + using UpDescriptorSetLayout = std::unique_ptr; + std::vector ds_layouts; + descriptor_sets.reserve(VK_DESCRIPTOR_TYPE_RANGE_SIZE); + ds_layouts.reserve(VK_DESCRIPTOR_TYPE_RANGE_SIZE); for (uint32_t i = 0; i < VK_DESCRIPTOR_TYPE_RANGE_SIZE; ++i) { - ds_layout_ci.pBindings = dsl_binding + i; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, ds_layouts + i); - ASSERT_VK_SUCCESS(err); + dsl_bindings[0].descriptorType = VkDescriptorType(i); + ds_layouts.push_back(UpDescriptorSetLayout(new VkDescriptorSetLayoutObj(m_device, dsl_bindings))); + descriptor_sets.push_back(UpDescriptorSet(ds_pool.alloc_sets(*m_device, *ds_layouts.back()))); + ASSERT_TRUE(descriptor_sets.back()->initialized()); } - VkDescriptorSet descriptor_sets[VK_DESCRIPTOR_TYPE_RANGE_SIZE] = {}; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = VK_DESCRIPTOR_TYPE_RANGE_SIZE; - alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = ds_layouts; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, descriptor_sets); - ASSERT_VK_SUCCESS(err); // Create a buffer & bufferView to be used for invalid updates - VkBufferCreateInfo buff_ci = {}; - buff_ci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - buff_ci.usage = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT; - buff_ci.size = 256; - buff_ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - VkBuffer buffer, storage_texel_buffer; - err = vkCreateBuffer(m_device->device(), &buff_ci, NULL, &buffer); - ASSERT_VK_SUCCESS(err); - - // Create another buffer to use in testing the UNIFORM_TEXEL_BUFFER case - buff_ci.usage = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT; - err = vkCreateBuffer(m_device->device(), &buff_ci, NULL, &storage_texel_buffer); - ASSERT_VK_SUCCESS(err); - - VkMemoryRequirements mem_reqs; - vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); - VkMemoryAllocateInfo mem_alloc_info = {}; - mem_alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - mem_alloc_info.pNext = NULL; - mem_alloc_info.memoryTypeIndex = 0; - mem_alloc_info.allocationSize = mem_reqs.size; - bool pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &mem_alloc_info, 0); - if (!pass) { - vkDestroyBuffer(m_device->device(), buffer, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); - return; - } - VkDeviceMemory mem; - err = vkAllocateMemory(m_device->device(), &mem_alloc_info, NULL, &mem); - ASSERT_VK_SUCCESS(err); - err = vkBindBufferMemory(m_device->device(), buffer, mem, 0); - ASSERT_VK_SUCCESS(err); - - VkBufferViewCreateInfo buff_view_ci = {}; - buff_view_ci.sType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO; - buff_view_ci.buffer = buffer; - buff_view_ci.format = VK_FORMAT_R8_UNORM; - buff_view_ci.range = VK_WHOLE_SIZE; - VkBufferView buff_view; - err = vkCreateBufferView(m_device->device(), &buff_view_ci, NULL, &buff_view); - ASSERT_VK_SUCCESS(err); - - // Now get resources / view for storage_texel_buffer - vkGetBufferMemoryRequirements(m_device->device(), storage_texel_buffer, &mem_reqs); - pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &mem_alloc_info, 0); - if (!pass) { - vkDestroyBuffer(m_device->device(), buffer, NULL); - vkDestroyBufferView(m_device->device(), buff_view, NULL); - vkFreeMemory(m_device->device(), mem, NULL); - vkDestroyBuffer(m_device->device(), storage_texel_buffer, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); - return; - } - VkDeviceMemory storage_texel_buffer_mem; - VkBufferView storage_texel_buffer_view; - err = vkAllocateMemory(m_device->device(), &mem_alloc_info, NULL, &storage_texel_buffer_mem); - ASSERT_VK_SUCCESS(err); - err = vkBindBufferMemory(m_device->device(), storage_texel_buffer, storage_texel_buffer_mem, 0); - ASSERT_VK_SUCCESS(err); - buff_view_ci.buffer = storage_texel_buffer; - err = vkCreateBufferView(m_device->device(), &buff_view_ci, NULL, &storage_texel_buffer_view); - ASSERT_VK_SUCCESS(err); + const VkDeviceSize buffer_size = 256; + uint8_t data[buffer_size]; + VkConstantBufferObj buffer(m_device, buffer_size, data, VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT); + VkConstantBufferObj storage_texel_buffer(m_device, buffer_size, data, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT); + ASSERT_TRUE(buffer.initialized() && storage_texel_buffer.initialized()); + + auto buff_view_ci = vk_testing::BufferView::createInfo(buffer.handle(), VK_FORMAT_R8_UNORM); + vk_testing::BufferView buffer_view_obj, storage_texel_buffer_view_obj; + buffer_view_obj.init(*m_device, buff_view_ci); + buff_view_ci.buffer = storage_texel_buffer.handle(); + storage_texel_buffer_view_obj.init(*m_device, buff_view_ci); + ASSERT_TRUE(buffer_view_obj.initialized() && storage_texel_buffer_view_obj.initialized()); + VkBufferView buffer_view = buffer_view_obj.handle(); + VkBufferView storage_texel_buffer_view = storage_texel_buffer_view_obj.handle(); // Create an image to be used for invalid updates - // Find a format / tiling for COLOR_ATTACHMENT - VkImageCreateInfo image_ci = {}; - image_ci.format = VK_FORMAT_UNDEFINED; - for (int f = VK_FORMAT_BEGIN_RANGE; f <= VK_FORMAT_END_RANGE; f++) { - VkFormat format = static_cast(f); - VkFormatProperties fProps = m_device->format_properties(format); - if (fProps.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { - image_ci.format = format; - image_ci.tiling = VK_IMAGE_TILING_LINEAR; - break; - } else if (fProps.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { - image_ci.format = format; - image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; - break; - } - } - if (image_ci.format == VK_FORMAT_UNDEFINED) { - return; - } - - image_ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - image_ci.imageType = VK_IMAGE_TYPE_2D; - image_ci.extent.width = 64; - image_ci.extent.height = 64; - image_ci.extent.depth = 1; - image_ci.mipLevels = 1; - image_ci.arrayLayers = 1; - image_ci.samples = VK_SAMPLE_COUNT_1_BIT; - image_ci.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED; - image_ci.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - image_ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - VkImage image; - err = vkCreateImage(m_device->device(), &image_ci, NULL, &image); - ASSERT_VK_SUCCESS(err); - // Bind memory to image - VkDeviceMemory image_mem; - - VkMemoryAllocateInfo mem_alloc = {}; - mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - mem_alloc.pNext = NULL; - mem_alloc.allocationSize = 0; - mem_alloc.memoryTypeIndex = 0; - vkGetImageMemoryRequirements(m_device->device(), image, &mem_reqs); - mem_alloc.allocationSize = mem_reqs.size; - pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &mem_alloc, 0); - ASSERT_TRUE(pass); - err = vkAllocateMemory(m_device->device(), &mem_alloc, NULL, &image_mem); - ASSERT_VK_SUCCESS(err); - err = vkBindImageMemory(m_device->device(), image, image_mem, 0); - ASSERT_VK_SUCCESS(err); - // Now create view for image - VkImageViewCreateInfo image_view_ci = {}; - image_view_ci.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - image_view_ci.image = image; - image_view_ci.format = image_ci.format; - image_view_ci.viewType = VK_IMAGE_VIEW_TYPE_2D; - image_view_ci.subresourceRange.layerCount = 1; - image_view_ci.subresourceRange.baseArrayLayer = 0; - image_view_ci.subresourceRange.levelCount = 1; - image_view_ci.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - VkImageView image_view; - err = vkCreateImageView(m_device->device(), &image_view_ci, NULL, &image_view); - ASSERT_VK_SUCCESS(err); + VkImageObj image_obj(m_device); + image_obj.InitNoLayout(64, 64, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); + ASSERT_TRUE(image_obj.initialized()); + VkImageView image_view = image_obj.targetView(VK_FORMAT_R8G8B8A8_UNORM); VkDescriptorBufferInfo buff_info = {}; - buff_info.buffer = buffer; + buff_info.buffer = buffer.handle(); VkDescriptorImageInfo img_info = {}; img_info.imageView = image_view; VkWriteDescriptorSet descriptor_write = {}; descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; descriptor_write.dstBinding = 0; descriptor_write.descriptorCount = 1; - descriptor_write.pTexelBufferView = &buff_view; + descriptor_write.pTexelBufferView = &buffer_view; descriptor_write.pBufferInfo = &buff_info; descriptor_write.pImageInfo = &img_info; @@ -11587,44 +12353,30 @@ TEST_F(VkLayerTest, DSUsageBitsErrors) { descriptor_write.pTexelBufferView = &storage_texel_buffer_view; } descriptor_write.descriptorType = VkDescriptorType(i); - descriptor_write.dstSet = descriptor_sets[i]; + descriptor_write.dstSet = descriptor_sets[i]->handle(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, error_codes[i]); vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); m_errorMonitor->VerifyFound(); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layouts[i], NULL); if (VkDescriptorType(i) == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) { - descriptor_write.pTexelBufferView = &buff_view; + descriptor_write.pTexelBufferView = &buffer_view; } } - - vkDestroyDescriptorSetLayout(m_device->device(), ds_layouts[0], NULL); - vkDestroyImage(m_device->device(), image, NULL); - vkFreeMemory(m_device->device(), image_mem, NULL); - vkDestroyImageView(m_device->device(), image_view, NULL); - vkDestroyBuffer(m_device->device(), buffer, NULL); - vkDestroyBuffer(m_device->device(), storage_texel_buffer, NULL); - vkDestroyBufferView(m_device->device(), buff_view, NULL); - vkDestroyBufferView(m_device->device(), storage_texel_buffer_view, NULL); - vkFreeMemory(m_device->device(), mem, NULL); - vkFreeMemory(m_device->device(), storage_texel_buffer_mem, NULL); - vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } TEST_F(VkLayerTest, DSBufferInfoErrors) { TEST_DESCRIPTION( - "Attempt to update buffer descriptor set that has incorrect " - "parameters in VkDescriptorBufferInfo struct. This includes:\n" + "Attempt to update buffer descriptor set that has incorrect parameters in VkDescriptorBufferInfo struct. This includes:\n" "1. offset value greater than or equal to buffer size\n" "2. range value of 0\n" "3. range value greater than buffer (size - offset)"); VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); // Create a buffer to be used for invalid updates VkBufferCreateInfo buff_ci = {}; @@ -11637,14 +12389,13 @@ TEST_F(VkLayerTest, DSBufferInfoErrors) { ASSERT_VK_SUCCESS(err); // Have to bind memory to buffer before descriptor update + VkMemoryRequirements mem_reqs; + vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); VkMemoryAllocateInfo mem_alloc = {}; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = NULL; - mem_alloc.allocationSize = buff_ci.size; + mem_alloc.allocationSize = mem_reqs.size; mem_alloc.memoryTypeIndex = 0; - - VkMemoryRequirements mem_reqs; - vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); bool pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &mem_alloc, 0); if (!pass) { vkDestroyBuffer(m_device->device(), buffer, NULL); @@ -11709,122 +12460,103 @@ TEST_F(VkLayerTest, DSBufferLimitErrors) { ASSERT_NO_FATAL_FAILURE(Init()); - // Create layout with single uniform buffer & single storage buffer descriptor - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - { 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - // Create a buffer to be used for invalid updates - auto max_ub_range = m_device->props.limits.maxUniformBufferRange; - auto min_ub_align = m_device->props.limits.minUniformBufferOffsetAlignment; - auto max_sb_range = m_device->props.limits.maxStorageBufferRange; - auto min_sb_align = m_device->props.limits.minStorageBufferOffsetAlignment; - VkBufferCreateInfo ub_ci = {}; - ub_ci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - ub_ci.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; - ub_ci.size = max_ub_range + 128; // Make buffer bigger than range limit - ub_ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - VkBuffer uniform_buffer; - err = vkCreateBuffer(m_device->device(), &ub_ci, NULL, &uniform_buffer); - ASSERT_VK_SUCCESS(err); - VkBufferCreateInfo sb_ci = {}; - sb_ci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - sb_ci.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT; - sb_ci.size = max_sb_range + 128; // Make buffer bigger than range limit - sb_ci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - VkBuffer storage_buffer; - err = vkCreateBuffer(m_device->device(), &sb_ci, NULL, &storage_buffer); - ASSERT_VK_SUCCESS(err); - // Have to bind memory to buffer before descriptor update - VkMemoryAllocateInfo mem_alloc = {}; - mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - mem_alloc.pNext = NULL; - mem_alloc.allocationSize = ub_ci.size + sb_ci.size + 1024; // additional buffer for offset - mem_alloc.memoryTypeIndex = 0; + struct TestCase { + VkDescriptorType descriptor_type; + VkBufferUsageFlagBits buffer_usage; + VkDeviceSize max_range; + UNIQUE_VALIDATION_ERROR_CODE max_range_vu; + VkDeviceSize min_align; + UNIQUE_VALIDATION_ERROR_CODE min_align_vu; + }; - VkMemoryRequirements ub_mem_reqs, sb_mem_reqs; - vkGetBufferMemoryRequirements(m_device->device(), uniform_buffer, &ub_mem_reqs); - bool pass = m_device->phy().set_memory_type(ub_mem_reqs.memoryTypeBits, &mem_alloc, 0); - vkGetBufferMemoryRequirements(m_device->device(), storage_buffer, &sb_mem_reqs); - pass &= m_device->phy().set_memory_type(sb_mem_reqs.memoryTypeBits, &mem_alloc, 0); - if (!pass) { - vkDestroyBuffer(m_device->device(), uniform_buffer, NULL); - vkDestroyBuffer(m_device->device(), storage_buffer, NULL); - return; - } + for (const auto &test_case : { + TestCase({VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, + m_device->props.limits.maxUniformBufferRange, VALIDATION_ERROR_15c00298, + m_device->props.limits.minUniformBufferOffsetAlignment, VALIDATION_ERROR_15c0028e}), + TestCase({VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, + m_device->props.limits.maxStorageBufferRange, VALIDATION_ERROR_15c0029a, + m_device->props.limits.minStorageBufferOffsetAlignment, VALIDATION_ERROR_15c00290}), + }) { + // Create layout with single buffer + OneOffDescriptorSet ds(m_device, { + {0, test_case.descriptor_type, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + + // Create a buffer to be used for invalid updates + VkBufferCreateInfo bci = {}; + bci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; + bci.usage = test_case.buffer_usage; + bci.size = test_case.max_range + test_case.min_align; // Make buffer bigger than range limit + bci.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + VkBuffer buffer; + err = vkCreateBuffer(m_device->device(), &bci, NULL, &buffer); + ASSERT_VK_SUCCESS(err); - VkDeviceMemory mem; - err = vkAllocateMemory(m_device->device(), &mem_alloc, NULL, &mem); - if (VK_SUCCESS != err) { - printf(" Failed to allocate memory in DSBufferLimitErrors; skipped.\n"); - vkDestroyBuffer(m_device->device(), uniform_buffer, NULL); - vkDestroyBuffer(m_device->device(), storage_buffer, NULL); - return; - } - ASSERT_VK_SUCCESS(err); - err = vkBindBufferMemory(m_device->device(), uniform_buffer, mem, 0); - ASSERT_VK_SUCCESS(err); - auto sb_offset = (ub_ci.size + sb_mem_reqs.alignment - 1) & ~(sb_mem_reqs.alignment - 1); - err = vkBindBufferMemory(m_device->device(), storage_buffer, mem, sb_offset); - ASSERT_VK_SUCCESS(err); + // Have to bind memory to buffer before descriptor update + VkMemoryRequirements mem_reqs; + vkGetBufferMemoryRequirements(m_device->device(), buffer, &mem_reqs); - VkDescriptorBufferInfo buff_info = {}; - buff_info.buffer = uniform_buffer; - buff_info.range = ub_ci.size; // This will exceed limit - VkWriteDescriptorSet descriptor_write = {}; - descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - descriptor_write.dstBinding = 0; - descriptor_write.descriptorCount = 1; - descriptor_write.pTexelBufferView = nullptr; - descriptor_write.pBufferInfo = &buff_info; - descriptor_write.pImageInfo = nullptr; + VkMemoryAllocateInfo mem_alloc = {}; + mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + mem_alloc.pNext = NULL; + mem_alloc.allocationSize = mem_reqs.size; + bool pass = m_device->phy().set_memory_type(mem_reqs.memoryTypeBits, &mem_alloc, 0); + if (!pass) { + printf(" Failed to allocate memory in DSBufferLimitErrors; skipped.\n"); + vkDestroyBuffer(m_device->device(), buffer, NULL); + continue; + } - descriptor_write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - descriptor_write.dstSet = ds.set_; - if (max_ub_range != UINT32_MAX) { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00298); - vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); - m_errorMonitor->VerifyFound(); - } - // Reduce size of range to acceptable limit & cause offset error - buff_info.range = max_ub_range; - buff_info.offset = min_ub_align - 1; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c0028e); - vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); - m_errorMonitor->VerifyFound(); + VkDeviceMemory mem; + err = vkAllocateMemory(m_device->device(), &mem_alloc, NULL, &mem); + if (VK_SUCCESS != err) { + printf(" Failed to allocate memory in DSBufferLimitErrors; skipped.\n"); + vkDestroyBuffer(m_device->device(), buffer, NULL); + continue; + } + err = vkBindBufferMemory(m_device->device(), buffer, mem, 0); + ASSERT_VK_SUCCESS(err); - // Now break storage updates - buff_info.buffer = storage_buffer; - buff_info.range = sb_ci.size; // This will exceed limit - buff_info.offset = 0; // Reset offset for this update + VkDescriptorBufferInfo buff_info = {}; + buff_info.buffer = buffer; + VkWriteDescriptorSet descriptor_write = {}; + descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + descriptor_write.dstBinding = 0; + descriptor_write.descriptorCount = 1; + descriptor_write.pTexelBufferView = nullptr; + descriptor_write.pBufferInfo = &buff_info; + descriptor_write.pImageInfo = nullptr; + descriptor_write.descriptorType = test_case.descriptor_type; + descriptor_write.dstSet = ds.set_; - descriptor_write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; - descriptor_write.dstBinding = 1; - if (max_ub_range != UINT32_MAX) { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c0029a); - vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); - m_errorMonitor->VerifyFound(); - } + // Exceed range limit + if (test_case.max_range != UINT32_MAX) { + buff_info.range = test_case.max_range + 1; + buff_info.offset = 0; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.max_range_vu); + vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); + m_errorMonitor->VerifyFound(); + } - // Reduce size of range to acceptable limit & cause offset error - buff_info.range = max_sb_range; - buff_info.offset = min_sb_align - 1; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00290); - vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); - m_errorMonitor->VerifyFound(); + // Reduce size of range to acceptable limit and cause offset error + if (test_case.min_align > 1) { + buff_info.range = test_case.max_range; + buff_info.offset = test_case.min_align - 1; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.min_align_vu); + vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); + m_errorMonitor->VerifyFound(); + } - vkFreeMemory(m_device->device(), mem, NULL); - vkDestroyBuffer(m_device->device(), uniform_buffer, NULL); - vkDestroyBuffer(m_device->device(), storage_buffer, NULL); + // Cleanup + vkFreeMemory(m_device->device(), mem, NULL); + vkDestroyBuffer(m_device->device(), buffer, NULL); + } } TEST_F(VkLayerTest, DSAspectBitsErrors) { // TODO : Initially only catching case where DEPTH & STENCIL aspect bits // are set, but could expand this test to hit more cases. - TEST_DESCRIPTION( - "Attempt to update descriptor sets for images " - "that do not have correct aspect bits sets."); + TEST_DESCRIPTION("Attempt to update descriptor sets for images that do not have correct aspect bits sets."); VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); @@ -11834,9 +12566,9 @@ TEST_F(VkLayerTest, DSAspectBitsErrors) { return; } - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); // Create an image to be used for invalid updates VkImageCreateInfo image_ci = {}; @@ -11900,9 +12632,7 @@ TEST_F(VkLayerTest, DSAspectBitsErrors) { descriptor_write.pImageInfo = &img_info; descriptor_write.descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; descriptor_write.dstSet = ds.set_; - const char *error_msg = - " please only set either VK_IMAGE_ASPECT_DEPTH_BIT " - "or VK_IMAGE_ASPECT_STENCIL_BIT "; + const char *error_msg = " please only set either VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT "; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, error_msg); vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); @@ -11917,33 +12647,16 @@ TEST_F(VkLayerTest, DSTypeMismatch) { // Create DS w/ layout of one type and attempt Update w/ mis-matched type VkResult err; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - " binding #0 with type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER but update " - "type is VK_DESCRIPTOR_TYPE_SAMPLER"); - - ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + " binding #0 with type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER but update type is VK_DESCRIPTOR_TYPE_SAMPLER"); + + ASSERT_NO_FATAL_FAILURE(Init()); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -11972,11 +12685,16 @@ TEST_F(VkLayerTest, DSUpdateOutOfBounds) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00282); ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkBufferTest buffer_test(m_device, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT); + if (!buffer_test.GetBufferCurrent()) { + // Something prevented creation of buffer so abort + printf(" Buffer creation failed, skipping test\n"); + return; + } // Correctly update descriptor to avoid "NOT_UPDATED" error VkDescriptorBufferInfo buff_info = {}; @@ -12005,29 +12723,11 @@ TEST_F(VkLayerTest, InvalidDSUpdateIndex) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c00276); ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -12058,25 +12758,11 @@ TEST_F(VkLayerTest, DSUpdateEmptyBinding) { ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLER, 0 /* !! */, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLER, 0 /* !! */, VK_SHADER_STAGE_ALL, nullptr}, + }); + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -12110,28 +12796,11 @@ TEST_F(VkLayerTest, InvalidDSUpdateStruct) { ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -12160,9 +12829,9 @@ TEST_F(VkLayerTest, SampleDescriptorUpdateError) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c0028a); ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkSampler sampler = (VkSampler)((size_t)0xbaadbeef); // Sampler with invalid handle @@ -12192,29 +12861,11 @@ TEST_F(VkLayerTest, ImageViewDescriptorUpdateError) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15c0028c); ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -12248,35 +12899,15 @@ TEST_F(VkLayerTest, CopyDescriptorUpdateErrors) { VkResult err; m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - " binding #1 with type " - "VK_DESCRIPTOR_TYPE_SAMPLER. Types do " - "not match."); - - ASSERT_NO_FATAL_FAILURE(Init()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - { 1, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + " binding #1 with type VK_DESCRIPTOR_TYPE_SAMPLER. Types do not match."); + + ASSERT_NO_FATAL_FAILURE(Init()); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + {1, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); @@ -12321,10 +12952,8 @@ TEST_F(VkLayerTest, CopyDescriptorUpdateErrors) { // Now perform a copy update that fails due to binding out of bounds m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - " binding#1 with offset index of 1 plus " - "update array offset of 0 and update of " - "5 descriptors oversteps total number " - "of descriptors in set: 2."); + " binding#1 with offset index of 1 plus update array offset of 0 and update of 5 " + "descriptors oversteps total number of descriptors in set: 2."); memset(©_ds_update, 0, sizeof(VkCopyDescriptorSet)); copy_ds_update.sType = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET; @@ -12335,24 +12964,55 @@ TEST_F(VkLayerTest, CopyDescriptorUpdateErrors) { copy_ds_update.descriptorCount = 5; // ERROR copy 5 descriptors (out of bounds for layout) vkUpdateDescriptorSets(m_device->device(), 0, NULL, 1, ©_ds_update); - m_errorMonitor->VerifyFound(); + m_errorMonitor->VerifyFound(); + + vkDestroySampler(m_device->device(), sampler, NULL); +} + +TEST_F(VkPositiveLayerTest, CopyNonupdatedDescriptors) { + TEST_DESCRIPTION("Copy nonupdated descriptors"); + unsigned int i; + + ASSERT_NO_FATAL_FAILURE(Init()); + OneOffDescriptorSet src_ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + {1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_ALL, nullptr}, + {2, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + OneOffDescriptorSet dst_ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + {1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); + + m_errorMonitor->ExpectSuccess(); - vkDestroySampler(m_device->device(), sampler, NULL); + const unsigned int copy_size = 2; + VkCopyDescriptorSet copy_ds_update[copy_size]; + memset(copy_ds_update, 0, sizeof(copy_ds_update)); + for (i = 0; i < copy_size; i++) { + copy_ds_update[i].sType = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET; + copy_ds_update[i].srcSet = src_ds.set_; + copy_ds_update[i].srcBinding = i; + copy_ds_update[i].dstSet = dst_ds.set_; + copy_ds_update[i].dstBinding = i; + copy_ds_update[i].descriptorCount = 1; + } + vkUpdateDescriptorSets(m_device->device(), 0, NULL, copy_size, copy_ds_update); + + m_errorMonitor->VerifyNotFound(); } TEST_F(VkLayerTest, NumSamplesMismatch) { // Create CommandBuffer where MSAA samples doesn't match RenderPass // sampleCount - VkResult err; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Num samples mismatch! "); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -12362,15 +13022,7 @@ TEST_F(VkLayerTest, NumSamplesMismatch) { pipe_ms_state_ci.minSampleShading = 1.0; pipe_ms_state_ci.pSampleMask = NULL; - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader @@ -12378,9 +13030,9 @@ TEST_F(VkLayerTest, NumSamplesMismatch) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.SetMSAA(&pipe_ms_state_ci); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -12399,45 +13051,29 @@ TEST_F(VkLayerTest, NumSamplesMismatch) { m_commandBuffer->end(); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, RenderPassIncompatible) { TEST_DESCRIPTION( - "Hit RenderPass incompatible cases. " - "Initial case is drawing with an active renderpass that's " - "not compatible with the bound pipeline state object's creation renderpass"); - VkResult err; + "Hit RenderPass incompatible cases. Initial case is drawing with an active renderpass that's not compatible with the bound " + "pipeline state object's creation renderpass"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader // but add it to be able to run on more devices // Create a renderpass that will be incompatible with default renderpass - VkAttachmentReference attach = {}; - attach.layout = VK_IMAGE_LAYOUT_GENERAL; VkAttachmentReference color_att = {}; color_att.layout = VK_IMAGE_LAYOUT_GENERAL; VkSubpassDescription subpass = {}; - subpass.inputAttachmentCount = 1; - subpass.pInputAttachments = &attach; subpass.colorAttachmentCount = 1; subpass.pColorAttachments = &color_att; VkRenderPassCreateInfo rpci = {}; @@ -12456,14 +13092,14 @@ TEST_F(VkLayerTest, RenderPassIncompatible) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - VkViewport view_port = {}; - m_viewports.push_back(view_port); + pipe.AddDefaultColorAttachment(); + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; + m_viewports.push_back(viewport); pipe.SetViewport(m_viewports); - VkRect2D rect = {}; + VkRect2D rect = {{0, 0}, {64, 64}}; m_scissors.push_back(rect); pipe.SetScissor(m_scissors); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), rp); VkCommandBufferInheritanceInfo cbii = {}; cbii.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO; @@ -12473,11 +13109,7 @@ TEST_F(VkLayerTest, RenderPassIncompatible) { cbbi.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; cbbi.pInheritanceInfo = &cbii; vkBeginCommandBuffer(m_commandBuffer->handle(), &cbbi); - VkRenderPassBeginInfo rpbi = {}; - rpbi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; - rpbi.framebuffer = m_framebuffer; - rpbi.renderPass = rp; - vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_INLINE); + vkCmdBeginRenderPass(m_commandBuffer->handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1a200366); @@ -12490,7 +13122,6 @@ TEST_F(VkLayerTest, RenderPassIncompatible) { m_errorMonitor->VerifyFound(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); vkDestroyRenderPass(m_device->device(), rp, NULL); } @@ -12498,16 +13129,14 @@ TEST_F(VkLayerTest, NumBlendAttachMismatch) { // Create Pipeline where the number of blend attachments doesn't match the // number of color attachments. In this case, we don't add any color // blend attachments even though we have a color attachment. - VkResult err; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_096005d4); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -12517,15 +13146,7 @@ TEST_F(VkLayerTest, NumBlendAttachMismatch) { pipe_ms_state_ci.minSampleShading = 1.0; pipe_ms_state_ci.pSampleMask = NULL; - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader @@ -12534,16 +13155,13 @@ TEST_F(VkLayerTest, NumBlendAttachMismatch) { pipe.AddShader(&vs); pipe.AddShader(&fs); pipe.SetMSAA(&pipe_ms_state_ci); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, Maint1BindingSliceOf3DImage) { TEST_DESCRIPTION( - "Attempt to bind a slice of a 3D texture in a descriptor set. " - "This is explicitly disallowed by KHR_maintenance1 to keep " + "Attempt to bind a slice of a 3D texture in a descriptor set. This is explicitly disallowed by KHR_maintenance1 to keep " "things simple for drivers."); ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) { @@ -12556,31 +13174,39 @@ TEST_F(VkLayerTest, Maint1BindingSliceOf3DImage) { VkResult err; - OneOffDescriptorSet set(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkImageCreateInfo ici = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, nullptr, - VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, - VK_IMAGE_TYPE_3D, VK_FORMAT_R8G8B8A8_UNORM, - { 32, 32, 32 }, 1, 1, - VK_SAMPLE_COUNT_1_BIT, - VK_IMAGE_TILING_OPTIMAL, - VK_IMAGE_USAGE_SAMPLED_BIT, - VK_SHARING_MODE_EXCLUSIVE, 0, nullptr, VK_IMAGE_LAYOUT_UNDEFINED }; + OneOffDescriptorSet set(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); + + VkImageCreateInfo ici = {VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + nullptr, + VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, + VK_IMAGE_TYPE_3D, + VK_FORMAT_R8G8B8A8_UNORM, + {32, 32, 32}, + 1, + 1, + VK_SAMPLE_COUNT_1_BIT, + VK_IMAGE_TILING_OPTIMAL, + VK_IMAGE_USAGE_SAMPLED_BIT, + VK_SHARING_MODE_EXCLUSIVE, + 0, + nullptr, + VK_IMAGE_LAYOUT_UNDEFINED}; VkImageObj image(m_device); image.init(&ici); ASSERT_TRUE(image.initialized()); - VkImageViewCreateInfo ivci = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, nullptr, - 0, image.handle(), VK_IMAGE_VIEW_TYPE_2D, + VkImageViewCreateInfo ivci = { + VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, + nullptr, + 0, + image.handle(), + VK_IMAGE_VIEW_TYPE_2D, VK_FORMAT_R8G8B8A8_UNORM, - { VK_COMPONENT_SWIZZLE_IDENTITY, - VK_COMPONENT_SWIZZLE_IDENTITY, - VK_COMPONENT_SWIZZLE_IDENTITY, - VK_COMPONENT_SWIZZLE_IDENTITY - }, - { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 }, + {VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, + VK_COMPONENT_SWIZZLE_IDENTITY}, + {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}, }; VkImageView view; err = vkCreateImageView(m_device->device(), &ivci, nullptr, &view); @@ -12589,9 +13215,9 @@ TEST_F(VkLayerTest, Maint1BindingSliceOf3DImage) { // Meat of the test. m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_046002ae); - VkDescriptorImageInfo dii = { VK_NULL_HANDLE, view, VK_IMAGE_LAYOUT_GENERAL }; - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, nullptr, - set.set_, 0, 0, 1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, &dii, nullptr, nullptr }; + VkDescriptorImageInfo dii = {VK_NULL_HANDLE, view, VK_IMAGE_LAYOUT_GENERAL}; + VkWriteDescriptorSet write = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, nullptr, set.set_, 0, 0, 1, + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, &dii, nullptr, nullptr}; vkUpdateDescriptorSets(m_device->device(), 1, &write, 0, nullptr); m_errorMonitor->VerifyFound(); @@ -12600,26 +13226,67 @@ TEST_F(VkLayerTest, Maint1BindingSliceOf3DImage) { } TEST_F(VkLayerTest, MissingClearAttachment) { - TEST_DESCRIPTION( - "Points to a wrong colorAttachment index in a VkClearAttachment " - "structure passed to vkCmdClearAttachments"); + TEST_DESCRIPTION("Points to a wrong colorAttachment index in a VkClearAttachment structure passed to vkCmdClearAttachments"); ASSERT_NO_FATAL_FAILURE(Init()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1860001e); - VKTriangleTest(bindStateVertShaderText, bindStateFragShaderText, BsoFailCmdClearAttachments); + VKTriangleTest(BsoFailCmdClearAttachments); m_errorMonitor->VerifyFound(); } +TEST_F(VkPositiveLayerTest, ConfirmNoVLErrorWhenVkCmdClearAttachmentsCalledInSecondaryCB) { + TEST_DESCRIPTION( + "This test is to verify that when vkCmdClearAttachments is called by a secondary commandbuffer, the validation layers do " + "not throw an error if the primary commandbuffer begins a renderpass before executing the secondary commandbuffer."); + + ASSERT_NO_FATAL_FAILURE(Init()); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + VkCommandBufferObj secondary(m_device, m_commandPool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); + + VkCommandBufferBeginInfo info = {}; + VkCommandBufferInheritanceInfo hinfo = {}; + info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT | VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT; + info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + info.pInheritanceInfo = &hinfo; + hinfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO; + hinfo.pNext = NULL; + hinfo.renderPass = renderPass(); + hinfo.subpass = 0; + hinfo.framebuffer = m_framebuffer; + hinfo.occlusionQueryEnable = VK_FALSE; + hinfo.queryFlags = 0; + hinfo.pipelineStatistics = 0; + + secondary.begin(&info); + VkClearAttachment color_attachment; + color_attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + color_attachment.clearValue.color.float32[0] = 0.0; + color_attachment.clearValue.color.float32[1] = 0.0; + color_attachment.clearValue.color.float32[2] = 0.0; + color_attachment.clearValue.color.float32[3] = 0.0; + color_attachment.colorAttachment = 0; + VkClearRect clear_rect = {{{0, 0}, {(uint32_t)m_width, (uint32_t)m_height}}, 0, 1}; + vkCmdClearAttachments(secondary.handle(), 1, &color_attachment, 1, &clear_rect); + m_errorMonitor->VerifyNotFound(); + secondary.end(); + + m_commandBuffer->begin(); + vkCmdBeginRenderPass(m_commandBuffer->handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS); + vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary.handle()); + vkCmdEndRenderPass(m_commandBuffer->handle()); + m_commandBuffer->end(); +} + TEST_F(VkLayerTest, CmdClearAttachmentTests) { TEST_DESCRIPTION("Various tests for validating usage of vkCmdClearAttachments"); - VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -12629,15 +13296,7 @@ TEST_F(VkLayerTest, CmdClearAttachmentTests) { pipe_ms_state_ci.minSampleShading = 1.0; pipe_ms_state_ci.pSampleMask = NULL; - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); // We shouldn't need a fragment shader but add it to be able to run @@ -12647,9 +13306,9 @@ TEST_F(VkLayerTest, CmdClearAttachmentTests) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.SetMSAA(&pipe_ms_state_ci); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -12693,13 +13352,9 @@ TEST_F(VkLayerTest, CmdClearAttachmentTests) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_18600022); vkCmdClearAttachments(m_commandBuffer->handle(), 1, &color_attachment, 1, &clear_rect); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, VtxBufferBadIndex) { - VkResult err; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, "but no vertex buffers are attached to this Pipeline State Object"); @@ -12707,9 +13362,9 @@ TEST_F(VkLayerTest, VtxBufferBadIndex) { ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkPipelineMultisampleStateCreateInfo pipe_ms_state_ci = {}; pipe_ms_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; @@ -12719,15 +13374,7 @@ TEST_F(VkLayerTest, VtxBufferBadIndex) { pipe_ms_state_ci.minSampleShading = 1.0; pipe_ms_state_ci.pSampleMask = NULL; - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - VkPipelineLayout pipeline_layout; - - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); // We shouldn't need a fragment shader @@ -12735,11 +13382,11 @@ TEST_F(VkLayerTest, VtxBufferBadIndex) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.SetMSAA(&pipe_ms_state_ci); pipe.SetViewport(m_viewports); pipe.SetScissor(m_scissors); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -12751,14 +13398,10 @@ TEST_F(VkLayerTest, VtxBufferBadIndex) { m_commandBuffer->Draw(1, 0, 0, 0); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, MismatchCountQueueCreateRequestedFeature) { - TEST_DESCRIPTION( - "Use an invalid count in a vkEnumeratePhysicalDevices call." - "Use invalid Queue Family Index in vkCreateDevice"); + TEST_DESCRIPTION("Use an invalid count in a vkEnumeratePhysicalDevices call.Use invalid Queue Family Index in vkCreateDevice"); ASSERT_NO_FATAL_FAILURE(Init()); // The following test fails with recent NVidia drivers. @@ -12793,10 +13436,9 @@ TEST_F(VkLayerTest, MismatchCountQueueCreateRequestedFeature) { vkCreateDevice(gpu(), &device_create_info, nullptr, &testDevice); m_errorMonitor->VerifyFound(); - queue_create_info.queueFamilyIndex = 1; - if (m_device->phy().queue_properties().size() < 2) { - queue_create_info.queueFamilyIndex = 0; - } + vk_testing::QueueCreateInfoArray queue_info_obj(m_device->queue_props); + device_create_info.queueCreateInfoCount = queue_info_obj.size(); + device_create_info.pQueueCreateInfos = queue_info_obj.data(); unsigned feature_count = sizeof(VkPhysicalDeviceFeatures) / sizeof(VkBool32); VkBool32 *feature_array = reinterpret_cast(&features); @@ -12824,19 +13466,7 @@ TEST_F(VkLayerTest, InvalidQueryPoolCreate) { ASSERT_NO_FATAL_FAILURE(Init()); - const std::vector queue_props = m_device->queue_props; - std::vector queue_info; - queue_info.reserve(queue_props.size()); - std::vector> queue_priorities; - for (uint32_t i = 0; i < (uint32_t)queue_props.size(); i++) { - VkDeviceQueueCreateInfo qi{}; - qi.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - qi.queueFamilyIndex = i; - qi.queueCount = queue_props[i].queueCount; - queue_priorities.emplace_back(qi.queueCount, 0.0f); - qi.pQueuePriorities = queue_priorities[i].data(); - queue_info.push_back(qi); - } + vk_testing::QueueCreateInfoArray queue_info(m_device->queue_props); VkDevice local_device; VkDeviceCreateInfo device_create_info = {}; @@ -12866,20 +13496,11 @@ TEST_F(VkLayerTest, InvalidQueryPoolCreate) { vkDestroyDevice(local_device, nullptr); } -TEST_F(VkLayerTest, InvalidQueueIndexInvalidQuery) { - TEST_DESCRIPTION( - "Use an invalid queue index in a vkCmdWaitEvents call." - "End a command buffer with a query still in progress."); - - const char *invalid_queue_index = - "was created with sharingMode of VK_SHARING_MODE_EXCLUSIVE. If one " - "of src- or dstQueueFamilyIndex is VK_QUEUE_FAMILY_IGNORED, both " - "must be."; +TEST_F(VkLayerTest, UnclosedQuery) { + TEST_DESCRIPTION("End a command buffer with a query still in progress."); const char *invalid_query = "Ending command buffer with in progress query: queryPool 0x"; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, invalid_queue_index); - ASSERT_NO_FATAL_FAILURE(Init()); VkEvent event; @@ -12891,32 +13512,6 @@ TEST_F(VkLayerTest, InvalidQueueIndexInvalidQuery) { vkGetDeviceQueue(m_device->device(), m_device->graphics_queue_node_index_, 0, &queue); m_commandBuffer->begin(); - - VkImageObj image(m_device); - image.Init(128, 128, 1, VK_FORMAT_B8G8R8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_TILING_OPTIMAL, 0); - ASSERT_TRUE(image.initialized()); - VkImageMemoryBarrier img_barrier = {}; - img_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - img_barrier.pNext = NULL; - img_barrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; - img_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT; - img_barrier.oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - img_barrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - img_barrier.image = image.handle(); - img_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - - // QueueFamilyIndex must be VK_QUEUE_FAMILY_IGNORED, this verifies - // that layer validation catches the case when it is not. - img_barrier.dstQueueFamilyIndex = 0; - img_barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - img_barrier.subresourceRange.baseArrayLayer = 0; - img_barrier.subresourceRange.baseMipLevel = 0; - img_barrier.subresourceRange.layerCount = 1; - img_barrier.subresourceRange.levelCount = 1; - vkCmdWaitEvents(m_commandBuffer->handle(), 1, &event, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, - nullptr, 0, nullptr, 1, &img_barrier); - m_errorMonitor->VerifyFound(); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, invalid_query); VkQueryPool query_pool; @@ -12938,28 +13533,14 @@ TEST_F(VkLayerTest, InvalidQueueIndexInvalidQuery) { TEST_F(VkLayerTest, VertexBufferInvalid) { TEST_DESCRIPTION( - "Submit a command buffer using deleted vertex buffer, " - "delete a buffer twice, use an invalid offset for each " - "buffer type, and attempt to bind a null buffer"); - - const char *deleted_buffer_in_command_buffer = - "Cannot submit cmd buffer " - "using deleted buffer "; - const char *invalid_offset_message = - "vkBindBufferMemory(): " - "memoryOffset is 0x"; - const char *invalid_storage_buffer_offset_message = - "vkBindBufferMemory(): " - "storage memoryOffset " - "is 0x"; - const char *invalid_texel_buffer_offset_message = - "vkBindBufferMemory(): " - "texel memoryOffset " - "is 0x"; - const char *invalid_uniform_buffer_offset_message = - "vkBindBufferMemory(): " - "uniform memoryOffset " - "is 0x"; + "Submit a command buffer using deleted vertex buffer, delete a buffer twice, use an invalid offset for each buffer type, " + "and attempt to bind a null buffer"); + + const char *deleted_buffer_in_command_buffer = "Cannot submit cmd buffer using deleted buffer "; + const char *invalid_offset_message = "vkBindBufferMemory(): memoryOffset is 0x"; + const char *invalid_storage_buffer_offset_message = "vkBindBufferMemory(): storage memoryOffset is 0x"; + const char *invalid_texel_buffer_offset_message = "vkBindBufferMemory(): texel memoryOffset is 0x"; + const char *invalid_uniform_buffer_offset_message = "vkBindBufferMemory(): uniform memoryOffset is 0x"; ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitViewport()); @@ -12973,23 +13554,18 @@ TEST_F(VkLayerTest, VertexBufferInvalid) { pipe_ms_state_ci.minSampleShading = 1.0; pipe_ms_state_ci.pSampleMask = nullptr; - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - VkPipelineLayout pipeline_layout; - - VkResult err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, nullptr, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.SetMSAA(&pipe_ms_state_ci); pipe.SetViewport(m_viewports); pipe.SetScissor(m_scissors); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); @@ -13073,10 +13649,17 @@ TEST_F(VkLayerTest, VertexBufferInvalid) { { // Attempt to bind a null buffer. + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + "vkBindBufferMemory: required parameter buffer specified as VK_NULL_HANDLE"); + VkBufferTest buffer_test(m_device, 0, VkBufferTest::eBindNullBuffer); + (void)buffer_test; + m_errorMonitor->VerifyFound(); + } + + { + // Attempt to bind a fake buffer. m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_17001a01); - m_errorMonitor->SetUnexpectedError("required parameter memory specified as VK_NULL_HANDLE"); - m_errorMonitor->SetUnexpectedError("memory must be a valid VkDeviceMemory handle"); - VkBufferTest buffer_test(m_device, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VkBufferTest::eBindNullBuffer); + VkBufferTest buffer_test(m_device, 0, VkBufferTest::eBindFakeBuffer); (void)buffer_test; m_errorMonitor->VerifyFound(); } @@ -13088,8 +13671,6 @@ TEST_F(VkLayerTest, VertexBufferInvalid) { (void)buffer_test; } m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, BadVertexBufferOffset) { @@ -13109,9 +13690,8 @@ TEST_F(VkLayerTest, BadVertexBufferOffset) { // INVALID_IMAGE_LAYOUT tests (one other case is hit by MapMemWithoutHostVisibleBit and not here) TEST_F(VkLayerTest, InvalidImageLayout) { TEST_DESCRIPTION( - "Hit all possible validation checks associated with the " - "DRAWSTATE_INVALID_IMAGE_LAYOUT enum. Generally these involve having" - "images in the wrong layout when they're copied or transitioned."); + "Hit all possible validation checks associated with the DRAWSTATE_INVALID_IMAGE_LAYOUT enum. Generally these involve " + "havingimages in the wrong layout when they're copied or transitioned."); // 3 in ValidateCmdBufImageLayouts // * -1 Attempt to submit cmd buf w/ deleted image // * -2 Cmd buf submit of image w/ layout not matching first use w/ subresource @@ -13153,7 +13733,7 @@ TEST_F(VkLayerTest, InvalidImageLayout) { image_create_info.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT; err = vkCreateImage(m_device->device(), &image_create_info, NULL, &dst_image); ASSERT_VK_SUCCESS(err); - image_create_info.format = VK_FORMAT_D32_SFLOAT; + image_create_info.format = VK_FORMAT_D16_UNORM; image_create_info.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; err = vkCreateImage(m_device->device(), &image_create_info, NULL, &depth_image); ASSERT_VK_SUCCESS(err); @@ -13227,16 +13807,16 @@ TEST_F(VkLayerTest, InvalidImageLayout) { m_errorMonitor->SetUnexpectedError("layout should be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL instead of GENERAL."); m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); // Now cause error due to src image layout changing - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that " - "doesn't match the actual current layout VK_IMAGE_LAYOUT_GENERAL."); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout VK_IMAGE_LAYOUT_GENERAL."); m_errorMonitor->SetUnexpectedError("is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT"); m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_UNDEFINED, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); m_errorMonitor->VerifyFound(); // Final src error is due to bad layout type - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "is VK_IMAGE_LAYOUT_UNDEFINED but can only be " - "VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL."); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL."); m_errorMonitor->SetUnexpectedError( "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout VK_IMAGE_LAYOUT_GENERAL."); m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_UNDEFINED, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); @@ -13248,16 +13828,16 @@ TEST_F(VkLayerTest, InvalidImageLayout) { m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); m_errorMonitor->VerifyFound(); // Now cause error due to src image layout changing - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match " - "the actual current layout VK_IMAGE_LAYOUT_GENERAL."); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout VK_IMAGE_LAYOUT_GENERAL."); m_errorMonitor->SetUnexpectedError( "is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL."); m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_UNDEFINED, 1, ©_region); m_errorMonitor->VerifyFound(); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL " - "or VK_IMAGE_LAYOUT_GENERAL."); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "is VK_IMAGE_LAYOUT_UNDEFINED but can only be VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL."); m_errorMonitor->SetUnexpectedError( "with specific layout VK_IMAGE_LAYOUT_UNDEFINED that doesn't match the actual current layout VK_IMAGE_LAYOUT_GENERAL."); m_commandBuffer->CopyImage(src_image, VK_IMAGE_LAYOUT_GENERAL, dst_image, VK_IMAGE_LAYOUT_UNDEFINED, 1, ©_region); @@ -13422,7 +14002,6 @@ TEST_F(VkLayerTest, InvalidImageLayout) { TEST_F(VkLayerTest, InvalidStorageImageLayout) { TEST_DESCRIPTION("Attempt to update a STORAGE_IMAGE descriptor w/o GENERAL layout."); - VkResult err; ASSERT_NO_FATAL_FAILURE(Init()); @@ -13439,18 +14018,9 @@ TEST_F(VkLayerTest, InvalidStorageImageLayout) { return; } - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); VkImageObj image(m_device); image.Init(32, 32, 1, tex_format, VK_IMAGE_USAGE_STORAGE_BIT, tiling, 0); @@ -13474,15 +14044,12 @@ TEST_F(VkLayerTest, InvalidStorageImageLayout) { "VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL but according to spec "); vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, NonSimultaneousSecondaryMarksPrimary) { ASSERT_NO_FATAL_FAILURE(Init()); const char *simultaneous_use_message = - "does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set and " - "will cause primary command buffer"; + "does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set and will cause primary command buffer"; VkCommandBufferObj secondary(m_device, m_commandPool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); @@ -13490,7 +14057,10 @@ TEST_F(VkLayerTest, NonSimultaneousSecondaryMarksPrimary) { secondary.end(); VkCommandBufferBeginInfo cbbi = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, nullptr, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, + nullptr, + VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, + nullptr, }; m_commandBuffer->begin(&cbbi); @@ -13508,7 +14078,8 @@ TEST_F(VkLayerTest, SimultaneousUseSecondaryTwoExecutes) { VkCommandBufferObj secondary(m_device, m_commandPool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); VkCommandBufferInheritanceInfo inh = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, nullptr, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, + nullptr, }; VkCommandBufferBeginInfo cbbi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, 0, &inh}; @@ -13534,7 +14105,8 @@ TEST_F(VkLayerTest, SimultaneousUseSecondarySingleExecute) { VkCommandBufferObj secondary(m_device, m_commandPool, VK_COMMAND_BUFFER_LEVEL_SECONDARY); VkCommandBufferInheritanceInfo inh = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, nullptr, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, + nullptr, }; VkCommandBufferBeginInfo cbbi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr, 0, &inh}; @@ -13550,9 +14122,7 @@ TEST_F(VkLayerTest, SimultaneousUseSecondarySingleExecute) { } TEST_F(VkLayerTest, SimultaneousUseOneShot) { - TEST_DESCRIPTION( - "Submit the same command buffer twice in one submit looking for simultaneous use and one time submit" - "errors"); + TEST_DESCRIPTION("Submit the same command buffer twice in one submit looking for simultaneous use and one time submit errors"); const char *simultaneous_use_message = "is already in use and is not marked for simultaneous use"; const char *one_shot_message = "VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has been submitted"; ASSERT_NO_FATAL_FAILURE(Init()); @@ -13600,8 +14170,8 @@ TEST_F(VkLayerTest, SimultaneousUseOneShot) { TEST_F(VkLayerTest, StageMaskGsTsEnabled) { TEST_DESCRIPTION( - "Attempt to use a stageMask w/ geometry shader and tesselation shader bits enabled when those features are " - "disabled on the device."); + "Attempt to use a stageMask w/ geometry shader and tesselation shader bits enabled when those features are disabled on the " + "device."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -13679,10 +14249,8 @@ TEST_F(VkLayerTest, EventInUseDestroyedSignaled) { TEST_F(VkLayerTest, InUseDestroyedSignaled) { TEST_DESCRIPTION( - "Use vkCmdExecuteCommands with invalid state " - "in primary and secondary command buffers. " - "Delete objects that are inuse. Call VkQueueSubmit " - "with an event that has been deleted."); + "Use vkCmdExecuteCommands with invalid state in primary and secondary command buffers. Delete objects that are inuse. Call " + "VkQueueSubmit with an event that has been deleted."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -13698,9 +14266,9 @@ TEST_F(VkLayerTest, InUseDestroyedSignaled) { VkFence fence; ASSERT_VK_SUCCESS(vkCreateFence(m_device->device(), &fence_create_info, nullptr, &fence)); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkBufferTest buffer_test(m_device, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT); @@ -13722,19 +14290,13 @@ TEST_F(VkLayerTest, InUseDestroyedSignaled) { VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_create_info.setLayoutCount = 1; - pipeline_layout_create_info.pSetLayouts = &ds.layout_; + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); - - pipe.CreateVKPipeline(pipeline_layout, m_renderPass); + pipe.CreateVKPipeline(pipeline_layout.handle(), m_renderPass); VkEvent event; VkEventCreateInfo event_create_info = {}; @@ -13746,7 +14308,7 @@ TEST_F(VkLayerTest, InUseDestroyedSignaled) { vkCmdSetEvent(m_commandBuffer->handle(), event, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, 0, NULL); m_commandBuffer->end(); @@ -13782,7 +14344,6 @@ TEST_F(VkLayerTest, InUseDestroyedSignaled) { m_errorMonitor->SetUnexpectedError("If event is not VK_NULL_HANDLE, event must be a valid VkEvent handle"); m_errorMonitor->SetUnexpectedError("Unable to remove Event obj"); vkDestroyEvent(m_device->device(), event, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, QueryPoolInUseDestroyedSignaled) { @@ -13803,6 +14364,13 @@ TEST_F(VkLayerTest, QueryPoolInUseDestroyedSignaled) { m_commandBuffer->end(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_2fa00664); + uint32_t data_space[16]; + m_errorMonitor->SetUnexpectedError("Cannot get query results on queryPool"); + vkGetQueryPoolResults(m_device->handle(), query_pool, 0, 1, sizeof(data_space), &data_space, sizeof(uint32_t), + VK_QUERY_RESULT_PARTIAL_BIT); + m_errorMonitor->VerifyFound(); + VkSubmitInfo submit_info = {}; submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submit_info.commandBufferCount = 1; @@ -13827,15 +14395,7 @@ TEST_F(VkLayerTest, PipelineInUseDestroyedSignaled) { ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - // Empty pipeline layout used for binding PSO - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 0; - pipeline_layout_ci.pSetLayouts = NULL; - - VkPipelineLayout pipeline_layout; - VkResult err = vkCreatePipelineLayout(m_device->handle(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_25c005fa); // Create PSO to be used for draw-time errors below @@ -13847,8 +14407,8 @@ TEST_F(VkLayerTest, PipelineInUseDestroyedSignaled) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); delete_this_pipeline = pipe.handle(); m_commandBuffer->begin(); @@ -13870,7 +14430,6 @@ TEST_F(VkLayerTest, PipelineInUseDestroyedSignaled) { m_errorMonitor->SetUnexpectedError("If pipeline is not VK_NULL_HANDLE, pipeline must be a valid VkPipeline handle"); m_errorMonitor->SetUnexpectedError("Unable to remove Pipeline obj"); vkDestroyPipeline(m_device->handle(), delete_this_pipeline, nullptr); - vkDestroyPipelineLayout(m_device->handle(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreateImageViewBreaksParameterCompatibilityRequirements) { @@ -14090,6 +14649,8 @@ TEST_F(VkLayerTest, CreateImageViewBreaksParameterCompatibilityRequirements) { TEST_F(VkLayerTest, CreateImageViewFormatFeatureMismatch) { TEST_DESCRIPTION("Create view with a format that does not have the same features as the image format."); + if (!EnableDeviceProfileLayer()) return; + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); ASSERT_NO_FATAL_FAILURE(InitState()); @@ -14110,7 +14671,10 @@ TEST_F(VkLayerTest, CreateImageViewFormatFeatureMismatch) { VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT}; // List of errors that will be thrown in order of tests run UNIQUE_VALIDATION_ERROR_CODE optimal_error_codes[] = { - VALIDATION_ERROR_0ac007ea, VALIDATION_ERROR_0ac007ec, VALIDATION_ERROR_0ac007ee, VALIDATION_ERROR_0ac007f0, + VALIDATION_ERROR_0ac007ea, + VALIDATION_ERROR_0ac007ec, + VALIDATION_ERROR_0ac007ee, + VALIDATION_ERROR_0ac007f0, }; VkFormatProperties formatProps; @@ -14247,43 +14811,18 @@ TEST_F(VkLayerTest, ImageViewInUseDestroyedSignaled) { ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); + + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; VkResult err; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkImageObj image(m_device); image.Init(128, 128, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_TILING_OPTIMAL, 0); @@ -14338,8 +14877,8 @@ TEST_F(VkLayerTest, ImageViewInUseDestroyedSignaled) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_25400804); @@ -14347,7 +14886,7 @@ TEST_F(VkLayerTest, ImageViewInUseDestroyedSignaled) { m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); // Bind pipeline to cmd buffer vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, 0, nullptr); VkViewport viewport = {0, 0, 16, 16, 0, 1}; @@ -14374,7 +14913,6 @@ TEST_F(VkLayerTest, ImageViewInUseDestroyedSignaled) { m_errorMonitor->SetUnexpectedError("Unable to remove ImageView obj"); vkDestroyImageView(m_device->device(), view, NULL); vkDestroySampler(m_device->device(), sampler, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { @@ -14383,20 +14921,11 @@ TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); - VkPipelineLayout pipeline_layout; - VkResult err; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkBuffer buffer; uint32_t queue_family_index = 0; @@ -14407,7 +14936,7 @@ TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { buffer_create_info.queueFamilyIndexCount = 1; buffer_create_info.pQueueFamilyIndices = &queue_family_index; - err = vkCreateBuffer(m_device->device(), &buffer_create_info, NULL, &buffer); + VkResult err = vkCreateBuffer(m_device->device(), &buffer_create_info, NULL, &buffer); ASSERT_VK_SUCCESS(err); VkMemoryRequirements memory_reqs; @@ -14467,8 +14996,8 @@ TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_23e00750); @@ -14480,7 +15009,7 @@ TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); // Bind pipeline to cmd buffer vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, 0, nullptr); m_commandBuffer->Draw(1, 0, 0, 0); m_commandBuffer->EndRenderPass(); @@ -14502,7 +15031,6 @@ TEST_F(VkLayerTest, BufferViewInUseDestroyedSignaled) { vkDestroyBufferView(m_device->device(), view, NULL); vkDestroyBuffer(m_device->device(), buffer, NULL); vkFreeMemory(m_device->device(), buffer_memory, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, SamplerInUseDestroyedSignaled) { @@ -14511,43 +15039,18 @@ TEST_F(VkLayerTest, SamplerInUseDestroyedSignaled) { ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); + + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); VkSampler sampler; VkResult err; err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkImageObj image(m_device); image.Init(128, 128, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_TILING_OPTIMAL, 0); @@ -14602,8 +15105,8 @@ TEST_F(VkLayerTest, SamplerInUseDestroyedSignaled) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_26600874); @@ -14611,7 +15114,7 @@ TEST_F(VkLayerTest, SamplerInUseDestroyedSignaled) { m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); // Bind pipeline to cmd buffer vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, 0, nullptr); VkViewport viewport = {0, 0, 16, 16, 0, 1}; @@ -14630,31 +15133,110 @@ TEST_F(VkLayerTest, SamplerInUseDestroyedSignaled) { // Submit cmd buffer and then destroy sampler while in-flight vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE); - vkDestroySampler(m_device->device(), sampler, nullptr); // Destroyed too soon + vkDestroySampler(m_device->device(), sampler, nullptr); // Destroyed too soon + m_errorMonitor->VerifyFound(); + vkQueueWaitIdle(m_device->m_queue); + + // Now we can actually destroy sampler + m_errorMonitor->SetUnexpectedError("If sampler is not VK_NULL_HANDLE, sampler must be a valid VkSampler handle"); + m_errorMonitor->SetUnexpectedError("Unable to remove Sampler obj"); + vkDestroySampler(m_device->device(), sampler, NULL); // Destroyed for real + vkDestroyImageView(m_device->device(), view, NULL); +} + +TEST_F(VkLayerTest, UpdateDestroyDescriptorSetLayout) { + TEST_DESCRIPTION("Attempt updates to descriptor sets with destroyed descriptor set layouts"); + // TODO: Update to match the descriptor set layout specific VUIDs/VALIDATION_ERROR_* when present + const auto kWriteDestroyedLayout = VALIDATION_ERROR_15c00280; + const auto kCopyDstDestroyedLayout = VALIDATION_ERROR_03207601; + const auto kCopySrcDestroyedLayout = VALIDATION_ERROR_0322d201; + + ASSERT_NO_FATAL_FAILURE(Init()); + + // Set up the descriptor (resource) and write/copy operations to use. + float data[16] = {}; + VkConstantBufferObj buffer(m_device, sizeof(data), data, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT); + ASSERT_TRUE(buffer.initialized()); + + VkDescriptorBufferInfo info = {}; + info.buffer = buffer.handle(); + info.range = VK_WHOLE_SIZE; + + VkWriteDescriptorSet write_descriptor = {}; + write_descriptor.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write_descriptor.dstSet = VK_NULL_HANDLE; // must update this + write_descriptor.dstBinding = 0; + write_descriptor.descriptorCount = 1; + write_descriptor.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + write_descriptor.pBufferInfo = &info; + + VkCopyDescriptorSet copy_descriptor = {}; + copy_descriptor.sType = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET; + copy_descriptor.srcSet = VK_NULL_HANDLE; // must update + copy_descriptor.srcBinding = 0; + copy_descriptor.dstSet = VK_NULL_HANDLE; // must update + copy_descriptor.dstBinding = 0; + copy_descriptor.descriptorCount = 1; + + // Create valid and invalid source and destination descriptor sets + std::vector one_uniform_buffer = { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }; + OneOffDescriptorSet good_dst(m_device, one_uniform_buffer); + ASSERT_TRUE(good_dst.Initialized()); + + OneOffDescriptorSet bad_dst(m_device, one_uniform_buffer); + // Must assert before invalidating it below + ASSERT_TRUE(bad_dst.Initialized()); + bad_dst.layout_ = VkDescriptorSetLayoutObj(); + + OneOffDescriptorSet good_src(m_device, one_uniform_buffer); + ASSERT_TRUE(good_src.Initialized()); + + // Put valid data in the good and bad sources, simultaneously doing a postive test on write and copy operations + m_errorMonitor->ExpectSuccess(); + write_descriptor.dstSet = good_src.set_; + vkUpdateDescriptorSets(m_device->device(), 1, &write_descriptor, 0, NULL); + m_errorMonitor->VerifyNotFound(); + + OneOffDescriptorSet bad_src(m_device, one_uniform_buffer); + ASSERT_TRUE(bad_src.Initialized()); + + // to complete our positive testing use copy, where above we used write. + copy_descriptor.srcSet = good_src.set_; + copy_descriptor.dstSet = bad_src.set_; + vkUpdateDescriptorSets(m_device->device(), 0, nullptr, 1, ©_descriptor); + bad_src.layout_ = VkDescriptorSetLayoutObj(); + m_errorMonitor->VerifyNotFound(); + + // Trigger the three invalid use errors + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, kWriteDestroyedLayout); + write_descriptor.dstSet = bad_dst.set_; + vkUpdateDescriptorSets(m_device->device(), 1, &write_descriptor, 0, NULL); m_errorMonitor->VerifyFound(); - vkQueueWaitIdle(m_device->m_queue); - // Now we can actually destroy sampler - m_errorMonitor->SetUnexpectedError("If sampler is not VK_NULL_HANDLE, sampler must be a valid VkSampler handle"); - m_errorMonitor->SetUnexpectedError("Unable to remove Sampler obj"); - vkDestroySampler(m_device->device(), sampler, NULL); // Destroyed for real - vkDestroyImageView(m_device->device(), view, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, kCopyDstDestroyedLayout); + copy_descriptor.dstSet = bad_dst.set_; + vkUpdateDescriptorSets(m_device->device(), 0, nullptr, 1, ©_descriptor); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, kCopySrcDestroyedLayout); + copy_descriptor.srcSet = bad_src.set_; + copy_descriptor.dstSet = good_dst.set_; + vkUpdateDescriptorSets(m_device->device(), 0, nullptr, 1, ©_descriptor); + m_errorMonitor->VerifyFound(); } TEST_F(VkLayerTest, QueueForwardProgressFenceWait) { TEST_DESCRIPTION( - "Call VkQueueSubmit with a semaphore that is already " - "signaled but not waited on by the queue. Wait on a " - "fence that has not yet been submitted to a queue."); + "Call VkQueueSubmit with a semaphore that is already signaled but not waited on by the queue. Wait on a fence that has not " + "yet been submitted to a queue."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); const char *queue_forward_progress_message = " that has already been signaled but not waited on by queue 0x"; - const char *invalid_fence_wait_message = - " which has not been submitted on a Queue or during " - "acquire next image."; + const char *invalid_fence_wait_message = " which has not been submitted on a Queue or during acquire next image."; VkCommandBufferObj cb1(m_device, m_commandPool); cb1.begin(); @@ -14695,9 +15277,7 @@ TEST_F(VkLayerTest, QueueForwardProgressFenceWait) { TEST_F(VkLayerTest, FramebufferIncompatible) { TEST_DESCRIPTION( - "Bind a secondary command buffer with with a framebuffer " - "that does not match the framebuffer for the active " - "renderpass."); + "Bind a secondary command buffer with with a framebuffer that does not match the framebuffer for the active renderpass."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -14782,107 +15362,33 @@ TEST_F(VkLayerTest, FramebufferIncompatible) { vkDestroyFramebuffer(m_device->device(), fb, NULL); } -TEST_F(VkLayerTest, ColorBlendLogicOpTests) { - TEST_DESCRIPTION( - "If logicOp is available on the device, set it to an " - "invalid value. If logicOp is not available, attempt to " - "use it and verify that we see the correct error."); - ASSERT_NO_FATAL_FAILURE(Init()); +TEST_F(VkLayerTest, ColorBlendInvalidLogicOp) { + TEST_DESCRIPTION("Attempt to use invalid VkPipelineColorBlendStateCreateInfo::logicOp value."); + + ASSERT_NO_FATAL_FAILURE(Init()); // enables all supported features ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - auto features = m_device->phy().features(); - // Set the expected error depending on whether or not logicOp available - if (VK_FALSE == features.logicOp) { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "If logic operations feature not " - "enabled, logicOpEnable must be " - "VK_FALSE"); - } else { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "pColorBlendState->logicOp (16)"); + if (!m_device->phy().features().logicOp) { + printf(" Device does not support logicOp feature; skipped.\n"); + return; } - // Create a pipeline using logicOp - VkResult err; - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); - VkPipelineViewportStateCreateInfo vp_state_ci = {}; - vp_state_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - vp_state_ci.viewportCount = 1; - VkViewport vp = {}; // Just need dummy vp to point to - vp_state_ci.pViewports = &vp; - vp_state_ci.scissorCount = 1; - VkRect2D scissors = {}; // Dummy scissors to point to - vp_state_ci.pScissors = &scissors; - - VkPipelineShaderStageCreateInfo shaderStages[2]; - memset(&shaderStages, 0, 2 * sizeof(VkPipelineShaderStageCreateInfo)); - - VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); - VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); - shaderStages[0] = vs.GetStageCreateInfo(); - shaderStages[1] = fs.GetStageCreateInfo(); - - VkPipelineVertexInputStateCreateInfo vi_ci = {}; - vi_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - - VkPipelineInputAssemblyStateCreateInfo ia_ci = {}; - ia_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - ia_ci.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; - - VkPipelineRasterizationStateCreateInfo rs_ci = {}; - rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - rs_ci.lineWidth = 1.0f; - - VkPipelineColorBlendAttachmentState att = {}; - att.blendEnable = VK_FALSE; - att.colorWriteMask = 0xf; - - VkPipelineColorBlendStateCreateInfo cb_ci = {}; - cb_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - // Enable logicOp & set logicOp to value 1 beyond allowed entries - cb_ci.logicOpEnable = VK_TRUE; - cb_ci.logicOp = VK_LOGIC_OP_RANGE_SIZE; // This should cause an error - cb_ci.attachmentCount = 1; - cb_ci.pAttachments = &att; - - VkPipelineMultisampleStateCreateInfo ms_ci = {}; - ms_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - ms_ci.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - - VkGraphicsPipelineCreateInfo gp_ci = {}; - gp_ci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; - gp_ci.stageCount = 2; - gp_ci.pStages = shaderStages; - gp_ci.pVertexInputState = &vi_ci; - gp_ci.pInputAssemblyState = &ia_ci; - gp_ci.pViewportState = &vp_state_ci; - gp_ci.pRasterizationState = &rs_ci; - gp_ci.pColorBlendState = &cb_ci; - gp_ci.pMultisampleState = &ms_ci; - gp_ci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - gp_ci.layout = pipeline_layout; - gp_ci.renderPass = renderPass(); + const auto set_shading_enable = [](CreatePipelineHelper &helper) { + helper.cb_ci_.logicOpEnable = VK_TRUE; + helper.cb_ci_.logicOp = static_cast(VK_LOGIC_OP_END_RANGE + 1); // invalid logicOp to be tested + }; + CreatePipelineHelper::OneshotTest(*this, set_shading_enable, VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0f4004be); +} - VkPipelineCacheCreateInfo pc_ci = {}; - pc_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; +TEST_F(VkLayerTest, ColorBlendUnsupportedLogicOp) { + TEST_DESCRIPTION("Attempt enabling VkPipelineColorBlendStateCreateInfo::logicOpEnable when logicOp feature is disabled."); - VkPipeline pipeline; - VkPipelineCache pipelineCache; - err = vkCreatePipelineCache(m_device->device(), &pc_ci, NULL, &pipelineCache); - ASSERT_VK_SUCCESS(err); + VkPhysicalDeviceFeatures features{}; + ASSERT_NO_FATAL_FAILURE(Init(&features)); + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - err = vkCreateGraphicsPipelines(m_device->device(), pipelineCache, 1, &gp_ci, NULL, &pipeline); - m_errorMonitor->VerifyFound(); - if (VK_SUCCESS == err) { - vkDestroyPipeline(m_device->device(), pipeline, NULL); - } - vkDestroyPipelineCache(m_device->device(), pipelineCache, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); + const auto set_shading_enable = [](CreatePipelineHelper &helper) { helper.cb_ci_.logicOpEnable = VK_TRUE; }; + CreatePipelineHelper::OneshotTest(*this, set_shading_enable, VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0f4004bc); } #if GTEST_IS_THREADSAFE @@ -15016,9 +15522,7 @@ TEST_F(VkLayerTest, InvalidSPIRVCodeSize) { } TEST_F(VkLayerTest, InvalidSPIRVMagic) { - TEST_DESCRIPTION( - "Test that an error is produced for a spirv module " - "with a bad magic number"); + TEST_DESCRIPTION("Test that an error is produced for a spirv module with a bad magic number"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Invalid SPIR-V magic number"); @@ -15029,7 +15533,7 @@ TEST_F(VkLayerTest, InvalidSPIRVMagic) { VkShaderModuleCreateInfo moduleCreateInfo; struct icd_spv_header spv; - spv.magic = ~ICD_SPV_MAGIC; + spv.magic = (uint32_t)~ICD_SPV_MAGIC; spv.version = ICD_SPV_VERSION; spv.gen_magic = 0; @@ -15044,9 +15548,7 @@ TEST_F(VkLayerTest, InvalidSPIRVMagic) { } TEST_F(VkLayerTest, CreatePipelineVertexOutputNotConsumed) { - TEST_DESCRIPTION( - "Test that a warning is produced for a vertex output that " - "is not consumed by the fragment stage"); + TEST_DESCRIPTION("Test that a warning is produced for a vertex output that is not consumed by the fragment stage"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, "not consumed by fragment shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15072,7 +15574,7 @@ TEST_F(VkLayerTest, CreatePipelineVertexOutputNotConsumed) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15102,7 +15604,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineComplexTypes) { "void main() {}"; char const *tcsSource = "#version 450\n" - "layout(vertices=3) out;" + "layout(vertices=3) out;\n" "struct S { int x; };\n" "layout(location=2) patch out B { S s; } b;\n" "void main() {\n" @@ -15135,7 +15637,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineComplexTypes) { VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&tcs); pipe.AddShader(&tes); @@ -15180,20 +15682,14 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderBadSpecialization) { VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); + const VkPipelineLayoutObj pipeline_layout(m_device); VkPipelineViewportStateCreateInfo vp_state_create_info = {}; vp_state_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; vp_state_create_info.viewportCount = 1; - VkViewport viewport = {}; + VkViewport viewport = {0.0f, 0.0f, 64.0f, 64.0f, 0.0f, 1.0f}; vp_state_create_info.pViewports = &viewport; vp_state_create_info.scissorCount = 1; - VkRect2D scissors = {}; - vp_state_create_info.pScissors = &scissors; VkDynamicState scissor_state = VK_DYNAMIC_STATE_SCISSOR; @@ -15237,7 +15733,7 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderBadSpecialization) { graphicspipe_create_info.pColorBlendState = &color_blend_state_create_info; graphicspipe_create_info.pDynamicState = &pipeline_dynamic_state_create_info; graphicspipe_create_info.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT; - graphicspipe_create_info.layout = pipeline_layout; + graphicspipe_create_info.layout = pipeline_layout.handle(); graphicspipe_create_info.renderPass = renderPass(); VkPipelineCacheCreateInfo pipeline_cache_create_info = {}; @@ -15255,7 +15751,10 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderBadSpecialization) { // Set up the info describing spec map and data const VkSpecializationInfo specialization_info = { - 1, &entry, 1 * sizeof(float), &data, + 1, + &entry, + 1 * sizeof(float), + &data, }; shader_stage_create_info[0].pSpecializationInfo = &specialization_info; @@ -15265,7 +15764,6 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderBadSpecialization) { m_errorMonitor->VerifyFound(); vkDestroyPipelineCache(m_device->device(), pipelineCache, nullptr); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorTypeMismatch) { @@ -15276,9 +15774,9 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorTypeMismatch) { const char *descriptor_type_mismatch_message = "Type mismatch on descriptor slot 0.0 (used as type "; - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); char const *vsSource = "#version 450\n" @@ -15301,24 +15799,16 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorTypeMismatch) { VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_create_info.setLayoutCount = 1; - pipeline_layout_create_info.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, descriptor_type_mismatch_message); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorNotAccessible) { @@ -15330,9 +15820,9 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorNotAccessible) { const char *descriptor_not_accessible_message = "Shader uses descriptor slot 0.0 (used as type "; - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT /*!*/, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT /*!*/, nullptr}, + }); char const *vsSource = "#version 450\n" @@ -15355,30 +15845,22 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderDescriptorNotAccessible) { VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_create_info.setLayoutCount = 1; - pipeline_layout_create_info.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, descriptor_not_accessible_message); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreatePipelineCheckShaderPushConstantNotAccessible) { TEST_DESCRIPTION( - "Create a graphics pipleine in which a push constant range containing a push constant block member is not " - "accessible from the current shader stage."); + "Create a graphics pipleine in which a push constant range containing a push constant block member is not accessible from " + "the current shader stage."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -15405,31 +15887,22 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderPushConstantNotAccessible) { VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - // Set up a push constant range - VkPushConstantRange push_constant_ranges = {}; + VkPushConstantRange push_constant_range = {}; // Set to the wrong stage to challenge core_validation - push_constant_ranges.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; - push_constant_ranges.size = 4; - - pipeline_layout_create_info.pPushConstantRanges = &push_constant_ranges; - pipeline_layout_create_info.pushConstantRangeCount = 1; + push_constant_range.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + push_constant_range.size = 4; - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); + const VkPipelineLayoutObj pipeline_layout(m_device, {}, {push_constant_range}); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, push_constant_not_accessible_message); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreatePipelineCheckShaderNotEnabled) { @@ -15471,20 +15944,15 @@ TEST_F(VkLayerTest, CreatePipelineCheckShaderNotEnabled) { VkRenderpassObj render_pass(&test_device); VkPipelineObj pipe(&test_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); - VkPipelineLayoutCreateInfo pipeline_layout_create_info = {}; - pipeline_layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - VkPipelineLayout pipeline_layout; - ASSERT_VK_SUCCESS(vkCreatePipelineLayout(test_device.device(), &pipeline_layout_create_info, nullptr, &pipeline_layout)); + const VkPipelineLayoutObj pipeline_layout(&test_device); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, feature_not_enabled_message); - pipe.CreateVKPipeline(pipeline_layout, render_pass.handle()); + pipe.CreateVKPipeline(pipeline_layout.handle(), render_pass.handle()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(test_device.device(), pipeline_layout, nullptr); } TEST_F(VkLayerTest, CreateShaderModuleCheckBadCapability) { @@ -15497,12 +15965,12 @@ TEST_F(VkLayerTest, CreateShaderModuleCheckBadCapability) { char const *vsSource = "#version 450\n" "\n" - "layout(xfb_buffer = 1) out;" + "layout(xfb_buffer = 1) out;\n" "void main(){\n" " gl_Position = vec4(1);\n" "}\n"; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Capability value 53 is not allowed by Vulkan"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Capability TransformFeedback is not allowed by Vulkan"); std::vector spv; VkShaderModuleCreateInfo module_create_info; @@ -15519,10 +15987,92 @@ TEST_F(VkLayerTest, CreateShaderModuleCheckBadCapability) { m_errorMonitor->VerifyFound(); } +TEST_F(VkPositiveLayerTest, CreatePipelineCheckShaderCapabilityExtension1of2) { + // This is a positive test, no errors expected + // Verifies the ability to deal with a shader that declares a non-unique SPIRV capability ID + TEST_DESCRIPTION("Create a shader in which uses a non-unique capability ID extension, 1 of 2"); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (!DeviceExtensionSupported(gpu(), nullptr, VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME)) { + printf(" Extension %s not supported, skipping this pass. \n", + VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME); + return; + } + m_device_extension_names.push_back(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME); + ASSERT_NO_FATAL_FAILURE(InitState()); + + // These tests require that the device support multiViewport + if (!m_device->phy().features().multiViewport) { + printf(" Device does not support multiViewport, test skipped.\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + // Vertex shader using viewport array capability + char const *vsSource = + "#version 450\n" + "#extension GL_ARB_shader_viewport_layer_array : enable\n" + "void main() {\n" + " gl_ViewportIndex = 1;\n" + "}\n"; + + VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); + + VkPipelineObj pipe(m_device); + pipe.AddDefaultColorAttachment(); + pipe.AddShader(&vs); + + const VkPipelineLayoutObj pipe_layout(m_device, {}); + + m_errorMonitor->ExpectSuccess(); + pipe.CreateVKPipeline(pipe_layout.handle(), renderPass()); + m_errorMonitor->VerifyNotFound(); +} + +TEST_F(VkPositiveLayerTest, CreatePipelineCheckShaderCapabilityExtension2of2) { + // This is a positive test, no errors expected + // Verifies the ability to deal with a shader that declares a non-unique SPIRV capability ID + TEST_DESCRIPTION("Create a shader in which uses a non-unique capability ID extension, 2 of 2"); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (!DeviceExtensionSupported(gpu(), nullptr, VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME)) { + printf(" Extension %s not supported, skipping this pass. \n", VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME); + return; + } + m_device_extension_names.push_back(VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME); + ASSERT_NO_FATAL_FAILURE(InitState()); + + // These tests require that the device support multiViewport + if (!m_device->phy().features().multiViewport) { + printf(" Device does not support multiViewport, test skipped.\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); + + // Vertex shader using viewport array capability + char const *vsSource = + "#version 450\n" + "#extension GL_ARB_shader_viewport_layer_array : enable\n" + "void main() {\n" + " gl_ViewportIndex = 1;\n" + "}\n"; + + VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); + + VkPipelineObj pipe(m_device); + pipe.AddDefaultColorAttachment(); + pipe.AddShader(&vs); + + const VkPipelineLayoutObj pipe_layout(m_device, {}); + + m_errorMonitor->ExpectSuccess(); + pipe.CreateVKPipeline(pipe_layout.handle(), renderPass()); + m_errorMonitor->VerifyNotFound(); +} + TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvided) { TEST_DESCRIPTION( - "Test that an error is produced for a fragment shader input " - "which is not present in the outputs of the previous stage"); + "Test that an error is produced for a fragment shader input which is not present in the outputs of the previous stage"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "not written by vertex shader"); @@ -15548,7 +16098,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvided) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15563,8 +16113,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvided) { TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvidedInBlock) { TEST_DESCRIPTION( - "Test that an error is produced for a fragment shader input " - "within an interace block, which is not present in the outputs " + "Test that an error is produced for a fragment shader input within an interace block, which is not present in the outputs " "of the previous stage."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "not written by vertex shader"); @@ -15590,7 +16139,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvidedInBlock) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15604,13 +16153,10 @@ TEST_F(VkLayerTest, CreatePipelineFragmentInputNotProvidedInBlock) { } TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchArraySize) { - TEST_DESCRIPTION( - "Test that an error is produced for mismatched array sizes " - "across the vertex->fragment shader interface"); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "Type mismatch on location 0.0: 'ptr to " - "output arr[2] of float32' vs 'ptr to " - "input arr[1] of float32'"); + TEST_DESCRIPTION("Test that an error is produced for mismatched array sizes across the vertex->fragment shader interface"); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "Type mismatch on location 0.0: 'ptr to output arr[2] of float32' vs 'ptr to input arr[1] of float32'"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -15636,7 +16182,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchArraySize) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15650,9 +16196,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchArraySize) { } TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatch) { - TEST_DESCRIPTION( - "Test that an error is produced for mismatched types across " - "the vertex->fragment shader interface"); + TEST_DESCRIPTION("Test that an error is produced for mismatched types across the vertex->fragment shader interface"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Type mismatch on location 0"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15679,7 +16223,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatch) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15694,9 +16238,8 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatch) { TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchInBlock) { TEST_DESCRIPTION( - "Test that an error is produced for mismatched types across " - "the vertex->fragment shader interface, when the variable is contained within " - "an interface block"); + "Test that an error is produced for mismatched types across the vertex->fragment shader interface, when the variable is " + "contained within an interface block"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Type mismatch on location 0"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15723,7 +16266,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchInBlock) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15738,9 +16281,8 @@ TEST_F(VkLayerTest, CreatePipelineVsFsTypeMismatchInBlock) { TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByLocation) { TEST_DESCRIPTION( - "Test that an error is produced for location mismatches across " - "the vertex->fragment shader interface; This should manifest as a not-written/not-consumed " - "pair, but flushes out broken walking of the interfaces"); + "Test that an error is produced for location mismatches across the vertex->fragment shader interface; This should manifest " + "as a not-written/not-consumed pair, but flushes out broken walking of the interfaces"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "location 0.0 which is not written by vertex shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15767,7 +16309,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByLocation) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15782,9 +16324,8 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByLocation) { TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByComponent) { TEST_DESCRIPTION( - "Test that an error is produced for component mismatches across the " - "vertex->fragment shader interface. It's not enough to have the same set of locations in " - "use; matching is defined in terms of spirv variables."); + "Test that an error is produced for component mismatches across the vertex->fragment shader interface. It's not enough to " + "have the same set of locations in use; matching is defined in terms of spirv variables."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "location 0.1 which is not written by vertex shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15811,7 +16352,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByComponent) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15844,7 +16385,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByPrecision) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15879,7 +16420,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByPrecisionBlock) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15895,9 +16436,7 @@ TEST_F(VkLayerTest, CreatePipelineVsFsMismatchByPrecisionBlock) { } TEST_F(VkLayerTest, CreatePipelineAttribNotConsumed) { - TEST_DESCRIPTION( - "Test that a warning is produced for a vertex attribute which is " - "not consumed by the vertex shader"); + TEST_DESCRIPTION("Test that a warning is produced for a vertex attribute which is not consumed by the vertex shader"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, "location 0 not consumed by vertex shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15928,7 +16467,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribNotConsumed) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15946,8 +16485,8 @@ TEST_F(VkLayerTest, CreatePipelineAttribNotConsumed) { TEST_F(VkLayerTest, CreatePipelineAttribLocationMismatch) { TEST_DESCRIPTION( - "Test that a warning is produced for a location mismatch on " - "vertex attributes. This flushes out bad behavior in the interface walker"); + "Test that a warning is produced for a location mismatch on vertex attributes. This flushes out bad behavior in the " + "interface walker"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, "location 0 not consumed by vertex shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -15979,7 +16518,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribLocationMismatch) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -15997,9 +16536,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribLocationMismatch) { } TEST_F(VkLayerTest, CreatePipelineAttribNotProvided) { - TEST_DESCRIPTION( - "Test that an error is produced for a vertex shader input which is not " - "provided by a vertex attribute"); + TEST_DESCRIPTION("Test that an error is produced for a vertex shader input which is not provided by a vertex attribute"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Vertex shader consumes input at location 0 but not provided"); @@ -16025,7 +16562,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribNotProvided) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16040,8 +16577,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribNotProvided) { TEST_F(VkLayerTest, CreatePipelineAttribTypeMismatch) { TEST_DESCRIPTION( - "Test that an error is produced for a mismatch between the " - "fundamental type (float/int/uint) of an attribute and the " + "Test that an error is produced for a mismatch between the fundamental type (float/int/uint) of an attribute and the " "vertex shader input that consumes it"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "location 0 does not match vertex shader input type"); @@ -16074,7 +16610,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribTypeMismatch) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16091,9 +16627,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribTypeMismatch) { } TEST_F(VkLayerTest, CreatePipelineDuplicateStage) { - TEST_DESCRIPTION( - "Test that an error is produced for a pipeline containing multiple " - "shaders for the same stage"); + TEST_DESCRIPTION("Test that an error is produced for a pipeline containing multiple shaders for the same stage"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Multiple shaders provided for stage VK_SHADER_STAGE_VERTEX_BIT"); @@ -16118,7 +16652,7 @@ TEST_F(VkLayerTest, CreatePipelineDuplicateStage) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&vs); // intentionally duplicate vertex shader attachment pipe.AddShader(&fs); @@ -16155,7 +16689,7 @@ TEST_F(VkLayerTest, CreatePipelineMissingEntrypoint) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this, "foo"); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16169,9 +16703,9 @@ TEST_F(VkLayerTest, CreatePipelineMissingEntrypoint) { } TEST_F(VkLayerTest, CreatePipelineDepthStencilRequired) { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "pDepthStencilState is NULL when rasterization is enabled and subpass " - "uses a depth/stencil attachment"); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "pDepthStencilState is NULL when rasterization is enabled and subpass uses a depth/stencil attachment"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -16191,7 +16725,7 @@ TEST_F(VkLayerTest, CreatePipelineDepthStencilRequired) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16201,18 +16735,31 @@ TEST_F(VkLayerTest, CreatePipelineDepthStencilRequired) { VkAttachmentDescription attachments[] = { { - 0, VK_FORMAT_B8G8R8A8_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, - VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_IMAGE_LAYOUT_UNDEFINED, + 0, + VK_FORMAT_B8G8R8A8_UNORM, + VK_SAMPLE_COUNT_1_BIT, + VK_ATTACHMENT_LOAD_OP_DONT_CARE, + VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_ATTACHMENT_LOAD_OP_DONT_CARE, + VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, }, { - 0, VK_FORMAT_D16_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, - VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_STORE_OP_DONT_CARE, VK_IMAGE_LAYOUT_UNDEFINED, + 0, + VK_FORMAT_D16_UNORM, + VK_SAMPLE_COUNT_1_BIT, + VK_ATTACHMENT_LOAD_OP_DONT_CARE, + VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_ATTACHMENT_LOAD_OP_DONT_CARE, + VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, }, }; VkAttachmentReference refs[] = { - {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, {1, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL}, + {0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL}, + {1, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL}, }; VkSubpassDescription subpass = {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0, nullptr, 1, &refs[0], nullptr, &refs[1], 0, nullptr}; VkRenderPassCreateInfo rpci = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, 2, attachments, 1, &subpass, 0, nullptr}; @@ -16229,12 +16776,11 @@ TEST_F(VkLayerTest, CreatePipelineDepthStencilRequired) { TEST_F(VkLayerTest, CreatePipelineTessPatchDecorationMismatch) { TEST_DESCRIPTION( - "Test that an error is produced for a variable output from " - "the TCS without the patch decoration, but consumed in the TES " + "Test that an error is produced for a variable output from the TCS without the patch decoration, but consumed in the TES " "with the decoration."); - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "is per-vertex in tessellation control shader stage " - "but per-patch in tessellation evaluation shader stage"); + m_errorMonitor->SetDesiredFailureMsg( + VK_DEBUG_REPORT_ERROR_BIT_EXT, + "is per-vertex in tessellation control shader stage but per-patch in tessellation evaluation shader stage"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -16284,7 +16830,7 @@ TEST_F(VkLayerTest, CreatePipelineTessPatchDecorationMismatch) { VkPipelineObj pipe(m_device); pipe.SetInputAssembly(&iasci); pipe.SetTessellation(&tsci); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&tcs); pipe.AddShader(&tes); @@ -16353,7 +16899,7 @@ TEST_F(VkLayerTest, CreatePipelineTessErrors) { VkPipelineInputAssemblyStateCreateInfo iasci_bad = iasci; iasci_bad.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; // otherwise we get a failure about invalid topology pipe.SetInputAssembly(&iasci_bad); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16369,7 +16915,7 @@ TEST_F(VkLayerTest, CreatePipelineTessErrors) { VkPipelineInputAssemblyStateCreateInfo iasci_bad = iasci; iasci_bad.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; // otherwise we get a failure about invalid topology pipe.SetInputAssembly(&iasci_bad); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16383,7 +16929,7 @@ TEST_F(VkLayerTest, CreatePipelineTessErrors) { { VkPipelineObj pipe(m_device); pipe.SetInputAssembly(&iasci); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16434,8 +16980,7 @@ TEST_F(VkLayerTest, CreatePipelineTessErrors) { TEST_F(VkLayerTest, CreatePipelineAttribBindingConflict) { TEST_DESCRIPTION( - "Test that an error is produced for a vertex attribute setup where multiple " - "bindings provide the same location"); + "Test that an error is produced for a vertex attribute setup where multiple bindings provide the same location"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Duplicate vertex input binding descriptions for binding 0"); @@ -16469,7 +17014,7 @@ TEST_F(VkLayerTest, CreatePipelineAttribBindingConflict) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -16487,8 +17032,8 @@ TEST_F(VkLayerTest, CreatePipelineAttribBindingConflict) { TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotWritten) { TEST_DESCRIPTION( - "Test that an error is produced for a fragment shader which does not " - "provide an output for one of the pipeline's color attachments"); + "Test that an error is produced for a fragment shader which does not provide an output for one of the pipeline's color " + "attachments"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Attachment 0 not written by fragment shader"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -16513,7 +17058,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotWritten) { pipe.AddShader(&fs); /* set up CB 0, not written */ - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetObj descriptorSet(m_device); @@ -16527,23 +17072,23 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotWritten) { TEST_F(VkPositiveLayerTest, CreatePipelineFragmentOutputNotWrittenButMasked) { TEST_DESCRIPTION( - "Test that no error is produced when the fragment shader fails to declare an output," - " but the corresponding attachment's write mask is 0."); + "Test that no error is produced when the fragment shader fails to declare an output, but the corresponding attachment's " + "write mask is 0."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); char const *vsSource = "#version 450\n" - "\n" - "void main(){\n" - " gl_Position = vec4(1);\n" - "}\n"; + "\n" + "void main(){\n" + " gl_Position = vec4(1);\n" + "}\n"; char const *fsSource = "#version 450\n" - "\n" - "void main(){\n" - "}\n"; + "\n" + "void main(){\n" + "}\n"; VkShaderObj vs(m_device, vsSource, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); @@ -16553,7 +17098,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineFragmentOutputNotWrittenButMasked) { pipe.AddShader(&fs); /* set up CB 0, not written, but also masked */ - pipe.AddColorAttachment(0); + pipe.AddDefaultColorAttachment(0); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetObj descriptorSet(m_device); @@ -16567,8 +17112,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineFragmentOutputNotWrittenButMasked) { TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotConsumed) { TEST_DESCRIPTION( - "Test that a warning is produced for a fragment shader which provides a spurious " - "output with no matching attachment"); + "Test that a warning is produced for a fragment shader which provides a spurious output with no matching attachment"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT, "fragment shader writes to output location 1 with no matching attachment"); @@ -16598,7 +17142,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotConsumed) { pipe.AddShader(&fs); /* set up CB 0, not written */ - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); /* FS writes CB 1, but we don't configure it */ @@ -16613,8 +17157,8 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputNotConsumed) { TEST_F(VkLayerTest, CreatePipelineFragmentOutputTypeMismatch) { TEST_DESCRIPTION( - "Test that an error is produced for a mismatch between the fundamental " - "type of an fragment shader output variable, and the format of the corresponding attachment"); + "Test that an error is produced for a mismatch between the fundamental type of an fragment shader output variable, and the " + "format of the corresponding attachment"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "does not match fragment shader output type"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -16641,7 +17185,7 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputTypeMismatch) { pipe.AddShader(&fs); /* set up CB 0; type is UNORM by default */ - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetObj descriptorSet(m_device); @@ -16655,8 +17199,8 @@ TEST_F(VkLayerTest, CreatePipelineFragmentOutputTypeMismatch) { TEST_F(VkLayerTest, CreatePipelineUniformBlockNotProvided) { TEST_DESCRIPTION( - "Test that an error is produced for a shader consuming a uniform " - "block which has no corresponding binding in the pipeline layout"); + "Test that an error is produced for a shader consuming a uniform block which has no corresponding binding in the pipeline " + "layout"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "not declared in pipeline layout"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -16684,7 +17228,7 @@ TEST_F(VkLayerTest, CreatePipelineUniformBlockNotProvided) { pipe.AddShader(&fs); /* set up CB 0; type is UNORM by default */ - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetObj descriptorSet(m_device); @@ -16697,8 +17241,7 @@ TEST_F(VkLayerTest, CreatePipelineUniformBlockNotProvided) { TEST_F(VkLayerTest, CreatePipelinePushConstantsNotInLayout) { TEST_DESCRIPTION( - "Test that an error is produced for a shader consuming push constants " - "which are not provided in the pipeline layout"); + "Test that an error is produced for a shader consuming push constants which are not provided in the pipeline layout"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "not declared in layout"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -16726,7 +17269,7 @@ TEST_F(VkLayerTest, CreatePipelinePushConstantsNotInLayout) { pipe.AddShader(&fs); /* set up CB 0; type is UNORM by default */ - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetObj descriptorSet(m_device); @@ -16740,8 +17283,8 @@ TEST_F(VkLayerTest, CreatePipelinePushConstantsNotInLayout) { TEST_F(VkLayerTest, CreatePipelineInputAttachmentMissing) { TEST_DESCRIPTION( - "Test that an error is produced for a shader consuming an input attachment " - "which is not included in the subpass description"); + "Test that an error is produced for a shader consuming an input attachment which is not included in the subpass " + "description"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "consumes input attachment index 0 but not provided in subpass"); @@ -16768,33 +17311,24 @@ TEST_F(VkLayerTest, CreatePipelineInputAttachmentMissing) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetLayoutBinding dslb = {0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dslb}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, {dslb}); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pl(m_device, {&dsl}); // error here. - pipe.CreateVKPipeline(pl, renderPass()); + pipe.CreateVKPipeline(pl.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkLayerTest, CreatePipelineInputAttachmentTypeMismatch) { TEST_DESCRIPTION( - "Test that an error is produced for a shader consuming an input attachment " - "with a format having a different fundamental type"); + "Test that an error is produced for a shader consuming an input attachment with a format having a different fundamental " + "type"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "input attachment 0 format of VK_FORMAT_R8G8B8A8_UINT does not match"); @@ -16821,19 +17355,13 @@ TEST_F(VkLayerTest, CreatePipelineInputAttachmentTypeMismatch) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetLayoutBinding dslb = {0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dslb}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, {dslb}); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pl(m_device, {&dsl}); VkAttachmentDescription descs[2] = { {0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE, @@ -16843,33 +17371,33 @@ TEST_F(VkLayerTest, CreatePipelineInputAttachmentTypeMismatch) { VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL}, }; VkAttachmentReference color = { - 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + 0, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, }; VkAttachmentReference input = { - 1, VK_IMAGE_LAYOUT_GENERAL, + 1, + VK_IMAGE_LAYOUT_GENERAL, }; VkSubpassDescription sd = {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 1, &input, 1, &color, nullptr, nullptr, 0, nullptr}; VkRenderPassCreateInfo rpci = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, 2, descs, 1, &sd, 0, nullptr}; VkRenderPass rp; - err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); + VkResult err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); ASSERT_VK_SUCCESS(err); // error here. - pipe.CreateVKPipeline(pl, rp); + pipe.CreateVKPipeline(pl.handle(), rp); m_errorMonitor->VerifyFound(); vkDestroyRenderPass(m_device->device(), rp, nullptr); - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkLayerTest, CreatePipelineInputAttachmentMissingArray) { TEST_DESCRIPTION( - "Test that an error is produced for a shader consuming an input attachment " - "which is not included in the subpass description -- array case"); + "Test that an error is produced for a shader consuming an input attachment which is not included in the subpass " + "description -- array case"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "consumes input attachment index 0 but not provided in subpass"); @@ -16896,33 +17424,24 @@ TEST_F(VkLayerTest, CreatePipelineInputAttachmentMissingArray) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetLayoutBinding dslb = {0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 2, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dslb}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, {dslb}); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pl(m_device, {&dsl}); // error here. - pipe.CreateVKPipeline(pl, renderPass()); + pipe.CreateVKPipeline(pl.handle(), renderPass()); m_errorMonitor->VerifyFound(); - - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkLayerTest, CreateComputePipelineMissingDescriptor) { TEST_DESCRIPTION( - "Test that an error is produced for a compute pipeline consuming a " - "descriptor which is not provided in the pipeline layout"); + "Test that an error is produced for a compute pipeline consuming a descriptor which is not provided in the pipeline " + "layout"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "Shader uses descriptor slot 0.0"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -16961,24 +17480,16 @@ TEST_F(VkLayerTest, CreateComputePipelineMissingDescriptor) { } TEST_F(VkLayerTest, CreateComputePipelineDescriptorTypeMismatch) { - TEST_DESCRIPTION( - "Test that an error is produced for a pipeline consuming a " - "descriptor-backed resource of a mismatched type"); + TEST_DESCRIPTION("Test that an error is produced for a pipeline consuming a descriptor-backed resource of a mismatched type"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "but descriptor of type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"); ASSERT_NO_FATAL_FAILURE(Init()); VkDescriptorSetLayoutBinding binding = {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 1, &binding}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, {binding}); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pl(m_device, {&dsl}); char const *csSource = "#version 450\n" @@ -16995,27 +17506,23 @@ TEST_F(VkLayerTest, CreateComputePipelineDescriptorTypeMismatch) { 0, {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, cs.handle(), "main", nullptr}, - pl, + pl.handle(), VK_NULL_HANDLE, -1}; VkPipeline pipe; - err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); + VkResult err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); m_errorMonitor->VerifyFound(); if (err == VK_SUCCESS) { vkDestroyPipeline(m_device->device(), pipe, nullptr); } - - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkLayerTest, DrawTimeImageViewTypeMismatchWithPipeline) { TEST_DESCRIPTION( - "Test that an error is produced when an image view type " - "does not match the dimensionality declared in the shader"); + "Test that an error is produced when an image view type does not match the dimensionality declared in the shader"); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "requires an image view of type VK_IMAGE_VIEW_TYPE_3D"); @@ -17040,7 +17547,7 @@ TEST_F(VkLayerTest, DrawTimeImageViewTypeMismatchWithPipeline) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); VkTextureObj texture(m_device, nullptr); VkSamplerObj sampler(m_device); @@ -17074,8 +17581,8 @@ TEST_F(VkLayerTest, DrawTimeImageViewTypeMismatchWithPipeline) { TEST_F(VkLayerTest, DrawTimeImageMultisampleMismatchWithPipeline) { TEST_DESCRIPTION( - "Test that an error is produced when a multisampled images " - "are consumed via singlesample images types in the shader, or vice versa."); + "Test that an error is produced when a multisampled images are consumed via singlesample images types in the shader, or " + "vice versa."); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "requires bound image to have multiple samples"); @@ -17100,9 +17607,9 @@ TEST_F(VkLayerTest, DrawTimeImageMultisampleMismatchWithPipeline) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); - VkTextureObj texture(m_device, nullptr); + VkTextureObj texture(m_device, nullptr); // THIS LINE CAUSES CRASH ON MALI VkSamplerObj sampler(m_device); VkDescriptorSetObj descriptorSet(m_device); @@ -17132,89 +17639,78 @@ TEST_F(VkLayerTest, DrawTimeImageMultisampleMismatchWithPipeline) { m_commandBuffer->end(); } -TEST_F(VkLayerTest, CreateImageLimitsViolationMaxWidth) { +TEST_F(VkLayerTest, CreateImageMinLimitsViolation) { + TEST_DESCRIPTION("Create invalid image with invalid parameters of zero."); + ASSERT_NO_FATAL_FAILURE(Init()); - VkFormat const format = VK_FORMAT_B8G8R8A8_UNORM; - { - VkFormatProperties properties; - vkGetPhysicalDeviceFormatProperties(m_device->phy().handle(), format, &properties); - if (properties.optimalTilingFeatures == 0) { - printf(" Image format not supported; skipped.\n"); - return; - } - } + const VkFormat safe_format = VK_FORMAT_B8G8R8A8_UNORM; + const VkImageUsageFlags safe_usage = VK_IMAGE_USAGE_SAMPLED_BIT; VkImageCreateInfo info = {}; info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - info.pNext = NULL; - info.imageType = VK_IMAGE_TYPE_2D; - info.format = format; - info.extent.height = 32; - info.extent.depth = 1; + info.imageType = VK_IMAGE_TYPE_3D; + info.format = safe_format; + // extent to be set by tests info.mipLevels = 1; info.arrayLayers = 1; info.samples = VK_SAMPLE_COUNT_1_BIT; - info.tiling = VK_IMAGE_TILING_OPTIMAL; - info.usage = VK_IMAGE_USAGE_SAMPLED_BIT; - info.flags = 0; + info.usage = safe_usage; - // Introduce error by sending down a bogus width extent - { - VkImageFormatProperties properties; - auto const result = vkGetPhysicalDeviceImageFormatProperties(m_device->phy().handle(), info.format, info.imageType, - info.tiling, info.usage, info.flags, &properties); - ASSERT_VK_SUCCESS(result); - info.extent.width = properties.maxExtent.width + 1; - } + enum Dimension { kWidth = 0x1, kHeight = 0x2, kDepth = 0x4 }; - VkImage image; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "CreateImage extents exceed allowable limits for format"); - vkCreateImage(m_device->device(), &info, NULL, &image); - m_errorMonitor->VerifyFound(); -} + for (underlying_type::type bad_dimensions = 0x1; bad_dimensions < 0x8; ++bad_dimensions) { + VkExtent3D extent = {1, 1, 1}; -TEST_F(VkLayerTest, CreateImageLimitsViolationMinWidth) { - ASSERT_NO_FATAL_FAILURE(Init()); + if (bad_dimensions & kWidth) { + extent.width = 0; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00760); + } - VkFormat const format = VK_FORMAT_B8G8R8A8_UNORM; - { - VkFormatProperties properties; - vkGetPhysicalDeviceFormatProperties(m_device->phy().handle(), format, &properties); - if (properties.optimalTilingFeatures == 0) { - printf(" Image format not supported; skipped.\n"); - return; + if (bad_dimensions & kHeight) { + extent.height = 0; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00762); + } + + if (bad_dimensions & kDepth) { + extent.depth = 0; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00764); } + + info.extent = extent; + + VkImage image; + vkCreateImage(m_device->device(), &info, NULL, &image); + + m_errorMonitor->VerifyFound(); } - VkImageCreateInfo info = {}; - info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - info.pNext = NULL; info.imageType = VK_IMAGE_TYPE_2D; - info.format = format; - info.extent.height = 32; - info.extent.depth = 1; - info.mipLevels = 1; - info.arrayLayers = 1; - info.samples = VK_SAMPLE_COUNT_1_BIT; - info.tiling = VK_IMAGE_TILING_OPTIMAL; - info.usage = VK_IMAGE_USAGE_SAMPLED_BIT; - info.flags = 0; + info.extent = {64, 64, 1}; - // Introduce error by sending down a bogus width extent - info.extent.width = 0; + { + VkImageCreateInfo bad_info = info; + bad_info.mipLevels = 0; - VkImage image; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007b8); - m_errorMonitor->SetUnexpectedError("parameter pCreateInfo->extent.width must be greater than 0"); - vkCreateImage(m_device->device(), &info, NULL, &image); - m_errorMonitor->VerifyFound(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00766); + VkImage image; + vkCreateImage(m_device->device(), &bad_info, NULL, &image); + m_errorMonitor->VerifyFound(); + } + + { + VkImageCreateInfo bad_info = info; + bad_info.arrayLayers = 0; + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00768); + VkImage image; + vkCreateImage(m_device->device(), &bad_info, NULL, &image); + m_errorMonitor->VerifyFound(); + } } TEST_F(VkLayerTest, AttachmentDescriptionUndefinedFormat) { - TEST_DESCRIPTION( - "Create a render pass with an attachment description " - "format set to VK_FORMAT_UNDEFINED"); + TEST_DESCRIPTION("Create a render pass with an attachment description format set to VK_FORMAT_UNDEFINED"); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); @@ -17591,12 +18087,8 @@ TEST_F(VkLayerTest, ImageLayerUnsupportedFormat) { TEST_F(VkLayerTest, CreateImageViewFormatMismatchUnrelated) { TEST_DESCRIPTION("Create an image with a color format, then try to create a depth view of it"); - if (InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { - m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); - } else { - printf(" Did not find VK_LAYER_LUNARG_device_profile_api layer; skipped.\n"); - return; - } + if (!EnableDeviceProfileLayer()) return; + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); ASSERT_NO_FATAL_FAILURE(InitState()); @@ -17649,6 +18141,8 @@ TEST_F(VkLayerTest, CreateImageViewFormatMismatchUnrelated) { TEST_F(VkLayerTest, CreateImageViewNoMutableFormatBit) { TEST_DESCRIPTION("Create an image view with a different format, when the image does not have MUTABLE_FORMAT bit"); + if (!EnableDeviceProfileLayer()) return; + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); ASSERT_NO_FATAL_FAILURE(InitState()); @@ -17824,7 +18318,7 @@ TEST_F(VkLayerTest, CreateImageViewInvalidSubresourceRange) { "vkCreateImageView: if pCreateInfo->viewType is VK_IMAGE_TYPE_2D_ARRAY, " "pCreateInfo->subresourceRange.layerCount must be >= 1"); // TODO: The test environment aborts the Vulkan call in parameter_validation layer before VALIDATION_ERROR_0ac00b92 test - //m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0ac00b92); + // m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0ac00b92); const VkImageSubresourceRange range = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 0}; VkImageViewCreateInfo img_view_info = img_view_info_template; img_view_info.subresourceRange = range; @@ -18395,8 +18889,7 @@ TEST_F(VkLayerTest, MiscImageLayerTests) { // TODO: Ideally we should check if a format is supported, before using it. VkImageObj image(m_device); - image.Init(128, 128, 1, VK_FORMAT_R16G16B16A16_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, - VK_IMAGE_TILING_OPTIMAL, 0); // 64bpp + image.Init(128, 128, 1, VK_FORMAT_R16G16B16A16_UINT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); // 64bpp ASSERT_TRUE(image.initialized()); vk_testing::Buffer buffer; VkMemoryPropertyFlags reqs = 0; @@ -18412,8 +18905,7 @@ TEST_F(VkLayerTest, MiscImageLayerTests) { region.imageExtent.depth = 1; VkImageObj image2(m_device); - image2.Init(128, 128, 1, VK_FORMAT_R8G8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, - VK_IMAGE_TILING_OPTIMAL, 0); // 16bpp + image2.Init(128, 128, 1, VK_FORMAT_R8G8_UNORM, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); // 16bpp ASSERT_TRUE(image2.initialized()); vk_testing::Buffer buffer2; VkMemoryPropertyFlags reqs2 = 0; @@ -18488,11 +18980,11 @@ TEST_F(VkLayerTest, MiscImageLayerTests) { region.bufferImageHeight = 128; VkImageObj intImage1(m_device); - intImage1.Init(128, 128, 1, VK_FORMAT_R8_SNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, - VK_IMAGE_TILING_OPTIMAL, 0); + intImage1.Init(128, 128, 1, VK_FORMAT_R8_UNORM, VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_TILING_OPTIMAL, 0); + intImage1.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); VkImageObj intImage2(m_device); - intImage2.Init(128, 128, 1, VK_FORMAT_R8_SNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, - VK_IMAGE_TILING_OPTIMAL, 0); + intImage2.Init(128, 128, 1, VK_FORMAT_R8_UNORM, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL, 0); + intImage2.SetLayout(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_GENERAL); VkImageBlit blitRegion = {}; blitRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; blitRegion.srcSubresource.baseArrayLayer = 0; @@ -18532,7 +19024,6 @@ TEST_F(VkLayerTest, ImageFormatLimits) { } } - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "CreateImage extents exceed allowable limits for format"); VkImageCreateInfo image_create_info = {}; image_create_info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; image_create_info.pNext = NULL; @@ -18549,21 +19040,32 @@ TEST_F(VkLayerTest, ImageFormatLimits) { image_create_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; image_create_info.flags = 0; - VkImage nullImg; - VkImageFormatProperties imgFmtProps; - vkGetPhysicalDeviceImageFormatProperties(gpu(), image_create_info.format, image_create_info.imageType, image_create_info.tiling, - image_create_info.usage, image_create_info.flags, &imgFmtProps); - image_create_info.extent.width = imgFmtProps.maxExtent.width + 1; - // Expect INVALID_FORMAT_LIMITS_VIOLATION - vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); - m_errorMonitor->VerifyFound(); - image_create_info.extent.width = 1; + VkImage nullImg; + VkImageFormatProperties imgFmtProps; + VkResult err = vkGetPhysicalDeviceImageFormatProperties(gpu(), image_create_info.format, image_create_info.imageType, + image_create_info.tiling, image_create_info.usage, + image_create_info.flags, &imgFmtProps); + if (VK_SUCCESS != err) { + printf(" Image format not supported; skipped.\n"); + return; + } + + VkPhysicalDeviceProperties device_props; + vkGetPhysicalDeviceProperties(gpu(), &device_props); + uint32_t max_width = std::max(imgFmtProps.maxExtent.width, device_props.limits.maxImageDimension2D); + if (max_width < UINT32_MAX) { + image_create_info.extent.width = max_width + 1; + // Expect INVALID_FORMAT_LIMITS_VIOLATION + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00770); + vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); + m_errorMonitor->VerifyFound(); + image_create_info.extent.width = 1; + } - uint32_t maxDim = - std::max(std::max(image_create_info.extent.width, image_create_info.extent.height), image_create_info.extent.depth); + uint32_t maxDim = std::max({image_create_info.extent.width, image_create_info.extent.height, image_create_info.extent.depth}); // If max mip levels exceeds image extents, skip the max mip levels test - if ((imgFmtProps.maxMipLevels + 1) <= (floor(log2(maxDim)) + 1)) { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "exceeds allowable maximum supported by format of"); + if ((imgFmtProps.maxMipLevels + 1) <= (std::floor(std::log2(maxDim)) + 1)) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0077e); image_create_info.mipLevels = imgFmtProps.maxMipLevels + 1; // Expect INVALID_FORMAT_LIMITS_VIOLATION vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); @@ -18571,31 +19073,244 @@ TEST_F(VkLayerTest, ImageFormatLimits) { image_create_info.mipLevels = 1; } - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "exceeds allowable maximum supported by format of"); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00780); image_create_info.arrayLayers = imgFmtProps.maxArrayLayers + 1; // Expect INVALID_FORMAT_LIMITS_VIOLATION vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); m_errorMonitor->VerifyFound(); image_create_info.arrayLayers = 1; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078e); - image_create_info.samples = VK_SAMPLE_COUNT_2_BIT; - // Expect INVALID_FORMAT_LIMITS_VIOLATION - vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); - m_errorMonitor->VerifyFound(); - image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; + image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL; + vkGetPhysicalDeviceImageFormatProperties(gpu(), image_create_info.format, image_create_info.imageType, image_create_info.tiling, + image_create_info.usage, image_create_info.flags, &imgFmtProps); + if (0 == (imgFmtProps.sampleCounts & VK_SAMPLE_COUNT_64_BIT)) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078e); + image_create_info.samples = VK_SAMPLE_COUNT_64_BIT; + // Expect INVALID_FORMAT_LIMITS_VIOLATION + vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); + m_errorMonitor->VerifyFound(); + image_create_info.tiling = VK_IMAGE_TILING_LINEAR; + image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; + } - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "pCreateInfo->initialLayout, must be " - "VK_IMAGE_LAYOUT_UNDEFINED or " - "VK_IMAGE_LAYOUT_PREINITIALIZED"); - image_create_info.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - // Expect INVALID_LAYOUT + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0b801); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007c2); + image_create_info.initialLayout = VK_IMAGE_LAYOUT_MAX_ENUM; // Not a legal layout value vkCreateImage(m_device->handle(), &image_create_info, NULL, &nullImg); m_errorMonitor->VerifyFound(); image_create_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; } +VkResult GPDIFPHelper(VkPhysicalDevice dev, VkImageCreateInfo *ci, VkImageFormatProperties *limits) { + return vkGetPhysicalDeviceImageFormatProperties(dev, ci->format, ci->imageType, ci->tiling, ci->usage, ci->flags, limits); +} + +TEST_F(VkLayerTest, ImageCreateInfoStructErrors) { + TEST_DESCRIPTION("Misc valid usage errors in vkImageCreateInfo struct"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + VkFormat format = VK_FORMAT_B8G8R8A8_UNORM; + VkFormatProperties fmt_props; + vkGetPhysicalDeviceFormatProperties(m_device->phy().handle(), format, &fmt_props); + if ((fmt_props.linearTilingFeatures == 0) || (fmt_props.optimalTilingFeatures == 0)) { + format = VK_FORMAT_R8G8B8A8_UNORM; + vkGetPhysicalDeviceFormatProperties(m_device->phy().handle(), format, &fmt_props); + if ((fmt_props.linearTilingFeatures == 0) || (fmt_props.optimalTilingFeatures == 0)) { + printf(" Image format not supported, test skipped.\n"); + return; + } + } + + VkImage image; + VkImageCreateInfo image_ci = {}; + image_ci.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + image_ci.pNext = NULL; + image_ci.flags = 0; + image_ci.imageType = VK_IMAGE_TYPE_1D; + image_ci.format = format; + image_ci.extent = {64, 1, 1}; + image_ci.mipLevels = 1; + image_ci.arrayLayers = 1; + image_ci.samples = VK_SAMPLE_COUNT_1_BIT; + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + image_ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + + VkImageFormatProperties img_limits = {}; + const VkPhysicalDeviceLimits dev_limits = m_device->props.limits; + + // InitialLayout not VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREDEFINED + image_ci.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007c2); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + + // 1D with CUBE_COMPATIBLE + image_ci.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0076a); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.flags = 0; + + // 1D width + GPDIFPHelper(gpu(), &image_ci, &img_limits); + image_ci.extent.width = std::max(img_limits.maxExtent.width, dev_limits.maxImageDimension1D) + 1; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0076e); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + // 2D CUBE_COMPATIBLE extents + image_ci.imageType = VK_IMAGE_TYPE_2D; + image_ci.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; + GPDIFPHelper(gpu(), &image_ci, &img_limits); + uint32_t dim = std::max({img_limits.maxExtent.width, img_limits.maxExtent.height, dev_limits.maxImageDimensionCube}) + 1; + image_ci.extent = {dim, dim, 1}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00772); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.flags = 0; + + // 3D extents + image_ci.imageType = VK_IMAGE_TYPE_3D; + GPDIFPHelper(gpu(), &image_ci, &img_limits); + image_ci.extent = {(std::max(img_limits.maxExtent.width, dev_limits.maxImageDimension3D) + 1), 4, 4}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00776); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.extent = {4, (std::max(img_limits.maxExtent.height, dev_limits.maxImageDimension3D) + 1), 4}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00776); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.extent = {4, 4, (std::max(img_limits.maxExtent.depth, dev_limits.maxImageDimension3D) + 1)}; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00776); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + // 3D arrayLayers + image_ci.extent = {4, 4, 4}; + image_ci.arrayLayers = 2; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00782); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.arrayLayers = 1; + + // Multi-sample + image_ci.samples = VK_SAMPLE_COUNT_4_BIT; + image_ci.imageType = VK_IMAGE_TYPE_3D; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00784); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.imageType = VK_IMAGE_TYPE_2D; + image_ci.extent = {64, 64, 1}; + image_ci.flags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00784); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.flags = 0; + image_ci.tiling = VK_IMAGE_TILING_LINEAR; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00784); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.mipLevels = 7; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00784); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + image_ci.mipLevels = 1; + image_ci.samples = VK_SAMPLE_COUNT_1_BIT; + + // TRANSIENT with a non-attachment flag + image_ci.usage = + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00786); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + // TRANSIENT without another attachment flag + image_ci.usage = VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078c); + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + // Frame buffer width + image_ci.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; // (any attachment bit) + GPDIFPHelper(gpu(), &image_ci, &img_limits); + image_ci.extent.width = dev_limits.maxFramebufferWidth + 1; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00788); + if (image_ci.extent.width > std::max(dev_limits.maxImageDimension2D, img_limits.maxExtent.width)) { + // Image/device limits are <= framebuffer limit - will also trip 770 + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00770); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + // Frame buffer height + image_ci.usage = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; // (any attachment bit) + image_ci.extent.width = 64; + image_ci.extent.height = dev_limits.maxFramebufferHeight + 1; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e0078a); + if (image_ci.extent.height > std::max(dev_limits.maxImageDimension2D, img_limits.maxExtent.height)) { + // Image/device limits are <= framebuffer limit - will also trip 770 + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00770); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + + image_ci.format = VK_FORMAT_R8_SRGB; // pick an 'unlikely' format + VkFormatProperties format_props; + vkGetPhysicalDeviceFormatProperties(gpu(), image_ci.format, &format_props); + + // Linear tiling with unsupported feature + image_ci.tiling = VK_IMAGE_TILING_LINEAR; + bool unsupported = (VK_ERROR_FORMAT_NOT_SUPPORTED == GPDIFPHelper(gpu(), &image_ci, &img_limits)); + if (format_props.linearTilingFeatures && (0 == (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT))) { + image_ci.tiling = VK_IMAGE_TILING_LINEAR; + image_ci.usage = VK_IMAGE_USAGE_SAMPLED_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007a4); + if (unsupported) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00758); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + } + if (format_props.linearTilingFeatures && (0 == (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))) { + image_ci.tiling = VK_IMAGE_TILING_LINEAR; + image_ci.usage = VK_IMAGE_USAGE_STORAGE_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007a6); + if (unsupported) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00758); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + } + + // Optimal tiling with unsupported feature + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + unsupported = (VK_ERROR_FORMAT_NOT_SUPPORTED == GPDIFPHelper(gpu(), &image_ci, &img_limits)); + if (format_props.optimalTilingFeatures && (0 == (format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT))) { + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.usage = VK_IMAGE_USAGE_SAMPLED_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007ae); + if (unsupported) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00758); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + } + if (format_props.optimalTilingFeatures && (0 == (format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))) { + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.usage = VK_IMAGE_USAGE_STORAGE_BIT; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e007b0); + if (unsupported) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09e00758); + } + vkCreateImage(m_device->handle(), &image_ci, NULL, &image); + m_errorMonitor->VerifyFound(); + } +} + TEST_F(VkLayerTest, CopyImageTypeExtentMismatch) { // Image copy tests where format type and extents don't match ASSERT_NO_FATAL_FAILURE(Init()); @@ -18732,8 +19447,6 @@ TEST_F(VkLayerTest, CopyImageTypeExtentMismatch) { m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09c0011a); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a600154); // also triggers 'too many layers' - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - VALIDATION_ERROR_09c0012a); // and 'copy from layer not present' m_commandBuffer->CopyImage(image_3D.image(), VK_IMAGE_LAYOUT_GENERAL, image_2D.image(), VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); m_errorMonitor->VerifyFound(); @@ -18811,11 +19524,8 @@ TEST_F(VkLayerTest, CopyImageTypeExtentMismatchMaintenance1) { copy_region.srcOffset = {0, 0, 0}; copy_region.dstOffset = {0, 0, 0}; - // Copy from layer not present - VU 09c0012a - // TODO: this VU is redundant with VU 0a600154. Gitlab issue 812 submitted to have it removed. copy_region.srcSubresource.baseArrayLayer = 4; copy_region.srcSubresource.layerCount = 6; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09c0012a); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a600154); m_commandBuffer->CopyImage(image_2D_array.image(), VK_IMAGE_LAYOUT_GENERAL, image_3D.image(), VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); @@ -18823,11 +19533,8 @@ TEST_F(VkLayerTest, CopyImageTypeExtentMismatchMaintenance1) { copy_region.srcSubresource.baseArrayLayer = 0; copy_region.srcSubresource.layerCount = 1; - // Copy to layer not present - VU 09c00136 - // TODO: this VU is redundant with 0a600154. Gitlab issue 812 submitted to have it removed. copy_region.dstSubresource.baseArrayLayer = 1; copy_region.dstSubresource.layerCount = 8; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09c00136); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0a600154); m_commandBuffer->CopyImage(image_3D.image(), VK_IMAGE_LAYOUT_GENERAL, image_2D_array.image(), VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); @@ -19838,21 +20545,14 @@ TEST_F(VkLayerTest, DepthStencilImageViewWithColorAspectBitError) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptorSet; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); ASSERT_VK_SUCCESS(err); @@ -19922,22 +20622,15 @@ TEST_F(VkLayerTest, DepthStencilImageViewWithColorAspectBitError) { vkDestroyImage(m_device->device(), image_bad, NULL); vkDestroyImage(m_device->device(), image_good, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); vkFreeMemory(m_device->device(), mem, NULL); } TEST_F(VkLayerTest, ClearImageErrors) { - TEST_DESCRIPTION( - "Call ClearColorImage w/ a depth|stencil image and " - "ClearDepthStencilImage with a color image."); + TEST_DESCRIPTION("Call ClearColorImage w/ a depth|stencil image and ClearDepthStencilImage with a color image."); ASSERT_NO_FATAL_FAILURE(Init()); - auto depth_format = FindSupportedDepthStencilFormat(gpu()); - if (!depth_format) { - return; - } ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); m_commandBuffer->begin(); @@ -19961,10 +20654,14 @@ TEST_F(VkLayerTest, ClearImageErrors) { image_create_info.arrayLayers = 1; image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; image_create_info.tiling = VK_IMAGE_TILING_LINEAR; + image_create_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT; + vk_testing::Image color_image_no_transfer; + color_image_no_transfer.init(*m_device, image_create_info, reqs); + image_create_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; vk_testing::Image color_image; - color_image.init(*m_device, (const VkImageCreateInfo &)image_create_info, reqs); + color_image.init(*m_device, image_create_info, reqs); const VkImageSubresourceRange color_range = vk_testing::Image::subresource_range(image_create_info, VK_IMAGE_ASPECT_COLOR_BIT); @@ -19973,14 +20670,14 @@ TEST_F(VkLayerTest, ClearImageErrors) { reqs = 0; // don't need HOST_VISIBLE DS image VkImageCreateInfo ds_image_create_info = vk_testing::Image::create_info(); ds_image_create_info.imageType = VK_IMAGE_TYPE_2D; - ds_image_create_info.format = depth_format; + ds_image_create_info.format = VK_FORMAT_D16_UNORM; ds_image_create_info.extent.width = 64; ds_image_create_info.extent.height = 64; ds_image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL; ds_image_create_info.usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; vk_testing::Image ds_image; - ds_image.init(*m_device, (const VkImageCreateInfo &)ds_image_create_info, reqs); + ds_image.init(*m_device, ds_image_create_info, reqs); const VkImageSubresourceRange ds_range = vk_testing::Image::subresource_range(ds_image_create_info, VK_IMAGE_ASPECT_DEPTH_BIT); @@ -19991,11 +20688,10 @@ TEST_F(VkLayerTest, ClearImageErrors) { m_errorMonitor->VerifyFound(); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "vkCmdClearColorImage called with " - "image created without " - "VK_IMAGE_USAGE_TRANSFER_DST_BIT"); + "vkCmdClearColorImage called with image created without VK_IMAGE_USAGE_TRANSFER_DST_BIT"); - vkCmdClearColorImage(m_commandBuffer->handle(), color_image.handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_color, 1, &color_range); + vkCmdClearColorImage(m_commandBuffer->handle(), color_image_no_transfer.handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_color, 1, + &color_range); m_errorMonitor->VerifyFound(); @@ -20011,8 +20707,7 @@ TEST_F(VkLayerTest, ClearImageErrors) { TEST_F(VkLayerTest, CommandQueueFlags) { TEST_DESCRIPTION( - "Allocate a command buffer on a queue that does not support graphics and try to issue a " - "graphics-only command"); + "Allocate a command buffer on a queue that does not support graphics and try to issue a graphics-only command"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -20087,26 +20782,13 @@ TEST_F(VkLayerTest, Maintenance1AndNegativeViewport) { ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); if (!((DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) && - (DeviceExtensionSupported(gpu(), nullptr, VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME)))) { + (DeviceExtensionSupported(gpu(), nullptr, VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME)))) { printf(" Maintenance1 and AMD_negative viewport height extensions not supported, skipping test\n"); return; } ASSERT_NO_FATAL_FAILURE(InitState()); - const std::vector queue_props = m_device->queue_props; - std::vector queue_info; - queue_info.reserve(queue_props.size()); - std::vector> queue_priorities; - for (uint32_t i = 0; i < (uint32_t)queue_props.size(); i++) { - VkDeviceQueueCreateInfo qi = {}; - qi.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - qi.pNext = NULL; - qi.queueFamilyIndex = i; - qi.queueCount = queue_props[i].queueCount; - queue_priorities.emplace_back(qi.queueCount, 0.0f); - qi.pQueuePriorities = queue_priorities[i].data(); - queue_info.push_back(qi); - } + vk_testing::QueueCreateInfoArray queue_info(m_device->queue_props); const char *extension_names[2] = {"VK_KHR_maintenance1", "VK_AMD_negative_viewport_height"}; VkDevice testDevice; VkDeviceCreateInfo device_create_info = {}; @@ -20165,19 +20847,305 @@ TEST_F(VkLayerTest, InvalidCreateDescriptorPool) { VkDescriptorPoolCreateInfo dp_ci = dp_ci_template; dp_ci.pPoolSizes = &invalid_dp_size; - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_04a0025c); - { - VkDescriptorPool pool; - vkCreateDescriptorPool(m_device->device(), &dp_ci, nullptr, &pool); - } - m_errorMonitor->VerifyFound(); - } + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_04a0025c); + { + VkDescriptorPool pool; + vkCreateDescriptorPool(m_device->device(), &dp_ci, nullptr, &pool); + } + m_errorMonitor->VerifyFound(); + } +} + +TEST_F(VkLayerTest, InvalidCreateBufferSize) { + TEST_DESCRIPTION("Attempt to create VkBuffer with size of zero"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + VkBufferCreateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; + info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_01400720); + info.size = 0; + VkBuffer buffer; + vkCreateBuffer(m_device->device(), &info, nullptr, &buffer); + m_errorMonitor->VerifyFound(); +} + +TEST_F(VkLayerTest, SetDynViewportParamTests) { + TEST_DESCRIPTION("Test parameters of vkCmdSetViewport without multiViewport feature"); + + VkPhysicalDeviceFeatures features{}; + ASSERT_NO_FATAL_FAILURE(Init(&features)); + + const VkViewport vp = {0.0, 0.0, 64.0, 64.0, 0.0, 1.0}; + const VkViewport viewports[] = {vp, vp}; + + m_commandBuffer->begin(); + + // array tests + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e000990); + vkCmdSetViewport(m_commandBuffer->handle(), 1, 1, viewports); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e030a1b); + vkCmdSetViewport(m_commandBuffer->handle(), 0, 0, nullptr); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e000992); + vkCmdSetViewport(m_commandBuffer->handle(), 0, 2, viewports); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e000990); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e030a1b); + vkCmdSetViewport(m_commandBuffer->handle(), 1, 0, viewports); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e000990); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e000992); + vkCmdSetViewport(m_commandBuffer->handle(), 1, 2, viewports); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e03fa01); + vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, nullptr); + m_errorMonitor->VerifyFound(); + + // core viewport tests + using std::vector; + struct TestCase { + VkViewport vp; + vector vuids; + }; + + // not necessarily boundary values (unspecified cast rounding), but guaranteed to be over limit + const auto one_past_max_w = NearestGreater(static_cast(m_device->props.limits.maxViewportDimensions[0])); + const auto one_past_max_h = NearestGreater(static_cast(m_device->props.limits.maxViewportDimensions[1])); + + const auto min_bound = m_device->props.limits.viewportBoundsRange[0]; + const auto max_bound = m_device->props.limits.viewportBoundsRange[1]; + const auto one_before_min_bounds = NearestSmaller(min_bound); + const auto one_past_max_bounds = NearestGreater(max_bound); + + const auto below_zero = NearestSmaller(0.0f); + const auto past_one = NearestGreater(1.0f); + + const vector test_cases = { + {{0.0, 0.0, 0.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dd4}}, + {{0.0, 0.0, one_past_max_w, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dd6}}, + {{0.0, 0.0, NAN, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dd4}}, + {{0.0, 0.0, 64.0, 0.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dd8}}, + {{0.0, 0.0, 64.0, one_past_max_h, 0.0, 1.0}, {VALIDATION_ERROR_15000dda}}, + {{0.0, 0.0, 64.0, NAN, 0.0, 1.0}, {VALIDATION_ERROR_15000dd8}}, + {{one_before_min_bounds, 0.0, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000ddc}}, + {{one_past_max_bounds, 0.0, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_150009a0}}, + {{NAN, 0.0, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000ddc}}, + {{0.0, one_before_min_bounds, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dde}}, + {{0.0, one_past_max_bounds, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_150009a2}}, + {{0.0, NAN, 64.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dde}}, + {{max_bound, 0.0, 1.0, 64.0, 0.0, 1.0}, {VALIDATION_ERROR_150009a0}}, + {{0.0, max_bound, 64.0, 1.0, 0.0, 1.0}, {VALIDATION_ERROR_150009a2}}, + {{0.0, 0.0, 64.0, 64.0, below_zero, 1.0}, {VALIDATION_ERROR_150009a4}}, + {{0.0, 0.0, 64.0, 64.0, past_one, 1.0}, {VALIDATION_ERROR_150009a4}}, + {{0.0, 0.0, 64.0, 64.0, NAN, 1.0}, {VALIDATION_ERROR_150009a4}}, + {{0.0, 0.0, 64.0, 64.0, 0.0, below_zero}, {VALIDATION_ERROR_150009a6}}, + {{0.0, 0.0, 64.0, 64.0, 0.0, past_one}, {VALIDATION_ERROR_150009a6}}, + {{0.0, 0.0, 64.0, 64.0, 0.0, NAN}, {VALIDATION_ERROR_150009a6}}, + }; + + for (const auto &test_case : test_cases) { + for (const auto vuid : test_case.vuids) m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, vuid); + vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &test_case.vp); + m_errorMonitor->VerifyFound(); + } +} + +void NegHeightViewportTests(VkDeviceObj *m_device, VkCommandBufferObj *m_commandBuffer, ErrorMonitor *m_errorMonitor) { + const auto &limits = m_device->props.limits; + + m_commandBuffer->begin(); + + using std::vector; + struct TestCase { + VkViewport vp; + vector vuids; + }; + + // not necessarily boundary values (unspecified cast rounding), but guaranteed to be over limit + const auto one_before_min_h = NearestSmaller(-static_cast(limits.maxViewportDimensions[1])); + const auto one_past_max_h = NearestGreater(static_cast(limits.maxViewportDimensions[1])); + + const auto min_bound = limits.viewportBoundsRange[0]; + const auto max_bound = limits.viewportBoundsRange[1]; + const auto one_before_min_bound = NearestSmaller(min_bound); + const auto one_past_max_bound = NearestGreater(max_bound); + + const vector test_cases = {{{0.0, 0.0, 64.0, one_before_min_h, 0.0, 1.0}, {VALIDATION_ERROR_15000dda}}, + {{0.0, 0.0, 64.0, one_past_max_h, 0.0, 1.0}, {VALIDATION_ERROR_15000dda}}, + {{0.0, 0.0, 64.0, NAN, 0.0, 1.0}, {VALIDATION_ERROR_15000dda}}, + {{0.0, one_before_min_bound, 64.0, 1.0, 0.0, 1.0}, {VALIDATION_ERROR_15000dde}}, + {{0.0, one_past_max_bound, 64.0, -1.0, 0.0, 1.0}, {VALIDATION_ERROR_15000de0}}, + {{0.0, min_bound, 64.0, -1.0, 0.0, 1.0}, {VALIDATION_ERROR_15000de2}}, + {{0.0, max_bound, 64.0, 1.0, 0.0, 1.0}, {VALIDATION_ERROR_150009a2}}}; + + for (const auto &test_case : test_cases) { + for (const auto vuid : test_case.vuids) { + if (vuid == VALIDATION_ERROR_UNDEFINED) + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + "is less than VkPhysicalDeviceLimits::viewportBoundsRange[0]"); + else + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, vuid); + } + vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &test_case.vp); + m_errorMonitor->VerifyFound(); + } +} + +TEST_F(VkLayerTest, SetDynViewportParamMaintenance1Tests) { + TEST_DESCRIPTION("Verify errors are detected on misuse of SetViewport with a negative viewport extension enabled."); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_MAINTENANCE1_EXTENSION_NAME); + } else { + printf(" VK_KHR_maintenance1 extension not supported -- skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + NegHeightViewportTests(m_device, m_commandBuffer, m_errorMonitor); +} + +TEST_F(VkLayerTest, SetDynViewportParamAmdNegHeightTests) { + TEST_DESCRIPTION("Verify errors are detected on misuse of SetViewport with AMD negative viewport extension enabled."); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + if (DeviceExtensionSupported(gpu(), nullptr, VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME); + } else { + printf(" VK_AMD_negative_viewport_height extension not supported -- skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + NegHeightViewportTests(m_device, m_commandBuffer, m_errorMonitor); +} + +TEST_F(VkLayerTest, SetDynViewportParamMultiviewportTests) { + TEST_DESCRIPTION("Test parameters of vkCmdSetViewport with multiViewport feature enabled"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + if (!m_device->phy().features().multiViewport) { + printf(" VkPhysicalDeviceFeatures::multiViewport is not supported -- skipping test.\n"); + return; + } + + const auto max_viewports = m_device->props.limits.maxViewports; + const uint32_t too_many_viewports = 65536 + 1; // let's say this is too much to allocate pViewports for + + m_commandBuffer->begin(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e030a1b); + vkCmdSetViewport(m_commandBuffer->handle(), 0, 0, nullptr); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e03fa01); + vkCmdSetViewport(m_commandBuffer->handle(), 0, max_viewports, nullptr); + m_errorMonitor->VerifyFound(); + + if (max_viewports >= too_many_viewports) { + printf( + " VkPhysicalDeviceLimits::maxViewports is too large to practically test against -- skipping part of " + "test.\n"); + return; + } + + const VkViewport vp = {0.0, 0.0, 64.0, 64.0, 0.0, 1.0}; + const std::vector viewports(max_viewports + 1, vp); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e00098e); + vkCmdSetViewport(m_commandBuffer->handle(), 0, max_viewports + 1, viewports.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e00098e); + vkCmdSetViewport(m_commandBuffer->handle(), max_viewports, 1, viewports.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e00098e); + vkCmdSetViewport(m_commandBuffer->handle(), 1, max_viewports, viewports.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e030a1b); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1e00098e); + vkCmdSetViewport(m_commandBuffer->handle(), max_viewports + 1, 0, viewports.data()); + m_errorMonitor->VerifyFound(); +} + +// +// POSITIVE VALIDATION TESTS +// +// These tests do not expect to encounter ANY validation errors pass only if this is true + +TEST_F(VkPositiveLayerTest, UncompressedToCompressedImageCopy) { + TEST_DESCRIPTION("Image copies between compressed and uncompressed images"); + ASSERT_NO_FATAL_FAILURE(Init()); + + // Verify format support + // Size-compatible (64-bit) formats. Uncompressed is 64 bits per texel, compressed is 64 bits per 4x4 block (or 4bpt). + if (!ImageFormatAndFeaturesSupported(gpu(), VK_FORMAT_R16G16B16A16_UINT, VK_IMAGE_TILING_OPTIMAL, + VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR) || + !ImageFormatAndFeaturesSupported(gpu(), VK_FORMAT_BC1_RGBA_SRGB_BLOCK, VK_IMAGE_TILING_OPTIMAL, + VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR)) { + printf(" Required formats/features not supported - UncompressedToCompressedImageCopy skipped.\n"); + return; + } + + VkImageObj uncomp_10x10t_image(m_device); // Size = 10 * 10 * 64 = 6400 + VkImageObj comp_10x10b_40x40t_image(m_device); // Size = 40 * 40 * 4 = 6400 + + uncomp_10x10t_image.Init(10, 10, 1, VK_FORMAT_R16G16B16A16_UINT, + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL); + comp_10x10b_40x40t_image.Init(40, 40, 1, VK_FORMAT_BC1_RGBA_SRGB_BLOCK, + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_TILING_OPTIMAL); + + if (!uncomp_10x10t_image.initialized() || !comp_10x10b_40x40t_image.initialized()) { + printf(" Unable to initialize surfaces - UncompressedToCompressedImageCopy skipped.\n"); + return; + } + + // Both copies represent the same number of bytes. Bytes Per Texel = 1 for bc6, 16 for uncompressed + // Copy compressed to uncompressed + VkImageCopy copy_region = {}; + copy_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + copy_region.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + copy_region.srcSubresource.mipLevel = 0; + copy_region.dstSubresource.mipLevel = 0; + copy_region.srcSubresource.baseArrayLayer = 0; + copy_region.dstSubresource.baseArrayLayer = 0; + copy_region.srcSubresource.layerCount = 1; + copy_region.dstSubresource.layerCount = 1; + copy_region.srcOffset = {0, 0, 0}; + copy_region.dstOffset = {0, 0, 0}; + + m_errorMonitor->ExpectSuccess(); + m_commandBuffer->begin(); + + // Copy from uncompressed to compressed + copy_region.extent = {10, 10, 1}; // Dimensions in (uncompressed) texels + vkCmdCopyImage(m_commandBuffer->handle(), uncomp_10x10t_image.handle(), VK_IMAGE_LAYOUT_GENERAL, + comp_10x10b_40x40t_image.handle(), VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); + + // And from compressed to uncompressed + copy_region.extent = {40, 40, 1}; // Dimensions in (compressed) texels + vkCmdCopyImage(m_commandBuffer->handle(), comp_10x10b_40x40t_image.handle(), VK_IMAGE_LAYOUT_GENERAL, + uncomp_10x10t_image.handle(), VK_IMAGE_LAYOUT_GENERAL, 1, ©_region); + + m_errorMonitor->VerifyNotFound(); + m_commandBuffer->end(); } -// -// POSITIVE VALIDATION TESTS -// -// These tests do not expect to encounter ANY validation errors pass only if this is true TEST_F(VkPositiveLayerTest, DeleteDescriptorSetLayoutsBeforeDescriptorSets) { TEST_DESCRIPTION("Create DSLayouts and DescriptorSets and then delete the DSLayouts before the DescriptorSets."); ASSERT_NO_FATAL_FAILURE(Init()); @@ -20209,32 +21177,76 @@ TEST_F(VkPositiveLayerTest, DeleteDescriptorSetLayoutsBeforeDescriptorSets) { dsl_binding.stageFlags = VK_SHADER_STAGE_ALL; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - VkDescriptorSet descriptorSet; - VkDescriptorSetAllocateInfo alloc_info = {}; - alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; - alloc_info.descriptorSetCount = 1; - alloc_info.descriptorPool = ds_pool_one; - alloc_info.pSetLayouts = &ds_layout; - err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); - ASSERT_VK_SUCCESS(err); - - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); + { + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); + + VkDescriptorSetAllocateInfo alloc_info = {}; + alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; + alloc_info.descriptorSetCount = 1; + alloc_info.descriptorPool = ds_pool_one; + alloc_info.pSetLayouts = &ds_layout.handle(); + err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptorSet); + ASSERT_VK_SUCCESS(err); + } // ds_layout destroyed err = vkFreeDescriptorSets(m_device->device(), ds_pool_one, 1, &descriptorSet); vkDestroyDescriptorPool(m_device->device(), ds_pool_one, NULL); m_errorMonitor->VerifyNotFound(); } +TEST_F(VkPositiveLayerTest, CommandPoolDeleteWithReferences) { + TEST_DESCRIPTION("Ensure the validation layers bookkeeping tracks the implicit command buffer frees."); + ASSERT_NO_FATAL_FAILURE(Init()); + + VkCommandPoolCreateInfo cmd_pool_info = {}; + cmd_pool_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; + cmd_pool_info.pNext = NULL; + cmd_pool_info.queueFamilyIndex = m_device->graphics_queue_node_index_; + cmd_pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; + cmd_pool_info.flags = 0; + + VkCommandPool secondary_cmd_pool; + VkResult res = vkCreateCommandPool(m_device->handle(), &cmd_pool_info, NULL, &secondary_cmd_pool); + ASSERT_VK_SUCCESS(res); + + VkCommandBufferAllocateInfo cmdalloc = vk_testing::CommandBuffer::create_info(secondary_cmd_pool); + cmdalloc.level = VK_COMMAND_BUFFER_LEVEL_SECONDARY; + + VkCommandBuffer secondary_cmds; + res = vkAllocateCommandBuffers(m_device->handle(), &cmdalloc, &secondary_cmds); + + VkCommandBufferInheritanceInfo cmd_buf_inheritance_info = {}; + cmd_buf_inheritance_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO; + cmd_buf_inheritance_info.pNext = NULL; + cmd_buf_inheritance_info.renderPass = VK_NULL_HANDLE; + cmd_buf_inheritance_info.subpass = 0; + cmd_buf_inheritance_info.framebuffer = VK_NULL_HANDLE; + cmd_buf_inheritance_info.occlusionQueryEnable = VK_FALSE; + cmd_buf_inheritance_info.queryFlags = 0; + cmd_buf_inheritance_info.pipelineStatistics = 0; + + VkCommandBufferBeginInfo secondary_begin = {}; + secondary_begin.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + secondary_begin.pNext = NULL; + secondary_begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + secondary_begin.pInheritanceInfo = &cmd_buf_inheritance_info; + + res = vkBeginCommandBuffer(secondary_cmds, &secondary_begin); + ASSERT_VK_SUCCESS(res); + vkEndCommandBuffer(secondary_cmds); + + m_commandBuffer->begin(); + vkCmdExecuteCommands(m_commandBuffer->handle(), 1, &secondary_cmds); + m_commandBuffer->end(); + + // DestroyCommandPool *implicitly* frees the command buffers allocated from it + vkDestroyCommandPool(m_device->handle(), secondary_cmd_pool, NULL); + // If bookkeeping has been lax, validating the reset will attempt to touch deleted data + res = vkResetCommandPool(m_device->handle(), m_commandPool->handle(), 0); + ASSERT_VK_SUCCESS(res); +} + TEST_F(VkPositiveLayerTest, SecondaryCommandBufferClearColorAttachments) { TEST_DESCRIPTION("Create a secondary command buffer and record a CmdClearAttachments call into it"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -20272,9 +21284,7 @@ TEST_F(VkPositiveLayerTest, SecondaryCommandBufferClearColorAttachments) { } TEST_F(VkPositiveLayerTest, SecondaryCommandBufferImageLayoutTransitions) { - TEST_DESCRIPTION( - "Perform an image layout transition in a secondary command buffer followed " - "by a transition in the primary."); + TEST_DESCRIPTION("Perform an image layout transition in a secondary command buffer followed by a transition in the primary."); VkResult err; m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -20365,12 +21375,9 @@ TEST_F(VkPositiveLayerTest, SecondaryCommandBufferImageLayoutTransitions) { // This is a positive test. No failures are expected. TEST_F(VkPositiveLayerTest, IgnoreUnrelatedDescriptor) { TEST_DESCRIPTION( - "Ensure that the vkUpdateDescriptorSets validation code " - "is ignoring VkWriteDescriptorSet members that are not " - "related to the descriptor type specified by " - "VkWriteDescriptorSet::descriptorType. Correct " - "validation behavior will result in the test running to " - "completion without validation errors."); + "Ensure that the vkUpdateDescriptorSets validation code is ignoring VkWriteDescriptorSet members that are not related to " + "the descriptor type specified by VkWriteDescriptorSet::descriptorType. Correct validation behavior will result in the " + "test running to completion without validation errors."); const uintptr_t invalid_ptr = 0xcdcdcdcd; @@ -20385,9 +21392,9 @@ TEST_F(VkPositiveLayerTest, IgnoreUnrelatedDescriptor) { VkImageView view = image.targetView(VK_FORMAT_B8G8R8A8_UNORM); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkDescriptorImageInfo image_info = {}; image_info.imageView = view; @@ -20451,9 +21458,9 @@ TEST_F(VkPositiveLayerTest, IgnoreUnrelatedDescriptor) { err = vkBindBufferMemory(m_device->device(), buffer, buffer_memory, 0); ASSERT_VK_SUCCESS(err); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkDescriptorBufferInfo buffer_info = {}; buffer_info.buffer = buffer; @@ -20529,9 +21536,9 @@ TEST_F(VkPositiveLayerTest, IgnoreUnrelatedDescriptor) { VkBufferView buffer_view; err = vkCreateBufferView(m_device->device(), &buff_view_ci, NULL, &buffer_view); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); VkWriteDescriptorSet descriptor_write; memset(&descriptor_write, 0, sizeof(descriptor_write)); @@ -20562,60 +21569,31 @@ TEST_F(VkPositiveLayerTest, IgnoreUnrelatedDescriptor) { } TEST_F(VkPositiveLayerTest, ImmutableSamplerOnlyDescriptor) { - TEST_DESCRIPTION( - "Bind a DescriptorSet with only an immutable sampler" - "and make sure that we don't warn for no update."); + TEST_DESCRIPTION("Bind a DescriptorSet with only an immutable samplerand make sure that we don't warn for no update."); ASSERT_NO_FATAL_FAILURE(Init()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkSamplerCreateInfo sampler_ci = {}; - sampler_ci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - sampler_ci.pNext = NULL; - sampler_ci.magFilter = VK_FILTER_NEAREST; - sampler_ci.minFilter = VK_FILTER_NEAREST; - sampler_ci.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST; - sampler_ci.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; - sampler_ci.mipLodBias = 1.0; - sampler_ci.anisotropyEnable = VK_FALSE; - sampler_ci.maxAnisotropy = 1; - sampler_ci.compareEnable = VK_FALSE; - sampler_ci.compareOp = VK_COMPARE_OP_NEVER; - sampler_ci.minLod = 1.0; - sampler_ci.maxLod = 1.0; - sampler_ci.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; - sampler_ci.unnormalizedCoordinates = VK_FALSE; - VkSampler sampler; + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); + VkSampler sampler; VkResult err = vkCreateSampler(m_device->device(), &sampler_ci, NULL, &sampler); ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); m_errorMonitor->ExpectSuccess(); m_commandBuffer->begin(); m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, 0, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, 0, nullptr); m_errorMonitor->VerifyNotFound(); vkDestroySampler(m_device->device(), sampler, NULL); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkLayerTest, DuplicateDescriptorBinding) { @@ -20653,110 +21631,365 @@ TEST_F(VkLayerTest, DuplicateDescriptorBinding) { m_errorMonitor->VerifyFound(); } -TEST_F(VkLayerTest, ViewportBoundsCheckingWithNVHExtensionEnabled) { - TEST_DESCRIPTION("Verify errors are detected on misuse of SetViewport with a negative viewport extension enabled."); +TEST_F(VkLayerTest, InvalidPushDescriptorSetLayout) { + TEST_DESCRIPTION("Create a push descriptor set layout with invalid bindings."); - ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" Did not find VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; skipped.\n"); + return; + } - if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) { - m_device_extension_names.push_back(VK_KHR_MAINTENANCE1_EXTENSION_NAME); + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } else { - printf(" Maintenance1 Extension not supported, skipping tests\n"); + printf(" %s Extension not supported, skipping tests\n", VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); return; } + ASSERT_NO_FATAL_FAILURE(InitState()); - const VkPhysicalDeviceLimits &limits = m_device->props.limits; - m_commandBuffer->begin(); - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1500099a); - VkViewport viewport = {0, 0, 16, -(static_cast(limits.maxViewportDimensions[1] + 1)), 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); + // Find address of extension call and make the call + PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = + (PFN_vkGetPhysicalDeviceProperties2KHR)vkGetInstanceProcAddr(instance(), "vkGetPhysicalDeviceProperties2KHR"); + assert(vkGetPhysicalDeviceProperties2KHR != nullptr); + + // Get the push descriptor limits + auto push_descriptor_prop = lvl_init_struct(); + auto prop2 = lvl_init_struct(&push_descriptor_prop); + vkGetPhysicalDeviceProperties2KHR(m_device->phy().handle(), &prop2); + + VkDescriptorSetLayoutBinding binding = {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; + + auto ds_layout_ci = lvl_init_struct(); + ds_layout_ci.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; + ds_layout_ci.bindingCount = 1; + ds_layout_ci.pBindings = &binding; + + // Note that as binding is referenced in ds_layout_ci, it is effectively in the closure by reference as well. + auto test_create_ds_layout = [&ds_layout_ci, this](UNIQUE_VALIDATION_ERROR_CODE error) { + VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, error); + vkCreateDescriptorSetLayout(m_device->handle(), &ds_layout_ci, nullptr, &ds_layout); m_errorMonitor->VerifyFound(); + vkDestroyDescriptorSetLayout(m_device->handle(), ds_layout, nullptr); + }; + + // Starting with the initial VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC type set above.. + test_create_ds_layout(VALIDATION_ERROR_05000230); + + binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; + test_create_ds_layout(VALIDATION_ERROR_05000230); // This is the same VUID as above, just a second error condition. + + if (!(push_descriptor_prop.maxPushDescriptors == std::numeric_limits::max())) { + binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + binding.descriptorCount = push_descriptor_prop.maxPushDescriptors + 1; + test_create_ds_layout(VALIDATION_ERROR_05000232); + } else { + printf(" maxPushDescriptors is set to maxiumum unit32_t value, skipping 'out of range test'.\n"); } - m_commandBuffer->end(); } -TEST_F(VkLayerTest, ViewportAndScissorBoundsChecking) { - TEST_DESCRIPTION("Verify errors are detected on misuse of SetViewport and SetScissor."); - +TEST_F(VkLayerTest, PushDescriptorSetLayoutWithoutExtension) { + TEST_DESCRIPTION("Create a push descriptor set layout without loading the needed extension."); ASSERT_NO_FATAL_FAILURE(Init()); - m_commandBuffer->begin(); + VkDescriptorSetLayoutBinding binding = {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; - const VkPhysicalDeviceLimits &limits = m_device->props.limits; + auto ds_layout_ci = lvl_init_struct(); + ds_layout_ci.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; + ds_layout_ci.bindingCount = 1; + ds_layout_ci.pBindings = &binding; - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15000996); - VkViewport viewport = {0, 0, static_cast(limits.maxViewportDimensions[0] + 1), 16, 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); - } + std::string error = "Attemped to use VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR in "; + error = error + "VkDescriptorSetLayoutCreateInfo::flags but its required extension "; + error = error + VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME; + error = error + " has not been enabled."; - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_15000998); - VkViewport viewport = {0, 0, 16, static_cast(limits.maxViewportDimensions[1] + 1), 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); - } + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, error.c_str()); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_05000232); + VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; + vkCreateDescriptorSetLayout(m_device->handle(), &ds_layout_ci, nullptr, &ds_layout); + m_errorMonitor->VerifyFound(); + vkDestroyDescriptorSetLayout(m_device->handle(), ds_layout, nullptr); +} - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1500099e); - VkViewport viewport = {limits.viewportBoundsRange[0] - 1, 0, 16, 16, 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); +TEST_F(VkLayerTest, AllocatePushDescriptorSet) { + TEST_DESCRIPTION("Attempt to allocate a push descriptor set."); + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" %s Extension not supported, skipping tests\n", VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + return; } - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1500099e); - VkViewport viewport = {0, limits.viewportBoundsRange[0] - 1, 16, 16, 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } else { + printf(" %s Extension not supported, skipping tests\n", VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + return; } + ASSERT_NO_FATAL_FAILURE(InitState()); - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_150009a0); - VkViewport viewport = {limits.viewportBoundsRange[1], 0, 16, 16, 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); + VkDescriptorSetLayoutBinding binding = {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; + auto ds_layout_ci = lvl_init_struct(); + ds_layout_ci.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; + ds_layout_ci.bindingCount = 1; + ds_layout_ci.pBindings = &binding; + VkDescriptorSetLayout ds_layout = VK_NULL_HANDLE; + VkResult err = vkCreateDescriptorSetLayout(m_device->handle(), &ds_layout_ci, nullptr, &ds_layout); + ASSERT_VK_SUCCESS(err); + + VkDescriptorPoolSize pool_size = {binding.descriptorType, binding.descriptorCount}; + auto dspci = lvl_init_struct(); + dspci.poolSizeCount = 1; + dspci.pPoolSizes = &pool_size; + dspci.maxSets = 1; + VkDescriptorPool pool; + err = vkCreateDescriptorPool(m_device->handle(), &dspci, nullptr, &pool); + ASSERT_VK_SUCCESS(err); + + auto ds_alloc_info = lvl_init_struct(); + ds_alloc_info.descriptorPool = pool; + ds_alloc_info.descriptorSetCount = 1; + ds_alloc_info.pSetLayouts = &ds_layout; + + VkDescriptorSet ds = VK_NULL_HANDLE; + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_04c00268); + vkAllocateDescriptorSets(m_device->handle(), &ds_alloc_info, &ds); + m_errorMonitor->VerifyFound(); + + vkDestroyDescriptorPool(m_device->handle(), pool, nullptr); + vkDestroyDescriptorSetLayout(m_device->handle(), ds_layout, nullptr); +} + +TEST_F(VkLayerTest, PushDescriptorSetCmdPushBadArgs) { + TEST_DESCRIPTION("Attempt to push a push descriptor set with incorrect arguments."); + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" %s Extension not supported, skipping tests\n", VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + return; } - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_150009a2); - VkViewport viewport = {0, limits.viewportBoundsRange[1], 16, 16, 0, 1}; - vkCmdSetViewport(m_commandBuffer->handle(), 0, 1, &viewport); - m_errorMonitor->VerifyFound(); + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } else { + printf(" %s Extension not supported, skipping tests\n", VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + return; } + ASSERT_NO_FATAL_FAILURE(InitState()); - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a6); - VkRect2D scissor = {{-1, 0}, {16, 16}}; - vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); + // Create ordinary and push descriptor set layout + VkDescriptorSetLayoutBinding binding = {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; + const VkDescriptorSetLayoutObj ds_layout(m_device, {binding}); + ASSERT_TRUE(ds_layout.initialized()); + const VkDescriptorSetLayoutObj push_ds_layout(m_device, {binding}, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR); + ASSERT_TRUE(push_ds_layout.initialized()); + + // Now use the descriptor set layouts to create a pipeline layout + const VkPipelineLayoutObj pipeline_layout(m_device, {&push_ds_layout, &ds_layout}); + ASSERT_TRUE(pipeline_layout.initialized()); + + // Create a descriptor to push + const uint32_t buffer_data[4] = {4, 5, 6, 7}; + VkConstantBufferObj buffer_obj(m_device, sizeof(buffer_data), &buffer_data); + ASSERT_TRUE(buffer_obj.initialized()); + + // Create a "write" struct, noting that the buffer_info cannot be a temporary arg (the return from write_descriptor_set + // references its data), and the DescriptorSet() can be temporary, because the value is ignored + VkDescriptorBufferInfo buffer_info = {buffer_obj.handle(), 0, VK_WHOLE_SIZE}; + + VkWriteDescriptorSet descriptor_write = vk_testing::Device::write_descriptor_set( + vk_testing::DescriptorSet(), 0, 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, &buffer_info); + + // Find address of extension call and make the call + PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = + (PFN_vkCmdPushDescriptorSetKHR)vkGetDeviceProcAddr(m_device->device(), "vkCmdPushDescriptorSetKHR"); + ASSERT_TRUE(vkCmdPushDescriptorSetKHR != nullptr); + + // Section 1: Queue family matching/capabilities. + // Create command pool on a non-graphics queue + const uint32_t no_gfx_qfi = m_device->QueueFamilyMatching(VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT); + const uint32_t transfer_only_qfi = + m_device->QueueFamilyMatching(VK_QUEUE_TRANSFER_BIT, (VK_QUEUE_COMPUTE_BIT | VK_QUEUE_GRAPHICS_BIT)); + if ((UINT32_MAX == transfer_only_qfi) && (UINT32_MAX == no_gfx_qfi)) { + printf(" No compute or transfer only queue family, skipping bindpoint and queue tests."); + } else { + const uint32_t err_qfi = (UINT32_MAX == no_gfx_qfi) ? transfer_only_qfi : no_gfx_qfi; + + VkCommandPoolObj command_pool(m_device, err_qfi); + ASSERT_TRUE(command_pool.initialized()); + VkCommandBufferObj command_buffer(m_device, &command_pool); + ASSERT_TRUE(command_buffer.initialized()); + command_buffer.begin(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be002d6); + if (err_qfi == transfer_only_qfi) { + // This as this queue neither supports the gfx or compute bindpoints, we'll get two errors + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be02415); + } + vkCmdPushDescriptorSetKHR(command_buffer.handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_write); m_errorMonitor->VerifyFound(); + command_buffer.end(); + + // If we succeed in testing only one condition above, we need to test the other below. + if ((UINT32_MAX != transfer_only_qfi) && (err_qfi != transfer_only_qfi)) { + // Need to test the neither compute/gfx supported case separately. + VkCommandPoolObj tran_command_pool(m_device, transfer_only_qfi); + ASSERT_TRUE(tran_command_pool.initialized()); + VkCommandBufferObj tran_command_buffer(m_device, &tran_command_pool); + ASSERT_TRUE(tran_command_buffer.initialized()); + tran_command_buffer.begin(); + + // We can't avoid getting *both* errors in this case + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be002d6); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be02415); + vkCmdPushDescriptorSetKHR(tran_command_buffer.handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_write); + m_errorMonitor->VerifyFound(); + tran_command_buffer.end(); + } } - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a6); - VkRect2D scissor = {{0, -2}, {16, 16}}; - vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); + // Push to the non-push binding + m_commandBuffer->begin(); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be002da); + vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 1, 1, + &descriptor_write); + m_errorMonitor->VerifyFound(); + + // Specify set out of bounds + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1be002d8); + vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 2, 1, + &descriptor_write); + m_errorMonitor->VerifyFound(); + m_commandBuffer->end(); + + // This is a test for VUID-vkCmdPushDescriptorSetKHR-commandBuffer-recording + // TODO: Add VALIDATION_ERROR_ code support to core_validation::ValidateCmd + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, + "You must call vkBeginCommandBuffer() before this call to vkCmdPushDescriptorSetKHR()"); + vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_write); + m_errorMonitor->VerifyFound(); +} + +TEST_F(VkLayerTest, SetDynScissorParamTests) { + TEST_DESCRIPTION("Test parameters of vkCmdSetScissor without multiViewport feature"); + + VkPhysicalDeviceFeatures features{}; + ASSERT_NO_FATAL_FAILURE(Init(&features)); + + const VkRect2D scissor = {{0, 0}, {16, 16}}; + const VkRect2D scissors[] = {scissor, scissor}; + + m_commandBuffer->begin(); + + // array tests + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a2); + vkCmdSetScissor(m_commandBuffer->handle(), 1, 1, scissors); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d82b61b); + vkCmdSetScissor(m_commandBuffer->handle(), 0, 0, nullptr); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a4); + vkCmdSetScissor(m_commandBuffer->handle(), 0, 2, scissors); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a2); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d82b61b); + vkCmdSetScissor(m_commandBuffer->handle(), 1, 0, scissors); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a2); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a4); + vkCmdSetScissor(m_commandBuffer->handle(), 1, 2, scissors); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d822601); + vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, nullptr); + m_errorMonitor->VerifyFound(); + + struct TestCase { + VkRect2D scissor; + UNIQUE_VALIDATION_ERROR_CODE vuid; + }; + + std::vector test_cases = {{{{-1, 0}, {16, 16}}, VALIDATION_ERROR_1d8004a6}, + {{{0, -1}, {16, 16}}, VALIDATION_ERROR_1d8004a6}, + {{{1, 0}, {INT32_MAX, 16}}, VALIDATION_ERROR_1d8004a8}, + {{{INT32_MAX, 0}, {1, 16}}, VALIDATION_ERROR_1d8004a8}, + {{{0, 0}, {uint32_t{INT32_MAX} + 1, 16}}, VALIDATION_ERROR_1d8004a8}, + {{{0, 1}, {16, INT32_MAX}}, VALIDATION_ERROR_1d8004aa}, + {{{0, INT32_MAX}, {16, 1}}, VALIDATION_ERROR_1d8004aa}, + {{{0, 0}, {16, uint32_t{INT32_MAX} + 1}}, VALIDATION_ERROR_1d8004aa}}; + + for (const auto &test_case : test_cases) { + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, test_case.vuid); + vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &test_case.scissor); m_errorMonitor->VerifyFound(); } - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a8); - VkRect2D scissor = {{100, 100}, {INT_MAX, 16}}; - vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); - m_errorMonitor->VerifyFound(); + m_commandBuffer->end(); +} + +TEST_F(VkLayerTest, SetDynScissorParamMultiviewportTests) { + TEST_DESCRIPTION("Test parameters of vkCmdSetScissor with multiViewport feature enabled"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + if (!m_device->phy().features().multiViewport) { + printf(" VkPhysicalDeviceFeatures::multiViewport is not supported -- skipping test.\n"); + return; } - { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004aa); - VkRect2D scissor = {{100, 100}, {16, INT_MAX}}; - vkCmdSetScissor(m_commandBuffer->handle(), 0, 1, &scissor); - m_errorMonitor->VerifyFound(); + const auto max_scissors = m_device->props.limits.maxViewports; + const uint32_t too_many_scissors = 65536 + 1; // let's say this is too much to allocate pScissors for + + m_commandBuffer->begin(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d82b61b); + vkCmdSetScissor(m_commandBuffer->handle(), 0, 0, nullptr); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d822601); + vkCmdSetScissor(m_commandBuffer->handle(), 0, max_scissors, nullptr); + m_errorMonitor->VerifyFound(); + + if (max_scissors >= too_many_scissors) { + printf( + " VkPhysicalDeviceLimits::maxViewports is too large to practically test against -- skipping part of " + "test.\n"); + return; } - m_commandBuffer->end(); + const VkRect2D scissor = {{0, 0}, {16, 16}}; + const std::vector scissors(max_scissors + 1, scissor); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a0); + vkCmdSetScissor(m_commandBuffer->handle(), 0, max_scissors + 1, scissors.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a0); + vkCmdSetScissor(m_commandBuffer->handle(), max_scissors, 1, scissors.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a0); + vkCmdSetScissor(m_commandBuffer->handle(), 1, max_scissors, scissors.data()); + m_errorMonitor->VerifyFound(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d82b61b); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1d8004a0); + vkCmdSetScissor(m_commandBuffer->handle(), max_scissors + 1, 0, scissors.data()); + m_errorMonitor->VerifyFound(); } // This is a positive test. No failures are expected. @@ -20768,11 +22001,11 @@ TEST_F(VkPositiveLayerTest, EmptyDescriptorUpdateTest) { m_errorMonitor->ExpectSuccess(); // Create layout with two uniform buffer descriptors w/ empty binding between them - OneOffDescriptorSet ds(m_device->device(), { - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - { 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 0 /*!*/, 0, nullptr }, - { 2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr }, - }); + OneOffDescriptorSet ds(m_device, { + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + {1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 0 /*!*/, 0, nullptr}, + {2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_ALL, nullptr}, + }); // Create a buffer to be used for update VkBufferCreateInfo buff_ci = {}; @@ -20797,6 +22030,10 @@ TEST_F(VkPositiveLayerTest, EmptyDescriptorUpdateTest) { vkDestroyBuffer(m_device->device(), buffer, NULL); return; } + // Make sure allocation is sufficiently large to accommodate buffer requirements + if (mem_reqs.size > mem_alloc.allocationSize) { + mem_alloc.allocationSize = mem_reqs.size; + } VkDeviceMemory mem; err = vkAllocateMemory(m_device->device(), &mem_alloc, NULL, &mem); @@ -20819,18 +22056,66 @@ TEST_F(VkPositiveLayerTest, EmptyDescriptorUpdateTest) { descriptor_write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; descriptor_write.dstSet = ds.set_; - vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); + vkUpdateDescriptorSets(m_device->device(), 1, &descriptor_write, 0, NULL); + + m_errorMonitor->VerifyNotFound(); + // Cleanup + vkFreeMemory(m_device->device(), mem, NULL); + vkDestroyBuffer(m_device->device(), buffer, NULL); +} + +TEST_F(VkLayerTest, MultiplePushDescriptorSets) { + TEST_DESCRIPTION("Verify an error message for multiple push descriptor sets."); + + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" Did not find VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; skipped.\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } else { + printf(" Push Descriptors Extension not supported, skipping tests\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + VkDescriptorSetLayoutBinding dsl_binding = {}; + dsl_binding.binding = 0; + dsl_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + dsl_binding.descriptorCount = 1; + dsl_binding.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; + dsl_binding.pImmutableSamplers = NULL; + + const unsigned int descriptor_set_layout_count = 2; + std::vector ds_layouts; + for (uint32_t i = 0; i < descriptor_set_layout_count; ++i) { + dsl_binding.binding = i; + ds_layouts.emplace_back(m_device, std::vector(1, dsl_binding), + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR); + } + const auto &ds_vk_layouts = MakeVkHandles(ds_layouts); - m_errorMonitor->VerifyNotFound(); - // Cleanup - vkFreeMemory(m_device->device(), mem, NULL); - vkDestroyBuffer(m_device->device(), buffer, NULL); + VkPipelineLayout pipeline_layout; + VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; + pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipeline_layout_ci.pNext = NULL; + pipeline_layout_ci.pushConstantRangeCount = 0; + pipeline_layout_ci.pPushConstantRanges = NULL; + pipeline_layout_ci.setLayoutCount = ds_vk_layouts.size(); + pipeline_layout_ci.pSetLayouts = ds_vk_layouts.data(); + + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_0fe0024a); + vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); + m_errorMonitor->VerifyFound(); } // This is a positive test. No failures are expected. TEST_F(VkPositiveLayerTest, PushDescriptorNullDstSetTest) { TEST_DESCRIPTION("Use null dstSet in CmdPushDescriptorSetKHR"); - VkResult err; + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); } else { @@ -20853,28 +22138,11 @@ TEST_F(VkPositiveLayerTest, PushDescriptorNullDstSetTest) { dsl_binding.descriptorCount = 1; dsl_binding.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); - /* Now use the descriptor layout to create a pipeline layout */ - VkPipelineLayout pipeline_layout; - VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo = {}; - pPipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pPipelineLayoutCreateInfo.pNext = NULL; - pPipelineLayoutCreateInfo.pushConstantRangeCount = 0; - pPipelineLayoutCreateInfo.pPushConstantRanges = NULL; - pPipelineLayoutCreateInfo.setLayoutCount = 1; - pPipelineLayoutCreateInfo.pSetLayouts = &ds_layout; + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR); - err = vkCreatePipelineLayout(m_device->device(), &pPipelineLayoutCreateInfo, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + // Now use the descriptor layout to create a pipeline layout + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds_layout}); static const float vbo_data[3] = {1.f, 0.f, 1.f}; VkConstantBufferObj vbo(m_device, sizeof(vbo_data), (const void *)&vbo_data); @@ -20898,11 +22166,10 @@ TEST_F(VkPositiveLayerTest, PushDescriptorNullDstSetTest) { (PFN_vkCmdPushDescriptorSetKHR)vkGetDeviceProcAddr(m_device->device(), "vkCmdPushDescriptorSetKHR"); assert(vkCmdPushDescriptorSetKHR != nullptr); m_commandBuffer->begin(); - vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptor_write); + vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_write); m_errorMonitor->VerifyNotFound(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); } // This is a positive test. No failures are expected. @@ -20950,20 +22217,11 @@ TEST_F(VkPositiveLayerTest, PushDescriptorUnboundSetTest) { dsl_binding.descriptorCount = 1; dsl_binding.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); // Create push descriptor set layout - ds_layout_ci.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; - VkDescriptorSetLayout push_ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &push_ds_layout); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj push_ds_layout(m_device, {dsl_binding}, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR); // Allocate descriptor set VkDescriptorSetAllocateInfo alloc_info = {}; @@ -20971,24 +22229,13 @@ TEST_F(VkPositiveLayerTest, PushDescriptorUnboundSetTest) { alloc_info.pNext = NULL; alloc_info.descriptorPool = ds_pool; alloc_info.descriptorSetCount = 1; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); VkDescriptorSet descriptor_set; err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_set); ASSERT_VK_SUCCESS(err); // Now use the descriptor layouts to create a pipeline layout - VkPipelineLayout pipeline_layout; - VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo = {}; - pPipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pPipelineLayoutCreateInfo.pNext = NULL; - pPipelineLayoutCreateInfo.pushConstantRangeCount = 0; - pPipelineLayoutCreateInfo.pPushConstantRanges = NULL; - pPipelineLayoutCreateInfo.setLayoutCount = 2; - VkDescriptorSetLayout ds_layouts[2] = {push_ds_layout, ds_layout}; - pPipelineLayoutCreateInfo.pSetLayouts = ds_layouts; - - err = vkCreatePipelineLayout(m_device->device(), &pPipelineLayoutCreateInfo, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&push_ds_layout, &ds_layout}); // Create PSO char const *vsSource = @@ -21013,8 +22260,8 @@ TEST_F(VkPositiveLayerTest, PushDescriptorUnboundSetTest) { pipe.SetScissor(m_scissors); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); static const float bo_data[1] = {1.f}; VkConstantBufferObj buffer(m_device, sizeof(bo_data), (const void *)&bo_data, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT); @@ -21044,17 +22291,15 @@ TEST_F(VkPositiveLayerTest, PushDescriptorUnboundSetTest) { vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); // Push descriptors and bind descriptor set - vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &descriptor_write); - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 1, 1, &descriptor_set, 0, - NULL); + vkCmdPushDescriptorSetKHR(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, + &descriptor_write); + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 1, 1, + &descriptor_set, 0, NULL); // No errors should be generated. vkCmdDraw(m_commandBuffer->handle(), 3, 1, 0, 0); m_errorMonitor->VerifyNotFound(); - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); - vkDestroyDescriptorSetLayout(m_device->device(), push_ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); } @@ -21064,9 +22309,7 @@ TEST_F(VkPositiveLayerTest, TestAliasedMemoryTracking) { bool pass; TEST_DESCRIPTION( - "Create a buffer, allocate memory, bind memory, destroy " - "the buffer, create an image, and bind the same memory to " - "it"); + "Create a buffer, allocate memory, bind memory, destroy the buffer, create an image, and bind the same memory to it"); m_errorMonitor->ExpectSuccess(); @@ -21190,9 +22433,7 @@ TEST_F(VkPositiveLayerTest, TestAliasedMemoryTracking) { TEST_F(VkPositiveLayerTest, TestDestroyFreeNullHandles) { VkResult err; - TEST_DESCRIPTION( - "Call all applicable destroy and free routines with NULL" - "handles, expecting no validation errors"); + TEST_DESCRIPTION("Call all applicable destroy and free routines with NULL handles, expecting no validation errors"); m_errorMonitor->ExpectSuccess(); @@ -21256,25 +22497,18 @@ TEST_F(VkPositiveLayerTest, TestDestroyFreeNullHandles) { dsl_binding.descriptorCount = 1; dsl_binding.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; dsl_binding.pImmutableSamplers = NULL; - VkDescriptorSetLayoutCreateInfo ds_layout_ci = {}; - ds_layout_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - ds_layout_ci.pNext = NULL; - ds_layout_ci.bindingCount = 1; - ds_layout_ci.pBindings = &dsl_binding; - VkDescriptorSetLayout ds_layout; - err = vkCreateDescriptorSetLayout(m_device->device(), &ds_layout_ci, NULL, &ds_layout); - ASSERT_VK_SUCCESS(err); + + const VkDescriptorSetLayoutObj ds_layout(m_device, {dsl_binding}); VkDescriptorSet descriptor_sets[3] = {}; VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; alloc_info.descriptorSetCount = 1; alloc_info.descriptorPool = ds_pool; - alloc_info.pSetLayouts = &ds_layout; + alloc_info.pSetLayouts = &ds_layout.handle(); err = vkAllocateDescriptorSets(m_device->device(), &alloc_info, &descriptor_sets[1]); ASSERT_VK_SUCCESS(err); vkFreeDescriptorSets(m_device->device(), ds_pool, 3, descriptor_sets); - vkDestroyDescriptorSetLayout(m_device->device(), ds_layout, NULL); vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL); vkFreeMemory(m_device->device(), VK_NULL_HANDLE, NULL); @@ -21398,21 +22632,13 @@ TEST_F(VkPositiveLayerTest, DynamicOffsetWithInactiveBinding) { ASSERT_NO_FATAL_FAILURE(InitViewport()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); - OneOffDescriptorSet ds(m_device->device(), { - { 2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - { 1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr }, - }); - - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.pNext = NULL; - pipeline_layout_ci.setLayoutCount = 1; - pipeline_layout_ci.pSetLayouts = &ds.layout_; + OneOffDescriptorSet ds(m_device, { + {2, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + {0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + {1, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}, + }); - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device, {&ds.layout_}); // Create two buffers to update the descriptors with // The first will be 2k and used for bindings 0 & 1, the second is 1k for binding 2 @@ -21515,14 +22741,14 @@ TEST_F(VkPositiveLayerTest, DynamicOffsetWithInactiveBinding) { pipe.SetScissor(m_scissors); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); - pipe.CreateVKPipeline(pipeline_layout, renderPass()); + pipe.AddDefaultColorAttachment(); + pipe.CreateVKPipeline(pipeline_layout.handle(), renderPass()); vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle()); // This update should succeed, but offset of inactive binding 1 oversteps binding 2 buffer size // we used to have a bug in this case. uint32_t dyn_off[BINDING_COUNT] = {0, 1024, 256}; - vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 1, &ds.set_, + vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout.handle(), 0, 1, &ds.set_, BINDING_COUNT, dyn_off); m_commandBuffer->Draw(1, 0, 0, 0); m_errorMonitor->VerifyNotFound(); @@ -21531,14 +22757,11 @@ TEST_F(VkPositiveLayerTest, DynamicOffsetWithInactiveBinding) { vkDestroyBuffer(m_device->device(), dyub2, NULL); vkFreeMemory(m_device->device(), mem1, NULL); vkFreeMemory(m_device->device(), mem2, NULL); - - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); } TEST_F(VkPositiveLayerTest, NonCoherentMemoryMapping) { TEST_DESCRIPTION( - "Ensure that validations handling of non-coherent memory " - "mapping while using VK_WHOLE_SIZE does not cause access " + "Ensure that validations handling of non-coherent memory mapping while using VK_WHOLE_SIZE does not cause access " "violations"); VkResult err; uint8_t *pData; @@ -21788,9 +23011,7 @@ TEST_F(VkPositiveLayerTest, CreateImageViewFollowsParameterCompatibilityRequirem } TEST_F(VkPositiveLayerTest, ValidUsage) { - TEST_DESCRIPTION( - "Verify that creating an image view from an image with valid usage " - "doesn't generate validation errors"); + TEST_DESCRIPTION("Verify that creating an image view from an image with valid usage doesn't generate validation errors"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -21817,9 +23038,7 @@ TEST_F(VkPositiveLayerTest, ValidUsage) { // This is a positive test. No failures are expected. TEST_F(VkPositiveLayerTest, BindSparse) { - TEST_DESCRIPTION( - "Bind 2 memory ranges to one image using vkQueueBindSparse, destroy the image" - "and then free the memory"); + TEST_DESCRIPTION("Bind 2 memory ranges to one image using vkQueueBindSparse, destroy the image and then free the memory"); ASSERT_NO_FATAL_FAILURE(Init()); @@ -21842,7 +23061,7 @@ TEST_F(VkPositiveLayerTest, BindSparse) { image_create_info.arrayLayers = 1; image_create_info.samples = VK_SAMPLE_COUNT_1_BIT; image_create_info.tiling = VK_IMAGE_TILING_OPTIMAL; - image_create_info.usage = VK_IMAGE_USAGE_STORAGE_BIT; + image_create_info.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT; image_create_info.flags = VK_IMAGE_CREATE_SPARSE_BINDING_BIT; VkResult err = vkCreateImage(m_device->device(), &image_create_info, NULL, &image); ASSERT_VK_SUCCESS(err); @@ -21910,10 +23129,8 @@ TEST_F(VkPositiveLayerTest, BindSparse) { TEST_F(VkPositiveLayerTest, RenderPassInitialLayoutUndefined) { TEST_DESCRIPTION( - "Ensure that CmdBeginRenderPass with an attachment's " - "initialLayout of VK_IMAGE_LAYOUT_UNDEFINED works when " - "the command buffer has prior knowledge of that " - "attachment's layout."); + "Ensure that CmdBeginRenderPass with an attachment's initialLayout of VK_IMAGE_LAYOUT_UNDEFINED works when the command " + "buffer has prior knowledge of that attachment's layout."); m_errorMonitor->ExpectSuccess(); @@ -21986,10 +23203,8 @@ TEST_F(VkPositiveLayerTest, RenderPassInitialLayoutUndefined) { TEST_F(VkPositiveLayerTest, FramebufferBindingDestroyCommandPool) { TEST_DESCRIPTION( - "This test should pass. Create a Framebuffer and " - "command buffer, bind them together, then destroy " - "command pool and framebuffer and verify there are no " - "errors."); + "This test should pass. Create a Framebuffer and command buffer, bind them together, then destroy command pool and " + "framebuffer and verify there are no errors."); m_errorMonitor->ExpectSuccess(); @@ -22062,9 +23277,7 @@ TEST_F(VkPositiveLayerTest, FramebufferBindingDestroyCommandPool) { } TEST_F(VkPositiveLayerTest, RenderPassSubpassZeroTransitionsApplied) { - TEST_DESCRIPTION( - "Ensure that CmdBeginRenderPass applies the layout " - "transitions for the first subpass"); + TEST_DESCRIPTION("Ensure that CmdBeginRenderPass applies the layout transitions for the first subpass"); m_errorMonitor->ExpectSuccess(); @@ -22144,10 +23357,8 @@ TEST_F(VkPositiveLayerTest, RenderPassSubpassZeroTransitionsApplied) { TEST_F(VkPositiveLayerTest, DepthStencilLayoutTransitionForDepthOnlyImageview) { TEST_DESCRIPTION( - "Validate that when an imageView of a depth/stencil image " - "is used as a depth/stencil framebuffer attachment, the " - "aspectMask is ignored and both depth and stencil image " - "subresources are used."); + "Validate that when an imageView of a depth/stencil image is used as a depth/stencil framebuffer attachment, the " + "aspectMask is ignored and both depth and stencil image subresources are used."); ASSERT_NO_FATAL_FAILURE(Init()); VkFormatProperties format_properties; @@ -22245,9 +23456,7 @@ TEST_F(VkPositiveLayerTest, DepthStencilLayoutTransitionForDepthOnlyImageview) { TEST_F(VkPositiveLayerTest, RenderPassTransitionsAttachmentUnused) { TEST_DESCRIPTION( - "Ensure that layout transitions work correctly without " - "errors, when an attachment reference is " - "VK_ATTACHMENT_UNUSED"); + "Ensure that layout transitions work correctly without errors, when an attachment reference is VK_ATTACHMENT_UNUSED"); m_errorMonitor->ExpectSuccess(); @@ -22285,9 +23494,7 @@ TEST_F(VkPositiveLayerTest, RenderPassTransitionsAttachmentUnused) { // This is a positive test. No errors are expected. TEST_F(VkPositiveLayerTest, StencilLoadOp) { - TEST_DESCRIPTION( - "Create a stencil-only attachment with a LOAD_OP set to " - "CLEAR. stencil[Load|Store]Op used to be ignored."); + TEST_DESCRIPTION("Create a stencil-only attachment with a LOAD_OP set to CLEAR. stencil[Load|Store]Op used to be ignored."); VkResult result = VK_SUCCESS; ASSERT_NO_FATAL_FAILURE(Init()); auto depth_format = FindSupportedDepthStencilFormat(gpu()); @@ -22652,14 +23859,14 @@ TEST_F(VkPositiveLayerTest, QueryAndCopySecondaryCommandBuffers) { VkBuffer buffer; err = vkCreateBuffer(m_device->device(), &buff_create_info, NULL, &buffer); ASSERT_VK_SUCCESS(err); + + VkMemoryRequirements memReqs; + vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); VkMemoryAllocateInfo mem_alloc = {}; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = NULL; - mem_alloc.allocationSize = 1024; + mem_alloc.allocationSize = memReqs.size; mem_alloc.memoryTypeIndex = 0; - - VkMemoryRequirements memReqs; - vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); bool pass = m_device->phy().set_memory_type(memReqs.memoryTypeBits, &mem_alloc, 0); if (!pass) { vkDestroyBuffer(m_device->device(), buffer, NULL); @@ -22752,14 +23959,14 @@ TEST_F(VkPositiveLayerTest, QueryAndCopyMultipleCommandBuffers) { VkBuffer buffer; err = vkCreateBuffer(m_device->device(), &buff_create_info, NULL, &buffer); ASSERT_VK_SUCCESS(err); + + VkMemoryRequirements memReqs; + vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); VkMemoryAllocateInfo mem_alloc = {}; mem_alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; mem_alloc.pNext = NULL; - mem_alloc.allocationSize = 1024; + mem_alloc.allocationSize = memReqs.size; mem_alloc.memoryTypeIndex = 0; - - VkMemoryRequirements memReqs; - vkGetBufferMemoryRequirements(m_device->device(), buffer, &memReqs); bool pass = m_device->phy().set_memory_type(memReqs.memoryTypeBits, &mem_alloc, 0); if (!pass) { vkDestroyBuffer(m_device->device(), buffer, NULL); @@ -22854,9 +24061,7 @@ TEST_F(VkLayerTest, ResetEventThenSet) { vkQueueSubmit(queue, 1, &submit_info, VK_NULL_HANDLE); } { - m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, - "that is already in use by a " - "command buffer."); + m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "that is already in use by a command buffer."); vkSetEvent(m_device->device(), event); m_errorMonitor->VerifyFound(); } @@ -22871,10 +24076,8 @@ TEST_F(VkLayerTest, ResetEventThenSet) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoFencesThreeFrames) { TEST_DESCRIPTION( - "Two command buffers with two separate fences are each " - "run through a Submit & WaitForFences cycle 3 times. This " - "previously revealed a bug so running this positive test " - "to prevent a regression."); + "Two command buffers with two separate fences are each run through a Submit & WaitForFences cycle 3 times. This previously " + "revealed a bug so running this positive test to prevent a regression."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -22945,8 +24148,7 @@ TEST_F(VkPositiveLayerTest, TwoFencesThreeFrames) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenceQWI) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "submitted on separate queues followed by a QueueWaitIdle."); + "Two command buffers, each in a separate QueueSubmit call submitted on separate queues followed by a QueueWaitIdle."); ASSERT_NO_FATAL_FAILURE(Init()); if ((m_device->queue_props.empty()) || (m_device->queue_props[0].queueCount < 2)) return; @@ -23042,9 +24244,8 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenc // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenceQWIFence) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "submitted on separate queues, the second having a fence" - "followed by a QueueWaitIdle."); + "Two command buffers, each in a separate QueueSubmit call submitted on separate queues, the second having a fencefollowed " + "by a QueueWaitIdle."); ASSERT_NO_FATAL_FAILURE(Init()); if ((m_device->queue_props.empty()) || (m_device->queue_props[0].queueCount < 2)) return; @@ -23146,9 +24347,8 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenc // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenceTwoWFF) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "submitted on separate queues, the second having a fence" - "followed by two consecutive WaitForFences calls on the same fence."); + "Two command buffers, each in a separate QueueSubmit call submitted on separate queues, the second having a fencefollowed " + "by two consecutive WaitForFences calls on the same fence."); ASSERT_NO_FATAL_FAILURE(Init()); if ((m_device->queue_props.empty()) || (m_device->queue_props[0].queueCount < 2)) return; @@ -23318,8 +24518,7 @@ TEST_F(VkPositiveLayerTest, TwoQueuesEnsureCorrectRetirementWithWorkStolen) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFence) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "submitted on separate queues, the second having a fence, " + "Two command buffers, each in a separate QueueSubmit call submitted on separate queues, the second having a fence, " "followed by a WaitForFences call."); ASSERT_NO_FATAL_FAILURE(Init()); @@ -23422,10 +24621,8 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsSeparateQueuesWithSemaphoreAndOneFenc // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueWithSemaphoreAndOneFence) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "on the same queue, sharing a signal/wait semaphore, the " - "second having a fence, " - "followed by a WaitForFences call."); + "Two command buffers, each in a separate QueueSubmit call on the same queue, sharing a signal/wait semaphore, the second " + "having a fence, followed by a WaitForFences call."); m_errorMonitor->ExpectSuccess(); @@ -23522,9 +24719,8 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueWithSemaphoreAndOneFence) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueNullQueueSubmitWithFence) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "on the same queue, no fences, followed by a third QueueSubmit with NO " - "SubmitInfos but with a fence, followed by a WaitForFences call."); + "Two command buffers, each in a separate QueueSubmit call on the same queue, no fences, followed by a third QueueSubmit " + "with NO SubmitInfos but with a fence, followed by a WaitForFences call."); m_errorMonitor->ExpectSuccess(); @@ -23618,9 +24814,8 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueNullQueueSubmitWithFence) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueOneFence) { TEST_DESCRIPTION( - "Two command buffers, each in a separate QueueSubmit call " - "on the same queue, the second having a fence, followed " - "by a WaitForFences call."); + "Two command buffers, each in a separate QueueSubmit call on the same queue, the second having a fence, followed by a " + "WaitForFences call."); m_errorMonitor->ExpectSuccess(); @@ -23711,8 +24906,7 @@ TEST_F(VkPositiveLayerTest, TwoQueueSubmitsOneQueueOneFence) { // This is a positive test. No errors should be generated. TEST_F(VkPositiveLayerTest, TwoSubmitInfosWithSemaphoreOneQueueSubmitsOneFence) { TEST_DESCRIPTION( - "Two command buffers each in a separate SubmitInfo sent in a single " - "QueueSubmit call followed by a WaitForFences call."); + "Two command buffers each in a separate SubmitInfo sent in a single QueueSubmit call followed by a WaitForFences call."); ASSERT_NO_FATAL_FAILURE(Init()); m_errorMonitor->ExpectSuccess(); @@ -23833,10 +25027,8 @@ TEST_F(VkPositiveLayerTest, RenderPassSecondaryCommandBuffersMultipleTimes) { TEST_F(VkPositiveLayerTest, ValidRenderPassAttachmentLayoutWithLoadOp) { TEST_DESCRIPTION( - "Positive test where we create a renderpass with an " - "attachment that uses LOAD_OP_CLEAR, the first subpass " - "has a valid layout, and a second subpass then uses a " - "valid *READ_ONLY* layout."); + "Positive test where we create a renderpass with an attachment that uses LOAD_OP_CLEAR, the first subpass has a valid " + "layout, and a second subpass then uses a valid *READ_ONLY* layout."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); auto depth_format = FindSupportedDepthStencilFormat(gpu()); @@ -23882,9 +25074,8 @@ TEST_F(VkPositiveLayerTest, ValidRenderPassAttachmentLayoutWithLoadOp) { TEST_F(VkPositiveLayerTest, RenderPassDepthStencilLayoutTransition) { TEST_DESCRIPTION( - "Create a render pass with depth-stencil attachment where layout transition " - "from UNDEFINED TO DS_READ_ONLY_OPTIMAL is set by render pass and verify that " - "transition has correctly occurred at queue submit time with no validation errors."); + "Create a render pass with depth-stencil attachment where layout transition from UNDEFINED TO DS_READ_ONLY_OPTIMAL is set " + "by render pass and verify that transition has correctly occurred at queue submit time with no validation errors."); ASSERT_NO_FATAL_FAILURE(Init()); auto depth_format = FindSupportedDepthStencilFormat(gpu()); @@ -23963,9 +25154,7 @@ TEST_F(VkPositiveLayerTest, RenderPassDepthStencilLayoutTransition) { } TEST_F(VkPositiveLayerTest, CreatePipelineAttribMatrixType) { - TEST_DESCRIPTION( - "Test that pipeline validation accepts matrices passed " - "as vertex attributes"); + TEST_DESCRIPTION("Test that pipeline validation accepts matrices passed as vertex attributes"); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24001,7 +25190,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineAttribMatrixType) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24054,7 +25243,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineAttribArrayType) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24072,9 +25261,8 @@ TEST_F(VkPositiveLayerTest, CreatePipelineAttribArrayType) { TEST_F(VkPositiveLayerTest, CreatePipelineAttribComponents) { TEST_DESCRIPTION( - "Test that pipeline validation accepts consuming a vertex attribute " - "through multiple vertex shader inputs, each consuming a different " - "subset of the components."); + "Test that pipeline validation accepts consuming a vertex attribute through multiple vertex shader inputs, each consuming " + "a different subset of the components."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24113,7 +25301,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineAttribComponents) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24152,7 +25340,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineSimplePositive) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24167,9 +25355,8 @@ TEST_F(VkPositiveLayerTest, CreatePipelineSimplePositive) { TEST_F(VkPositiveLayerTest, CreatePipelineRelaxedTypeMatch) { TEST_DESCRIPTION( - "Test that pipeline validation accepts the relaxed type matching rules " - "set out in 14.1.3: fundamental type must match, and producer side must " - "have at least as many components"); + "Test that pipeline validation accepts the relaxed type matching rules set out in 14.1.3: fundamental type must match, and " + "producer side must have at least as many components"); m_errorMonitor->ExpectSuccess(); // VK 1.0.8 Specification, 14.1.3 "Additionally,..." block @@ -24201,7 +25388,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineRelaxedTypeMatch) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24217,9 +25404,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineRelaxedTypeMatch) { } TEST_F(VkPositiveLayerTest, CreatePipelineTessPerVertex) { - TEST_DESCRIPTION( - "Test that pipeline validation accepts per-vertex variables " - "passed between the TCS and TES stages"); + TEST_DESCRIPTION("Test that pipeline validation accepts per-vertex variables passed between the TCS and TES stages"); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24270,7 +25455,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineTessPerVertex) { VkPipelineObj pipe(m_device); pipe.SetInputAssembly(&iasci); pipe.SetTessellation(&tsci); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&tcs); pipe.AddShader(&tes); @@ -24287,10 +25472,8 @@ TEST_F(VkPositiveLayerTest, CreatePipelineTessPerVertex) { TEST_F(VkPositiveLayerTest, CreatePipelineGeometryInputBlockPositive) { TEST_DESCRIPTION( - "Test that pipeline validation accepts a user-defined " - "interface block passed into the geometry shader. This " - "is interesting because the 'extra' array level is not " - "present on the member type, but on the block instance."); + "Test that pipeline validation accepts a user-defined interface block passed into the geometry shader. This is interesting " + "because the 'extra' array level is not present on the member type, but on the block instance."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24328,7 +25511,7 @@ TEST_F(VkPositiveLayerTest, CreatePipelineGeometryInputBlockPositive) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&gs); pipe.AddShader(&fs); @@ -24344,18 +25527,32 @@ TEST_F(VkPositiveLayerTest, CreatePipelineGeometryInputBlockPositive) { TEST_F(VkPositiveLayerTest, CreatePipeline64BitAttributesPositive) { TEST_DESCRIPTION( - "Test that pipeline validation accepts basic use of 64bit vertex " - "attributes. This is interesting because they consume multiple " - "locations."); + "Test that pipeline validation accepts basic use of 64bit vertex attributes. This is interesting because they consume " + "multiple locations."); m_errorMonitor->ExpectSuccess(); - ASSERT_NO_FATAL_FAILURE(Init()); + if (!EnableDeviceProfileLayer()) return; + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + ASSERT_NO_FATAL_FAILURE(InitState()); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); if (!m_device->phy().features().shaderFloat64) { printf(" Device does not support 64bit vertex attributes; skipped.\n"); return; } + // Set 64bit format to support VTX Buffer feature + PFN_vkSetPhysicalDeviceFormatPropertiesEXT fpvkSetPhysicalDeviceFormatPropertiesEXT = nullptr; + PFN_vkGetOriginalPhysicalDeviceFormatPropertiesEXT fpvkGetOriginalPhysicalDeviceFormatPropertiesEXT = nullptr; + + // Load required functions + if (!LoadDeviceProfileLayer(fpvkSetPhysicalDeviceFormatPropertiesEXT, fpvkGetOriginalPhysicalDeviceFormatPropertiesEXT)) { + return; + } + VkFormatProperties format_props; + fpvkGetOriginalPhysicalDeviceFormatPropertiesEXT(gpu(), VK_FORMAT_R64G64B64A64_SFLOAT, &format_props); + format_props.bufferFeatures |= VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT; + fpvkSetPhysicalDeviceFormatPropertiesEXT(gpu(), VK_FORMAT_R64G64B64A64_SFLOAT, format_props); VkVertexInputBindingDescription input_bindings[1]; memset(input_bindings, 0, sizeof(input_bindings)); @@ -24394,7 +25591,7 @@ TEST_F(VkPositiveLayerTest, CreatePipeline64BitAttributesPositive) { VkShaderObj fs(m_device, fsSource, VK_SHADER_STAGE_FRAGMENT_BIT, this); VkPipelineObj pipe(m_device); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.AddShader(&vs); pipe.AddShader(&fs); @@ -24437,19 +25634,12 @@ TEST_F(VkPositiveLayerTest, CreatePipelineInputAttachmentPositive) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); ASSERT_NO_FATAL_FAILURE(InitRenderTarget()); VkDescriptorSetLayoutBinding dslb = {0, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_FRAGMENT_BIT, nullptr}; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dslb}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); - - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, {dslb}); + const VkPipelineLayoutObj pl(m_device, {&dsl}); VkAttachmentDescription descs[2] = { {0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE, @@ -24459,35 +25649,34 @@ TEST_F(VkPositiveLayerTest, CreatePipelineInputAttachmentPositive) { VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL}, }; VkAttachmentReference color = { - 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + 0, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, }; VkAttachmentReference input = { - 1, VK_IMAGE_LAYOUT_GENERAL, + 1, + VK_IMAGE_LAYOUT_GENERAL, }; VkSubpassDescription sd = {0, VK_PIPELINE_BIND_POINT_GRAPHICS, 1, &input, 1, &color, nullptr, nullptr, 0, nullptr}; VkRenderPassCreateInfo rpci = {VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, nullptr, 0, 2, descs, 1, &sd, 0, nullptr}; VkRenderPass rp; - err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); + VkResult err = vkCreateRenderPass(m_device->device(), &rpci, nullptr, &rp); ASSERT_VK_SUCCESS(err); // should be OK. would go wrong here if it's going to... - pipe.CreateVKPipeline(pl, rp); + pipe.CreateVKPipeline(pl.handle(), rp); m_errorMonitor->VerifyNotFound(); vkDestroyRenderPass(m_device->device(), rp, nullptr); - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkPositiveLayerTest, CreateComputePipelineMissingDescriptorUnusedPositive) { TEST_DESCRIPTION( - "Test that pipeline validation accepts a compute pipeline which declares a " - "descriptor-backed resource which is not provided, but the shader does not " - "statically use it. This is interesting because it requires compute pipelines " - "to have a proper descriptor use walk, which they didn't for some time."); + "Test that pipeline validation accepts a compute pipeline which declares a descriptor-backed resource which is not " + "provided, but the shader does not statically use it. This is interesting because it requires compute pipelines to have a " + "proper descriptor use walk, which they didn't for some time."); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24527,26 +25716,19 @@ TEST_F(VkPositiveLayerTest, CreateComputePipelineMissingDescriptorUnusedPositive TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsSampler) { TEST_DESCRIPTION( - "Test that pipeline validation accepts a shader consuming only the " - "sampler portion of a combined image + sampler"); + "Test that pipeline validation accepts a shader consuming only the sampler portion of a combined image + sampler"); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorSetLayoutBinding bindings[] = { + std::vector bindings = { {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, {1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, {2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, }; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 3, bindings}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, bindings); + const VkPipelineLayoutObj pl(m_device, {&dsl}); char const *csSource = "#version 450\n" @@ -24565,45 +25747,35 @@ TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsS 0, {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, cs.handle(), "main", nullptr}, - pl, + pl.handle(), VK_NULL_HANDLE, -1}; VkPipeline pipe; - err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); + VkResult err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); m_errorMonitor->VerifyNotFound(); if (err == VK_SUCCESS) { vkDestroyPipeline(m_device->device(), pipe, nullptr); } - - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsImage) { TEST_DESCRIPTION( - "Test that pipeline validation accepts a shader consuming only the " - "image portion of a combined image + sampler"); + "Test that pipeline validation accepts a shader consuming only the image portion of a combined image + sampler"); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorSetLayoutBinding bindings[] = { + std::vector bindings = { {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, {1, VK_DESCRIPTOR_TYPE_SAMPLER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, {2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, }; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 3, bindings}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, bindings); + const VkPipelineLayoutObj pl(m_device, {&dsl}); char const *csSource = "#version 450\n" @@ -24622,45 +25794,35 @@ TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsI 0, {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, cs.handle(), "main", nullptr}, - pl, + pl.handle(), VK_NULL_HANDLE, -1}; VkPipeline pipe; - err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); + VkResult err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); m_errorMonitor->VerifyNotFound(); if (err == VK_SUCCESS) { vkDestroyPipeline(m_device->device(), pipe, nullptr); } - - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); } TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsBoth) { TEST_DESCRIPTION( - "Test that pipeline validation accepts a shader consuming " - "both the sampler and the image of a combined image+sampler " - "but via separate variables"); + "Test that pipeline validation accepts a shader consuming both the sampler and the image of a combined image+sampler but " + "via separate variables"); m_errorMonitor->ExpectSuccess(); ASSERT_NO_FATAL_FAILURE(Init()); - VkDescriptorSetLayoutBinding bindings[] = { + std::vector bindings = { {0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, {1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}, }; - VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, 2, bindings}; - VkDescriptorSetLayout dsl; - VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); - ASSERT_VK_SUCCESS(err); - VkPipelineLayoutCreateInfo plci = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, nullptr, 0, 1, &dsl, 0, nullptr}; - VkPipelineLayout pl; - err = vkCreatePipelineLayout(m_device->device(), &plci, nullptr, &pl); - ASSERT_VK_SUCCESS(err); + const VkDescriptorSetLayoutObj dsl(m_device, bindings); + const VkPipelineLayoutObj pl(m_device, {&dsl}); char const *csSource = "#version 450\n" @@ -24679,21 +25841,95 @@ TEST_F(VkPositiveLayerTest, CreateComputePipelineCombinedImageSamplerConsumedAsB 0, {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, cs.handle(), "main", nullptr}, - pl, + pl.handle(), VK_NULL_HANDLE, -1}; VkPipeline pipe; - err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); + VkResult err = vkCreateComputePipelines(m_device->device(), VK_NULL_HANDLE, 1, &cpci, nullptr, &pipe); m_errorMonitor->VerifyNotFound(); if (err == VK_SUCCESS) { vkDestroyPipeline(m_device->device(), pipe, nullptr); } +} + +TEST_F(VkPositiveLayerTest, CreateDescriptorSetBindingWithIgnoredSamplers) { + TEST_DESCRIPTION("Test that layers conditionally do ignore the pImmutableSamplers on vkCreateDescriptorSetLayout"); + + bool prop2_found = false; + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + prop2_found = true; + } else { + printf(" %s Extension not supported, skipping push descriptor sub-tests\n", + VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + bool push_descriptor_found = false; + if (prop2_found && DeviceExtensionSupported(gpu(), nullptr, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + push_descriptor_found = true; + } else { + printf(" %s Extension not supported, skipping push descriptor sub-tests\n", + VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + } + + ASSERT_NO_FATAL_FAILURE(InitState()); + const uint64_t fake_address_64 = 0xCDCDCDCDCDCDCDCD; + const uint64_t fake_address_32 = 0xCDCDCDCD; + const void *fake_pointer = + sizeof(void *) == 8 ? reinterpret_cast(fake_address_64) : reinterpret_cast(fake_address_32); + const VkSampler *hopefully_undereferencable_pointer = reinterpret_cast(fake_pointer); + + // regular descriptors + m_errorMonitor->ExpectSuccess(); + { + const VkDescriptorSetLayoutBinding non_sampler_bindings[] = { + {0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {1, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {2, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {3, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {4, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {5, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {6, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {7, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {8, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + }; + const VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0, + static_cast(size(non_sampler_bindings)), non_sampler_bindings}; + VkDescriptorSetLayout dsl; + const VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); + ASSERT_VK_SUCCESS(err); + vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); + } + m_errorMonitor->VerifyNotFound(); - vkDestroyPipelineLayout(m_device->device(), pl, nullptr); - vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); + if (push_descriptor_found) { + // push descriptors + m_errorMonitor->ExpectSuccess(); + { + const VkDescriptorSetLayoutBinding non_sampler_bindings[] = { + {0, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {1, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {2, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {3, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {4, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {5, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + {6, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, VK_SHADER_STAGE_FRAGMENT_BIT, hopefully_undereferencable_pointer}, + }; + const VkDescriptorSetLayoutCreateInfo dslci = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, + static_cast(size(non_sampler_bindings)), non_sampler_bindings}; + VkDescriptorSetLayout dsl; + const VkResult err = vkCreateDescriptorSetLayout(m_device->device(), &dslci, nullptr, &dsl); + ASSERT_VK_SUCCESS(err); + vkDestroyDescriptorSetLayout(m_device->device(), dsl, nullptr); + } + m_errorMonitor->VerifyNotFound(); + } } TEST_F(VkPositiveLayerTest, Maintenance1Tests) { @@ -24823,8 +26059,6 @@ TEST_F(VkPositiveLayerTest, ValidStructPNext) { } TEST_F(VkPositiveLayerTest, PSOPolygonModeValid) { - VkResult err; - TEST_DESCRIPTION("Verify that using a solid polygon fill mode works correctly."); ASSERT_NO_FATAL_FAILURE(Init()); @@ -24839,14 +26073,7 @@ TEST_F(VkPositiveLayerTest, PSOPolygonModeValid) { VkRenderpassObj render_pass(&test_device); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_ci.setLayoutCount = 0; - pipeline_layout_ci.pSetLayouts = NULL; - - VkPipelineLayout pipeline_layout; - err = vkCreatePipelineLayout(test_device.device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(&test_device); VkPipelineRasterizationStateCreateInfo rs_ci = {}; rs_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; @@ -24863,15 +26090,13 @@ TEST_F(VkPositiveLayerTest, PSOPolygonModeValid) { VkPipelineObj pipe(&test_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); // Set polygonMode to a good value rs_ci.polygonMode = VK_POLYGON_MODE_FILL; pipe.SetRasterization(&rs_ci); - pipe.CreateVKPipeline(pipeline_layout, render_pass.handle()); + pipe.CreateVKPipeline(pipeline_layout.handle(), render_pass.handle()); } m_errorMonitor->VerifyNotFound(); - - vkDestroyPipelineLayout(test_device.device(), pipeline_layout, NULL); } TEST_F(VkPositiveLayerTest, LongSemaphoreChain) { @@ -24885,40 +26110,290 @@ TEST_F(VkPositiveLayerTest, LongSemaphoreChain) { const int chainLength = 32768; VkPipelineStageFlags flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; - for (int i = 0; i < chainLength; i++) { - VkSemaphoreCreateInfo sci = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, nullptr, 0}; - VkSemaphore semaphore; - err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &semaphore); + for (int i = 0; i < chainLength; i++) { + VkSemaphoreCreateInfo sci = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, nullptr, 0}; + VkSemaphore semaphore; + err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &semaphore); + ASSERT_VK_SUCCESS(err); + + semaphores.push_back(semaphore); + + VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO, + nullptr, + semaphores.size() > 1 ? 1u : 0u, + semaphores.size() > 1 ? &semaphores[semaphores.size() - 2] : nullptr, + &flags, + 0, + nullptr, + 1, + &semaphores[semaphores.size() - 1]}; + err = vkQueueSubmit(m_device->m_queue, 1, &si, VK_NULL_HANDLE); + ASSERT_VK_SUCCESS(err); + } + + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, 0}; + VkFence fence; + err = vkCreateFence(m_device->device(), &fci, nullptr, &fence); + ASSERT_VK_SUCCESS(err); + VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &semaphores.back(), &flags, 0, nullptr, 0, nullptr}; + err = vkQueueSubmit(m_device->m_queue, 1, &si, fence); + ASSERT_VK_SUCCESS(err); + + vkWaitForFences(m_device->device(), 1, &fence, VK_TRUE, UINT64_MAX); + + for (auto semaphore : semaphores) vkDestroySemaphore(m_device->device(), semaphore, nullptr); + + vkDestroyFence(m_device->device(), fence, nullptr); + + m_errorMonitor->VerifyNotFound(); +} + +TEST_F(VkPositiveLayerTest, ExternalSemaphore) { +#ifdef _WIN32 + const auto extension_name = VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR; +#else + const auto extension_name = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; +#endif + // Check for external semaphore instance extensions + if (InstanceExtensionSupported(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME); + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" External semaphore extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for external semaphore device extensions + if (DeviceExtensionSupported(gpu(), nullptr, extension_name)) { + m_device_extension_names.push_back(extension_name); + m_device_extension_names.push_back(VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME); + } else { + printf(" External semaphore extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + // Check for external semaphore import and export capability + VkPhysicalDeviceExternalSemaphoreInfoKHR esi = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR, nullptr, + handle_type}; + VkExternalSemaphorePropertiesKHR esp = {VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR, nullptr}; + auto vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = + (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)vkGetInstanceProcAddr( + instance(), "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); + vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(gpu(), &esi, &esp); + + if (!(esp.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR) || + !(esp.externalSemaphoreFeatures & VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR)) { + printf(" External semaphore does not support importing and exporting, skipping test\n"); + return; + } + + VkResult err; + m_errorMonitor->ExpectSuccess(); + + // Create a semaphore to export payload from + VkExportSemaphoreCreateInfoKHR esci = {VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR, nullptr, handle_type}; + VkSemaphoreCreateInfo sci = {VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, &esci, 0}; + + VkSemaphore export_semaphore; + err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &export_semaphore); + ASSERT_VK_SUCCESS(err); + + // Create a semaphore to import payload into + sci.pNext = nullptr; + VkSemaphore import_semaphore; + err = vkCreateSemaphore(m_device->device(), &sci, nullptr, &import_semaphore); + ASSERT_VK_SUCCESS(err); + +#ifdef _WIN32 + // Export semaphore payload to an opaque handle + HANDLE handle = nullptr; + VkSemaphoreGetWin32HandleInfoKHR ghi = {VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, nullptr, export_semaphore, + handle_type}; + auto vkGetSemaphoreWin32HandleKHR = + (PFN_vkGetSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetSemaphoreWin32HandleKHR"); + err = vkGetSemaphoreWin32HandleKHR(m_device->device(), &ghi, &handle); + ASSERT_VK_SUCCESS(err); + + // Import opaque handle exported above + VkImportSemaphoreWin32HandleInfoKHR ihi = { + VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, nullptr, import_semaphore, 0, handle_type, handle, nullptr}; + auto vkImportSemaphoreWin32HandleKHR = + (PFN_vkImportSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportSemaphoreWin32HandleKHR"); + err = vkImportSemaphoreWin32HandleKHR(m_device->device(), &ihi); + ASSERT_VK_SUCCESS(err); +#else + // Export semaphore payload to an opaque handle + int fd = 0; + VkSemaphoreGetFdInfoKHR ghi = {VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, nullptr, export_semaphore, handle_type}; + auto vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetSemaphoreFdKHR"); + err = vkGetSemaphoreFdKHR(m_device->device(), &ghi, &fd); + ASSERT_VK_SUCCESS(err); + + // Import opaque handle exported above + VkImportSemaphoreFdInfoKHR ihi = { + VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, nullptr, import_semaphore, 0, handle_type, fd}; + auto vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportSemaphoreFdKHR"); + err = vkImportSemaphoreFdKHR(m_device->device(), &ihi); + ASSERT_VK_SUCCESS(err); +#endif + + // Signal the exported semaphore and wait on the imported semaphore + VkPipelineStageFlags flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; + VkSubmitInfo si[] = { + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, nullptr, &flags, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &import_semaphore, &flags, 0, nullptr, 0, nullptr}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 0, nullptr, &flags, 0, nullptr, 1, &export_semaphore}, + {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &import_semaphore, &flags, 0, nullptr, 0, nullptr}, + }; + err = vkQueueSubmit(m_device->m_queue, 4, si, VK_NULL_HANDLE); + ASSERT_VK_SUCCESS(err); + + if (m_device->phy().features().sparseBinding) { + // Signal the imported semaphore and wait on the exported semaphore + VkBindSparseInfo bi[] = { + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 1, &import_semaphore}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 1, &export_semaphore, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 1, &import_semaphore}, + {VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, nullptr, 1, &export_semaphore, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr}, + }; + err = vkQueueBindSparse(m_device->m_queue, 4, bi, VK_NULL_HANDLE); + ASSERT_VK_SUCCESS(err); + } + + // Cleanup + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + vkDestroySemaphore(m_device->device(), export_semaphore, nullptr); + vkDestroySemaphore(m_device->device(), import_semaphore, nullptr); + + m_errorMonitor->VerifyNotFound(); +} + +TEST_F(VkPositiveLayerTest, ExternalFence) { +#ifdef _WIN32 + const auto extension_name = VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR; +#else + const auto extension_name = VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; +#endif + // Check for external fence instance extensions + if (InstanceExtensionSupported(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME); + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" External fence extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for external fence device extensions + if (DeviceExtensionSupported(gpu(), nullptr, extension_name)) { + m_device_extension_names.push_back(extension_name); + m_device_extension_names.push_back(VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME); + } else { + printf(" External fence extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + // Check for external fence import and export capability + VkPhysicalDeviceExternalFenceInfoKHR efi = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR, nullptr, handle_type}; + VkExternalFencePropertiesKHR efp = {VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR, nullptr}; + auto vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)vkGetInstanceProcAddr( + instance(), "vkGetPhysicalDeviceExternalFencePropertiesKHR"); + vkGetPhysicalDeviceExternalFencePropertiesKHR(gpu(), &efi, &efp); + + if (!(efp.externalFenceFeatures & VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR) || + !(efp.externalFenceFeatures & VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR)) { + printf(" External fence does not support importing and exporting, skipping test\n"); + return; + } + + VkResult err; + m_errorMonitor->ExpectSuccess(); + + // Create a fence to export payload from + VkFence export_fence; + { + VkExportFenceCreateInfoKHR efci = {VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR, nullptr, handle_type}; + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, &efci, 0}; + err = vkCreateFence(m_device->device(), &fci, nullptr, &export_fence); ASSERT_VK_SUCCESS(err); + } - semaphores.push_back(semaphore); + // Create a fence to import payload into + VkFence import_fence; + { + VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, 0}; + err = vkCreateFence(m_device->device(), &fci, nullptr, &import_fence); + ASSERT_VK_SUCCESS(err); + } - VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO, - nullptr, - semaphores.size() > 1 ? 1u : 0u, - semaphores.size() > 1 ? &semaphores[semaphores.size() - 2] : nullptr, - &flags, - 0, - nullptr, - 1, - &semaphores[semaphores.size() - 1]}; - err = vkQueueSubmit(m_device->m_queue, 1, &si, VK_NULL_HANDLE); +#ifdef _WIN32 + // Export fence payload to an opaque handle + HANDLE handle = nullptr; + { + VkFenceGetWin32HandleInfoKHR ghi = {VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, nullptr, export_fence, handle_type}; + auto vkGetFenceWin32HandleKHR = + (PFN_vkGetFenceWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetFenceWin32HandleKHR"); + err = vkGetFenceWin32HandleKHR(m_device->device(), &ghi, &handle); ASSERT_VK_SUCCESS(err); } - VkFenceCreateInfo fci = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, 0}; - VkFence fence; - err = vkCreateFence(m_device->device(), &fci, nullptr, &fence); - ASSERT_VK_SUCCESS(err); - VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1, &semaphores.back(), &flags, 0, nullptr, 0, nullptr}; - err = vkQueueSubmit(m_device->m_queue, 1, &si, fence); - ASSERT_VK_SUCCESS(err); + // Import opaque handle exported above + { + VkImportFenceWin32HandleInfoKHR ifi = { + VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, nullptr, import_fence, 0, handle_type, handle, nullptr}; + auto vkImportFenceWin32HandleKHR = + (PFN_vkImportFenceWin32HandleKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportFenceWin32HandleKHR"); + err = vkImportFenceWin32HandleKHR(m_device->device(), &ifi); + ASSERT_VK_SUCCESS(err); + } +#else + // Export fence payload to an opaque handle + int fd = 0; + { + VkFenceGetFdInfoKHR gfi = {VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, nullptr, export_fence, handle_type}; + auto vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkGetFenceFdKHR"); + err = vkGetFenceFdKHR(m_device->device(), &gfi, &fd); + ASSERT_VK_SUCCESS(err); + } - vkWaitForFences(m_device->device(), 1, &fence, VK_TRUE, UINT64_MAX); + // Import opaque handle exported above + { + VkImportFenceFdInfoKHR ifi = {VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, nullptr, import_fence, 0, handle_type, fd}; + auto vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)vkGetDeviceProcAddr(m_device->device(), "vkImportFenceFdKHR"); + err = vkImportFenceFdKHR(m_device->device(), &ifi); + ASSERT_VK_SUCCESS(err); + } +#endif - for (auto semaphore : semaphores) vkDestroySemaphore(m_device->device(), semaphore, nullptr); + // Signal the exported fence and wait on the imported fence + vkQueueSubmit(m_device->m_queue, 0, nullptr, export_fence); + vkWaitForFences(m_device->device(), 1, &import_fence, VK_TRUE, 1000000000); + vkResetFences(m_device->device(), 1, &import_fence); + vkQueueSubmit(m_device->m_queue, 0, nullptr, export_fence); + vkWaitForFences(m_device->device(), 1, &import_fence, VK_TRUE, 1000000000); + vkResetFences(m_device->device(), 1, &import_fence); + + // Signal the imported fence and wait on the exported fence + vkQueueSubmit(m_device->m_queue, 0, nullptr, import_fence); + vkWaitForFences(m_device->device(), 1, &export_fence, VK_TRUE, 1000000000); + vkResetFences(m_device->device(), 1, &export_fence); + vkQueueSubmit(m_device->m_queue, 0, nullptr, import_fence); + vkWaitForFences(m_device->device(), 1, &export_fence, VK_TRUE, 1000000000); + vkResetFences(m_device->device(), 1, &export_fence); - vkDestroyFence(m_device->device(), fence, nullptr); + // Cleanup + err = vkQueueWaitIdle(m_device->m_queue); + ASSERT_VK_SUCCESS(err); + vkDestroyFence(m_device->device(), export_fence, nullptr); + vkDestroyFence(m_device->device(), import_fence, nullptr); m_errorMonitor->VerifyNotFound(); } @@ -25035,10 +26510,426 @@ TEST_F(VkPositiveLayerTest, ClearDepthStencilWithValidRange) { } } +TEST_F(VkPositiveLayerTest, CreateGraphicsPipelineWithIgnoredPointers) { + TEST_DESCRIPTION("Create Graphics Pipeline with pointers that must be ignored by layers"); + + ASSERT_NO_FATAL_FAILURE(Init()); + + m_depth_stencil_fmt = FindSupportedDepthStencilFormat(gpu()); + ASSERT_TRUE(m_depth_stencil_fmt != 0); + + m_depthStencil->Init(m_device, static_cast(m_width), static_cast(m_height), m_depth_stencil_fmt); + + ASSERT_NO_FATAL_FAILURE(InitRenderTarget(m_depthStencil->BindInfo())); + + const uint64_t fake_address_64 = 0xCDCDCDCDCDCDCDCD; + const uint64_t fake_address_32 = 0xCDCDCDCD; + void *hopefully_undereferencable_pointer = + sizeof(void *) == 8 ? reinterpret_cast(fake_address_64) : reinterpret_cast(fake_address_32); + + VkShaderObj vs(m_device, "#version 450\nvoid main(){gl_Position = vec4(0.0, 0.0, 0.0, 1.0);}\n", VK_SHADER_STAGE_VERTEX_BIT, + this); + + const VkPipelineVertexInputStateCreateInfo pipeline_vertex_input_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 0, + nullptr, // bindings + 0, + nullptr // attributes + }; + + const VkPipelineInputAssemblyStateCreateInfo pipeline_input_assembly_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, + VK_FALSE // primitive restart + }; + + const VkPipelineRasterizationStateCreateInfo pipeline_rasterization_state_create_info_template{ + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + VK_FALSE, // depthClamp + VK_FALSE, // rasterizerDiscardEnable + VK_POLYGON_MODE_FILL, + VK_CULL_MODE_NONE, + VK_FRONT_FACE_COUNTER_CLOCKWISE, + VK_FALSE, // depthBias + 0.0f, + 0.0f, + 0.0f, // depthBias params + 1.0f // lineWidth + }; + + VkPipelineLayout pipeline_layout; + { + VkPipelineLayoutCreateInfo pipeline_layout_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, + nullptr, // pNext + 0, // flags + 0, + nullptr, // layouts + 0, + nullptr // push constants + }; + + VkResult err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_create_info, nullptr, &pipeline_layout); + ASSERT_VK_SUCCESS(err); + } + + // try disabled rasterizer and no tessellation + { + m_errorMonitor->ExpectSuccess(); + + VkPipelineRasterizationStateCreateInfo pipeline_rasterization_state_create_info = + pipeline_rasterization_state_create_info_template; + pipeline_rasterization_state_create_info.rasterizerDiscardEnable = VK_TRUE; + + VkGraphicsPipelineCreateInfo graphics_pipeline_create_info{ + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 1, // stageCount + &vs.GetStageCreateInfo(), + &pipeline_vertex_input_state_create_info, + &pipeline_input_assembly_state_create_info, + reinterpret_cast(hopefully_undereferencable_pointer), + reinterpret_cast(hopefully_undereferencable_pointer), + &pipeline_rasterization_state_create_info, + reinterpret_cast(hopefully_undereferencable_pointer), + reinterpret_cast(hopefully_undereferencable_pointer), + reinterpret_cast(hopefully_undereferencable_pointer), + nullptr, // dynamic states + pipeline_layout, + m_renderPass, + 0, // subpass + VK_NULL_HANDLE, + 0}; + + VkPipeline pipeline; + vkCreateGraphicsPipelines(m_device->handle(), VK_NULL_HANDLE, 1, &graphics_pipeline_create_info, nullptr, &pipeline); + + m_errorMonitor->VerifyNotFound(); + + vkDestroyPipeline(m_device->handle(), pipeline, nullptr); + } + + const VkPipelineMultisampleStateCreateInfo pipeline_multisample_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + VK_SAMPLE_COUNT_1_BIT, + VK_FALSE, // sample shading + 0.0f, // minSampleShading + nullptr, // pSampleMask + VK_FALSE, // alphaToCoverageEnable + VK_FALSE // alphaToOneEnable + }; + + // try enabled rasterizer but no subpass attachments + { + m_errorMonitor->ExpectSuccess(); + + VkPipelineRasterizationStateCreateInfo pipeline_rasterization_state_create_info = + pipeline_rasterization_state_create_info_template; + pipeline_rasterization_state_create_info.rasterizerDiscardEnable = VK_FALSE; + + VkViewport viewport = {0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}; + VkRect2D scissor = {{0, 0}, {static_cast(m_width), static_cast(m_height)}}; + + const VkPipelineViewportStateCreateInfo pipeline_viewport_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 1, + &viewport, + 1, + &scissor}; + + VkRenderPass render_pass; + { + VkSubpassDescription subpass_desc = {}; + + VkRenderPassCreateInfo render_pass_create_info{ + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, + nullptr, // pNext + 0, // flags + 0, + nullptr, // attachments + 1, + &subpass_desc, + 0, + nullptr // subpass dependencies + }; + + VkResult err = vkCreateRenderPass(m_device->handle(), &render_pass_create_info, nullptr, &render_pass); + ASSERT_VK_SUCCESS(err); + } + + VkGraphicsPipelineCreateInfo graphics_pipeline_create_info{ + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 1, // stageCount + &vs.GetStageCreateInfo(), + &pipeline_vertex_input_state_create_info, + &pipeline_input_assembly_state_create_info, + nullptr, + &pipeline_viewport_state_create_info, + &pipeline_rasterization_state_create_info, + &pipeline_multisample_state_create_info, + reinterpret_cast(hopefully_undereferencable_pointer), + reinterpret_cast(hopefully_undereferencable_pointer), + nullptr, // dynamic states + pipeline_layout, + render_pass, + 0, // subpass + VK_NULL_HANDLE, + 0}; + + VkPipeline pipeline; + vkCreateGraphicsPipelines(m_device->handle(), VK_NULL_HANDLE, 1, &graphics_pipeline_create_info, nullptr, &pipeline); + + m_errorMonitor->VerifyNotFound(); + + vkDestroyPipeline(m_device->handle(), pipeline, nullptr); + vkDestroyRenderPass(m_device->handle(), render_pass, nullptr); + } + + // try dynamic viewport and scissor + { + m_errorMonitor->ExpectSuccess(); + + VkPipelineRasterizationStateCreateInfo pipeline_rasterization_state_create_info = + pipeline_rasterization_state_create_info_template; + pipeline_rasterization_state_create_info.rasterizerDiscardEnable = VK_FALSE; + + const VkPipelineViewportStateCreateInfo pipeline_viewport_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 1, + reinterpret_cast(hopefully_undereferencable_pointer), + 1, + reinterpret_cast(hopefully_undereferencable_pointer)}; + + const VkPipelineDepthStencilStateCreateInfo pipeline_depth_stencil_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + }; + + const VkPipelineColorBlendAttachmentState pipeline_color_blend_attachment_state = {}; + + const VkPipelineColorBlendStateCreateInfo pipeline_color_blend_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + VK_FALSE, + VK_LOGIC_OP_CLEAR, + 1, + &pipeline_color_blend_attachment_state, + {0.0f, 0.0f, 0.0f, 0.0f}}; + + const VkDynamicState dynamic_states[2] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR}; + + const VkPipelineDynamicStateCreateInfo pipeline_dynamic_state_create_info{ + VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 2, dynamic_states}; + + VkGraphicsPipelineCreateInfo graphics_pipeline_create_info{VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, + nullptr, // pNext + 0, // flags + 1, // stageCount + &vs.GetStageCreateInfo(), + &pipeline_vertex_input_state_create_info, + &pipeline_input_assembly_state_create_info, + nullptr, + &pipeline_viewport_state_create_info, + &pipeline_rasterization_state_create_info, + &pipeline_multisample_state_create_info, + &pipeline_depth_stencil_state_create_info, + &pipeline_color_blend_state_create_info, + &pipeline_dynamic_state_create_info, // dynamic states + pipeline_layout, + m_renderPass, + 0, // subpass + VK_NULL_HANDLE, + 0}; + + VkPipeline pipeline; + vkCreateGraphicsPipelines(m_device->handle(), VK_NULL_HANDLE, 1, &graphics_pipeline_create_info, nullptr, &pipeline); + + m_errorMonitor->VerifyNotFound(); + + vkDestroyPipeline(m_device->handle(), pipeline, nullptr); + } + + vkDestroyPipelineLayout(m_device->handle(), pipeline_layout, nullptr); +} + +TEST_F(VkPositiveLayerTest, ExternalMemory) { + TEST_DESCRIPTION("Perform a copy through a pair of buffers linked by external memory"); + +#ifdef _WIN32 + const auto extension_name = VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR; +#else + const auto extension_name = VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME; + const auto handle_type = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; +#endif + + // Check for external memory instance extensions + if (InstanceExtensionSupported(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME); + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" External memory extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for import/export capability + VkPhysicalDeviceExternalBufferInfoKHR ebi = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR, nullptr, 0, + VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, handle_type}; + VkExternalBufferPropertiesKHR ebp = {VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR, nullptr, {0, 0, 0}}; + auto vkGetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)vkGetInstanceProcAddr( + instance(), "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); + ASSERT_TRUE(vkGetPhysicalDeviceExternalBufferPropertiesKHR != nullptr); + vkGetPhysicalDeviceExternalBufferPropertiesKHR(gpu(), &ebi, &ebp); + if (!(ebp.externalMemoryProperties.compatibleHandleTypes & handle_type) || + !(ebp.externalMemoryProperties.externalMemoryFeatures & VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR) || + !(ebp.externalMemoryProperties.externalMemoryFeatures & VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR)) { + printf(" External buffer does not support importing and exporting, skipping test\n"); + return; + } + + // Check if dedicated allocation is required + bool dedicated_allocation = + ebp.externalMemoryProperties.externalMemoryFeatures & VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR; + if (dedicated_allocation) { + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME); + m_device_extension_names.push_back(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + } else { + printf(" Dedicated allocation extension not supported, skipping test\n"); + return; + } + } + + // Check for external memory device extensions + if (DeviceExtensionSupported(gpu(), nullptr, extension_name)) { + m_device_extension_names.push_back(extension_name); + m_device_extension_names.push_back(VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME); + } else { + printf(" External memory extension not supported, skipping test\n"); + return; + } + ASSERT_NO_FATAL_FAILURE(InitState()); + + m_errorMonitor->ExpectSuccess(VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT); + + VkMemoryPropertyFlags mem_flags = 0; + const VkDeviceSize buffer_size = 1024; + + // Create export and import buffers + const VkExternalMemoryBufferCreateInfoKHR external_buffer_info = {VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR, + nullptr, handle_type}; + auto buffer_info = + vk_testing::Buffer::create_info(buffer_size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT); + buffer_info.pNext = &external_buffer_info; + vk_testing::Buffer buffer_export; + buffer_export.init_no_mem(*m_device, buffer_info); + vk_testing::Buffer buffer_import; + buffer_import.init_no_mem(*m_device, buffer_info); + + // Allocation info + auto alloc_info = vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, buffer_export.memory_requirements(), mem_flags); + + // Add export allocation info to pNext chain + VkExportMemoryAllocateInfoKHR export_info = {VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, nullptr, handle_type}; + alloc_info.pNext = &export_info; + + // Add dedicated allocation info to pNext chain if required + VkMemoryDedicatedAllocateInfoKHR dedicated_info = {VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR, nullptr, + VK_NULL_HANDLE, buffer_export.handle()}; + if (dedicated_allocation) { + export_info.pNext = &dedicated_info; + } + + // Allocate memory to be exported + vk_testing::DeviceMemory memory_export; + memory_export.init(*m_device, alloc_info); + + // Bind exported memory + buffer_export.bind_memory(memory_export, 0); + +#ifdef _WIN32 + // Export memory to handle + auto vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)vkGetInstanceProcAddr(instance(), "vkGetMemoryWin32HandleKHR"); + ASSERT_TRUE(vkGetMemoryWin32HandleKHR != nullptr); + VkMemoryGetWin32HandleInfoKHR mghi = {VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, nullptr, memory_export.handle(), + handle_type}; + HANDLE handle; + ASSERT_VK_SUCCESS(vkGetMemoryWin32HandleKHR(m_device->device(), &mghi, &handle)); + + VkImportMemoryWin32HandleInfoKHR import_info = {VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, nullptr, handle_type, + handle}; +#else + // Export memory to fd + auto vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)vkGetInstanceProcAddr(instance(), "vkGetMemoryFdKHR"); + ASSERT_TRUE(vkGetMemoryFdKHR != nullptr); + VkMemoryGetFdInfoKHR mgfi = {VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, nullptr, memory_export.handle(), handle_type}; + int fd; + ASSERT_VK_SUCCESS(vkGetMemoryFdKHR(m_device->device(), &mgfi, &fd)); + + VkImportMemoryFdInfoKHR import_info = {VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, nullptr, handle_type, fd}; +#endif + + // Import memory + alloc_info = vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, buffer_import.memory_requirements(), mem_flags); + alloc_info.pNext = &import_info; + vk_testing::DeviceMemory memory_import; + memory_import.init(*m_device, alloc_info); + + // Bind imported memory + buffer_import.bind_memory(memory_import, 0); + + // Create test buffers and fill input buffer + VkMemoryPropertyFlags mem_prop = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + vk_testing::Buffer buffer_input; + buffer_input.init_as_src_and_dst(*m_device, buffer_size, mem_prop); + auto input_mem = (uint8_t *)buffer_input.memory().map(); + for (uint32_t i = 0; i < buffer_size; i++) { + input_mem[i] = (i & 0xFF); + } + buffer_input.memory().unmap(); + vk_testing::Buffer buffer_output; + buffer_output.init_as_src_and_dst(*m_device, buffer_size, mem_prop); + + // Copy from input buffer to output buffer through the exported/imported memory + m_commandBuffer->begin(); + VkBufferCopy copy_info = {0, 0, buffer_size}; + vkCmdCopyBuffer(m_commandBuffer->handle(), buffer_input.handle(), buffer_export.handle(), 1, ©_info); + // Insert memory barrier to guarantee copy order + VkMemoryBarrier mem_barrier = {VK_STRUCTURE_TYPE_MEMORY_BARRIER, nullptr, VK_ACCESS_TRANSFER_WRITE_BIT, + VK_ACCESS_TRANSFER_READ_BIT}; + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, + &mem_barrier, 0, nullptr, 0, nullptr); + vkCmdCopyBuffer(m_commandBuffer->handle(), buffer_import.handle(), buffer_output.handle(), 1, ©_info); + m_commandBuffer->end(); + m_commandBuffer->QueueCommandBuffer(); + + m_errorMonitor->VerifyNotFound(); +} + TEST_F(VkLayerTest, AMDMixedAttachmentSamplesValidateRenderPass) { - TEST_DESCRIPTION( - "Verify error messages for supported and unsupported " - "sample counts in render pass attachments."); + TEST_DESCRIPTION("Verify error messages for supported and unsupported sample counts in render pass attachments."); ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); if (DeviceExtensionSupported(gpu(), nullptr, VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME)) { @@ -25117,9 +27008,7 @@ TEST_F(VkLayerTest, AMDMixedAttachmentSamplesValidateRenderPass) { } TEST_F(VkLayerTest, AMDMixedAttachmentSamplesValidateGraphicsPipeline) { - TEST_DESCRIPTION( - "Verify an error message for an incorrect graphics pipeline " - "rasterization sample count."); + TEST_DESCRIPTION("Verify an error message for an incorrect graphics pipeline rasterization sample count."); ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); if (DeviceExtensionSupported(gpu(), nullptr, VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME)) { @@ -25131,12 +27020,7 @@ TEST_F(VkLayerTest, AMDMixedAttachmentSamplesValidateGraphicsPipeline) { VkRenderpassObj render_pass(m_device); - VkPipelineLayoutCreateInfo pipeline_layout_ci = {}; - pipeline_layout_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - - VkPipelineLayout pipeline_layout; - VkResult err = vkCreatePipelineLayout(m_device->device(), &pipeline_layout_ci, NULL, &pipeline_layout); - ASSERT_VK_SUCCESS(err); + const VkPipelineLayoutObj pipeline_layout(m_device); VkShaderObj vs(m_device, bindStateVertShaderText, VK_SHADER_STAGE_VERTEX_BIT, this); VkShaderObj fs(m_device, bindStateFragShaderText, VK_SHADER_STAGE_FRAGMENT_BIT, this); @@ -25150,16 +27034,264 @@ TEST_F(VkLayerTest, AMDMixedAttachmentSamplesValidateGraphicsPipeline) { VkPipelineObj pipe(m_device); pipe.AddShader(&vs); pipe.AddShader(&fs); - pipe.AddColorAttachment(); + pipe.AddDefaultColorAttachment(); pipe.SetMSAA(&ms_state_ci); m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_09600bc2); - pipe.CreateVKPipeline(pipeline_layout, render_pass.handle()); + pipe.CreateVKPipeline(pipeline_layout.handle(), render_pass.handle()); m_errorMonitor->VerifyFound(); +} - vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL); +TEST_F(VkPositiveLayerTest, ParameterLayerFeatures2Capture) { + TEST_DESCRIPTION("Ensure parameter_validation_layer correctly captures physical device features"); + if (InstanceExtensionSupported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) { + m_instance_extension_names.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + } else { + printf(" Did not find VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; skipped.\n"); + return; + } + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = + (PFN_vkGetPhysicalDeviceFeatures2KHR)vkGetInstanceProcAddr(instance(), "vkGetPhysicalDeviceFeatures2KHR"); + ASSERT_TRUE(vkGetPhysicalDeviceFeatures2KHR != nullptr); + + VkResult err; + m_errorMonitor->ExpectSuccess(); + + VkPhysicalDeviceFeatures2KHR features2; + features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; + features2.pNext = nullptr; + + vkGetPhysicalDeviceFeatures2KHR(gpu(), &features2); + + // We're not creating a valid m_device, but the phy wrapper is useful + vk_testing::PhysicalDevice physical_device(gpu()); + vk_testing::QueueCreateInfoArray queue_info(physical_device.queue_properties()); + // Only request creation with queuefamilies that have at least one queue + std::vector create_queue_infos; + auto qci = queue_info.data(); + for (uint32_t i = 0; i < queue_info.size(); ++i) { + if (qci[i].queueCount) { + create_queue_infos.push_back(qci[i]); + } + } + + VkDeviceCreateInfo dev_info = {}; + dev_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; + dev_info.pNext = &features2; + dev_info.flags = 0; + dev_info.queueCreateInfoCount = create_queue_infos.size(); + dev_info.pQueueCreateInfos = create_queue_infos.data(); + dev_info.enabledLayerCount = 0; + dev_info.ppEnabledLayerNames = nullptr; + dev_info.enabledExtensionCount = 0; + dev_info.ppEnabledExtensionNames = nullptr; + dev_info.pEnabledFeatures = nullptr; + + VkDevice device; + err = vkCreateDevice(gpu(), &dev_info, nullptr, &device); + ASSERT_VK_SUCCESS(err); + + if (features2.features.samplerAnisotropy) { + // Test that the parameter layer is caching the features correctly using CreateSampler + VkSamplerCreateInfo sampler_ci = SafeSaneSamplerCreateInfo(); + // If the features were not captured correctly, this should cause an error + sampler_ci.anisotropyEnable = VK_TRUE; + sampler_ci.maxAnisotropy = physical_device.properties().limits.maxSamplerAnisotropy; + + VkSampler sampler = VK_NULL_HANDLE; + err = vkCreateSampler(device, &sampler_ci, nullptr, &sampler); + ASSERT_VK_SUCCESS(err); + vkDestroySampler(device, sampler, nullptr); + } else { + printf(" Feature samplerAnisotropy not enabled; parameter_layer check skipped.\n"); + } + + // Verify the core validation layer has captured the physical device features by creating a a query pool. + if (features2.features.pipelineStatisticsQuery) { + VkQueryPool query_pool; + VkQueryPoolCreateInfo qpci{}; + qpci.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; + qpci.queryType = VK_QUERY_TYPE_PIPELINE_STATISTICS; + qpci.queryCount = 1; + err = vkCreateQueryPool(device, &qpci, nullptr, &query_pool); + ASSERT_VK_SUCCESS(err); + + vkDestroyQueryPool(device, query_pool, nullptr); + } else { + printf(" Feature pipelineStatisticsQuery not enabled; core_validation_layer check skipped.\n"); + } + + vkDestroyDevice(device, nullptr); + + m_errorMonitor->VerifyNotFound(); +} + +TEST_F(VkPositiveLayerTest, GetMemoryRequirements2) { + TEST_DESCRIPTION( + "Get memory requirements with VK_KHR_get_memory_requirements2 instead of core entry points and verify layers do not emit " + "errors when objects are bound and used"); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for VK_KHR_get_memory_requirementes2 extensions + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + } else { + printf(" %s not supported, skipping test\n", VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME); + return; + } + + ASSERT_NO_FATAL_FAILURE(InitState()); + + m_errorMonitor->ExpectSuccess(VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT); + + // Create a test buffer + vk_testing::Buffer buffer; + buffer.init_no_mem(*m_device, + vk_testing::Buffer::create_info(1024, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT)); + + // Use extension to get buffer memory reqirements + auto vkGetBufferMemoryRequirements2KHR = reinterpret_cast( + vkGetDeviceProcAddr(m_device->device(), "vkGetBufferMemoryRequirements2KHR")); + ASSERT_TRUE(vkGetBufferMemoryRequirements2KHR != nullptr); + VkBufferMemoryRequirementsInfo2KHR buffer_info = {VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR, nullptr, + buffer.handle()}; + VkMemoryRequirements2KHR buffer_reqs = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR}; + vkGetBufferMemoryRequirements2KHR(m_device->device(), &buffer_info, &buffer_reqs); + + // Allocate and bind buffer memory + vk_testing::DeviceMemory buffer_memory; + buffer_memory.init(*m_device, vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, buffer_reqs.memoryRequirements, 0)); + vkBindBufferMemory(m_device->device(), buffer.handle(), buffer_memory.handle(), 0); + + // Create a test image + auto image_ci = vk_testing::Image::create_info(); + image_ci.imageType = VK_IMAGE_TYPE_2D; + image_ci.extent.width = 32; + image_ci.extent.height = 32; + image_ci.format = VK_FORMAT_R8G8B8A8_UNORM; + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT; + vk_testing::Image image; + image.init_no_mem(*m_device, image_ci); + + // Use extension to get image memory requirements + auto vkGetImageMemoryRequirements2KHR = reinterpret_cast( + vkGetDeviceProcAddr(m_device->device(), "vkGetImageMemoryRequirements2KHR")); + ASSERT_TRUE(vkGetImageMemoryRequirements2KHR != nullptr); + VkImageMemoryRequirementsInfo2KHR image_info = {VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR, nullptr, + image.handle()}; + VkMemoryRequirements2KHR image_reqs = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR}; + vkGetImageMemoryRequirements2KHR(m_device->device(), &image_info, &image_reqs); + + // Allocate and bind image memory + vk_testing::DeviceMemory image_memory; + image_memory.init(*m_device, vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, image_reqs.memoryRequirements, 0)); + vkBindImageMemory(m_device->device(), image.handle(), image_memory.handle(), 0); + + // Now execute arbitrary commands that use the test buffer and image + m_commandBuffer->begin(); + + // Fill buffer with 0 + vkCmdFillBuffer(m_commandBuffer->handle(), buffer.handle(), 0, VK_WHOLE_SIZE, 0); + + // Transition and clear image + const auto subresource_range = image.subresource_range(VK_IMAGE_ASPECT_COLOR_BIT); + const auto barrier = image.image_memory_barrier(0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_GENERAL, subresource_range); + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &barrier); + const VkClearColorValue color = {}; + vkCmdClearColorImage(m_commandBuffer->handle(), image.handle(), VK_IMAGE_LAYOUT_GENERAL, &color, 1, &subresource_range); + + // Submit and verify no validation errors + m_commandBuffer->end(); + m_commandBuffer->QueueCommandBuffer(); + m_errorMonitor->VerifyNotFound(); +} + +TEST_F(VkPositiveLayerTest, BindMemory2) { + TEST_DESCRIPTION( + "Bind memory with VK_KHR_bind_memory2 instead of core entry points and verify layers do not emit errors when objects are " + "used"); + + ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor)); + + // Check for VK_KHR_get_memory_requirementes2 extensions + if (DeviceExtensionSupported(gpu(), nullptr, VK_KHR_BIND_MEMORY_2_EXTENSION_NAME)) { + m_device_extension_names.push_back(VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + } else { + printf(" %s not supported, skipping test\n", VK_KHR_BIND_MEMORY_2_EXTENSION_NAME); + return; + } + + ASSERT_NO_FATAL_FAILURE(InitState()); + + m_errorMonitor->ExpectSuccess(VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT); + + // Create a test buffer + vk_testing::Buffer buffer; + buffer.init_no_mem(*m_device, vk_testing::Buffer::create_info(1024, VK_BUFFER_USAGE_TRANSFER_DST_BIT)); + + // Allocate buffer memory + vk_testing::DeviceMemory buffer_memory; + buffer_memory.init(*m_device, vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, buffer.memory_requirements(), 0)); + + // Bind buffer memory with extension + auto vkBindBufferMemory2KHR = + reinterpret_cast(vkGetDeviceProcAddr(m_device->device(), "vkBindBufferMemory2KHR")); + ASSERT_TRUE(vkBindBufferMemory2KHR != nullptr); + VkBindBufferMemoryInfoKHR buffer_bind_info = {VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, nullptr, buffer.handle(), + buffer_memory.handle(), 0}; + vkBindBufferMemory2KHR(m_device->device(), 1, &buffer_bind_info); + + // Create a test image + auto image_ci = vk_testing::Image::create_info(); + image_ci.imageType = VK_IMAGE_TYPE_2D; + image_ci.extent.width = 32; + image_ci.extent.height = 32; + image_ci.format = VK_FORMAT_R8G8B8A8_UNORM; + image_ci.tiling = VK_IMAGE_TILING_OPTIMAL; + image_ci.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT; + vk_testing::Image image; + image.init_no_mem(*m_device, image_ci); + + // Allocate image memory + vk_testing::DeviceMemory image_memory; + image_memory.init(*m_device, vk_testing::DeviceMemory::get_resource_alloc_info(*m_device, image.memory_requirements(), 0)); + + // Bind image memory with extension + auto vkBindImageMemory2KHR = + reinterpret_cast(vkGetDeviceProcAddr(m_device->device(), "vkBindImageMemory2KHR")); + ASSERT_TRUE(vkBindImageMemory2KHR != nullptr); + VkBindImageMemoryInfoKHR image_bind_info = {VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR, nullptr, image.handle(), + image_memory.handle(), 0}; + vkBindImageMemory2KHR(m_device->device(), 1, &image_bind_info); + + // Now execute arbitrary commands that use the test buffer and image + m_commandBuffer->begin(); + + // Fill buffer with 0 + vkCmdFillBuffer(m_commandBuffer->handle(), buffer.handle(), 0, VK_WHOLE_SIZE, 0); + + // Transition and clear image + const auto subresource_range = image.subresource_range(VK_IMAGE_ASPECT_COLOR_BIT); + const auto barrier = image.image_memory_barrier(0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_GENERAL, subresource_range); + vkCmdPipelineBarrier(m_commandBuffer->handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, + nullptr, 0, nullptr, 1, &barrier); + const VkClearColorValue color = {}; + vkCmdClearColorImage(m_commandBuffer->handle(), image.handle(), VK_IMAGE_LAYOUT_GENERAL, &color, 1, &subresource_range); + + // Submit and verify no validation errors + m_commandBuffer->end(); + m_commandBuffer->QueueCommandBuffer(); + m_errorMonitor->VerifyNotFound(); } #if defined(ANDROID) && defined(VALIDATION_APK) diff --git a/sources/third_party/vulkan/src/tests/layers/device_profile_api.cpp b/sources/third_party/vulkan/src/tests/layers/device_profile_api.cpp index d203bd5f622fff8e5bb57cf0844d8a3179b8f3e0..b90eab0e9a24d4aa5d8b3919ee80d8602f4ec895 100644 --- a/sources/third_party/vulkan/src/tests/layers/device_profile_api.cpp +++ b/sources/third_party/vulkan/src/tests/layers/device_profile_api.cpp @@ -181,10 +181,6 @@ static const VkLayerProperties device_profile_api_LayerProps = { "LunarG device profile api Layer", }; -static const VkExtensionProperties device_profile_api_physicaldevice_extensions[] = {{ - "vkLayerdevice_profile_apiEXT", 1, -}}; - template VkResult EnumerateProperties(uint32_t src_count, const T *src_props, uint32_t *dst_count, T *dst_props) { if (!dst_props || !src_props) { diff --git a/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_device_profile_api.json b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_device_profile_api.json new file mode 100644 index 0000000000000000000000000000000000000000..b6aa5c63e151331f3603b1276c6fcc8b5a9ce0f0 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_device_profile_api.json @@ -0,0 +1,18 @@ +{ + "file_format_version" : "1.1.0", + "layer" : { + "name": "VK_LAYER_LUNARG_device_profile_api", + "type": "GLOBAL", + "library_path": "./libVkLayer_device_profile_api.dylib", + "api_version": "1.0.69", + "implementation_version": "2", + "description": "LunarG Device Profile Api Layer", + "device_extensions": [ + { + "name": "VK_LUNARG_LayerDeviceProfileApiEXT", + "spec_version": "0", + "entrypoints": ["vkSetPhysicalDeviceLimitsEXT", "vkGetOriginalPhysicalDeviceLimitsEXT"] + } + ] + } +} diff --git a/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_test.json b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_test.json new file mode 100644 index 0000000000000000000000000000000000000000..a7c8ccfff22571d880276b11e89b804a60acf204 --- /dev/null +++ b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_test.json @@ -0,0 +1,17 @@ +{ + "file_format_version" : "1.0.0", + "layer" : { + "name": "VK_LAYER_LUNARG_test", + "type": "GLOBAL", + "library_path": "./libVkLayer_test.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Test Layer", + "enable_environment": { + "ENABLE_LAYER_TEST_1": "enable" + }, + "disable_environment": { + "DISABLE_LAYER_TEST_1": "" + } + } +} diff --git a/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_wrap_objects.json b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_wrap_objects.json new file mode 100644 index 0000000000000000000000000000000000000000..26683be10f393c1d07942dfc79743a902a29950c --- /dev/null +++ b/sources/third_party/vulkan/src/tests/layers/macos/VkLayer_wrap_objects.json @@ -0,0 +1,11 @@ +{ + "file_format_version" : "1.0.0", + "layer" : { + "name": "VK_LAYER_LUNARG_wrap_objects", + "type": "GLOBAL", + "library_path": "./libVkLayer_wrap_objects.dylib", + "api_version": "1.0.69", + "implementation_version": "1", + "description": "LunarG Dispatchable Object Wrapping Layer" + } +} diff --git a/sources/third_party/vulkan/src/tests/loader_validation_tests.cpp b/sources/third_party/vulkan/src/tests/loader_validation_tests.cpp index bc6723e28ea267a7d3fb1ce37d316e61e736632e..36442f1c393a5ae11efdde8fdf5d2b7c6e68c530 100644 --- a/sources/third_party/vulkan/src/tests/loader_validation_tests.cpp +++ b/sources/third_party/vulkan/src/tests/loader_validation_tests.cpp @@ -247,7 +247,7 @@ struct DeviceCreateInfo { VkDeviceCreateInfo info; }; -} +} // namespace VK struct CommandLine : public ::testing::Test { static void Initialize(int argc, char **argv) { arguments.assign(argv, argv + argc); }; diff --git a/sources/third_party/vulkan/src/tests/run_all_tests.sh b/sources/third_party/vulkan/src/tests/run_all_tests.sh index b47f88883c884ba56aeeeb20ced0b2dc44018e40..8cf691e2676a3c01afa8f658240e40e766ed6ae8 100755 --- a/sources/third_party/vulkan/src/tests/run_all_tests.sh +++ b/sources/third_party/vulkan/src/tests/run_all_tests.sh @@ -10,7 +10,7 @@ set -e ./run_loader_tests.sh # Verify that validation checks in source match documentation -./vkvalidatelayerdoc.sh terse_mode +./vkvalidatelayerdoc.sh # vk_layer_validation_tests check to see that validation layers will # catch the errors that they are supposed to by intentionally doing things diff --git a/sources/third_party/vulkan/src/tests/run_wrap_objects_tests.sh b/sources/third_party/vulkan/src/tests/run_wrap_objects_tests.sh index ca5b402763bddda5bdab2db60324df152d8cbb0e..2dc6248acf00012b06b20383cd3b0c89ad81335c 100755 --- a/sources/third_party/vulkan/src/tests/run_wrap_objects_tests.sh +++ b/sources/third_party/vulkan/src/tests/run_wrap_objects_tests.sh @@ -22,7 +22,7 @@ then exit 1 fi -echo "$output" | grep -q "Insert device layer VK_LAYER_LUNARG_wrap_objects" +echo "$output" | grep -q "Inserted device layer VK_LAYER_LUNARG_wrap_objects" ec=$? if [ $ec -eq 1 ] @@ -49,7 +49,7 @@ then exit 1 fi -echo "$output" | grep -q "Insert device layer VK_LAYER_LUNARG_wrap_objects" +echo "$output" | grep -q "Inserted device layer VK_LAYER_LUNARG_wrap_objects" ec=$? if [ $ec -eq 1 ] @@ -76,7 +76,7 @@ then exit 1 fi -echo "$output" | grep -q "Insert device layer VK_LAYER_LUNARG_wrap_objects" +echo "$output" | grep -q "Inserted device layer VK_LAYER_LUNARG_wrap_objects" ec=$? if [ $ec -eq 1 ] @@ -103,7 +103,7 @@ then exit 1 fi -echo "$output" | grep -q "Insert device layer VK_LAYER_LUNARG_wrap_objects" +echo "$output" | grep -q "Inserted device layer VK_LAYER_LUNARG_wrap_objects" ec=$? if [ $ec -eq 1 ] @@ -127,7 +127,9 @@ then exit 1 fi -filter=-VkLayerTest.ExceedMemoryAllocationCount:VkLayerTest.CreateImageViewFormatFeatureMismatch:VkLayerTest.CreateImageViewFormatMismatchUnrelated:VkLayerTest.CreateImageViewNoMutableFormatBit +# Pick a random subset of valid LVT tests to wrap -- None of these can use the device profile API extension! +filter=VkLayerTest.ThreadCommandBufferCollision:VkLayerTest.ImageDescriptorLayoutMismatch:VkLayerTest.CreateBufferViewNoMemoryBoundToBuffer:VkLayerTest.CommandBufferResetErrors:VkLayerTest.PSOLineWidthInvalid:VkLayerTest.EndCommandBufferWithinRenderPass:VkLayerTest.DSBufferLimitErrors:VkLayerTest.InvalidImageLayout:VkLayerTest.CreatePipelineVsFsMismatchByLocation:VkLayerTest.ImageBufferCopyTests:VkLayerTest.ClearImageErrors:VkPositiveLayerTest.NonCoherentMemoryMapping:VkPositiveLayerTest.BarrierLayoutToImageUsage:VkPositiveLayerTest.TwoSubmitInfosWithSemaphoreOneQueueSubmitsOneFence + # Run the layer validation tests with and without the wrap-objects layer. Diff the results. # Filter out the "Unexpected:" lines because they contain varying object handles. GTEST_PRINT_TIME=0 \ diff --git a/sources/third_party/vulkan/src/tests/test_common.h b/sources/third_party/vulkan/src/tests/test_common.h index 446e5eba26baf364bb46725ef91fb299b6daa815..89ffa11ecdec31b4bf9a351cddf93ac81ac79a65 100644 --- a/sources/third_party/vulkan/src/tests/test_common.h +++ b/sources/third_party/vulkan/src/tests/test_common.h @@ -90,8 +90,8 @@ static inline void test_error_callback(const char *expr, const char *file, unsig ADD_FAILURE_AT(file, line) << "Assertion: `" << expr << "'"; } -#if defined(__linux__) -/* Linux-specific common code: */ +#if defined(__linux__) || defined(__APPLE__) + /* Linux-specific common code: */ #include @@ -159,12 +159,12 @@ static void test_platform_thread_cond_broadcast(test_platform_thread_cond *pCond #error The "test_common.h" file must be modified for this OS. -// NOTE: In order to support another OS, an #elif needs to be added (above the -// "#else // defined(_WIN32)") for that OS, and OS-specific versions of the -// contents of this file must be created. + // NOTE: In order to support another OS, an #elif needs to be added (above the + // "#else // defined(_WIN32)") for that OS, and OS-specific versions of the + // contents of this file must be created. -// NOTE: Other OS-specific changes are also needed for this OS. Search for -// files with "WIN32" in it, as a quick way to find files that must be changed. + // NOTE: Other OS-specific changes are also needed for this OS. Search for + // files with "WIN32" in it, as a quick way to find files that must be changed. #endif // defined(_WIN32) diff --git a/sources/third_party/vulkan/src/tests/test_environment.cpp b/sources/third_party/vulkan/src/tests/test_environment.cpp index e8dc95c6572c73edc5faafceab46c77a9ef72036..6a988d00ec7c7fee913f52870b11651394546ff5 100644 --- a/sources/third_party/vulkan/src/tests/test_environment.cpp +++ b/sources/third_party/vulkan/src/tests/test_environment.cpp @@ -25,7 +25,6 @@ */ #include "test_common.h" -#include "vktestbinding.h" #include "test_environment.h" #if defined(NDEBUG) && defined(__GNUC__) @@ -155,4 +154,4 @@ void Environment::TearDown() { if (inst) vkDestroyInstance(inst, NULL); } -} // vk_testing namespace +} // namespace vk_testing diff --git a/sources/third_party/vulkan/src/tests/test_environment.h b/sources/third_party/vulkan/src/tests/test_environment.h index a784644e815c5436f4bfcfd101dc3191e55c4c7f..83afcc20bf3d640c692068b38e790fb9c8ae1ea4 100644 --- a/sources/third_party/vulkan/src/tests/test_environment.h +++ b/sources/third_party/vulkan/src/tests/test_environment.h @@ -51,5 +51,5 @@ class Environment : public ::testing::Environment { std::vector devs_; }; -} +} // namespace vk_testing #endif // TEST_ENVIRONMENT_H diff --git a/sources/third_party/vulkan/src/tests/vkrenderframework.cpp b/sources/third_party/vulkan/src/tests/vkrenderframework.cpp index e3b34af8fa8594f604540ebb86bc4477c68340a2..70cdefa599cf847729e76ff176371d6821d58967 100644 --- a/sources/third_party/vulkan/src/tests/vkrenderframework.cpp +++ b/sources/third_party/vulkan/src/tests/vkrenderframework.cpp @@ -87,7 +87,24 @@ bool VkRenderFramework::InstanceLayerSupported(const char *name, uint32_t spec, } } return false; -}; +} + +// Enable device profile as last layer on stack overriding devsim if there, or return if not available +bool VkRenderFramework::EnableDeviceProfileLayer() { + if (InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { + if (VkTestFramework::m_devsim_layer) { + assert(0 == strcmp(m_instance_layer_names.back(), "VK_LAYER_LUNARG_device_simulation")); + m_instance_layer_names.pop_back(); + m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); + } else { + m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); + } + } else { + printf(" Did not find VK_LAYER_LUNARG_device_profile_api layer; skipped.\n"); + return false; + } + return true; +} // Return true if extension name is found and spec value is >= requested spec value bool VkRenderFramework::InstanceExtensionSupported(const char *ext_name, uint32_t spec) { @@ -107,7 +124,7 @@ bool VkRenderFramework::InstanceExtensionSupported(const char *ext_name, uint32_ } } return false; -}; +} // Return true if extension name is found and spec value is >= requested spec value bool VkRenderFramework::DeviceExtensionSupported(VkPhysicalDevice dev, const char *layer, const char *ext_name, uint32_t spec) { @@ -131,10 +148,11 @@ bool VkRenderFramework::DeviceExtensionSupported(VkPhysicalDevice dev, const cha } } return false; -}; +} void VkRenderFramework::InitFramework(PFN_vkDebugReportCallbackEXT dbgFunction, void *userData) { - if (InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { + // Only enable device profile layer by default if devsim is not enabled + if (!VkTestFramework::m_devsim_layer && InstanceLayerSupported("VK_LAYER_LUNARG_device_profile_api")) { m_instance_layer_names.push_back("VK_LAYER_LUNARG_device_profile_api"); } @@ -200,8 +218,7 @@ void VkRenderFramework::InitFramework(PFN_vkDebugReportCallbackEXT dbgFunction, m_DestroyDebugReportCallback = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(this->inst, "vkDestroyDebugReportCallbackEXT"); ASSERT_NE(m_DestroyDebugReportCallback, (PFN_vkDestroyDebugReportCallbackEXT)NULL) - << "Did not get function pointer for " - "DestroyDebugReportCallback"; + << "Did not get function pointer for DestroyDebugReportCallback"; m_DebugReportMessage = (PFN_vkDebugReportMessageEXT)vkGetInstanceProcAddr(this->inst, "vkDebugReportMessageEXT"); ASSERT_NE(m_DebugReportMessage, (PFN_vkDebugReportMessageEXT)NULL) << "Did not get function pointer for DebugReportMessage"; @@ -367,10 +384,12 @@ void VkRenderFramework::InitRenderTarget(uint32_t targets, VkImageView *dsBindin if (props.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { img->Init((uint32_t)m_width, (uint32_t)m_height, 1, m_render_target_fmt, - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_TILING_LINEAR); + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + VK_IMAGE_TILING_LINEAR); } else if (props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { img->Init((uint32_t)m_width, (uint32_t)m_height, 1, m_render_target_fmt, - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_TILING_OPTIMAL); + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, + VK_IMAGE_TILING_OPTIMAL); } else { FAIL() << "Neither Linear nor Optimal allowed for render target"; } @@ -449,7 +468,7 @@ void VkRenderFramework::InitRenderTarget(uint32_t targets, VkImageView *dsBindin } vkCreateRenderPass(device(), &rp_info, NULL, &m_renderPass); - + renderPass_info_ = rp_info; // Save away a copy for tests that need access to the render pass state // Create Framebuffer and RenderPass with color attachments and any // depth/stencil attachment VkFramebufferCreateInfo fb_info = {}; @@ -488,10 +507,12 @@ VkDeviceObj::VkDeviceObj(uint32_t id, VkPhysicalDevice obj, std::vector 0)) { return i; } } @@ -503,6 +524,18 @@ void VkDeviceObj::get_device_queue() { m_queue = graphics_queues()[0]->handle(); } +VkDescriptorSetLayoutObj::VkDescriptorSetLayoutObj(const VkDeviceObj *device, + const std::vector &descriptor_set_bindings, + VkDescriptorSetLayoutCreateFlags flags) { + VkDescriptorSetLayoutCreateInfo dsl_ci = {}; + dsl_ci.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + dsl_ci.flags = flags; + dsl_ci.bindingCount = static_cast(descriptor_set_bindings.size()); + dsl_ci.pBindings = descriptor_set_bindings.data(); + + init(*device, dsl_ci); +} + VkDescriptorSetObj::VkDescriptorSetObj(VkDeviceObj *device) : m_device(device), m_nextSlot(0) {} VkDescriptorSetObj::~VkDescriptorSetObj() { @@ -567,7 +600,12 @@ int VkDescriptorSetObj::AppendSamplerTexture(VkSamplerObj *sampler, VkTextureObj VkPipelineLayout VkDescriptorSetObj::GetPipelineLayout() const { return m_pipeline_layout.handle(); } -VkDescriptorSet VkDescriptorSetObj::GetDescriptorSetHandle() const { return m_set->handle(); } +VkDescriptorSet VkDescriptorSetObj::GetDescriptorSetHandle() const { + if (m_set) + return m_set->handle(); + else + return VK_NULL_HANDLE; +} void VkDescriptorSetObj::CreateVKDescriptorSet(VkCommandBufferObj *commandBuffer) { if (m_type_counts.size()) { @@ -674,7 +712,9 @@ void VkImageObj::ImageMemoryBarrier(VkCommandBufferObj *cmd_buf, VkImageAspectFl VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_MEMORY_INPUT_COPY_BIT*/, VkImageLayout image_layout) { - const VkImageSubresourceRange subresourceRange = subresource_range(aspect, 0, 1, 0, 1); + // TODO: Mali device crashing with VK_REMAINING_MIP_LEVELS + const VkImageSubresourceRange subresourceRange = + subresource_range(aspect, 0, /*VK_REMAINING_MIP_LEVELS*/ 1, 0, 1 /*VK_REMAINING_ARRAY_LAYERS*/); VkImageMemoryBarrier barrier; barrier = image_memory_barrier(output_mask, input_mask, Layout(), image_layout, subresourceRange); @@ -768,14 +808,60 @@ void VkImageObj::SetLayout(VkImageAspectFlags aspect, VkImageLayout image_layout cmd_buf.QueueCommandBuffer(); } -bool VkImageObj::IsCompatible(VkFlags const usage, VkFlags const features) { - if ((usage & VK_IMAGE_USAGE_SAMPLED_BIT) && !(features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) return false; +bool VkImageObj::IsCompatible(const VkImageUsageFlags usages, const VkFormatFeatureFlags features) { + VkFormatFeatureFlags all_feature_flags = + VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT | VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT | + VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT | + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT | VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT | + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT | + VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_BLIT_SRC_BIT | VK_FORMAT_FEATURE_BLIT_DST_BIT | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT; + if (m_device->IsEnbledExtension(VK_IMG_FILTER_CUBIC_EXTENSION_NAME)) { + all_feature_flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG; + } + + if (m_device->IsEnbledExtension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)) { + all_feature_flags |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; + } + + if (m_device->IsEnbledExtension(VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME)) { + all_feature_flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT; + } + + if (m_device->IsEnbledExtension(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME)) { + all_feature_flags |= VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR | + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR | + VK_FORMAT_FEATURE_DISJOINT_BIT_KHR | VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR; + } + + if ((features & all_feature_flags) == 0) return false; // whole format unsupported + + if ((usages & VK_IMAGE_USAGE_SAMPLED_BIT) && !(features & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) return false; + if ((usages & VK_IMAGE_USAGE_STORAGE_BIT) && !(features & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) return false; + if ((usages & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) && !(features & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) return false; + if ((usages & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) && !(features & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT)) + return false; + + if (m_device->IsEnbledExtension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)) { + // WORKAROUND: for DevSim not reporting extended enums, and possibly some drivers too + const auto all_nontransfer_feature_flags = + all_feature_flags ^ (VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR); + const bool transfer_probably_supported_anyway = (features & all_nontransfer_feature_flags) > 0; + if (!transfer_probably_supported_anyway) { + if ((usages & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) && !(features & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR)) return false; + if ((usages & VK_IMAGE_USAGE_TRANSFER_DST_BIT) && !(features & VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR)) return false; + } + } return true; } void VkImageObj::InitNoLayout(uint32_t const width, uint32_t const height, uint32_t const mipLevels, VkFormat const format, - VkFlags const usage, VkImageTiling const requested_tiling, VkMemoryPropertyFlags const reqs) { + VkFlags const usage, VkImageTiling const requested_tiling, VkMemoryPropertyFlags const reqs, + const std::vector *queue_families) { VkFormatProperties image_fmt; VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL; @@ -787,14 +873,16 @@ void VkImageObj::InitNoLayout(uint32_t const width, uint32_t const height, uint3 } else if (IsCompatible(usage, image_fmt.optimalTilingFeatures)) { tiling = VK_IMAGE_TILING_OPTIMAL; } else { - ASSERT_TRUE(false) << "Error: Cannot find requested tiling configuration"; + FAIL() << "VkImageObj::init() error: unsupported tiling configuration. Usage: " << std::hex << std::showbase << usage + << ", supported linear features: " << image_fmt.linearTilingFeatures; } } else if (IsCompatible(usage, image_fmt.optimalTilingFeatures)) { tiling = VK_IMAGE_TILING_OPTIMAL; } else if (IsCompatible(usage, image_fmt.linearTilingFeatures)) { tiling = VK_IMAGE_TILING_LINEAR; } else { - ASSERT_TRUE(false) << "Error: Cannot find requested tiling configuration"; + FAIL() << "VkImageObj::init() error: unsupported tiling configuration. Usage: " << std::hex << std::showbase << usage + << ", supported optimal features: " << image_fmt.optimalTilingFeatures; } VkImageCreateInfo imageCreateInfo = vk_testing::Image::create_info(); @@ -806,6 +894,13 @@ void VkImageObj::InitNoLayout(uint32_t const width, uint32_t const height, uint3 imageCreateInfo.tiling = tiling; imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + // Automatically set sharing mode etc. based on queue family information + if (queue_families && (queue_families->size() > 1)) { + imageCreateInfo.sharingMode = VK_SHARING_MODE_CONCURRENT; + imageCreateInfo.queueFamilyIndexCount = static_cast(queue_families->size()); + imageCreateInfo.pQueueFamilyIndices = queue_families->data(); + } + Layout(imageCreateInfo.initialLayout); imageCreateInfo.usage = usage; @@ -813,8 +908,9 @@ void VkImageObj::InitNoLayout(uint32_t const width, uint32_t const height, uint3 } void VkImageObj::Init(uint32_t const width, uint32_t const height, uint32_t const mipLevels, VkFormat const format, - VkFlags const usage, VkImageTiling const requested_tiling, VkMemoryPropertyFlags const reqs) { - InitNoLayout(width, height, mipLevels, format, usage, requested_tiling, reqs); + VkFlags const usage, VkImageTiling const requested_tiling, VkMemoryPropertyFlags const reqs, + const std::vector *queue_families) { + InitNoLayout(width, height, mipLevels, format, usage, requested_tiling, reqs, queue_families); VkImageLayout newLayout; if (usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) @@ -844,12 +940,14 @@ void VkImageObj::init(const VkImageCreateInfo *create_info) { switch (create_info->tiling) { case VK_IMAGE_TILING_OPTIMAL: if (!IsCompatible(create_info->usage, image_fmt.optimalTilingFeatures)) { - ASSERT_TRUE(false) << "VkImageObj::init() error: unsupported tiling configuration"; + FAIL() << "VkImageObj::init() error: unsupported tiling configuration. Usage: " << std::hex << std::showbase + << create_info->usage << ", supported optimal features: " << image_fmt.optimalTilingFeatures; } break; case VK_IMAGE_TILING_LINEAR: - if (!IsCompatible(create_info->usage, image_fmt.optimalTilingFeatures)) { - ASSERT_TRUE(false) << "VkImageObj::init() error: unsupported tiling configuration"; + if (!IsCompatible(create_info->usage, image_fmt.linearTilingFeatures)) { + FAIL() << "VkImageObj::init() error: unsupported tiling configuration. Usage: " << std::hex << std::showbase + << create_info->usage << ", supported linear features: " << image_fmt.linearTilingFeatures; } break; default: @@ -1068,24 +1166,50 @@ VkShaderObj::VkShaderObj(VkDeviceObj *device, const char *shader_code, VkShaderS assert(VK_SUCCESS == err); } +VkPipelineLayoutObj::VkPipelineLayoutObj(VkDeviceObj *device, + const std::vector &descriptor_layouts, + const std::vector &push_constant_ranges) { + VkPipelineLayoutCreateInfo pl_ci = {}; + pl_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pl_ci.pushConstantRangeCount = static_cast(push_constant_ranges.size()); + pl_ci.pPushConstantRanges = push_constant_ranges.data(); + + auto descriptor_layouts_unwrapped = MakeTestbindingHandles(descriptor_layouts); + + init(*device, pl_ci, descriptor_layouts_unwrapped); +} + +void VkPipelineLayoutObj::Reset() { *this = VkPipelineLayoutObj(); } + VkPipelineObj::VkPipelineObj(VkDeviceObj *device) { m_device = device; - m_vi_state.pNext = VK_NULL_HANDLE; + m_vi_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + m_vi_state.pNext = nullptr; m_vi_state.flags = 0; m_vi_state.vertexBindingDescriptionCount = 0; - m_vi_state.pVertexBindingDescriptions = VK_NULL_HANDLE; + m_vi_state.pVertexBindingDescriptions = nullptr; m_vi_state.vertexAttributeDescriptionCount = 0; - m_vi_state.pVertexAttributeDescriptions = VK_NULL_HANDLE; + m_vi_state.pVertexAttributeDescriptions = nullptr; m_ia_state.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - m_ia_state.pNext = VK_NULL_HANDLE; + m_ia_state.pNext = nullptr; m_ia_state.flags = 0; m_ia_state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; m_ia_state.primitiveRestartEnable = VK_FALSE; + m_te_state = nullptr; + + m_vp_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; + m_vp_state.pNext = VK_NULL_HANDLE; + m_vp_state.flags = 0; + m_vp_state.viewportCount = 1; + m_vp_state.scissorCount = 1; + m_vp_state.pViewports = nullptr; + m_vp_state.pScissors = nullptr; + m_rs_state.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - m_rs_state.pNext = VK_NULL_HANDLE; + m_rs_state.pNext = nullptr; m_rs_state.flags = 0; m_rs_state.depthClampEnable = VK_FALSE; m_rs_state.rasterizerDiscardEnable = VK_FALSE; @@ -1093,44 +1217,32 @@ VkPipelineObj::VkPipelineObj(VkDeviceObj *device) { m_rs_state.cullMode = VK_CULL_MODE_BACK_BIT; m_rs_state.frontFace = VK_FRONT_FACE_CLOCKWISE; m_rs_state.depthBiasEnable = VK_FALSE; - m_rs_state.lineWidth = 1.0f; m_rs_state.depthBiasConstantFactor = 0.0f; m_rs_state.depthBiasClamp = 0.0f; m_rs_state.depthBiasSlopeFactor = 0.0f; + m_rs_state.lineWidth = 1.0f; - memset(&m_cb_state, 0, sizeof(m_cb_state)); - m_cb_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - m_cb_state.pNext = VK_NULL_HANDLE; - m_cb_state.logicOp = VK_LOGIC_OP_COPY; - m_cb_state.blendConstants[0] = 1.0f; - m_cb_state.blendConstants[1] = 1.0f; - m_cb_state.blendConstants[2] = 1.0f; - m_cb_state.blendConstants[3] = 1.0f; - - m_ms_state.pNext = VK_NULL_HANDLE; m_ms_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; + m_ms_state.pNext = nullptr; m_ms_state.flags = 0; - m_ms_state.pSampleMask = NULL; + m_ms_state.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; + m_ms_state.sampleShadingEnable = VK_FALSE; + m_ms_state.minSampleShading = 0.0f; + m_ms_state.pSampleMask = nullptr; m_ms_state.alphaToCoverageEnable = VK_FALSE; m_ms_state.alphaToOneEnable = VK_FALSE; - m_ms_state.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - m_ms_state.minSampleShading = 0; - m_ms_state.sampleShadingEnable = 0; - - m_vp_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; - m_vp_state.pNext = VK_NULL_HANDLE; - m_vp_state.flags = 0; - m_vp_state.viewportCount = 1; - m_vp_state.scissorCount = 1; - m_vp_state.pViewports = NULL; - m_vp_state.pScissors = NULL; m_ds_state = nullptr; - m_te_state = nullptr; + memset(&m_cb_state, 0, sizeof(m_cb_state)); + m_cb_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; + m_cb_state.blendConstants[0] = 1.0f; + m_cb_state.blendConstants[1] = 1.0f; + m_cb_state.blendConstants[2] = 1.0f; + m_cb_state.blendConstants[3] = 1.0f; memset(&m_pd_state, 0, sizeof(m_pd_state)); -}; +} void VkPipelineObj::AddShader(VkShaderObj *shader) { m_shaderStages.push_back(shader->GetStageCreateInfo()); } @@ -1146,11 +1258,11 @@ void VkPipelineObj::AddVertexInputBindings(VkVertexInputBindingDescription *vi_b m_vi_state.vertexBindingDescriptionCount = count; } -void VkPipelineObj::AddColorAttachment(uint32_t binding, const VkPipelineColorBlendAttachmentState *att) { +void VkPipelineObj::AddColorAttachment(uint32_t binding, const VkPipelineColorBlendAttachmentState &att) { if (binding + 1 > m_colorAttachments.size()) { m_colorAttachments.resize(binding + 1); } - m_colorAttachments[binding] = *att; + m_colorAttachments[binding] = att; } void VkPipelineObj::SetDepthStencil(const VkPipelineDepthStencilStateCreateInfo *ds_state) { m_ds_state = ds_state; } @@ -1268,67 +1380,38 @@ void VkCommandBufferObj::PipelineBarrier(VkPipelineStageFlags src_stages, VkPipe bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); } -void VkCommandBufferObj::ClearAllBuffers(VkClearColorValue clear_color, float depth_clear_color, uint32_t stencil_clear_color, - VkDepthStencilObj *depthStencilObj) { - uint32_t i; - const VkFlags output_mask = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; - const VkFlags input_mask = 0; - +void VkCommandBufferObj::ClearAllBuffers(const vector &color_objs, VkClearColorValue clear_color, + VkDepthStencilObj *depth_stencil_obj, float depth_clear_value, + uint32_t stencil_clear_value) { // whatever we want to do, we do it to the whole buffer - VkImageSubresourceRange srRange = {}; - srRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - srRange.baseMipLevel = 0; - srRange.levelCount = VK_REMAINING_MIP_LEVELS; - srRange.baseArrayLayer = 0; - srRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - VkImageMemoryBarrier memory_barrier = {}; - memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - memory_barrier.srcAccessMask = output_mask; - memory_barrier.dstAccessMask = input_mask; - memory_barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL; - memory_barrier.subresourceRange = srRange; - VkImageMemoryBarrier *pmemory_barrier = &memory_barrier; - - VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; - VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; - - for (i = 0; i < m_renderTargets.size(); i++) { - memory_barrier.image = m_renderTargets[i]->image(); - memory_barrier.oldLayout = m_renderTargets[i]->Layout(); - vkCmdPipelineBarrier(handle(), src_stages, dest_stages, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); - m_renderTargets[i]->Layout(memory_barrier.newLayout); - - vkCmdClearColorImage(handle(), m_renderTargets[i]->image(), VK_IMAGE_LAYOUT_GENERAL, &clear_color, 1, &srRange); + VkImageSubresourceRange subrange = {}; + // srRange.aspectMask to be set later + subrange.baseMipLevel = 0; + // TODO: Mali device crashing with VK_REMAINING_MIP_LEVELS + subrange.levelCount = 1; // VK_REMAINING_MIP_LEVELS; + subrange.baseArrayLayer = 0; + // TODO: Mesa crashing with VK_REMAINING_ARRAY_LAYERS + subrange.layerCount = 1; // VK_REMAINING_ARRAY_LAYERS; + + const VkImageLayout clear_layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; + + for (const auto &color_obj : color_objs) { + subrange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + color_obj->Layout(VK_IMAGE_LAYOUT_UNDEFINED); + color_obj->SetLayout(this, subrange.aspectMask, clear_layout); + ClearColorImage(color_obj->image(), clear_layout, &clear_color, 1, &subrange); } - if (depthStencilObj) { - VkImageSubresourceRange dsRange = {}; - dsRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; - dsRange.baseMipLevel = 0; - dsRange.levelCount = VK_REMAINING_MIP_LEVELS; - dsRange.baseArrayLayer = 0; - dsRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - // prepare the depth buffer for clear - - memory_barrier.oldLayout = memory_barrier.newLayout; - memory_barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL; - memory_barrier.image = depthStencilObj->handle(); - memory_barrier.subresourceRange = dsRange; - - vkCmdPipelineBarrier(handle(), src_stages, dest_stages, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); + if (depth_stencil_obj && depth_stencil_obj->Initialized()) { + subrange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; + if (FormatIsDepthOnly(depth_stencil_obj->format())) subrange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; + if (FormatIsStencilOnly(depth_stencil_obj->format())) subrange.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT; - VkClearDepthStencilValue clear_value = {depth_clear_color, stencil_clear_color}; - vkCmdClearDepthStencilImage(handle(), depthStencilObj->handle(), VK_IMAGE_LAYOUT_GENERAL, &clear_value, 1, &dsRange); + depth_stencil_obj->Layout(VK_IMAGE_LAYOUT_UNDEFINED); + depth_stencil_obj->SetLayout(this, subrange.aspectMask, clear_layout); - // prepare depth buffer for rendering - memory_barrier.image = depthStencilObj->handle(); - memory_barrier.newLayout = memory_barrier.oldLayout; - memory_barrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL; - memory_barrier.subresourceRange = dsRange; - vkCmdPipelineBarrier(handle(), src_stages, dest_stages, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); + VkClearDepthStencilValue clear_value = {depth_clear_value, stencil_clear_value}; + ClearDepthStencilImage(depth_stencil_obj->handle(), clear_layout, &clear_value, 1, &subrange); } } @@ -1360,38 +1443,17 @@ void VkCommandBufferObj::ClearDepthStencilImage(VkImage image, VkImageLayout ima vkCmdClearDepthStencilImage(handle(), image, imageLayout, pColor, rangeCount, pRanges); } -void VkCommandBufferObj::PrepareAttachments() { - uint32_t i; - const VkFlags output_mask = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; - const VkFlags input_mask = VK_ACCESS_HOST_READ_BIT | VK_ACCESS_INDIRECT_COMMAND_READ_BIT | VK_ACCESS_INDEX_READ_BIT | - VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_UNIFORM_READ_BIT | VK_ACCESS_SHADER_READ_BIT | - VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | - VK_ACCESS_MEMORY_READ_BIT; - - VkImageSubresourceRange srRange = {}; - srRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - srRange.baseMipLevel = 0; - srRange.levelCount = VK_REMAINING_MIP_LEVELS; - srRange.baseArrayLayer = 0; - srRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - VkImageMemoryBarrier memory_barrier = {}; - memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - memory_barrier.srcAccessMask = output_mask; - memory_barrier.dstAccessMask = input_mask; - memory_barrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - memory_barrier.subresourceRange = srRange; - VkImageMemoryBarrier *pmemory_barrier = &memory_barrier; +void VkCommandBufferObj::PrepareAttachments(const vector &color_atts, VkDepthStencilObj *depth_stencil_att) { + for (const auto &color_att : color_atts) { + color_att->SetLayout(this, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL); + } - VkPipelineStageFlags src_stages = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; - VkPipelineStageFlags dest_stages = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; + if (depth_stencil_att && depth_stencil_att->Initialized()) { + VkImageAspectFlags aspect = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; + if (FormatIsDepthOnly(depth_stencil_att->Format())) aspect = VK_IMAGE_ASPECT_DEPTH_BIT; + if (FormatIsStencilOnly(depth_stencil_att->Format())) aspect = VK_IMAGE_ASPECT_STENCIL_BIT; - for (i = 0; i < m_renderTargets.size(); i++) { - memory_barrier.image = m_renderTargets[i]->image(); - memory_barrier.oldLayout = m_renderTargets[i]->Layout(); - vkCmdPipelineBarrier(handle(), src_stages, dest_stages, 0, 0, NULL, 0, NULL, 1, pmemory_barrier); - m_renderTargets[i]->Layout(memory_barrier.newLayout); + depth_stencil_att->SetLayout(this, aspect, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL); } } @@ -1455,9 +1517,11 @@ void VkCommandBufferObj::QueueCommandBuffer(VkFence fence, bool checkSuccess) { void VkCommandBufferObj::BindDescriptorSet(VkDescriptorSetObj &descriptorSet) { VkDescriptorSet set_obj = descriptorSet.GetDescriptorSetHandle(); - // bind pipeline, vertex buffer (descriptor set) and WVP (dynamic buffer - // view) - vkCmdBindDescriptorSets(handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, descriptorSet.GetPipelineLayout(), 0, 1, &set_obj, 0, NULL); + // bind pipeline, vertex buffer (descriptor set) and WVP (dynamic buffer view) + if (set_obj) { + vkCmdBindDescriptorSets(handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, descriptorSet.GetPipelineLayout(), 0, 1, &set_obj, 0, + NULL); + } } void VkCommandBufferObj::BindVertexBuffer(VkConstantBufferObj *vertexBuffer, VkDeviceSize offset, uint32_t binding) { @@ -1473,6 +1537,8 @@ VkDepthStencilObj::VkDepthStencilObj(VkDeviceObj *device) : VkImageObj(device) { VkImageView *VkDepthStencilObj::BindInfo() { return &m_attachmentBindInfo; } +VkFormat VkDepthStencilObj::Format() const { return this->m_depth_stencil_fmt; } + void VkDepthStencilObj::Init(VkDeviceObj *device, int32_t width, int32_t height, VkFormat format, VkImageUsageFlags usage) { VkImageViewCreateInfo view_info = {}; diff --git a/sources/third_party/vulkan/src/tests/vkrenderframework.h b/sources/third_party/vulkan/src/tests/vkrenderframework.h index 03ffc8dc203440d1a93a67f5f529b517da21f4be..1260b8531328060f666f646eec7244c479fb69ea 100644 --- a/sources/third_party/vulkan/src/tests/vkrenderframework.h +++ b/sources/third_party/vulkan/src/tests/vkrenderframework.h @@ -29,19 +29,34 @@ class VkImageObj; #include "vktestframework.h" #endif +#include #include #include #include using namespace std; +using vk_testing::MakeVkHandles; + +template +std::vector MakeTestbindingHandles(const std::vector &v) { + std::vector handles; + handles.reserve(v.size()); + std::transform(v.begin(), v.end(), std::back_inserter(handles), [](const Src *o) { return static_cast(o); }); + return handles; +} + class VkDeviceObj : public vk_testing::Device { public: VkDeviceObj(uint32_t id, VkPhysicalDevice obj); VkDeviceObj(uint32_t id, VkPhysicalDevice obj, std::vector &extension_names, VkPhysicalDeviceFeatures *features = nullptr); - uint32_t QueueFamilyWithoutCapabilities(VkQueueFlags capabilities); + uint32_t QueueFamilyMatching(VkQueueFlags with, VkQueueFlags without, bool all_bits = true); + uint32_t QueueFamilyWithoutCapabilities(VkQueueFlags capabilities) { + // an all_bits match with 0 matches all + return QueueFamilyMatching(VkQueueFlags(0), capabilities, true /* all_bits with */); + } VkDevice device() { return handle(); } void get_device_queue(); @@ -64,8 +79,10 @@ class VkRenderFramework : public VkTestFramework { VkInstance instance() { return inst; } VkDevice device() { return m_device->device(); } + VkDeviceObj *DeviceObj() const { return m_device; } VkPhysicalDevice gpu(); VkRenderPass renderPass() { return m_renderPass; } + const VkRenderPassCreateInfo &RenderPassInfo() const { return renderPass_info_; }; VkFramebuffer framebuffer() { return m_framebuffer; } void InitViewport(float width, float height); void InitViewport(); @@ -82,6 +99,7 @@ class VkRenderFramework : public VkTestFramework { const VkRenderPassBeginInfo &renderPassBeginInfo() const { return m_renderPassBeginInfo; } bool InstanceLayerSupported(const char *name, uint32_t specVersion = 0, uint32_t implementationVersion = 0); + bool EnableDeviceProfileLayer(); bool InstanceExtensionSupported(const char *name, uint32_t specVersion = 0); bool DeviceExtensionSupported(VkPhysicalDevice dev, const char *layer, const char *name, uint32_t specVersion = 0); @@ -94,6 +112,7 @@ class VkRenderFramework : public VkTestFramework { VkCommandPoolObj *m_commandPool; VkCommandBufferObj *m_commandBuffer; VkRenderPass m_renderPass; + VkRenderPassCreateInfo renderPass_info_ = {}; VkFramebuffer m_framebuffer; std::vector m_viewports; std::vector m_scissors; @@ -165,9 +184,9 @@ class VkCommandBufferObj : public vk_testing::CommandBuffer { uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers); - void ClearAllBuffers(VkClearColorValue clear_color, float depth_clear_color, uint32_t stencil_clear_color, - VkDepthStencilObj *depthStencilObj); - void PrepareAttachments(); + void ClearAllBuffers(const vector &color_objs, VkClearColorValue clear_color, + VkDepthStencilObj *depth_stencil_obj, float depth_clear_value, uint32_t stencil_clear_value); + void PrepareAttachments(const vector &color_atts, VkDepthStencilObj *depth_stencil_att); void BindDescriptorSet(VkDescriptorSetObj &descriptorSet); void BindVertexBuffer(VkConstantBufferObj *vertexBuffer, VkDeviceSize offset, uint32_t binding); void BeginRenderPass(const VkRenderPassBeginInfo &info); @@ -192,7 +211,6 @@ class VkCommandBufferObj : public vk_testing::CommandBuffer { protected: VkDeviceObj *m_device; - vector m_renderTargets; }; class VkConstantBufferObj : public vk_testing::Buffer { @@ -222,16 +240,18 @@ class VkRenderpassObj { class VkImageObj : public vk_testing::Image { public: VkImageObj(VkDeviceObj *dev); - bool IsCompatible(VkFlags usage, VkFlags features); + bool IsCompatible(VkImageUsageFlags usages, VkFormatFeatureFlags features); public: void Init(uint32_t const width, uint32_t const height, uint32_t const mipLevels, VkFormat const format, VkFlags const usage, - VkImageTiling const tiling = VK_IMAGE_TILING_LINEAR, VkMemoryPropertyFlags const reqs = 0); + VkImageTiling const tiling = VK_IMAGE_TILING_LINEAR, VkMemoryPropertyFlags const reqs = 0, + const std::vector *queue_families = nullptr); void init(const VkImageCreateInfo *create_info); void InitNoLayout(uint32_t const width, uint32_t const height, uint32_t const mipLevels, VkFormat const format, - VkFlags const usage, VkImageTiling tiling = VK_IMAGE_TILING_LINEAR, VkMemoryPropertyFlags reqs = 0); + VkFlags const usage, VkImageTiling tiling = VK_IMAGE_TILING_LINEAR, VkMemoryPropertyFlags reqs = 0, + const std::vector *queue_families = nullptr); // void clear( CommandBuffer*, uint32_t[4] ); @@ -302,6 +322,8 @@ class VkDepthStencilObj : public VkImageObj { bool Initialized(); VkImageView *BindInfo(); + VkFormat Format() const; + protected: VkDeviceObj *m_device; bool m_initialized; @@ -318,6 +340,21 @@ class VkSamplerObj : public vk_testing::Sampler { VkDeviceObj *m_device; }; +class VkDescriptorSetLayoutObj : public vk_testing::DescriptorSetLayout { + public: + VkDescriptorSetLayoutObj() = default; + VkDescriptorSetLayoutObj(const VkDeviceObj *device, + const std::vector &descriptor_set_bindings = {}, + VkDescriptorSetLayoutCreateFlags flags = 0); + + // Move constructor and move assignment operator for Visual Studio 2013 + VkDescriptorSetLayoutObj(VkDescriptorSetLayoutObj &&src) : DescriptorSetLayout(std::move(src)){}; + VkDescriptorSetLayoutObj &operator=(VkDescriptorSetLayoutObj &&src) { + DescriptorSetLayout::operator=(std::move(src)); + return *this; + } +}; + class VkDescriptorSetObj : public vk_testing::DescriptorPool { public: VkDescriptorSetObj(VkDeviceObj *device); @@ -356,6 +393,22 @@ class VkShaderObj : public vk_testing::ShaderModule { VkDeviceObj *m_device; }; +class VkPipelineLayoutObj : public vk_testing::PipelineLayout { + public: + VkPipelineLayoutObj() = default; + VkPipelineLayoutObj(VkDeviceObj *device, const std::vector &descriptor_layouts = {}, + const std::vector &push_constant_ranges = {}); + + // Move constructor and move assignment operator for Visual Studio 2013 + VkPipelineLayoutObj(VkPipelineLayoutObj &&src) : PipelineLayout(std::move(src)) {} + VkPipelineLayoutObj &operator=(VkPipelineLayoutObj &&src) { + PipelineLayout::operator=(std::move(src)); + return *this; + } + + void Reset(); +}; + class VkPipelineObj : public vk_testing::Pipeline { public: VkPipelineObj(VkDeviceObj *device); @@ -363,14 +416,14 @@ class VkPipelineObj : public vk_testing::Pipeline { void AddShader(VkPipelineShaderStageCreateInfo const &createInfo); void AddVertexInputAttribs(VkVertexInputAttributeDescription *vi_attrib, uint32_t count); void AddVertexInputBindings(VkVertexInputBindingDescription *vi_binding, uint32_t count); - void AddColorAttachment(uint32_t binding, const VkPipelineColorBlendAttachmentState *att); + void AddColorAttachment(uint32_t binding, const VkPipelineColorBlendAttachmentState &att); void MakeDynamic(VkDynamicState state); - void AddColorAttachment(VkColorComponentFlags writeMask = 0xf) { + void AddDefaultColorAttachment(VkColorComponentFlags writeMask = 0xf /*=R|G|B|A*/) { VkPipelineColorBlendAttachmentState att = {}; att.blendEnable = VK_FALSE; att.colorWriteMask = writeMask; - AddColorAttachment(0, &att); + AddColorAttachment(0, att); } void SetDepthStencil(const VkPipelineDepthStencilStateCreateInfo *); diff --git a/sources/third_party/vulkan/src/tests/vktestbinding.cpp b/sources/third_party/vulkan/src/tests/vktestbinding.cpp index a3ab19bb749b9e3ce73b623b905b25be292cac28..226e74aaac2a7852c90f9d80672328e4437e3c2e 100644 --- a/sources/third_party/vulkan/src/tests/vktestbinding.cpp +++ b/sources/third_party/vulkan/src/tests/vktestbinding.cpp @@ -19,7 +19,9 @@ * Author: Tony Barbour */ -#include "vktestbinding.h" +#include "test_common.h" // NOEXCEPT macro (must precede vktestbinding.h) +#include "vktestbinding.h" // Left for clarity, no harm, already included via test_common.h +#include #include #include #include @@ -54,22 +56,6 @@ bool expect_failure(const char *expr, const char *file, unsigned int line, const return false; } -template -std::vector make_handles(const std::vector &v) { - std::vector handles; - handles.reserve(v.size()); - for (typename std::vector::const_iterator it = v.begin(); it != v.end(); it++) handles.push_back((*it)->handle()); - return handles; -} - -VkMemoryAllocateInfo get_resource_alloc_info(const vk_testing::Device &dev, const VkMemoryRequirements &reqs, - VkMemoryPropertyFlags mem_props) { - VkMemoryAllocateInfo info = vk_testing::DeviceMemory::alloc_info(reqs.size, 0); - dev.phy().set_memory_type(reqs.memoryTypeBits, &info, mem_props); - - return info; -} - } // namespace namespace vk_testing { @@ -232,6 +218,24 @@ std::vector PhysicalDevice::layers() const { return layer_props; } +QueueCreateInfoArray::QueueCreateInfoArray(const std::vector &queue_props) + : queue_info_(), queue_priorities_() { + queue_info_.reserve(queue_props.size()); + + for (uint32_t i = 0; i < (uint32_t)queue_props.size(); ++i) { + if (queue_props[i].queueCount > 0) { + VkDeviceQueueCreateInfo qi = {}; + qi.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + qi.pNext = NULL; + qi.queueFamilyIndex = i; + qi.queueCount = queue_props[i].queueCount; + queue_priorities_.emplace_back(qi.queueCount, 0.0f); + qi.pQueuePriorities = queue_priorities_[i].data(); + queue_info_.push_back(qi); + } + } +} + Device::~Device() { if (!initialized()) return; @@ -246,32 +250,28 @@ Device::~Device() { void Device::init(std::vector &extensions, VkPhysicalDeviceFeatures *features) { // request all queues const std::vector queue_props = phy_.queue_properties(); - std::vector queue_info; - queue_info.reserve(queue_props.size()); - - std::vector> queue_priorities; - + QueueCreateInfoArray queue_info(phy_.queue_properties()); for (uint32_t i = 0; i < (uint32_t)queue_props.size(); i++) { - VkDeviceQueueCreateInfo qi = {}; - qi.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - qi.pNext = NULL; - qi.queueFamilyIndex = i; - qi.queueCount = queue_props[i].queueCount; - - queue_priorities.emplace_back(qi.queueCount, 0.0f); - - qi.pQueuePriorities = queue_priorities[i].data(); if (queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { graphics_queue_node_index_ = i; } - queue_info.push_back(qi); } + // Only request creation with queuefamilies that have at least one queue + std::vector create_queue_infos; + auto qci = queue_info.data(); + for (uint32_t j = 0; j < queue_info.size(); ++j) { + if (qci[j].queueCount) { + create_queue_infos.push_back(qci[j]); + } + } + + enabled_extensions_ = extensions; VkDeviceCreateInfo dev_info = {}; dev_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; dev_info.pNext = NULL; - dev_info.queueCreateInfoCount = queue_info.size(); - dev_info.pQueueCreateInfos = queue_info.data(); + dev_info.queueCreateInfoCount = create_queue_infos.size(); + dev_info.pQueueCreateInfos = create_queue_infos.data(); dev_info.enabledLayerCount = 0; dev_info.ppEnabledLayerNames = NULL; dev_info.enabledExtensionCount = extensions.size(); @@ -355,6 +355,11 @@ void Device::init_formats() { EXPECT(!formats_.empty()); } +bool Device::IsEnbledExtension(const char *extension) { + const auto is_x = [&extension](const char *enabled_extension) { return strcmp(extension, enabled_extension) == 0; }; + return std::any_of(enabled_extensions_.begin(), enabled_extensions_.end(), is_x); +} + VkFormatProperties Device::format_properties(VkFormat format) { VkFormatProperties data; vkGetPhysicalDeviceFormatProperties(phy().handle(), format, &data); @@ -365,7 +370,7 @@ VkFormatProperties Device::format_properties(VkFormat format) { void Device::wait() { EXPECT(vkDeviceWaitIdle(handle()) == VK_SUCCESS); } VkResult Device::wait(const std::vector &fences, bool wait_all, uint64_t timeout) { - const std::vector fence_handles = make_handles(fences); + const std::vector fence_handles = MakeVkHandles(fences); VkResult err = vkWaitForFences(handle(), fence_handles.size(), fence_handles.data(), wait_all, timeout); EXPECT(err == VK_SUCCESS || err == VK_TIMEOUT); @@ -378,7 +383,7 @@ void Device::update_descriptor_sets(const std::vector &wri } void Queue::submit(const std::vector &cmds, Fence &fence) { - const std::vector cmd_handles = make_handles(cmds); + const std::vector cmd_handles = MakeVkHandles(cmds); VkSubmitInfo submit_info; submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submit_info.pNext = NULL; @@ -426,6 +431,21 @@ void *DeviceMemory::map(VkFlags flags) { void DeviceMemory::unmap() const { vkUnmapMemory(device(), handle()); } +VkMemoryAllocateInfo DeviceMemory::get_resource_alloc_info(const Device &dev, const VkMemoryRequirements &reqs, + VkMemoryPropertyFlags mem_props) { + // Find appropriate memory type for given reqs + VkPhysicalDeviceMemoryProperties dev_mem_props = dev.phy().memory_properties(); + uint32_t mem_type_index = 0; + for (mem_type_index = 0; mem_type_index < dev_mem_props.memoryTypeCount; ++mem_type_index) { + if (mem_props == (mem_props & dev_mem_props.memoryTypes[mem_type_index].propertyFlags)) break; + } + // If we exceeded types, then this device doesn't have the memory we need + assert(mem_type_index < dev_mem_props.memoryTypeCount); + VkMemoryAllocateInfo info = alloc_info(reqs.size, mem_type_index); + EXPECT(dev.phy().set_memory_type(reqs.memoryTypeBits, &info, mem_props)); + return info; +} + NON_DISPATCHABLE_HANDLE_DTOR(Fence, vkDestroyFence) void Fence::init(const Device &dev, const VkFenceCreateInfo &info) { NON_DISPATCHABLE_HANDLE_INIT(vkCreateFence, dev, &info); } @@ -462,7 +482,7 @@ NON_DISPATCHABLE_HANDLE_DTOR(Buffer, vkDestroyBuffer) void Buffer::init(const Device &dev, const VkBufferCreateInfo &info, VkMemoryPropertyFlags mem_props) { init_no_mem(dev, info); - internal_mem_.init(dev, get_resource_alloc_info(dev, memory_requirements(), mem_props)); + internal_mem_.init(dev, DeviceMemory::get_resource_alloc_info(dev, memory_requirements(), mem_props)); bind_memory(internal_mem_, 0); } @@ -495,7 +515,7 @@ void Image::init(const Device &dev, const VkImageCreateInfo &info, VkMemoryPrope init_no_mem(dev, info); if (initialized()) { - internal_mem_.init(dev, get_resource_alloc_info(dev, memory_requirements(), mem_props)); + internal_mem_.init(dev, DeviceMemory::get_resource_alloc_info(dev, memory_requirements(), mem_props)); bind_memory(internal_mem_, 0); } } @@ -624,7 +644,8 @@ NON_DISPATCHABLE_HANDLE_DTOR(PipelineLayout, vkDestroyPipelineLayout) void PipelineLayout::init(const Device &dev, VkPipelineLayoutCreateInfo &info, const std::vector &layouts) { - const std::vector layout_handles = make_handles(layouts); + const std::vector layout_handles = MakeVkHandles(layouts); + info.setLayoutCount = layout_handles.size(); info.pSetLayouts = layout_handles.data(); NON_DISPATCHABLE_HANDLE_INIT(vkCreatePipelineLayout, dev, &info); @@ -653,7 +674,7 @@ void DescriptorPool::reset() { EXPECT(vkResetDescriptorPool(device(), handle(), std::vector DescriptorPool::alloc_sets(const Device &dev, const std::vector &layouts) { - const std::vector layout_handles = make_handles(layouts); + const std::vector layout_handles = MakeVkHandles(layouts); std::vector set_handles; set_handles.resize(layout_handles.size()); @@ -744,4 +765,4 @@ void CommandBuffer::end() { EXPECT(vkEndCommandBuffer(handle()) == VK_SUCCESS); void CommandBuffer::reset(VkCommandBufferResetFlags flags) { EXPECT(vkResetCommandBuffer(handle(), flags) == VK_SUCCESS); } -}; // namespace vk_testing +} // namespace vk_testing diff --git a/sources/third_party/vulkan/src/tests/vktestbinding.h b/sources/third_party/vulkan/src/tests/vktestbinding.h index 29db1fadfd3f94151d765844d7d1e6f08734aa4e..cbd1b895ed0e5a31e8241ec14941a33471f563c5 100644 --- a/sources/third_party/vulkan/src/tests/vktestbinding.h +++ b/sources/third_party/vulkan/src/tests/vktestbinding.h @@ -17,18 +17,37 @@ * * Author: Courtney Goeltzenleuchter * Author: Cody Northrop + * Author: John Zulauf */ #ifndef VKTESTBINDING_H #define VKTESTBINDING_H +#include #include +#include #include #include "vulkan/vulkan.h" namespace vk_testing { +template +std::vector MakeVkHandles(const std::vector &v) { + std::vector handles; + handles.reserve(v.size()); + std::transform(v.begin(), v.end(), std::back_inserter(handles), [](const Src &o) { return o.handle(); }); + return handles; +} + +template +std::vector MakeVkHandles(const std::vector &v) { + std::vector handles; + handles.reserve(v.size()); + std::transform(v.begin(), v.end(), std::back_inserter(handles), [](const Src *o) { return o->handle(); }); + return handles; +} + typedef void (*ErrorCallback)(const char *expr, const char *file, unsigned int line, const char *function); void set_error_callback(ErrorCallback callback); @@ -66,24 +85,32 @@ template class Handle { public: const T &handle() const { return handle_; } - bool initialized() const { return (handle_ != VK_NULL_HANDLE); } + bool initialized() const { return (handle_ != T{}); } protected: typedef T handle_type; - explicit Handle() : handle_(VK_NULL_HANDLE) {} + explicit Handle() : handle_{} {} explicit Handle(T handle) : handle_(handle) {} + // handles are non-copyable + Handle(const Handle &) = delete; + Handle &operator=(const Handle &) = delete; + + // handles can be moved out + Handle(Handle &&src) NOEXCEPT : handle_{src.handle_} { src.handle_ = {}; } + Handle &operator=(Handle &&src) NOEXCEPT { + handle_ = src.handle_; + src.handle_ = {}; + return *this; + } + void init(T handle) { assert(!initialized()); handle_ = handle; } private: - // handles are non-copyable - Handle(const Handle &); - Handle &operator=(const Handle &); - T handle_; }; @@ -93,6 +120,17 @@ class NonDispHandle : public Handle { explicit NonDispHandle() : Handle(), dev_handle_(VK_NULL_HANDLE) {} explicit NonDispHandle(VkDevice dev, T handle) : Handle(handle), dev_handle_(dev) {} + NonDispHandle(NonDispHandle &&src) : Handle(std::move(src)) { + dev_handle_ = src.dev_handle_; + src.dev_handle_ = VK_NULL_HANDLE; + } + NonDispHandle &operator=(NonDispHandle &&src) { + Handle::operator=(std::move(src)); + dev_handle_ = src.dev_handle_; + src.dev_handle_ = VK_NULL_HANDLE; + return *this; + } + const VkDevice &device() const { return dev_handle_; } void init(VkDevice dev, T handle) { @@ -138,6 +176,17 @@ class PhysicalDevice : public internal::Handle { VkPhysicalDeviceProperties device_properties_; }; +class QueueCreateInfoArray { + private: + std::vector queue_info_; + std::vector> queue_priorities_; + + public: + QueueCreateInfoArray(const std::vector &queue_props); + size_t size() const { return queue_info_.size(); } + const VkDeviceQueueCreateInfo *data() const { return queue_info_.data(); } +}; + class Device : public internal::Handle { public: explicit Device(VkPhysicalDevice phy) : phy_(phy) {} @@ -154,6 +203,9 @@ class Device : public internal::Handle { const PhysicalDevice &phy() const { return phy_; } + std::vector GetEnabledExtensions() { return enabled_extensions_; } + bool IsEnbledExtension(const char *extension); + // vkGetDeviceProcAddr() PFN_vkVoidFunction get_proc(const char *name) const { return vkGetDeviceProcAddr(handle(), name); } @@ -161,7 +213,7 @@ class Device : public internal::Handle { const std::vector &graphics_queues() const { return queues_[GRAPHICS]; } const std::vector &compute_queues() { return queues_[COMPUTE]; } const std::vector &dma_queues() { return queues_[DMA]; } - uint32_t queue_family_without_capabilities( VkQueueFlags capabilities ); + uint32_t queue_family_without_capabilities(VkQueueFlags capabilities); uint32_t graphics_queue_node_index_; struct Format { @@ -218,6 +270,8 @@ class Device : public internal::Handle { PhysicalDevice phy_; + std::vector enabled_extensions_; + std::vector queues_[QUEUE_COUNT]; std::vector formats_; }; @@ -257,6 +311,8 @@ class DeviceMemory : public internal::NonDispHandle { void unmap() const; static VkMemoryAllocateInfo alloc_info(VkDeviceSize size, uint32_t memory_type_index); + static VkMemoryAllocateInfo get_resource_alloc_info(const vk_testing::Device &dev, const VkMemoryRequirements &reqs, + VkMemoryPropertyFlags mem_props); }; class Fence : public internal::NonDispHandle { @@ -326,14 +382,17 @@ class Buffer : public internal::NonDispHandle { void init(const Device &dev, const VkBufferCreateInfo &info) { init(dev, info, 0); } void init(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags mem_props) { init(dev, create_info(size, 0), mem_props); } void init(const Device &dev, VkDeviceSize size) { init(dev, size, 0); } - void init_as_src(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs) { - init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT), reqs); + void init_as_src(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs, + const std::vector *queue_families = nullptr) { + init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT, queue_families), reqs); } - void init_as_dst(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs) { - init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_DST_BIT), reqs); + void init_as_dst(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs, + const std::vector *queue_families = nullptr) { + init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_DST_BIT, queue_families), reqs); } - void init_as_src_and_dst(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs) { - init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT), reqs); + void init_as_src_and_dst(const Device &dev, VkDeviceSize size, VkMemoryPropertyFlags &reqs, + const std::vector *queue_families = nullptr) { + init(dev, create_info(size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, queue_families), reqs); } void init_no_mem(const Device &dev, const VkBufferCreateInfo &info); @@ -347,7 +406,8 @@ class Buffer : public internal::NonDispHandle { // vkBindObjectMemory() void bind_memory(const DeviceMemory &mem, VkDeviceSize mem_offset); - static VkBufferCreateInfo create_info(VkDeviceSize size, VkFlags usage); + const VkBufferCreateInfo &create_info() const { return create_info_; } + static VkBufferCreateInfo create_info(VkDeviceSize size, VkFlags usage, const std::vector *queue_families = nullptr); VkBufferMemoryBarrier buffer_memory_barrier(VkFlags output_mask, VkFlags input_mask, VkDeviceSize offset, VkDeviceSize size) const { @@ -358,6 +418,10 @@ class Buffer : public internal::NonDispHandle { barrier.dstAccessMask = input_mask; barrier.offset = offset; barrier.size = size; + if (create_info_.sharingMode == VK_SHARING_MODE_CONCURRENT) { + barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + } return barrier; } @@ -373,8 +437,22 @@ class BufferView : public internal::NonDispHandle { // vkCreateBufferView() void init(const Device &dev, const VkBufferViewCreateInfo &info); + static VkBufferViewCreateInfo createInfo(VkBuffer buffer, VkFormat format, VkDeviceSize offset = 0, + VkDeviceSize range = VK_WHOLE_SIZE); }; +inline VkBufferViewCreateInfo BufferView::createInfo(VkBuffer buffer, VkFormat format, VkDeviceSize offset, VkDeviceSize range) { + VkBufferViewCreateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO; + info.pNext = nullptr; + info.flags = VkFlags(0); + info.buffer = buffer; + info.format = format; + info.offset = offset; + info.range = range; + return info; +} + class Image : public internal::NonDispHandle { public: explicit Image() : NonDispHandle(), format_features_(0) {} @@ -411,6 +489,7 @@ class Image : public internal::NonDispHandle { VkExtent3D extent(uint32_t mip_level) const { return extent(create_info_.extent, mip_level); } VkFormat format() const { return create_info_.format; } VkImageUsageFlags usage() const { return create_info_.usage; } + VkSharingMode sharing_mode() const { return create_info_.sharingMode; } VkImageMemoryBarrier image_memory_barrier(VkFlags output_mask, VkFlags input_mask, VkImageLayout old_layout, VkImageLayout new_layout, const VkImageSubresourceRange &range) const { VkImageMemoryBarrier barrier = {}; @@ -421,6 +500,11 @@ class Image : public internal::NonDispHandle { barrier.newLayout = new_layout; barrier.image = handle(); barrier.subresourceRange = range; + + if (sharing_mode() == VK_SHARING_MODE_CONCURRENT) { + barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + } return barrier; } @@ -495,8 +579,18 @@ class Pipeline : public internal::NonDispHandle { class PipelineLayout : public internal::NonDispHandle { public: + PipelineLayout() NOEXCEPT : NonDispHandle(){}; ~PipelineLayout(); + // Move constructor for Visual Studio 2013 + PipelineLayout(PipelineLayout &&src) : NonDispHandle(std::move(src)){}; + + PipelineLayout &operator=(PipelineLayout &&src) { + this->~PipelineLayout(); + this->NonDispHandle::operator=(std::move(src)); + return *this; + }; + // vCreatePipelineLayout() void init(const Device &dev, VkPipelineLayoutCreateInfo &info, const std::vector &layouts); }; @@ -511,8 +605,18 @@ class Sampler : public internal::NonDispHandle { class DescriptorSetLayout : public internal::NonDispHandle { public: + DescriptorSetLayout() NOEXCEPT : NonDispHandle(){}; ~DescriptorSetLayout(); + // Move constructor for Visual Studio 2013 + DescriptorSetLayout(DescriptorSetLayout &&src) : NonDispHandle(std::move(src)){}; + + DescriptorSetLayout &operator=(DescriptorSetLayout &&src) NOEXCEPT { + this->~DescriptorSetLayout(); + this->NonDispHandle::operator=(std::move(src)); + return *this; + } + // vkCreateDescriptorSetLayout() void init(const Device &dev, const VkDescriptorSetLayoutCreateInfo &info); }; @@ -540,6 +644,10 @@ class DescriptorPool : public internal::NonDispHandle { std::vector alloc_sets(const Device &dev, const DescriptorSetLayout &layout, uint32_t count); DescriptorSet *alloc_sets(const Device &dev, const DescriptorSetLayout &layout); + template + static VkDescriptorPoolCreateInfo create_info(VkDescriptorPoolCreateFlags flags, uint32_t max_sets, + const PoolSizes &pool_sizes); + private: VkDescriptorPool pool_; @@ -547,6 +655,19 @@ class DescriptorPool : public internal::NonDispHandle { bool dynamic_usage_; }; +template +inline VkDescriptorPoolCreateInfo DescriptorPool::create_info(VkDescriptorPoolCreateFlags flags, uint32_t max_sets, + const PoolSizes &pool_sizes) { + VkDescriptorPoolCreateInfo info{}; + info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + info.pNext = nullptr; + info.flags = flags; + info.maxSets = max_sets; + info.poolSizeCount = pool_sizes.size(); + info.pPoolSizes = (info.poolSizeCount) ? pool_sizes.data() : nullptr; + return info; +} + class DescriptorSet : public internal::NonDispHandle { public: ~DescriptorSet(); @@ -615,11 +736,18 @@ inline VkMemoryAllocateInfo DeviceMemory::alloc_info(VkDeviceSize size, uint32_t return info; } -inline VkBufferCreateInfo Buffer::create_info(VkDeviceSize size, VkFlags usage) { +inline VkBufferCreateInfo Buffer::create_info(VkDeviceSize size, VkFlags usage, const std::vector *queue_families) { VkBufferCreateInfo info = {}; info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; info.size = size; info.usage = usage; + + if (queue_families && queue_families->size() > 1) { + info.sharingMode = VK_SHARING_MODE_CONCURRENT; + info.queueFamilyIndexCount = static_cast(queue_families->size()); + info.pQueueFamilyIndices = queue_families->data(); + } + return info; } @@ -853,6 +981,6 @@ inline VkCommandBufferAllocateInfo CommandBuffer::create_info(VkCommandPool cons return info; } -}; // namespace vk_testing +} // namespace vk_testing #endif // VKTESTBINDING_H diff --git a/sources/third_party/vulkan/src/tests/vktestframework.cpp b/sources/third_party/vulkan/src/tests/vktestframework.cpp index 693aba088bfb62895bbb49b6717b4289e426c174..7e0af96e201a9563dcbe951cd98f43330c7a08fb 100644 --- a/sources/third_party/vulkan/src/tests/vktestframework.cpp +++ b/sources/third_party/vulkan/src/tests/vktestframework.cpp @@ -143,6 +143,7 @@ VkTestFramework::~VkTestFramework() {} bool VkTestFramework::m_canonicalize_spv = false; bool VkTestFramework::m_strip_spv = false; bool VkTestFramework::m_do_everything_spv = false; +bool VkTestFramework::m_devsim_layer = false; int VkTestFramework::m_width = 0; int VkTestFramework::m_height = 0; @@ -161,6 +162,8 @@ void VkTestFramework::InitArgs(int *argc, char *argv[]) { m_strip_spv = true; else if (optionMatch("--canonicalize-SPV", argv[i])) m_canonicalize_spv = true; + else if (optionMatch("--devsim", argv[i])) + m_devsim_layer = true; else if (optionMatch("--help", argv[i]) || optionMatch("-h", argv[i])) { printf("\nOther options:\n"); printf( @@ -168,17 +171,14 @@ void VkTestFramework::InitArgs(int *argc, char *argv[]) { "\t\tDisplay test images in viewer after tests complete.\n"); printf( "\t--save-images\n" - "\t\tSave tests images as ppm files in current working " - "directory.\n" + "\t\tSave tests images as ppm files in current working directory.\n" "\t\tUsed to generate golden images for compare-images.\n"); printf( "\t--compare-images\n" "\t\tCompare test images to 'golden' image in golden folder.\n" "\t\tAlso saves the generated test image in current working\n" - "\t\t\tdirectory but only if the image is different from the " - "golden\n" - "\t\tSetting RENDERTEST_GOLDEN_DIR environment variable can " - "specify\n" + "\t\t\tdirectory but only if the image is different from the golden\n" + "\t\tSetting RENDERTEST_GOLDEN_DIR environment variable can specify\n" "\t\t\tdifferent directory for golden images\n" "\t\tSignal test failure if different.\n"); printf( @@ -186,8 +186,7 @@ void VkTestFramework::InitArgs(int *argc, char *argv[]) { "\t\tUse built-in GLSL compiler rather than SPV code path.\n"); printf( "\t--strip-SPV\n" - "\t\tStrip SPIR-V debug information (line numbers, names, " - "etc).\n"); + "\t\tStrip SPIR-V debug information (line numbers, names, etc).\n"); printf( "\t--canonicalize-SPV\n" "\t\tRemap SPIR-V ids before submission to aid compression.\n"); @@ -221,9 +220,7 @@ VkFormat VkTestFramework::GetFormat(VkInstance instance, vk_testing::Device *dev format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) { return VK_FORMAT_R8G8B8A8_UNORM; } - printf( - "Error - device does not support VK_FORMAT_B8G8R8A8_UNORM nor " - "VK_FORMAT_R8G8B8A8_UNORM - exiting\n"); + printf("Error - device does not support VK_FORMAT_B8G8R8A8_UNORM nor VK_FORMAT_R8G8B8A8_UNORM - exiting\n"); exit(1); } @@ -354,9 +351,7 @@ void VkTestFramework::ProcessConfigFile() { if (configStrings) config = *configStrings; else { - printf( - "Error opening configuration file; will instead use the " - "default configuration\n"); + printf("Error opening configuration file; will instead use the default configuration\n"); } } @@ -370,10 +365,7 @@ void VkTestFramework::ProcessConfigFile() { while (token) { const char *valueStr = strtok(0, delims); if (valueStr == 0 || !(valueStr[0] == '-' || (valueStr[0] >= '0' && valueStr[0] <= '9'))) { - printf( - "Error: '%s' bad .conf file. Each name must be followed by " - "one number.\n", - valueStr ? valueStr : ""); + printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n", valueStr ? valueStr : ""); return; } int value = atoi(valueStr); diff --git a/sources/third_party/vulkan/src/tests/vktestframework.h b/sources/third_party/vulkan/src/tests/vktestframework.h index f2ed24b0c8d2e67d28129ab6a42d558fa0a384b6..f889f766af6087e5828fe60b7367be92fafc8f5b 100644 --- a/sources/third_party/vulkan/src/tests/vktestframework.h +++ b/sources/third_party/vulkan/src/tests/vktestframework.h @@ -28,7 +28,6 @@ #include "icd-spv.h" #include "test_common.h" #include "test_environment.h" -#include "vktestbinding.h" #include #include @@ -72,6 +71,7 @@ class VkTestFramework : public ::testing::Test { static bool m_canonicalize_spv; static bool m_strip_spv; static bool m_do_everything_spv; + static bool m_devsim_layer; char **ReadFileData(const char *fileName); void FreeFileData(char **data); diff --git a/sources/third_party/vulkan/src/tests/vktestframeworkandroid.cpp b/sources/third_party/vulkan/src/tests/vktestframeworkandroid.cpp index 56a8b5cb54cc4b45afd14563f321886a614337d8..eef9218fdca6bbcdaad1d93e3f29ae00028c04d8 100644 --- a/sources/third_party/vulkan/src/tests/vktestframeworkandroid.cpp +++ b/sources/third_party/vulkan/src/tests/vktestframeworkandroid.cpp @@ -24,6 +24,9 @@ VkTestFramework::VkTestFramework() {} VkTestFramework::~VkTestFramework() {} +// Define static elements +bool VkTestFramework::m_devsim_layer = false; + VkFormat VkTestFramework::GetFormat(VkInstance instance, vk_testing::Device *device) { VkFormatProperties format_props; vkGetPhysicalDeviceFormatProperties(device->phy().handle(), VK_FORMAT_B8G8R8A8_UNORM, &format_props); diff --git a/sources/third_party/vulkan/src/tests/vktestframeworkandroid.h b/sources/third_party/vulkan/src/tests/vktestframeworkandroid.h index f5668c6ee18c94d5c653e8bb446699a5056198ba..6f76da4b514d0036674220342a916e481feebb92 100644 --- a/sources/third_party/vulkan/src/tests/vktestframeworkandroid.h +++ b/sources/third_party/vulkan/src/tests/vktestframeworkandroid.h @@ -21,7 +21,6 @@ #define VKTESTFRAMEWORKANDROID_H #include "test_common.h" -#include "vktestbinding.h" #if defined(NDEBUG) #define U_ASSERT_ONLY __attribute__((unused)) @@ -44,6 +43,7 @@ class VkTestFramework : public ::testing::Test { VkFormat GetFormat(VkInstance instance, vk_testing::Device *device); bool GLSLtoSPV(const VkShaderStageFlagBits shader_type, const char *pshader, std::vector &spv); + static bool m_devsim_layer; }; class TestEnvironment : public ::testing::Environment { diff --git a/sources/third_party/vulkan/src/tests/vkvalidatelayerdoc.sh b/sources/third_party/vulkan/src/tests/vkvalidatelayerdoc.sh index ef25bd007f2931f5bf6a734ed896cbb0b7621c30..2ce25ac8b2605bd56aaf86804ab39e2b7c80765f 100755 --- a/sources/third_party/vulkan/src/tests/vkvalidatelayerdoc.sh +++ b/sources/third_party/vulkan/src/tests/vkvalidatelayerdoc.sh @@ -24,7 +24,7 @@ printf "$GREEN[ RUN ]$NC $0\n" pushd ../../scripts # Validate that layer database matches source contents -python3 vk_validation_stats.py $1 +python3 vk_validation_stats.py RES=$? diff --git a/sysroot/NOTICE b/sysroot/NOTICE index 46123b89b30541f65fda5ec4c89ca161f350a9df..5be1ce92d66c985a62a7c3e7ce299f949b9a44f7 100644 --- a/sysroot/NOTICE +++ b/sysroot/NOTICE @@ -136,6 +136,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -156,6 +183,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -181,6 +221,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -553,32 +607,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -3073,6 +3101,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -3785,34 +3842,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -3938,32 +3967,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -3990,32 +3993,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -4247,58 +4224,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2005 Tim J. Robbins. All rights reserved. @@ -4368,32 +4293,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -4420,93 +4319,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -4552,6 +4364,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -4607,32 +4447,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -4973,58 +4787,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2011 Ed Schouten David Chisnall All rights reserved. @@ -5215,6 +4977,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5951,213 +5714,728 @@ SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved +Copyright (c) 2003, Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 1999 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004-2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008-2009 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. +Copyright (c) 2005-2008 David Schultz +All rights reserved. -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -Copyright (C) 2016 The Android Open Source Project +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. - http://www.apache.org/licenses/LICENSE-2.0 +------------------------------------------------------------------- -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -Copyright (c) 2007-2017 The Khronos Group Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and/or associated documentation files (the -"Materials"), to deal in the Materials without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Materials, and to -permit persons to whom the Materials are furnished to do so, subject to -the following conditions: +Copyright (c) 2005-2011 David Schultz +All rights reserved. -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 1999 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2001 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008-2009 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +Copyright (C) 2016 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +Copyright (c) 2007-2017 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. Copyright (c) 2017 The Khronos Group Inc. @@ -6960,29 +7238,32 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Developed at SunSoft, a Sun Microsystems, Inc. business. +Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. ------------------------------------------------------------------- ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Developed at SunSoft, a Sun Microsystems, Inc. business. +Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. ==================================================== -Optimized by Bruce D. Evans. +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. ------------------------------------------------------------------- ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -6993,7 +7274,6 @@ is preserved. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -7007,7 +7287,59 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +Optimized by Bruce D. Evans. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this @@ -7377,32 +7709,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -9897,6 +10203,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -10609,34 +10944,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -10762,32 +11069,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -10814,32 +11095,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -11071,58 +11326,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2005 Tim J. Robbins. All rights reserved. @@ -11192,32 +11395,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -11244,93 +11421,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -11376,6 +11466,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -11431,32 +11549,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -11797,58 +11889,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2011 Ed Schouten David Chisnall All rights reserved. @@ -12039,6 +12079,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -12775,223 +12816,738 @@ SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved +Copyright (c) 2003, Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 1999 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2004-2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -The author of this software is David M. Gay. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved +Copyright (c) 2005 David Schultz +All rights reserved. -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- - Copyright (c) 2014, ARM Limited - All rights Reserved. - Copyright (c) 2014, Linaro Ltd. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the company nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Copyright (c) 2014, Linaro Limited - All rights reserved. +Copyright (c) 2005-2008 David Schultz +All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- - Copyright (c) 1993 John Brezak - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without +Copyright (c) 2005-2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 1999 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998, 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 1998-2001 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + +The author of this software is David M. Gay. + +Copyright (C) 2000 by Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +------------------------------------------------------------------- + + Copyright (c) 2014, ARM Limited + All rights Reserved. + Copyright (c) 2014, Linaro Ltd. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the company nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + + Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + + Copyright (c) 1993 John Brezak + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright @@ -13069,6 +13625,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -13089,6 +13672,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -13114,6 +13710,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -13486,32 +14096,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -16006,6 +16590,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -16718,34 +17331,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -16871,32 +17456,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -16923,32 +17482,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -17180,33 +17713,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17232,7 +17782,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17244,10 +17794,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17258,76 +17808,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17339,10 +17974,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17353,8 +17988,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17379,7 +18067,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17403,18 +18091,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17438,14 +18144,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -17469,7 +18174,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -17485,62 +18190,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17566,33 +18276,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17618,23 +18303,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -17650,29 +18349,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17697,8 +18492,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17708,11 +18587,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -17723,10 +18605,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -17736,91 +18616,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17850,39 +18793,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -17906,33 +18903,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17958,8 +18989,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17985,56 +19015,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -18043,111 +19091,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18173,92 +19259,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -18268,14 +19272,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -18286,7 +19287,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18297,212 +19300,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18513,53 +19412,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -18584,7 +19483,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18595,56 +19496,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18670,7 +19576,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18696,7 +19604,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -18722,48 +19660,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -18773,114 +19674,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -19178,6 +20012,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -19198,6 +20059,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -19223,6 +20097,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -19595,32 +20483,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -22115,6 +22977,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -22827,34 +23718,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -22980,32 +23843,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -23032,32 +23869,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -23289,33 +24100,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23341,7 +24169,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23353,10 +24181,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23367,76 +24195,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23448,10 +24361,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23462,8 +24375,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23488,7 +24454,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23512,18 +24478,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23547,14 +24531,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -23578,7 +24561,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -23594,62 +24577,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23675,33 +24663,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23727,23 +24690,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -23759,29 +24736,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23806,8 +24879,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23817,11 +24974,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -23832,10 +24992,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -23845,91 +25003,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23959,39 +25180,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24015,33 +25290,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24067,8 +25376,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24094,56 +25402,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24152,111 +25478,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24282,92 +25646,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -24377,14 +25659,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -24395,7 +25674,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24406,212 +25687,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24622,53 +25799,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -24693,7 +25870,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24704,56 +25883,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24779,7 +25963,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24805,7 +25991,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -24831,48 +26047,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -24882,114 +26061,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -25287,6 +26399,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -25307,6 +26446,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -25332,6 +26484,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -25704,32 +26870,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -28224,6 +29364,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -28936,34 +30105,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -29089,32 +30230,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -29141,32 +30256,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -29398,33 +30487,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29450,7 +30556,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29462,10 +30568,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29476,76 +30582,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29557,10 +30748,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29571,8 +30762,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29597,7 +30841,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29621,18 +30865,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29656,14 +30918,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -29687,7 +30948,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -29703,62 +30964,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29784,33 +31050,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29836,23 +31077,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -29868,29 +31123,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29915,8 +31266,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29926,11 +31361,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -29941,10 +31379,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -29954,91 +31390,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30068,39 +31567,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30124,33 +31677,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30176,8 +31763,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30203,56 +31789,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30261,111 +31865,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30391,92 +32033,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -30486,14 +32046,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -30504,7 +32061,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30515,212 +32074,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30731,53 +32186,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -30802,7 +32257,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30813,56 +32270,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30888,7 +32350,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30914,7 +32378,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -30940,48 +32434,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -30991,114 +32448,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -31396,6 +32786,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -31416,6 +32833,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -31441,6 +32871,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -31813,32 +33257,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -34333,6 +35751,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -35045,34 +36492,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -35198,32 +36617,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -35250,32 +36643,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -35507,33 +36874,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35559,7 +36943,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35571,10 +36955,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -35585,76 +36969,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35666,10 +37135,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -35680,8 +37149,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -35706,7 +37228,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35730,18 +37252,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35765,14 +37305,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -35796,7 +37335,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -35812,62 +37351,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35893,33 +37437,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35945,23 +37464,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -35977,29 +37510,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36024,8 +37653,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36035,11 +37748,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -36050,10 +37766,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36063,91 +37777,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36177,39 +37954,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36233,33 +38064,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36285,8 +38150,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36312,56 +38176,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -36370,111 +38252,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36500,92 +38420,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36595,14 +38433,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -36613,7 +38448,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36624,212 +38461,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36840,53 +38573,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -36911,7 +38644,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36922,56 +38657,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36997,7 +38737,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37023,7 +38765,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37049,48 +38821,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -37100,114 +38835,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -37505,6 +39173,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -37525,6 +39220,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -37550,6 +39258,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -37922,32 +39644,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -40442,6 +42138,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -41154,34 +42879,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -41307,32 +43004,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -41359,32 +43030,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -41616,33 +43261,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41668,7 +43330,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41680,10 +43342,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -41694,76 +43356,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41775,10 +43522,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -41789,8 +43536,61 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2009 David Schultz +All rights reserved. + +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -41815,7 +43615,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41839,18 +43639,36 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +------------------------------------------------------------------- -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41874,14 +43692,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -41905,7 +43722,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -41921,62 +43738,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42002,33 +43824,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42054,23 +43851,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2011 Intel Corporation +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -42086,29 +43897,125 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. -Copyright (c) 2011 The FreeBSD Foundation +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42133,8 +44040,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42144,11 +44135,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -42159,10 +44153,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c) 2013 ARM Ltd +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42172,91 +44164,154 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 Antoine Jacoutot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -Optimized by Bruce D. Evans. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42286,39 +44341,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. +Copyright (c) 2014, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2015 ARM Ltd +All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -42342,33 +44451,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42394,8 +44537,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42421,56 +44563,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -42479,111 +44639,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42609,92 +44807,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -42704,14 +44820,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -42722,7 +44835,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42733,212 +44848,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42949,53 +44960,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -43020,7 +45031,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43031,56 +45044,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43106,7 +45124,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43132,7 +45152,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43158,48 +45208,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -43209,114 +45222,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -43614,6 +45560,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -43634,6 +45607,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -43659,6 +45645,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -44031,32 +46031,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -46551,6 +48525,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -47263,34 +49266,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -47416,32 +49391,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -47468,32 +49417,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -47725,33 +49648,50 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47777,7 +49717,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47789,10 +49729,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -47803,24 +49743,161 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +Copyright (c) 2007 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project + +------------------------------------------------------------------- + +Copyright (c) 2007-2013 Bruce D. Evans +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47846,35 +49923,62 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. +Copyright (c) 2008 Otto Moerbeek + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2008, Damien Miller -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. +Copyright (c) 2011 The FreeBSD Foundation +All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -47884,10 +49988,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -47898,7 +50002,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47924,8 +50028,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2009 The NetBSD Foundation, Inc. + +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -47936,30 +50042,20 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl +Copyright (c) 2009-2013 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47983,14 +50079,13 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Optimized by Bruce D. Evans. + ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48014,7 +50109,7 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -48030,62 +50125,67 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Copyright (c) 2010, Intel Corporation +All rights reserved. -The MIT License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48111,33 +50211,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48163,39 +50238,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2011 Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2008 Todd C. Miller + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008, Damien Miller +Copyright (c) 2011 Martin Pieuchot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -48211,13 +50284,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. - -Copyright (c) 2011 The FreeBSD Foundation +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48227,22 +50296,112 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, 2012, 2013 Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2011, VMware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48268,10 +50427,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. +Copyright (c) 2012, Linaro Limited + All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48281,51 +50522,74 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright (c) 2013 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2013 Antoine Jacoutot -Optimized by Bruce D. Evans. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48349,53 +50613,92 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Copyright (c) 2013, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation -All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation +Copyright (c) 2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48425,9 +50728,93 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall +Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 ARM Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48451,33 +50838,67 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2017 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2017 Imagination Technologies. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c)1999 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48503,8 +50924,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48530,56 +50950,74 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Intel Corporation +Copyright (c)2003 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 Martin Pieuchot +Copyright 1989 The Regents of the University of California. + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ------------------------------------------------------------------- -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -48588,111 +51026,149 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +------------------------------------------------------------------- - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2011, Intel Corporation -All rights reserved. +Portions Copyright (c) 1993 by Digital Equipment Corporation. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +------------------------------------------------------------------- - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Portions Copyright (c) 1995 by International Business Machines, Inc. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. + +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. + +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + +------------------------------------------------------------------- + +Portions Copyright(C) 1995, Jason Downs. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011, VMware, Inc. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48718,92 +51194,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -48813,14 +51207,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -48831,7 +51222,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -48842,212 +51235,108 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49058,53 +51347,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -49129,7 +51418,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49140,56 +51431,61 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49215,7 +51511,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49241,7 +51539,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -49267,48 +51595,11 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -49318,114 +51609,47 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-3-Clause -Portions Copyright(C) 1995, Jason Downs. All rights reserved. +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -49723,6 +51947,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -49743,6 +51994,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -49768,6 +52032,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -50140,32 +52418,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (C) 2010 The Android Open Source Project Copyright (c) 2008 ARM Ltd All rights reserved. @@ -52660,6 +54912,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -52945,14 +55226,369 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2000 Ben Harris. +Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2000 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Dieter Baron and Thomas Klausner. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001 Wasabi Systems, Inc. +All rights reserved. + +Written by Frank van der Linden for Wasabi Systems, Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed for the NetBSD Project by + Wasabi Systems, Inc. +4. The name of Wasabi Systems, Inc. may not be used to endorse + or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of Opsycon AB nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2001-2011 The FreeBSD Project. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Daniel Hartmeier +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Tim J. Robbins +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Tim J. Robbins. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2002, 2003 Tim J. Robbins. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2002-2004 Tim J. Robbins +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -52963,8 +55599,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2000 Ben Harris. -Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -52975,14 +55610,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -52993,11 +55625,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2000 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Dieter Baron and Thomas Klausner. +Copyright (c) 2003 Constantin S. Svintsoff Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53007,26 +55635,27 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001 Wasabi Systems, Inc. +Copyright (c) 2003 David Schultz All rights reserved. -Written by Frank van der Linden for Wasabi Systems, Inc. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53035,29 +55664,24 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed for the NetBSD Project by - Wasabi Systems, Inc. -4. The name of Wasabi Systems, Inc. may not be used to endorse - or promote products derived from this software without specific prior - written permission. -THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) +Copyright (c) 2003 Mike Barcroft +Copyright (c) 2002 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53068,11 +55692,11 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT @@ -53082,7 +55706,14 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) +Copyright (c) 2003 Networks Associates Technology, Inc. +All rights reserved. + +Portions of this software were developed for the FreeBSD Project by +Jacques A. Vidrine, Safeport Network Services, and Network +Associates Laboratories, the Security Research Division of Network +Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 +("CBOSS"), as part of the DARPA CHATS research program. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53092,15 +55723,12 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of Opsycon AB nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT @@ -53110,7 +55738,47 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2001-2011 The FreeBSD Project. +Copyright (c) 2003 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2003, 2004 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + +------------------------------------------------------------------- + +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53136,41 +55804,188 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Daniel Hartmeier +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996-1999 by Internet Software Consortium + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1996-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1997,1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (c) 1996-1999 by Internet Software Consortium. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2004, 2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 The NetBSD Foundation, Inc. +Copyright (c) 2004-2005 David Schultz All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53180,21 +55995,21 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Tim J. Robbins +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53220,7 +56035,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Tim J. Robbins. +Copyright (c) 2005 Tim J. Robbins. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53246,27 +56061,24 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002 Todd C. Miller +Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-1999 by Internet Software Consortium Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2002, 2003 Tim J. Robbins. +Copyright (c) 2005-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53292,7 +56104,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002-2004 Tim J. Robbins +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53304,10 +56116,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -53318,9 +56130,12 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2002-2004 Tim J. Robbins. +Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. +This code is derived from software written by Stephen L. Moshier. +It is redistributed by the NetBSD Foundation by permission of the author. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -53330,62 +56145,131 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2007 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2003 Constantin S. Svintsoff +Copyright (c) 2007-2008 Michael G Schwern + +This software originally derived from Paul Sheer's pivotal_gmtime_r.c. + +The MIT License: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior written - permission. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +Origin: http://code.google.com/p/y2038 +Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav +Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -53400,34 +56284,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 Mike Barcroft -Copyright (c) 2002 David Schultz +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53453,39 +56310,23 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Networks Associates Technology, Inc. -All rights reserved. - -Portions of this software were developed for the FreeBSD Project by -Jacques A. Vidrine, Safeport Network Services, and Network -Associates Laboratories, the Security Research Division of Network -Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 -("CBOSS"), as part of the DARPA CHATS research program. +Copyright (c) 2008 Otto Moerbeek -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2003 Todd C. Miller +Copyright (c) 2008 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -53499,13 +56340,9 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - ------------------------------------------------------------------- -Copyright (c) 2003, 2004 Todd C. Miller +Copyright (c) 2008, Damien Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -53519,40 +56356,15 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl +Copyright (c) 2009 David Schultz All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2004 David Schultz +Copyright (c) 2011 The FreeBSD Foundation All rights reserved. +Portions of this software were developed by David Chisnall +under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -53577,7 +56389,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder +Copyright (c) 2009 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53589,10 +56401,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -53603,160 +56415,164 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995,1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +Copyright (c) 2009 The NetBSD Foundation, Inc. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium +This code is derived from software contributed to The NetBSD Foundation +by Roy Marples. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium. +Copyright (c) 2009-2013 Steven G. Kargl +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Optimized by Bruce D. Evans. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996,1999 by Internet Software Consortium. +Copyright (c) 2010 The NetBSD Foundation, Inc. +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium +Copyright (c) 2010 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1997,1999 by Internet Software Consortium. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2010, Intel Corporation +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (c) 1996-1999 by Internet Software Consortium. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004, 2005 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53782,7 +56598,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz +Copyright (c) 2011 Ed Schouten + David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53808,154 +56625,170 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz +Copyright (c) 2011 Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2011 Martin Pieuchot + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------- + +Copyright (c) 2011 The Android Open Source Project +Copyright (c) 2008 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2011, 2012, 2013 Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 Tim J. Robbins. +Copyright (c) 2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +modification, are permitted provided that the following conditions are met: -------------------------------------------------------------------- + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2008 David Schultz +Copyright (c) 2011, VMware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the VMware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz +Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -53981,34 +56814,92 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. +Copyright (c) 2012, Linaro Limited + All rights reserved. + Copyright (c) 2014, NVIDIA Corporation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (c) 2012-2013, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + +------------------------------------------------------------------- + +Copyright (c) 2013 + MIPS Technologies, Inc., California. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54018,11 +56909,14 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the MIPS Technologies, Inc., nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54033,7 +56927,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz +Copyright (c) 2013 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54044,61 +56938,44 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Steven G. Kargl -All rights reserved. +Copyright (c) 2013 Antoine Jacoutot -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2007 The NetBSD Foundation, Inc. +Copyright (c) 2013 The NetBSD Foundation, Inc. All rights reserved. -This code is derived from software written by Stephen L. Moshier. -It is redistributed by the NetBSD Foundation by permission of the author. +This code is derived from software contributed to The NetBSD Foundation +by Christos Zoulas. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54123,78 +57000,150 @@ POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 Todd C. Miller +Copyright (c) 2013, Linaro Limited + All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. +Johnny Qiu +Shu Zhang -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -The MIT License: +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +------------------------------------------------------------------- -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Copyright (c) 2013-2015, Linaro Limited + All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ------------------------------------------------------------------- -Copyright (c) 2007-2008 Michael G Schwern +Copyright (c) 2014, Intel Corporation +All rights reserved. -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The MIT License: + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project +------------------------------------------------------------------- + +Copyright (c) 2014, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz +Copyright (c) 2015 ARM Ltd All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54205,50 +57154,54 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007-2013 Bruce D. Evans +Copyright (c) 2015 Joerg Sonnenberger . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 David Schultz -All rights reserved. - +Copyright (c) 2015 Nuxi, https://nuxi.nl/ + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -54272,61 +57225,68 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2017 ARM Ltd +All rights reserved. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the company may not be used to endorse or promote + products derived from this software without specific prior written + permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2008 Todd C. Miller - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Copyright (c) 2017 Imagination Technologies. -------------------------------------------------------------------- +All rights reserved. -Copyright (c) 2008, Damien Miller +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with + the distribution. + * Neither the name of Imagination Technologies nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz -All rights reserved. - -Copyright (c) 2011 The FreeBSD Foundation +Copyright (c)1999 Citrus Project, All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54351,7 +57311,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 David Schultz +Copyright (c)2001 Citrus Project, All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54377,10 +57337,8 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. +Copyright (c)2003 Citrus Project, +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54391,28 +57349,67 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2009-2013 Steven G. Kargl +Copyright 1989 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + +------------------------------------------------------------------- + +Copyright 1997 Niels Provos +Copyright 2008 Damien Miller All rights reserved. +Theo de Raadt came up with the idea of using +such a mathematical system to generate more random (yet non-repeating) +ids to solve the resolver/named problem. But Niels designed the +actual system based on the constraints. + +Later modified by Damien Miller to wrap the LCG output in a 15-bit +permutation generator based on a Luby-Rackoff block cipher. This +ensures the output is non-repeating and preserves the MSB twiddle +trick, but makes it more resistant to LCG prediction. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. @@ -54428,114 +57425,82 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Optimized by Bruce D. Evans. - ------------------------------------------------------------------- -Copyright (c) 2010 The NetBSD Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. +From: @(#)s_ilogb.c 5.1 93/09/24 +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. ------------------------------------------------------------------- -Copyright (c) 2010 Todd C. Miller +Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") +Portions Copyright (C) 1996-2003 Internet Software Consortium. -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +Portions Copyright (c) 1993 by Digital Equipment Corporation. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. ------------------------------------------------------------------- -Copyright (c) 2010, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. +Portions Copyright (c) 1995 by International Business Machines, Inc. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +International Business Machines, Inc. (hereinafter called IBM) grants +permission under its copyrights to use, copy, modify, and distribute this +Software with or without fee, provided that the above copyright notice and +all paragraphs of this notice appear in all copies, and that the name of IBM +not be used in connection with the marketing of any product incorporating +the Software or modifications thereof, without specific, written prior +permission. - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +To the extent it has a right to do so, IBM grants an immunity from suit +under its patents, if any, for the use, sale or manufacture of products to +the extent that such products are used for performing Domain Name System +dynamic updates in TCP/IP networks by means of the Software. No immunity is +granted for any product per se or for any other function of any product. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, +DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN +IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. ------------------------------------------------------------------- -Copyright (c) 2011 David Chisnall -All rights reserved. +Portions Copyright(C) 1995, Jason Downs. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54546,21 +57511,23 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54586,34 +57553,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2011 Ed Schouten - David Chisnall +Copyright (c) 2004 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54635,173 +57577,13 @@ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Martin Pieuchot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, VMware, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012 Stephen Montgomery-Smith +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 Stefan Farfeleder All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54813,10 +57595,10 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54827,92 +57609,10 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 - MIPS Technologies, Inc., California. +Copyright (c) 2004-2005 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -54922,14 +57622,11 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -54940,56 +57637,39 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013 Antoine Jacoutot - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013 The NetBSD Foundation, Inc. +Copyright (c) 2005 David Schultz All rights reserved. -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -54999,164 +57679,79 @@ are met: notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. -Johnny Qiu -Shu Zhang +Copyright (c) 2005-2008 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2013-2015, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2014, Intel Corporation +Copyright (c) 2005-2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD -Copyright (c) 2015 ARM Ltd +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55167,53 +57762,53 @@ are met: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Joerg Sonnenberger . +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2015 Nuxi, https://nuxi.nl/ +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -55236,69 +57831,76 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + ------------------------------------------------------------------- -Copyright (c) 2017 ARM Ltd +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice unmodified, this list of conditions, and the following + disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2017 Imagination Technologies. +SPDX-License-Identifier: BSD-2-Clause-FreeBSD +Copyright (c) 2007-2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of Imagination Technologies nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)1999 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55324,7 +57926,37 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2001 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55350,7 +57982,9 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c)2003 Citrus Project, +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith All rights reserved. Redistribution and use in source and binary forms, with or without @@ -55376,56 +58010,22 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright 1989 The Regents of the University of California. - All rights reserved. +SPDX-License-Identifier: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos -Copyright 2008 Damien Miller +Copyright (c) 2003 Dag-Erling Smørgrav All rights reserved. -Theo de Raadt came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer + in this position and unchanged. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -55440,104 +58040,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -From: @(#)s_ilogb.c 5.1 93/09/24 -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- - -Portions Copyright(C) 1995, Jason Downs. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - The author of this software is David M. Gay. Copyright (C) 1998 by Lucent Technologies @@ -55832,6 +58334,33 @@ Optimized by Bruce D. Evans. ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinf.c and k_cosf.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +s_sin.c and s_cos.c merged by Steven G. Kargl. Descriptions of the +algorithms are contained in the original files. + +------------------------------------------------------------------- + +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice @@ -55852,6 +58381,19 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sin.c and k_cos.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. @@ -55877,6 +58419,20 @@ Optimized by Bruce D. Evans. ------------------------------------------------------------------- +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans. + +Developed at SunSoft, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. +==================================================== + +k_sinl.c and k_cosl.c merged by Steven G. Kargl + +------------------------------------------------------------------- + ==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2009-2011, Bruce D. Evans, Steven G. Kargl, David Schultz. @@ -56104,108 +58660,7 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (C) 2008 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2009 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2010 The Android Open Source Project +Copyright (C) 2008 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -56221,7 +58676,64 @@ limitations under the License. ------------------------------------------------------------------- -Copyright (C) 2010 The Android Open Source Project +Copyright (C) 2008 The Android Open Source Project +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (C) 2008 The Android Open Source Project +All rights reserved. +Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +Copyright (C) 2009 The Android Open Source Project All rights reserved. Redistribution and use in source and binary forms, with or without @@ -56249,28 +58761,46 @@ SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (C) 2010 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------- + Copyright (C) 2010 The Android Open Source Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- @@ -58769,6 +61299,35 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- +Copyright (c) 1997 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Neil A. Carson and Mark Brinicombe + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + Copyright (c) 1997 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -59481,34 +62040,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2003 Dag-Erling Smørgrav -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer - in this position and unchanged. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2003 David Schultz All rights reserved. @@ -59634,32 +62165,6 @@ Materiel Command, USAF, under agreement number F39502-99-1-0512. ------------------------------------------------------------------- -Copyright (c) 2003, Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 David Schultz All rights reserved. @@ -59686,32 +62191,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004 Stefan Farfeleder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995,1999 by Internet Software Consortium. @@ -59891,85 +62370,33 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2004-2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2004-2005 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005 David Schultz +Copyright (c) 2004-2005 David Schultz All rights reserved. Redistribution and use in source and binary forms, with or without @@ -60064,32 +62491,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2005-2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 David Schultz All rights reserved. @@ -60116,93 +62517,6 @@ SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2007 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Derived from s_modf.c, which has the following Copyright: -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Copyright (c) 2007 Steven G. Kargl -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007 The NetBSD Foundation, Inc. All rights reserved. @@ -60248,6 +62562,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ------------------------------------------------------------------- +Copyright (c) 2007, 2010-2013 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +s_sinl.c and s_cosl.c merged by Steven G. Kargl. + +------------------------------------------------------------------- + Copyright (c) 2007-2008 Michael G Schwern This software originally derived from Paul Sheer's pivotal_gmtime_r.c. @@ -60303,32 +62645,6 @@ Modified for Bionic by the Android Open Source Project ------------------------------------------------------------------- -Copyright (c) 2007-2008 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - Copyright (c) 2007-2013 Bruce D. Evans All rights reserved. @@ -60627,75 +62943,23 @@ modification, are permitted provided that the following conditions are met: * and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Chisnall -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Schultz -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice unmodified, this list of conditions, and the following - disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- -Copyright (c) 2011 David Schultz +Copyright (c) 2011 David Chisnall All rights reserved. Redistribution and use in source and binary forms, with or without @@ -60911,6 +63175,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- Copyright (c) 2012 Stephen Montgomery-Smith +Copyright (c) 2017 Mahdi Mokhtari All rights reserved. Redistribution and use in source and binary forms, with or without @@ -61647,6 +63912,521 @@ SUCH DAMAGE. ------------------------------------------------------------------- +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2003, Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004 Stefan Farfeleder +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2004-2005 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2005-2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +Derived from s_modf.c, which has the following Copyright: +==================================================== +Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007 Steven G. Kargl +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2007-2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2008 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice unmodified, this list of conditions, and the following + disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2011 David Schultz +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-2-Clause-FreeBSD + +Copyright (c) 2012 Stephen Montgomery-Smith +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +------------------------------------------------------------------- + +SPDX-License-Identifier: BSD-3-Clause + +Copyright (c) 2003 Dag-Erling Smørgrav +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + The author of this software is David M. Gay. Copyright (C) 1998 by Lucent Technologies diff --git a/sysroot/repo.prop b/sysroot/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/sysroot/repo.prop +++ b/sysroot/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1 diff --git a/sysroot/usr/include/aaudio/AAudio.h b/sysroot/usr/include/aaudio/AAudio.h index 2207cb8c0659604d36c903de71348439de3de238..5b29419535c11455face2b6f1acc52cfc8d7ba8d 100644 --- a/sysroot/usr/include/aaudio/AAudio.h +++ b/sysroot/usr/include/aaudio/AAudio.h @@ -44,7 +44,15 @@ extern "C" { #define AAUDIO_UNSPECIFIED 0 enum { + /** + * Audio data will travel out of the device, for example through a speaker. + */ AAUDIO_DIRECTION_OUTPUT, + + + /** + * Audio data will travel into the device, for example from a microphone. + */ AAUDIO_DIRECTION_INPUT }; typedef int32_t aaudio_direction_t; @@ -52,33 +60,112 @@ typedef int32_t aaudio_direction_t; enum { AAUDIO_FORMAT_INVALID = -1, AAUDIO_FORMAT_UNSPECIFIED = 0, + + /** + * This format uses the int16_t data type. + * The maximum range of the data is -32768 to 32767. + */ AAUDIO_FORMAT_PCM_I16, + + /** + * This format uses the float data type. + * The nominal range of the data is [-1.0f, 1.0f). + * Values outside that range may be clipped. + * + * See also 'floatData' at + * https://developer.android.com/reference/android/media/AudioTrack#write(float[],%20int,%20int,%20int) + */ AAUDIO_FORMAT_PCM_FLOAT }; typedef int32_t aaudio_format_t; +/** + * These result codes are returned from AAudio functions to indicate success or failure. + * Note that error return codes may change in the future so applications should generally + * not rely on specific return codes. + */ enum { + /** + * The call was successful. + */ AAUDIO_OK, AAUDIO_ERROR_BASE = -900, // TODO review + + /** + * The audio device was disconnected. This could occur, for example, when headphones + * are plugged in or unplugged. The stream cannot be used after the device is disconnected. + * Applications should stop and close the stream. + * If this error is received in an error callback then another thread should be + * used to stop and close the stream. + */ AAUDIO_ERROR_DISCONNECTED, + + /** + * An invalid parameter was passed to AAudio. + */ AAUDIO_ERROR_ILLEGAL_ARGUMENT, // reserved AAUDIO_ERROR_INTERNAL = AAUDIO_ERROR_ILLEGAL_ARGUMENT + 2, + + /** + * The requested operation is not appropriate for the current state of AAudio. + */ AAUDIO_ERROR_INVALID_STATE, // reserved // reserved + /* The server rejected the handle used to identify the stream. + */ AAUDIO_ERROR_INVALID_HANDLE = AAUDIO_ERROR_INVALID_STATE + 3, // reserved + + /** + * The function is not implemented for this stream. + */ AAUDIO_ERROR_UNIMPLEMENTED = AAUDIO_ERROR_INVALID_HANDLE + 2, + + /** + * A resource or information is unavailable. + * This could occur when an application tries to open too many streams, + * or a timestamp is not available. + */ AAUDIO_ERROR_UNAVAILABLE, AAUDIO_ERROR_NO_FREE_HANDLES, + + /** + * Memory could not be allocated. + */ AAUDIO_ERROR_NO_MEMORY, + + /** + * A NULL pointer was passed to AAudio. + * Or a NULL pointer was detected internally. + */ AAUDIO_ERROR_NULL, + + /** + * An operation took longer than expected. + */ AAUDIO_ERROR_TIMEOUT, AAUDIO_ERROR_WOULD_BLOCK, + + /** + * The requested data format is not supported. + */ AAUDIO_ERROR_INVALID_FORMAT, + + /** + * A requested was out of range. + */ AAUDIO_ERROR_OUT_OF_RANGE, + + /** + * The audio service was not available. + */ AAUDIO_ERROR_NO_SERVICE, + + /** + * The requested sample rate was not supported. + */ AAUDIO_ERROR_INVALID_RATE }; typedef int32_t aaudio_result_t; @@ -126,15 +213,15 @@ enum { AAUDIO_PERFORMANCE_MODE_NONE = 10, /** - * Extending battery life is most important. + * Extending battery life is more important than low latency. * * This mode is not supported in input streams. - * Mode NONE will be used if this is requested. + * For input, mode NONE will be used if this is requested. */ AAUDIO_PERFORMANCE_MODE_POWER_SAVING, /** - * Reducing latency is most important. + * Reducing latency is more important than battery life. */ AAUDIO_PERFORMANCE_MODE_LOW_LATENCY }; @@ -289,6 +376,11 @@ enum { }; typedef int32_t aaudio_input_preset_t; +/** + * These may be used with AAudioStreamBuilder_setSessionId(). + * + * Added in API level 28. + */ enum { /** * Do not allocate a session ID. @@ -302,7 +394,7 @@ enum { /** * Allocate a session ID that can be used to attach and control * effects using the Java AudioEffects API. - * Note that the use of this flag may result in higher latency. + * Note that using this may result in higher latency. * * Note that this matches the value of AudioManager.AUDIO_SESSION_ID_GENERATE. * @@ -474,8 +566,14 @@ AAUDIO_API void AAudioStreamBuilder_setBufferCapacityInFrames(AAudioStreamBuilde /** * Set the requested performance mode. * + * Supported modes are AAUDIO_PERFORMANCE_MODE_NONE, AAUDIO_PERFORMANCE_MODE_POWER_SAVING + * and AAUDIO_PERFORMANCE_MODE_LOW_LATENCY. + * * The default, if you do not call this function, is AAUDIO_PERFORMANCE_MODE_NONE. * + * You may not get the mode you requested. + * You can call AAudioStream_getPerformanceMode() to find out the final mode for the stream. + * * @param builder reference provided by AAudio_createStreamBuilder() * @param mode the desired performance mode, eg. AAUDIO_PERFORMANCE_MODE_LOW_LATENCY */ @@ -550,10 +648,12 @@ AAUDIO_API void AAudioStreamBuilder_setInputPreset(AAudioStreamBuilder* builder, * and then used with this function when opening another stream. * This allows effects to be shared between streams. * - * Session IDs from AAudio can be used the Android Java APIs and vice versa. + * Session IDs from AAudio can be used with the Android Java APIs and vice versa. * So a session ID from an AAudio stream can be passed to Java * and effects applied using the Java AudioEffect API. * + * Note that allocating or setting a session ID may result in a stream with higher latency. + * * Allocated session IDs will always be positive and nonzero. * * Added in API level 28. @@ -612,6 +712,14 @@ typedef int32_t aaudio_data_callback_result_t; *
  • use any mutexes or other synchronization primitives
  • *
  • sleep
  • *
  • stop or close the stream
  • + *
  • AAudioStream_read()
  • + *
  • AAudioStream_write()
  • + * + * + * The following are OK to call from the data callback: + *
      + *
    • AAudioStream_get*()
    • + *
    • AAudio_convertResultToText()
    • *
    * * If you need to move data, eg. MIDI commands, in or out of the callback function then @@ -685,6 +793,22 @@ AAUDIO_API void AAudioStreamBuilder_setFramesPerDataCallback(AAudioStreamBuilder * Prototype for the callback function that is passed to * AAudioStreamBuilder_setErrorCallback(). * + * The following may NOT be called from the error callback: + *
      + *
    • AAudioStream_requestStop()
    • + *
    • AAudioStream_requestPause()
    • + *
    • AAudioStream_close()
    • + *
    • AAudioStream_waitForStateChange()
    • + *
    • AAudioStream_read()
    • + *
    • AAudioStream_write()
    • + *
    + * + * The following are OK to call from the error callback: + *
      + *
    • AAudioStream_get*()
    • + *
    • AAudio_convertResultToText()
    • + *
    + * * @param stream reference provided by AAudioStreamBuilder_openStream() * @param userData the same address that was passed to AAudioStreamBuilder_setErrorCallback() * @param error an AAUDIO_ERROR_* value. @@ -856,6 +980,8 @@ AAUDIO_API aaudio_result_t AAudioStream_waitForStateChange(AAudioStream* stream, * * This call is "strong non-blocking" unless it has to wait for data. * + * If the call times out then zero or a partial frame count will be returned. + * * @param stream A stream created using AAudioStreamBuilder_openStream(). * @param buffer The address of the first sample. * @param numFrames Number of frames to read. Only complete frames will be written. @@ -879,6 +1005,8 @@ AAUDIO_API aaudio_result_t AAudioStream_read(AAudioStream* stream, * * This call is "strong non-blocking" unless it has to wait for room in the buffer. * + * If the call times out then zero or a partial frame count will be returned. + * * @param stream A stream created using AAudioStreamBuilder_openStream(). * @param buffer The address of the first sample. * @param numFrames Number of frames to write. Only complete frames will be written. @@ -903,7 +1031,8 @@ AAUDIO_API aaudio_result_t AAudioStream_write(AAudioStream* stream, * This cannot be set higher than AAudioStream_getBufferCapacityInFrames(). * * Note that you will probably not get the exact size you request. - * Call AAudioStream_getBufferSizeInFrames() to see what the actual final size is. + * You can check the return value or call AAudioStream_getBufferSizeInFrames() + * to see what the actual final size is. * * @param stream reference provided by AAudioStreamBuilder_openStream() * @param numFrames requested number of frames that can be filled without blocking @@ -1038,7 +1167,8 @@ AAUDIO_API aaudio_direction_t AAudioStream_getDirection(AAudioStream* stream); /** * Passes back the number of frames that have been written since the stream was created. - * For an output stream, this will be advanced by the application calling write(). + * For an output stream, this will be advanced by the application calling write() + * or by a data callback. * For an input stream, this will be advanced by the endpoint. * * The frame position is monotonically increasing. @@ -1051,7 +1181,8 @@ AAUDIO_API int64_t AAudioStream_getFramesWritten(AAudioStream* stream); /** * Passes back the number of frames that have been read since the stream was created. * For an output stream, this will be advanced by the endpoint. - * For an input stream, this will be advanced by the application calling read(). + * For an input stream, this will be advanced by the application calling read() + * or by a data callback. * * The frame position is monotonically increasing. * diff --git a/sysroot/usr/include/android/NeuralNetworks.h b/sysroot/usr/include/android/NeuralNetworks.h index e0d09ae24c2219901d4a8ebaa76216101a691984..834c8c6927a979a23017b3ebc43768b32a29730f 100644 --- a/sysroot/usr/include/android/NeuralNetworks.h +++ b/sysroot/usr/include/android/NeuralNetworks.h @@ -1409,8 +1409,7 @@ typedef enum { */ ANEURALNETWORKS_TANH = 28, -// TODO: change to __ANDROID_API__ >= __ANDROID_API_P__ once available. -#if __ANDROID_API__ > __ANDROID_API_O_MR1__ +#if __ANDROID_API__ >= __ANDROID_API_P__ // TODO: make the description easier to understand. /** * BatchToSpace for N-dimensional tensors. @@ -1702,7 +1701,7 @@ typedef enum { * * 0: A tensor of the same {@link OperandCode} as input0. */ ANEURALNETWORKS_TRANSPOSE = 37, -#endif +#endif // __ANDROID_API__ >= __ANDROID_API_P__ } OperationCode; /** @@ -1911,11 +1910,48 @@ typedef struct ANeuralNetworksExecution ANeuralNetworksExecution; /** * ANeuralNetworksOperandType describes the type of an operand. * This structure is used to describe both scalars and tensors. + * + * A tensor operand type must have a specified rank (number of + * dimensions) but may have any of its dimensions unspecified. + * + * A tensor operand type with all dimensions specified is "fully + * specified". Whenever possible (i.e., whenever the dimensions are + * known at model construction time), a tensor operand type should be + * (but is not required to be) fully specified, in order to enable the + * best possible performance. + * + * If a tensor operand's type is not fully specified, the dimensions + * of the operand are deduced from the operand types and values of the + * operation for which that operand is an output. + * + *

    In the following situations, a tensor operand type must be fully + * specified:

      + *
    • The operand has a constant value, set by + * {@link ANeuralNetworksModel_setOperandValue} (with a + * non-nullptr buffer) or + * {@link ANeuralNetworksModel_setOperandValueFromMemory}.
    • + *
    • The operand is a model input or model output (see + * {@link ANeuralNetworksModel_identifyInputsAndOutputs}). A + * fully specified tensor operand type must either be provided + * to {@link ANeuralNetworksModel_addOperand}; or it must be + * provided to the corresponding + * {@link ANeuralNetworksExecution_setInput}, + * {@link ANeuralNetworksExecution_setInputFromMemory}, + * {@link ANeuralNetworksExecution_setOutput}, or + * {@link ANeuralNetworksModel_setOperandValueFromMemory}. + * EXCEPTION: If the input or output is optional and omitted + * (by passing nullptr for buffer to + * {@link ANeuralNetworksExecution_setInput} or + * {@link ANeuralNetworksExecution_setOutput}) then it need + * not have a fully specified tensor operand type.
    + * + * A tensor operand type with some number of unspecified dimensions is + * represented by setting each unspecified dimension to 0. */ typedef struct ANeuralNetworksOperandType { /** The data type, e.g ANEURALNETWORKS_INT8. */ int32_t type; - /** The number of dimensions. It should be 0 for scalars. */ + /** The number of dimensions (rank). It should be 0 for scalars. */ uint32_t dimensionCount; /** The dimensions of the tensor. It should be nullptr for scalars. */ const uint32_t* dimensions; @@ -2037,10 +2073,11 @@ int ANeuralNetworksModel_finish(ANeuralNetworksModel* model); * {@link ANeuralNetworksExecution_setOutputFromMemory} and * {@link ANeuralNetworksExecution_setOperandValue}. * - * To build a model that can accomodate inputs of various sizes, as you may want - * to do for a CNN, set the size of the dimensions that will vary at run time to 0. - * If you do so, provide the full dimensions when calling - * {@link ANeuralNetworksExecution_setInput} or {@link ANeuralNetworksExecution_setInputFromMemory}. + * To build a model that can accommodate inputs of various sizes, as + * you may want to do for a CNN, leave unspecified the dimensions that + * will vary at run time. If you do so, fully specify dimensions + * when calling {@link ANeuralNetworksExecution_setInput} or + * {@link ANeuralNetworksExecution_setInputFromMemory}. * * Attempting to modify a model once {@link ANeuralNetworksModel_finish} has been * called will return an error. @@ -2171,6 +2208,7 @@ int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, u const uint32_t* inputs, uint32_t outputCount, const uint32_t* outputs); +#if __ANDROID_API__ >= __ANDROID_API_P__ /** * Specifies whether {@link ANEURALNETWORKS_TENSOR_FLOAT32} is allowed to be * calculated with range and/or precision as low as that of the IEEE 754 16-bit @@ -2192,6 +2230,7 @@ int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, u * See {@link ANeuralNetworksModel} for information on multithreaded usage. */ int ANeuralNetworksModel_relaxComputationFloat32toFloat16(ANeuralNetworksModel* model, bool allow); +#endif // __ANDROID_API__ >= __ANDROID_API_P__ /** * Create a {@link ANeuralNetworksCompilation} to compile the given model. @@ -2318,12 +2357,16 @@ void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution); * @param index The index of the input argument we are setting. It is * an index into the lists passed to * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not - * the index associated with {@link ANeuralNetworksModel_addOperand}. - * @param type The {@link ANeuralNetworksOperandType} of the operand. This should - * be used to specify the dimensions that were set to 0 when the - * operand was added to the model. All other properties of the type - * must be the same as specified in the model. If the type is the - * same as specified when the model was built, NULL can be passed. + * the index associated with + * {@link ANeuralNetworksModel_addOperand}. + * @param type The {@link ANeuralNetworksOperandType} of the + * operand. Unless the input is omitted, this should be + * used to specify the dimensions that were left + * unspecified when the operand was added to the + * model. All other properties of the type must be the + * same as specified in the model. If the type is the same + * as specified when the model was built, NULL can be + * passed. * @param buffer The buffer containing the data. * @param length The length in bytes of the buffer. * @@ -2351,11 +2394,13 @@ int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32 * an index into the lists passed to * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not * the index associated with {@link ANeuralNetworksModel_addOperand}. - * @param type The {@link ANeuralNetworksOperandType} of the operand. This can be - * used to specify the dimensions that were set to 0 when the operand - * was added to the model. All other values must be the same as - * specified in the model. If the type is the same as specified when - * the model was built, NULL can be passed. + * @param type The {@link ANeuralNetworksOperandType} of the + * operand. This should be used to specify the dimensions + * that were left unspecified when the operand was added + * to the model. All other properties of the type must be + * the same as specified in the model. If the type is the + * same as specified when the model was built, NULL can be + * passed. * @param memory The memory containing the data. * @param offset This specifies the location of the data within the memory. * The offset is in bytes from the start of memory. @@ -2385,11 +2430,14 @@ int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execut * an index into the lists passed to * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not * the index associated with {@link ANeuralNetworksModel_addOperand}. - * @param type The {@link ANeuralNetworksOperandType} of the operand. This can be - * used to specify the dimensions that were set to 0 when the operand - * was added to the model. All other values must be the same as - * specified in the model. If the type is the same as specified when - * the model was built, NULL can be passed. + * @param type The {@link ANeuralNetworksOperandType} of the + * operand. Unless the output is omitted, this should be + * used to specify the dimensions that were left + * unspecified when the operand was added to the + * model. All other properties of the type must be the + * same as specified in the model. If the type is the same + * as specified when the model was built, NULL can be + * passed. * @param buffer The buffer where the data is to be written. * @param length The length in bytes of the buffer. * @@ -2417,11 +2465,13 @@ int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int3 * an index into the lists passed to * {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not * the index associated with {@link ANeuralNetworksModel_addOperand}. - * @param type The {@link ANeuralNetworksOperandType} of the operand. This can be - * used to specify the dimensions that were set to 0 when the operand - * was added to the model. All other values must be the same as - * specified in the model. If the type is the same as specified when - * the model was built, NULL can be passed. + * @param type The {@link ANeuralNetworksOperandType} of the operand. This should be + * used to specify the dimensions that were left + * unspecified when the operand was added to the + * model. All other properties of the type must be the + * same as specified in the model. If the type is the same + * as specified when the model was built, NULL can be + * passed. * @param memory The memory where the data is to be stored. * @param offset This specifies the location of the data within the memory. * The offset is in bytes from the start of memory. @@ -2484,7 +2534,7 @@ void ANeuralNetworksEvent_free(ANeuralNetworksEvent* event); __END_DECLS -#endif // __ANDROID_API__ >= 27 +#endif // __ANDROID_API__ >= __ANDROID_API_O_MR1__ #endif // ANDROID_ML_NN_RUNTIME_NEURAL_NETWORKS_H diff --git a/sysroot/usr/include/android/hardware_buffer_jni.h b/sysroot/usr/include/android/hardware_buffer_jni.h index 60208701b69f24da2fd7d911ceed8946791abaae..7c4be24dbdbc3b24cf5a4efc24510a36220e198f 100644 --- a/sysroot/usr/include/android/hardware_buffer_jni.h +++ b/sysroot/usr/include/android/hardware_buffer_jni.h @@ -31,9 +31,11 @@ __BEGIN_DECLS /** * Return the AHardwareBuffer associated with a Java HardwareBuffer object, - * for interacting with it through native code. This acquires a reference - * on the AHardwareBuffer that is returned; be sure to use - * AHardwareBuffer_release() when done with it so that it doesn't leak. + * for interacting with it through native code. This method does not acquire any + * additional reference to the AHardwareBuffer that is returned. To keep the + * AHardwareBuffer live after the Java HardwareBuffer object got garbage + * collected, be sure to use AHardwareBuffer_acquire() to acquire an additional + * reference. */ AHardwareBuffer* AHardwareBuffer_fromHardwareBuffer(JNIEnv* env, jobject hardwareBufferObj); diff --git a/sysroot/usr/include/android/ndk-version.h b/sysroot/usr/include/android/ndk-version.h index b31fbd3caf016e80793d5779f9094cdf3fb31890..e0d450999ff51ec7e1892db9c6a56fdf5cf75efc 100644 --- a/sysroot/usr/include/android/ndk-version.h +++ b/sysroot/usr/include/android/ndk-version.h @@ -13,7 +13,7 @@ * * For example: 0 for r16 and 1 for r16b. */ -#define __NDK_MINOR__ 0 +#define __NDK_MINOR__ 1 /** * Set to 0 if this is a release build, or 1 for beta 1, @@ -26,7 +26,7 @@ * * For a local development build of the NDK, this is -1. */ -#define __NDK_BUILD__ 4754217 +#define __NDK_BUILD__ 4828580 /** * Set to 1 if this is a canary build, 0 if not. diff --git a/sysroot/usr/include/camera/NdkCameraMetadataTags.h b/sysroot/usr/include/camera/NdkCameraMetadataTags.h index ee3e98ef2ba68bee14dbaa862de98296f41b2e62..3010646afce4b893f7eec72d2dcc20107f152aad 100644 --- a/sysroot/usr/include/camera/NdkCameraMetadataTags.h +++ b/sysroot/usr/include/camera/NdkCameraMetadataTags.h @@ -7050,6 +7050,10 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { /** *

    The camera device is a logical camera backed by two or more physical cameras that are * also exposed to the application.

    + *

    Camera application shouldn't assume that there are at most 1 rear camera and 1 front + * camera in the system. For an application that switches between front and back cameras, + * the recommendation is to switch between the first rear camera and the first front + * camera in the list of supported camera devices.

    *

    This capability requires the camera device to support the following:

    *
      *
    • This camera device must list the following static metadata entries in CameraCharacteristics:
        diff --git a/sysroot/usr/include/fts.h b/sysroot/usr/include/fts.h index 8633c80aa70de5ed72eeb7de0e798807a33210af..de829dc84e91be9ec3daf4b2ba46ef6331278218 100644 --- a/sysroot/usr/include/fts.h +++ b/sysroot/usr/include/fts.h @@ -58,8 +58,9 @@ typedef struct { #define FTS_XDEV 0x0040 /* don't cross devices */ #define FTS_OPTIONMASK 0x00ff /* valid user option mask */ -#define FTS_NAMEONLY 0x1000 /* (private) child names only */ -#define FTS_STOP 0x2000 /* (private) unrecoverable error */ +#define FTS_NAMEONLY 0x1000 /* (private) child names only */ +#define FTS_STOP 0x2000 /* (private) unrecoverable error */ +#define FTS_FOR_FTW 0x4000 /* (private) fts is being called by ftw/nftw */ int fts_options; /* fts_open options, global flags */ } FTS; diff --git a/sysroot/usr/include/pthread.h b/sysroot/usr/include/pthread.h index 0505da6cd563b143e48299e39e834b0e9947f27c..152ae2aea969072685920a32c97e02bf099e80a0 100644 --- a/sysroot/usr/include/pthread.h +++ b/sysroot/usr/include/pthread.h @@ -97,7 +97,11 @@ int pthread_atfork(void (*__prepare)(void), void (*__parent)(void), void (*__chi int pthread_attr_destroy(pthread_attr_t* __attr); int pthread_attr_getdetachstate(const pthread_attr_t* __attr, int* __state); int pthread_attr_getguardsize(const pthread_attr_t* __attr, size_t* __size); -int pthread_attr_getinheritsched(const pthread_attr_t* __attr, int* __flag); + +#if __ANDROID_API__ >= 28 +int pthread_attr_getinheritsched(const pthread_attr_t* __attr, int* __flag) __INTRODUCED_IN(28); +#endif /* __ANDROID_API__ >= 28 */ + int pthread_attr_getschedparam(const pthread_attr_t* __attr, struct sched_param* __param); int pthread_attr_getschedpolicy(const pthread_attr_t* __attr, int* __policy); int pthread_attr_getscope(const pthread_attr_t* __attr, int* __scope); @@ -106,7 +110,11 @@ int pthread_attr_getstacksize(const pthread_attr_t* __attr, size_t* __size); int pthread_attr_init(pthread_attr_t* __attr); int pthread_attr_setdetachstate(pthread_attr_t* __attr, int __state); int pthread_attr_setguardsize(pthread_attr_t* __attr, size_t __size); -int pthread_attr_setinheritsched(pthread_attr_t* __attr, int __flag); + +#if __ANDROID_API__ >= 28 +int pthread_attr_setinheritsched(pthread_attr_t* __attr, int __flag) __INTRODUCED_IN(28); +#endif /* __ANDROID_API__ >= 28 */ + int pthread_attr_setschedparam(pthread_attr_t* __attr, const struct sched_param* __param); int pthread_attr_setschedpolicy(pthread_attr_t* __attr, int __policy); int pthread_attr_setscope(pthread_attr_t* __attr, int __scope); diff --git a/sysroot/usr/include/vulkan/vulkan_core.h b/sysroot/usr/include/vulkan/vulkan_core.h index ed0d596f67d7438fa32de9158bd7e309ded9cb10..a28661f45304b86c89e6e925efdff0f982640380 100644 --- a/sysroot/usr/include/vulkan/vulkan_core.h +++ b/sysroot/usr/include/vulkan/vulkan_core.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 72 +#define VK_HEADER_VERSION 76 #define VK_NULL_HANDLE 0 @@ -350,6 +350,11 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, + VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, + VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, @@ -2715,6 +2720,16 @@ typedef struct VkDrawIndirectCommand { uint32_t firstInstance; } VkDrawIndirectCommand; +typedef struct VkBaseOutStructure { + VkStructureType sType; + struct VkBaseOutStructure* pNext; +} VkBaseOutStructure; + +typedef struct VkBaseInStructure { + VkStructureType sType; + const struct VkBaseInStructure* pNext; +} VkBaseInStructure; + typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); @@ -5572,6 +5587,70 @@ typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerF +#define VK_KHR_get_display_properties2 1 +#define VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION 1 +#define VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_display_properties2" + +typedef struct VkDisplayProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPropertiesKHR displayProperties; +} VkDisplayProperties2KHR; + +typedef struct VkDisplayPlaneProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPlanePropertiesKHR displayPlaneProperties; +} VkDisplayPlaneProperties2KHR; + +typedef struct VkDisplayModeProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayModePropertiesKHR displayModeProperties; +} VkDisplayModeProperties2KHR; + +typedef struct VkDisplayPlaneInfo2KHR { + VkStructureType sType; + const void* pNext; + VkDisplayModeKHR mode; + uint32_t planeIndex; +} VkDisplayPlaneInfo2KHR; + +typedef struct VkDisplayPlaneCapabilities2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPlaneCapabilitiesKHR capabilities; +} VkDisplayPlaneCapabilities2KHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModeProperties2KHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayProperties2KHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModeProperties2KHR( + VkPhysicalDevice physicalDevice, + VkDisplayKHR display, + uint32_t* pPropertyCount, + VkDisplayModeProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR( + VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities); +#endif + #define VK_KHR_dedicated_allocation 1 #define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 #define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" @@ -5727,6 +5806,33 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR( VkDescriptorSetLayoutSupport* pSupport); #endif +#define VK_KHR_draw_indirect_count 1 +#define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 +#define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count" + +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountKHR( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); +#endif + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) diff --git a/sysroot/usr/lib/aarch64-linux-android/libc.a b/sysroot/usr/lib/aarch64-linux-android/libc.a index 518232d036327ec9bfb98a0651e93e4f987cfd79..5fccc505efeea7a9fe213ab7775b14008b5816ca 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libc.a and b/sysroot/usr/lib/aarch64-linux-android/libc.a differ diff --git a/sysroot/usr/lib/aarch64-linux-android/libcompiler_rt-extras.a b/sysroot/usr/lib/aarch64-linux-android/libcompiler_rt-extras.a index d81e4ec0dbcdc18beb5bd23fea33a507c506e501..2ea18f38f9ab41c62156d1551450f1773d16ad86 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libcompiler_rt-extras.a and b/sysroot/usr/lib/aarch64-linux-android/libcompiler_rt-extras.a differ diff --git a/sysroot/usr/lib/aarch64-linux-android/libdl.a b/sysroot/usr/lib/aarch64-linux-android/libdl.a index a7df2dd3d2d344f48f5bd6eaea38be8f3ef4d3ef..526b94d017e144be822c63994939af9a1dda1c81 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libdl.a and b/sysroot/usr/lib/aarch64-linux-android/libdl.a differ diff --git a/sysroot/usr/lib/aarch64-linux-android/libm.a b/sysroot/usr/lib/aarch64-linux-android/libm.a index 9fa2727fd2886e4d8e54a0ca226c6004f0f32de2..a4630d7b6dc8aa12b706d0f86ca90aef79c429ac 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libm.a and b/sysroot/usr/lib/aarch64-linux-android/libm.a differ diff --git a/sysroot/usr/lib/aarch64-linux-android/libstdc++.a b/sysroot/usr/lib/aarch64-linux-android/libstdc++.a index 21e012225773a7ff6cac4a0f238a06cb62de8e8c..19e350d62fb2d40bbcb6bb5f97f795015990854a 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libstdc++.a and b/sysroot/usr/lib/aarch64-linux-android/libstdc++.a differ diff --git a/sysroot/usr/lib/aarch64-linux-android/libz.a b/sysroot/usr/lib/aarch64-linux-android/libz.a index 773df1be92d2a738d6f0876a9d905bae6eff07c6..b380ed0094790c2c19a065fa6b4fe4b12f9caf04 100644 Binary files a/sysroot/usr/lib/aarch64-linux-android/libz.a and b/sysroot/usr/lib/aarch64-linux-android/libz.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libc.a b/sysroot/usr/lib/arm-linux-androideabi/libc.a index 90995aac5340605e14b9dbc1d531fd27ba87a966..f891ba92c5096224f707db33c6cf15d98ed01459 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libc.a and b/sysroot/usr/lib/arm-linux-androideabi/libc.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libcompiler_rt-extras.a b/sysroot/usr/lib/arm-linux-androideabi/libcompiler_rt-extras.a index b4b7f8257e17b065b8f6cc6166113cf400989f59..304d822ea0e8442ff7754a8f2fb6e1276ec8e5b5 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libcompiler_rt-extras.a and b/sysroot/usr/lib/arm-linux-androideabi/libcompiler_rt-extras.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libdl.a b/sysroot/usr/lib/arm-linux-androideabi/libdl.a index 114705b6f1cb44e6028268bb83984de3dac5f1af..0ef5519c9241f5182169a3867938c86335abbef3 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libdl.a and b/sysroot/usr/lib/arm-linux-androideabi/libdl.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libm.a b/sysroot/usr/lib/arm-linux-androideabi/libm.a index f8ecd6b1019a5687ebd0d48b1043312ac58050c1..39054a50b728d28dd85389bb7f14fc294dfac6a7 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libm.a and b/sysroot/usr/lib/arm-linux-androideabi/libm.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libstdc++.a b/sysroot/usr/lib/arm-linux-androideabi/libstdc++.a index 8b1037da465534254b99bbe343cfd911da5b52e7..9262ea12d350800192ae31373ba3b7659bf3a3ee 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libstdc++.a and b/sysroot/usr/lib/arm-linux-androideabi/libstdc++.a differ diff --git a/sysroot/usr/lib/arm-linux-androideabi/libz.a b/sysroot/usr/lib/arm-linux-androideabi/libz.a index 40baf38128771428ac43c0abfd0711bdf7e72b93..8908890105ddea2e198e9499c784eff4a48bd56e 100644 Binary files a/sysroot/usr/lib/arm-linux-androideabi/libz.a and b/sysroot/usr/lib/arm-linux-androideabi/libz.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libc.a b/sysroot/usr/lib/i686-linux-android/libc.a index f0c75a964369b88535b14d49fed32a71637648cd..000d5e09b6f0c4ed67eeda000aa0c11a678b0773 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libc.a and b/sysroot/usr/lib/i686-linux-android/libc.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libcompiler_rt-extras.a b/sysroot/usr/lib/i686-linux-android/libcompiler_rt-extras.a index df0a3801aa4a7bb863ddd1f0bde54a4704d5ec70..7606d5d7a9050d88bfbeccfcb40b71cc235b44dc 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libcompiler_rt-extras.a and b/sysroot/usr/lib/i686-linux-android/libcompiler_rt-extras.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libdl.a b/sysroot/usr/lib/i686-linux-android/libdl.a index cbb46357b570bdda2faf3fbf6cd797e1c206d5f5..17c5c415f55b873359a08b3369cab72b18664b43 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libdl.a and b/sysroot/usr/lib/i686-linux-android/libdl.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libm.a b/sysroot/usr/lib/i686-linux-android/libm.a index 3f60f233a89b7ab28a61241af927f63d7e2d2d24..3e5fb48c23096ff9c5665b331972ab48c81c3cb1 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libm.a and b/sysroot/usr/lib/i686-linux-android/libm.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libstdc++.a b/sysroot/usr/lib/i686-linux-android/libstdc++.a index b00bdd4d4c618fe532f28b0357a8e927d8f9ac4b..0e6f059c0c88ec9384c74bd5a9483cedd3285fbe 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libstdc++.a and b/sysroot/usr/lib/i686-linux-android/libstdc++.a differ diff --git a/sysroot/usr/lib/i686-linux-android/libz.a b/sysroot/usr/lib/i686-linux-android/libz.a index 4d13897db08bfa58f11cb0ebd981b056b776db96..6c4a30a75db3de067a22643b2cf2dec33df8a31c 100644 Binary files a/sysroot/usr/lib/i686-linux-android/libz.a and b/sysroot/usr/lib/i686-linux-android/libz.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libc.a b/sysroot/usr/lib/x86_64-linux-android/libc.a index 1ff89f6c856f876d8eb3c408bc416e5d1003ef2e..78ad2f90df1fe56446620be1d4e0887c5cfae7df 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libc.a and b/sysroot/usr/lib/x86_64-linux-android/libc.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libcompiler_rt-extras.a b/sysroot/usr/lib/x86_64-linux-android/libcompiler_rt-extras.a index e9638e0844a260e41145faa5e9cc492af616840b..4e9da297ed501fb2871822cae4fc66bd58a4586e 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libcompiler_rt-extras.a and b/sysroot/usr/lib/x86_64-linux-android/libcompiler_rt-extras.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libdl.a b/sysroot/usr/lib/x86_64-linux-android/libdl.a index 726228585e1775739b6cbb809c7699c761c0df1e..21379b8003802ee28acf276ecbe016b304af9134 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libdl.a and b/sysroot/usr/lib/x86_64-linux-android/libdl.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libm.a b/sysroot/usr/lib/x86_64-linux-android/libm.a index bc37388a5e3bd252f2f35a848d967ad0259c1ed0..01ff1a64542cd91318b2214a25ce537463d7eaeb 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libm.a and b/sysroot/usr/lib/x86_64-linux-android/libm.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libstdc++.a b/sysroot/usr/lib/x86_64-linux-android/libstdc++.a index 20a863f6164f9c7155a9253c7353e508e06a62a0..ca0f658f51dd8ae08dc6b621ce0bad68e1577df5 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libstdc++.a and b/sysroot/usr/lib/x86_64-linux-android/libstdc++.a differ diff --git a/sysroot/usr/lib/x86_64-linux-android/libz.a b/sysroot/usr/lib/x86_64-linux-android/libz.a index 60475261c591535ef003517f4bedaa22f51d7826..060748f5f429dd74713b3ce5f22761640c4e4fd7 100644 Binary files a/sysroot/usr/lib/x86_64-linux-android/libz.a and b/sysroot/usr/lib/x86_64-linux-android/libz.a differ diff --git a/toolchains/renderscript/prebuilt/linux-x86_64/repo.prop b/toolchains/renderscript/prebuilt/linux-x86_64/repo.prop index 695d6f9e9f13154a0531fe07bfd9e914c8950057..5759db3b41f335bed8b19131164b902295cf83af 100644 --- a/toolchains/renderscript/prebuilt/linux-x86_64/repo.prop +++ b/toolchains/renderscript/prebuilt/linux-x86_64/repo.prop @@ -1,17 +1,17 @@ platform/bionic 0237218b90c81a6977be59971d52f20063c0793c platform/development b7732bd3281041709d40c6e07cd8e66c682cb943 platform/external/googletest 220810a546aa9db3a3cfd39874663884dbbe8c59 -platform/external/libcxx a511ded040ac6c61325d8066599a3beb417ef83a +platform/external/libcxx 44244c14a5a0727733137dcbea47474cec8debe8 platform/external/libcxxabi fa5a0a5055c2da528f4acd8f4ac5a62b2da7d133 platform/external/libunwind_llvm fecc6f26cfdbfc9cf0ea2021629ac6e85b7c0113 platform/external/llvm 79c7f5d7a2be0de081031e0ebcd481ab7905854b -platform/external/shaderc/glslang 8f05973b2cb583fbc6f950c137396cc3e9fdc50f -platform/external/shaderc/shaderc 6cd7a08592cf568d595069552d3bb6cf21addb66 -platform/external/shaderc/spirv-headers 07b132823683dfbd2ff06794fc056582427987f9 -platform/external/shaderc/spirv-tools 28bda583e8f8e09d8747cfee019cf38c7a8a91e9 -platform/external/vulkan-validation-layers e4dbf1abb9d08e1d05fd201ecb307bc7c38cb595 +platform/external/shaderc/glslang 4fba78ac61073ee065872ad177dc93a8afca559f +platform/external/shaderc/shaderc 79a76bebdbc35da49ee0e89a31357995f57abb38 +platform/external/shaderc/spirv-headers 9b020b2c0b467a4a9c5c00b9771bca956223bc49 +platform/external/shaderc/spirv-tools 269c7e8719231e41365a96b6bfd659899b6f7703 +platform/external/vulkan-validation-layers f6b5827624fb49308eb1576287fd35d3fe5a1863 platform/manifest 84e2d198c54099754062710cbfca859831cea689 -platform/ndk cab15e04503b983275e9bf9473e987640f9aec92 +platform/ndk ceca5f4bf98175cac7c1fe016fcb7fd7040e551d platform/prebuilts/clang/host/darwin-x86 8ff3ad1ad95e9c4f20bf3734a26b002fb4100029 platform/prebuilts/clang/host/linux-x86 585b7364a96a55546256e158a78a9ffb7a02c889 platform/prebuilts/clang/host/windows-x86 c56e837ed056a5a2b49244f953cc4fe92b5f9847 @@ -33,7 +33,7 @@ platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 2ccb38af8c940f1 platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8 e76a9a506d7ad132f107eb2f7c27b6a8ccb68b91 platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9 388fdc4995d374d76a0c4b292afabac91638e134 platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9 a448493cc447864f1838d4d220eadd901e36787a -platform/prebuilts/ndk 47939c56adb55b4563e20e2460b42d13978338b2 +platform/prebuilts/ndk 49605f7c20232ba9189172d2717953bc8f62d595 platform/prebuilts/ninja/darwin-x86 00f798346dedb4a7a6a6dcc9ad32ff09d66ee0db platform/prebuilts/ninja/linux-x86 6369b19fc3fbe765636af75d394627e2b92599ed platform/prebuilts/python/darwin-x86/2.7.5 0c5958b1636c47ed7c284f859c8e805fd06a0e63 @@ -41,7 +41,7 @@ platform/prebuilts/python/linux-x86/2.7.5 47abe498f32ff1721f5177ad5a51ee0e35d969 platform/prebuilts/renderscript/host/darwin-x86 a0ede5664b4741348c0b6c8d5da06d483dcf2876 platform/prebuilts/renderscript/host/linux-x86 68a0a1ddacb81c97d718f46ad464a3851d0b67af platform/prebuilts/renderscript/host/windows-x86 5df9f20565e63906167c82f6120c78e969b3b467 -platform/prebuilts/simpleperf 29b5005620701923580c5000f6b215f664c68931 +platform/prebuilts/simpleperf a8fbea9844ddb5a7d55b2e3e417695ebfcd5475f toolchain/binutils 6fa214b61c53685d846a18d1001aa437c8338821 toolchain/build 58be6006bb71abb97d7cdff7be3e73d55bbc22b8 toolchain/cloog 604793eab97d360aef729f064674569ee6dbf3e1